Bug 126667

Summary: Web Inspector: Update the current WebInspector.TimelineView when time range changes
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: Web InspectorAssignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal CC: graouts, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch joepeck: review+, timothy: commit-queue-

Description Timothy Hatcher 2014-01-08 14:50:28 PST
When the TimelineOverview time selection changes, update the current TimelineView.
Comment 1 Timothy Hatcher 2014-01-08 15:06:52 PST
Created attachment 220671 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2014-01-08 15:07:23 PST
<rdar://problem/15776691>
Comment 3 Radar WebKit Bug Importer 2014-01-08 15:08:33 PST
<rdar://problem/15776693>
Comment 4 Joseph Pecoraro 2014-01-08 15:20:39 PST
Comment on attachment 220671 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/TimelineContentView.js:196
> +        var endTime = Math.max(WebInspector.timelineManager.recording.endTime || startTime, startTime);

Hmm, this doesn't sound right. Maybe the "|| startTime" should just go away, no?

> Source/WebInspectorUI/UserInterface/TimelineOverview.js:167
> +        // Update all ruler element to the new required width.

Typo: "all ruler" => "ruler"

> Source/WebInspectorUI/UserInterface/TimelineView.js:169
> +        this._scheduledLayoutUpdateIdentifier = requestAnimationFrame(this.updateLayout.bind(this));

How often will we updateLayout? Maybe we should cache an updateLayout.bind(this) to prevent function creation churn?
Comment 5 Timothy Hatcher 2014-01-09 13:16:47 PST
Comment on attachment 220671 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/TimelineContentView.js:196
>> +        var endTime = Math.max(WebInspector.timelineManager.recording.endTime || startTime, startTime);
> 
> Hmm, this doesn't sound right. Maybe the "|| startTime" should just go away, no?

I meant to revet this line. At one point I had other doe in there for the Math.max. Now WebInspector.timelineManager.recording.endTime is always what I want.

>> Source/WebInspectorUI/UserInterface/TimelineView.js:169
>> +        this._scheduledLayoutUpdateIdentifier = requestAnimationFrame(this.updateLayout.bind(this));
> 
> How often will we updateLayout? Maybe we should cache an updateLayout.bind(this) to prevent function creation churn?

Good idea. I'll do that in a follow up with all the places this happens.
Comment 6 Timothy Hatcher 2014-01-20 19:03:18 PST
https://trac.webkit.org/changeset/162411