Bug 220993

Summary: REGRESSION(r270637) Filtering does not work in Styles sidebar panel
Product: WebKit Reporter: Razvan Caliman <rcaliman>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, ews-watchlist, hi, inspector-bugzilla-changes, nvasilyev, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description Razvan Caliman 2021-01-26 10:57:19 PST
Regressed by https://bugs.webkit.org/show_bug.cgi?id=218964

Steps to reproduce:

- Go to https://webkit.org
- Open WebInspector and select an element
- Switch to Styles sidebar panel
- Type a CSS property value into the Filter input at the bottom of the styles

Expected:
- The styles list is filtered by the term

Actual:
- No change in the styles list
Comment 1 Radar WebKit Bug Importer 2021-01-26 10:57:28 PST
<rdar://problem/73623818>
Comment 2 Nikita Vasilyev 2021-01-26 11:03:51 PST
[Error] TypeError: super.filterDidChange is not a function. (In 'super.filterDidChange(filterBar)', 'super.filterDidChange' is undefined)
	filterDidChange (SpreadsheetRulesStyleDetailsPanel.js:323)
	_filterDidChange (GeneralStyleDetailsSidebarPanel.js:431)
	dispatch (Object.js:130)
	dispatchEventToListeners (Object.js:138)
	_handleFilterChanged (FilterBar.js:198)
	_handleFilterChanged
Comment 3 Razvan Caliman 2021-01-26 11:12:38 PST
Created attachment 418448 [details]
Patch
Comment 4 Devin Rousso 2021-01-26 11:18:54 PST
Comment on attachment 418448 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=418448&action=review

r=me with a recommended alternative

> Source/WebInspectorUI/ChangeLog:9
> +        Reverting removal of abstract method used by SpreadsheetRulesStyleDetailsPanel.

I think we should just remove the `super.filterDidChange(filterBar);` call in `ComputedStyleDetailsPanel.js`.  `WI.GeneralStyleDetailsSidebarPanel.prototype.initialLayout` checks for `typeof this._panel.filterDidChange === "function"`, so it may be better to remove it from the superclass in case we add new subclasses that don't actually override it.
Comment 5 Razvan Caliman 2021-01-26 11:46:24 PST
Created attachment 418454 [details]
Patch
Comment 6 Razvan Caliman 2021-01-26 11:46:54 PST
Comment on attachment 418448 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=418448&action=review

>> Source/WebInspectorUI/ChangeLog:9
>> +        Reverting removal of abstract method used by SpreadsheetRulesStyleDetailsPanel.
> 
> I think we should just remove the `super.filterDidChange(filterBar);` call in `ComputedStyleDetailsPanel.js`.  `WI.GeneralStyleDetailsSidebarPanel.prototype.initialLayout` checks for `typeof this._panel.filterDidChange === "function"`, so it may be better to remove it from the superclass in case we add new subclasses that don't actually override it.

Sounds good. Done!
Comment 7 Devin Rousso 2021-01-26 11:50:52 PST
Comment on attachment 418454 [details]
Patch

r=me
Comment 8 BJ Burg 2021-01-26 16:55:51 PST
Setting cq+
Comment 9 EWS 2021-01-26 17:12:06 PST
Committed r271927: <https://trac.webkit.org/changeset/271927>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 418454 [details].