[Webkit-unassigned] [Bug 33803] Web Inspector: PanelEnablerView._windowResized is slow, called even when the view is hidden

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 19 07:19:01 PST 2010


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





--- Comment #5 from Alexander Pavlov (apavlov) <apavlov at chromium.org>  2010-01-19 07:18:59 PST ---
(In reply to comment #4)
> (From update of attachment 46833 [details])
> 
> >      resize: function()
> >      {
> >          this.updateGraphDividersIfNeeded();
> > +        WebInspector.Panel.prototype.resize.call(this);
> >      },
> 
> We should call the prototype first if there isn't a good reason to call it
> last. And I like to seperate them by a blank line to distinguish it.

Looks fine here, although if we want to handle the resize event in the general
case, it should be done AFTER all "left" and "width" properties have been set
(which is usually done in subclasses), otherwise there is no "resize" when the
splitter is dragged.

I believe a better alternative would be for the Panel ancestors to invoke
resize() manually from updateMainViewWidth() if need be (i.e. if the view is
using absolute positioning).

> 
> >          this.updateSidebarWidth();
> > +
> > +        if (this._delayedResize) {
> > +            this._delayedResize = false;
> > +            this.resize();
> > +        }
> 
> There isn't a need for the _delayedResize code, since resize is only called on
> the currentPanel. And updateSidebarWidth does a resize.

Done.

> >          this.updateMainViewWidth(width);
> >
> > -        var visibleView = this.visibleView;
> > -        if (visibleView && "resize" in visibleView)
> > -            visibleView.resize();
> > +        WebInspector.Panel.prototype.resize.call(this);
> 
> I think we should add the visibleView resize code to updateMainViewWidth, and
> just make Panel.prototype.resize call updateMainViewWidth.

What should be the "width" argument to updateMainViewWidth in this case?
this._currentSidebarWidth?
Also, it becomes sooooo slooow... Consider DataGrid.updateWidths() which sets
all column widths in percent, yet it needs to reiterate that on every sidebar
resize which, due to the slowness, makes the resizing process extremely abrupt 
-> poor usability.

> Then this code wouldn't be needed, since updateMainViewWidth is called right
> before it.

Done.

> We want subclasses of updateMainViewWidth to call the Panel prototype then.

Done.

> > +    resize: function()
> > +    {
> > +        if (!this.visible) {
> > +            this._delayedResize = true;
> > +            return;
> > +        }
> 
> I don't think the delayed resize code is needed.

Done.

> Is the Welcome view and Enabler view the visibleView? Where is that handled? I
> don't think it is. The visibleView is only used by the data views.

Yes, I cancelled the review due to 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