Title: [108634] trunk/Source/WebCore
- Revision
- 108634
- Author
- [email protected]
- Date
- 2012-02-23 09:28:33 -0800 (Thu, 23 Feb 2012)
Log Message
Web Inspector: add experiment that loads stylesheets as links
https://bugs.webkit.org/show_bug.cgi?id=79340
Reviewed by Timothy Hatcher.
* inspector/front-end/Settings.js:
(WebInspector.ExperimentsSettings):
* inspector/front-end/View.js:
(WebInspector.View.prototype._doLoadCSS):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (108633 => 108634)
--- trunk/Source/WebCore/ChangeLog 2012-02-23 16:54:17 UTC (rev 108633)
+++ trunk/Source/WebCore/ChangeLog 2012-02-23 17:28:33 UTC (rev 108634)
@@ -1,3 +1,15 @@
+2012-02-23 Pavel Feldman <[email protected]>
+
+ Web Inspector: add experiment that loads stylesheets as links
+ https://bugs.webkit.org/show_bug.cgi?id=79340
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/front-end/Settings.js:
+ (WebInspector.ExperimentsSettings):
+ * inspector/front-end/View.js:
+ (WebInspector.View.prototype._doLoadCSS):
+
2012-02-23 Adam Roben <[email protected]>
Mac build fix after r108615
Modified: trunk/Source/WebCore/inspector/front-end/Settings.js (108633 => 108634)
--- trunk/Source/WebCore/inspector/front-end/Settings.js 2012-02-23 16:54:17 UTC (rev 108633)
+++ trunk/Source/WebCore/inspector/front-end/Settings.js 2012-02-23 17:28:33 UTC (rev 108634)
@@ -178,6 +178,7 @@
this.timelineStartAtZero = this._createExperiment("timelineStartAtZero", "Enable start at zero mode in Timeline panel");
// FIXME: Enable http/tests/inspector/indexeddb/resources-panel.html when removed from experiments.
this.showIndexedDB = this._createExperiment("showIndexedDB", "Show IndexedDB in Resources panel");
+ this.debugCSS = this._createExperiment("debugCSS", "Load CSS via link tags for debugging");
this._cleanUpSetting();
}
Modified: trunk/Source/WebCore/inspector/front-end/View.js (108633 => 108634)
--- trunk/Source/WebCore/inspector/front-end/View.js 2012-02-23 16:54:17 UTC (rev 108633)
+++ trunk/Source/WebCore/inspector/front-end/View.js 2012-02-23 17:28:33 UTC (rev 108634)
@@ -278,13 +278,20 @@
return;
}
- var xhr = new XMLHttpRequest();
- xhr.open("GET", cssFile, false);
- xhr.send(null);
+ if (WebInspector.experimentsSettings.debugCSS.isEnabled()) {
+ styleElement = document.createElement("link");
+ styleElement.rel = "stylesheet";
+ styleElement.type = "text/css";
+ styleElement.href = ""
+ } else {
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", cssFile, false);
+ xhr.send(null);
- styleElement = document.createElement("style");
- styleElement.type = "text/css";
- styleElement.textContent = xhr.responseText;
+ styleElement = document.createElement("style");
+ styleElement.type = "text/css";
+ styleElement.textContent = xhr.responseText;
+ }
document.head.insertBefore(styleElement, document.head.firstChild);
WebInspector.View._cssFileToStyleElement[cssFile] = styleElement;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes