-
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.
https://bugs.webkit.org/show_bug.cgi?id=254411 rdar://107184142 Reviewed by Antti Koivisto. We were not updating the CounterStyles descriptors when the related CSSOM descriptor was updated. Now, we define setters for each descriptor of CSSCounterStyleDescriptors. The setters at CSSCounterStyleRule still use setterInternal() to set the associated property at StyleProperties. The function setterInternal() was modified to return true if it did set a new value. The function newValueInvalidOrEqual() had a small bug in which it would return symbolsValidForSystem(...). The right thing to do is return !symbolsValidForSystem(...), since it should true for a invalid value. Each setter at CSSCounterStyleRule now returns early if setterInternal() didn't set a value. If it did set a value we proceed to set the associated descriptor stored at the rule with the newly created setters. Ideally, storing only the descriptors would be enough and we could stop storing StyleProperties. This would require definining a serializer for each descriptor and modifying the the CSSCounterStyleRule setters to set the descriptor directly, without modifying the property first. This improvement should come in a separated PR and it was was reported at https://bugs.webkit.org/show_bug.cgi?id=254524 which is tracked by rdar://107267784. Minor change: We are also renaming hasUnresolvedReferences to m_hasUnresolvedReferences, for following webkit's style. * LayoutTests/TestExpectations: * Source/WebCore/css/CSSCounterStyleDescriptors.cpp: (WebCore::translateRangeFromStyleProperties): (WebCore::translateAdditiveSymbolsFromStyleProperties): (WebCore::translatePadFromStyleProperties): (WebCore::translateNegativeSymbolsFromStyleProperties): (WebCore::translateSymbolsFromStyleProperties): (WebCore::translateFallbackNameFromStyleProperties): (WebCore::translatePrefixFromStyleProperties): (WebCore::translateSuffixFromStyleProperties): (WebCore::extractDataFromSystemDescriptor): (WebCore::CSSCounterStyleDescriptors::setNegative): (WebCore::CSSCounterStyleDescriptors::setPrefix): (WebCore::CSSCounterStyleDescriptors::setSuffix): (WebCore::CSSCounterStyleDescriptors::setRanges): (WebCore::CSSCounterStyleDescriptors::setPad): (WebCore::CSSCounterStyleDescriptors::setFallbackName): (WebCore::CSSCounterStyleDescriptors::setSymbols): (WebCore::CSSCounterStyleDescriptors::setAdditiveSymbols): * Source/WebCore/css/CSSCounterStyleDescriptors.h: (WebCore::CSSCounterStyleDescriptors::setName): * Source/WebCore/css/CSSCounterStyleRegistry.cpp: (WebCore::CSSCounterStyleRegistry::resolveReferencesIfNeeded): (WebCore::CSSCounterStyleRegistry::addCounterStyle): (WebCore::CSSCounterStyleRegistry::clearAuthorCounterStyles): (WebCore::CSSCounterStyleRegistry::invalidate): * Source/WebCore/css/CSSCounterStyleRegistry.h: * Source/WebCore/css/CSSCounterStyleRule.cpp: (WebCore::StyleRuleCounterStyle::newValueInvalidOrEqual const): (WebCore::CSSCounterStyleRule::setName): (WebCore::CSSCounterStyleRule::setterInternal): (WebCore::CSSCounterStyleRule::setSystem): (WebCore::CSSCounterStyleRule::setNegative): (WebCore::CSSCounterStyleRule::setPrefix): (WebCore::CSSCounterStyleRule::setSuffix): (WebCore::CSSCounterStyleRule::setRange): (WebCore::CSSCounterStyleRule::setPad): (WebCore::CSSCounterStyleRule::setFallback): (WebCore::CSSCounterStyleRule::setSymbols): (WebCore::CSSCounterStyleRule::setAdditiveSymbols): * Source/WebCore/css/CSSCounterStyleRule.h: * Source/WebCore/style/RuleSetBuilder.cpp: (WebCore::Style::RuleSetBuilder::addMutatingRulesToResolver): * Source/WebCore/style/StyleScope.cpp: (WebCore::Style::Scope::clearResolver): (WebCore::Style::Scope::updateResolver): Canonical link: https://commits.webkit.org/262203@main
- Loading branch information
1 parent
2ec3bfd
commit 3fa329d
Showing
9 changed files
with
141 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
Oops, something went wrong.