[webkit-changes] [WebKit/WebKit] dbfde8: User agent JavaScript from full web browsers shoul...
Brady Eidson
noreply at github.com
Fri Aug 4 20:46:52 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dbfde8312289088b7720a0a50d2676d740b6eaf8
https://github.com/WebKit/WebKit/commit/dbfde8312289088b7720a0a50d2676d740b6eaf8
Author: Brady Eidson <beidson at apple.com>
Date: 2023-08-04 (Fri, 04 Aug 2023)
Changed paths:
M Source/WebCore/bindings/js/RunJavaScriptParameters.h
M Source/WebCore/bindings/js/ScriptController.cpp
M Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.h
M Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm
M Source/WebKit/UIProcess/API/C/WKPage.cpp
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
M Source/WebKit/UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp
Log Message:
-----------
User agent JavaScript from full web browsers should clear transient activation.
rdar://104748908
https://bugs.webkit.org/show_bug.cgi?id=251276
Reviewed by Brent Fulgham.
Take the solution from https://commits.webkit.org/265168@main and extend it to full web browsers now.
* Source/WebCore/bindings/js/RunJavaScriptParameters.h:
(WebCore::RunJavaScriptParameters::RunJavaScriptParameters):
(WebCore::RunJavaScriptParameters::encode const):
(WebCore::RunJavaScriptParameters::decode):
* Source/WebCore/bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeScriptInWorldIgnoringException):
(WebCore::ScriptController::executeScriptInWorld):
(WebCore::ScriptController::executeUserAgentScriptInWorld):
* Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.h:
* Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm:
(WebKit::shouldEvaluateJavaScriptWithoutTransientActivation):
* Source/WebKit/UIProcess/API/C/WKPage.cpp:
(WKPageRunJavaScriptInMainFrame):
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _evaluateJavaScript:asAsyncFunction:withSourceURL:withArguments:forceUserGesture:inFrame:inWorld:completionHandler:]):
Originally-landed-as: 259548.854 at safari-7615-branch (465b681115e6). rdar://113286760
Canonical link: https://commits.webkit.org/266613@main
More information about the webkit-changes
mailing list