Bug 250136 - Web Inspector: Styles Panel: Filtering for the text `@media` does not find @media CSS rules
Summary: Web Inspector: Styles Panel: Filtering for the text `@media` does not find @m...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Razvan Caliman
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-05 10:13 PST by Razvan Caliman
Modified: 2023-03-17 12:59 PDT (History)
2 users (show)

See Also:


Attachments
Test file (300 bytes, text/html)
2023-01-05 10:13 PST, Razvan Caliman
no flags Details
Screen recording with patch applied (2.40 MB, video/quicktime)
2023-03-17 10:57 PDT, Razvan Caliman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.