Bug 1408838: Remove -moz-physical-home-button system metric. r?xidorn draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 16 Oct 2017 08:57:59 +0200
changeset 680727 bca770c9ad3773a11d2587d73d65519a9ef987d9
parent 680726 89ab122de8a0a3057e2f91fa65d9e1e446e87ddc
child 680737 abb055d3f4272d67b19b204141e67b42637eaf87
child 680738 e2e8fe807215e670fc4582e1a0753664000b3a57
push id84599
push userbmo:emilio@crisal.io
push dateMon, 16 Oct 2017 07:01:09 +0000
reviewersxidorn
bugs1408838
milestone58.0a1
Bug 1408838: Remove -moz-physical-home-button system metric. r?xidorn MozReview-Commit-ID: A7nZdj6GQtM
dom/base/nsGkAtomList.h
layout/style/nsCSSRuleProcessor.cpp
layout/style/nsMediaFeatures.cpp
widget/LookAndFeel.h
widget/headless/HeadlessLookAndFeelGTK.cpp
widget/nsXPLookAndFeel.cpp
--- a/dom/base/nsGkAtomList.h
+++ b/dom/base/nsGkAtomList.h
@@ -2266,17 +2266,16 @@ GK_ATOM(windows_accent_color_in_titlebar
 GK_ATOM(windows_default_theme, "windows-default-theme")
 GK_ATOM(mac_graphite_theme, "mac-graphite-theme")
 GK_ATOM(mac_yosemite_theme, "mac-yosemite-theme")
 GK_ATOM(windows_compositor, "windows-compositor")
 GK_ATOM(windows_glass, "windows-glass")
 GK_ATOM(touch_enabled, "touch-enabled")
 GK_ATOM(menubar_drag, "menubar-drag")
 GK_ATOM(swipe_animation_enabled, "swipe-animation-enabled")
-GK_ATOM(physical_home_button, "physical-home-button")
 
 // windows theme selector metrics
 GK_ATOM(windows_classic, "windows-classic")
 GK_ATOM(windows_theme_aero, "windows-theme-aero")
 GK_ATOM(windows_theme_aero_lite, "windows-theme-aero-lite")
 GK_ATOM(windows_theme_luna_blue, "windows-theme-luna-blue")
 GK_ATOM(windows_theme_luna_olive, "windows-theme-luna-olive")
 GK_ATOM(windows_theme_luna_silver, "windows-theme-luna-silver")
@@ -2301,17 +2300,16 @@ GK_ATOM(_moz_windows_glass, "-moz-window
 GK_ATOM(_moz_windows_theme, "-moz-windows-theme")
 GK_ATOM(_moz_os_version, "-moz-os-version")
 GK_ATOM(_moz_touch_enabled, "-moz-touch-enabled")
 GK_ATOM(_moz_menubar_drag, "-moz-menubar-drag")
 GK_ATOM(_moz_device_pixel_ratio, "-moz-device-pixel-ratio")
 GK_ATOM(_moz_device_orientation, "-moz-device-orientation")
 GK_ATOM(_moz_is_resource_document, "-moz-is-resource-document")
 GK_ATOM(_moz_swipe_animation_enabled, "-moz-swipe-animation-enabled")
-GK_ATOM(_moz_physical_home_button, "-moz-physical-home-button")
 
 // application commands
 GK_ATOM(Back, "Back")
 GK_ATOM(Forward, "Forward")
 GK_ATOM(Reload, "Reload")
 GK_ATOM(Stop, "Stop")
 GK_ATOM(Search, "Search")
 GK_ATOM(Bookmarks, "Bookmarks")
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -1154,22 +1154,16 @@ nsCSSRuleProcessor::InitSystemMetrics()
   }
 
   rv = LookAndFeel::GetInt(LookAndFeel::eIntID_SwipeAnimationEnabled,
                            &metricResult);
   if (NS_SUCCEEDED(rv) && metricResult) {
     sSystemMetrics->AppendElement(nsGkAtoms::swipe_animation_enabled);
   }
 
-  rv = LookAndFeel::GetInt(LookAndFeel::eIntID_PhysicalHomeButton,
-                           &metricResult);
-  if (NS_SUCCEEDED(rv) && metricResult) {
-    sSystemMetrics->AppendElement(nsGkAtoms::physical_home_button);
-  }
-
 #ifdef XP_WIN
   if (NS_SUCCEEDED(
         LookAndFeel::GetInt(LookAndFeel::eIntID_WindowsThemeIdentifier,
                             &metricResult))) {
     nsCSSRuleProcessor::SetWindowsThemeIdentifier(static_cast<uint8_t>(metricResult));
     switch(metricResult) {
       case LookAndFeel::eWindowsTheme_Aero:
         sSystemMetrics->AppendElement(nsGkAtoms::windows_theme_aero);
--- a/layout/style/nsMediaFeatures.cpp
+++ b/layout/style/nsMediaFeatures.cpp
@@ -774,25 +774,16 @@ nsMediaFeatures::features[] = {
     &nsGkAtoms::_moz_swipe_animation_enabled,
     nsMediaFeature::eMinMaxNotAllowed,
     nsMediaFeature::eBoolInteger,
     nsMediaFeature::eNoRequirements,
     { &nsGkAtoms::swipe_animation_enabled },
     GetSystemMetric
   },
 
-  {
-    &nsGkAtoms::_moz_physical_home_button,
-    nsMediaFeature::eMinMaxNotAllowed,
-    nsMediaFeature::eBoolInteger,
-    nsMediaFeature::eNoRequirements,
-    { &nsGkAtoms::physical_home_button },
-    GetSystemMetric
-  },
-
   // Internal -moz-is-glyph media feature: applies only inside SVG glyphs.
   // Internal because it is really only useful in the user agent anyway
   //  and therefore not worth standardizing.
   {
     &nsGkAtoms::_moz_is_glyph,
     nsMediaFeature::eMinMaxNotAllowed,
     nsMediaFeature::eBoolInteger,
     nsMediaFeature::eNoRequirements,
--- a/widget/LookAndFeel.h
+++ b/widget/LookAndFeel.h
@@ -383,23 +383,16 @@ public:
      */
     eIntID_TooltipDelay,
     /*
      * A Boolean value to determine whether Mac OS X Lion style swipe animations
      * should be used.
      */
     eIntID_SwipeAnimationEnabled,
 
-    /*
-     * A boolean value indicating whether or not the device has a hardware
-     * home button. Used on gaia to determine whether a home button
-     * is shown.
-     */
-     eIntID_PhysicalHomeButton,
-
      /*
       * Controls whether overlay scrollbars display when the user moves
       * the mouse in a scrollable frame.
       */
      eIntID_ScrollbarDisplayOnMouseMove,
 
      /*
       * Overlay scrollbar animation constants.
--- a/widget/headless/HeadlessLookAndFeelGTK.cpp
+++ b/widget/headless/HeadlessLookAndFeelGTK.cpp
@@ -258,19 +258,16 @@ HeadlessLookAndFeel::GetIntImpl(IntID aI
       aResult = 0;
       break;
     case eIntID_TooltipDelay:
       aResult = 500;
       break;
     case eIntID_SwipeAnimationEnabled:
       aResult = 0;
       break;
-    case eIntID_PhysicalHomeButton:
-      aResult = 0;
-      break;
     case eIntID_ScrollbarDisplayOnMouseMove:
       aResult = 0;
       break;
     case eIntID_ScrollbarFadeBeginDelay:
       aResult = 0;
       break;
     case eIntID_ScrollbarFadeDuration:
       aResult = 0;
--- a/widget/nsXPLookAndFeel.cpp
+++ b/widget/nsXPLookAndFeel.cpp
@@ -112,19 +112,16 @@ nsLookAndFeelIntPref nsXPLookAndFeel::sI
     eIntID_SpellCheckerUnderlineStyle,
     false, 0 },
   { "ui.scrollbarButtonAutoRepeatBehavior",
     eIntID_ScrollbarButtonAutoRepeatBehavior,
     false, 0 },
   { "ui.tooltipDelay",
     eIntID_TooltipDelay,
     false, 0 },
-  { "ui.physicalHomeButton",
-    eIntID_PhysicalHomeButton,
-    false, 0 },
   { "ui.contextMenuOffsetVertical",
     eIntID_ContextMenuOffsetVertical,
     false, 0 },
   { "ui.contextMenuOffsetHorizontal",
     eIntID_ContextMenuOffsetHorizontal,
     false, 0 }
 };