Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0f1cee1acd25f51b59c7c5d529ebfbb588da465b
https://github.com/WebKit/WebKit/commit/0f1cee1acd25f51b59c7c5d529ebfbb588da465b
Author: Ahmad Saleem <[email protected]>
Date: 2026-07-12 (Sun, 12 Jul 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/scroll-to-text-fragment/resources/text-html-mixed-case.html
A
LayoutTests/imported/w3c/web-platform-tests/scroll-to-text-fragment/resources/text-html-mixed-case.html.headers
M
LayoutTests/imported/w3c/web-platform-tests/scroll-to-text-fragment/text-directive-mime-type-parameter-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/scroll-to-text-fragment/text-directive-mime-type-parameter.html
M Source/WebCore/page/LocalFrameView.cpp
Log Message:
-----------
Scroll To Text Fragment: simplify MIME-type gate and add mixed-case coverage
https://bugs.webkit.org/show_bug.cgi?id=319182
rdar://182030528
Reviewed by Anne van Kesteren.
Follow-up to 316976@main. ParsedContentType::mimeType() already returns an
ASCII-lowercased essence (setContentType() calls convertToASCIILowercase()),
so the equalLettersIgnoringASCIICase() comparisons in scrollToTextFragment()
were redundant. Compare the parsed MIME type directly against the lowercase
literals "text/html" and "text/plain", and note in a comment that the string
is already lowercased.
Also add WPT coverage for a document served with a mixed-case Content-Type
("Text/HTML; charset=UTF-8") to pin the case-insensitive normalization.
*
LayoutTests/imported/w3c/web-platform-tests/scroll-to-text-fragment/resources/text-html-mixed-case.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/scroll-to-text-fragment/resources/text-html-mixed-case.html.headers:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/scroll-to-text-fragment/text-directive-mime-type-parameter-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/scroll-to-text-fragment/text-directive-mime-type-parameter.html:
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::scrollToTextFragment):
Canonical link: https://commits.webkit.org/316990@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications