Title: [193076] branches/safari-601-branch/Source/WebInspectorUI
Revision
193076
Author
[email protected]
Date
2015-12-03 10:43:38 -0800 (Thu, 03 Dec 2015)

Log Message

Merge r188192. rdar://problem/23221163

Modified Paths

Diff

Modified: branches/safari-601-branch/Source/WebInspectorUI/ChangeLog (193075 => 193076)


--- branches/safari-601-branch/Source/WebInspectorUI/ChangeLog	2015-12-03 18:43:33 UTC (rev 193075)
+++ branches/safari-601-branch/Source/WebInspectorUI/ChangeLog	2015-12-03 18:43:38 UTC (rev 193076)
@@ -1,5 +1,20 @@
 2015-12-02  Timothy Hatcher  <[email protected]>
 
+        Merge r188192. rdar://problem/23221163
+
+    2015-08-08  Devin Rousso  <[email protected]>
+
+            Web Inspector: Timeline ruler handle tooltip shows wrong value when handles overlap
+            https://bugs.webkit.org/show_bug.cgi?id=147652
+
+            Reviewed by Timothy Hatcher.
+
+            * UserInterface/Views/TimelineRuler.js:
+            (WebInspector.TimelineRuler.prototype._updateSelection):
+            Now changes the title depending on whether the selection start/end is clamped.
+
+2015-12-02  Timothy Hatcher  <[email protected]>
+
         Merge r188191. rdar://problem/23221163
 
     2015-08-08  Devin Rousso  <[email protected]>

Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js (193075 => 193076)


--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js	2015-12-03 18:43:33 UTC (rev 193075)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js	2015-12-03 18:43:38 UTC (rev 193076)
@@ -587,21 +587,27 @@
         if (!this._allowsTimeRangeSelection)
             return;
 
-        var newLeftPosition = Math.max(0, (this._selectionStartTime - this._startTime) / duration);
+        let startTimeClamped = this._selectionStartTime < this._startTime;
+        let endTimeClamped = this._selectionEndTime > this._endTime;
+
+        let formattedStartTimeText = this._formatDividerLabelText(this._selectionStartTime);
+        let formattedEndTimeText = this._formatDividerLabelText(this._selectionEndTime);
+
+        let newLeftPosition = Math.max(0, (this._selectionStartTime - this._startTime) / duration);
         this._updatePositionOfElement(this._leftShadedAreaElement, newLeftPosition, visibleWidth, "width");
         this._updatePositionOfElement(this._leftSelectionHandleElement, newLeftPosition, visibleWidth, "left");
         this._updatePositionOfElement(this._selectionDragElement, newLeftPosition, visibleWidth, "left");
 
-        this._leftSelectionHandleElement.classList.toggle("clamped", this._selectionStartTime < this._startTime);
-        this._leftSelectionHandleElement.title = this._selectionStartTime < this._startTime ? this._formatDividerLabelText(this._selectionStartTime) : "";
+        this._leftSelectionHandleElement.classList.toggle("clamped", startTimeClamped);
+        this._leftSelectionHandleElement.title = startTimeClamped  && this._selectionEndTime < this._startTime ? formattedEndTimeText : formattedStartTimeText;
 
-        var newRightPosition = 1 - Math.min((this._selectionEndTime - this._startTime) / duration, 1);
+        let newRightPosition = 1 - Math.min((this._selectionEndTime - this._startTime) / duration, 1);
         this._updatePositionOfElement(this._rightShadedAreaElement, newRightPosition, visibleWidth, "width");
         this._updatePositionOfElement(this._rightSelectionHandleElement, newRightPosition, visibleWidth, "right");
         this._updatePositionOfElement(this._selectionDragElement, newRightPosition, visibleWidth, "right");
 
-        this._rightSelectionHandleElement.classList.toggle("clamped", this._selectionEndTime > this._endTime);
-        this._rightSelectionHandleElement.title = this._selectionEndTime > this._endTime ? this._formatDividerLabelText(this._selectionEndTime) : "";
+        this._rightSelectionHandleElement.classList.toggle("clamped", endTimeClamped);
+        this._rightSelectionHandleElement.title = endTimeClamped && this._selectionStartTime > this._endTime ? formattedStartTimeText : formattedEndTimeText;
 
         if (!this._selectionDragElement.parentNode) {
             this._element.appendChild(this._selectionDragElement);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to