Web Inspector: Selected range path component should be zero time corrected
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Mar 2016 00:39:41 +0000 (00:39 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Mar 2016 00:39:41 +0000 (00:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=154950
<rdar://problem/24947022>

Reviewed by Timothy Hatcher.

Subtracts zero time from TimelineRange start and end values, and corrects
a cosmetic issue in TimelineRuler which showed selection handle tooltips
that weren't adjusted for the ruler's zero time.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):

* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype._updateSelection):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197530 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js
Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js

index a31236b..8862c10 100644 (file)
@@ -1,5 +1,23 @@
 2016-03-03  Matt Baker  <mattbaker@apple.com>
 
+        Web Inspector: Selected range path component should be zero time corrected
+        https://bugs.webkit.org/show_bug.cgi?id=154950
+        <rdar://problem/24947022>
+
+        Reviewed by Timothy Hatcher.
+
+        Subtracts zero time from TimelineRange start and end values, and corrects
+        a cosmetic issue in TimelineRuler which showed selection handle tooltips
+        that weren't adjusted for the ruler's zero time.
+
+        * UserInterface/Views/TimelineRecordingContentView.js:
+        (WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
+
+        * UserInterface/Views/TimelineRuler.js:
+        (WebInspector.TimelineRuler.prototype._updateSelection):
+
+2016-03-03  Matt Baker  <mattbaker@apple.com>
+
         Web Inspector: Events and Frames mode switch does not fully switch until first zoom
         https://bugs.webkit.org/show_bug.cgi?id=154971
         <rdar://problem/24955871>
index 7a5dde9..ac1c239 100644 (file)
@@ -693,8 +693,8 @@ WebInspector.TimelineRecordingContentView = class TimelineRecordingContentView e
             selectedPathComponent = this._entireRecordingPathComponent;
         else {
             let timelineRange = this._timelineSelectionPathComponent.representedObject;
-            timelineRange.startValue = this.currentTimelineView.startTime;
-            timelineRange.endValue = this.currentTimelineView.endTime;
+            timelineRange.startValue = this.currentTimelineView.startTime - this.currentTimelineView.zeroTime;
+            timelineRange.endValue = this.currentTimelineView.endTime - this.currentTimelineView.zeroTime;
 
             this._updateTimeRangePathComponents();
             selectedPathComponent = this._timelineSelectionPathComponent;
index 2638713..f024cfb 100644 (file)
@@ -631,8 +631,8 @@ WebInspector.TimelineRuler = class TimelineRuler extends WebInspector.View
 
         this.element.classList.toggle("both-handles-clamped", startTimeClamped && endTimeClamped);
 
-        let formattedStartTimeText = this._formatDividerLabelText(this._selectionStartTime);
-        let formattedEndTimeText = this._formatDividerLabelText(this._selectionEndTime);
+        let formattedStartTimeText = this._formatDividerLabelText(this._selectionStartTime - this._zeroTime);
+        let formattedEndTimeText = this._formatDividerLabelText(this._selectionEndTime - this._zeroTime);
 
         let newLeftPosition = Number.constrain((this._selectionStartTime - this._startTime) / duration, 0, 1);
         this._updatePositionOfElement(this._leftShadedAreaElement, newLeftPosition, visibleWidth, "width");