NEW238549
InspectorCSSAgent::getSupportedCSSProperties() should use a real CSS parser context
https://bugs.webkit.org/show_bug.cgi?id=238549
Summary InspectorCSSAgent::getSupportedCSSProperties() should use a real CSS parser c...
Sam Sneddon [:gsnedders]
Reported 2022-03-30 06:48:51 PDT
Currently this calls: CSSParserFastPaths::isValidKeywordPropertyAndValue(propertyID, valueID, strictCSSParserContext()) However, by using a strictCSSParserContext() we're actually calling this with basically everything that can be runtime-disabled disabled, which likely means we're missing some valid values.
Attachments
Patrick Angle
Comment 1 2022-03-30 09:24:48 PDT
If bug 217802 takes Devin's suggestion to keep a `Page& m_inspectedPage` in `InspectorCSSAgent`, I think we should be able to do something along the lines of `CSSParserContext(m_inspectedPage->mainFrame().document())` (with appropriate checks to fall back to the strict context if the page or document is missing) to get a parsing context for the main document.
Sam Sneddon [:gsnedders]
Comment 2 2022-04-05 10:32:39 PDT
Also, as part of this, we should add to CSSParserFastPaths::isValidKeywordPropertyAndValue: > ASSERT(isCSSPropertyExposed(propertyId, &context.propertySettings)) Or if that's still not possible (perhaps with `isInternalCSSProperty(propertyId)` if we need to), we should file another bug for that.
Radar WebKit Bug Importer
Comment 3 2022-04-06 06:49:13 PDT
Note You need to log in before you can comment on or make changes to this bug.