[webkit-changes] [WebKit/WebKit] 17b29b: Cherry-pick 267513 at main (b680f873f609). https://bu...

Karl Dubost noreply at github.com
Thu Jan 25 00:07:40 PST 2024


  Branch: refs/heads/webkitglib/2.42
  Home:   https://github.com/WebKit/WebKit
  Commit: 17b29bb8b7ff360e846cdcc5e1f67f3eb40893a3
      https://github.com/WebKit/WebKit/commit/17b29bb8b7ff360e846cdcc5e1f67f3eb40893a3
  Author: Matthew Finkel <sysrqb at apple.com>
  Date:   2024-01-24 (Wed, 24 Jan 2024)

  Changed paths:
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/html/HTMLCanvasElement.cpp
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h
    M Source/WebCore/platform/Logging.h
    M Tools/TestWebKitAPI/Tests/WebKit/AdvancedPrivacyProtections.mm

  Log Message:
  -----------
  Cherry-pick 267513 at main (b680f873f609). https://bugs.webkit.org/show_bug.cgi?id=260842

    Add general quirk for canvas2d fingerprinting
    https://bugs.webkit.org/show_bug.cgi?id=260842
    rdar://113039941

    Reviewed by Wenson Hsieh.

    In 266400 at main I added a quirk for canvas fingerprinting that targeted specific
    pages on two specific domains. As a follow up to that, this patch expands the
    application of that quirk broadly by comparing attributes of the script instead
    of looking at the specific document URL. This step is important because we know
    protections against canvas fingerprinting cause breakage on some sites, and
    there is likely more greater impact than we're aware at this time.

    Similar to the current behavior, this patch relies on matching the last drawn
    text string. In addition, it compares the dimensions of the canvas and the size
    of the script. These characteristics seem sufficiently descriptive that we can
    safely use them for identifying the target script.

    This patch also introduces the CanvasFingerprintingQuirkEnabled preference for
    controlling whether the quirk is available. It also adapts the existing API
    test.

    * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
    * Source/WebCore/html/HTMLCanvasElement.cpp:
    (WebCore::HTMLCanvasElement::toDataURL):
    * Source/WebCore/page/Quirks.cpp:
    (WebCore::Quirks::advancedPrivacyProtectionSubstituteDataURLForScriptWithFeatures const):
    (WebCore::Quirks::shouldEnableCanvas2DAdvancedPrivacyProtectionQuirk const): Deleted.
    (WebCore::Quirks::advancedPrivacyProtectionSubstituteDataURLForText const): Deleted.
    * Source/WebCore/page/Quirks.h:
    * Source/WebCore/platform/Logging.h:
    * Tools/TestWebKitAPI/Tests/WebKit/AdvancedPrivacyProtections.mm:
    (TestWebKitAPI::TEST):

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


  Commit: 606b0dca0f988e21fa11f539d7ac02d1719e378f
      https://github.com/WebKit/WebKit/commit/606b0dca0f988e21fa11f539d7ac02d1719e378f
  Author: Olivier Blin <olivier.blin at softathome.com>
  Date:   2024-01-24 (Wed, 24 Jan 2024)

  Changed paths:
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp

  Log Message:
  -----------
  Cherry-pick 268769 at main (e0366ad8cf40). https://bugs.webkit.org/show_bug.cgi?id=262300

    Remove BBC radio player quirk leftovers
    https://bugs.webkit.org/show_bug.cgi?id=262300

    Reviewed by Kate Cheney and Brent Fulgham.

    The BBC radio player quirk has been removed in 266597 at main (9b58b4b),
    which is a back-merge of 259548.824 at safari-7615-branch (cff01e3).

    But this commit did not remove the Quirks::staticRadioPlayerURLString() method
    initially removed, and a second quirk part added in 261190 at main (ae69009)
    which is now irrelevant and potentially broken.

    The usage of staticRadioPlayerURLString() also broke build without ITP support.

    * Source/WebCore/page/Quirks.cpp:
    (WebCore::Quirks::staticRadioPlayerURLString): Deleted.
    * Source/WebCore/page/Quirks.h:
    * Source/WebKit/UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::createNewPage):

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


  Commit: c9b30262a8e166c96d75083a5e67b9c53ae53f7f
      https://github.com/WebKit/WebKit/commit/c9b30262a8e166c96d75083a5e67b9c53ae53f7f
  Author: Olivier Blin <olivier.blin at softathome.com>
  Date:   2024-01-24 (Wed, 24 Jan 2024)

  Changed paths:
    M Source/WebCore/dom/Element.h
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
    M Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp
    M Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  Cherry-pick 268975 at main (a6bbf5eb1b30). https://bugs.webkit.org/show_bug.cgi?id=262533

    Fix build without ITP
    https://bugs.webkit.org/show_bug.cgi?id=262533

    Reviewed by Michael Catanzaro.

    * Source/WebCore/dom/Element.h:
    Drive-by typo fix to rename isSyntheticClick variable as isSyntheticClick

    * Source/WebCore/page/Quirks.cpp:
    (WebCore::Quirks::triggerOptionalStorageAccessQuirk const):
    Flag isSyntheticClick usage added in 238929 at main (98bc1318d160)

    * Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp:
    (WebCore::NetworkStorageSession::setCookiesFromDOM const):
    (WebCore::NetworkStorageSession::getRawCookies const):
    (WebCore::cookiesForSession):
    Flag shouldRelaxThirdPartyCookieBlocking usage added in 225134 at main (664f22663e8d)

    * Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:
    Include HashCountedSet.h to fix build of MessageReceiver objects without ITP

    * Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
    (WebKit::WebSWServerToContextConnection::fireNotificationEvent):
    Flag resourceLoadStatistics() usage added in 255816 at main (9404eeeb89ae)

    * Source/WebKit/NetworkProcess/cache/NetworkCache.cpp:
    Include WebsiteDataType.h for WebsiteDataType::DiskCache usage

    * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
    Flag RequestStorageAccessResult struct moved in 259893 at main (cbe22e46962f)

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


  Commit: 69f2fe3e5a75bdbcdda3e96e01ea07825d3f0609
      https://github.com/WebKit/WebKit/commit/69f2fe3e5a75bdbcdda3e96e01ea07825d3f0609
  Author: Philippe Normand <philn at igalia.com>
  Date:   2024-01-24 (Wed, 24 Jan 2024)

  Changed paths:
    M Source/WebCore/Modules/reporting/ReportingScope.cpp

  Log Message:
  -----------
  Cherry-pick 270612 at main (723ded32d95e). https://bugs.webkit.org/show_bug.cgi?id=264709

    [WPE][GTK][Debug] Crashes in imported/w3c/web-platform-tests/reporting
    https://bugs.webkit.org/show_bug.cgi?id=264709

    Reviewed by Michael Catanzaro.

    The C++ standard doesn't define an order of evaluation for function arguments, so without forcing it
    when creating the report we might trigger a use-after-move. This was specially noticeable on GCC
    builds, not so much with clang.

    * Source/WebCore/Modules/reporting/ReportingScope.cpp:
    (WebCore::ReportingScope::generateTestReport):

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


  Commit: dbd987a7fa9700233bc18a185c8ab1c8c28e3796
      https://github.com/WebKit/WebKit/commit/dbd987a7fa9700233bc18a185c8ab1c8c28e3796
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2024-01-25 (Thu, 25 Jan 2024)

  Changed paths:
    M Source/WebCore/dom/UserGestureIndicator.cpp
    M Source/WebCore/dom/UserGestureIndicator.h
    M Source/WebCore/page/EventHandler.cpp
    M Source/WebCore/page/LocalFrame.cpp
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h

  Log Message:
  -----------
  Cherry-pick 269736 at main (2575438ca004). https://bugs.webkit.org/show_bug.cgi?id=264484

    Pressing ⌘V pastes content twice in text fields on Tableau analytics dashboard
    https://bugs.webkit.org/show_bug.cgi?id=263590
    rdar://105750465

    Reviewed by Ryosuke Niwa.

    In Tableau's analytics tool, pressing ⌘V to paste in any focused editable areas pastes content
    twice after showing a Paste menu item, if the user clicks "Paste" on this item. This is because
    Tableau's script does something akin to the following:

    ```
    textField.addEventListener("keydown", event => {
        if (event.key === "v" && event.metaKey)
            document.execCommand("Paste");
    });
    ```

    ...which triggers a programmatic paste upon `keydown`, without preventing default. This means that
    if the programmatic DOM paste is accepted, we'll end up triggering two paste commands: (1) due to
    the `execCommand`, and (2) due to the default behavior of ⌘V.

    While this is ostensibly a website bug, it works fine in other browsers (Firefox, Chrome) because
    they don't support DOM paste at all, so we just end up silently failing the programmatic paste
    before performing the real paste.

    For now, fix this by adding a quirk for Tableau's analytics page which disables DOM paste access
    triggered by key events. Making this a quirk limits risk in the short term, since it's possible that
    there are other web apps and frameworks that already assume (based on user agent/engine checks) that
    Safari/WebKit will show DOM paste prompts on key events.

    * Source/WebCore/dom/UserGestureIndicator.cpp:
    (WebCore::UserGestureToken::UserGestureToken):
    (WebCore::UserGestureIndicator::UserGestureIndicator):
    * Source/WebCore/dom/UserGestureIndicator.h:

    Add a new enum flag to determine whether or not we should allow DOM paste requests under the user
    gesture token.

    (WebCore::UserGestureToken::create):
    (WebCore::UserGestureToken::canRequestDOMPaste const):
    * Source/WebCore/page/EventHandler.cpp:
    (WebCore::EventHandler::internalKeyEvent):

    Pass in `CanRequestDOMPaste::No` if the quirk is enabled.

    * Source/WebCore/page/LocalFrame.cpp:
    (WebCore::LocalFrame::requestDOMPasteAccess):
    * Source/WebCore/page/Quirks.cpp:
    (WebCore::Quirks::needsDisableDOMPasteAccessQuirk const):

    Add the quirk; check `window.tableauPrep` instead of a domain, to fix other (non-Apple-internal)
    Tableau instances which would also encounter this same issue.

    * Source/WebCore/page/Quirks.h:

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


  Commit: 3606ce3a3ff0a57198fe975478c7799831ed218d
      https://github.com/WebKit/WebKit/commit/3606ce3a3ff0a57198fe975478c7799831ed218d
  Author: Karl Dubost <karlcow at apple.com>
  Date:   2024-01-25 (Thu, 25 Jan 2024)

  Changed paths:
    M Source/WebCore/page/Quirks.cpp

  Log Message:
  -----------
  Cherry-pick 269888 at main (3aa4d2baaa6f). https://bugs.webkit.org/show_bug.cgi?id=263789

    Extend Quirk shouldDisableContentChangeObserver() to the full YouTube.com
    https://bugs.webkit.org/show_bug.cgi?id=263789
    rdar://115566212

    Reviewed by Chris Dumez.

    Video thumbnails on the YouTube site are not navigating to the Video
    page when tapping them. This problem was fixed in the past for the
    search and results page. This PR extends the quirks to the full YouTube
    domain.

    * Source/WebCore/page/Quirks.cpp:
    (WebCore::Quirks::shouldDisableContentChangeObserver const):

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


  Commit: b598e33201ef86dff25d9ab1ef375f51efc01f4c
      https://github.com/WebKit/WebKit/commit/b598e33201ef86dff25d9ab1ef375f51efc01f4c
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2024-01-25 (Thu, 25 Jan 2024)

  Changed paths:
    M Source/WebCore/page/Quirks.cpp

  Log Message:
  -----------
  Cherry-pick 269984 at main (53f7b4f3ed1c). https://bugs.webkit.org/show_bug.cgi?id=263914

    Avoid an occasional null deref under Quirks::advancedPrivacyProtectionSubstituteDataURLForScriptWithFeatures
    https://bugs.webkit.org/show_bug.cgi?id=263914
    rdar://117671779

    Reviewed by Aditya Keerthi.

    Add a null check and bail in `advancedPrivacyProtectionSubstituteDataURLForScriptWithFeatures`, in
    the case where the `CodeBlock`'s owner executable is null. Currently, we call `source()` to grab
    the corresponding `JSC::SourceCode`, which assumes that `m_ownerExecutable` exists (which isn't
    always the case).

    * Source/WebCore/page/Quirks.cpp:
    (WebCore::Quirks::advancedPrivacyProtectionSubstituteDataURLForScriptWithFeatures const):

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


  Commit: 18a2e54401881e6b077f1d3ae797b1f265e9d4ec
      https://github.com/WebKit/WebKit/commit/18a2e54401881e6b077f1d3ae797b1f265e9d4ec
  Author: Karl Dubost <karlcow at apple.com>
  Date:   2024-01-25 (Thu, 25 Jan 2024)

  Changed paths:
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h
    M Source/WebCore/page/ios/ContentChangeObserver.cpp
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

  Log Message:
  -----------
  Cherry-pick 270256 at main (995ab8e86662). https://bugs.webkit.org/show_bug.cgi?id=264234

    Remove Quirk shouldDisableContentChangeObserver() for YouTube.com
    https://bugs.webkit.org/show_bug.cgi?id=264234
    rdar://117975999

    Reviewed by Tim Horton.

    This removes the Quirk which had been set for YouTube in the context
    of the iPad Pro, where people could not click on thumbnails on
    search and results page.
    https://bugs.webkit.org/show_bug.cgi?id=249740
    it was then later extended to cover the full domain of YouTube.
    https://bugs.webkit.org/show_bug.cgi?id=263789
    YouTube team fixed the issue on their side. It removes the need for
    this specific Quirk.

    We probably want to take another look at
    Quirks::shouldDisableContentChangeObserverTouchEventAdjustment()
    and if it is still needed, but to minimize the effect of this fix,
    it will be handled in another PR if necessary.

    * Source/WebCore/page/Quirks.cpp:
    (WebCore::Quirks::shouldDisableContentChangeObserver const): Deleted.
    * Source/WebCore/page/Quirks.h:
    * Source/WebCore/page/ios/ContentChangeObserver.cpp:
    (WebCore::ContentChangeObserver::isContentChangeObserverEnabled):
    * Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
    (WebKit::WebPage::handleSyntheticClick):
    (WebKit::WebPage::completeSyntheticClick):

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


  Commit: 2b7365aa4e5f8507c3e126e1431ad31a93d462cf
      https://github.com/WebKit/WebKit/commit/2b7365aa4e5f8507c3e126e1431ad31a93d462cf
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2024-01-25 (Thu, 25 Jan 2024)

  Changed paths:
    A LayoutTests/fast/events/key-event-with-quirks-enabled-expected.txt
    A LayoutTests/fast/events/key-event-with-quirks-enabled.html
    M Source/WebCore/bindings/js/JSLocalDOMWindowCustom.cpp
    M Source/WebCore/page/Quirks.cpp

  Log Message:
  -----------
  Cherry-pick 270961 at main (a6eac11140b4). https://bugs.webkit.org/show_bug.cgi?id=265113

    Occasional debug assertion under IntlNumberFormat::initializeNumberFormat when running Speedometer 3
    https://bugs.webkit.org/show_bug.cgi?id=265113
    rdar://118619451

    Reviewed by Chris Dumez.

    Grab the JSC API lock before calling into `JSObject::hasProperty()` when checking for the presence
    of the `tableauPrep` property.

    * LayoutTests/fast/events/key-event-with-quirks-enabled-expected.txt: Added.
    * LayoutTests/fast/events/key-event-with-quirks-enabled.html: Added.
    * Source/WebCore/bindings/js/JSLocalDOMWindowCustom.cpp:
    (WebCore::JSLocalDOMWindow::getOwnPropertySlot):
    (WebCore::JSLocalDOMWindow::getOwnPropertySlotByIndex):

    Add a new debug assertion when reading properties off of the window object without having the JS API
    lock; without the fix above, the assertion is hit in the new layout test, where site-specific quirks
    are enabled.

    * Source/WebCore/page/Quirks.cpp:
    (WebCore::Quirks::needsDisableDOMPasteAccessQuirk const):

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


  Commit: 5251327506b49817a59d726aefd70cf42f913f8a
      https://github.com/WebKit/WebKit/commit/5251327506b49817a59d726aefd70cf42f913f8a
  Author: Karl Dubost <karlcow at apple.com>
  Date:   2024-01-25 (Thu, 25 Jan 2024)

  Changed paths:
    M Source/WebCore/dom/EventTarget.cpp
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h

  Log Message:
  -----------
  Cherry-pick 270987 at main (fc500207b6a8). https://bugs.webkit.org/show_bug.cgi?id=241782

    Remove Quirk dead code: passive mousewheel event for smoothscroll.js
    https://bugs.webkit.org/show_bug.cgi?id=241782
    rdar://95972172

    Reviewed by Antti Koivisto.

    In https://github.com/whatwg/dom/issues/1088, Simon Pieters analyzed
    the hack introduced by WebKit and Blink to determine if it was
    necessary to implement it in Gecko, but during the investigation
    he discovered that a part of the Quirk being dead code. Blink removed
    this hack on June 2022.
    https://bugs.chromium.org/p/chromium/issues/detail?id=1337217
    It should be possible to remove it on WebKit as well.

    * Source/WebCore/dom/EventTarget.cpp:
    (WebCore::EventTarget::addEventListener):
    * Source/WebCore/page/Quirks.cpp:
    (WebCore::Quirks::shouldMakeEventListenerPassive):
    * Source/WebCore/page/Quirks.h:

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


  Commit: 31c70df9a06598ff2c84861112be7eece6bbb4a3
      https://github.com/WebKit/WebKit/commit/31c70df9a06598ff2c84861112be7eece6bbb4a3
  Author: Karl Dubost <karlcow at apple.com>
  Date:   2024-01-25 (Thu, 25 Jan 2024)

  Changed paths:
    M Source/WebCore/page/Quirks.cpp

  Log Message:
  -----------
  Cherry-pick 271049 at main (45154fac42da). https://bugs.webkit.org/show_bug.cgi?id=265231

    Remove Quirk shouldDispatchSimulatedMouseEvents() for airtable.com
    https://bugs.webkit.org/show_bug.cgi?id=265231
    rdar://118707570

    Reviewed by Antti Koivisto.

    This quirk was created for airtable to make it possible to navigate
    tables. It appears the Quirk is not necessary anymore. The steps to
    reproduce are described in the bug.
    Initial bug
    ​https://bugs.webkit.org/show_bug.cgi?id=201456
    <rdar://problem/51557377>

    * Source/WebCore/page/Quirks.cpp:
    (WebCore::Quirks::simulatedMouseEventTypeForTarget const):

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


Compare: https://github.com/WebKit/WebKit/compare/27a50613a11c...31c70df9a065


More information about the webkit-changes mailing list