Bug 127145 - Web Inspector: Improve TimelineOverview by not putting TimelineRuler in a scroll area
Summary: Web Inspector: Improve TimelineOverview by not putting TimelineRuler in a scr...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Timothy Hatcher
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-01-16 14:43 PST by Timothy Hatcher
Modified: 2014-01-20 19:04 PST (History)
4 users (show)

See Also:


Attachments
Patch (12.22 KB, patch)
2014-01-16 14:56 PST, Timothy Hatcher
joepeck: review+
timothy: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2014-01-16 14:43:51 PST
Separate the TimelineRuler and the scrolling. This keep long running or highly zoomed recordings fast by not having a super wide elements in a scroll container.
Comment 1 Timothy Hatcher 2014-01-16 14:51:57 PST
<rdar://problem/15839667>
Comment 2 Timothy Hatcher 2014-01-16 14:56:39 PST
Created attachment 221417 [details]
Patch
Comment 3 Joseph Pecoraro 2014-01-17 12:22:45 PST
Comment on attachment 221417 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/TimelineOverview.js:178
> +        this.scrollStartTime = marker.time - (this.visibleDuration / 2);

Maybe in the future we can be a bit smarter here and reveal the entire marker if it fits in the overview with some padding. Currently this attempts to center the marker? That sounds like a good default.

> Source/WebInspectorUI/UserInterface/TimelineOverview.js:266
> +        if (Math.abs(event.deltaX) >= Math.abs(event.deltaY) * 0.5) {
> +            // Clone the event to dispatch it on the scroll container. Mark it as cloned so we don't get into a loop.
> +            var newWheelEvent = new event.constructor(event.type, event);
> +            newWheelEvent.__cloned = true;

Clever!
Comment 4 Timothy Hatcher 2014-01-17 19:48:58 PST
Comment on attachment 221417 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/TimelineOverview.js:178
>> +        this.scrollStartTime = marker.time - (this.visibleDuration / 2);
> 
> Maybe in the future we can be a bit smarter here and reveal the entire marker if it fits in the overview with some padding. Currently this attempts to center the marker? That sounds like a good default.

Yeah it tries to center. In practice it is on;y used for the current time marker, and that pins to the right because it is always the end time.
Comment 5 Timothy Hatcher 2014-01-20 19:04:50 PST
https://trac.webkit.org/changeset/162417