[webkit-reviews] review denied: [Bug 172019] elementFromPoint() should consider x and y to be in client (layout viewport) coordinates : [Attachment 314850] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 7 18:07:02 PDT 2017
Simon Fraser (smfr) <simon.fraser at apple.com> has denied Ali Juma
<ajuma at chromium.org>'s request for review:
Bug 172019: elementFromPoint() should consider x and y to be in client (layout
viewport) coordinates
https://bugs.webkit.org/show_bug.cgi?id=172019
Attachment 314850: Patch
https://bugs.webkit.org/attachment.cgi?id=314850&action=review
--- Comment #11 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 314850
--> https://bugs.webkit.org/attachment.cgi?id=314850
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=314850&action=review
See the "Coordinate systems:" comment in FrameView.h, and enhance it to add
"layoutViewport" coordinates.
> Source/WebCore/page/FrameView.cpp:4930
> + ASSERT(frame().settings().visualViewportEnabled());
> + rect.scale(frame().frameScaleFactor());
> + return rect;
This seems wrong. layoutViewport -> absolute should be accounting for both the
layout viewport origin, and the frame scale.
> Source/WebCore/page/FrameView.cpp:4936
> + p.scale(frame().frameScaleFactor());
Ditto.
> Source/WebCore/page/FrameView.cpp:4944
> + ASSERT(frame().settings().visualViewportEnabled());
> + p.scale(frame().pageZoomFactor());
> + p.moveBy(layoutViewportRect().location());
client to layout viewport should just be about pageZoom.
> Source/WebCore/page/FrameView.h:480
> + FloatRect layoutViewportToAbsoluteRect(FloatRect) const;
> + FloatPoint layoutViewportToAbsolutePoint(FloatPoint) const;
> +
> + FloatPoint clientToLayoutViewportPoint(FloatPoint) const;
Please add a comment saying that "layoutViewport" coordinate differ from client
coordinates because of page zoom.
More information about the webkit-reviews
mailing list