Title: [146858] trunk/Source/WebCore
Revision
146858
Author
loi...@chromium.org
Date
2013-03-26 01:20:18 -0700 (Tue, 26 Mar 2013)

Log Message

Web Inspector: [FlameChart] Make function bar highlighted consistent with cursor.
https://bugs.webkit.org/show_bug.cgi?id=113266.

Patch by Pan Deng <pan.d...@intel.com> on 2013-03-26
Reviewed by Vsevolod Vlasov.

In Flamechart, the highlighted function bar is not consistent with cursor sometimes,
reason is that time range that converted from cursor position is truncated by floor.
Actually float value is expected to compare with function startTime and duration.

No new tests.

* inspector/front-end/FlameChart.js:
(WebInspector.FlameChart.prototype._coordinatesToNodeIndex): Remove floor

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (146857 => 146858)


--- trunk/Source/WebCore/ChangeLog	2013-03-26 08:09:26 UTC (rev 146857)
+++ trunk/Source/WebCore/ChangeLog	2013-03-26 08:20:18 UTC (rev 146858)
@@ -1,3 +1,19 @@
+2013-03-26  Pan Deng  <pan.d...@intel.com>
+
+        Web Inspector: [FlameChart] Make function bar highlighted consistent with cursor.
+        https://bugs.webkit.org/show_bug.cgi?id=113266.
+
+        Reviewed by Vsevolod Vlasov.
+
+        In Flamechart, the highlighted function bar is not consistent with cursor sometimes, 
+        reason is that time range that converted from cursor position is truncated by floor. 
+        Actually float value is expected to compare with function startTime and duration.
+
+        No new tests.
+
+        * inspector/front-end/FlameChart.js:
+        (WebInspector.FlameChart.prototype._coordinatesToNodeIndex): Remove floor
+
 2013-03-26  Mihnea Ovidenie  <mih...@adobe.com>
 
         [CSSRegions]: Crash accessing offsetParent for contentNodes inside a flow thread

Modified: trunk/Source/WebCore/inspector/front-end/FlameChart.js (146857 => 146858)


--- trunk/Source/WebCore/inspector/front-end/FlameChart.js	2013-03-26 08:09:26 UTC (rev 146857)
+++ trunk/Source/WebCore/inspector/front-end/FlameChart.js	2013-03-26 08:20:18 UTC (rev 146858)
@@ -451,7 +451,7 @@
         if (!timelineData)
             return -1;
         var timelineEntries = timelineData.entries;
-        var cursorTime = Math.floor((x + this._pixelWindowLeft) * this._pixelToTime);
+        var cursorTime = (x + this._pixelWindowLeft) * this._pixelToTime;
         var cursorLevel = Math.floor((this._canvas.height - y) / this._barHeight);
 
         for (var i = 0; i < timelineEntries.length; ++i) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to