Title: [119902] trunk/Source/WebCore
Revision
119902
Author
[email protected]
Date
2012-06-09 06:18:08 -0700 (Sat, 09 Jun 2012)

Log Message

Web Inspector: [refactoring] rename TimelineVerticalOverview into TimelineFrameOverview
https://bugs.webkit.org/show_bug.cgi?id=88708

Reviewed by Vsevolod Vlasov.

- rename TimelineVerticalOverview to TimelineFrameOverview;
- rename associated fields, parameters, CSS classes etc;
- rename overview mode designators to match the UI;
- drop unused CSS rules for old-style mode selector;

* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineOverviewPane):
(WebInspector.TimelineOverviewPane.prototype._showEvents):
(WebInspector.TimelineOverviewPane.prototype._showFrames):
(WebInspector.TimelineOverviewPane.prototype._showMemoryGraph):
(WebInspector.TimelineOverviewPane.prototype._setFrameMode):
(WebInspector.TimelineOverviewPane.prototype._onCategoryVisibilityChanged):
(WebInspector.TimelineOverviewPane.prototype._update):
(WebInspector.TimelineOverviewPane.prototype.addFrame):
(WebInspector.TimelineOverviewPane.prototype.zoomToFrame):
(WebInspector.TimelineOverviewPane.prototype._reset):
(WebInspector.TimelineOverviewPane.prototype._onWindowChanged):
(WebInspector.TimelineFrameOverview):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel):
(WebInspector.TimelinePanel.prototype._shouldShowFrames):
(WebInspector.TimelinePanel.prototype.revealRecordAt):
* inspector/front-end/timelinePanel.css:
(.timeline-frame-overview #timeline-overview-grid):
(.timeline-frame-overview .timeline-overview-window):
(.timeline-frame-overview .timeline-overview-dividers-background):
(.timeline-frame-overview #timeline-overview-memory):
(.timeline-frame-overview-status-bar-item.toggled-on .glyph):
(.timeline-frame-overview-bars):
(.timeline.timeline-frame-overview .resources-divider):
(.sidebar-tree-item .timeline-frame-overview-status-bar-item):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (119901 => 119902)


--- trunk/Source/WebCore/ChangeLog	2012-06-09 12:01:18 UTC (rev 119901)
+++ trunk/Source/WebCore/ChangeLog	2012-06-09 13:18:08 UTC (rev 119902)
@@ -1,3 +1,42 @@
+2012-06-09  Andrey Kosyakov  <[email protected]>
+
+        Web Inspector: [refactoring] rename TimelineVerticalOverview into TimelineFrameOverview
+        https://bugs.webkit.org/show_bug.cgi?id=88708
+
+        Reviewed by Vsevolod Vlasov.
+
+        - rename TimelineVerticalOverview to TimelineFrameOverview;
+        - rename associated fields, parameters, CSS classes etc;
+        - rename overview mode designators to match the UI;
+        - drop unused CSS rules for old-style mode selector;
+
+        * inspector/front-end/TimelineOverviewPane.js:
+        (WebInspector.TimelineOverviewPane):
+        (WebInspector.TimelineOverviewPane.prototype._showEvents):
+        (WebInspector.TimelineOverviewPane.prototype._showFrames):
+        (WebInspector.TimelineOverviewPane.prototype._showMemoryGraph):
+        (WebInspector.TimelineOverviewPane.prototype._setFrameMode):
+        (WebInspector.TimelineOverviewPane.prototype._onCategoryVisibilityChanged):
+        (WebInspector.TimelineOverviewPane.prototype._update):
+        (WebInspector.TimelineOverviewPane.prototype.addFrame):
+        (WebInspector.TimelineOverviewPane.prototype.zoomToFrame):
+        (WebInspector.TimelineOverviewPane.prototype._reset):
+        (WebInspector.TimelineOverviewPane.prototype._onWindowChanged):
+        (WebInspector.TimelineFrameOverview):
+        * inspector/front-end/TimelinePanel.js:
+        (WebInspector.TimelinePanel):
+        (WebInspector.TimelinePanel.prototype._shouldShowFrames):
+        (WebInspector.TimelinePanel.prototype.revealRecordAt):
+        * inspector/front-end/timelinePanel.css:
+        (.timeline-frame-overview #timeline-overview-grid):
+        (.timeline-frame-overview .timeline-overview-window):
+        (.timeline-frame-overview .timeline-overview-dividers-background):
+        (.timeline-frame-overview #timeline-overview-memory):
+        (.timeline-frame-overview-status-bar-item.toggled-on .glyph):
+        (.timeline-frame-overview-bars):
+        (.timeline.timeline-frame-overview .resources-divider):
+        (.sidebar-tree-item .timeline-frame-overview-status-bar-item):
+
 2012-06-08  Vsevolod Vlasov  <[email protected]>
 
         IndexedDB: Inspector should handle null, string, and array keyPaths

Modified: trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js (119901 => 119902)


--- trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js	2012-06-09 12:01:18 UTC (rev 119901)
+++ trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js	2012-06-09 13:18:08 UTC (rev 119902)
@@ -70,7 +70,7 @@
     topPaneSidebarTree.appendChild(memoryOverviewItem);
     memoryOverviewItem._onselect_ = this._showMemoryGraph.bind(this);
 
-    this._currentMode = WebInspector.TimelineOverviewPane.Mode.EventsHorizontal;
+    this._currentMode = WebInspector.TimelineOverviewPane.Mode.Events;
 
     this._overviewContainer = this.element.createChild("div", "fill");
     this._overviewContainer.id = "timeline-overview-container";
@@ -113,8 +113,8 @@
 WebInspector.TimelineOverviewPane.ResizerOffset = 3.5; // half pixel because offset values are not rounded but ceiled
 
 WebInspector.TimelineOverviewPane.Mode = {
-    EventsVertical: "EventsVertical",
-    EventsHorizontal: "EventsHorizontal",
+    Events: "Events",
+    Frames: "Frames",
     Memory: "Memory"
 };
 
@@ -136,29 +136,29 @@
 
     _showEvents: function()
     {
-        if (this._currentMode === WebInspector.TimelineOverviewPane.Mode.EventsHorizontal)
+        if (this._currentMode === WebInspector.TimelineOverviewPane.Mode.Events)
             return;
         this._heapGraph.hide();
-        this._setVerticalOverview(false);
+        this._setFrameMode(false);
         this._overviewGrid.itemsGraphsElement.removeStyleClass("hidden");
-        this._setMode(WebInspector.TimelineOverviewPane.Mode.EventsHorizontal);
+        this._setMode(WebInspector.TimelineOverviewPane.Mode.Events);
     },
 
     _showFrames: function()
     {
-        if (this._currentMode === WebInspector.TimelineOverviewPane.Mode.EventsVertical)
+        if (this._currentMode === WebInspector.TimelineOverviewPane.Mode.Frames)
             return;
         this._heapGraph.hide();
-        this._setVerticalOverview(true);
+        this._setFrameMode(true);
         this._overviewGrid.itemsGraphsElement.removeStyleClass("hidden");
-        this._setMode(WebInspector.TimelineOverviewPane.Mode.EventsVertical);
+        this._setMode(WebInspector.TimelineOverviewPane.Mode.Frames);
     },
 
     _showMemoryGraph: function()
     {
         if (this._currentMode === WebInspector.TimelineOverviewPane.Mode.Memory)
             return;
-        this._setVerticalOverview(false);
+        this._setFrameMode(false);
         this._overviewGrid.itemsGraphsElement.addStyleClass("hidden");
         this._heapGraph.show();
         this._setMode(WebInspector.TimelineOverviewPane.Mode.Memory);
@@ -171,16 +171,16 @@
         this._update();
     },
 
-    _setVerticalOverview: function(enabled)
+    _setFrameMode: function(enabled)
     {
-        if (!enabled === !this._verticalOverview)
+        if (!enabled === !this._frameOverview)
             return;
         if (enabled) {
-            this._verticalOverview = new WebInspector.TimelineVerticalOverview(this._model);
-            this._verticalOverview.show(this._overviewContainer);
+            this._frameOverview = new WebInspector.TimelineFrameOverview(this._model);
+            this._frameOverview.show(this._overviewContainer);
         } else {
-            this._verticalOverview.detach();
-            this._verticalOverview = null;
+            this._frameOverview.detach();
+            this._frameOverview = null;
             this._overviewGrid.itemsGraphsElement.removeStyleClass("hidden");
             this._categoryStrips.update();
         }
@@ -188,7 +188,7 @@
 
     _onCategoryVisibilityChanged: function(event)
     {
-        if (this._currentMode === WebInspector.TimelineOverviewPane.Mode.EventsHorizontal)
+        if (this._currentMode === WebInspector.TimelineOverviewPane.Mode.Events)
             this._categoryStrips.update();
     },
 
@@ -201,8 +201,8 @@
 
         if (this._heapGraph.visible)
             this._heapGraph.update();
-        else if (this._verticalOverview)
-            this._verticalOverview.update();
+        else if (this._frameOverview)
+            this._frameOverview.update();
         else
             this._categoryStrips.update();
 
@@ -239,7 +239,7 @@
      */
     addFrame: function(frame)
     {
-        this._verticalOverview.addFrame(frame);
+        this._frameOverview.addFrame(frame);
         this._scheduleRefresh();
     },
 
@@ -248,7 +248,7 @@
      */
     zoomToFrame: function(frame)
     {
-        var window = this._verticalOverview.framePosition(frame);
+        var window = this._frameOverview.framePosition(frame);
         if (!window)
             return;
 
@@ -276,8 +276,8 @@
         this._overviewCalculator.reset();
         this._eventDividers = [];
         this._overviewGrid.updateDividers(this._overviewCalculator);
-        if (this._verticalOverview)
-            this._verticalOverview.reset();
+        if (this._frameOverview)
+            this._frameOverview.reset();
         this._update();
     },
 
@@ -311,8 +311,8 @@
 
     _onWindowChanged: function()
     {
-        if (this._verticalOverview) {
-            var times = this._verticalOverview.getWindowTimes(this.windowLeft(), this.windowRight());
+        if (this._frameOverview) {
+            var times = this._frameOverview.getWindowTimes(this.windowLeft(), this.windowRight());
             this._windowStartTime = times.startTime;
             this._windowEndTime = times.endTime;
         } else {
@@ -907,11 +907,11 @@
  * @extends {WebInspector.View}
  * @param {WebInspector.TimelineModel} model
  */
-WebInspector.TimelineVerticalOverview = function(model)
+WebInspector.TimelineFrameOverview = function(model)
 {
     WebInspector.View.call(this);
     this.element = document.createElement("canvas");
-    this.element.className = "timeline-vertical-overview-bars fill";
+    this.element.className = "timeline-frame-overview-bars fill";
     this._model = model;
     this.reset();
 
@@ -930,7 +930,7 @@
         this._fillStyles[category] = WebInspector.TimelinePresentationModel.createFillStyleForCategory(this._context, this._maxInnerBarWidth, 0, categories[category]);
 }
 
-WebInspector.TimelineVerticalOverview.prototype = {
+WebInspector.TimelineFrameOverview.prototype = {
     reset: function()
     {
         this._recordsPerBar = 1;
@@ -1145,4 +1145,4 @@
     }
 }
 
-WebInspector.TimelineVerticalOverview.prototype.__proto__ = WebInspector.View.prototype;
+WebInspector.TimelineFrameOverview.prototype.__proto__ = WebInspector.View.prototype;

Modified: trunk/Source/WebCore/inspector/front-end/TimelinePanel.js (119901 => 119902)


--- trunk/Source/WebCore/inspector/front-end/TimelinePanel.js	2012-06-09 12:01:18 UTC (rev 119901)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePanel.js	2012-06-09 13:18:08 UTC (rev 119902)
@@ -100,7 +100,7 @@
     this._hideShortRecordsTitleText = WebInspector.UIString("Hide the records that are shorter than %s", shortRecordThresholdTitle);
     this._createStatusbarButtons();
 
-    this._verticalOverview = false;
+    this._frameMode = false;
     this._boundariesAreValid = true;
     this._scrollTop = 0;
 
@@ -346,7 +346,7 @@
 
     _shouldShowFrames: function()
     {
-        return this._verticalOverview && this._presentationModel.frames().length > 0 && this.calculator.boundarySpan < 1.0;
+        return this._frameMode && this._presentationModel.frames().length > 0 && this.calculator.boundarySpan < 1.0;
     },
 
     _updateFrames: function()
@@ -405,20 +405,20 @@
     _timelinesOverviewModeChanged: function(event)
     {
         var shouldShowMemory = event.data ="" WebInspector.TimelineOverviewPane.Mode.Memory;
-        var verticalOverview = event.data ="" WebInspector.TimelineOverviewPane.Mode.EventsVertical;
-        if (verticalOverview !== this._verticalOverview) {
-            this._verticalOverview = verticalOverview;
-            this._glueParentButton.disabled = verticalOverview;
-            this._presentationModel.setGlueRecords(this._glueParentButton.toggled && !verticalOverview);
+        var frameMode = event.data ="" WebInspector.TimelineOverviewPane.Mode.Frames;
+        if (frameMode !== this._frameMode) {
+            this._frameMode = frameMode;
+            this._glueParentButton.disabled = frameMode;
+            this._presentationModel.setGlueRecords(this._glueParentButton.toggled && !frameMode);
             this._repopulateRecords();
 
-            if (verticalOverview) {
-                this.element.addStyleClass("timeline-vertical-overview");
+            if (frameMode) {
+                this.element.addStyleClass("timeline-frame-overview");
                 this._frameController = new WebInspector.TimelineFrameController(this._model, this._overviewPane, this._presentationModel);
             } else {
                 this._frameController.dispose();
                 this._frameController = null;
-                this.element.removeStyleClass("timeline-vertical-overview");
+                this.element.removeStyleClass("timeline-frame-overview");
             }
         }
         if (shouldShowMemory === this._memoryStatistics.visible())
@@ -608,8 +608,6 @@
 
     revealRecordAt: function(time)
     {
-        if (this._verticalOverview)
-            return;
         var recordsInWindow = this._presentationModel.filteredRecords();
         var recordToReveal;
         for (var i = 0; i < recordsInWindow.length; ++i) {

Modified: trunk/Source/WebCore/inspector/front-end/timelinePanel.css (119901 => 119902)


--- trunk/Source/WebCore/inspector/front-end/timelinePanel.css	2012-06-09 12:01:18 UTC (rev 119901)
+++ trunk/Source/WebCore/inspector/front-end/timelinePanel.css	2012-06-09 13:18:08 UTC (rev 119902)
@@ -76,7 +76,7 @@
     background-color: rgb(255, 255, 255);
 }
 
-.timeline-vertical-overview #timeline-overview-grid {
+.timeline-frame-overview #timeline-overview-grid {
     display: none;
 }
 
@@ -98,7 +98,7 @@
     z-index: 150;
 }
 
-.timeline-vertical-overview .timeline-overview-window {
+.timeline-frame-overview .timeline-overview-window {
     bottom: 0;
 }
 
@@ -111,7 +111,7 @@
     position: absolute;
 }
 
-.timeline-vertical-overview .timeline-overview-dividers-background {
+.timeline-frame-overview .timeline-overview-dividers-background {
     bottom: 0;
 }
 
@@ -279,7 +279,7 @@
     z-index: 160;
 }
 
-.timeline-vertical-overview #timeline-overview-memory {
+.timeline-frame-overview #timeline-overview-memory {
     display: none;
 }
 
@@ -455,7 +455,7 @@
     -webkit-mask-position: -128px -48px;
 }
 
-.timeline-vertical-overview-status-bar-item.toggled-on .glyph {
+.timeline-frame-overview-status-bar-item.toggled-on .glyph {
     background-color: rgb(66, 129, 235) !important;
 }
 
@@ -608,7 +608,7 @@
     min-height: 15px;
 }
 
-.timeline-vertical-overview-bars {
+.timeline-frame-overview-bars {
     z-index: 200;
     background-color: rgba(255, 255, 255, 0.8);
     width: 100%;
@@ -620,7 +620,7 @@
     bottom: auto;
 }
 
-.timeline.timeline-vertical-overview .resources-divider {
+.timeline.timeline-frame-overview .resources-divider {
     height: 19px;
     bottom: auto;
 }
@@ -631,65 +631,12 @@
     height: 100%;
 }
 
-.sidebar-tree-item .timeline-vertical-overview-status-bar-item {
+.sidebar-tree-item .timeline-frame-overview-status-bar-item {
     position: absolute;
     right: 10px;
     top: 4px;
 }
 
-.timeline-overview-mode-selector {
-    float: right;
-    margin: 5px 10px 5px 10px;
-}
-
-.timeline-overview-mode-selector .glyph {
-    width: 32px;
-    height: 24px;
-    -webkit-mask-image: url(Images/statusbarButtonGlyphs.png);
-}
-
-.timeline-overview-mode-selector button {
-    width: 32px;
-    height: 24px;
-    margin: 0px;
-    border: none;
-    position: relative;
-}
-
-.timeline-overview-mode-selector button.toggled {
-    background-image: -webkit-linear-gradient(top, rgb(80, 80, 80), rgb(140, 140, 140) 3px, rgb(160, 160, 160));
-}
-
-.timeline-overview-mode-selector button:active {
-    background-image: -webkit-linear-gradient(top, rgb(60, 60, 60), rgb(100, 100, 100) 3px, rgb(120, 120, 120));
-}
-
-.sidebar-tree-item:not(.selected) .timeline-overview-mode-selector button {
-    opacity: 0.5;
-}
-
-.sidebar-tree-item:not(.selected) .timeline-overview-mode-selector button.toggled {
-    background-image: -webkit-linear-gradient(top, rgb(120, 120, 120), rgb(200, 200, 200) 3px, rgb(220, 220, 220));
-}
-
-.timeline-overview-mode-selector button:first-of-type {
-    border-top-left-radius: 3px;
-    border-bottom-left-radius: 3px;
-}
-
-.timeline-overview-mode-selector button:last-of-type {
-    border-top-right-radius: 3px;
-    border-bottom-right-radius: 3px;
-}
-
-.timeline-mode-vertical-bars .glyph {
-    -webkit-mask-position: -160px -48px;
-}
-
-.timeline-mode-horizontal-bars .glyph {
-    -webkit-mask-position: -192px -48px;
-}
-
 .timeline-frame-container {
     height: 19px;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to