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

Unified Diff: Source/devtools/front_end/source_frame/CodeMirrorUtils.js

Issue 662793002: [DevTools] Replace usages of document with custom functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months 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
Index: Source/devtools/front_end/source_frame/CodeMirrorUtils.js
diff --git a/Source/devtools/front_end/source_frame/CodeMirrorUtils.js b/Source/devtools/front_end/source_frame/CodeMirrorUtils.js
index 0a46ac2cdb89e0f1ebe27491dfeeb3ba49f48045..743930933929c0830a35cd31143c919589782049 100644
--- a/Source/devtools/front_end/source_frame/CodeMirrorUtils.js
+++ b/Source/devtools/front_end/source_frame/CodeMirrorUtils.js
@@ -184,7 +184,7 @@ WebInspector.CodeMirrorUtils.createThemeStyle = function()
var backgroundColorRule = backgroundColor ? ".CodeMirror .CodeMirror-selected { background-color: " + backgroundColor + ";}" : "";
var foregroundColor = InspectorFrontendHost.getSelectionForegroundColor();
var foregroundColorRule = foregroundColor ? ".CodeMirror .CodeMirror-selectedtext:not(.CodeMirror-persist-highlight) { color: " + foregroundColor + "!important;}" : "";
- var style = document.createElement("style");
+ var style = createElement("style");
if (foregroundColorRule || backgroundColorRule)
style.textContent = backgroundColorRule + foregroundColorRule;
return style;
« no previous file with comments | « Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js ('k') | Source/devtools/front_end/source_frame/FontView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698