[webkit-reviews] review granted: [Bug 229917] Correctly support fragment-only URLs in CSS images : [Attachment 444620] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 17 18:16:26 PST 2021
Darin Adler <darin at apple.com> has granted Matt Woodrow <m_woodrow at apple.com>'s
request for review:
Bug 229917: Correctly support fragment-only URLs in CSS images
https://bugs.webkit.org/show_bug.cgi?id=229917
Attachment 444620: Patch
https://bugs.webkit.org/attachment.cgi?id=444620&action=review
--- Comment #29 from Darin Adler <darin at apple.com> ---
Comment on attachment 444620
--> https://bugs.webkit.org/attachment.cgi?id=444620
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=444620&action=review
> Source/WebCore/css/parser/CSSParserContext.cpp:257
> + if (CSSValue::isCSSLocalURL(string))
> + return { string, { URL(), string } };
> +
> if (charset.isEmpty())
> return { string, { baseURL, string } };
> auto encodingForURLParsing = TextEncoding { charset
}.encodingForFormSubmissionOrURLParsing();
I think this might do the wrong thing when the fragment URLs contain non-ASCII
characters since we are not taking the charset into account. We should make
sure we have test cases for that.
I am not insisting that we add such test cases *before* landing this patch, but
I strongly suspect we don’t have tests where the charset would make a
difference, and we need to add them.
More information about the webkit-reviews
mailing list