Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b0aa853a94c66d7211b6e1a302db01e861bcb006
https://github.com/WebKit/WebKit/commit/b0aa853a94c66d7211b6e1a302db01e861bcb006
Author: Anne van Kesteren <[email protected]>
Date: 2026-07-10 (Fri, 10 Jul 2026)
Changed paths:
A
LayoutTests/fast/history/visited-relative-link-with-colon-slash-slash-expected.txt
A LayoutTests/fast/history/visited-relative-link-with-colon-slash-slash.html
M Source/WebCore/platform/SharedStringHash.cpp
Log Message:
-----------
Relative links with "://" in them are never colored as visited after being
clicked
https://bugs.webkit.org/show_bug.cgi?id=13755
rdar://181748643
Reviewed by Alex Christensen.
computeVisitedLinkHash() decided a URL was absolute by scanning the whole
string for "://", so a relative URL with "://" in its query or fragment
(e.g. "/search?q=http://...") was hashed unresolved and never matched the
visited link. Check for a scheme in the leading position instead; this also
bails at the first non-scheme character, so the hot path is not regressed.
Also resolve protocol-relative URLs ("//host/path") by inheriting the base
URL's scheme.
Note that there are still many cases that remain broken. A proper solution
requires using the URL parser while somehow not regressing performance.
Test: fast/history/visited-relative-link-with-colon-slash-slash.html
Canonical link: https://commits.webkit.org/316957@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications