[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
pfeldman at chromium.org
pfeldman at chromium.org
Thu Feb 4 21:27:00 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit da5fc7c59a0d57d00b771d703f60a88c4badd4bb
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 25 10:37:52 2010 +0000
2010-01-24 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
Web Inspector: Replace split pane with tabbed pane in resource
contents view.
https://bugs.webkit.org/show_bug.cgi?id=32453
* inspector/front-end/ResourceView.js:
(WebInspector.ResourceView):
(WebInspector.ResourceView.prototype.attach):
(WebInspector.ResourceView.prototype.show):
(WebInspector.ResourceView.prototype._selectTab):
(WebInspector.ResourceView.prototype._selectHeadersTab):
(WebInspector.ResourceView.prototype._selectContentTab):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.show):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c5f67eb..a9ab892 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,34 @@
+2010-01-24 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Replace split pane with tabbed pane in resource
+ contents view.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32453
+
+ * inspector/front-end/ResourceView.js:
+ (WebInspector.ResourceView):
+ (WebInspector.ResourceView.prototype.attach):
+ (WebInspector.ResourceView.prototype.show):
+ (WebInspector.ResourceView.prototype._selectTab):
+ (WebInspector.ResourceView.prototype._selectHeadersTab):
+ (WebInspector.ResourceView.prototype._selectContentTab):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype.show):
+ (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
+ (WebInspector.ResourcesPanel.prototype.showResource):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.show):
+ (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
+ * inspector/front-end/Settings.js:
+ (WebInspector.Settings.prototype._load):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._loaded):
+ * inspector/front-end/SourceView.js:
+ (WebInspector.SourceView):
+ * inspector/front-end/inspector.css:
+
2010-01-24 Eric Carlson <eric.carlson at apple.com>
Reviewed by Dan Bernstein.
diff --git a/WebCore/English.lproj/localizedStrings.js b/WebCore/English.lproj/localizedStrings.js
index feef7a4..637d4a6 100644
Binary files a/WebCore/English.lproj/localizedStrings.js and b/WebCore/English.lproj/localizedStrings.js differ
diff --git a/WebCore/inspector/front-end/ResourceView.js b/WebCore/inspector/front-end/ResourceView.js
index 180f232..58b058d 100644
--- a/WebCore/inspector/front-end/ResourceView.js
+++ b/WebCore/inspector/front-end/ResourceView.js
@@ -35,6 +35,20 @@ WebInspector.ResourceView = function(resource)
this.resource = resource;
+ this.tabsElement = document.createElement("div");
+ this.tabsElement.className = "scope-bar";
+ this.element.appendChild(this.tabsElement);
+
+ this.headersTabElement = document.createElement("li");
+ this.headersTabElement.textContent = WebInspector.UIString("Headers");
+ this.contentTabElement = document.createElement("li");
+ this.contentTabElement.textContent = WebInspector.UIString("Content");
+ this.tabsElement.appendChild(this.headersTabElement);
+ this.tabsElement.appendChild(this.contentTabElement);
+
+ this.headersTabElement.addEventListener("click", this._selectHeadersTab.bind(this), false);
+ this.contentTabElement.addEventListener("click", this._selectContentTab.bind(this), false);
+
this.headersElement = document.createElement("div");
this.headersElement.className = "resource-view-headers";
this.element.appendChild(this.headersElement);
@@ -63,7 +77,7 @@ WebInspector.ResourceView = function(resource)
this.headersTreeOutline.appendChild(this.statusCodeTreeElement);
this.requestHeadersTreeElement = new TreeElement("", null, true);
- this.requestHeadersTreeElement.expanded = false;
+ this.requestHeadersTreeElement.expanded = true;
this.requestHeadersTreeElement.selectable = false;
this.headersTreeOutline.appendChild(this.requestHeadersTreeElement);
@@ -71,30 +85,28 @@ WebInspector.ResourceView = function(resource)
this._decodeRequestParameters = true;
this.queryStringTreeElement = new TreeElement("", null, true);
- this.queryStringTreeElement.expanded = false;
+ this.queryStringTreeElement.expanded = true;
this.queryStringTreeElement.selectable = false;
this.queryStringTreeElement.hidden = true;
this.headersTreeOutline.appendChild(this.queryStringTreeElement);
this.formDataTreeElement = new TreeElement("", null, true);
- this.formDataTreeElement.expanded = false;
+ this.formDataTreeElement.expanded = true;
this.formDataTreeElement.selectable = false;
this.formDataTreeElement.hidden = true;
this.headersTreeOutline.appendChild(this.formDataTreeElement);
this.requestPayloadTreeElement = new TreeElement(WebInspector.UIString("Request Payload"), null, true);
- this.requestPayloadTreeElement.expanded = false;
+ this.requestPayloadTreeElement.expanded = true;
this.requestPayloadTreeElement.selectable = false;
this.requestPayloadTreeElement.hidden = true;
this.headersTreeOutline.appendChild(this.requestPayloadTreeElement);
this.responseHeadersTreeElement = new TreeElement("", null, true);
- this.responseHeadersTreeElement.expanded = false;
+ this.responseHeadersTreeElement.expanded = true;
this.responseHeadersTreeElement.selectable = false;
this.headersTreeOutline.appendChild(this.responseHeadersTreeElement);
- this.headersVisible = true;
-
resource.addEventListener("url changed", this._refreshURL, this);
resource.addEventListener("requestHeaders changed", this._refreshRequestHeaders, this);
resource.addEventListener("responseHeaders changed", this._refreshResponseHeaders, this);
@@ -104,34 +116,49 @@ WebInspector.ResourceView = function(resource)
this._refreshRequestHeaders();
this._refreshResponseHeaders();
this._refreshHTTPInformation();
+ this._selectTab();
}
WebInspector.ResourceView.prototype = {
- get headersVisible()
+ attach: function()
{
- return this._headersVisible;
+ if (!this.element.parentNode) {
+ var parentElement = (document.getElementById("resource-views") || document.getElementById("script-resource-views"));
+ if (parentElement)
+ parentElement.appendChild(this.element);
+ }
},
- set headersVisible(x)
+ show: function(parentElement)
{
- if (x === this._headersVisible)
- return;
-
- this._headersVisible = x;
+ WebInspector.View.prototype.show.call(this, parentElement);
+ this._selectTab();
+ },
- if (x)
- this.element.addStyleClass("headers-visible");
+ _selectTab: function()
+ {
+ if (WebInspector.settings.resourceViewTab === "headers")
+ this._selectHeadersTab();
else
- this.element.removeStyleClass("headers-visible");
+ this._selectContentTab();
},
- attach: function()
+ _selectHeadersTab: function()
{
- if (!this.element.parentNode) {
- var parentElement = (document.getElementById("resource-views") || document.getElementById("script-resource-views"));
- if (parentElement)
- parentElement.appendChild(this.element);
- }
+ WebInspector.settings.resourceViewTab = "headers";
+ this.headersTabElement.addStyleClass("selected");
+ this.contentTabElement.removeStyleClass("selected");
+ this.headersElement.removeStyleClass("hidden");
+ this.contentElement.addStyleClass("hidden");
+ },
+
+ _selectContentTab: function()
+ {
+ WebInspector.settings.resourceViewTab = "content";
+ this.contentTabElement.addStyleClass("selected");
+ this.headersTabElement.removeStyleClass("selected");
+ this.contentElement.removeStyleClass("hidden");
+ this.headersElement.addStyleClass("hidden");
},
_refreshURL: function()
diff --git a/WebCore/inspector/front-end/ResourcesPanel.js b/WebCore/inspector/front-end/ResourcesPanel.js
index c8a77a4..77c2b42 100644
--- a/WebCore/inspector/front-end/ResourcesPanel.js
+++ b/WebCore/inspector/front-end/ResourcesPanel.js
@@ -192,10 +192,9 @@ WebInspector.ResourcesPanel.prototype = {
WebInspector.AbstractTimelinePanel.prototype.show.call(this);
var visibleView = this.visibleView;
- if (this.visibleResource) {
- visibleView.headersVisible = true;
+ if (this.visibleResource)
visibleView.show(this.viewsContainerElement);
- } else if (visibleView)
+ else if (visibleView)
visibleView.show();
// Hide any views that are visible that are not this panel's current visible view.
@@ -445,8 +444,6 @@ WebInspector.ResourcesPanel.prototype = {
resource._resourcesView = newView;
- newView.headersVisible = oldView.headersVisible;
-
if (oldView.visible && oldView.element.parentNode)
newView.show(oldView.element.parentNode);
},
@@ -472,7 +469,6 @@ WebInspector.ResourcesPanel.prototype = {
this.visibleResource._resourcesView.hide();
var view = this.resourceViewForResource(resource);
- view.headersVisible = true;
view.show(this.viewsContainerElement);
if (line) {
diff --git a/WebCore/inspector/front-end/ScriptsPanel.js b/WebCore/inspector/front-end/ScriptsPanel.js
index 75bc192..8bced0b 100644
--- a/WebCore/inspector/front-end/ScriptsPanel.js
+++ b/WebCore/inspector/front-end/ScriptsPanel.js
@@ -229,11 +229,8 @@ WebInspector.ScriptsPanel.prototype = {
WebInspector.Panel.prototype.show.call(this);
this.sidebarResizeElement.style.right = (this.sidebarElement.offsetWidth - 3) + "px";
- if (this.visibleView) {
- if (this.visibleView instanceof WebInspector.ResourceView)
- this.visibleView.headersVisible = false;
+ if (this.visibleView)
this.visibleView.show(this.viewsContainerElement);
- }
// Hide any views that are visible that are not this panel's current visible view.
// This can happen when a ResourceView is visible in the Resources panel then switched
@@ -611,7 +608,6 @@ WebInspector.ScriptsPanel.prototype = {
if (!WebInspector.panels.resources)
return null;
view = WebInspector.panels.resources.resourceViewForResource(scriptOrResource);
- view.headersVisible = false;
if (scriptOrResource.url in this._breakpointsURLMap) {
var sourceFrame = this._sourceFrameForScriptOrResource(scriptOrResource);
diff --git a/WebCore/inspector/front-end/Settings.js b/WebCore/inspector/front-end/Settings.js
index 3fdd19c..85aecd5 100644
--- a/WebCore/inspector/front-end/Settings.js
+++ b/WebCore/inspector/front-end/Settings.js
@@ -67,6 +67,7 @@ WebInspector.Settings.prototype = {
this._installSetting("lastViewedScriptFile", "last-viewed-script-file");
this._installSetting("showInheritedComputedStyleProperties", "show-inherited-computed-style-properties", false);
this._installSetting("showUserAgentStyles", "show-user-agent-styles", true);
+ this._installSetting("resourceViewTab", "resource-view-tab", "headers");
this.dispatchEventToListeners("loaded");
},
diff --git a/WebCore/inspector/front-end/SourceFrame.js b/WebCore/inspector/front-end/SourceFrame.js
index a0c09ad..deb1494 100644
--- a/WebCore/inspector/front-end/SourceFrame.js
+++ b/WebCore/inspector/front-end/SourceFrame.js
@@ -56,31 +56,6 @@ WebInspector.SourceFrame.prototype = {
this._updateExecutionLine(previousLine);
},
- get autoSizesToFitContentHeight()
- {
- return this._autoSizesToFitContentHeight;
- },
-
- set autoSizesToFitContentHeight(x)
- {
- if (this._autoSizesToFitContentHeight === x)
- return;
-
- this._autoSizesToFitContentHeight = x;
-
- if (this._autoSizesToFitContentHeight) {
- this._windowResizeListener = this._windowResized.bind(this);
- window.addEventListener("resize", this._windowResizeListener, false);
- this.sizeToFitContentHeight();
- } else {
- this.element.style.removeProperty("height");
- if (this.element.contentDocument)
- this.element.contentDocument.body.removeStyleClass("webkit-height-sized-to-fit");
- window.removeEventListener("resize", this._windowResizeListener, false);
- delete this._windowResizeListener;
- }
- },
-
sourceRow: function(lineNumber)
{
if (!lineNumber || !this.element.contentDocument)
@@ -278,9 +253,6 @@ WebInspector.SourceFrame.prototype = {
if (this._executionLine)
this.revealLine(this._executionLine);
- if (this.autoSizesToFitContentHeight)
- this.sizeToFitContentHeight();
-
if (this._lineNumberToReveal) {
this.revealLine(this._lineNumberToReveal);
delete this._lineNumberToReveal;
@@ -299,13 +271,6 @@ WebInspector.SourceFrame.prototype = {
return doc && doc.getElementsByTagName("table")[0];
},
- _windowResized: function(event)
- {
- if (!this._autoSizesToFitContentHeight)
- return;
- this.sizeToFitContentHeight();
- },
-
_documentContextMenu: function(event)
{
if (!event.target.hasStyleClass("webkit-line-number"))
diff --git a/WebCore/inspector/front-end/SourceView.js b/WebCore/inspector/front-end/SourceView.js
index 7ab7b5b..cdfdbdc 100644
--- a/WebCore/inspector/front-end/SourceView.js
+++ b/WebCore/inspector/front-end/SourceView.js
@@ -28,12 +28,10 @@
WebInspector.SourceView = function(resource)
{
- // Set the sourceFrame first since WebInspector.ResourceView will set headersVisible
- // and our override of headersVisible needs the sourceFrame.
- this.sourceFrame = new WebInspector.SourceFrame(null, this._addBreakpoint.bind(this));
-
WebInspector.ResourceView.call(this, resource);
+ this.sourceFrame = new WebInspector.SourceFrame(null, this._addBreakpoint.bind(this));
+
resource.addEventListener("finished", this._resourceLoadingFinished, this);
this.element.addStyleClass("source");
@@ -44,22 +42,10 @@ WebInspector.SourceView = function(resource)
var gutterElement = document.createElement("div");
gutterElement.className = "webkit-line-gutter-backdrop";
- this.element.appendChild(gutterElement);
+ this.contentElement.appendChild(gutterElement);
}
WebInspector.SourceView.prototype = {
- set headersVisible(x)
- {
- if (x === this._headersVisible)
- return;
-
- var superSetter = WebInspector.ResourceView.prototype.__lookupSetter__("headersVisible");
- if (superSetter)
- superSetter.call(this, x);
-
- this.sourceFrame.autoSizesToFitContentHeight = x;
- },
-
show: function(parentElement)
{
WebInspector.ResourceView.prototype.show.call(this, parentElement);
@@ -72,12 +58,6 @@ WebInspector.SourceView.prototype = {
this._currentSearchResultIndex = -1;
},
- resize: function()
- {
- if (this.sourceFrame.autoSizesToFitContentHeight)
- this.sourceFrame.sizeToFitContentHeight();
- },
-
detach: function()
{
WebInspector.ResourceView.prototype.detach.call(this);
diff --git a/WebCore/inspector/front-end/inspector.css b/WebCore/inspector/front-end/inspector.css
index 688cbc2..c050324 100644
--- a/WebCore/inspector/front-end/inspector.css
+++ b/WebCore/inspector/front-end/inspector.css
@@ -767,30 +767,41 @@ body.drawer-visible #drawer {
.resource-view {
display: none;
- overflow: hidden;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
- overflow: hidden;
}
.resource-view.visible {
display: block;
}
-.resource-view.headers-visible {
- overflow-y: auto;
- overflow-x: hidden;
+.resource-view .scope-bar {
+ position: absolute;
+ height: 20px;
+ top: 0;
+ left: 0;
+ right: 0;
+ background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(236, 236, 236)), to(rgb(217, 217, 217)));
+ border-bottom: 1px solid rgb(163, 163, 163);
+}
+
+.resource-view .scope-bar li {
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
}
.resource-view-headers {
- display: none;
padding: 6px;
- border-bottom: 1px solid rgb(64%, 64%, 64%);
- background-color: white;
- -webkit-user-select: text;
+ -webkit-user-select: text;
+ position: absolute;
+ top: 20px;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ overflow: auto;
}
.resource-view-headers .outline-disclosure .parent {
@@ -798,10 +809,6 @@ body.drawer-visible #drawer {
font-weight: bold;
}
-.resource-view.headers-visible .resource-view-headers {
- display: block;
-}
-
.resource-view-headers .outline-disclosure .children li {
white-space: nowrap;
}
@@ -833,25 +840,12 @@ body.drawer-visible #drawer {
.resource-view .resource-view-content {
position: absolute;
- top: 0;
+ top: 20px;
right: 0;
left: 0;
bottom: 0;
}
-.resource-view.headers-visible .resource-view-content {
- position: relative;
- top: auto;
- right: auto;
- left: auto;
- bottom: auto;
-}
-
-.resource-view.headers-visible .source-view-frame {
- height: auto;
- vertical-align: top;
-}
-
.webkit-line-gutter-backdrop {
/* Keep this in sync with view-source.css (.webkit-line-gutter-backdrop) */
width: 31px;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list