Summary: | Web Inspector: refactor TimelineDecorations into TimelineRuler | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Timothy Hatcher <timothy> | ||||
Component: | Web Inspector | Assignee: | 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
Timothy Hatcher
2013-12-13 13:35:38 PST
Created attachment 219196 [details]
Patch
Comment on attachment 219196 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=219196&action=review r=me > Source/WebInspectorUI/UserInterface/TimelineRuler.js:46 > + this._allowsClippedLabels = false; I would include "this._endTimePinned = false" up here with the list of other member variables that don't get `delete`d. > Source/WebInspectorUI/UserInterface/TimelineRuler.js:165 > + return this._secondsPerPixel; Should this _recalculate before returning a value? Someone could call _needsLayout, but that only updates this member variable after a rAF. So if someone set endTime then checked secondsPerPixel it could be wrong. > Source/WebInspectorUI/UserInterface/TimelineRuler.js:248 > + var newLeftPosition = ((dividerTime - this._startTime) / duration); Style: unnecessary extra parens > Source/WebInspectorUI/UserInterface/TimelineRuler.js:254 > + removeDividerAndSelectNext(); > + continue; Is it necessary to remove divider and select next? Why not just continue, and keep to reuse the current divider? Extra dividers are removed after this loop anyways (lines 284-285). > Source/WebInspectorUI/UserInterface/TimelineRuler.js:264 > + removeDividerAndSelectNext(); > + continue; Ditto. |