-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
20 changed files
with
292 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.