[webkit-changes] [WebKit/WebKit] e5df40: Factor inline stylesheet cache into a class
Antti Koivisto
noreply at github.com
Wed Jan 24 12:17:30 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e5df4028963eb94d06adc84eb4ec3999de4f502e
https://github.com/WebKit/WebKit/commit/e5df4028963eb94d06adc84eb4ec3999de4f502e
Author: Antti Koivisto <antti at apple.com>
Date: 2024-01-24 (Wed, 24 Jan 2024)
Changed paths:
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/CSSStyleSheet.cpp
M Source/WebCore/css/CSSStyleSheet.h
M Source/WebCore/css/StyleSheetContents.h
M Source/WebCore/dom/InlineStyleSheetOwner.cpp
M Source/WebCore/dom/InlineStyleSheetOwner.h
M Source/WebCore/page/MemoryRelease.cpp
A Source/WebCore/style/StyleSheetContentsCache.cpp
A Source/WebCore/style/StyleSheetContentsCache.h
Log Message:
-----------
Factor inline stylesheet cache into a class
https://bugs.webkit.org/show_bug.cgi?id=267996
rdar://problem/121514266
Reviewed by Ryosuke Niwa.
Add StyleSheetContentsCache and use it.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::CSSStyleSheet):
(WebCore::CSSStyleSheet::replaceSync):
* Source/WebCore/css/StyleSheetContents.h:
* Source/WebCore/dom/InlineStyleSheetOwner.cpp:
(WebCore::makeStyleSheetContentsCacheKey):
(WebCore::InlineStyleSheetOwner::createSheet):
(WebCore::inlineStyleSheetCache): Deleted.
(WebCore::makeInlineStyleSheetCacheKey): Deleted.
(WebCore::InlineStyleSheetOwner::clearCache): Deleted.
* Source/WebCore/dom/InlineStyleSheetOwner.h:
* Source/WebCore/page/MemoryRelease.cpp:
(WebCore::releaseNoncriticalMemory):
* Source/WebCore/style/StyleSheetContentsCache.cpp: Added.
(WebCore::Style::StyleSheetContentsCache::singleton):
(WebCore::Style::StyleSheetContentsCache::get):
(WebCore::Style::StyleSheetContentsCache::add):
(WebCore::Style::StyleSheetContentsCache::clear):
* Source/WebCore/style/StyleSheetContentsCache.h: Added.
Canonical link: https://commits.webkit.org/273437@main
More information about the webkit-changes
mailing list