Commit 8bb1bb9e authored by Adam Barth's avatar Adam Barth

Merge pull request #451 from abarth/fix_hit_testing

Fix RenderViewport's hit testing
parents bce16609 325bfcc7
......@@ -1240,11 +1240,11 @@ class RenderViewport extends RenderBox with RenderObjectWithChildMixin<RenderBox
if (child != null) {
assert(child.parentData is BoxParentData);
Rect childBounds = child.parentData.position & child.size;
if (childBounds.contains(position + -scrollOffset))
child.hitTest(result, position: position + scrollOffset);
Point transformedPosition = position + scrollOffset;
if (childBounds.contains(transformedPosition))
child.hitTest(result, position: transformedPosition);
}
}
}
class RenderImage extends RenderBox {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment