[webkit-changes] [WebKit/WebKit] fd0640: Fix about:blank document.referrer initialization

sideshowbarker noreply at github.com
Wed Jan 31 08:48:16 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fd0640d8536fbfa6f4018be9ecc9eae72deec5bb
      https://github.com/WebKit/WebKit/commit/fd0640d8536fbfa6f4018be9ecc9eae72deec5bb
  Author: Michael[tm] Smith <mike at w3.org>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M LayoutTests/http/wpt/html/browsers/windows/browsing-context.html
    M LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-expected.txt
    R LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-expected.txt
    M Source/WebCore/loader/SubframeLoader.cpp

  Log Message:
  -----------
  Fix about:blank document.referrer initialization
https://bugs.webkit.org/show_bug.cgi?id=242965

Reviewed by Darin Adler.

This change makes WebKit conform to the requirement in the HTML spec at
https://html.spec.whatwg.org/#creating-a-new-browsing-context that a
new browsing context is created with its referrer set to "the
serialization of [its] creator's URL" — that is, the creator’s full URL,
without regard to Referrer Policy — which makes the WebKit behavior in
this case interoperable with existing behavior in Blink.

Otherwise, without this change, the referrer is set to an “origin string”
(origin + trailing slash) — which breaks conformance with the spec, and
breaks interop/compat with Blink.

* LayoutTests/http/wpt/html/browsers/windows/browsing-context.html:
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-expected.txt: Removed.
* Source/WebCore/loader/SubframeLoader.cpp:
(WebCore::FrameLoader::SubframeLoader::loadSubframe):

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




More information about the webkit-changes mailing list