[Webkit-unassigned] [Bug 28269] Inspector: Improve Cookie DataGrid to Show Hidden Data

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 13 21:27:14 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=28269





--- Comment #7 from Joseph Pecoraro <joepeck02 at gmail.com>  2009-08-13 21:27:14 PDT ---
(In reply to comment #6)
> (From update of attachment 34805 [details])
> 
> > +    this._useFallback = typeof InspectorController.cookies() === "undefined";
> 
> This should be use typeof. We have had this talk before. :)

It does use typeof =)

> This does seem expensive for the case when it is implemented, sicne you get the
> cookie array twice. Maybe you can store the cookies here for use later. Or
> delate this until the first update is done?

Since there is no event when cookies change, InspectorController.cookies() is
called every time the datagrid is refreshed/updated, this way if some
javascript on the page added/removed a cookie, it would be reflected in the
next DataGrid update.  If I store it here, when the Panel is created, if any
cookies were added via the Console or the Page it wouldn't be reflected in the
first draw (when the user first clicks the Cookie Sidebar Section).

> > +            cookies.push(new WebInspector.Cookie(cookie.name, cookie.value, cookie.domain, cookie.path, cookie.expires, cookie.size, cookie.httpOnly, cookie.secure, cookie.session));
> 
> We don't need to use WebInspector.Cookie except for the fallback case. You can
> just directly use the cookie objects in the aray.
> 
> > +                cookies.push(new WebInspector.Cookie(name, value, null, null, null, size));
> 
> Maybe we can remove WebInspector.Cookie and just make inline objects to fake a
> cookie. So:
> 
> cookies.push({name: name, value: value});

Sounds good, I'll remove WebInspector.Cookie.

> > +        if (String([cookie name]) == cookieName) {
> 
> This should be written the other way so you don't convert each cookie's name to
> C++.
> 
> Convert cookieName once to NSString * before the loop. Then do:
> 
> if ([[cookie name] isEqualToString:cookieNameString])

Okay.  I'll take a swing at this!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list