-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Web Inspector: Elements: add support for @starting-style
#46694
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
base: main
Are you sure you want to change the base?
Conversation
https://bugs.webkit.org/show_bug.cgi?id=294425 Reviewed by NOBODY (OOPS!). * 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.
EWS run on current version of this PR (hash d4e31f4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious how do you go about generating these expected files ? Are they manually written or is there a script to generate the expected output ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use Tools/Scripts/run-webkit-tests --reset-results path/to/test.html
to (re)generate these expected result files
d4e31f4
d4e31f4