[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

pfeldman at chromium.org pfeldman at chromium.org
Wed Dec 22 16:34:48 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit e887b067e03360bae5681cc6fb4891aae9deaab5
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 26 12:51:16 2010 +0000

    2010-11-25  Pavel Feldman  <pfeldman at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            Web Inspector: UI polish for Network and Resources panels.
            https://bugs.webkit.org/show_bug.cgi?id=50100
    
            - Fixed timing inconsistencies
            - Made grid user-selectable
            - Selection in network panel is made on name column only
    
            * inspector/front-end/NetworkPanel.js:
            (WebInspector.NetworkPanel):
            (WebInspector.NetworkPanel.prototype._toggleGridMode):
            (WebInspector.NetworkDataGridNode.prototype.createCells):
            (WebInspector.NetworkDataGridNode.prototype.select):
            (WebInspector.NetworkDataGridNode.prototype.get selectable):
            (WebInspector.NetworkDataGridNode.prototype._createTimelineCell):
            (WebInspector.NetworkDataGridNode.prototype.refreshGraph):
            (WebInspector.NetworkDataGridNode.prototype._refreshLabelPositions):
            * inspector/front-end/Popover.js:
            (WebInspector.PopoverHelper):
            (WebInspector.PopoverHelper.prototype.setTimeout):
            (WebInspector.PopoverHelper.prototype._mouseMove):
            (WebInspector.PopoverHelper.prototype._handleMouseAction):
            * inspector/front-end/Resource.js:
            (WebInspector.Resource.prototype.get responseReceivedTime):
            (WebInspector.Resource.prototype.set endTime):
            (WebInspector.Resource.prototype.set timing):
            * inspector/front-end/ResourceManager.js:
            (WebInspector.ResourceManager.prototype.didReceiveResponse):
            (WebInspector.ResourceManager.prototype.didFinishLoading):
            * inspector/front-end/ResourcesPanel.js:
            (WebInspector.FrameResourceTreeElement.prototype._ondragstart):
            * inspector/front-end/networkPanel.css:
            (.network-sidebar .data-grid td:not(.network-summary)):
            (.network-sidebar .data-grid td.name-column):
            (.network.panel:not(.viewing-resource) .network-sidebar td.name-column:hover):
            (.network-timing-row):
            (.network-timing-bar):
            (.network-timing-bar-title):
            (.resource-timing-view):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72758 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4fdd9af..d1fbc79 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,46 @@
+2010-11-25  Pavel Feldman  <pfeldman at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: UI polish for Network and Resources panels.
+        https://bugs.webkit.org/show_bug.cgi?id=50100
+
+        - Fixed timing inconsistencies
+        - Made grid user-selectable
+        - Selection in network panel is made on name column only
+
+        * inspector/front-end/NetworkPanel.js:
+        (WebInspector.NetworkPanel):
+        (WebInspector.NetworkPanel.prototype._toggleGridMode):
+        (WebInspector.NetworkDataGridNode.prototype.createCells):
+        (WebInspector.NetworkDataGridNode.prototype.select):
+        (WebInspector.NetworkDataGridNode.prototype.get selectable):
+        (WebInspector.NetworkDataGridNode.prototype._createTimelineCell):
+        (WebInspector.NetworkDataGridNode.prototype.refreshGraph):
+        (WebInspector.NetworkDataGridNode.prototype._refreshLabelPositions):
+        * inspector/front-end/Popover.js:
+        (WebInspector.PopoverHelper):
+        (WebInspector.PopoverHelper.prototype.setTimeout):
+        (WebInspector.PopoverHelper.prototype._mouseMove):
+        (WebInspector.PopoverHelper.prototype._handleMouseAction):
+        * inspector/front-end/Resource.js:
+        (WebInspector.Resource.prototype.get responseReceivedTime):
+        (WebInspector.Resource.prototype.set endTime):
+        (WebInspector.Resource.prototype.set timing):
+        * inspector/front-end/ResourceManager.js:
+        (WebInspector.ResourceManager.prototype.didReceiveResponse):
+        (WebInspector.ResourceManager.prototype.didFinishLoading):
+        * inspector/front-end/ResourcesPanel.js:
+        (WebInspector.FrameResourceTreeElement.prototype._ondragstart):
+        * inspector/front-end/networkPanel.css:
+        (.network-sidebar .data-grid td:not(.network-summary)):
+        (.network-sidebar .data-grid td.name-column):
+        (.network.panel:not(.viewing-resource) .network-sidebar td.name-column:hover):
+        (.network-timing-row):
+        (.network-timing-bar):
+        (.network-timing-bar-title):
+        (.resource-timing-view):
+
 2010-11-26  Helder Correia  <helder at sencha.com>
 
         Reviewed by Ariya Hidayat.
diff --git a/WebCore/inspector/front-end/NetworkPanel.js b/WebCore/inspector/front-end/NetworkPanel.js
index 75350ca..8f3cfd6 100644
--- a/WebCore/inspector/front-end/NetworkPanel.js
+++ b/WebCore/inspector/front-end/NetworkPanel.js
@@ -72,6 +72,8 @@ WebInspector.NetworkPanel = function()
         this._setLargerResources(WebInspector.settings.resourcesLargeRows);
 
     this._popoverHelper = new WebInspector.PopoverHelper(this.element, this._getPopoverAnchor.bind(this), this._showPopover.bind(this), true);
+    // Enable faster hint.
+    this._popoverHelper.setTimeout(100);
 
     this.calculator = new WebInspector.NetworkTransferTimeCalculator();
     this._filter(this._filterAllElement, false);
@@ -903,6 +905,8 @@ WebInspector.NetworkPanel.prototype = {
             this.sidebarElement.style.right = 0;
             this.sidebarElement.style.removeProperty("width");
             this._summaryBarElement.style.removeProperty("width");
+            if (this._dataGrid.selectedNode)
+                this._dataGrid.selectedNode.selected = false;
         }
 
         if (this._briefGrid) {
@@ -1272,16 +1276,19 @@ WebInspector.NetworkDataGridNode.prototype = {
         this._sizeCell = this._createDivInTD("size");
         this._timeCell = this._createDivInTD("time");
         this._createTimelineCell();
+        this._nameCell.addEventListener("click", this.select.bind(this), false);
     },
 
     select: function()
     {
-        WebInspector.DataGridNode.prototype.select.apply(this, arguments);
         this._panel._showResource(this._resource);
+        WebInspector.DataGridNode.prototype.select.apply(this, arguments);
     },
 
     get selectable()
     {
+        if (!this._panel._viewingResourceMode)
+            return false;
         if (!this._panel._hiddenCategories.all)
             return true;
         if (this._panel._hiddenCategories[this._resource.category.name])
@@ -1303,7 +1310,6 @@ WebInspector.NetworkDataGridNode.prototype = {
     {
         this._graphElement = document.createElement("div");
         this._graphElement.className = "network-graph-side";
-        this._graphElement.addEventListener("mouseover", this._refreshLabelPositions.bind(this), false);
 
         this._barAreaElement = document.createElement("div");
         //    this._barAreaElement.className = "network-graph-bar-area hidden";
@@ -1319,6 +1325,7 @@ WebInspector.NetworkDataGridNode.prototype = {
         this._barRightElement.className = "network-graph-bar";
         this._barAreaElement.appendChild(this._barRightElement);
 
+
         this._labelLeftElement = document.createElement("div");
         this._labelLeftElement.className = "network-graph-label waiting";
         this._barAreaElement.appendChild(this._labelLeftElement);
@@ -1327,6 +1334,8 @@ WebInspector.NetworkDataGridNode.prototype = {
         this._labelRightElement.className = "network-graph-label";
         this._barAreaElement.appendChild(this._labelRightElement);
 
+        this._graphElement.addEventListener("mouseover", this._refreshLabelPositions.bind(this), false);
+
         this._timelineCell = document.createElement("td");
         this._timelineCell.className = "timeline-column";
         this._element.appendChild(this._timelineCell);
@@ -1469,8 +1478,6 @@ WebInspector.NetworkDataGridNode.prototype = {
     refreshGraph: function(calculator)
     {
         var percentages = calculator.computeBarGraphPercentages(this._resource);
-        var labels = calculator.computeBarGraphLabels(this._resource);
-
         this._percentages = percentages;
 
         this._barAreaElement.removeStyleClass("hidden");
@@ -1486,6 +1493,7 @@ WebInspector.NetworkDataGridNode.prototype = {
         this._barLeftElement.style.setProperty("right", (100 - percentages.end) + "%");
         this._barRightElement.style.setProperty("left", percentages.middle + "%");
 
+        var labels = calculator.computeBarGraphLabels(this._resource);
         this._labelLeftElement.textContent = labels.left;
         this._labelRightElement.textContent = labels.right;
 
diff --git a/WebCore/inspector/front-end/Popover.js b/WebCore/inspector/front-end/Popover.js
index 59b48f9..32535e9 100644
--- a/WebCore/inspector/front-end/Popover.js
+++ b/WebCore/inspector/front-end/Popover.js
@@ -155,9 +155,15 @@ WebInspector.PopoverHelper = function(panelElement, getAnchor, showPopup, showOn
     this._onHide = onHide;
     panelElement.addEventListener("mousedown", this._mouseDown.bind(this), false);
     panelElement.addEventListener("mousemove", this._mouseMove.bind(this), false);
+    this.setTimeout(1000);
 }
 
 WebInspector.PopoverHelper.prototype = {
+    setTimeout: function(timeout)
+    {
+         this._timeout = timeout;
+    },
+
     _mouseDown: function(event)
     {
         this._killHidePopupTimer();
@@ -170,7 +176,7 @@ WebInspector.PopoverHelper.prototype = {
         if (this._hoverElement === event.target || (this._hoverElement && this._hoverElement.isAncestor(event.target)))
             return;
 
-        // User has 500ms to reach the popup.
+        // User has 500ms (this._timeout / 2) to reach the popup.
         if (this._popup && !this._hidePopupTimer) {
             var self = this;
             function doHide()
@@ -178,7 +184,7 @@ WebInspector.PopoverHelper.prototype = {
                 self._hidePopup();
                 delete self._hidePopupTimer;
             }
-            this._hidePopupTimer = setTimeout(doHide, 500);
+            this._hidePopupTimer = setTimeout(doHide, this._timeout / 2);
         }
 
         this._handleMouseAction(event);
@@ -192,7 +198,7 @@ WebInspector.PopoverHelper.prototype = {
         if (!this._hoverElement)
             return;
 
-        const toolTipDelay = isMouseDown ? 0 : (this._popup ? 600 : 1000);
+        const toolTipDelay = isMouseDown ? 0 : (this._popup ? this._timeout * 0.6 : this._timeout);
         this._hoverTimer = setTimeout(this._mouseHover.bind(this, this._hoverElement), toolTipDelay);
     },
 
diff --git a/WebCore/inspector/front-end/Resource.js b/WebCore/inspector/front-end/Resource.js
index d0346a2..4217cd6 100644
--- a/WebCore/inspector/front-end/Resource.js
+++ b/WebCore/inspector/front-end/Resource.js
@@ -163,11 +163,6 @@ WebInspector.Resource.prototype = {
 
     get responseReceivedTime()
     {
-        if (this.timing && this.timing.requestTime) {
-            // Calculate responseReceivedTime from timing data for better accuracy.
-            // Timing's requestTime is a baseline in seconds, rest of the numbers there are ticks in millis.
-            return this.timing.requestTime + this.timing.receiveHeadersEnd / 1000.0;
-        }
         return this._responseReceivedTime || -1;
     },
 
@@ -183,13 +178,15 @@ WebInspector.Resource.prototype = {
 
     set endTime(x)
     {
-        // In case of fast load (or in case of cached resources), endTime on network stack
-        // can be less then m_responseReceivedTime measured in WebCore. Normalize it here,
-        // prefer actualEndTime to m_responseReceivedTime.
-        if (x < this.responseReceivedTime)
-            this.responseReceivedTime = x;
-
-        this._endTime = x;
+        if (this.timing && this.timing.requestTime) {
+            // Check against accurate responseReceivedTime.
+            this._endTime = Math.max(x, this.responseReceivedTime);
+        } else {
+            // Prefer endTime since it might be from the network stack.
+            this._endTime = x;
+            if (this._responseReceivedTime > x)
+                this._responseReceivedTime = x;
+        }
     },
 
     get duration()
@@ -300,6 +297,11 @@ WebInspector.Resource.prototype = {
     set timing(x)
     {
         if (!this._cached) {
+            // Take startTime and responseReceivedTime from timing data for better accuracy.
+            // Timing's requestTime is a baseline in seconds, rest of the numbers there are ticks in millis.
+            this._startTime = x.requestTime;
+            this._responseReceivedTime = x.requestTime + x.receiveHeadersEnd / 1000.0;
+
             this._timing = x;
             this.dispatchEventToListeners("timing changed");
         }
diff --git a/WebCore/inspector/front-end/ResourceManager.js b/WebCore/inspector/front-end/ResourceManager.js
index 55147d7..056be8c 100644
--- a/WebCore/inspector/front-end/ResourceManager.js
+++ b/WebCore/inspector/front-end/ResourceManager.js
@@ -141,9 +141,11 @@ WebInspector.ResourceManager.prototype = {
         var resource = this._resourcesById[identifier];
         if (!resource)
             return;
-        this._updateResourceWithResponse(resource, response);
-        resource.type = WebInspector.Resource.Type[resourceType];
+
         resource.responseReceivedTime = time;
+        resource.type = WebInspector.Resource.Type[resourceType];
+
+        this._updateResourceWithResponse(resource, response);
 
         WebInspector.panels.network.refreshResource(resource);
         this._resourceTreeModel.addResourceToFrame(resource.loader.frameId, resource);
@@ -198,8 +200,8 @@ WebInspector.ResourceManager.prototype = {
         if (!resource)
             return;
 
-        resource.finished = true;
         resource.endTime = finishTime;
+        resource.finished = true;
 
         WebInspector.panels.network.refreshResource(resource);
         WebInspector.panels.audits.resourceFinished(resource);
diff --git a/WebCore/inspector/front-end/ResourcesPanel.js b/WebCore/inspector/front-end/ResourcesPanel.js
index ff99ebc..5c5c5d6 100644
--- a/WebCore/inspector/front-end/ResourcesPanel.js
+++ b/WebCore/inspector/front-end/ResourcesPanel.js
@@ -1023,8 +1023,7 @@ WebInspector.FrameResourceTreeElement.prototype = {
 
     _ondragstart: function(event)
     {
-        event.dataTransfer.setData("text/plain", this._resource.url);
-        event.dataTransfer.setData("text/uri-list", this._resource.url + "\r\n");
+        event.dataTransfer.setData("text/plain", this._resource.content);
         event.dataTransfer.effectAllowed = "copy";
         return true;
     },
diff --git a/WebCore/inspector/front-end/networkPanel.css b/WebCore/inspector/front-end/networkPanel.css
index 4cb46f0..70ebe56 100644
--- a/WebCore/inspector/front-end/networkPanel.css
+++ b/WebCore/inspector/front-end/networkPanel.css
@@ -26,7 +26,6 @@
     line-height: 17px;
     height: 37px;
     border-right: 1px solid rgb(210, 210, 210);
-    -webkit-user-select: none;
     vertical-align: middle;
 }
 
@@ -72,6 +71,11 @@
 
 .network-sidebar .data-grid td.name-column {
     font-weight: bold;
+    cursor: pointer;
+}
+
+.network.panel:not(.viewing-resource) .network-sidebar td.name-column:hover {
+    text-decoration: underline;
 }
 
 .network-sidebar .data-grid td.method-column,
@@ -366,7 +370,7 @@
 
 .network-timing-row {
     position: relative;
-    height: 12px;
+    height: 16px;
 }
 
 .network-timing-bar {
@@ -374,10 +378,14 @@
     background-color: red;
     border-left: 1px solid red;
     opacity: 0.4;
+    top: 0;
+    bottom: 0;
 }
 
 .network-timing-bar-title {
     position: absolute;
+    color: black;
+    top: 1px;
 }
 
 .network-dim-cell {
@@ -759,7 +767,7 @@
     padding: 6px;
     font-weight: bold;
     font-size: 11px;
-    color: rgb(30, 30, 30);
+    color: rgb(30%, 30%, 30%);
 }
 
 .resource-timing-view table {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list