RESOLVED FIXED 178331
Web Inspector: [PARITY] Styles Redesign: Make filtering work
https://bugs.webkit.org/show_bug.cgi?id=178331
Summary Web Inspector: [PARITY] Styles Redesign: Make filtering work
Nikita Vasilyev
Reported 2017-10-15 20:55:49 PDT
Filtering at the bottom of the new styles sidebar should work similarly to the old styles sidebar.
Attachments
Patch (16.83 KB, patch)
2017-12-02 23:27 PST, Devin Rousso
no flags
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 (2.55 MB, application/zip)
2017-12-03 00:36 PST, EWS Watchlist
no flags
Radar WebKit Bug Importer
Comment 1 2017-10-15 20:56:00 PDT
Devin Rousso
Comment 2 2017-12-02 23:27:36 PST
EWS Watchlist
Comment 3 2017-12-03 00:36:54 PST
Comment on attachment 328284 [details] Patch Attachment 328284 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/5473784 New failing tests: http/tests/security/import-script-crossorigin-loads-omit.html
EWS Watchlist
Comment 4 2017-12-03 00:36:55 PST
Created attachment 328287 [details] Archive of layout-test-results from ews106 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Devin Rousso
Comment 5 2017-12-03 13:55:49 PST
Comment on attachment 328287 [details] Archive of layout-test-results from ews106 for mac-elcapitan-wk2 Unrelated test failure.
Timothy Hatcher
Comment 6 2017-12-05 23:21:26 PST
Comment on attachment 328284 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=328284&action=review > Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:186 > + if (!this.didInitialLayout) Does filtering get applied automatically when layout does eventually happen?
Devin Rousso
Comment 7 2017-12-05 23:34:54 PST
Comment on attachment 328284 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=328284&action=review >> Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:186 >> + if (!this.didInitialLayout) > > Does filtering get applied automatically when layout does eventually happen? Yup! `_renderSelector` gets called by `layout`.
WebKit Commit Bot
Comment 8 2017-12-05 23:54:45 PST
Comment on attachment 328284 [details] Patch Clearing flags on attachment: 328284 Committed r225569: <https://trac.webkit.org/changeset/225569>
WebKit Commit Bot
Comment 9 2017-12-05 23:54:47 PST
All reviewed patches have been landed. Closing bug.
Nikita Vasilyev
Comment 10 2017-12-06 14:41:06 PST
Comment on attachment 328284 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=328284&action=review > Source/WebInspectorUI/ChangeLog:12 > + Since both the sections and editors (per-section) use View semantics, we cannot simply > + search for instances of the filtered text since not all of the subviews may have called > + layout() yet. Instead, we have to rely on event listeners to relay information as to whether > + the filtered text was matched up the chain, applying the correct style classes along the way. Unfortunately, asynchronous nature of WI.View makes things more complicated than they should be. In some cases, batching DOM operations by WI.View can make things faster. In the styles sidebar, frequent DOM updates only happen when editing properties and they don't use WI.View anyway. WI.View has also introduced Bug 179291 - Web Inspector: Styles Redesign: flashing when switching between nodes. I'd rather not remove WI.View from the styles sidebar entirely, since it provides `detached` method that is used in WI.SpreadsheetCSSStyleDeclarationEditor. However, it would be nice to have a synchronous mode for WI.VIew.
Blaze Burg
Comment 11 2017-12-06 14:57:43 PST
Comment on attachment 328284 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=328284&action=review >> Source/WebInspectorUI/ChangeLog:12 >> + the filtered text was matched up the chain, applying the correct style classes along the way. > > Unfortunately, asynchronous nature of WI.View makes things more complicated than they should be. > > In some cases, batching DOM operations by WI.View can make things faster. In the styles sidebar, frequent DOM updates only happen when editing properties and they don't use WI.View anyway. > > WI.View has also introduced Bug 179291 - Web Inspector: Styles Redesign: flashing when switching between nodes. > > I'd rather not remove WI.View from the styles sidebar entirely, since it provides `detached` method that is used in WI.SpreadsheetCSSStyleDeclarationEditor. However, it would be nice to have a synchronous mode for WI.VIew. Is there some reason we cannot filter based on the model data rather than screwing around with the DOM views we created?
Note You need to log in before you can comment on or make changes to this bug.