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

Side by Side Diff: Source/devtools/front_end/CodeMirrorTextEditor.js

Issue 213423010: DevTools: Migrate General tab settings to extensions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after
1723 var backgroundColorRule = backgroundColor ? ".CodeMirror .CodeMirror-selecte d { background-color: " + backgroundColor + ";}" : ""; 1723 var backgroundColorRule = backgroundColor ? ".CodeMirror .CodeMirror-selecte d { background-color: " + backgroundColor + ";}" : "";
1724 var foregroundColor = InspectorFrontendHost.getSelectionForegroundColor(); 1724 var foregroundColor = InspectorFrontendHost.getSelectionForegroundColor();
1725 var foregroundColorRule = foregroundColor ? ".CodeMirror .CodeMirror-selecte dtext:not(.CodeMirror-persist-highlight) { color: " + foregroundColor + "!import ant;}" : ""; 1725 var foregroundColorRule = foregroundColor ? ".CodeMirror .CodeMirror-selecte dtext:not(.CodeMirror-persist-highlight) { color: " + foregroundColor + "!import ant;}" : "";
1726 if (!foregroundColorRule && !backgroundColorRule) 1726 if (!foregroundColorRule && !backgroundColorRule)
1727 return; 1727 return;
1728 1728
1729 var style = document.createElement("style"); 1729 var style = document.createElement("style");
1730 style.textContent = backgroundColorRule + foregroundColorRule; 1730 style.textContent = backgroundColorRule + foregroundColorRule;
1731 document.head.appendChild(style); 1731 document.head.appendChild(style);
1732 })(); 1732 })();
1733
1734 /**
1735 * @constructor
1736 * @extends {WebInspector.SelectUISettingDelegate}
1737 */
1738 WebInspector.CodeMirrorTextEditor.EditorIndentSettingDelegate = function()
1739 {
1740 WebInspector.SelectUISettingDelegate.call(this);
1741 }
1742
1743 WebInspector.CodeMirrorTextEditor.EditorIndentSettingDelegate.prototype = {
1744 /**
1745 * @return {!Array.<!Array.<*>>}
1746 */
1747 settingOptions: function()
1748 {
1749 return [
1750 [ WebInspector.UIString("2 spaces"), WebInspector.TextUtils.Indent.T woSpaces ],
1751 [ WebInspector.UIString("4 spaces"), WebInspector.TextUtils.Indent.F ourSpaces ],
1752 [ WebInspector.UIString("8 spaces"), WebInspector.TextUtils.Indent.E ightSpaces ],
1753 [ WebInspector.UIString("Tab character"), WebInspector.TextUtils.Ind ent.TabCharacter ]
1754 ];
1755 },
1756
1757 __proto__: WebInspector.SelectUISettingDelegate.prototype
1758 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/DebuggerModel.js » ('j') | Source/devtools/front_end/DebuggerModel.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698