Title: [123855] trunk/Source/WebKit/chromium
- Revision
- 123855
- Author
- [email protected]
- Date
- 2012-07-27 02:36:18 -0700 (Fri, 27 Jul 2012)
Log Message
[chromium] Fix issues in visiblePositionForWindowPoint (offscreen points / iframes).
https://bugs.webkit.org/show_bug.cgi?id=79117
Fix two issues in WebFrameImpl::visiblePositionForWindowPoint.
1) If the point is off-screen, the visiblePosition is clipped to the screen.
- The fix is to add HitTestRequest::IgnoreClipping.
2) The result is incorrect if the point is within an iframe.
- This is because we are calling convertFromContainingWindow twice: once in windowToContents,
and then explicitly as well.
- This patch removes the explicit call to convertFromContainingWindow.
Patch by Oli Lan <[email protected]> on 2012-07-27
Reviewed by Adam Barth.
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::visiblePositionForWindowPoint):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (123854 => 123855)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-07-27 09:32:24 UTC (rev 123854)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-07-27 09:36:18 UTC (rev 123855)
@@ -1,3 +1,23 @@
+2012-07-27 Oli Lan <[email protected]>
+
+ [chromium] Fix issues in visiblePositionForWindowPoint (offscreen points / iframes).
+ https://bugs.webkit.org/show_bug.cgi?id=79117
+
+ Fix two issues in WebFrameImpl::visiblePositionForWindowPoint.
+
+ 1) If the point is off-screen, the visiblePosition is clipped to the screen.
+ - The fix is to add HitTestRequest::IgnoreClipping.
+
+ 2) The result is incorrect if the point is within an iframe.
+ - This is because we are calling convertFromContainingWindow twice: once in windowToContents,
+ and then explicitly as well.
+ - This patch removes the explicit call to convertFromContainingWindow.
+
+ Reviewed by Adam Barth.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::visiblePositionForWindowPoint):
+
2012-07-27 Peter Beverloo <[email protected]>
Unreviewed. Rolled DEPS.
Modified: trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp (123854 => 123855)
--- trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2012-07-27 09:32:24 UTC (rev 123854)
+++ trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2012-07-27 09:36:18 UTC (rev 123855)
@@ -1465,10 +1465,10 @@
HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move;
hitType |= HitTestRequest::ReadOnly;
hitType |= HitTestRequest::Active;
+ hitType |= HitTestRequest::IgnoreClipping;
HitTestRequest request(hitType);
FrameView* view = frame()->view();
- HitTestResult result(view->windowToContents(
- view->convertFromContainingWindow(IntPoint(point.x, point.y))));
+ HitTestResult result(view->windowToContents(IntPoint(point.x, point.y)));
frame()->document()->renderView()->layer()->hitTest(request, result);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes