зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1528181 - Enable the scrollable badge for good; r=mtigley
Differential Revision: https://phabricator.services.mozilla.com/D19909 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ab4bcb3e97
Коммит
3aea607fb0
|
@ -41,7 +41,6 @@ const DRAG_DROP_HEIGHT_TO_SPEED_MIN = 0.5;
|
|||
const DRAG_DROP_HEIGHT_TO_SPEED_MAX = 1;
|
||||
const ATTR_COLLAPSE_ENABLED_PREF = "devtools.markup.collapseAttributes";
|
||||
const ATTR_COLLAPSE_LENGTH_PREF = "devtools.markup.collapseAttributeLength";
|
||||
const SCROLLABLE_BADGE_PREF = "devtools.inspector.scrollable-badges.enabled";
|
||||
|
||||
/**
|
||||
* Vocabulary for the purposes of this file:
|
||||
|
@ -82,7 +81,6 @@ function MarkupView(inspector, frame, controllerWindow) {
|
|||
|
||||
this.collapseAttributes = Services.prefs.getBoolPref(ATTR_COLLAPSE_ENABLED_PREF);
|
||||
this.collapseAttributeLength = Services.prefs.getIntPref(ATTR_COLLAPSE_LENGTH_PREF);
|
||||
this.isScrollableBadgesEnabled = Services.prefs.getBoolPref(SCROLLABLE_BADGE_PREF);
|
||||
|
||||
// Creating the popup to be used to show CSS suggestions.
|
||||
// The popup will be attached to the toolbox document.
|
||||
|
@ -120,9 +118,7 @@ function MarkupView(inspector, frame, controllerWindow) {
|
|||
this._frame.addEventListener("focus", this._onFocus);
|
||||
this.inspector.selection.on("new-node-front", this._onNewSelection);
|
||||
this.walker.on("display-change", this._onWalkerNodeStatesChanged);
|
||||
if (this.isScrollableBadgesEnabled) {
|
||||
this.walker.on("scrollable-change", this._onWalkerNodeStatesChanged);
|
||||
}
|
||||
this.walker.on("scrollable-change", this._onWalkerNodeStatesChanged);
|
||||
this.walker.on("mutations", this._mutationObserver);
|
||||
this.win.addEventListener("copy", this._onCopy);
|
||||
this.win.addEventListener("mouseup", this._onMouseUp);
|
||||
|
@ -1964,9 +1960,7 @@ MarkupView.prototype = {
|
|||
"picker-node-hovered", this._onToolboxPickerHover
|
||||
);
|
||||
this.walker.off("display-change", this._onWalkerNodeStatesChanged);
|
||||
if (this.isScrollableBadgesEnabled) {
|
||||
this.walker.off("scrollable-change", this._onWalkerNodeStatesChanged);
|
||||
}
|
||||
this.walker.off("scrollable-change", this._onWalkerNodeStatesChanged);
|
||||
this.walker.off("mutations", this._mutationObserver);
|
||||
this.win.removeEventListener("copy", this._onCopy);
|
||||
this.win.removeEventListener("mouseup", this._onMouseUp);
|
||||
|
|
|
@ -26,9 +26,6 @@ const TEST_URI = `
|
|||
`;
|
||||
|
||||
add_task(async function() {
|
||||
info("Enable the scrollable badge feature");
|
||||
await pushPref("devtools.inspector.scrollable-badges.enabled", true);
|
||||
|
||||
const { inspector } = await openInspectorForURL(
|
||||
"data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
|
||||
|
||||
|
|
|
@ -297,10 +297,6 @@ ElementEditor.prototype = {
|
|||
},
|
||||
|
||||
updateScrollableBadge: function() {
|
||||
if (!this.markup.isScrollableBadgesEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.node.isScrollable && !this._scrollableBadge) {
|
||||
this._createScrollableBadge();
|
||||
} else if (this._scrollableBadge && !this.node.isScrollable) {
|
||||
|
|
|
@ -56,12 +56,6 @@ pref("devtools.inspector.fonthighlighter.enabled", true);
|
|||
pref("devtools.inspector.changes.enabled", true);
|
||||
// Enable the new Rules View
|
||||
pref("devtools.inspector.new-rulesview.enabled", false);
|
||||
// Enable the 'scrollable' markup-badges in nightly only for now
|
||||
#if defined(NIGHTLY_BUILD)
|
||||
pref("devtools.inspector.scrollable-badges.enabled", true);
|
||||
#else
|
||||
pref("devtools.inspector.scrollable-badges.enabled", false);
|
||||
#endif
|
||||
|
||||
// Flexbox preferences
|
||||
// Whether or not to show the combined flexbox and box model highlighter.
|
||||
|
|
Загрузка…
Ссылка в новой задаче