Bug 1507895 - Part V, Remove dom.ua_widget.enabled pref r=smaug
authorTimothy Guan-tin Chien <timdream@gmail.com>
Mon, 28 Jan 2019 18:33:25 +0000
changeset 455668 d7e0e993611faaa007e591e964eb9a54f94f4732
parent 455667 86c320724c8100d358e92dfe4d72c84e5984322b
child 455669 bcf07920d63f90e8047a7f472d6ea34375f388c9
push id76921
push usertchien@mozilla.com
push dateMon, 28 Jan 2019 18:34:59 +0000
treeherderautoland@bcf07920d63f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1507895
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1507895 - Part V, Remove dom.ua_widget.enabled pref r=smaug With all the dependency removed this pref can be safely removed. Depends on D17574 Differential Revision: https://phabricator.services.mozilla.com/D17575
browser/base/content/test/plugins/browser.ini
devtools/client/inspector/markup/test/browser.ini
devtools/client/inspector/markup/test/browser_markup_shadowdom_ua_widgets.js
devtools/client/inspector/markup/test/browser_markup_shadowdom_ua_widgets_with_nac.js
devtools/server/tests/browser/browser_inspector-shadow.js
dom/base/nsContentUtils.cpp
dom/base/nsContentUtils.h
modules/libpref/init/all.js
toolkit/content/tests/widgets/chrome.ini
toolkit/content/tests/widgets/mochitest.ini
--- a/browser/base/content/test/plugins/browser.ini
+++ b/browser/base/content/test/plugins/browser.ini
@@ -1,10 +1,9 @@
 [DEFAULT]
-prefs = dom.ua_widget.enabled=true
 support-files =
   blocklist_proxy.js
   blockNoPlugins.xml
   blockPluginHard.xml
   blockPluginInfoURL.xml
   blockPluginVulnerableNoUpdate.xml
   blockPluginVulnerableUpdatable.xml
   browser_clearplugindata.html
--- a/devtools/client/inspector/markup/test/browser.ini
+++ b/devtools/client/inspector/markup/test/browser.ini
@@ -1,12 +1,11 @@
 [DEFAULT]
 tags = devtools
 subsuite = devtools
-prefs = dom.ua_widget.enabled=false
 support-files =
   doc_markup_anonymous.html
   doc_markup_anonymous_xul.xul
   doc_markup_dragdrop.html
   doc_markup_dragdrop_autoscroll_01.html
   doc_markup_dragdrop_autoscroll_02.html
   doc_markup_edit.html
   doc_markup_events_01.html
--- a/devtools/client/inspector/markup/test/browser_markup_shadowdom_ua_widgets.js
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_ua_widgets.js
@@ -71,15 +71,14 @@ add_task(async function() {
   await expandContainer(inspector, hostContainer);
   is(hostContainer.getChildContainers().length, 1, "video has 1 child");
 
   const divContainer = hostContainer.getChildContainers()[0];
   assertContainerHasText(divContainer, "some content");
 });
 
 async function setup({ showUserAgentShadowRoots }) {
-  await pushPref("dom.ua_widget.enabled", true);
   await pushPref("devtools.inspector.showUserAgentShadowRoots", showUserAgentShadowRoots);
 
   const { inspector } = await openInspectorForURL(TEST_URL);
   const { markup } = inspector;
   return { inspector, markup };
 }
--- a/devtools/client/inspector/markup/test/browser_markup_shadowdom_ua_widgets_with_nac.js
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_ua_widgets_with_nac.js
@@ -63,16 +63,15 @@ add_task(async function testElementPicke
   // all the children of the body.
   await assertMarkupViewAsTree(tree, "body", inspector);
 
   const moreNodesLink = markup.doc.querySelector(".more-nodes");
   ok(!moreNodesLink, "There is no 'more nodes' button displayed in the markup view");
 });
 
 async function setup({ showAllAnonymousContent }) {
-  await pushPref("dom.ua_widget.enabled", true);
   await pushPref("devtools.inspector.showUserAgentShadowRoots", true);
   await pushPref("devtools.inspector.showAllAnonymousContent", showAllAnonymousContent);
 
   const { inspector, testActor, toolbox } = await openInspectorForURL(TEST_URL);
   const { markup } = inspector;
   return { inspector, markup, testActor, toolbox };
 }
