Title: [231769] trunk/Source/WebKit
- Revision
- 231769
- Author
- bb...@apple.com
- Date
- 2018-05-14 14:26:51 -0700 (Mon, 14 May 2018)
Log Message
Web Automation: Automation.getBrowsingContext returns window origin that differs from window.screenX/Y
https://bugs.webkit.org/show_bug.cgi?id=185571
<rdar://problem/40180785>
Reviewed by Timothy Hatcher.
This code path was refactored to use completion handlers. It seems that the window.screenX/Y
code path converts back to user coordinates but the WebDriver code path does not. Make them
consistent since that is how it is spec'd and tested.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getWindowFrameWithCallback):
Convert the window frame to user coordinate space so it's the same as window.screenY.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (231768 => 231769)
--- trunk/Source/WebKit/ChangeLog 2018-05-14 21:19:28 UTC (rev 231768)
+++ trunk/Source/WebKit/ChangeLog 2018-05-14 21:26:51 UTC (rev 231769)
@@ -1,3 +1,19 @@
+2018-05-11 Brian Burg <bb...@apple.com>
+
+ Web Automation: Automation.getBrowsingContext returns window origin that differs from window.screenX/Y
+ https://bugs.webkit.org/show_bug.cgi?id=185571
+ <rdar://problem/40180785>
+
+ Reviewed by Timothy Hatcher.
+
+ This code path was refactored to use completion handlers. It seems that the window.screenX/Y
+ code path converts back to user coordinates but the WebDriver code path does not. Make them
+ consistent since that is how it is spec'd and tested.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::getWindowFrameWithCallback):
+ Convert the window frame to user coordinate space so it's the same as window.screenY.
+
2018-05-14 Brian Burg <bb...@apple.com>
WebDriver: W3C test case actions/key.py::test_lone_keyup_sends_no_events is failing
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (231768 => 231769)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-05-14 21:19:28 UTC (rev 231768)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-05-14 21:26:51 UTC (rev 231769)
@@ -4437,7 +4437,9 @@
void WebPageProxy::getWindowFrameWithCallback(Function<void(FloatRect)>&& completionHandler)
{
- m_uiClient->windowFrame(*this, WTFMove(completionHandler));
+ m_uiClient->windowFrame(*this, [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (FloatRect frame) {
+ completionHandler(m_pageClient.convertToUserSpace(frame));
+ });
}
void WebPageProxy::screenToRootView(const IntPoint& screenPoint, Ref<Messages::WebPageProxy::ScreenToRootView::DelayedReply>&& reply)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes