Title: [111691] trunk/Source/WebCore
- Revision
- 111691
- Author
- ca...@chromium.org
- Date
- 2012-03-22 07:29:39 -0700 (Thu, 22 Mar 2012)
Log Message
Web Inspector: only update timeline overview categories strips when these are visible
https://bugs.webkit.org/show_bug.cgi?id=81903
Reviewed by Pavel Feldman.
- factor out category strips update into a separate method;
- only invoke it when "Timeline" overview mode is selected.
* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineOverviewPane.prototype._showTimelines):
(WebInspector.TimelineOverviewPane.prototype.update):
(WebInspector.TimelineOverviewPane.prototype._updateCategoryStrips):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (111690 => 111691)
--- trunk/Source/WebCore/ChangeLog 2012-03-22 14:25:13 UTC (rev 111690)
+++ trunk/Source/WebCore/ChangeLog 2012-03-22 14:29:39 UTC (rev 111691)
@@ -1,3 +1,18 @@
+2012-03-22 Andrey Kosyakov <ca...@chromium.org>
+
+ Web Inspector: only update timeline overview categories strips when these are visible
+ https://bugs.webkit.org/show_bug.cgi?id=81903
+
+ Reviewed by Pavel Feldman.
+
+ - factor out category strips update into a separate method;
+ - only invoke it when "Timeline" overview mode is selected.
+
+ * inspector/front-end/TimelineOverviewPane.js:
+ (WebInspector.TimelineOverviewPane.prototype._showTimelines):
+ (WebInspector.TimelineOverviewPane.prototype.update):
+ (WebInspector.TimelineOverviewPane.prototype._updateCategoryStrips):
+
2012-03-22 Levi Weintraub <le...@chromium.org>
Update LayoutUnit usage in FrameSelection
Modified: trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js (111690 => 111691)
--- trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js 2012-03-22 14:25:13 UTC (rev 111690)
+++ trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js 2012-03-22 14:29:39 UTC (rev 111691)
@@ -138,6 +138,7 @@
this._heapGraph.hide();
this._setVerticalOverview(this._currentMode === WebInspector.TimelineOverviewPane.Mode.EventsVertical);
this._overviewGrid.itemsGraphsElement.removeStyleClass("hidden");
+ this._updateCategoryStrips(this._presentationModel.rootRecord().children);
this.dispatchEventToListeners(WebInspector.TimelineOverviewPane.Events.ModeChanged, this._currentMode);
},
@@ -184,14 +185,6 @@
update: function(showShortEvents)
{
this._showShortEvents = showShortEvents;
- // Clear summary bars.
- var timelines = {};
- for (var category in this._presentationModel.categories) {
- timelines[category] = [];
- this._categoryGraphs[category].clearChunks();
- }
-
- // Create sparse arrays with 101 cells each to fill with chunks for a given category.
this._overviewCalculator.reset();
function updateBoundaries(record)
@@ -203,6 +196,26 @@
var records = this._presentationModel.rootRecord().children;
WebInspector.TimelinePanel.forAllRecords(records, updateBoundaries.bind(this));
+ if (this._heapGraph.visible) {
+ this._heapGraph.setSize(this._overviewGrid.element.offsetWidth, 60);
+ this._heapGraph.update(records);
+ } else if (this._verticalOverview)
+ this._verticalOverview.update(records);
+ else
+ this._updateCategoryStrips(records);
+ this._overviewGrid.updateDividers(true, this._overviewCalculator);
+ },
+
+ _updateCategoryStrips: function(records)
+ {
+ // Clear summary bars.
+ var timelines = {};
+ for (var category in this._presentationModel.categories) {
+ timelines[category] = [];
+ this._categoryGraphs[category].clearChunks();
+ }
+
+ // Create sparse arrays with 101 cells each to fill with chunks for a given category.
function markPercentagesForRecord(record)
{
if (!(this._showShortEvents || record.isLong()))
@@ -238,12 +251,6 @@
}
}
- this._heapGraph.setSize(this._overviewGrid.element.offsetWidth, 60);
- if (this._heapGraph.visible)
- this._heapGraph.update(records);
- if (this._verticalOverview)
- this._verticalOverview.update(records);
- this._overviewGrid.updateDividers(true, this._overviewCalculator);
},
updateEventDividers: function(records, dividerConstructor)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes