New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save memory when StyleRule doesn't need nesting support #10044
Merged
webkit-early-warning-system
merged 1 commit into
WebKit:main
from
mdubet:stylerulewithchild
Feb 14, 2023
Merged
Save memory when StyleRule doesn't need nesting support #10044
webkit-early-warning-system
merged 1 commit into
WebKit:main
from
mdubet:stylerulewithchild
Feb 14, 2023
Conversation
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
mdubet
added
the
WebCore Misc.
For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit).
label
Feb 13, 2023
EWS run on previous version of this PR (hash a9a9cab) |
mdubet
force-pushed
the
stylerulewithchild
branch
from
February 13, 2023 18:16
a9a9cab
to
fe6ae41
Compare
EWS run on previous version of this PR (hash fe6ae41) |
anttijk
approved these changes
Feb 14, 2023
anttijk
reviewed
Feb 14, 2023
mdubet
force-pushed
the
stylerulewithchild
branch
from
February 14, 2023 11:19
fe6ae41
to
ed1cff4
Compare
EWS run on previous version of this PR (hash ed1cff4) |
mdubet
force-pushed
the
stylerulewithchild
branch
from
February 14, 2023 15:47
ed1cff4
to
77fd382
Compare
EWS run on current version of this PR (hash 77fd382) |
https://bugs.webkit.org/show_bug.cgi?id=252176 rdar://105399781 Reviewed by Antti Koivisto. Support for CSS Nesting has added 2 members to the StyleRule class (the resolved selector list, and the list of children rules), which created a memory regression of Membuster. This patch creates a separate StyleWithNestingRule to be used when we actually need the CSS Nesting feature (which is determined at parsing time). When we don't need the CSS Nesting feature, it has exactly zero memory cost. * Source/WebCore/bindings/js/JSCSSRuleCustom.cpp: (WebCore::toJSNewlyCreated): * Source/WebCore/css/CSSSelectorList.cpp: (WebCore::CSSSelectorList::hasExplicitNestingParent const): * Source/WebCore/css/CSSSelectorList.h: * Source/WebCore/css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::CSSStyleRule): (WebCore::CSSStyleRule::nestedRules const): (WebCore::CSSStyleRule::cssText const): (WebCore::CSSStyleRule::length const): (WebCore::CSSStyleRule::item const): * Source/WebCore/css/CSSStyleRule.h: * Source/WebCore/css/StyleRule.cpp: (WebCore::StyleRuleBase::visitDerived): (WebCore::StyleRuleBase::createCSSOMWrapper const): (WebCore::StyleRule::StyleRule): (WebCore::StyleRule::create): (WebCore::StyleRule::createForSplitting): (WebCore::StyleRule::resolvedSelectorList const): (WebCore::StyleRuleWithNesting::create): (WebCore::StyleRuleWithNesting::StyleRuleWithNesting): (WebCore::StyleRuleWithNesting::setResolvedSelectorList const): (WebCore::StyleRuleGroup::StyleRuleGroup): (WebCore::StyleRuleRareData::createIfNeeded): Deleted. (WebCore::StyleRule::rareData const): Deleted. (WebCore::StyleRule::setNestedRules): Deleted. (WebCore::StyleRule::setResolvedSelectorList const): Deleted. (WebCore::emptyRuleVector): Deleted. (WebCore::StyleRule::nestedRules const): Deleted. * Source/WebCore/css/StyleRule.h: (WebCore::StyleRuleBase::isStyleRule const): (WebCore::StyleRuleBase::isStyleRuleWithNesting const): (WebCore::StyleRuleBase::setType): (isType): (WebCore::StyleRuleRareData::createIfNeeded): Deleted. * Source/WebCore/css/StyleRuleType.h: * Source/WebCore/css/StyleSheetContents.cpp: (WebCore::StyleSheetContents::traverseSubresources const): * Source/WebCore/css/parser/CSSParserImpl.cpp: (WebCore::CSSParserImpl::createNestingParentRule): (WebCore::CSSParserImpl::consumeStyleRule): * Source/WebCore/css/parser/CSSParserImpl.h: * Source/WebCore/inspector/InspectorStyleSheet.cpp: (WebCore::flatteningStrategyForStyleRuleType): * Source/WebCore/style/RuleSetBuilder.cpp: (WebCore::Style::RuleSetBuilder::addChildRule): (WebCore::Style::RuleSetBuilder::populateStyleRuleResolvedSelectorList): (WebCore::Style::RuleSetBuilder::addStyleRuleWithSelectorList): (WebCore::Style::RuleSetBuilder::addStyleRule): * Source/WebCore/style/RuleSetBuilder.h: Canonical link: https://commits.webkit.org/260281@main
webkit-early-warning-system
force-pushed
the
stylerulewithchild
branch
from
February 14, 2023 23:21
77fd382
to
9db1de4
Compare
Committed 260281@main (9db1de4): https://commits.webkit.org/260281@main Reviewed commits have been landed. Closing PR #10044 and removing active labels. |
webkit-commit-queue
removed
the
merge-queue
Applied to send a pull request to merge-queue
label
Feb 14, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
WebCore Misc.
For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit).
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
9db1de4
77fd382
π§ͺ api-gtkπ§ͺ jsc-armv7-tests