[webkit-changes] [WebKit/WebKit] 80e4e3: [appearance: base] Add style switching mechanism f...
Tim Nguyen
noreply at github.com
Wed Sep 18 10:30:12 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 80e4e359050621254fcf171cb1ae9ac32c48f74d
https://github.com/WebKit/WebKit/commit/80e4e359050621254fcf171cb1ae9ac32c48f74d
Author: Tim Nguyen <ntim at apple.com>
Date: 2024-09-18 (Wed, 18 Sep 2024)
Changed paths:
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/bindings/js/JSCSSRuleCustom.cpp
A Source/WebCore/css/CSSInternalBaseAppearanceRule.cpp
A Source/WebCore/css/CSSInternalBaseAppearanceRule.h
M Source/WebCore/css/CSSTimingFunctionValue.cpp
M Source/WebCore/css/CSSValueKeywords.in
M Source/WebCore/css/StyleRule.cpp
M Source/WebCore/css/StyleRule.h
M Source/WebCore/css/StyleRuleType.h
M Source/WebCore/css/StyleSheetContents.cpp
M Source/WebCore/css/html.css
M Source/WebCore/css/parser/CSSAtRuleID.cpp
M Source/WebCore/css/parser/CSSAtRuleID.h
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Source/WebCore/css/parser/CSSParserImpl.h
M Source/WebCore/css/parser/CSSPropertyParser.cpp
M Source/WebCore/css/parser/CSSPropertyParser.h
M Source/WebCore/inspector/InspectorStyleSheet.cpp
M Source/WebCore/style/ElementRuleCollector.cpp
M Source/WebCore/style/MatchResult.h
M Source/WebCore/style/PropertyCascade.cpp
M Source/WebCore/style/PropertyCascade.h
M Source/WebCore/style/RuleData.cpp
M Source/WebCore/style/RuleData.h
M Source/WebCore/style/RuleFeature.cpp
M Source/WebCore/style/RuleSet.cpp
M Source/WebCore/style/RuleSetBuilder.cpp
M Source/WebCore/style/RuleSetBuilder.h
M Source/WebCore/style/StyleBuilder.cpp
M Source/WebCore/style/StyleBuilder.h
M Source/WebCore/style/StyleResolver.cpp
M Source/WebCore/style/StyleTreeResolver.cpp
Log Message:
-----------
[appearance: base] Add style switching mechanism for UA stylesheets
https://bugs.webkit.org/show_bug.cgi?id=278084
rdar://133818717
Reviewed by Antti Koivisto.
This adds a `@-internal-base-appearance` at-rule that can only be used in UA stylesheets.
Rules contained inside that at-rule will only be applied when `appearance: base` is set (see `html.css`).
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJSNewlyCreated):
* Source/WebCore/css/CSSInternalBaseAppearanceRule.cpp: Added.
(WebCore::CSSInternalBaseAppearanceRule::CSSInternalBaseAppearanceRule):
(WebCore::CSSInternalBaseAppearanceRule::cssText const):
* Source/WebCore/css/CSSInternalBaseAppearanceRule.h: Added.
* Source/WebCore/css/CSSTimingFunctionValue.cpp:
* Source/WebCore/css/CSSValueKeywords.in:
* Source/WebCore/css/StyleRule.cpp:
(WebCore::StyleRuleBase::visitDerived):
(WebCore::StyleRuleBase::createCSSOMWrapper const):
(WebCore::StyleRuleInternalBaseAppearance::create):
(WebCore::StyleRuleInternalBaseAppearance::StyleRuleInternalBaseAppearance):
* Source/WebCore/css/StyleRule.h:
(WebCore::StyleRuleBase::isInternalBaseAppearanceRule const):
(WebCore::StyleRuleBase::isGroupRule const):
(isType):
* Source/WebCore/css/StyleRuleType.h:
* Source/WebCore/css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::traverseSubresources const):
(WebCore::StyleSheetContents::mayDependOnBaseURL const):
* Source/WebCore/css/html.css:
(@-internal-base-appearance):
(::placeholder):
(input[type=button],):
(:is():
* Source/WebCore/css/parser/CSSAtRuleID.cpp:
(WebCore::cssAtRuleID):
* Source/WebCore/css/parser/CSSAtRuleID.h:
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeAtRule):
(WebCore::CSSParserImpl::consumeInternalBaseAppearanceRule):
* Source/WebCore/css/parser/CSSParserImpl.h:
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseValue):
(WebCore::CSSPropertyParser::parseInternalBaseAppearanceDescriptor):
* Source/WebCore/css/parser/CSSPropertyParser.h:
* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::flatteningStrategyForStyleRuleType):
* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::transferMatchedRules):
(WebCore::Style::ElementRuleCollector::addMatchedProperties):
* Source/WebCore/style/MatchResult.h:
(WebCore::Style::operator==):
(WebCore::Style::MatchResult::cacheablePropertiesEqual const):
(WebCore::Style::add):
* Source/WebCore/style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::addMatch):
(WebCore::Style::PropertyCascade::addBaseAppearanceStyles):
* Source/WebCore/style/PropertyCascade.h:
* Source/WebCore/style/RuleData.cpp:
(WebCore::Style::RuleData::RuleData):
* Source/WebCore/style/RuleData.h:
(WebCore::Style::RuleData::atRuleTypes const):
(WebCore::Style::RuleData::isStartingStyle const): Deleted.
* Source/WebCore/style/RuleFeature.cpp:
(WebCore::Style::RuleFeatureSet::collectFeatures):
* Source/WebCore/style/RuleSet.cpp:
(WebCore::Style::RuleSet::addRule):
* Source/WebCore/style/RuleSetBuilder.cpp:
(WebCore::Style::RuleSetBuilder::addChildRule):
(WebCore::Style::RuleSetBuilder::addStyleRuleWithSelectorList):
* Source/WebCore/style/RuleSetBuilder.h:
* Source/WebCore/style/StyleBuilder.cpp:
(WebCore::Style::Builder::Builder):
* Source/WebCore/style/StyleBuilder.h:
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::styleForKeyframe):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveStartingStyle const):
Canonical link: https://commits.webkit.org/283852@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list