mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1077523 - Enable CSS source maps by default. r=bgrins
This commit is contained in:
parent
cee73ca27e
commit
3f7265abd5
@ -1418,7 +1418,7 @@ pref("devtools.storage.enabled", false);
|
||||
|
||||
// Enable the Style Editor.
|
||||
pref("devtools.styleeditor.enabled", true);
|
||||
pref("devtools.styleeditor.source-maps-enabled", false);
|
||||
pref("devtools.styleeditor.source-maps-enabled", true);
|
||||
pref("devtools.styleeditor.autocompletion-enabled", true);
|
||||
pref("devtools.styleeditor.showMediaSidebar", true);
|
||||
pref("devtools.styleeditor.mediaSidebarWidth", 238);
|
||||
|
@ -13,7 +13,6 @@ const TESTCASE_URI_SCSS = TEST_BASE + "sourcemap-sass/sourcemaps.scss";
|
||||
const TESTCASE_URI_MAP = TEST_BASE + "sourcemap-css/sourcemaps.css.map";
|
||||
const TESTCASE_SCSS_NAME = "sourcemaps.scss";
|
||||
|
||||
const SOURCE_MAP_PREF = "devtools.styleeditor.source-maps-enabled";
|
||||
const TRANSITIONS_PREF = "devtools.styleeditor.transitions";
|
||||
|
||||
const CSS_TEXT = "* { color: blue }";
|
||||
@ -31,7 +30,6 @@ function test()
|
||||
{
|
||||
waitForExplicitFinish();
|
||||
|
||||
Services.prefs.setBoolPref(SOURCE_MAP_PREF, true);
|
||||
Services.prefs.setBoolPref(TRANSITIONS_PREF, false);
|
||||
|
||||
Task.spawn(function() {
|
||||
@ -126,7 +124,6 @@ function pauseForTimeChange() {
|
||||
}
|
||||
|
||||
function finishUp() {
|
||||
Services.prefs.clearUserPref(SOURCE_MAP_PREF);
|
||||
Services.prefs.clearUserPref(TRANSITIONS_PREF);
|
||||
finish();
|
||||
}
|
||||
|
@ -69,8 +69,6 @@ const origNames = ["sourcemaps.scss", "contained.scss", "test-stylus.styl"];
|
||||
waitForExplicitFinish();
|
||||
|
||||
let test = asyncTest(function*() {
|
||||
Services.prefs.setBoolPref(PREF, true);
|
||||
|
||||
let {UI} = yield addTabAndOpenStyleEditors(7, null, TESTCASE_URI);
|
||||
|
||||
is(UI.editors.length, 4,
|
||||
|
@ -645,7 +645,8 @@ CssHtmlTree.prototype = {
|
||||
this.menuitemSources= createMenuItem(this._contextmenu, {
|
||||
label: "ruleView.contextmenu.showOrigSources",
|
||||
accesskey: "ruleView.contextmenu.showOrigSources.accessKey",
|
||||
command: this._onToggleOrigSources
|
||||
command: this._onToggleOrigSources,
|
||||
type: "checkbox"
|
||||
});
|
||||
|
||||
let popupset = doc.documentElement.querySelector("popupset");
|
||||
@ -666,16 +667,8 @@ CssHtmlTree.prototype = {
|
||||
let disable = win.getSelection().isCollapsed;
|
||||
this.menuitemCopy.disabled = disable;
|
||||
|
||||
let label = "ruleView.contextmenu.showOrigSources";
|
||||
if (Services.prefs.getBoolPref(PREF_ORIG_SOURCES)) {
|
||||
label = "ruleView.contextmenu.showCSSSources";
|
||||
}
|
||||
this.menuitemSources.setAttribute("label",
|
||||
CssHtmlTree.l10n(label));
|
||||
|
||||
let accessKey = label + ".accessKey";
|
||||
this.menuitemSources.setAttribute("accesskey",
|
||||
CssHtmlTree.l10n(accessKey));
|
||||
let showOrig = Services.prefs.getBoolPref(PREF_ORIG_SOURCES);
|
||||
this.menuitemSources.setAttribute("checked", showOrig);
|
||||
|
||||
this.menuitemCopyColor.hidden = !this._isColorPopup();
|
||||
},
|
||||
|
@ -1184,7 +1184,8 @@ CssRuleView.prototype = {
|
||||
this.menuitemSources = createMenuItem(this._contextmenu, {
|
||||
label: "ruleView.contextmenu.showOrigSources",
|
||||
accesskey: "ruleView.contextmenu.showOrigSources.accessKey",
|
||||
command: this._onToggleOrigSources
|
||||
command: this._onToggleOrigSources,
|
||||
type: "checkbox"
|
||||
});
|
||||
|
||||
let popupset = doc.documentElement.querySelector("popupset");
|
||||
@ -1226,16 +1227,8 @@ CssRuleView.prototype = {
|
||||
this.menuitemCopyColor.hidden = !this._isColorPopup();
|
||||
this.menuitemCopy.disabled = !copy;
|
||||
|
||||
let label = "ruleView.contextmenu.showOrigSources";
|
||||
if (Services.prefs.getBoolPref(PREF_ORIG_SOURCES)) {
|
||||
label = "ruleView.contextmenu.showCSSSources";
|
||||
}
|
||||
this.menuitemSources.setAttribute("label",
|
||||
_strings.GetStringFromName(label));
|
||||
|
||||
let accessKey = label + ".accessKey";
|
||||
this.menuitemSources.setAttribute("accesskey",
|
||||
_strings.GetStringFromName(accessKey));
|
||||
var showOrig = Services.prefs.getBoolPref(PREF_ORIG_SOURCES);
|
||||
this.menuitemSources.setAttribute("checked", showOrig);
|
||||
|
||||
this.menuitemAddRule.disabled = this.inspector.selection.isAnonymousNode();
|
||||
},
|
||||
@ -1961,7 +1954,9 @@ RuleEditor.prototype = {
|
||||
let sourceLabel = this.element.querySelector(".source-link-label");
|
||||
let sourceHref = (this.rule.sheet && this.rule.sheet.href) ?
|
||||
this.rule.sheet.href : this.rule.title;
|
||||
sourceLabel.setAttribute("tooltiptext", sourceHref);
|
||||
let sourceLine = this.rule.ruleLine > 0 ? ":" + this.rule.ruleLine : "";
|
||||
|
||||
sourceLabel.setAttribute("tooltiptext", sourceHref + sourceLine);
|
||||
|
||||
if (this.rule.isSystem) {
|
||||
let uaLabel = _strings.GetStringFromName("rule.userAgentStyles");
|
||||
|
@ -152,7 +152,7 @@ function testRuleViewLinkLabel(view) {
|
||||
|
||||
is(value, EXTERNAL_STYLESHEET_FILE_NAME + ":1",
|
||||
"rule view stylesheet display value matches filename and line number");
|
||||
is(tooltipText, EXTERNAL_STYLESHEET_URL,
|
||||
is(tooltipText, EXTERNAL_STYLESHEET_URL + ":1",
|
||||
"rule view stylesheet tooltip text matches the full URI path");
|
||||
}
|
||||
|
||||
|
@ -100,14 +100,6 @@ ruleView.contextmenu.showOrigSources=Show original sources
|
||||
# the rule view context menu "Show original sources" entry.
|
||||
ruleView.contextmenu.showOrigSources.accessKey=O
|
||||
|
||||
# LOCALIZATION NOTE (ruleView.contextmenu.showCSSSources): Text displayed in the rule view
|
||||
# context menu.
|
||||
ruleView.contextmenu.showCSSSources=Show CSS sources
|
||||
|
||||
# LOCALIZATION NOTE (ruleView.contextmenu.showCSSSources.accessKey): Access key for
|
||||
# the rule view context menu "Show CSS sources" entry.
|
||||
ruleView.contextmenu.showCSSSources.accessKey=S
|
||||
|
||||
# LOCALIZATION NOTE (ruleView.contextmenu.addRule): Text displayed in the
|
||||
# rule view context menu for adding a new rule to the element.
|
||||
ruleView.contextmenu.addRule=Add rule
|
||||
|
Loading…
Reference in New Issue
Block a user