Bug 210837

Summary: Web Inspector: Storage: unable to filter cookies
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, hi, inspector-bugzilla-changes, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
[Image] After Patch is applied (Storage Tab)
none
[Image] After Patch is applied (Network Tab)
none
Patch
none
Patch none

Description Devin Rousso 2020-04-21 18:27:09 PDT
# STEPS TO REPRODUCE:
1. inspect any page with cookies
2. press ⌘F to show a filter bar
 => nothing happens :(
Comment 1 Devin Rousso 2020-04-21 18:37:48 PDT
Created attachment 397156 [details]
Patch
Comment 2 Joseph Pecoraro 2020-04-21 20:33:59 PDT
Comment on attachment 397156 [details]
Patch

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

> Source/WebInspectorUI/ChangeLog:44
> +        Drive-by: instead of having the "No Filter Results" view only cover the "Name" column, it
> +                  should cover the entire table so as to be as noticable as possible (not to mention
> +                  the table will be empty anyways, so it's not like anything is being hidden).
> +        Drive-by: ensure that the "No Filter Results" view doesn't cover the statistics.

Could you include screenshots?
Comment 3 Devin Rousso 2020-04-22 09:15:31 PDT
Created attachment 397200 [details]
[Image] After Patch is applied (Storage Tab)
Comment 4 Devin Rousso 2020-04-22 09:15:55 PDT
Created attachment 397201 [details]
[Image] After Patch is applied (Network Tab)
Comment 5 Devin Rousso 2020-04-22 09:22:59 PDT
Created attachment 397203 [details]
Patch

make the text size of the "No Filter Results" match that of other tabs
Comment 6 BJ Burg 2020-04-22 09:37:10 PDT
Comment on attachment 397203 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.css:-2
> - * Copyright (C) 2013 Apple Inc. All rights reserved.

Nit: 2013-2020 ?

> Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.css:26
> +.content-view.cookie-storage > .message-text-view {

Nice. I love how all these variables already exist!

> Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js:439
> +            this._cookies = this._getCookiesForHost(payload.cookies.map(WI.Cookie.fromPayload), this.representedObject.host);

v nice

> Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js:472
> +        if (this._filteredCookies.length || !filterText) {

Nit: I'd put this DOM manipulation into a separate function since everything up until now is maintaining this._filteredCookies. this._updatePlaceholderForSearchResults or something?

> Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js:-1623
> -        this._emptyFilterResultsMessageElement.style.width = width + "px";

Weird.
Comment 7 Devin Rousso 2020-04-22 09:52:46 PDT
Comment on attachment 397203 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.css:-2
>> - * Copyright (C) 2013 Apple Inc. All rights reserved.
> 
> Nit: 2013-2020 ?

Heh, sure :)  Still not 100% sure of all the "rules" for updating copyrights :P

>> Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js:472
>> +        if (this._filteredCookies.length || !filterText) {
> 
> Nit: I'd put this DOM manipulation into a separate function since everything up until now is maintaining this._filteredCookies. this._updatePlaceholderForSearchResults or something?

good idea
Comment 8 Devin Rousso 2020-04-22 09:53:59 PDT
Created attachment 397212 [details]
Patch
Comment 9 EWS 2020-04-22 11:33:36 PDT
Committed r260523: <https://trac.webkit.org/changeset/260523>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 397212 [details].
Comment 10 Radar WebKit Bug Importer 2020-04-22 11:34:17 PDT
<rdar://problem/62199258>