RESOLVED FIXED228624
Document's fallback base URL should be deduced from its creator when URL is about:blank
https://bugs.webkit.org/show_bug.cgi?id=228624
Summary Document's fallback base URL should be deduced from its creator when URL is a...
Chris Dumez
Reported 2021-07-29 17:04:45 PDT
Document's fallback base URL should be deduced from its creator when URL is about:blank: - https://html.spec.whatwg.org/multipage/urls-and-fetching.html#fallback-base-url Chrome and Firefox match the specification here.
Attachments
Patch (5.08 KB, patch)
2021-07-29 17:07 PDT, Chris Dumez
no flags
Patch (25.95 KB, patch)
2021-07-30 08:44 PDT, Chris Dumez
no flags
Patch (26.67 KB, patch)
2021-07-30 11:23 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2021-07-29 17:07:42 PDT
Chris Dumez
Comment 2 2021-07-30 08:44:08 PDT
Chris Dumez
Comment 3 2021-07-30 11:23:44 PDT
Geoffrey Garen
Comment 4 2021-07-30 13:00:12 PDT
Comment on attachment 434648 [details] Patch r=me
EWS
Comment 5 2021-07-30 13:25:53 PDT
Committed r280491 (240123@main): <https://commits.webkit.org/240123@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 434648 [details].
Radar WebKit Bug Importer
Comment 6 2021-07-30 13:26:18 PDT
Darin Adler
Comment 7 2021-07-30 14:29:06 PDT
Comment on attachment 434648 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=434648&action=review > Source/WebCore/dom/Document.cpp:3422 > + if (m_baseURL == aboutBlankURL()) { This is a case-sensitive check. Is that really what we want?
Chris Dumez
Comment 8 2021-07-30 14:53:54 PDT
Comment on attachment 434648 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=434648&action=review >> Source/WebCore/dom/Document.cpp:3422 >> + if (m_baseURL == aboutBlankURL()) { > > This is a case-sensitive check. Is that really what we want? I can replace by m_baseURL.isAboutBlank() for clarity but it is also implemented like so: ``` bool URL::isAboutBlank() const { return protocolIsAbout() && path() == "blank"; } ``` Note that the path() string check is case-sensitive. My understanding is that the path ("blank") is case-sensitive. Note that here, I have just parsed m_baseURL, the URL parser lowercases the scheme/protocol so the protocol would be lower case no matter what here. Therefore, I think my check is identical to URL::isAboutBlank(). That said, I will switch to isAboutBlank() for clarity.
Chris Dumez
Comment 9 2021-07-30 15:04:06 PDT
(In reply to Chris Dumez from comment #8) > Comment on attachment 434648 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=434648&action=review > > >> Source/WebCore/dom/Document.cpp:3422 > >> + if (m_baseURL == aboutBlankURL()) { > > > > This is a case-sensitive check. Is that really what we want? > > I can replace by m_baseURL.isAboutBlank() for clarity but it is also > implemented like so: > ``` > bool URL::isAboutBlank() const > { > return protocolIsAbout() && path() == "blank"; > } > ``` > > Note that the path() string check is case-sensitive. My understanding is > that the path ("blank") is case-sensitive. > > Note that here, I have just parsed m_baseURL, the URL parser lowercases the > scheme/protocol so the protocol would be lower case no matter what here. > Therefore, I think my check is identical to URL::isAboutBlank(). That said, > I will switch to isAboutBlank() for clarity. Switched to using URL::isAboutBlank() in <https://commits.webkit.org/r280498>.
Note You need to log in before you can comment on or make changes to this bug.