Summary: | Web Inspector: ResourceCookiesView.resize() missing | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andrey Kosyakov <caseq> | ||||||
Component: | Web Inspector (Deprecated) | Assignee: | Andrey Kosyakov <caseq> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | apavlov, bweinstein, commit-queue, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys | ||||||
Priority: | P2 | Keywords: | Regression | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Andrey Kosyakov
2011-06-01 09:49:46 PDT
Created attachment 95615 [details]
patch
Comment on attachment 95615 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=95615&action=review > Source/WebCore/inspector/front-end/ResourceCookiesView.js:64 > + this._cookiesTable.updateWidths(); Can resize() be called before show()? I.e. are you missing the null check here? (In reply to comment #2) > (From update of attachment 95615 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=95615&action=review > > > Source/WebCore/inspector/front-end/ResourceCookiesView.js:64 > > + this._cookiesTable.updateWidths(); > > Can resize() be called before show()? I.e. are you missing the null check here? So far we only call it in case the view is already visible (http://www.google.com/codesearch?hl=en&vert=chromium&lr=&q=cookiesView.resize&sbtn=Search). Whether we should do a guard check for future usages is a matter of taste -- I'd rather not. We shouldn't be resizing something that we're not showing at the moment. Comment on attachment 95615 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=95615&action=review >>> Source/WebCore/inspector/front-end/ResourceCookiesView.js:64 >>> + this._cookiesTable.updateWidths(); >> >> Can resize() be called before show()? I.e. are you missing the null check here? > > So far we only call it in case the view is already visible (http://www.google.com/codesearch?hl=en&vert=chromium&lr=&q=cookiesView.resize&sbtn=Search). Whether we should do a guard check for future usages is a matter of taste -- I'd rather not. We shouldn't be resizing something that we're not showing at the moment. ResourceCookiesView inherits from View, so it should probably behave as a view. Views can get resize signals at any time while visible. I don't see synchronous correlation between showing view and getting this._cookiesTable assigned. In fact, if our tabbed pane was properly implemented and did delegate resize to the tabs, your code would fail on the cookie-less resource resize, right? Created attachment 95750 [details]
patch
Comment on attachment 95750 [details]
patch
We probably still want to fix tabbed pane so that it was a view and was calling resize of the selected view...
Comment on attachment 95750 [details] patch Clearing flags on attachment: 95750 Committed r87981: <http://trac.webkit.org/changeset/87981> All reviewed patches have been landed. Closing bug. |