提交 eb09095b 编写于 作者: H Hixie

Zero warnings from the analyzer!

Ok, not really zero. Actually 72 if you include warnings from non-sky packages and if you include bogus warnings that can be filtered out.

If you pipe the analyzer's output through the following perl script, though, you get zero warnings on the stock app with this patch:

while (defined($_ = <STDIN>)) {
    s|out/android_Debug/gen/dart-pkg/sky/|sky/sdk/|gos;
    next if m|/dart-pkg/|os; # other packages
    next if m|^\[warning] Missing concrete implementation of 'RenderObject.toString'|os; # https://github.com/dart-lang/sdk/issues/23606
    print;
}

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1182323009.
上级 55fbd26e
......@@ -893,7 +893,7 @@ class RenderTransform extends RenderProxyBox {
void hitTestChildren(HitTestResult result, { Point position }) {
Matrix4 inverse = new Matrix4.zero();
double det = inverse.copyInverse(_transform);
/* double det = */ inverse.copyInverse(_transform);
// TODO(abarth): Check the determinant for degeneracy.
Vector3 position3 = new Vector3(position.x, position.y, 0.0);
......
......@@ -65,14 +65,15 @@ class RenderInkWell extends RenderProxyBox {
final List<InkSplash> _splashes = new List<InkSplash>();
void handleEvent(sky.Event event, BoxHitTestEntry entry) {
switch (event.type) {
case 'gesturetapdown':
// TODO(abarth): We should position the splash at the location of the tap.
_startSplash(event.primaryPointer, entry.localPosition);
break;
case 'gesturetap':
_confirmSplash(event.primaryPointer);
break;
if (event is sky.GestureEvent) {
switch (event.type) {
case 'gesturetapdown':
_startSplash(event.primaryPointer, entry.localPosition);
break;
case 'gesturetap':
_confirmSplash(event.primaryPointer);
break;
}
}
}
......
......@@ -109,11 +109,11 @@ abstract class Widget {
// Returns the child which should be retained as the child of this node.
Widget syncChild(Widget node, Widget oldNode, dynamic slot) {
assert(oldNode is! Component || !oldNode._disqualifiedFromEverAppearingAgain);
assert(oldNode is! Component || (oldNode is Component && !oldNode._disqualifiedFromEverAppearingAgain)); // TODO(ianh): Simplify this once the analyzer is cleverer
if (node == oldNode) {
assert(node == null || node.mounted);
assert(node is! RenderObjectWrapper || node._ancestor != null);
assert(node is! RenderObjectWrapper || (node is RenderObjectWrapper && node._ancestor != null)); // TODO(ianh): Simplify this once the analyzer is cleverer
return node; // Nothing to do. Subtrees must be identical.
}
......@@ -495,7 +495,7 @@ abstract class RenderObjectWrapper extends Widget {
void insertChildRoot(RenderObjectWrapper child, dynamic slot);
void detachChildRoot(RenderObjectWrapper child);
void _sync(Widget old, dynamic slot) {
void _sync(RenderObjectWrapper old, dynamic slot) {
// TODO(abarth): We should split RenderObjectWrapper into two pieces so that
// RenderViewObject doesn't need to inherit all this code it
// doesn't need.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册