Title: [171721] trunk/Source/WebInspectorUI
- Revision
- 171721
- Author
- commit-qu...@webkit.org
- Date
- 2014-07-28 21:17:46 -0700 (Mon, 28 Jul 2014)
Log Message
Web Inspector: Incorrectly sized TimelineDataGrid event bubble
https://bugs.webkit.org/show_bug.cgi?id=135371
Patch by Joseph Pecoraro <pecor...@apple.com> on 2014-07-28
Reviewed by Timothy Hatcher.
Previously the secondsPerPixel calculation was relying on an element
that may not be sized yet. This was resulting in a visibleWidth of 0
and resulted in secondsPerPixel being Infinity. Fortunately, the
graph data source already knows the secondsPerPixel so we can just
ask it. Getting the correct value and eliminating forced layouts.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype.get secondsPerPixel):
* UserInterface/Views/TimelineDataGridNode.js:
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (171720 => 171721)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-07-29 04:14:39 UTC (rev 171720)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-07-29 04:17:46 UTC (rev 171721)
@@ -1,5 +1,22 @@
2014-07-28 Joseph Pecoraro <pecor...@apple.com>
+ Web Inspector: Incorrectly sized TimelineDataGrid event bubble
+ https://bugs.webkit.org/show_bug.cgi?id=135371
+
+ Reviewed by Timothy Hatcher.
+
+ Previously the secondsPerPixel calculation was relying on an element
+ that may not be sized yet. This was resulting in a visibleWidth of 0
+ and resulted in secondsPerPixel being Infinity. Fortunately, the
+ graph data source already knows the secondsPerPixel so we can just
+ ask it. Getting the correct value and eliminating forced layouts.
+
+ * UserInterface/Views/OverviewTimelineView.js:
+ (WebInspector.OverviewTimelineView.prototype.get secondsPerPixel):
+ * UserInterface/Views/TimelineDataGridNode.js:
+
+2014-07-28 Joseph Pecoraro <pecor...@apple.com>
+
Web Inspector: Reduce work creating the initial WebInspector.TimelineRecordBar
https://bugs.webkit.org/show_bug.cgi?id=135373
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/OverviewTimelineView.js (171720 => 171721)
--- trunk/Source/WebInspectorUI/UserInterface/Views/OverviewTimelineView.js 2014-07-29 04:14:39 UTC (rev 171720)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/OverviewTimelineView.js 2014-07-29 04:17:46 UTC (rev 171721)
@@ -69,6 +69,11 @@
return WebInspector.UIString("Timeline Events");
},
+ get secondsPerPixel()
+ {
+ return this._timelineRuler.secondsPerPixel;
+ },
+
shown: function()
{
WebInspector.TimelineView.prototype.shown.call(this);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js (171720 => 171721)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js 2014-07-29 04:14:39 UTC (rev 171720)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js 2014-07-29 04:17:46 UTC (rev 171721)
@@ -236,12 +236,9 @@
if (!this.revealed)
return;
- var startTime = this._graphDataSource.startTime;
- var currentTime = this._graphDataSource.currentTime;
- var endTime = this._graphDataSource.endTime;
- var duration = endTime - startTime;
- var visibleWidth = this._graphContainerElement.offsetWidth;
- var secondsPerPixel = duration / visibleWidth;
+ var secondsPerPixel = this._graphDataSource.secondsPerPixel;
+ console.assert(isFinite(secondsPerPixel) && secondsPerPixel > 0);
+
var recordBarIndex = 0;
function createBar(records, renderMode)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes