[webkit-changes] [WebKit/WebKit] e2a957: ITP treats client injected JavaScript as user inte...

Charlie Wolfe noreply at github.com
Mon Aug 28 19:25:37 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e2a9577bb29b17921ccf6a419b67566f69d77de9
      https://github.com/WebKit/WebKit/commit/e2a9577bb29b17921ccf6a419b67566f69d77de9
  Author: Charlie Wolfe <charliew at apple.com>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M Source/WebCore/bindings/js/ScriptController.cpp
    M Source/WebCore/dom/UserGestureIndicator.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm

  Log Message:
  -----------
  ITP treats client injected JavaScript as user interaction
https://bugs.webkit.org/show_bug.cgi?id=260807
rdar://113989281

Reviewed by Brent Fulgham and John Wilander.

JavaScript evaluated by the client app is treated as if it was from a user gesture, so ITP
currently logs this as a user interaction. This leads to cases where a page can be granted
storage privileges without a meaningful user interaction.

The enum ProcessInteractionStyle already exists to indicate that logging user interaction
for a key press should be delayed until the key press is actually handled. Add another value
to this enum to indicate that a user gesture should never be logged as user interaction by ITP.

* Source/WebCore/bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeScriptInWorld):
* Source/WebCore/dom/UserGestureIndicator.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
(TEST):

Canonical link: https://commits.webkit.org/267381@main




More information about the webkit-changes mailing list