[webkit-changes] [WebKit/WebKit] 767aeb: Cherry-pick 255673 at main (14bba72947fd). https://bu...

Adrian Perez noreply at github.com
Wed Jan 25 02:20:19 PST 2023


  Branch: refs/heads/webkitglib/2.38
  Home:   https://github.com/WebKit/WebKit
  Commit: 767aeb7c306f1f485afaf7491852c37904857ac2
      https://github.com/WebKit/WebKit/commit/767aeb7c306f1f485afaf7491852c37904857ac2
  Author: Xabier Rodriguez-Calvar <calvaris at igalia.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp

  Log Message:
  -----------
  Cherry-pick 255673 at main (14bba72947fd). https://bugs.webkit.org/show_bug.cgi?id=246682

    [GStreamer][EME] Prevent race conditions when flushing
    https://bugs.webkit.org/show_bug.cgi?id=246682

    Reviewed by Philippe Normand.

    In some cases, decryption can be slower than flush processing and we might be setting and unsetting the flushing flag
    without the decryption thread noticing. We add a small state machine to ensure that if we get a flush while decrypting,
    we are going to ditch that buffer even if the result was correctly decrypted.

    * Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
    (transformInPlace):
    (sinkEventHandler):

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


  Commit: c6781fcb5a125801e198e2b4631006b0859fd9ec
      https://github.com/WebKit/WebKit/commit/c6781fcb5a125801e198e2b4631006b0859fd9ec
  Author: Kimmo Kinnunen <kkinnunen at apple.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WTF/wtf/text/StringConcatenate.h
    M Source/WTF/wtf/text/StringView.cpp
    M Tools/TestWebKitAPI/CMakeLists.txt
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    M Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp
    R Tools/TestWebKitAPI/WTFStringUtilities.cpp
    M Tools/TestWebKitAPI/WTFStringUtilities.h

  Log Message:
  -----------
  Cherry-pick 256131 at main (d4f69df7d5b1). https://bugs.webkit.org/show_bug.cgi?id=247121

    StringOperations.cpp test re-defines WTF::StringTypeAdapter implementation, undefined behaviour
    https://bugs.webkit.org/show_bug.cgi?id=247121
    rdar://problem/101669240

    Reviewed by Antti Koivisto.

    In C++, one definition rule states that in one program each definition must consists out of
    same tokens in all compilation units in the program.
    https://en.cppreference.com/w/cpp/language/definition
        ...
        There can be more than one definition in a program of each of the following: class type,
        enumeration type, inline function, inline variable (since C++17), templated entity
        (template or member of template, but not full template specialization), as long as all
        of the following is true:
        ...
        - each definition consists of the same sequence of tokens (typically, appears in the same header file)
        ...
        if the definition is for a template, then all these requirements apply to both names at the point of
        definition and dependent names at the point of instantiation
        If all these requirements are satisfied, the program behaves as if there is only one definition in the
        entire program. Otherwise, the program is ill-formed, no diagnostic required.

    In other words: you cannot have two implementations of same template member function, one 100 bytes and
    one 1000mbs in size and select between them based on an #define before #include in different .cpp files
    in the same program.

    The tests would alter the StringView operator+ used templates via custom define before include.
    This results in undefined behavior, since libWTF.a would contain one implementation and use
    of the templates, while the StringOperators.cpp test would intend to contain a different
    implementation. Also, any other test in TestWTF would use the same version as StringOperators.cpp,
    due to how the includes are currently written.

    Using the hack only for StringOperators.cpp would preserve the UB but be the minimalistic change.
    However, this does not work:

    The requirement that WTFStringUtilities.h needs to be included before StringView.h
    is messing up the include order in tests. When trying to fix the include order for all
    other files except the StringOperators.cpp, the omission of the hack include will cause new, non-hacked
    template definition for the same templates that are hacked for StringOperators.cpp. This in turn
    causes non-deterministic selection of the template: the non-hacked, correct template is selected
    for all instantiations, including the ones in StringOperators.cpp. This causes the test to fail, as
    the hack is not present.

    This means that this sort of UB hack cannot be used for StringOperators.cpp while using the correct
    templates for other instantiations in the binary. This means that almost all WTFString-using tests
    must use WTFStringUtilities.h to get the hack. This has the problem:
     - UB
     - Messed up includes

    Fix this properly by not using the hack, rather putting the debug logic into the Debug build and
    disabling the test for non-Debug builds.

    Use atomic<int> to count the copies so that it doesn't show up in TSAN or similar tools when running
    normally for other purposes. The test itself of course does not need the atomic.

    This is work that is prerequisite to fix tests to obey normal WebKit include rules.

    * Source/WTF/wtf/text/StringConcatenate.h:
    * Source/WTF/wtf/text/StringView.cpp:
    * Tools/TestWebKitAPI/CMakeLists.txt:
    * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
    * Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp:
    (TestWebKitAPI::TEST):
    * Tools/TestWebKitAPI/WTFStringUtilities.cpp: Removed.
    * Tools/TestWebKitAPI/WTFStringUtilities.h:

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


  Commit: 9e2603ce4f1f8ffc16413be48a2b784afe04c0fa
      https://github.com/WebKit/WebKit/commit/9e2603ce4f1f8ffc16413be48a2b784afe04c0fa
  Author: Lauro Moura <lmoura at igalia.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Tools/Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py

  Log Message:
  -----------
  Cherry-pick 255995 at main (ea3511fd9cd1). https://bugs.webkit.org/show_bug.cgi?id=247010

    [WPE][WebDriver] Fix Cog path in capabilities after 252411 at main
    https://bugs.webkit.org/show_bug.cgi?id=247010

    Reviewed by Michael Catanzaro.

    * Tools/Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py:
    (WebDriverWPE.browser_path): Adjust path

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


  Commit: bb61f1ca939c3b7cb2158649abcbf3bfdd0687a8
      https://github.com/WebKit/WebKit/commit/bb61f1ca939c3b7cb2158649abcbf3bfdd0687a8
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M LayoutTests/http/tests/navigation/resources/shared-worker-script.js
    A LayoutTests/http/tests/workers/shared/shared-worker-with-service-workers-disabled-expected.txt
    A LayoutTests/http/tests/workers/shared/shared-worker-with-service-workers-disabled.html
    M LayoutTests/platform/mac-wk1/TestExpectations
    M LayoutTests/platform/win/TestExpectations
    M Source/WebCore/workers/WorkerScriptLoader.cpp
    M Source/WebCore/workers/WorkerScriptLoader.h

  Log Message:
  -----------
  Cherry-pick 256185 at main (f6816a3f3c66). https://bugs.webkit.org/show_bug.cgi?id=247147

    Regression(iOS 16.1) Use of Shared Workers cause Web Content process crash in non-default-browser WKWebViews
    https://bugs.webkit.org/show_bug.cgi?id=247147
    rdar://101562445

    Reviewed by Geoffrey Garen.

    253592 at main made the initialization of WorkerScriptLoader::m_clientIdentifier
    conditional on service workers being enabled. However, this wasn't correct
    since shared workers rely on this data member too.

    This clientIdentifier gets sent over IPC at some point and fails decoding
    when not initialized, leading to the WebProcess getting killed.

    * LayoutTests/http/tests/navigation/resources/shared-worker-script.js:
    (self.onconnect):
    * LayoutTests/http/tests/workers/shared/shared-worker-with-service-workers-disabled-expected.txt: Added.
    * LayoutTests/http/tests/workers/shared/shared-worker-with-service-workers-disabled.html: Added.
    * LayoutTests/platform/mac-wk1/TestExpectations:
    * LayoutTests/platform/win/TestExpectations:
    * Source/WebCore/workers/WorkerScriptLoader.cpp:
    (WebCore::WorkerScriptLoader::~WorkerScriptLoader):
    (WebCore::WorkerScriptLoader::loadAsynchronously):
    * Source/WebCore/workers/WorkerScriptLoader.h:

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


  Commit: 0ca760d5517b311e482f802525081b682c71ccdc
      https://github.com/WebKit/WebKit/commit/0ca760d5517b311e482f802525081b682c71ccdc
  Author: Devin Rousso <drousso at apple.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WebCore/Modules/modern-media-controls/controls/adwaita-layout-traits.js
    M Source/WebCore/Modules/modern-media-controls/controls/ios-inline-media-controls.css
    M Source/WebCore/Modules/modern-media-controls/controls/ios-layout-traits.js
    M Source/WebCore/Modules/modern-media-controls/controls/layout-traits.js
    M Source/WebCore/Modules/modern-media-controls/controls/macos-layout-traits.js
    M Source/WebCore/Modules/modern-media-controls/controls/media-controls.css
    M Source/WebCore/Modules/modern-media-controls/controls/media-controls.js
    M Source/WebCore/Modules/modern-media-controls/controls/watchos-layout-traits.js

  Log Message:
  -----------
  Cherry-pick 256167 at main (2476493a0ed7). https://bugs.webkit.org/show_bug.cgi?id=247152

    [Modern Media Controls] [macOS] REGRESSION(252362 at main): adding `border-radius: inherit` causes negative power perf impact
    https://bugs.webkit.org/show_bug.cgi?id=247152
    <rdar://problem/100234334>

    Reviewed by Eric Carlson.

    This is only used on iOS, so adding it to all platforms is unnecessary (and apparently costly).

    * Source/WebCore/Modules/modern-media-controls/controls/layout-traits.js:
    (LayoutTraits.prototype.inheritsBorderRadius): Added.
    * Source/WebCore/Modules/modern-media-controls/controls/adwaita-layout-traits.js:
    (AdwaitaLayoutTraits.prototype.inheritsBorderRadius): Added.
    * Source/WebCore/Modules/modern-media-controls/controls/ios-layout-traits.js:
    (IOSLayoutTraits.prototype.inheritsBorderRadius): Added.
    * Source/WebCore/Modules/modern-media-controls/controls/macos-layout-traits.js:
    (MacOSLayoutTraits.prototype.inheritsBorderRadius): Added.
    * Source/WebCore/Modules/modern-media-controls/controls/watchos-layout-traits.js:
    (WatchOSLayoutTraits.prototype.inheritsBorderRadius): Added.
    * Source/WebCore/Modules/modern-media-controls/controls/media-controls.js:
    (MediaControls):
    Add a new `LayoutTraits` method that controls whether `border-radius: inherit` is used.

    * Source/WebCore/Modules/modern-media-controls/controls/ios-inline-media-controls.css:
    (.media-controls.inline.ios:not(.audio)):
    * Source/WebCore/Modules/modern-media-controls/controls/media-controls.css:
    (.media-controls-container):
    (.media-controls-container:has(.media-controls.inherits-border-radius), .media-controls.inherits-border-radius): Added.
    Move the `border-radius: inherit` to only if the CSS class is applied (which is controlled by the above).

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


  Commit: a6ffc2b0df129c5df2a51af4d10d3ab6496b1631
      https://github.com/WebKit/WebKit/commit/a6ffc2b0df129c5df2a51af4d10d3ab6496b1631
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    A LayoutTests/editing/selection/iframe-select-expected.html
    A LayoutTests/editing/selection/iframe-select.html
    M Source/WebCore/rendering/RenderElement.h
    M Source/WebCore/rendering/RenderObject.h
    M Source/WebCore/rendering/RenderWidget.cpp

  Log Message:
  -----------
  Cherry-pick 256191 at main (fe7889ca7da9). https://bugs.webkit.org/show_bug.cgi?id=246939

    Use the correct paint methods for painting a section rect of RenderWidgets

    Use the correct paint methods for painting a section rect of RenderWidgets
    https://bugs.webkit.org/show_bug.cgi?id=246939

    Reviewed by Simon Fraser.

    Merge - https://src.chromium.org/viewvc/blink?revision=181068&view=revision

    Previously, it was using a paint invalidation method. That is less
    efficient, and also wrong if the renderer is a squashed layer.

    * Source/WebCore/rendering/RenderElement.h: Update "paint" function to to have "paintOffset" and also add comment for explanation
    * Source/WebCore/rendering/RenderObject.h: Update Comment and remove "selectionRect" function
    * Source/WebCore/rendering/RenderWidget.cpp: Fix paint logic for selected widgets and remove "FIXME" about selectionRect
    * LayoutTests/editing/selection/iframe-select.html: Added Test Case
    * LayoutTests/editing/selection/iframe-select-expected.html: Added Test Case Expectations

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


  Commit: d3c3c472eaee784ee1b406dfd2a2e4324d90e6ac
      https://github.com/WebKit/WebKit/commit/d3c3c472eaee784ee1b406dfd2a2e4324d90e6ac
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp

  Log Message:
  -----------
  Cherry-pick 256199 at main (5172b1f269aa). https://bugs.webkit.org/show_bug.cgi?id=247302

    Crash trying to scroll a main frame PDF with UI-side compositing on macOS.
    https://bugs.webkit.org/show_bug.cgi?id=247302
    rdar://101786249

    Reviewed by Tim Horton.

    Null check the scrolling tree before stuffing it into a map (with UI-side compositing
    and PDF it can be null).

    * Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp:
    (WebKit::EventDispatcher::addScrollingTreeForPage):

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


  Commit: f8c39b6bb4141fa6f77a8e6325d20f5f952b0fc9
      https://github.com/WebKit/WebKit/commit/f8c39b6bb4141fa6f77a8e6325d20f5f952b0fc9
  Author: Enrique Ocaña González <eocanha at igalia.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
    M Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.h
    M Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp

  Log Message:
  -----------
  Cherry-pick 256222 at main (b84521e66ded). https://bugs.webkit.org/show_bug.cgi?id=247129

    [MSE][GStreamer] Relax h264/h265 codec check for MSE
    https://bugs.webkit.org/show_bug.cgi?id=247129

    Reviewed by Alicia Boya Garcia.

    Some platforms disable/remove software parsers because of the way
    encrypted playback is implemented, but we still want working MSE
    playback there.

    Although software parsers are strongly recommended for MSE playback
    (eg: to complete info from buffers coming from some js transmuxers),
    they aren't strictly needed (at your own risk!).

    However, some video decoders (eg: the OMX h264 decoder) can only
    accept some of the available formats (only stream-format=byte-stream
    in the case of OMX). In that case, a parser is still needed in order
    to convert between formats before supplying buffers to the decoder.

    This patch checks that the most efficient decoder (hardware if
    available, software if not) supports both formats. If the most
    efficient decoder doesn't support all the formats, a parser is
    demanded to be available. If it's not available, the affected codec
    (h264, h265) is declared as not supported.

    Inspired by work by Eugene Mutavchi <Ievgen_Mutavchi at comcast.com>
    See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/948

    * Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
    (WebCore::GStreamerRegistryScanner::initializeDecoders): Ask for the corresponding parser if any of the h264 or h265 decoders support don't support any of the possible stream-format variants. If the parser isn't present, declare the corresponding codec as unsupported.
    * Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.h:
    (WebCore::GStreamerRegistryScanner::RegistryLookupResult::merge): Added method to merge two results, supported when both are supported, and using hardware when both are using hardware.
    (WebCore::GStreamerRegistryScanner::RegistryLookupResult::operator==): Added equality operator.
    (WebCore::GStreamerRegistryScanner::RegistryLookupResult::operator!=): Added inequality operator.
    * Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp:
    (WebCore::createOptionalParserForFormat): Warn when a parser can't be created.

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


  Commit: 433de2de47e6190ce64bb6707ee2533756a65a1c
      https://github.com/WebKit/WebKit/commit/433de2de47e6190ce64bb6707ee2533756a65a1c
  Author: Przemyslaw Gorszkowski <pgorszkowski at igalia.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WebKit/UIProcess/WebFrameProxy.cpp

  Log Message:
  -----------
  Cherry-pick 256233 at main (628f0ba433d8). https://bugs.webkit.org/show_bug.cgi?id=247362

    Missing undef MESSAGE_CHECK in WebFrameProxy.cpp
    https://bugs.webkit.org/show_bug.cgi?id=247362

    Reviewed by Carlos Garcia Campos.

    Add missing #undef MESSAGE_CHECK at the end of the cpp file
    solves the problem with errors in unified builds.

    * Source/WebKit/UIProcess/WebFrameProxy.cpp:

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


  Commit: d84c5310395d81d7033d59f5e6f8abeaba00a4cc
      https://github.com/WebKit/WebKit/commit/d84c5310395d81d7033d59f5e6f8abeaba00a4cc
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WebCore/rendering/RenderLayerCompositor.cpp

  Log Message:
  -----------
  Cherry-pick 256247 at main (1ad126f47e2a). https://bugs.webkit.org/show_bug.cgi?id=247369

    Typo error in RenderLayerCompositor::destroyRootLayer() for Horizontal Scrollbar

    Typo error in RenderLayerCompositor::destroyRootLayer() for Horizontal Scrollbar
    https://bugs.webkit.org/show_bug.cgi?id=247369

    Reviewed by Alan Baradlay.

    Merge - https://src.chromium.org/viewvc/blink?view=revision&revision=194036

    This is to fix a copy paste error in "m_layerForHorizontalScrollbar", where the "verticalScrollbar" was mentioned instead of "horizontalScrollbar".

    * Source/WebCore/rendering/RenderLayerCompositor.cpp:
    (RenderLayerCompositor::destroyRootLayer): Fix reference to horizontalScrollbar"

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


  Commit: c68692c2b5729a386d68166ce4d09aad9b6afddd
      https://github.com/WebKit/WebKit/commit/c68692c2b5729a386d68166ce4d09aad9b6afddd
  Author: Alex Christensen <achristensen at webkit.org>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WTF/wtf/URLHelpers.cpp
    M Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm

  Log Message:
  -----------
  Cherry-pick 256267 at main (16904a9a85c8). https://bugs.webkit.org/show_bug.cgi?id=247289

    Punycode all IPA extensions code points in URLs
    https://bugs.webkit.org/show_bug.cgi?id=247289
    rdar://101429376

    Reviewed by Tim Horton.

    * Source/WTF/wtf/URLHelpers.cpp:
    (WTF::URLHelpers::isLookalikeCharacter):
    * Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
    (TestWebKitAPI::TEST):

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


  Commit: 914f2dfb99284d7a47ea43529fad9099d31c4384
      https://github.com/WebKit/WebKit/commit/914f2dfb99284d7a47ea43529fad9099d31c4384
  Author: Alex Christensen <achristensen at webkit.org>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M LayoutTests/fast/encoding/idn-security-expected.txt
    M LayoutTests/fast/encoding/idn-security.html
    M Source/WTF/wtf/URLHelpers.cpp
    M Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm

  Log Message:
  -----------
  Cherry-pick 256276 at main (a6c922ea6f05). https://bugs.webkit.org/show_bug.cgi?id=247287

    Punycode U+0E01 when in the context of non-Thai characters
    https://bugs.webkit.org/show_bug.cgi?id=247287
    rdar://101434628

    Reviewed by Tim Horton.

    * Source/WTF/wtf/URLHelpers.cpp:
    (WTF::URLHelpers::isLookalikeCharacterOfScriptType<USCRIPT_THAI>):
    (WTF::URLHelpers::isLookalikeCharacter):
    * Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
    (TestWebKitAPI::TEST):

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


  Commit: c13c77f6888eba9f8884cfc7274a27f1a1c9fb8a
      https://github.com/WebKit/WebKit/commit/c13c77f6888eba9f8884cfc7274a27f1a1c9fb8a
  Author: Matt Woodrow <mattwoodrow at apple.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WebCore/rendering/RenderLayerBacking.cpp
    M Source/WebCore/rendering/RenderLayerCompositor.cpp

  Log Message:
  -----------
  Cherry-pick 256299 at main (8ed3d524525a). https://bugs.webkit.org/show_bug.cgi?id=247251

    Use device pixel scaled backing store for <canvas> with image-rendering: pixelated.
    https://bugs.webkit.org/show_bug.cgi?id=247251
    <rdar://99895407>

    Reviewed by Simon Fraser.

    We need to do scaling during painting to apply the image-rendering effect. An alternative fix would
    be to set the image-rendering value on the GraphicsLayer, but its complicated to make that change
    dependent on having computed isUnscaledBitmapOnly.

    * LayoutTests/platform/ios-wk2/TestExpectations:
    * Source/WebCore/rendering/RenderLayerBacking.cpp:
    (WebCore::RenderLayerBacking::isUnscaledBitmapOnly const):
    * Source/WebCore/rendering/RenderLayerCompositor.cpp:
    (WebCore::RenderLayerCompositor::layerStyleChanged):

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


  Commit: f35376ae6d7372db9995775e99f732f0ab9c1317
      https://github.com/WebKit/WebKit/commit/f35376ae6d7372db9995775e99f732f0ab9c1317
  Author: Alex Christensen <achristensen at webkit.org>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WTF/wtf/URLHelpers.cpp
    M Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm

  Log Message:
  -----------
  Cherry-pick 256332 at main (85e478aae63c). https://bugs.webkit.org/show_bug.cgi?id=247461

    Punycode Arabic diacritics when not preceded by an Arabic code point in a URL host
    https://bugs.webkit.org/show_bug.cgi?id=247461
    rdar://100426863

    Reviewed by Said Abou-Hallawa.

    * Source/WTF/wtf/URLHelpers.cpp:
    (WTF::URLHelpers::isArabicDiacritic):
    (WTF::URLHelpers::isArabicCodePoint):
    (WTF::URLHelpers::isLookalikeCharacter):
    * Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
    (TestWebKitAPI::TEST):

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


  Commit: bfe9ffc9f4f9118704971424577700fbf61d20db
      https://github.com/WebKit/WebKit/commit/bfe9ffc9f4f9118704971424577700fbf61d20db
  Author: Richard Robinson <richard_robinson2 at apple.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WebCore/dom/Document.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/SystemPreview.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/system-preview-trigger.html

  Log Message:
  -----------
  Cherry-pick 256462 at main (a203e214d6b8). https://bugs.webkit.org/show_bug.cgi?id=245959

    REGRESSION (iOS 16): AR QuickLook banner tap event no longer propagated to anchor if not attached to DOM
    https://bugs.webkit.org/show_bug.cgi?id=245959
    rdar://100952298

    Reviewed by Wenson Hsieh.

    The commit https://commits.webkit.org/251042@main added a check `!element->isConnected()`
    in `Document::dispatchSystemPreviewActionEvent` to ensure the element is part
    of the DOM before sending the `_apple_ar_quicklook_button_tapped` event.

    However, this broke behavior in the case of a detached element, and so this PR
    reverts that check to maintain the existing behavior.

    * Source/WebCore/dom/Document.cpp:
    (WebCore::Document::dispatchSystemPreviewActionEvent):
    * Tools/TestWebKitAPI/Tests/WebKitCocoa/SystemPreview.mm:
    (-[TestSystemPreviewTriggeredHandler userContentController:didReceiveScriptMessage:]):
    (-[TestSystemPreviewTriggeredOnDetachedElementHandler userContentController:didReceiveScriptMessage:]):
    (TestWebKitAPI::TEST):
    * Tools/TestWebKitAPI/Tests/WebKitCocoa/system-preview-trigger.html:

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


  Commit: a7bf5b8286c96dfc1c01d13a010539f78e42e53e
      https://github.com/WebKit/WebKit/commit/a7bf5b8286c96dfc1c01d13a010539f78e42e53e
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WebCore/html/HTMLMediaElement.cpp

  Log Message:
  -----------
  Cherry-pick 256352 at main (e4f004bdfd57). https://bugs.webkit.org/show_bug.cgi?id=247333

    CRASH: Assertion in WPT /webvtt/rendering/cues-with-video/processing-model/regions/viewportanchor_y_50_percent.html
    https://bugs.webkit.org/show_bug.cgi?id=247333
    rdar://100892574

    Reviewed by Eric Carlson.

    An existing check protects HTMLMediaElement::configureTextTrackDisplay() from making script-exposed changes while a
    Document and it's ActiveDOMObjects has been stopped, but also needs to protect when those same objects are Suspended.

    Re-use HTMLMediaElement::isSuspended() (which encompasses both those above checks) everywhere within HTMLMediaElement.

    * Source/WebCore/html/HTMLMediaElement.cpp:
    (WebCore::HTMLMediaElement::userCancelledLoad):
    (WebCore::HTMLMediaElement::exitFullscreen):
    (WebCore::HTMLMediaElement::configureTextTrackDisplay):
    (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):

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


  Commit: 89ca1faff15da753964b82c81f5ebab7c1f77465
      https://github.com/WebKit/WebKit/commit/89ca1faff15da753964b82c81f5ebab7c1f77465
  Author: Darin Adler <darin at apple.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WTF/wtf/Vector.h
    M Tools/TestWebKitAPI/Tests/WTF/Vector.cpp

  Log Message:
  -----------
  Cherry-pick 256373 at main (7ea0a5456640). https://bugs.webkit.org/show_bug.cgi?id=247533

    map and compactMap functions sometimes copy the passed in collection before mapping it to a vector
    https://bugs.webkit.org/show_bug.cgi?id=247533
    rdar://problem/102000000

    Reviewed by Ryosuke Niwa and Tim Horton.

    * Source/WTF/wtf/Vector.h:
    (WTF::Mapper::map): Take const SourceType& or SourceType&&, not SourceType.
    (WTF::CompactMapper::compactMap): Ditto.

    * Tools/TestWebKitAPI/Tests/WTF/Vector.cpp: Added a new test, WTF_Vector.MapMinimalCopy.

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


  Commit: 40b8d82cbb584858a5315675f22e7a774bc12992
      https://github.com/WebKit/WebKit/commit/40b8d82cbb584858a5315675f22e7a774bc12992
  Author: Philippe Normand <philn at igalia.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WebCore/platform/mediastream/gstreamer/RealtimeIncomingSourceGStreamer.cpp
    M Source/WebCore/platform/mediastream/gstreamer/RealtimeIncomingSourceGStreamer.h
    M Source/WebCore/platform/mediastream/gstreamer/RealtimeIncomingVideoSourceGStreamer.cpp

  Log Message:
  -----------
  Cherry-pick 256393 at main (25fd4849d5a2). https://bugs.webkit.org/show_bug.cgi?id=247423

    [GStreamer][WebRTC] Minor cleanups in IncomingSourceGStreamer
    https://bugs.webkit.org/show_bug.cgi?id=247423

    Reviewed by Xabier Rodriguez-Calvar.

    There is no need for a queue between the valve and the tee. Utility methods for opening/closing now
    un-needed were removed as well.

    * Source/WebCore/platform/mediastream/gstreamer/RealtimeIncomingSourceGStreamer.cpp:
    (WebCore::RealtimeIncomingSourceGStreamer::RealtimeIncomingSourceGStreamer):
    (WebCore::RealtimeIncomingSourceGStreamer::startProducingData):
    (WebCore::RealtimeIncomingSourceGStreamer::stopProducingData):
    (WebCore::RealtimeIncomingSourceGStreamer::closeValve const): Deleted.
    (WebCore::RealtimeIncomingSourceGStreamer::openValve const): Deleted.
    * Source/WebCore/platform/mediastream/gstreamer/RealtimeIncomingSourceGStreamer.h:
    * Source/WebCore/platform/mediastream/gstreamer/RealtimeIncomingVideoSourceGStreamer.cpp:

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


  Commit: 38bf4801b044374fb4be4d6785495d02875f0171
      https://github.com/WebKit/WebKit/commit/38bf4801b044374fb4be4d6785495d02875f0171
  Author: Philippe Normand <philn at igalia.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
    M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
    M Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp

  Log Message:
  -----------
  Cherry-pick 256396 at main (2a9d6e23045c). https://bugs.webkit.org/show_bug.cgi?id=247524

    [GStreamer] Rebrand colorspace handling to common facilities
    https://bugs.webkit.org/show_bug.cgi?id=247524

    Reviewed by Xabier Rodriguez-Calvar.

    We had some basic GstVideoInfo -> PlatformVideoColorSpace conversion in VideoTrackPrivateGStreamer.
    This now lives in GStreamerCommon along with a GstCaps -> PlatformVideoColorSpace and
    PlatformVideoColorSpace -> GstCaps utilities. Those will be useful to improve the
    VideoFrameGStreamer implementation for the WebCodecs backend.

    * Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
    (WebCore::videoColorSpaceFromCaps):
    (WebCore::videoColorSpaceFromInfo):
    (WebCore::fillVideoInfoColorimetryFromColorSpace):
    * Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h:
    * Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
    (WebCore::VideoTrackPrivateGStreamer::updateConfigurationFromCaps):

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


  Commit: 79f99def66c22098eb4ca0c9bcf7a39b54f29048
      https://github.com/WebKit/WebKit/commit/79f99def66c22098eb4ca0c9bcf7a39b54f29048
  Author: Chirag M Shah <chirag_m_shah at apple.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    A LayoutTests/js/frame-application-cache-with-listener-crash-expected.txt
    A LayoutTests/js/frame-application-cache-with-listener-crash.html
    M Source/WebCore/loader/appcache/DOMApplicationCache.cpp

  Log Message:
  -----------
  Cherry-pick 256402 at main (1624156ba5f9). https://bugs.webkit.org/show_bug.cgi?id=247380

    Make sure scriptExecutionContext stays around when invoking listeners
    https://bugs.webkit.org/show_bug.cgi?id=247380

    Reviewed by Ryosuke Niwa.

    This change fixes DOMApplicationCache::scriptExecutionContext to get the
    correct scriptExecutionContext by getting it from the window instead of
    the frame because the frame can navigate when invoking event listeners, in which
    case the scriptExecutionContext will become NULL.

    * LayoutTests/js/frame-application-cache-with-listener-crash-expected.txt: Added.
    * LayoutTests/js/frame-application-cache-with-listener-crash.html: Added.
    * Source/WebCore/loader/appcache/DOMApplicationCache.cpp:
    (WebCore::DOMApplicationCache::scriptExecutionContext const):

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


  Commit: 7026e87a1b8e647125a63303da6bc3c66257cd6a
      https://github.com/WebKit/WebKit/commit/7026e87a1b8e647125a63303da6bc3c66257cd6a
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    A LayoutTests/media/track/video-track-add-visible-expected.txt
    A LayoutTests/media/track/video-track-add-visible.html
    M Source/WebCore/html/HTMLMediaElement.cpp

  Log Message:
  -----------
  Cherry-pick 256408 at main (7ff585820d47). https://bugs.webkit.org/show_bug.cgi?id=247549

    Apple.com/apple-events: Unable to enable subtitles on first watch of the keynote
    https://bugs.webkit.org/show_bug.cgi?id=247549
    rdar://101785175

    Reviewed by Eric Carlson.

    Two interlocking bugs prevent captions from being visible if tracks are added after the video is
    loaded: 1) `m_processingPreferenceChange` is set to `true` in
    `markCaptionAndSubtitleTracksAsUnconfigured()` and is only set to `false` if at least one text
    track is present and therefore `configureTextTrackGroup()` is called. 2) the MediaControlsHost is
    not notified that the video element's videoBox has changed, as it's only notified during style
    updates, and will not necessarily have a RenderVideo attached at that point.

    Clear `m_processingPreferenceChange` unconditionally at the end of `configureTextTracks()`. And call
    the MediaControlsHost's `updateCaptionDisplaySizes()` when the media element is resized.

    * LayoutTests/media/track/video-track-add-visible-expected.txt: Added.
    * LayoutTests/media/track/video-track-add-visible.html: Added.
    * Source/WebCore/html/HTMLMediaElement.cpp:
    (WebCore::HTMLMediaElement::configureTextTrackGroup):
    (WebCore::HTMLMediaElement::layoutSizeChanged):
    (WebCore::HTMLMediaElement::configureTextTracks):

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


  Commit: b1e8d7704ad19db74977a546b434f3f2be0ddd71
      https://github.com/WebKit/WebKit/commit/b1e8d7704ad19db74977a546b434f3f2be0ddd71
  Author: Xabier Rodriguez-Calvar <calvaris at igalia.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M LayoutTests/media/media-source/media-source-append-before-last-range-no-quota-exceeded-expected.txt
    M LayoutTests/media/media-source/media-source-append-before-last-range-no-quota-exceeded.html
    M LayoutTests/media/media-source/media-source-append-buffer-full-quota-exceeded-error-expected.txt
    M LayoutTests/media/media-source/media-source-append-buffer-full-quota-exceeded-error.html
    M LayoutTests/media/media-source/media-source-evict-codedframe-after-seek-expected.txt
    M Source/WebCore/Modules/mediasource/SourceBuffer.cpp
    M Source/WebCore/platform/graphics/PlatformTimeRanges.cpp
    M Source/WebCore/platform/graphics/PlatformTimeRanges.h
    M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp
    M Source/WebCore/platform/graphics/SourceBufferPrivate.h
    M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp
    M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h
    M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.messages.in
    M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp
    M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h

  Log Message:
  -----------
  Cherry-pick 256441 at main (48b51f0536c9). https://bugs.webkit.org/show_bug.cgi?id=246144

    [MSE] Improved coded frame eviction algorithm
    https://bugs.webkit.org/show_bug.cgi?id=246144

    Reviewed by Alicia Boya Garcia.

    I made it in two aspects, first is that now it does not begin at 0, it
    begins at the first buffered range.

    A fix would be that sometimes you need to evict frames but a window of
    30s is too much and it can easily happen it does not evict anything,
    so we need to reduce the partition to be able to effectively evict
    something. We do it in windows from 30 to 3s.

    This is tested by several tests that needed a rebase line or small tweaks.

    * LayoutTests/media/media-source/media-source-append-before-last-range-no-quota-exceeded-expected.txt:
    * LayoutTests/media/media-source/media-source-append-before-last-range-no-quota-exceeded.html:
    * LayoutTests/media/media-source/media-source-append-buffer-full-quota-exceeded-error-expected.txt:
    * LayoutTests/media/media-source/media-source-append-buffer-full-quota-exceeded-error.html:
    * LayoutTests/media/media-source/media-source-evict-codedframe-after-seek-expected.txt:
    * Source/WebCore/Modules/mediasource/SourceBuffer.cpp:
    (WebCore::SourceBuffer::appendBufferInternal):
    * Source/WebCore/platform/graphics/PlatformTimeRanges.cpp:
    (WebCore::PlatformTimeRanges::minimumBufferedTime const):
    * Source/WebCore/platform/graphics/PlatformTimeRanges.h:
    * Source/WebCore/platform/graphics/SourceBufferPrivate.cpp:
    (WebCore::SourceBufferPrivate::evictCodedFrames):
    * Source/WebCore/platform/graphics/SourceBufferPrivate.h:
    * Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp:
    (WebKit::RemoteSourceBufferProxy::evictCodedFrames):
    * Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h:
    * Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.messages.in:
    * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:
    (WebKit::SourceBufferPrivateRemote::evictCodedFrames):
    * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h:

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


  Commit: 0ca02b713bb773b2bf1e4806b36a25426eef7f85
      https://github.com/WebKit/WebKit/commit/0ca02b713bb773b2bf1e4806b36a25426eef7f85
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WebCore/xml/XMLHttpRequest.cpp
    M Source/WebCore/xml/XMLHttpRequest.h

  Log Message:
  -----------
  Cherry-pick 256512 at main (7cfb84288e85). https://bugs.webkit.org/show_bug.cgi?id=244715

    Test addition (247071 at main): [ macOS wk1 Debug ] Two imported/w3c/web-platform-tests/xhr/ tests are a flaky failure
    https://bugs.webkit.org/show_bug.cgi?id=244715
    rdar://99492054

    Reviewed by Geoffrey Garen.

    The issue is that CFNetwork doesn't reliably calls didSendData() before calling
    didFinishLoad(). As a result, it is possible for a XMLHttpRequest upload to be
    marked as DONE without getting any progress events on XMLHttpRequest.upload.

    This was causing the test to fail flakily since it verified that at least
    one `progress` event get fired at `XMLHttpRequest.upload` before the XHR is
    marked as DONE.

    To address the issue, we now explicitly call didSendData(bodySize) inside
    didFinishLoading() if didSendData() wasn't called yet.

    * Source/WebCore/xml/XMLHttpRequest.cpp:
    (WebCore::XMLHttpRequest::didFinishLoading):
    (WebCore::XMLHttpRequest::didSendData):
    * Source/WebCore/xml/XMLHttpRequest.h:

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


  Commit: 0da4c1aeda84cb9318ae32c1320a45fc790741c4
      https://github.com/WebKit/WebKit/commit/0da4c1aeda84cb9318ae32c1320a45fc790741c4
  Author: Olivier Blin <olivier.blin at softathome.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/cmake/GStreamerChecks.cmake

  Log Message:
  -----------
  Cherry-pick 256487 at main (ee453765232d). https://bugs.webkit.org/show_bug.cgi?id=247675

    [GStreamer][WebRTC] Fix cmake macro name
    https://bugs.webkit.org/show_bug.cgi?id=247675

    Reviewed by Philippe Normand.

    * Source/cmake/GStreamerChecks.cmake:
    A cmake block checked for USE_GSTREAMER_WEB_RTC, while the actual
    option name is USE_GSTREAMER_WEBRTC.

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


  Commit: 877300a81906c3c3ce238ce156e1701595e71e3c
      https://github.com/WebKit/WebKit/commit/877300a81906c3c3ce238ce156e1701595e71e3c
  Author: Olivier Blin <olivier.blin at softathome.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
    M Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp

  Log Message:
  -----------
  Cherry-pick 256489 at main (a12a0c36a046). https://bugs.webkit.org/show_bug.cgi?id=247679

    [GStreamer] Remove extraneous extendedSupportsType method
    https://bugs.webkit.org/show_bug.cgi?id=247679

    Reviewed by Philippe Normand.

    Content type checks are done in
    GStreamerRegistryScanner::isContentTypeSupported() or
    MediaPlayerPrivateGStreamerMSE::supportsType().
    The extraneous MediaPlayerPrivateGStreamer::extendedSupportsType()
    method is not implemented and should be removed, like done for other
    ports in r157834.

    * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
    (WebCore::MediaPlayerPrivateGStreamer::supportsType):
    (WebCore::MediaPlayerPrivateGStreamer::extendedSupportsType): Deleted.
    * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
    * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
    (WebCore::MediaPlayerPrivateGStreamerMSE::supportsType):

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


  Commit: 7d55f311c387e84c750314bd04abdeae1a2b74b9
      https://github.com/WebKit/WebKit/commit/7d55f311c387e84c750314bd04abdeae1a2b74b9
  Author: David Kilzer <ddkilzer at apple.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WebCore/xml/XSLTUnicodeSort.cpp

  Log Message:
  -----------
  Cherry-pick 256459 at main (6649227d017b). https://bugs.webkit.org/show_bug.cgi?id=247538

    Update xsltUnicodeSortFunction()
    https://bugs.webkit.org/show_bug.cgi?id=247538
    <rdar://101996640>

    Reviewed by Alex Christensen.

    * Source/WebCore/xml/XSLTUnicodeSort.cpp:
    (WebCore::xsltUnicodeSortFunction):
    - Update with changes from examples/xsltICUSort.c in libxml2.

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


  Commit: b8362ed756bb928683c8f6158a1d8bf318999b75
      https://github.com/WebKit/WebKit/commit/b8362ed756bb928683c8f6158a1d8bf318999b75
  Author: Karl Rackler <rackler at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M LayoutTests/platform/ios/TestExpectations
    M LayoutTests/platform/mac-wk2/TestExpectations

  Log Message:
  -----------
  Cherry-pick 256333 at main (c2407ed41733). https://bugs.webkit.org/show_bug.cgi?id=247499

    [ New Test ] (256112 at main): ASSERTION FAILED: isValidIdentifier(m_identifier)
    https://bugs.webkit.org/show_bug.cgi?id=247499
    rdar://101970988

    Unreviewed test gardening.

    * LayoutTests/platform/ios/TestExpectations:
    * LayoutTests/platform/mac-wk2/TestExpectations:

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


  Commit: a0960047f03ba1df9e20cd9631c7146e9be0e7c9
      https://github.com/WebKit/WebKit/commit/a0960047f03ba1df9e20cd9631c7146e9be0e7c9
  Author: Miguel Salinas <miguel_salinas at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp
    M Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp
    M Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h
    M Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp
    M Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h
    M Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h
    M Source/WebCore/Modules/indexeddb/server/IDBServer.cpp
    M Source/WebCore/Modules/indexeddb/server/IDBServer.h
    M Source/WebCore/loader/EmptyClients.cpp
    M Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp
    M Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h
    M Source/WebKit/NetworkProcess/storage/NetworkStorageManager.messages.in
    M Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp
    M Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h
    M Source/WebKitLegacy/Storage/InProcessIDBServer.cpp
    M Source/WebKitLegacy/Storage/InProcessIDBServer.h

  Log Message:
  -----------
  Cherry-pick 256464 at main (b9ff9a4dad90). https://bugs.webkit.org/show_bug.cgi?id=247499

    Fix flaky test crash in indexeddb/crash-on-getdatabases.html
    https://bugs.webkit.org/show_bug.cgi?id=247499
    rdar://101970988

    Reviewed by Sihui Liu.

    We are sending invalid IDBResourceIdentifiers with
    AbortOpenAndUpgradeNeeded IPC messages to the indexeddb server.

    * Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp:
    (WebCore::IDBOpenDBRequest::requestCompleted):
    * Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp:
    (WebCore::IDBClient::IDBConnectionProxy::abortOpenAndUpgradeNeeded):
    * Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h:
    * Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp:
    (WebCore::IDBClient::IDBConnectionToServer::abortOpenAndUpgradeNeeded):
    * Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h:
    * Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
    * Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:
    (WebCore::IDBServer::IDBServer::abortOpenAndUpgradeNeeded):
    * Source/WebCore/Modules/indexeddb/server/IDBServer.h:
    * Source/WebCore/loader/EmptyClients.cpp:
    * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp:
    (WebKit::NetworkStorageManager::abortOpenAndUpgradeNeeded):
    * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h:
    * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.messages.in:
    * Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
    (WebKit::WebIDBConnectionToServer::abortOpenAndUpgradeNeeded):
    * Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
    * Source/WebKitLegacy/Storage/InProcessIDBServer.cpp:
    (InProcessIDBServer::abortOpenAndUpgradeNeeded):
    * Source/WebKitLegacy/Storage/InProcessIDBServer.h:
    * LayoutTests/platform/ios/TestExpectations:
    * LayoutTests/platform/mac-wk2/TestExpectations:

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


  Commit: 52346629495ca46756f96ddafca990cc50750d28
      https://github.com/WebKit/WebKit/commit/52346629495ca46756f96ddafca990cc50750d28
  Author: David Degazio <d_degazio at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    A JSTests/stress/bigdecimal-identifiers-fail-on-oom.js
    M Source/JavaScriptCore/parser/Parser.cpp
    M Source/JavaScriptCore/parser/ParserArena.cpp
    M Source/JavaScriptCore/parser/ParserArena.h

  Log Message:
  -----------
  Cherry-pick 256501 at main (32b972813979). https://bugs.webkit.org/show_bug.cgi?id=247644

    Segfault in JSC::IdentifierArena::makeBigIntDecimalIdentifier
    https://bugs.webkit.org/show_bug.cgi?id=247644
    rdar://98566429

    Reviewed by Mark Lam and Yusuke Suzuki.

    We currently get a segfault because the parser for bigdecimal identifiers allocates a JSBigInt, which
    might cause us to run out of memory. The parser doesn't throw arbitrary exceptions elsewhere, so instead
    of throwing out-of-memory as an exception, it just produces an empty JSBigInt and crashes when using it.
    This patch addresses the issue by making the result of makeBigIntDecimalIdentifier nullable, checking for
    it in the parser, and failing with a SyntaxError if the identifier could not be created.

    * JSTests/stress/bigdecimal-identifiers-fail-on-oom.js: Added.
    (foo):
    * Source/JavaScriptCore/parser/Lexer.cpp:
    * Source/JavaScriptCore/parser/Parser.cpp:
    (JSC::Parser<LexerType>::parseDestructuringPattern):
    (JSC::Parser<LexerType>::parseClass):
    (JSC::Parser<LexerType>::parseClassFieldInitializerSourceElements):
    (JSC::Parser<LexerType>::parseProperty):
    (JSC::Parser<LexerType>::parseGetterSetter):
    * Source/JavaScriptCore/parser/ParserArena.cpp:
    (JSC::IdentifierArena::makeBigIntDecimalIdentifier):
    * Source/JavaScriptCore/parser/ParserArena.h:

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


  Commit: d55586dddcfe9ef302f81112391067b497250b00
      https://github.com/WebKit/WebKit/commit/d55586dddcfe9ef302f81112391067b497250b00
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebCore/dom/Document.cpp

  Log Message:
  -----------
  Cherry-pick 256552 at main (9c08d49c54bf). https://bugs.webkit.org/show_bug.cgi?id=247761

    Regression(254699 at main): fast/events/remove-iframe-during-toggle-crash.html is crashing
    https://bugs.webkit.org/show_bug.cgi?id=247761
    rdar://100558596

    Reviewed by Geoffrey Garen.

    254699 at main added a call to `policyChecker().stopCheck()` inside Document::open().
    The stopCheck() call can clear `m_frame` so we need to null-check `m_frame` again
    after the call.

    * Source/WebCore/dom/Document.cpp:
    (WebCore::Document::open):

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


  Commit: 9016f59fb243c288cfe9c432c0cdb61c3b9e20f1
      https://github.com/WebKit/WebKit/commit/9016f59fb243c288cfe9c432c0cdb61c3b9e20f1
  Author: Karl Dubost <karlcow at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

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

  Log Message:
  -----------
  Cherry-pick 256558 at main (8e0e88f4f3d2). https://bugs.webkit.org/show_bug.cgi?id=247445

    Please remove a desmos.com quirks entry
    https://bugs.webkit.org/show_bug.cgi?id=247445
    rdar://49124313

    Reviewed by Simon Fraser and Tim Horton.

    As discussed in the bug, one of the website developers want
    the quirk to be removed. It was anyway ineffective because
    it was targeting the wrong path.

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

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


  Commit: e369a91d8748924cf63fc5aefb2c938a57145cad
      https://github.com/WebKit/WebKit/commit/e369a91d8748924cf63fc5aefb2c938a57145cad
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/JavaScriptCore/heap/BlockDirectory.cpp
    M Source/JavaScriptCore/heap/MarkedBlock.h

  Log Message:
  -----------
  Cherry-pick 256554 at main (292a16569829). https://bugs.webkit.org/show_bug.cgi?id=247727

    [UNIX] Web process crash in websites using service workers while doing garbage collection
    https://bugs.webkit.org/show_bug.cgi?id=247727
    rdar://102209090

    Reviewed by Mark Lam.

    MarkedBlock::Handle::start() is not returning page aligned address, so this is not appropriate for mincore.

    * Source/JavaScriptCore/heap/BlockDirectory.cpp:
    (JSC::BlockDirectory::updatePercentageOfPagedOutPages):

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


  Commit: 96e5738465bf2c444ceff16644bbdafb9b96adde
      https://github.com/WebKit/WebKit/commit/96e5738465bf2c444ceff16644bbdafb9b96adde
  Author: Mark Lam <mark.lam at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WTF/wtf/URLHelpers.cpp

  Log Message:
  -----------
  Cherry-pick 256560 at main (06f9978e52a8). https://bugs.webkit.org/show_bug.cgi?id=247770

    Change the value of scriptCodeLimit to placate a strange Clang quirk.
    https://bugs.webkit.org/show_bug.cgi?id=247770
    <rdar://problem/102115540>

    Reviewed by Alex Christensen.

    Some versions of Clang appear to think that scriptCodeLimit should fit in a signed
    9-bit integer, which is crazy.  For our purposes, a value of 255 works just as well.
    So, we're changing scriptCodeLimit to be 255 instead of 256 to work around this Clang
    quirk.

    * Source/WTF/wtf/URLHelpers.cpp:

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


  Commit: d9e02562c11ad29a0132b6fdc160190c6a0ebb87
      https://github.com/WebKit/WebKit/commit/d9e02562c11ad29a0132b6fdc160190c6a0ebb87
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm

  Log Message:
  -----------
  Cherry-pick 256575 at main (b94ca3b38a05). https://bugs.webkit.org/show_bug.cgi?id=247773

    Improve WebKit's default crash handling behavior
    https://bugs.webkit.org/show_bug.cgi?id=247773

    Reviewed by Alex Christensen.

    Improve WebKit's default crash handling behavior in the event where there is a
    pending API request URL. In such case, we now attempt to load the pending API
    request URL again instead of issuing a reload.

    This is particularly important when there is no current HistoryItem (i.e. this
    is the first load and the WebProcess just crashed), since the default behavior
    was to issue a reload and reloading is a no-op when there is no current
    HistoryItem.

    * Source/WebKit/UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::tryReloadAfterProcessTermination):
    * Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
    (TEST):

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


  Commit: 97f322304f0d101eac808e7587126d142f6cd3ad
      https://github.com/WebKit/WebKit/commit/97f322304f0d101eac808e7587126d142f6cd3ad
  Author: Patrick Griffis <pgriffis at igalia.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp
    M Source/WebKit/UIProcess/Launcher/glib/XDGDBusProxy.cpp

  Log Message:
  -----------
  Cherry-pick 256654 at main (c319637f7e9c). https://bugs.webkit.org/show_bug.cgi?id=245221

    [GLIB] Fix MPRIS in flatpak sandbox
    https://bugs.webkit.org/show_bug.cgi?id=245221

    Reviewed by Michael Catanzaro.

    Currently MPRIS works in our bubblewrap sandbox but not in flatpak.

    As of https://github.com/flatpak/flatpak/commit/6540f85511739028c0f8eb496ae64dcc73d40a28
    it can function inside of flatpak but needs to be named `org.mpris.MediaPlayer2.%s.Sandboxed.*`.

    * Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp:
    (WebCore::MediaSessionGLib::ensureMprisSessionRegistered):
    * Source/WebKit/UIProcess/Launcher/glib/XDGDBusProxy.cpp:
    (WebKit::XDGDBusProxy::dbusSessionProxy):

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


  Commit: 8f5edf980ff272ea4d3acb41eee97403b2aaf70e
      https://github.com/WebKit/WebKit/commit/8f5edf980ff272ea4d3acb41eee97403b2aaf70e
  Author: Jean-Yves Avenard <jya at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebCore/Modules/mediasession/MediaMetadata.cpp
    M Source/WebCore/html/MediaElementSession.cpp
    M Source/WebCore/platform/NowPlayingManager.cpp
    M Source/WebCore/platform/NowPlayingManager.h
    M Source/WebCore/platform/audio/NowPlayingInfo.h
    M Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm
    M Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp
    M Source/WebCore/platform/mac/MediaRemoteSoftLink.h
    M Source/WebCore/platform/mac/MediaRemoteSoftLink.mm
    M Tools/TestWebKitAPI/Tests/WebCore/NowPlayingInfoTests.cpp

  Log Message:
  -----------
  Cherry-pick 256627 at main (8f70e6bf626c). https://bugs.webkit.org/show_bug.cgi?id=247043

    mediaSession API not showing artwork
    https://bugs.webkit.org/show_bug.cgi?id=247043
    rdar://101597398

    Reviewed by Eric Carlson

    When we send an artwork image to MediaRemote, recent versions now check if the dimensions of
    that image are valid by calling CGImageSourceCreateWithData with the provided image
    and looking at the dimensions. However, in the GPU process, CoreGraphic's decoders are disabled by default and the creation of the CGImage fails.
    Adopt new MediaRemote entitlement: com.apple.mediaremote.external-artwork-validation
    which will skip this check provided the dimensions are also provided to MediaRemote via the kMRMediaRemoteNowPlayingInfoArtworkDataWidth and kMRMediaRemoteNowPlayingInfoArtworkDataHeight key.

    Additionally, we will now properly decode the image in the content process to
    ensure its validity. This is automatically done by the RefPtr<Image> IPC encoder.
    We then reencode that decoded image into a TIFF as MediaRemote does require a valid comppressed image.

    Manually tested by temporarily removing the CG's decoders restriction until a version with the MediaRemote fix is available.

    * Source/WebCore/Modules/mediasession/MediaMetadata.cpp:
    (WebCore::ArtworkImageLoader::notifyFinished):
    * Source/WebCore/html/MediaElementSession.cpp:
    (WebCore::MediaElementSession::nowPlayingInfo const):
    * Source/WebCore/platform/NowPlayingManager.cpp:
    (WebCore::NowPlayingManager::setNowPlayingInfo):
    (WebCore::NowPlayingManager::setNowPlayingInfoPrivate):
    * Source/WebCore/platform/NowPlayingManager.h:
    * Source/WebCore/platform/audio/NowPlayingInfo.h:
    (WebCore::NowPlayingInfoArtwork::encode const):
    (WebCore::NowPlayingInfoArtwork::decode):
    * Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm:
    (WebCore::MediaSessionManagerCocoa::setNowPlayingInfo):
    * Source/WebCore/platform/mac/MediaRemoteSoftLink.h:
    * Source/WebCore/platform/mac/MediaRemoteSoftLink.mm:
    * Source/WebKit/Scripts/process-entitlements.sh:
    * Tools/TestWebKitAPI/Tests/WebCore/NowPlayingInfoTests.cpp:
    (TestWebKitAPI::testEmptyArtwork):

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


  Commit: cbc36a419819da7e33428576149e231a10bee8e2
      https://github.com/WebKit/WebKit/commit/cbc36a419819da7e33428576149e231a10bee8e2
  Author: Justin Michaud <justin_michaud at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    A JSTests/stress/iterator-done-exception-check.js
    M Source/JavaScriptCore/runtime/IteratorOperations.cpp

  Log Message:
  -----------
  Cherry-pick 256593 at main (a084fca782e9). https://bugs.webkit.org/show_bug.cgi?id=247419.

    Iterator completion should check for exceptions.
    https://bugs.webkit.org/show_bug.cgi?id=247419.

    Reviewed by Yusuke Suzuki.

    Let's add a happy little exception check after calling iterator.done.

    * JSTests/stress/iterator-done-exception-check.js: Added.
    (main):
    * Source/JavaScriptCore/runtime/IteratorOperations.cpp:
    (JSC::iteratorComplete):

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


  Commit: 57cb5d7f49b1f9f9d670be7a93ccdb612eaff82c
      https://github.com/WebKit/WebKit/commit/57cb5d7f49b1f9f9d670be7a93ccdb612eaff82c
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    A LayoutTests/compositing/clipping/sticky-inside-overflow-x-clip-expected.txt
    A LayoutTests/compositing/clipping/sticky-inside-overflow-x-clip.html
    A LayoutTests/platform/gtk/compositing/clipping/sticky-inside-overflow-x-clip-expected.txt
    A LayoutTests/platform/ios-wk2/compositing/clipping/sticky-inside-overflow-x-clip-expected.txt
    A LayoutTests/platform/mac-wk1/compositing/clipping/sticky-inside-overflow-x-clip-expected.txt
    M Source/WebCore/platform/graphics/LayoutRect.h
    M Source/WebCore/rendering/RenderLayerCompositor.cpp

  Log Message:
  -----------
  Cherry-pick 256618 at main (854716970c07). https://bugs.webkit.org/show_bug.cgi?id=247130

    Elements with `position: sticky` jitter inside a container with `overflow-x: clip;`
    https://bugs.webkit.org/show_bug.cgi?id=247130
    rdar://101645570

    Reviewed by Alan Baradlay.

    `overflow:clip` on just one axis can output a clip rect which is infinite in just
    x or y. In that case, we'd create a clipping layer with large floating point
    geometry values which, when moved around by the scrolling tree, had low precision
    resulting in visible stutters.

    Fix by shrinking the infinite rect values by a factor of 16, which is sufficient
    to provide enough device pixel precision for 3x displays.

    * LayoutTests/compositing/clipping/sticky-inside-overflow-x-clip-expected.txt: Added.
    * LayoutTests/compositing/clipping/sticky-inside-overflow-x-clip.html: Added.
    * LayoutTests/platform/gtk/compositing/clipping/sticky-inside-overflow-x-clip-expected.txt: Added.
    * LayoutTests/platform/ios-wk2/compositing/clipping/sticky-inside-overflow-x-clip-expected.txt: Added.
    * LayoutTests/platform/mac-wk1/compositing/clipping/sticky-inside-overflow-x-clip-expected.txt: Added.
    * Source/WebCore/platform/graphics/LayoutRect.h:
    * Source/WebCore/rendering/RenderLayerCompositor.cpp:
    (WebCore::RenderLayerCompositor::computeAncestorClippingStack const):

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


  Commit: 10a8613e183ee8c80d6653c55150060779de77fa
      https://github.com/WebKit/WebKit/commit/10a8613e183ee8c80d6653c55150060779de77fa
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    A LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/composited-in-offscreen-fixed-expected.txt
    A LayoutTests/scrollingcoordinator/scrolling-tree/composited-in-offscreen-fixed-expected.txt
    A LayoutTests/scrollingcoordinator/scrolling-tree/composited-in-offscreen-fixed.html
    A LayoutTests/scrollingcoordinator/scrolling-tree/scroll-coordinated-inside-fixed-expected.txt
    A LayoutTests/scrollingcoordinator/scrolling-tree/scroll-coordinated-inside-fixed.html
    M Source/WebCore/rendering/RenderLayerCompositor.cpp

  Log Message:
  -----------
  Cherry-pick 256619 at main (242980046171). https://bugs.webkit.org/show_bug.cgi?id=247837

    REGRESSION (253809 at main): Comment field on Engadget.com exhibits stutters while scrolling
    https://bugs.webkit.org/show_bug.cgi?id=247837
    rdar://102066231

    Reviewed by Alan Baradlay.

    Various sites (khanacademy.org, comments on engadget.com) showed incorrectly scroll-coordinated elements,
    typically positioned nodes inside overflow:scroll inside position:fixed. On some other sites, we'd hit an
    assertion in RenderLayerCompositor::updateScrollingNodeForViewportConstrainedRole().

    In all cases, we were trying to treat a layer that was some descendant of a position:fixed layer as if it
    were the fixed layer itself, because of a logic error in 253809 at main. The code in
    `RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer()` needs to return early if the layer is
    not both position:fixed, and behaving as fixed (i.e. no transformed ancestor).

    Added two layout tests, both of which hit the assertion, and one of which showed incorrect scrolling
    behavior.

    * LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/composited-in-offscreen-fixed-expected.txt: Added.
    * LayoutTests/scrollingcoordinator/scrolling-tree/composited-in-offscreen-fixed-expected.txt: Added.
    * LayoutTests/scrollingcoordinator/scrolling-tree/composited-in-offscreen-fixed.html: Added.
    * LayoutTests/scrollingcoordinator/scrolling-tree/scroll-coordinated-inside-fixed-expected.txt: Added.
    * LayoutTests/scrollingcoordinator/scrolling-tree/scroll-coordinated-inside-fixed.html: Added.
    * Source/WebCore/rendering/RenderLayerCompositor.cpp:
    (WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer const):

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


  Commit: bd57377ebe2092505d06df81c038bab660403608
      https://github.com/WebKit/WebKit/commit/bd57377ebe2092505d06df81c038bab660403608
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    A LayoutTests/fast/forms/submit-form-dialog-crash-expected.txt
    A LayoutTests/fast/forms/submit-form-dialog-crash.html
    M Source/WebCore/loader/FormSubmission.cpp

  Log Message:
  -----------
  Cherry-pick 256613 at main (d44b5de990f9). https://bugs.webkit.org/show_bug.cgi?id=247652

    Crash in FormData::flatten
    https://bugs.webkit.org/show_bug.cgi?id=247652

    Reviewed by Youenn Fablet.

    The bug was caused by FormSubmission::requestURL assuming that the method is GET
    if it's not POST, and trying to serialize the form data as the URL query string.

    Fixed the bug by adding method type check.

    * LayoutTests/fast/forms/submit-form-dialog-crash-expected.txt: Added.
    * LayoutTests/fast/forms/submit-form-dialog-crash.html: Added.
    * Source/WebCore/loader/FormSubmission.cpp:
    (WebCore::FormSubmission::requestURL const):

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


  Commit: d038baf3954b50eb4bb2976531469b55ca38ee7a
      https://github.com/WebKit/WebKit/commit/d038baf3954b50eb4bb2976531469b55ca38ee7a
  Author: Philippe Normand <philn at igalia.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M LayoutTests/http/tests/security/resources/reference-movie-cross-origin-allow.py
    M Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h

  Log Message:
  -----------
  Cherry-pick 256649 at main (d6ad2e4228d0). https://bugs.webkit.org/show_bug.cgi?id=247800

    [GStreamer] Monitor GstStream tags and minor test fix
    https://bugs.webkit.org/show_bug.cgi?id=247800

    Reviewed by Xabier Rodriguez-Calvar.

    For playbin2 case we have some code to keep track of sticky tag events in TrackPrivateBase. For
    playbin3 case we can simply monitor the tags property on the GstStream.

    * LayoutTests/http/tests/security/resources/reference-movie-cross-origin-allow.py: Fix content-type
    for mp4 resource.
    * Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
    (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer):
    (WebCore::TrackPrivateBaseGStreamer::setPad):
    (WebCore::TrackPrivateBaseGStreamer::disconnect):
    (WebCore::TrackPrivateBaseGStreamer::tagsChangedCallback): Deleted.
    * Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:

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


  Commit: 707dcec505ae4ad08f17443fa93a61b33fef413d
      https://github.com/WebKit/WebKit/commit/707dcec505ae4ad08f17443fa93a61b33fef413d
  Author: Xabier Rodriguez-Calvar <calvaris at igalia.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

  Log Message:
  -----------
  Cherry-pick 256650 at main (1302f18a9706). https://bugs.webkit.org/show_bug.cgi?id=247740

    [GStreamer] Video sink should discard late frames to avoid audio and video desynchronization
    https://bugs.webkit.org/show_bug.cgi?id=247740

    Reviewed by Philippe Normand.

    In some cases and/or platforms video frames can arrive late and if are not discarded, they end up being painted and
    there can be a/v desynchronization. Setting the max-lateness property forces the sink to discard late frames and solve
    the problem.

    * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
    (WebCore::MediaPlayerPrivateGStreamer::createVideoSink):

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


  Commit: 441769b233363930acbaf0f6c4b18be1659e4aca
      https://github.com/WebKit/WebKit/commit/441769b233363930acbaf0f6c4b18be1659e4aca
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.cpp
    M Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.h

  Log Message:
  -----------
  Cherry-pick 256670 at main (2cb930b2456b). https://bugs.webkit.org/show_bug.cgi?id=247767

    Revert 255044 at main as it introduces crash in SQLiteStorageArea::removeItem
    https://bugs.webkit.org/show_bug.cgi?id=247767
    rdar://101927216

    Reviewed by Ben Nham and Per Arne Vollan.

    From 255044 at main we started to track LocalStorage size manually for quota check instead of setting hard limit on
    database file. However, LocalStorage might convert 16-bit string to 8-bit string when reading from database for memory
    optimization (246784 at main), and we didn't consider that in computation. This has let to overflow error in
    SQLiteStorageArea::removeItem.

    * Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.cpp:
    (WebKit::SQLiteStorageArea::isEmpty):
    (WebKit::SQLiteStorageArea::prepareDatabase):
    (WebKit::SQLiteStorageArea::getItem):
    (WebKit::SQLiteStorageArea::allItems):
    (WebKit::SQLiteStorageArea::setItem):
    (WebKit::SQLiteStorageArea::removeItem):
    (WebKit::SQLiteStorageArea::clear):
    (WebKit::SQLiteStorageArea::getAllItemsFromDatabase): Deleted.
    (WebKit::SQLiteStorageArea::initializeCache): Deleted.
    * Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.h:

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


  Commit: 8da5ad7217ae3e5ee7e3fcff67d99694b9c70a7e
      https://github.com/WebKit/WebKit/commit/8da5ad7217ae3e5ee7e3fcff67d99694b9c70a7e
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    A LayoutTests/editing/inserting/replace-in-heading-001-expected.txt
    A LayoutTests/editing/inserting/replace-in-heading-001.html
    A LayoutTests/editing/inserting/replace-in-paragraph-001-expected.txt
    A LayoutTests/editing/inserting/replace-in-paragraph-001.html
    M Source/WebCore/editing/ReplaceSelectionCommand.cpp

  Log Message:
  -----------
  Cherry-pick 256682 at main (531d3679e268). https://bugs.webkit.org/show_bug.cgi?id=247918

    Change ReplaceSelectionCommand::moveNodeOutOfAncestor() to avoid hitting assertion while trying replace selection

    Change ReplaceSelectionCommand::moveNodeOutOfAncestor() to avoid hitting assertion while trying replace selection
    https://bugs.webkit.org/show_bug.cgi?id=247918

    Reviewed by Ryosuke Niwa.

    Merge - https://src.chromium.org/viewvc/blink?revision=153031&view=revision

    Before this patch, replacing selection in heading/paragraph with heading/paragraph gets assertion at InsertNodeBeforeCommand constructor, or crash when assertion disabled. It tries to move replaced heading/paragraph out of ancestor, ReplaceSelectionCommand::moveNodeOutOfAncestor().

    This patch changes ReplaceSelectionCommand::moveNodeOutOfAncestor() to avoid the assertion.

    * Source/WebCore/editing/ReplaceSelectionCommand.cpp:
    (ReplaceSelectionCommand::moveNodeOutOfAncestor): Add logic to avoid crash
    * LayoutTests/editing/inserting/replace-in-paragraph-001.html: Added Test Case
    * LayoutTests/editing/inserting/replace-in-paragraph-001-expected.txt: Added Test Case Expectations
    * LayoutTests/editing/inserting/replace-in-heading-001.html: Added Test Case
    * LayoutTests/editing/inserting/replace-in-heading-001-expected.txt: Added Test Case Expectations

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


  Commit: f27e527f78c3906288c6db34590e90021661fd73
      https://github.com/WebKit/WebKit/commit/f27e527f78c3906288c6db34590e90021661fd73
  Author: Richard Robinson <richard_robinson2 at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebCore/platform/ScrollTypes.h

  Log Message:
  -----------
  Cherry-pick 256683 at main (3825a94eb763). https://bugs.webkit.org/show_bug.cgi?id=247908

    With UI-side compositing, there is an assertion failure in `fast/scrolling/keyboard-scrolling-distance-downArrow.html`
    https://bugs.webkit.org/show_bug.cgi?id=247908
    rdar://102329463

    Reviewed by Simon Fraser.

    The `ScrollDirection` enum was never given an `EnumTraits` specialization which
    led to a non-valid `ScrollDirection` value being used in a switch statement
    and not being handled, therefore leading to an assertion.

    * Source/WebCore/platform/ScrollTypes.h:

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


  Commit: 5e0d3d6091ec1009c2c08583bc5bee4a38d733af
      https://github.com/WebKit/WebKit/commit/5e0d3d6091ec1009c2c08583bc5bee4a38d733af
  Author: Yury Semikhatsky <yurys at chromium.org>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebKit/UIProcess/API/glib/WebKitDownload.cpp

  Log Message:
  -----------
  Cherry-pick 256737 at main (c985acc37157). https://bugs.webkit.org/show_bug.cgi?id=242217

    [WPE][GTK] web process leak if webkit_download_set_destination is called with empty destination
    https://bugs.webkit.org/show_bug.cgi?id=242217

    Reviewed by Michael Catanzaro.

    Fail if download destination is set to "".

     * Source/WebKit/UIProcess/API/glib/WebKitDownload.cpp:
      (webkit_download_set_destination):

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


  Commit: f1ad89548911127d86ee1e2495f2be11a96dcac0
      https://github.com/WebKit/WebKit/commit/f1ad89548911127d86ee1e2495f2be11a96dcac0
  Author: Madhu <enometh at net.meer>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebKit/UIProcess/API/gtk/WebKitAuthenticationDialog.cpp
    M Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp

  Log Message:
  -----------
  Cherry-pick 256742 at main (267e69155f83). https://bugs.webkit.org/show_bug.cgi?id=246852

    [GTK] Crash on authentication dialog with GTK 4
    https://bugs.webkit.org/show_bug.cgi?id=246852

    Reviewed by Michael Catanzaro

    fix gtk4 auth dialog crashes. take three

    * Source/WebKit/UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
    (okButtonClicked): `rememberPassword' is a GtkCheckButton in gtk4,
    doesn't inherit Button or ToggleButton. fix cast.
    (webkitAuthenticationDialogInitialize): `rememberCheckButton' is a
    GtkCheckButton which in Gtk4 apparently gets created with a label
    property and no explicit label child. Do not set the the line wrap
    property on a non-existent label.
    (webkitAuthenticationDialogInitialize): `rememberCheckButton', adjust
    for CheckButton changes in gtk4.
    (webkitAuthenticationDialogUnmap): new. Implementation unsets the
    default window widget which is set in
    webkitAuthenticationDialogMap. Avoids the gtk4 crash reported in bug.
    (webkit_authentication_dialog_class_init): hook in the above.
    * Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:
    "focus" is not a valid signal for gtk4's widgets such as the
    WebKitAutheticationDialog. implement "move-focus" instead, to handle
    the situation when a dialog is active and weforward focus events to
    it, and we can tab between elements in the box. Presently there is a
    problem: if you tab past the last element in the dialog box you cannot
    get back in.
    (webkitWebViewBaseMoveFocus): new. implementation which will be called
    when someone emits a move-focus signal on us.

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


  Commit: 976a4282a82acfd4b9edb7137f680101c499532a
      https://github.com/WebKit/WebKit/commit/976a4282a82acfd4b9edb7137f680101c499532a
  Author: Karl Dubost <karlcow at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebCore/css/MediaQueryEvaluator.cpp
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h

  Log Message:
  -----------
  Cherry-pick 256714 at main (02f013235584). https://bugs.webkit.org/show_bug.cgi?id=247940

    Remove Quirks shouldDisableResolutionMediaQuery()
    https://bugs.webkit.org/show_bug.cgi?id=247940
    rdar://102355671

    Reviewed by Tim Nguyen.

    This PR removes the quirks which previously disabled the
    resolution media feature on Expedia Group sites. When
    disabling Site Specific Hacks, the site behaves correctly.
    They probably have changed their widget. The patch was tested
    for different window widths, and the issue didn't reproduce.

    * Source/WebCore/page/Quirks.cpp:
    (WebCore::Quirks::shouldDisableResolutionMediaQuery const): Deleted.
    * Source/WebCore/css/LegacyMediaQueryEvaluator.cpp:
    (WebCore::resolutionEvaluate):
    * Source/WebCore/page/Quirks.h:

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


  Commit: 283030b891c3f944158afd47cf45a6df2016d875
      https://github.com/WebKit/WebKit/commit/283030b891c3f944158afd47cf45a6df2016d875
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebCore/loader/DocumentLoader.cpp

  Log Message:
  -----------
  Cherry-pick 256725 at main (30bd7667b181). https://bugs.webkit.org/show_bug.cgi?id=247793

    Clicking a link to a download file served by a service-worker with a fetch event handler yields "Frame load interrupted" error
    https://bugs.webkit.org/show_bug.cgi?id=247793
    rdar://problem/102296700

    Web Inspector shows the "Frame load interrupted" error based on the sub resource load failing error.
    Mark the error type as Cancellation so that Web Inspector does not show this message.

    Reviewed by Alex Christensen.

    * Source/WebCore/loader/DocumentLoader.cpp:
    (WebCore::DocumentLoader::interruptedForPolicyChangeError const):
    (WebCore::DocumentLoader::stopLoadingForPolicyChange):

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


  Commit: 892d593204a8c37d16f461975a6b9e7f1e588036
      https://github.com/WebKit/WebKit/commit/892d593204a8c37d16f461975a6b9e7f1e588036
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    A LayoutTests/http/wpt/fetch/fetch-permanent-redirect-same-origin-authorization-expected.txt
    A LayoutTests/http/wpt/fetch/fetch-permanent-redirect-same-origin-authorization.html
    A LayoutTests/http/wpt/fetch/resources/dump-authorization-header.py
    A LayoutTests/http/wpt/fetch/resources/redirect301.py
    M Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
    M Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
    M Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm

  Log Message:
  -----------
  Cherry-pick 256726 at main (63145fa91bb8). https://bugs.webkit.org/show_bug.cgi?id=247418

    Safari reuses Authorization header on second call to 301 redirects even if the header value changed when replaying the request
    https://bugs.webkit.org/show_bug.cgi?id=247418
    rdar://problem/101935060

    Reviewed by Chris Dumez.

    In case of serving a redirection from HTTP cache, we cannot reuse the Authorization header of the past redirect request.
    Instead, we should reuse the latest request Authorization header.

    To do this, we remove Authorization header from stored redirected requests in network cache.
    This handles the case of a cached redirection stored with authorization and reused without authorization.

    We also move the NetworkDataTaskCocoa code used to reuse the original request Authorization header to NetworkResourceLoader,
    so that it handles both the cache code path as well as the regular network code path.

    * LayoutTests/http/wpt/fetch/fetch-permanent-redirect-same-origin-authorization-expected.txt: Added.
    * LayoutTests/http/wpt/fetch/fetch-permanent-redirect-same-origin-authorization.html: Added.
    * LayoutTests/http/wpt/fetch/resources/dump-authorization-header.py: Added.
    (main):
    * LayoutTests/http/wpt/fetch/resources/redirect301.py: Added.
    (main):
    * Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:
    (WebKit::NetworkResourceLoader::willSendRedirectedRequestInternal):
    * Source/WebKit/NetworkProcess/cache/NetworkCache.cpp:
    (WebKit::NetworkCache::Cache::makeRedirectEntry):
    * Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
    (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

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


  Commit: 217bcc4bcc170dcabfb83c346518cf7b6c2d4574
      https://github.com/WebKit/WebKit/commit/217bcc4bcc170dcabfb83c346518cf7b6c2d4574
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    A LayoutTests/http/wpt/service-workers/fetch-service-worker-preload-use-download-and-clone.https-expected.txt
    A LayoutTests/http/wpt/service-workers/fetch-service-worker-preload-use-download-and-clone.https.html
    A LayoutTests/http/wpt/service-workers/fetch-service-worker-preload-use-download.https-expected.txt
    A LayoutTests/http/wpt/service-workers/fetch-service-worker-preload-use-download.https.html
    M LayoutTests/http/wpt/service-workers/fetch-service-worker-preload-worker.js
    M LayoutTests/platform/glib/TestExpectations
    A LayoutTests/platform/ios-wk2/http/wpt/service-workers/fetch-service-worker-preload-use-download-and-clone.https-expected.txt
    A LayoutTests/platform/ios-wk2/http/wpt/service-workers/fetch-service-worker-preload-use-download.https-expected.txt
    M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp

  Log Message:
  -----------
  Cherry-pick 256731 at main (daf8b0ba46a8). https://bugs.webkit.org/show_bug.cgi?id=247885

    [Safari 16 regression] service worker download does not work in case of preloads
    https://bugs.webkit.org/show_bug.cgi?id=247885
    rdar://problem/102312723

    Reviewed by Alex Christensen and Geoffrey Garen.

    When a fetch is converted to download and is served from a service worker that uses a preload, we should use that preload.

    * LayoutTests/http/wpt/service-workers/fetch-service-worker-preload-use-download.https-expected.txt: Added.
    * LayoutTests/http/wpt/service-workers/fetch-service-worker-preload-use-download.https.html: Added.
    * LayoutTests/http/wpt/service-workers/fetch-service-worker-preload-use-download-and-clone.https-expected.txt: Added.
    * LayoutTests/http/wpt/service-workers/fetch-service-worker-preload-use-download-and-clone.https.html: Added.
    * LayoutTests/http/wpt/service-workers/fetch-service-worker-preload-worker.js:
    (event.event.request.url.includes): Deleted.
    * LayoutTests/platform/glib/TestExpectations:
    * LayoutTests/platform/ios-wk2/http/wpt/service-workers/fetch-service-worker-preload-use-download-and-clone.https-expected.txt: Added.
    * LayoutTests/platform/ios-wk2/http/wpt/service-workers/fetch-service-worker-preload-use-download.https-expected.txt: Added.
    * Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
    (WebKit::ServiceWorkerFetchTask::convertToDownload):

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


  Commit: c1ec14318fb5446b2ffc0a1031c42dbc23ef6f95
      https://github.com/WebKit/WebKit/commit/c1ec14318fb5446b2ffc0a1031c42dbc23ef6f95
  Author: Miguel Salinas <miguel_salinas at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    A LayoutTests/editing/execCommand/indent-user-select-all-blockquotes-expected.txt
    A LayoutTests/editing/execCommand/indent-user-select-all-blockquotes.html
    M Source/WebCore/editing/IndentOutdentCommand.cpp

  Log Message:
  -----------
  Cherry-pick 256749 at main (8a344c3387b2). https://bugs.webkit.org/show_bug.cgi?id=240377

    Fix debug assertion failure in IndentOutdentCommand::indentIntoBlockquote
    https://bugs.webkit.org/show_bug.cgi?id=240377
    rdar://93236442

    Reviewed by Ryosuke Niwa.

    When indenting an element into a new uneditable blockquote we end up
    replacing the element with an empty blockquote instead of indenting.
    This also fails an assert in debug builds.
    We should just bail out instead of trying to indent if the blockquote
    is not editable.

    * LayoutTests/editing/execCommand/indent-user-select-all-blockquotes-expected.txt: Added.
    * LayoutTests/editing/execCommand/indent-user-select-all-blockquotes.html: Added.
    * Source/WebCore/editing/IndentOutdentCommand.cpp:
    (WebCore::IndentOutdentCommand::indentIntoBlockquote):

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


  Commit: 91e6fd8e1031597f6d3c8fc38555f7cf36ddbbea
      https://github.com/WebKit/WebKit/commit/91e6fd8e1031597f6d3c8fc38555f7cf36ddbbea
  Author: Carlos Garcia Campos <cgarcia at igalia.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp

  Log Message:
  -----------
  Cherry-pick 256829 at main (10077398852e). https://bugs.webkit.org/show_bug.cgi?id=248033

    [GStreamer] Wrong first party for cookies set on every media request
    https://bugs.webkit.org/show_bug.cgi?id=248033

    Reviewed by Philippe Normand.

    We are always setting the requested url as the first party for cookies,
    instead of the document URL. Nowadays we don't need to set the first
    party for cookies in the request from the media backend.

    * Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
    (webKitWebSrcMakeRequest):

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


  Commit: 3c63ca2eb6e4070a8cb442197c5d510b12846e71
      https://github.com/WebKit/WebKit/commit/3c63ca2eb6e4070a8cb442197c5d510b12846e71
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebCore/accessibility/AccessibilityMenuList.cpp

  Log Message:
  -----------
  Cherry-pick 256814 at main (c441a937ca2a). https://bugs.webkit.org/show_bug.cgi?id=143188

    Add missing null checks to AccessibilityMenuList.cpp
    https://bugs.webkit.org/show_bug.cgi?id=143188

    Reviewed by Chris Fleizach.

    Merge - https://src.chromium.org/viewvc/blink?revision=193917&view=revision

    This patch adds null check to press() and isCollapsed() functions to avoid assertion failure crash.

    * Source/WebCore/accessibility/AccessibilityMenuList.cpp:
    (AccessibilityMenuList::press): Add null check for m_renderer
    (AccessibilityMenuList::isCollapsed): Ditto and also comment to explain rationale

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


  Commit: df1502e14f206edb972043bfb253d5a8a5a1f951
      https://github.com/WebKit/WebKit/commit/df1502e14f206edb972043bfb253d5a8a5a1f951
  Author: Ryan Reno <rreno at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    A LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.html
    A LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.js
    A LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.serviceworker-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.serviceworker.html
    A LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.sharedworker-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.sharedworker.html
    A LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.worker-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.worker.html
    A LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/resources/foo.octetstream.gz
    A LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/resources/foo.octetstream.gz.headers
    A LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/resources/foo.text.gz
    A LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/resources/foo.text.gz.headers
    M Source/WebCore/Modules/fetch/FetchLoader.cpp
    M Source/WebCore/loader/ResourceLoader.cpp
    M Source/WebCore/loader/ResourceLoader.h
    M Source/WebCore/loader/ResourceLoaderOptions.h
    M Source/WebCore/loader/ThreadableLoader.cpp
    M Source/WebCore/platform/network/BlobResourceHandle.cpp
    M Source/WebCore/platform/network/ResourceHandle.cpp
    M Source/WebCore/platform/network/ResourceHandle.h
    M Source/WebCore/platform/network/ResourceHandleInternal.h
    M Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
    M Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp
    M Source/WebCore/platform/network/mac/ResourceHandleMac.mm
    M Source/WebCore/xml/XMLHttpRequest.cpp
    M Source/WebKit/NetworkProcess/NetworkLoadParameters.h
    M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp
    M Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp
    M Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp
    M Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h
    M Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
    M Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
    M Source/WebKitLegacy/WebCoreSupport/PingHandle.h

  Log Message:
  -----------
  Cherry-pick 256755 at main (ec8ff55e6568). https://bugs.webkit.org/show_bug.cgi?id=247421

    Content downloaded with fetch() API when Content-Encoding: gzip is set is not decompressed
    https://bugs.webkit.org/show_bug.cgi?id=247421
    rdar://101935292

    Reviewed by Brent Fulgham.

    In 195247 at main we adopted CFNetwork SPI to opt-out of content encoding sniffing for XMLHttpRequest.
    Content encoding sniffing would cause responses with `Content-Encoding: gzip` and
    `Content-Type: application/octet-stream` to be treated as `Content-Type: application/gzip` and
    `Content-Encoding: identity` on macOS. The user and developer visible behavior is that the gzipped data
    is not decompressed.

    This brings that change forward to Fetch requests by setting the ContentEncodingSniffingPolicy flag
    in the FetchLoader. As an additional step this also renames the ContentEncodingSniffingPolicy flags to
    Default and Disable and replaces raw bools representing those flags with the enum itself.

    On iOS the flag has no effect since the default behavior is to opt-out of sniffing.

    * LayoutTests/platform/mac-wk1/TestExpectations:
        Skip new worker tests since workers are unsupported in WK1.

    * LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any-expected.txt: Added.
    * LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.html: Added.
    * LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.js: Added.
    (string_appeared_here.forEach.contentType.promise_test.async t):
    * LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.serviceworker-expected.txt: Added.
    * LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.serviceworker.html: Added.
    * LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.sharedworker-expected.txt: Added.
    * LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.sharedworker.html: Added.
    * LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.worker-expected.txt: Added.
    * LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/gzip-body.any.worker.html: Added.
    * LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/resources/foo.octetstream.gz: Added.
    * LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/resources/foo.octetstream.gz.headers: Added.
    * LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/resources/foo.text.gz: Added.
    * LayoutTests/imported/w3c/web-platform-tests/fetch/content-encoding/resources/foo.text.gz.headers: Added.

    * Source/WebCore/Modules/fetch/FetchLoader.cpp:
    (WebCore::FetchLoader::start):
    * Source/WebCore/loader/ResourceLoader.cpp:
    (WebCore::ResourceLoader::start):
    * Source/WebCore/loader/ResourceLoader.h:
    (WebCore::ResourceLoader::contentEncodingSniffingPolicy const):
    (WebCore::ResourceLoader::shouldSniffContentEncoding const): Deleted.
    * Source/WebCore/loader/ResourceLoaderOptions.h:
    (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
    * Source/WebCore/loader/ThreadableLoader.cpp:
    (WebCore::ThreadableLoaderOptions::isolatedCopy const):
    * Source/WebCore/platform/network/BlobResourceHandle.cpp:
    (WebCore::BlobResourceHandle::BlobResourceHandle):
    * Source/WebCore/platform/network/ResourceHandle.cpp:
    (WebCore::ResourceHandle::ResourceHandle):
    (WebCore::ResourceHandle::create):
    (WebCore::ResourceHandle::contentEncodingSniffingPolicy const):
    (WebCore::ResourceHandle::shouldContentEncodingSniff const): Deleted.
    * Source/WebCore/platform/network/ResourceHandle.h:
    * Source/WebCore/platform/network/ResourceHandleInternal.h:
    (WebCore::ResourceHandleInternal::ResourceHandleInternal):
    * Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp:
    (WebCore::ResourceHandle::createCFURLConnection):
    (WebCore::ResourceHandle::start):
    (WebCore::ResourceHandle::platformLoadResourceSynchronously):
    * Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp:
    (WebCore::ResourceHandle::platformLoadResourceSynchronously):
    * Source/WebCore/platform/network/mac/ResourceHandleMac.mm:
    (WebCore::ResourceHandle::applySniffingPoliciesIfNeeded):
    (WebCore::ResourceHandle::createNSURLConnection):
    (WebCore::ResourceHandle::start):
    (WebCore::ResourceHandle::platformLoadResourceSynchronously):
    * Source/WebCore/xml/XMLHttpRequest.cpp:
    (WebCore::XMLHttpRequest::createRequest):
    * Source/WebKit/NetworkProcess/NetworkLoadParameters.h:
    * Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:
    (WebKit::ServiceWorkerSoftUpdateLoader::loadFromNetwork):
    * Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
    (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
    * Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
    (WebKit::NetworkCache::SpeculativeLoadManager::preconnectForSubresource):
    * Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
    * Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
    (WebKit::NetworkDataTaskCocoa::applySniffingPoliciesAndBindRequestToInferfaceIfNeeded):
    (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
    * Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp:
    (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
    (WebKit::WebLoaderStrategy::loadResourceSynchronously):
    * Source/WebKitLegacy/WebCoreSupport/PingHandle.h:

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


  Commit: 4c71bb11107451fa241a0e1abdc6074b64ba6bb6
      https://github.com/WebKit/WebKit/commit/4c71bb11107451fa241a0e1abdc6074b64ba6bb6
  Author: Yousuke Kimoto <yousuke.kimoto at sony.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    A LayoutTests/media/media-source/media-source-no-seek-with-infinite-duration-expected.txt
    A LayoutTests/media/media-source/media-source-no-seek-with-infinite-duration.html
    M Source/WebCore/html/HTMLMediaElement.cpp

  Log Message:
  -----------
  Cherry-pick 256759 at main (ab539817a721). https://bugs.webkit.org/show_bug.cgi?id=247602

    [MSE] Should not seek with no seekable range

    https://bugs.webkit.org/show_bug.cgi?id=247602

    Reviewed by Jer Noble.

    According https://html.spec.whatwg.org/multipage/media.html#seeking,
    "If there are no ranges given in the seekable attribute then set
     the seeking IDL attribute to false and return."
    For live streaming videos, their duration is infinity, then there
    is no seekable range. So 'seek' should be aborted in this case.

    * LayoutTests/media/media-source/media-source-no-seek-with-infinite-duration-expected.txt: Added.
    * LayoutTests/media/media-source/media-source-no-seek-with-infinite-duration.html: Test seeking
    status and currentTime with an infinite duration.
    * Source/WebCore/html/HTMLMediaElement.cpp:
    (WebCore::HTMLMediaElement::seekTask): Added a condtion to check if there is no seekable range
    for for notifying the mdedia engine of a seek.

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


  Commit: 38353ace4e78b2858db5472ee7ae229ecc291355
      https://github.com/WebKit/WebKit/commit/38353ace4e78b2858db5472ee7ae229ecc291355
  Author: Xabier Rodriguez-Calvar <calvaris at igalia.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebCore/html/HTMLMediaElement.cpp
    M Source/WebCore/platform/encryptedmedia/CDMProxy.h
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

  Log Message:
  -----------
  Cherry-pick 256823 at main (9ba628e9a29d). https://bugs.webkit.org/show_bug.cgi?id=247977

    [EME] CDMInstanceProxy: Use weak ptr for keeping player
    https://bugs.webkit.org/show_bug.cgi?id=247977

    Reviewed by Philippe Normand.

    Use WeakPtr for keeping media player ptr as it can be used after player is destroyed. The media player can be removed by
    HTMLMediaElement::load() request while still waiting for decryption key. CDM is not aware of such case and tries to use
    m_player ptr anyway that resuts with crash.

    Also reset m_playbackBlockedWaitingForKey when calling load() as the player will be re-created.

    Patch by Andrzej Surdej <Andrzej_Surdej at comcast.com> coming from
    https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/900.

    * Source/WebCore/html/HTMLMediaElement.cpp:
    (WebCore::HTMLMediaElement::prepareForLoad):
    * Source/WebCore/platform/encryptedmedia/CDMProxy.h:
    (WebCore::CDMInstanceProxy::setPlayer):
    * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
    (WebCore::MediaPlayerPrivateGStreamer::cdmInstanceAttached):

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


  Commit: 512f8ed9f32ee5791f8fbd18ec1f6c0a6437fad4
      https://github.com/WebKit/WebKit/commit/512f8ed9f32ee5791f8fbd18ec1f6c0a6437fad4
  Author: Brandon Stewart <brandonstewart at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h
    M Source/WebCore/html/HTMLImageElement.idl
    M Source/WebCore/html/parser/HTMLPreloadScanner.cpp
    M Source/WebCore/loader/ImageLoader.cpp
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h

  Log Message:
  -----------
  Cherry-pick 256854 at main (5e60d4e7a72a). https://bugs.webkit.org/show_bug.cgi?id=248048

    Images fail to load periodically on ikea.com
    https://bugs.webkit.org/show_bug.cgi?id=248048
    rdar://101657305

    Reviewed by Chris Dumez.

    Adding a quirk to address images showing up as grey boxes on ikea.com.
    Disabling lazy image loading addresses an issue that was found
    in gatsby. This issue has been addressed in a future version of gatsby.

    * Source/WebCore/dom/Document.cpp:
    (WebCore::Document::lazyImageLoadingEnabled const):
    * Source/WebCore/dom/Document.h:
    * Source/WebCore/html/parser/HTMLPreloadScanner.cpp:
    (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
    * Source/WebCore/loader/ImageLoader.cpp:
    (WebCore::ImageLoader::updateFromElement):
    * Source/WebCore/page/Quirks.cpp:
    (WebCore::Quirks::shouldExposeShowModalDialog const):
    (WebCore::Quirks::shouldDisableLazyImageLoading const):
    * Source/WebCore/page/Quirks.h:

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


  Commit: e1b9ac602d318c63af91e72931af3991cf33d0a6
      https://github.com/WebKit/WebKit/commit/e1b9ac602d318c63af91e72931af3991cf33d0a6
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp
    M Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h
    M Source/WebKit/NetworkProcess/storage/NetworkStorageManager.messages.in
    M Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp
    M Source/WebKit/WebProcess/WebStorage/StorageAreaMap.h

  Log Message:
  -----------
  Cherry-pick 256863 at main (5bc131992783). https://bugs.webkit.org/show_bug.cgi?id=245479

    REGRESSION (iOS 16): LocalStorage is cleared after quota error
    https://bugs.webkit.org/show_bug.cgi?id=245479
    rdar://problem/100252023

    Reviewed by Chris Dumez.

    StorageAreaMap should sync with backend again instead of clearing map when an error occurs in backend. Also, all
    synchronization should not remove pending changes from map, because backend will handle the requests and StorageAreaMap
    will receive reply for pending requests after that. Until StorageAreaMap receives error in reply, it should assume
    the request succeeds and report value in pending requests to client.

    * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp:
    (WebKit::NetworkStorageManager::setItem):
    * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h:
    * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.messages.in:
    * Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp:
    (WebKit::StorageAreaMap::setItem):
    (WebKit::StorageAreaMap::clear):
    (WebKit::StorageAreaMap::ensureMap):
    (WebKit::StorageAreaMap::didSetItem):
    (WebKit::StorageAreaMap::applyChange):
    (WebKit::StorageAreaMap::clearCache):
    (WebKit::StorageAreaMap::disconnect):
    (WebKit::StorageAreaMap::syncOneItem):
    (WebKit::StorageAreaMap::syncItems):
    (WebKit::StorageAreaMap::resetValues): Deleted.
    (WebKit::StorageAreaMap::shouldApplyChangeForKey const): Deleted.
    * Source/WebKit/WebProcess/WebStorage/StorageAreaMap.h:

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


  Commit: 076cbda52cb8f58d526d953ca203446fae672fbb
      https://github.com/WebKit/WebKit/commit/076cbda52cb8f58d526d953ca203446fae672fbb
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    A LayoutTests/css3/filters/change-filter-style-expected.html
    A LayoutTests/css3/filters/change-filter-style.html
    M Source/WebCore/platform/graphics/filters/FilterEffect.cpp
    M Source/WebCore/platform/graphics/filters/FilterFunction.cpp
    M Source/WebCore/platform/graphics/filters/FilterFunction.h
    M Source/WebCore/rendering/CSSFilter.cpp
    M Source/WebCore/rendering/RenderLayer.cpp
    M Source/WebCore/rendering/RenderLayer.h

  Log Message:
  -----------
  Cherry-pick 256920 at main (a0b92719854d). https://bugs.webkit.org/show_bug.cgi?id=247233

    REGRESSION (249229 at main): CSS filter does not update on hover
    https://bugs.webkit.org/show_bug.cgi?id=247233
    rdar://101836748

    Reviewed by Darin Adler.

    249229 at main made it so that we don't recreate CSSFilter on every paint,
    but there was no code to update the filters when style changed.

    So have `RenderLayer::updateFiltersAfterStyleChange()` clear the filters
    when filter style changes; we'll recreate them on the next paint.

    Also improve some logging output that helped when debugging this.

    * LayoutTests/css3/filters/change-filter-style-expected.html: Added.
    * LayoutTests/css3/filters/change-filter-style.html: Added.
    * Source/WebCore/platform/graphics/filters/FilterEffect.cpp:
    (WebCore::FilterEffect::apply):
    * Source/WebCore/platform/graphics/filters/FilterFunction.cpp:
    (WebCore::operator<<):
    * Source/WebCore/platform/graphics/filters/FilterFunction.h:
    * Source/WebCore/rendering/CSSFilter.cpp:
    (WebCore::CSSFilter::create):
    * Source/WebCore/rendering/RenderLayer.cpp:
    (WebCore::RenderLayer::calculateClipRects const):
    * Source/WebCore/rendering/RenderLayer.h:

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


  Commit: b5e87e203f41c8eaa0d47925d4766f298000fd38
      https://github.com/WebKit/WebKit/commit/b5e87e203f41c8eaa0d47925d4766f298000fd38
  Author: Victor Jaquez <vjaquez at igalia.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebCore/platform/gamepad/wpe/WPEGamepadProvider.cpp
    M Source/WebCore/platform/gamepad/wpe/WPEGamepadProvider.h

  Log Message:
  -----------
  Cherry-pick 256940 at main (a6099cec8ff2). https://bugs.webkit.org/show_bug.cgi?id=248210

    [WPE] gamepad crashes on raspberry pi 4 (arm64)
    https://bugs.webkit.org/show_bug.cgi?id=248210

    Reviewed by Michael Catanzaro.

    This is a breadcrumbs of the initial merge, because in libwpe uintptr_t is used for
    gamepad id, while in webkit's platform code unsigned is used.

    * Source/WebCore/platform/gamepad/libwpe/GamepadProviderLibWPE.cpp:
    (WebCore::GamepadProviderLibWPE::gamepadConnected):
    (WebCore::GamepadProviderLibWPE::gamepadDisconnected):
    (WebCore::GamepadProviderLibWPE::removeGamepadForId):
    * Source/WebCore/platform/gamepad/libwpe/GamepadProviderLibWPE.h:

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


  Commit: 3f3eeb50d555875f8d41eeaff55ccce1f014821b
      https://github.com/WebKit/WebKit/commit/3f3eeb50d555875f8d41eeaff55ccce1f014821b
  Author: Xabier Rodriguez-Calvar <calvaris at igalia.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    A LayoutTests/media/media-source/media-source-append-buffer-full-evict-prior-to-end-expected.txt
    A LayoutTests/media/media-source/media-source-append-buffer-full-evict-prior-to-end.html
    M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp
    M Source/WebCore/platform/graphics/SourceBufferPrivate.h

  Log Message:
  -----------
  Cherry-pick 256939 at main (6d7afcf0850f). https://bugs.webkit.org/show_bug.cgi?id=247052

    [MSE] Ensure we are not removing the current time during automatic eviction
    https://bugs.webkit.org/show_bug.cgi?id=247052

    Reviewed by Alicia Boya Garcia.

    In certain cases, depending on the sync frame positions, we could end up removing the current time, which would lead to
    playback stopping. Now we ensure that the previous sync frame to current time is taking into account when calculating
    the maximumRangeEnd.

    * LayoutTests/media/media-source/media-source-append-buffer-full-evict-prior-to-end-expected.txt: Added.
    * LayoutTests/media/media-source/media-source-append-buffer-full-evict-prior-to-end.html: Added.
    * Source/WebCore/platform/graphics/SourceBufferPrivate.cpp:
    (WebCore::SourceBufferPrivate::findPreviousSyncSamplePresentationTime):
    (WebCore::SourceBufferPrivate::evictCodedFrames):
    * Source/WebCore/platform/graphics/SourceBufferPrivate.h:

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


  Commit: 63253483cd07f9fe6880dec63f2200b11ae407e2
      https://github.com/WebKit/WebKit/commit/63253483cd07f9fe6880dec63f2200b11ae407e2
  Author: Adrian Perez de Castro <aperez at igalia.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.cpp

  Log Message:
  -----------
  Unreviewed non-uinified build fixes

* Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.cpp: Add
  missing wtf/glib/GUniquePtr.h header inclusion.


Compare: https://github.com/WebKit/WebKit/compare/b8f565c7a7c7...63253483cd07


More information about the webkit-changes mailing list