Bug 126667 - Web Inspector: Update the current WebInspector.TimelineView when time range changes
Summary: Web Inspector: Update the current WebInspector.TimelineView when time range c...
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-08 14:50 PST by Timothy Hatcher
Modified: 2014-01-20 19:03 PST (History)
4 users (show)

See Also:


Attachments
Patch (15.09 KB, patch)
2014-01-08 15:06 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-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