[webkit-changes] [WebKit/WebKit] 3520ab: Serialize content of style information element wit...
Sihui
noreply at github.com
Thu Nov 2 10:16:09 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3520ab7bac786d2b9d2bac921f67b0dfdddda6b7
https://github.com/WebKit/WebKit/commit/3520ab7bac786d2b9d2bac921f67b0dfdddda6b7
Author: Sihui Liu <sihui_liu at apple.com>
Date: 2023-11-02 (Thu, 02 Nov 2023)
Changed paths:
M Source/WebCore/css/CSSFontFaceRule.cpp
M Source/WebCore/css/CSSFontFaceRule.h
M Source/WebCore/css/CSSFontFaceSrcValue.cpp
M Source/WebCore/css/CSSFontFaceSrcValue.h
M Source/WebCore/css/CSSImageValue.cpp
M Source/WebCore/css/CSSImageValue.h
M Source/WebCore/css/CSSRule.h
M Source/WebCore/css/CSSStyleRule.cpp
M Source/WebCore/css/CSSStyleRule.h
M Source/WebCore/css/CSSValue.cpp
M Source/WebCore/css/CSSValue.h
M Source/WebCore/css/CSSValueList.cpp
M Source/WebCore/css/CSSValueList.h
M Source/WebCore/css/StyleProperties.cpp
M Source/WebCore/css/StyleProperties.h
M Source/WebCore/editing/MarkupAccumulator.cpp
M Source/WebCore/editing/MarkupAccumulator.h
M Source/WebCore/html/HTMLStyleElement.cpp
M Source/WebCore/html/HTMLStyleElement.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm
Log Message:
-----------
Serialize content of style information element with URL replacement
https://bugs.webkit.org/show_bug.cgi?id=264022
rdar://116883064
Reviewed by Ryosuke Niwa.
Instead of directly appending plain text content of style information element to markup, building up a contents string
from rules in the element and appending the string to markup. In this way, we could replace the subresource URLs on
demand.
API test: WebArchive.SaveResourcesStyle
* Source/WebCore/css/CSSFontFaceRule.cpp:
(WebCore::CSSFontFaceRule::cssText const):
(WebCore::CSSFontFaceRule::cssTextWithReplacementURLs const):
(WebCore::CSSFontFaceRule::cssTextInternal const):
* Source/WebCore/css/CSSFontFaceRule.h:
* Source/WebCore/css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcResourceValue::customSetReplacementURLForSubresources):
(WebCore::CSSFontFaceSrcResourceValue::customClearReplacementURLForSubresources):
(WebCore::CSSFontFaceSrcResourceValue::customCSSText const):
* Source/WebCore/css/CSSFontFaceSrcValue.h:
* Source/WebCore/css/CSSImageValue.cpp:
(WebCore::CSSImageValue::customSetReplacementURLForSubresources):
(WebCore::CSSImageValue::customClearReplacementURLForSubresources):
(WebCore::CSSImageValue::customCSSText const):
* Source/WebCore/css/CSSImageValue.h:
* Source/WebCore/css/CSSRule.h:
(WebCore::CSSRule::cssTextWithReplacementURLs const):
* Source/WebCore/css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::cssText const):
(WebCore::CSSStyleRule::cssTextForRules const):
(WebCore::CSSStyleRule::cssTextWithReplacementURLs const):
(WebCore::CSSStyleRule::cssTextForRulesWithReplacementURLs const):
(WebCore::CSSStyleRule::cssTextInternal const):
(WebCore::CSSStyleRule::cssTextForDeclsAndRules const): Deleted.
* Source/WebCore/css/CSSStyleRule.h:
* Source/WebCore/css/CSSValue.cpp:
(WebCore::CSSValue::setReplacementURLForSubresources):
(WebCore::CSSValue::clearReplacementURLForSubresources):
* Source/WebCore/css/CSSValue.h:
(WebCore::CSSValue::customSetReplacementURLForSubresources):
(WebCore::CSSValue::customClearReplacementURLForSubresources):
* Source/WebCore/css/CSSValueList.cpp:
(WebCore::CSSValueContainingVector::customSetReplacementURLForSubresources):
(WebCore::CSSValueContainingVector::customClearReplacementURLForSubresources):
* Source/WebCore/css/CSSValueList.h:
* Source/WebCore/css/StyleProperties.cpp:
(WebCore::StyleProperties::setReplacementURLForSubresources):
(WebCore::StyleProperties::clearReplacementURLForSubresources):
* Source/WebCore/css/StyleProperties.h:
* Source/WebCore/editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendContentsForNode):
(WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
* Source/WebCore/editing/MarkupAccumulator.h:
* Source/WebCore/html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::addSubresourceAttributeURLs const):
(WebCore::HTMLStyleElement::textContentWithReplacementURLs const):
* Source/WebCore/html/HTMLStyleElement.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm:
Canonical link: https://commits.webkit.org/270114@main
More information about the webkit-changes
mailing list