--- a/devtools/server/tests/browser/browser_inspector-shadow.js
+++ b/devtools/server/tests/browser/browser_inspector-shadow.js
@@ -136,17 +136,16 @@ add_task(async function() {
   is(slotted.displayName, "#text", "Slotted node is a text node");
   is(slotted._form.nodeValue, originalSlot._form.nodeValue,
     "Slotted content is the same as original's");
 });
 
 add_task(async function() {
   info("Test UA widgets when showUserAgentShadowRoots is true");
   await SpecialPowers.pushPrefEnv({"set": [
-    ["dom.ua_widget.enabled", true],
     ["devtools.inspector.showUserAgentShadowRoots", true],
   ]});
 
   const { walker } = await initInspectorFront(URL);
 
   let el = await walker.querySelector(walker.rootNode, "#video-controls");
   let hostChildren = await walker.children(el);
   is(hostChildren.nodes.length, 1, "#video-controls tag has one child");
@@ -156,17 +155,16 @@ add_task(async function() {
   el = await walker.querySelector(walker.rootNode, "#video-controls-with-children");
   hostChildren = await walker.children(el);
   is(hostChildren.nodes.length, 2, "#video-controls-with-children has two children");
 });
 
 add_task(async function() {
   info("Test UA widgets when showUserAgentShadowRoots is false");
   await SpecialPowers.pushPrefEnv({"set": [
-    ["dom.ua_widget.enabled", true],
     ["devtools.inspector.showUserAgentShadowRoots", false],
   ]});
 
   const { walker } = await initInspectorFront(URL);
 
   let el = await walker.querySelector(walker.rootNode, "#video-controls");
   let hostChildren = await walker.children(el);
   is(hostChildren.nodes.length, 0, "#video-controls tag has no children");
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -305,17 +305,16 @@ bool nsContentUtils::sIsUnprefixedFullsc
 bool nsContentUtils::sTrustedFullscreenOnly = true;
 bool nsContentUtils::sIsCutCopyAllowed = true;
 bool nsContentUtils::sIsUpgradableDisplayContentPrefEnabled = false;
 bool nsContentUtils::sIsFrameTimingPrefEnabled = false;
 bool nsContentUtils::sIsPerformanceTimingEnabled = false;
 bool nsContentUtils::sIsResourceTimingEnabled = false;
 bool nsContentUtils::sIsPerformanceNavigationTimingEnabled = false;
 bool nsContentUtils::sIsFormAutofillAutocompleteEnabled = false;
-bool nsContentUtils::sIsUAWidgetEnabled = false;
 bool nsContentUtils::sSendPerformanceTimingNotifications = false;
 bool nsContentUtils::sUseActivityCursor = false;
 bool nsContentUtils::sAnimationsAPICoreEnabled = false;
 bool nsContentUtils::sGetBoxQuadsEnabled = false;
 bool nsContentUtils::sSkipCursorMoveForSameValueSet = false;
 bool nsContentUtils::sRequestIdleCallbackEnabled = false;
 bool nsContentUtils::sTailingEnabled = false;
 bool nsContentUtils::sShowInputPlaceholderOnFocus = true;
@@ -653,19 +652,16 @@ nsresult nsContentUtils::Init() {
                                false);
 
   Preferences::AddBoolVarCache(&sIsFrameTimingPrefEnabled,
                                "dom.enable_frame_timing", false);
 
   Preferences::AddBoolVarCache(&sIsFormAutofillAutocompleteEnabled,
                                "dom.forms.autocomplete.formautofill", false);
 
-  Preferences::AddBoolVarCache(&sIsUAWidgetEnabled, "dom.ua_widget.enabled",
-                               false);
-
   Preferences::AddIntVarCache(&sPrivacyMaxInnerWidth,
                               "privacy.window.maxInnerWidth", 1000);
 
   Preferences::AddIntVarCache(&sPrivacyMaxInnerHeight,
                               "privacy.window.maxInnerHeight", 1000);
 
   Preferences::AddUintVarCache(
       &sHandlingInputTimeout, "dom.event.handling-user-input-time-limit", 1000);
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
@@ -3148,27 +3148,16 @@ class nsContentUtils {
       nsIContent* aLoadingNode, nsIPrincipal** aTriggeringPrincipal,
       nsContentPolicyType& aContentPolicyType, uint64_t* aRequestContextID);
 
   static nsresult CreateJSValueFromSequenceOfObject(
       JSContext* aCx, const mozilla::dom::Sequence<JSObject*>& aTransfer,
       JS::MutableHandle<JS::Value> aValue);
 
   /**
-   * Returns whether or not UA Widget is enabled, controlled by pref
-   * dom.ua_widget.enabled.
-   *
-   * When enabled, UA Widget will replace legacy XBL when rendering
-   * JS-implemented web content widgets (videocontrols/datetimebox/etc.)
-   *
-   * It is really enabled only if Shadow DOM is also enabled.
-   */
-  static bool IsUAWidgetEnabled() { return sIsUAWidgetEnabled; }
-
-  /**
    * Returns true if reserved key events should be prevented from being sent
    * to their target. Instead, the key event should be handled by chrome only.
    */
   static bool ShouldBlockReservedKeys(mozilla::WidgetKeyboardEvent* aKeyEvent);
 
   /**
    * Returns the nsIPluginTag for the plugin we should try to use for a given
    * MIME type.
@@ -3441,17 +3430,16 @@ class nsContentUtils {
   static bool sIsCutCopyAllowed;
   static uint32_t sHandlingInputTimeout;
   static bool sIsPerformanceTimingEnabled;
   static bool sIsResourceTimingEnabled;
   static bool sIsPerformanceNavigationTimingEnabled;
   static bool sIsUpgradableDisplayContentPrefEnabled;
   static bool sIsFrameTimingPrefEnabled;
   static bool sIsFormAutofillAutocompleteEnabled;
-  static bool sIsUAWidgetEnabled;
   static bool sSendPerformanceTimingNotifications;
   static bool sUseActivityCursor;
   static bool sAnimationsAPICoreEnabled;
   static bool sGetBoxQuadsEnabled;
   static bool sSkipCursorMoveForSameValueSet;
   static bool sRequestIdleCallbackEnabled;
   static bool sTailingEnabled;
   static bool sShowInputPlaceholderOnFocus;
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1454,18 +1454,16 @@ pref("privacy.resistFingerprinting.reduc
 // Enable jittering the clock one precision value forward
 pref("privacy.resistFingerprinting.reduceTimerPrecision.jitter", true);
 
 pref("dom.event.contextmenu.enabled",       true);
 pref("dom.event.clipboardevents.enabled",   true);
 pref("dom.event.highrestimestamp.enabled",  true);
 pref("dom.event.coalesce_mouse_move",       true);
 
-pref("dom.ua_widget.enabled", true);
-
 pref("javascript.enabled",                  true);
 pref("javascript.options.strict",           false);
 #ifdef DEBUG
 pref("javascript.options.strict.debug",     false);
 #endif
 pref("javascript.options.baselinejit",      true);
 //Duplicated in JitOptions - ensure both match.
 pref("javascript.options.baselinejit.threshold", 10);
--- a/toolkit/content/tests/widgets/chrome.ini
+++ b/toolkit/content/tests/widgets/chrome.ini
@@ -1,11 +1,9 @@
 [DEFAULT]
-prefs =
-  dom.ua_widget.enabled=true
 skip-if = os == 'android'
 support-files =
   tree_shared.js
   popup_shared.js
   window_label_checkbox.xul
   window_menubar.xul
   seek_with_sound.ogg
 
--- a/toolkit/content/tests/widgets/mochitest.ini
+++ b/toolkit/content/tests/widgets/mochitest.ini
@@ -1,11 +1,9 @@
 [DEFAULT]
-prefs =
-  dom.ua_widget.enabled=true
 support-files =
   audio.wav
   audio.ogg
   file_videocontrols_jsdisabled.html
   seek_with_sound.ogg
   video.ogg
   head.js
   tree_shared.js