Bug 113138 - Web Inspector: OverviewGrid. Dragged window may change its width due to accumulating rounding error
Summary: Web Inspector: OverviewGrid. Dragged window may change its width due to accum...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Ilya Tikhonovsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-23 09:51 PDT by Ilya Tikhonovsky
Modified: 2013-03-26 04:26 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.76 KB, patch)
2013-03-23 09:57 PDT, Ilya Tikhonovsky
no flags Details | Formatted Diff | Diff
Patch (4.61 KB, patch)
2013-03-26 01:06 PDT, Ilya Tikhonovsky
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Tikhonovsky 2013-03-23 09:51:03 PDT
use case:
record a timeline
select small window in overview pane
drag it slowly

patch to follow
Comment 1 Ilya Tikhonovsky 2013-03-23 09:57:48 PDT
Created attachment 194709 [details]
Patch
Comment 2 Pavel Feldman 2013-03-25 01:07:53 PDT
Comment on attachment 194709 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        The old version had problem with rounding because it recalculates the window size on each event.

Why would this be a problem?

> Source/WebCore/inspector/front-end/OverviewGrid.js:320
> +        var delta = (event.pageX - this._dragStartPoint) / this._parentElement.clientWidth;

I am not sure we need more complexity in this code.
Comment 3 Ilya Tikhonovsky 2013-03-26 01:06:13 PDT
Created attachment 195025 [details]
Patch
Comment 4 Ilya Tikhonovsky 2013-03-26 01:16:33 PDT
(In reply to comment #2)
> (From update of attachment 194709 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=194709&action=review
> 
> > Source/WebCore/ChangeLog:8
> > +        The old version had problem with rounding because it recalculates the window size on each event.
> 
> Why would this be a problem?

As we found in the offline discussion the rounding was the root of problem.

> 
> > Source/WebCore/inspector/front-end/OverviewGrid.js:320
> > +        var delta = (event.pageX - this._dragStartPoint) / this._parentElement.clientWidth;
> 
> I am not sure we need more complexity in this code.

I eliminated moveWindow code so the code became clear.
Comment 5 Ilya Tikhonovsky 2013-03-26 04:26:06 PDT
Committed r146866: <http://trac.webkit.org/changeset/146866>