Commit 75c6f4e7 authored by kmccullough@apple.com's avatar kmccullough@apple.com

2008-04-15 Kevin McCullough <kmccullough@apple.com>

        Reviewed by Tim.

        - <rdar://problem/5792587> AJAX (XMLHttpRequest) support for the Inspector (17776)
        - Add XMLHttpRequest support to the inspector.

        * English.lproj/InspectorLocalizedStrings.js: Specify capitalization
        instead of using text-transform because XHR must capitalize all the letters.
        * page/inspector/Resource.js: Assume XHRs are textType even though this
        may not always be true.
        Also add the XHR category and let all mime types be consistent with it.
        * page/inspector/ResourcesPanel.js: Set the XHR category color.
        * page/inspector/inspector.css: Make XHRs yellow and fonts red because
        XHRs are more common than fonts and yellow next to orange (scripts) is
        not as harsh on the eyes as red next to orange.
        * page/inspector/inspector.js: Specify capitalization again.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f629f62a
2008-04-15 Kevin McCullough <kmccullough@apple.com>
Reviewed by Tim.
- <rdar://problem/5792587> AJAX (XMLHttpRequest) support for the Inspector (17776)
- Add XMLHttpRequest support to the inspector.
* English.lproj/InspectorLocalizedStrings.js: Specify capitalization
instead of using text-transform because XHR must capitalize all the letters.
* page/inspector/Resource.js: Assume XHRs are textType even though this
may not always be true.
Also add the XHR category and let all mime types be consistent with it.
* page/inspector/ResourcesPanel.js: Set the XHR category color.
* page/inspector/inspector.css: Make XHRs yellow and fonts red because
XHRs are more common than fonts and yellow next to orange (scripts) is
not as harsh on the eyes as red next to orange.
* page/inspector/inspector.js: Specify capitalization again.
2008-04-15 David Hyatt <hyatt@apple.com>
Fix the zoom property so that it works properly with font-size.
......@@ -55,7 +55,7 @@ WebInspector.Resource.Type = {
isTextType: function(type)
{
return (type === this.Document) || (type === this.Stylesheet) || (type === this.Script);
return (type === this.Document) || (type === this.Stylesheet) || (type === this.Script) || (type === this.XHR);
},
toString: function(type)
......@@ -72,6 +72,7 @@ WebInspector.Resource.Type = {
case this.Script:
return WebInspector.UIString("script");
case this.XHR:
return WebInspector.UIString("XHR");
case this.Other:
default:
return WebInspector.UIString("other");
......@@ -307,6 +308,8 @@ WebInspector.Resource.prototype = {
this.category = WebInspector.resourceCategories.fonts;
break;
case WebInspector.Resource.Type.XHR:
this.category = WebInspector.resourceCategories.xhr;
break;
case WebInspector.Resource.Type.Other:
default:
this.category = WebInspector.resourceCategories.other;
......@@ -465,7 +468,9 @@ WebInspector.Resource.prototype = {
_mimeTypeIsConsistentWithType: function()
{
if (this.type === undefined || this.type === WebInspector.Resource.Type.Other)
if (typeof this.type === "undefined"
|| this.type === WebInspector.Resource.Type.Other
|| this.type === WebInspector.Resource.Type.XHR)
return true;
if (this.mimeType in WebInspector.MIMETypes)
......
......@@ -863,8 +863,8 @@ WebInspector.ResourcesPanel.prototype = {
var graphInfo = this.calculator.computeSummaryValues(this._resources);
var categoryOrder = ["documents", "stylesheets", "images", "scripts", "fonts", "other"];
var categoryColors = {documents: {r: 47, g: 102, b: 236}, stylesheets: {r: 157, g: 231, b: 119}, images: {r: 164, g: 60, b: 255}, scripts: {r: 255, g: 121, b: 0}, fonts: {r: 231, g: 231, b: 10}, other: {r: 186, g: 186, b: 186}};
var categoryOrder = ["documents", "stylesheets", "images", "scripts", "xhr", "fonts", "other"];
var categoryColors = {documents: {r: 47, g: 102, b: 236}, stylesheets: {r: 157, g: 231, b: 119}, images: {r: 164, g: 60, b: 255}, scripts: {r: 255, g: 121, b: 0}, xhr: {r: 231, g: 231, b: 10}, fonts: {r: 255, g: 82, b: 62}, other: {r: 186, g: 186, b: 186}};
var fillSegments = [];
this.legendElement.removeChildren();
......@@ -948,6 +948,7 @@ WebInspector.ResourcesPanel.prototype = {
case WebInspector.resourceCategories.documents:
case WebInspector.resourceCategories.stylesheets:
case WebInspector.resourceCategories.scripts:
case WebInspector.resourceCategories.xhr:
return new WebInspector.SourceView(resource);
case WebInspector.resourceCategories.images:
return new WebInspector.ImageView(resource);
......
......@@ -1363,7 +1363,6 @@ body.inactive .sidebar {
.resources-graph-legend-header {
font-size: 12px;
text-transform: capitalize;
}
.resources-graph-legend-value {
......@@ -1451,13 +1450,17 @@ body.inactive .sidebar {
}
.resource-sidebar-tree-item.resources-category-fonts .resources-graph-bar {
-webkit-border-image: url(Images/timelinePillYellow.png) 6 7 6 7;
-webkit-border-image: url(Images/timelinePillRed.png) 6 7 6 7;
}
.resource-sidebar-tree-item.resources-category-scripts .resources-graph-bar {
-webkit-border-image: url(Images/timelinePillOrange.png) 6 7 6 7;
}
.resource-sidebar-tree-item.resources-category-xhr .resources-graph-bar {
-webkit-border-image: url(Images/timelinePillYellow.png) 6 7 6 7;
}
.tip-button {
background-image: url(Images/tipIcon.png);
border: none;
......@@ -1858,6 +1861,14 @@ body.inactive .sidebar-tree.small .sidebar-tree-item.selected, body.inactive .si
content: url(Images/resourceDocumentIconSmall.png);
}
.resource-sidebar-tree-item.resources-category-xhr .icon {
content: url(Images/resourcePlainIcon.png);
}
.children.small .resource-sidebar-tree-item.resources-category-xhr .icon {
content: url(Images/resourceDocumentIconSmall.png);
}
.resource-sidebar-tree-item .bubble.warning {
background-color: rgb(232, 164, 0);
}
......
......@@ -211,12 +211,13 @@ WebInspector.loaded = function()
this.currentPanel = this.panels.elements;
this.resourceCategories = {
documents: new WebInspector.ResourceCategory(WebInspector.UIString("documents"), "documents"),
stylesheets: new WebInspector.ResourceCategory(WebInspector.UIString("stylesheets"), "stylesheets"),
images: new WebInspector.ResourceCategory(WebInspector.UIString("images"), "images"),
scripts: new WebInspector.ResourceCategory(WebInspector.UIString("scripts"), "scripts"),
fonts: new WebInspector.ResourceCategory(WebInspector.UIString("fonts"), "fonts"),
other: new WebInspector.ResourceCategory(WebInspector.UIString("other"), "other")
documents: new WebInspector.ResourceCategory(WebInspector.UIString("Documents"), "documents"),
stylesheets: new WebInspector.ResourceCategory(WebInspector.UIString("Stylesheets"), "stylesheets"),
images: new WebInspector.ResourceCategory(WebInspector.UIString("Images"), "images"),
scripts: new WebInspector.ResourceCategory(WebInspector.UIString("Scripts"), "scripts"),
xhr: new WebInspector.ResourceCategory(WebInspector.UIString("XHR"), "xhr"),
fonts: new WebInspector.ResourceCategory(WebInspector.UIString("Fonts"), "fonts"),
other: new WebInspector.ResourceCategory(WebInspector.UIString("Other"), "other")
};
this.Tips = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment