Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1004)

Unified Diff: Source/core/xml/DocumentXMLTreeViewer.js

Issue 757963002: [Blink-in-JS] 'Import' function to load sub-modules and other resources for private scripts (Part-3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Implementing privateScriptController.import Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/core/v8/PrivateScriptRunner.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/DocumentXMLTreeViewer.js
diff --git a/Source/core/xml/DocumentXMLTreeViewer.js b/Source/core/xml/DocumentXMLTreeViewer.js
index d735a8d98c4748fabe11d211f0889a6ff0b1ee7c..983ea657ff12375c6956df66b722d7ffe6283e86 100644
--- a/Source/core/xml/DocumentXMLTreeViewer.js
+++ b/Source/core/xml/DocumentXMLTreeViewer.js
@@ -4,57 +4,9 @@
"use strict";
+var xmlTreeViewerCSS = privateScriptController.import("DocumentXMLTreeViewer.css");
+
privateScriptController.installClass("Document", function(DocumentPrototype) {
- // FIXME: The stylesheet should be defined in a separate css file
- var styleSheet = [
- "div.header {",
- " border-bottom: 2px solid black;",
- " padding-bottom: 5px;",
- " margin: 10px;",
- "}",
- "",
- "div.collapsible > div.hidden {",
- " display:none;",
- "}",
- "",
- ".pretty-print {",
- " margin-top: 1em;",
- " margin-left: 20px;",
- " font-family: monospace;",
- " font-size: 13px;",
- "}",
- "",
- "#webkit-xml-viewer-source-xml {",
- " display: none;",
- "}",
- "",
- ".collapsible-content {",
- " margin-left: 1em;",
- "}",
- ".comment {",
- " white-space: pre;",
- "}",
- "",
- ".button {",
- " -webkit-user-select: none;",
- " cursor: pointer;",
- " display: inline-block;",
- " margin-left: -10px;",
- " width: 10px;",
- " background-repeat: no-repeat;",
- " background-position: left top;",
- " vertical-align: bottom;",
- "}",
- "",
- ".collapse-button {",
- " background-image: -webkit-canvas(arrowDown);",
- " height: 10px;",
- "}",
- "",
- ".expand-button {",
- " background-image: -webkit-canvas(arrowRight);",
- " height: 11px;",
- "}"].join('');
var nodeParentPairs = [];
var tree;
@@ -65,7 +17,7 @@ privateScriptController.installClass("Document", function(DocumentPrototype) {
html.appendChild(head);
var style = createHTMLElement('style');
style.id = 'xml-viewer-style';
- style.appendChild(document.createTextNode(styleSheet));
+ style.appendChild(document.createTextNode(xmlTreeViewerCSS));
head.appendChild(style);
var body = createHTMLElement('body');
html.appendChild(body);
« no previous file with comments | « Source/bindings/core/v8/PrivateScriptRunner.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698