[webkit-changes] [WebKit/WebKit] 798076: Avoid repeated reparsing of m_documentURI in major...
Yusuke Suzuki
noreply at github.com
Fri Jan 19 15:55:09 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 79807688373ede18b38d2c04793409b50a8df38f
https://github.com/WebKit/WebKit/commit/79807688373ede18b38d2c04793409b50a8df38f
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2024-01-19 (Fri, 19 Jan 2024)
Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
Log Message:
-----------
Avoid repeated reparsing of m_documentURI in major path
https://bugs.webkit.org/show_bug.cgi?id=267777
rdar://121275466
Reviewed by Ryosuke Niwa.
m_documentURI is set only from WebKitLegacy. But we are repeatedly reparsing this in URLParser
since it can be a random string. This patch avoids this by using `std::variant<String, URL>`
to keep the URL as is in the major path (Document::setURL).
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::documentURI const):
(WebCore::Document::setURL):
(WebCore::Document::fallbackBaseURL const):
(WebCore::Document::cloneDataFromDocument):
* Source/WebCore/dom/Document.h:
(WebCore::Document::documentURI const): Deleted.
Canonical link: https://commits.webkit.org/273246@main
More information about the webkit-changes
mailing list