Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ee26e01ced88303f346791a2ef7b0aa1bdfd0b90
https://github.com/WebKit/WebKit/commit/ee26e01ced88303f346791a2ef7b0aa1bdfd0b90
Author: Devin Rousso <[email protected]>
Date: 2025-07-02 (Wed, 02 Jul 2025)
Changed paths:
M LayoutTests/inspector/css/getMatchedStylesForNode-expected.txt
M LayoutTests/inspector/css/getMatchedStylesForNode.html
A
LayoutTests/inspector/css/getMatchedStylesForNodeStartingStyleGrouping-expected.txt
A
LayoutTests/inspector/css/getMatchedStylesForNodeStartingStyleGrouping.html
M Source/JavaScriptCore/inspector/protocol/CSS.json
M Source/WebCore/inspector/InspectorStyleSheet.cpp
M Source/WebCore/style/InspectorCSSOMWrappers.cpp
M Source/WebInspectorUI/UserInterface/Models/CSSGrouping.js
M Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js
M Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js
M
Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js
Log Message:
-----------
Web Inspector: Elements: add support for `@starting-style`
https://bugs.webkit.org/show_bug.cgi?id=294425
Reviewed by Tim Nguyen.
* Source/JavaScriptCore/inspector/protocol/CSS.json:
* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::flatteningStrategyForStyleRuleType):
(WebCore::atRuleIdentifierForType):
(WebCore::protocolGroupingTypeForStyleRuleType):
Add a new enum value for `@starting-style`.
* Source/WebCore/style/InspectorCSSOMWrappers.cpp:
(WebCore::Style::InspectorCSSOMWrappers::collect):
Iterate over all rules within `@starting-style` when gathering information for
Web Inspector.
* Source/WebInspectorUI/UserInterface/Models/CSSGrouping.js:
(WI.CSSGrouping.prototype.get editable):
(WI.CSSGrouping.prototype.get isStartingStyle): Added.
(WI.CSSGrouping.prototype.get prefix):
(WI.CSSGrouping.prototype.get isSupports): Deleted.
(WI.CSSGrouping.prototype.get isLayer): Deleted.
(WI.CSSGrouping.prototype.get isContainer): Deleted.
(WI.CSSGrouping.prototype.get isStyle): Deleted.
Remove unused methods and simplify the remainder.
* Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype._markOverriddenProperties):
* Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.get isStartingStyle): Added.
Properties in `@starting-style` will always be overridden by anything else that
matches, regardless of the cascade order/`!important`.
*
Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderGroupings):
Don't try to make the grouping text editable if there isn't any (e.g.
`@starting-style` vs `@media foo`).
* LayoutTests/inspector/css/getMatchedStylesForNode.html:
* LayoutTests/inspector/css/getMatchedStylesForNode-expected.txt:
* LayoutTests/inspector/css/getMatchedStylesForNodeStartingStyleGrouping.html:
Added.
*
LayoutTests/inspector/css/getMatchedStylesForNodeStartingStyleGrouping-expected.txt:
Added.
Canonical link: https://commits.webkit.org/296925@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes