Skip to content

Cherry-pick 32394 - #77277

Open
aperezdc wants to merge 2 commits into
WebKit:webkitglib/2.54from
aperezdc:eng/backports-2.54-misc-01M50W5HY9Q5XTY7ETJYEBT35R
Open

aperezdc wants to merge 2 commits into
WebKit:webkitglib/2.54from
aperezdc:eng/backports-2.54-misc-01M50W5HY9Q5XTY7ETJYEBT35R

Conversation

@aperezdc

@aperezdc aperezdc commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

4ff7db2

Cherry-pick 323945@main (c6ce07550c64). https://bugs.webkit.org/show_bug.cgi?id=286127

    [GTK] Serialize the composed tree when writing the PRIMARY selection
    https://bugs.webkit.org/show_bug.cgi?id=286127

    Reviewed by Carlos Garcia Campos.

    WebEditorClient::updateGlobalSelection() serialized the selection with the
    default SerializeComposedTree::No, unlike every other selection serializer in
    the tree, including the GLib copy path in Editor::writeSelectionToPasteboard().
    In non-composed mode the traversal cannot reach an end point inside a shadow
    tree, so a selection that crosses a shadow boundary tripped an assertion in
    StyledMarkupAccumulator::traverseNodesForSerialization() and produced truncated
    markup in Release. GTK hit it on every selection change because the PRIMARY
    selection is rewritten each time; no other port serializes there.

    Pass SerializeComposedTree::Yes and IgnoreUserSelectNone::Yes, matching the
    copy path, so the PRIMARY selection carries the same markup as Ctrl+C.

    * LayoutTests/platform/glib/TestExpectations:
    * LayoutTests/platform/gtk/TestExpectations: Unskip the six selection
    shadow-dom tests and the editing test, which pass on GTK Release with
    assertions.
    * Source/WebKit/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
    (WebKit::WebEditorClient::updateGlobalSelection):

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

952633b

Cherry-pick 323946@main (d1523b31f82c). https://bugs.webkit.org/show_bug.cgi?id=327722

    [soup] Non-redirect 3xx responses with a Location header assert in SubresourceLoader::didReceiveResponse()
    https://bugs.webkit.org/show_bug.cgi?id=327722

    Reviewed by Carlos Garcia Campos.

    SubresourceLoader::didReceiveResponse() asserts that a response reaching it
    is not a redirect the network layer should have followed. It phrased that as
    "any 3xx other than 304 with a Location header", which also rejects 300, 305
    and 306: those are final responses whatever headers they carry, and the soup
    backend rightly delivers them. Rewrite the assertion in terms of
    ResourceResponse::isRedirection(), which covers the five redirect statuses
    the fetch specification defines.

    NetworkDataTaskSoup::shouldStartHTTPRedirection() had the complementary bug:
    it followed every 3xx response with a Location header except 300, 304, 305
    and 306, so unassigned codes such as 309 or 350 were redirected where fetch
    treats them as final responses. Use isRedirection() there too.

    Together these make imported/w3c/web-platform-tests/xhr/send-redirect.htm
    pass on GTK and WPE, so unskip it. The curl backend carries the same
    exclusion list and is left for its owners.

    * LayoutTests/platform/glib/TestExpectations:
    * Source/WebCore/loader/SubresourceLoader.cpp:
    (WebCore::SubresourceLoader::didReceiveResponse):
    * Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp:
    (WebKit::shouldStartHTTPRedirection):

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

4ff7db2

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style   🛠 ios   🛠 mac ✅ 🛠 wpe   🛠 win
✅ 🧪 bindings   🛠 ios-sim   🛠 mac-AS-debug ✅ 🧪 wpe-wk2   🧪 win-tests
✅ 🧪 webkitperl   🧪 ios-wk2   🧪 api-mac ✅ 🧪 api-wpe
  🧪 ios-wk2-wpt   🧪 api-mac-debug
  🧪 jsc-x86-64   🧪 api-ios   🧪 mac-wk2 ✅ 🛠 gtk3-gcc
⏳ 🛠 ios-safer-cpp   🧪 mac-AS-debug-wk2 ✅ 🛠 gtk
  🛠 vision   🧪 mac-wk2-stress ✅ 🧪 gtk-wk2
  🛠 vision-sim   🧪 mac-intel-wk2 ✅ 🧪 api-gtk
  🧪 vision-wk2   🛠 mac-safer-cpp   🛠 playstation
  🛠 tv   🧪 mac-site-isolation
⏳ 🛠 tv-sim
  🛠 watch
  🛠 watch-sim

…gi?id=327722

    [soup] Non-redirect 3xx responses with a Location header assert in SubresourceLoader::didReceiveResponse()
    https://bugs.webkit.org/show_bug.cgi?id=327722

    Reviewed by Carlos Garcia Campos.

    SubresourceLoader::didReceiveResponse() asserts that a response reaching it
    is not a redirect the network layer should have followed. It phrased that as
    "any 3xx other than 304 with a Location header", which also rejects 300, 305
    and 306: those are final responses whatever headers they carry, and the soup
    backend rightly delivers them. Rewrite the assertion in terms of
    ResourceResponse::isRedirection(), which covers the five redirect statuses
    the fetch specification defines.

    NetworkDataTaskSoup::shouldStartHTTPRedirection() had the complementary bug:
    it followed every 3xx response with a Location header except 300, 304, 305
    and 306, so unassigned codes such as 309 or 350 were redirected where fetch
    treats them as final responses. Use isRedirection() there too.

    Together these make imported/w3c/web-platform-tests/xhr/send-redirect.htm
    pass on GTK and WPE, so unskip it. The curl backend carries the same
    exclusion list and is left for its owners.

    * LayoutTests/platform/glib/TestExpectations:
    * Source/WebCore/loader/SubresourceLoader.cpp:
    (WebCore::SubresourceLoader::didReceiveResponse):
    * Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp:
    (WebKit::shouldStartHTTPRedirection):

    Canonical link: https://commits.webkit.org/323946@main
…gi?id=286127

    [GTK] Serialize the composed tree when writing the PRIMARY selection
    https://bugs.webkit.org/show_bug.cgi?id=286127

    Reviewed by Carlos Garcia Campos.

    WebEditorClient::updateGlobalSelection() serialized the selection with the
    default SerializeComposedTree::No, unlike every other selection serializer in
    the tree, including the GLib copy path in Editor::writeSelectionToPasteboard().
    In non-composed mode the traversal cannot reach an end point inside a shadow
    tree, so a selection that crosses a shadow boundary tripped an assertion in
    StyledMarkupAccumulator::traverseNodesForSerialization() and produced truncated
    markup in Release. GTK hit it on every selection change because the PRIMARY
    selection is rewritten each time; no other port serializes there.

    Pass SerializeComposedTree::Yes and IgnoreUserSelectNone::Yes, matching the
    copy path, so the PRIMARY selection carries the same markup as Ctrl+C.

    * LayoutTests/platform/glib/TestExpectations:
    * LayoutTests/platform/gtk/TestExpectations: Unskip the six selection
    shadow-dom tests and the editing test, which pass on GTK Release with
    assertions.
    * Source/WebKit/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
    (WebKit::WebEditorClient::updateGlobalSelection):

    Canonical link: https://commits.webkit.org/323945@main
@aperezdc
aperezdc requested review from a team and cdumez as code owners October 16, 2026 15:01
@aperezdc aperezdc self-assigned this Oct 16, 2026
@aperezdc aperezdc added the WebKitGTK Bugs related to the Gtk API layer. label Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WebKitGTK Bugs related to the Gtk API layer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants