Bug 250136

Summary: Web Inspector: Styles Panel: Filtering for the text `@media` does not find @media CSS rules
Product: WebKit Reporter: Razvan Caliman <rcaliman>
Component: Web InspectorAssignee: Razvan Caliman <rcaliman>
Status: RESOLVED FIXED    
Severity: Normal CC: inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Test file
none
Screen recording with patch applied none

Description Razvan Caliman 2023-01-05 10:13:46 PST
Created attachment 464356 [details]
Test file

Steps to reproduce:

- Open the attached test file: `at-nested.html`
- Inspect the `body` element
- In the Styles panel, type the string "media" in the Filter input field.

Expected

The `@media (min-width: 0)` CSS rule should be highlighted.

Actual result:

No rules found. Same result for `@supports`. 

The issue occurs because filtering only happens for the condition text of at-rules, not also for their labels:

`SpreadsheetCSSStyleDeclarationSection.js._handleEditorFilterApplied()`

https://github.com/WebKit/WebKit/blob/9e2245fba9e1eb44ce97c183fc45bbc39b3f592d/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js#L710-L714
Comment 1 Radar WebKit Bug Importer 2023-01-05 10:14:16 PST
<rdar://problem/103918779>
Comment 2 Razvan Caliman 2023-03-17 10:54:03 PDT
Pull request: https://github.com/WebKit/WebKit/pull/11658
Comment 3 Razvan Caliman 2023-03-17 10:57:05 PDT
Created attachment 465482 [details]
Screen recording with patch applied
Comment 4 EWS 2023-03-17 12:59:56 PDT
Committed 261804@main (bc8856c0306b): <https://commits.webkit.org/261804@main>

Reviewed commits have been landed. Closing PR #11658 and removing active labels.