Title: [230395] releases/WebKitGTK/webkit-2.20/Source/WebKit
- Revision
- 230395
- Author
- carlo...@webkit.org
- Date
- 2018-04-09 03:52:37 -0700 (Mon, 09 Apr 2018)
Log Message
Merge r229206 - Web Automation: script evaluations via WebDriver should have a user gesture indicator
https://bugs.webkit.org/show_bug.cgi?id=183230
<rdar://problem/37959739>
Reviewed by Andy Estes.
APIs that normally require a user gesture should just work when using via WebDriver.
To support cases where tests need to simulate user actions with _javascript_, use a
fake user gesture, similar to how -[WKWebView evaluateJavaScript:] forces a user
gesture when clients evaluate _javascript_ in their web view.
No new tests, this is covered by W3C tests that use the Fullscreen API.
This API does nothing if there is no user gesture; with this patch, it just works.
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog (230394 => 230395)
--- releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog 2018-04-09 10:52:32 UTC (rev 230394)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog 2018-04-09 10:52:37 UTC (rev 230395)
@@ -1,3 +1,22 @@
+2018-03-02 Brian Burg <bb...@apple.com>
+
+ Web Automation: script evaluations via WebDriver should have a user gesture indicator
+ https://bugs.webkit.org/show_bug.cgi?id=183230
+ <rdar://problem/37959739>
+
+ Reviewed by Andy Estes.
+
+ APIs that normally require a user gesture should just work when using via WebDriver.
+ To support cases where tests need to simulate user actions with _javascript_, use a
+ fake user gesture, similar to how -[WKWebView evaluateJavaScript:] forces a user
+ gesture when clients evaluate _javascript_ in their web view.
+
+ No new tests, this is covered by W3C tests that use the Fullscreen API.
+ This API does nothing if there is no user gesture; with this patch, it just works.
+
+ * WebProcess/Automation/WebAutomationSessionProxy.cpp:
+ (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):
+
2018-03-03 Brent Fulgham <bfulg...@apple.com>
Notify the NetworkProcess when a session is servicing an automation client
Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp (230394 => 230395)
--- releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp 2018-04-09 10:52:32 UTC (rev 230394)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp 2018-04-09 10:52:37 UTC (rev 230395)
@@ -271,7 +271,10 @@
JSValueMakeNumber(context, callbackTimeout)
};
- callPropertyFunction(context, scriptObject, ASCIILiteral("evaluateJavaScriptFunction"), WTF_ARRAY_LENGTH(functionArguments), functionArguments, &exception);
+ {
+ WebCore::UserGestureIndicator gestureIndicator(WebCore::ProcessingUserGesture, frame->coreFrame()->document());
+ callPropertyFunction(context, scriptObject, ASCIILiteral("evaluateJavaScriptFunction"), WTF_ARRAY_LENGTH(functionArguments), functionArguments, &exception);
+ }
if (!exception)
return;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes