Title: [187517] trunk/Source/WebKit2
- Revision
- 187517
- Author
- [email protected]
- Date
- 2015-07-28 14:43:30 -0700 (Tue, 28 Jul 2015)
Log Message
Bounds in InteractionInformationAtPosition should be always in main frame coordinate space.
https://bugs.webkit.org/show_bug.cgi?id=147372
When we prepare the bounds for InteractionInformationAtPosition, we should convert the rect to
main frame space since WKContent in UIProcess expects it to be in the web view space.
Patch by Yongjun Zhang <[email protected]> on 2015-07-28
Reviewed by Tim Horton.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation): Convert the bounding rect to main frame space if the element is inside a sub-frame.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (187516 => 187517)
--- trunk/Source/WebKit2/ChangeLog 2015-07-28 21:42:56 UTC (rev 187516)
+++ trunk/Source/WebKit2/ChangeLog 2015-07-28 21:43:30 UTC (rev 187517)
@@ -1,3 +1,16 @@
+2015-07-28 Yongjun Zhang <[email protected]>
+
+ Bounds in InteractionInformationAtPosition should be always in main frame coordinate space.
+ https://bugs.webkit.org/show_bug.cgi?id=147372
+
+ When we prepare the bounds for InteractionInformationAtPosition, we should convert the rect to
+ main frame space since WKContent in UIProcess expects it to be in the web view space.
+
+ Reviewed by Tim Horton.
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::getPositionInformation): Convert the bounding rect to main frame space if the element is inside a sub-frame.
+
2015-07-27 Simon Fraser <[email protected]>
PathApplierFunction should take a reference to a PathElement
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (187516 => 187517)
--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-07-28 21:42:56 UTC (rev 187516)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-07-28 21:43:30 UTC (rev 187517)
@@ -2252,6 +2252,11 @@
info.bounds = downcast<RenderImage>(*renderer).absoluteContentQuad().enclosingBoundingBox();
else
info.bounds = renderer->absoluteBoundingBoxRect();
+
+ if (!renderer->document().frame()->isMainFrame()) {
+ FrameView *view = renderer->document().frame()->view();
+ info.bounds = view->contentsToRootView(info.bounds);
+ }
}
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes