Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 68e73e36fe065e4229d37cf0c686e5bd7a64bf53
https://github.com/WebKit/WebKit/commit/68e73e36fe065e4229d37cf0c686e5bd7a64bf53
Author: Brandon Stewart <[email protected]>
Date: 2025-12-09 (Tue, 09 Dec 2025)
Changed paths:
M LayoutTests/inspector/css/getSupportedCSSProperties-expected.txt
M LayoutTests/inspector/css/getSupportedCSSProperties.html
M Source/WebCore/css/CSSProperties.json
M Source/WebCore/css/CSSProperty.h
M Source/WebCore/css/parser/CSSParserContext.cpp
M Source/WebCore/css/parser/CSSParserContext.h
M Source/WebCore/css/scripts/process-css-properties.py
M Source/WebCore/inspector/agents/InspectorCSSAgent.cpp
Log Message:
-----------
Web Inspector: Pull CSS property keyword completions from the backend instead
of hardcoding them
https://bugs.webkit.org/show_bug.cgi?id=303627
rdar://problem/165914089
Reviewed by Tim Nguyen and Devin Rousso.
The Web Inspector's CSS autocomplete system previously hardcoded all valid
keyword values for CSS properties in CSSKeywordCompletions.js. This meant
that when new CSS values were added to WebCore, they had to be manually
duplicated in the Inspector frontend, and there was no way to filter values
based on runtime settings (like feature flags).
This change extends getSupportedCSSProperties() to return the valid keyword
values for each property, pulled directly from CSSProperties.json. The
frontend now uses these backend-provided values instead of the hardcoded
ones, ensuring completions stay in sync with WebCore and respect feature
flags.
Key changes:
- Added validKeywordsForProperty() to return keyword values from
CSSProperties.json
- Added isKeywordValidForPropertyValues() to filter keywords by settings flags
- Added CSSParserContext(const Settings&) constructor for easy context creation
- Updated getSupportedCSSProperties() to include filtered values in the response
- Added settings-flag to grid-lanes/inline-grid-lanes values in
CSSProperties.json
* LayoutTests/inspector/css/getSupportedCSSProperties-expected.txt:
* LayoutTests/inspector/css/getSupportedCSSProperties.html:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/CSSProperty.h:
* Source/WebCore/css/parser/CSSParserContext.cpp:
(WebCore::CSSParserContext::CSSParserContext):
* Source/WebCore/css/parser/CSSParserContext.h:
* Source/WebCore/css/scripts/process-css-properties.py:
(GenerateCSSPropertyNames._generate_css_property_names_gperf_prelude):
(GenerateCSSPropertyNames):
* Source/WebCore/inspector/agents/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
Canonical link: https://commits.webkit.org/304195@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications