Bug 1419170 - Remove the statusbar and statusbarpanel bindings;r=paolo draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Mon, 27 Nov 2017 09:17:04 -0800
changeset 703735 3ca507e49f496acc2790a443ebe720572f06630e
parent 703363 4ce67352b2a9744ac51f0333cea0455e3d59bbf3
child 741891 88c4f3fc6c066b8cc6ba6707001d0ec47b3760b1
push id90947
push userbgrinstead@mozilla.com
push dateMon, 27 Nov 2017 17:17:28 +0000
reviewerspaolo
bugs1419170
milestone59.0a1
Bug 1419170 - Remove the statusbar and statusbarpanel bindings;r=paolo MozReview-Commit-ID: DbwMUBpHcri
accessible/base/XULMap.h
accessible/base/nsAccessibilityService.cpp
toolkit/content/tests/chrome/chrome.ini
toolkit/content/tests/chrome/test_statusbar.xul
toolkit/content/widgets/general.xml
toolkit/content/xul.css
toolkit/themes/linux/global/global.css
toolkit/themes/osx/global/global.css
toolkit/themes/windows/global/global.css
--- a/accessible/base/XULMap.h
+++ b/accessible/base/XULMap.h
@@ -1,6 +1,7 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 XULMAP(image, New_MaybeImageOrToolbarButtonAccessible)
+XULMAP(statusbar, New_StatusBarAccessible)
 XULMAP(menuseparator, New_MenuSeparator)
--- a/accessible/base/nsAccessibilityService.cpp
+++ b/accessible/base/nsAccessibilityService.cpp
@@ -267,21 +267,23 @@ New_MaybeImageOrToolbarButtonAccessible(
 
   // Don't include nameless images in accessible tree.
   if (!aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::tooltiptext)) {
     return nullptr;
   }
 
   return new ImageAccessibleWrap(aContent, aContext->Document());
 }
-
 static Accessible*
 New_MenuSeparator(nsIContent* aContent, Accessible* aContext)
   { return new XULMenuSeparatorAccessible(aContent, aContext->Document()); }
 
+static Accessible*
+New_StatusBarAccessible(nsIContent* aContent, Accessible* aContext)
+  { return new XULStatusBarAccessible(aContent, aContext->Document()); }
 #endif
 
 /**
  * Cached value of the PREF_ACCESSIBILITY_FORCE_DISABLED preference.
  */
 static int32_t sPlatformDisabledState = 0;
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -1543,19 +1545,16 @@ nsAccessibilityService::CreateAccessible
                               nsGkAtoms::_true, eCaseMatters))
       accessible = new XULAlertAccessible(aContent, aDoc);
     else
       accessible = new EnumRoleAccessible<roles::PANE>(aContent, aDoc);
 
   } else if (role.EqualsLiteral("xul:progressmeter")) {
     accessible = new XULProgressMeterAccessible(aContent, aDoc);
 
-  } else if (role.EqualsLiteral("xul:statusbar")) {
-    accessible = new XULStatusBarAccessible(aContent, aDoc);
-
   } else if (role.EqualsLiteral("xul:scale")) {
     accessible = new XULSliderAccessible(aContent, aDoc);
 
   } else if (role.EqualsLiteral("xul:radiobutton")) {
     accessible = new XULRadioButtonAccessible(aContent, aDoc);
 
   } else if (role.EqualsLiteral("xul:radiogroup")) {
     accessible = new XULRadioGroupAccessible(aContent, aDoc);
--- a/toolkit/content/tests/chrome/chrome.ini
+++ b/toolkit/content/tests/chrome/chrome.ini
@@ -162,17 +162,16 @@ support-files = window_preferences_onsyn
 [test_richlist_direction.xul]
 [test_righttoleft.xul]
 [test_scale.xul]
 [test_scaledrag.xul]
 [test_screenPersistence.xul]
 [test_scrollbar.xul]
 [test_showcaret.xul]
 [test_sorttemplate.xul]
-[test_statusbar.xul]
 [test_subframe_origin.xul]
 [test_tabbox.xul]
 [test_tabindex.xul]
 [test_textbox_dictionary.xul]
 [test_textbox_emptytext.xul]
 [test_textbox_number.xul]
 [test_textbox_search.xul]
 [test_timepicker.xul]
deleted file mode 100644
--- a/toolkit/content/tests/chrome/test_statusbar.xul
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
-  XUL Widget Test for statusbar
-  -->
-<window title="Statusbar Test"
-        onload="setTimeout(test_statusbar, 0);"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript"
-          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript"
-          src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
-
-<statusbar>
-  <statusbarpanel id="panel" label="OK" image="happy.png"/>
-</statusbar>
-
-  <!-- test results are displayed in the html:body -->
-  <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
-  <!-- test code goes here -->
-  <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function test_statusbar()
-{
-  var panel = $("panel");
-  ok(panel.label, "OK", "statusbarpanel label");
-  ok(panel.image, "happy.png", "statusbarpanel image");
-  panel.src = "sad.png";
-  ok(panel.src, "sad.png", "statusbarpanel set src");
-  ok(panel.getAttribute("src"), "sad.png", "statusbarpanel set src attribute");
-
-  SimpleTest.finish();
-}
-
-]]>
-</script>
-
-</window>
--- a/toolkit/content/widgets/general.xml
+++ b/toolkit/content/widgets/general.xml
@@ -90,45 +90,16 @@
       <property name="webNavigation"
                 onget="return this.docShell.QueryInterface(Components.interfaces.nsIWebNavigation);"
                 readonly="true"/>
       <property name="contentDocument" readonly="true"
                 onget="return this.webNavigation.document;"/>
     </implementation>
   </binding>
 
-  <binding id="statusbarpanel" display="xul:button">
-    <content>
-      <children>
-        <xul:label xbl:inherits="value=label,crop" crop="right" flex="1"/>
-      </children>
-    </content>
-
-    <implementation>
-      <property name="label"
-                onget="return this.getAttribute('label');"
-                onset="this.setAttribute('label',val); return val;"/>
-      <property name="image"
-                onget="return this.getAttribute('image');"
-                onset="this.setAttribute('image',val); return val;"/>
-      <property name="src"
-                onget="return this.getAttribute('src');"
-                onset="this.setAttribute('src',val); return val;"/>
-    </implementation>
-  </binding>
-
-  <binding id="statusbar" role="xul:statusbar">
-    <content>
-      <children/>
-      <xul:statusbarpanel class="statusbar-resizerpanel">
-        <xul:resizer dir="bottomend"/>
-      </xul:statusbarpanel>
-    </content>
-  </binding>
-
   <binding id="deck">
     <implementation>
       <property name="selectedIndex"
                 onget="return this.getAttribute('selectedIndex') || '0'">
         <setter>
         <![CDATA[
           if (this.selectedIndex == val)
             return val;
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -247,17 +247,16 @@ caption {
   -moz-box-orient: vertical;
 }
 
 /******** draggable elements *********/
 
 %ifndef MOZ_WIDGET_GTK
 titlebar,
 toolbar:not([nowindowdrag="true"]):not([customizing="true"]),
-statusbar:not([nowindowdrag="true"]),
 %endif
 windowdragbox {
   -moz-window-dragging: drag;
 }
 
 /* The list below is non-comprehensive and will probably need some tweaking. */
 toolbaritem,
 toolbarbutton,
@@ -496,26 +495,16 @@ panel[type="arrow"][side][animate="cance
   transform: none;
 }
 
 %endif
 panel[type="arrow"][animating] {
   pointer-events: none;
 }
 
-%ifdef XP_MACOSX
-.statusbar-resizerpanel {
-  display: none;
-}
-%else
-window[sizemode="maximized"] statusbarpanel.statusbar-resizerpanel {
-  visibility: collapse;
-}
-%endif
-
 /******** grid **********/
 
 grid {
   display: -moz-grid;
 }
 
 rows,
 columns {
@@ -999,29 +988,16 @@ arrowscrollbox {
 arrowscrollbox[clicktoscroll="true"] {
   -moz-binding: url("chrome://global/content/bindings/scrollbox.xml#arrowscrollbox-clicktoscroll");
 }
 
 autorepeatbutton {
   -moz-binding: url("chrome://global/content/bindings/scrollbox.xml#autorepeatbutton");
 }
 
-/********** statusbar **********/
-
-statusbar {
-  -moz-binding: url("chrome://global/content/bindings/general.xml#statusbar");
-%ifdef XP_MACOSX
-  padding-right: 14px;
-%endif
-}
-
-statusbarpanel {
-  -moz-binding: url("chrome://global/content/bindings/general.xml#statusbarpanel");
-}
-
 /********** spinbuttons ***********/
 
 spinbuttons {
   -moz-binding: url("chrome://global/content/bindings/spinbuttons.xml#spinbuttons");
 }
 
 .spinbuttons-button {
   -moz-user-focus: ignore;
--- a/toolkit/themes/linux/global/global.css
+++ b/toolkit/themes/linux/global/global.css
@@ -85,41 +85,16 @@ window.dialog {
 iframe {
   border: none;
   width: 100px;
   height: 100px;
   min-width: 10px;
   min-height: 10px;
 }
 
-/* ::::: statusbar ::::: */
-
-statusbar {
-  -moz-appearance: statusbar;
-  min-height: 22px;
-}
-
-statusbar:-moz-lwtheme {
-  -moz-appearance: none;
-}
-
-statusbarpanel {
-  -moz-appearance: statusbarpanel;
-  -moz-box-align: center;
-  -moz-box-pack: center;
-  padding: 0 4px;
-}
-
-.statusbar-resizerpanel {
-  -moz-box-align: end;
-  -moz-box-pack: end;
-  -moz-appearance: resizerpanel;
-  padding: 0;
-}
-
 /* XXXBlake yeah, shoot me -- these don't belong here.  I'll move them later. */
 
 sidebarheader {
   min-height: 25px;
   text-shadow: none;
 }
 
 sidebarheader > label {
@@ -132,18 +107,17 @@ sidebarheader > label {
 
 toolbar[mode="text"] .toolbarbutton-text {
   padding: 0 !important;
   margin: 3px 5px !important;
 }
 
 /* ::::: miscellaneous formatting ::::: */
 
-:root:-moz-lwtheme,
-statusbarpanel:-moz-lwtheme {
+:root:-moz-lwtheme {
   -moz-appearance: none;
 }
 
 :root:-moz-lwtheme-darktext {
   text-shadow: 0 -0.5px 1.5px white;
 }
 
 :root:-moz-lwtheme-brighttext {
--- a/toolkit/themes/osx/global/global.css
+++ b/toolkit/themes/osx/global/global.css
@@ -87,35 +87,16 @@ window.dialog {
 iframe {
   border: none;
   width: 100px;
   height: 100px;
   min-width: 10px;
   min-height: 10px;
 }
 
-/* ::::: statusbar ::::: */
-
-statusbar {
-  min-width: 1px; /* DON'T DELETE!
-  Prevents hiding of scrollbars in browser when window is made smaller.*/
-  min-height: 15px !important;
-  margin: 0px !important;
-  /* need to use padding-inline-end when/if bug 631729 gets fixed: */
-  padding: 0px 16px 1px 1px;
-  -moz-appearance: statusbar;
-  text-shadow: rgba(255, 255, 255, 0.4) 0 1px;
-}
-
-statusbarpanel {
-  -moz-box-align: center;
-  -moz-box-pack: center;
-  padding: 0 4px;
-}
-
 /* ::::: miscellaneous formatting ::::: */
 
 sidebarheader {
   background-color: -moz-Dialog;
   color: -moz-dialogText;
   text-shadow: none;
 }
 
@@ -126,23 +107,16 @@ sidebarheader {
 :root:-moz-lwtheme-darktext {
   text-shadow: 0 -0.5px 1.5px white;
 }
 
 :root:-moz-lwtheme-brighttext {
   text-shadow: 1px 1px 1.5px black;
 }
 
-statusbar:-moz-lwtheme {
-  -moz-appearance: none;
-  background: none;
-  border-style: none;
-  text-shadow: inherit;
-}
-
 .inset {
   border: 1px solid ThreeDShadow;
   border-right-color: ThreeDHighlight;
   border-bottom-color: ThreeDHighlight;
   margin: 0 5px 5px;
 }
 
 .outset {
--- a/toolkit/themes/windows/global/global.css
+++ b/toolkit/themes/windows/global/global.css
@@ -90,54 +90,16 @@ window.dialog {
 iframe {
   border: none;
   width: 100px;
   height: 100px;
   min-width: 10px;
   min-height: 10px;
 }
 
-/* ::::: statusbar ::::: */
-
-statusbar {
-  -moz-appearance: statusbar;
-  border-top: 1px solid ThreeDLightShadow;
-  border-left: 1px solid ThreeDShadow;
-  border-right: 1px solid ThreeDHighlight;
-  border-bottom: 1px solid ThreeDHighlight;
-  background-color: -moz-Dialog;
-  min-height: 22px;
-}
-
-statusbarpanel {
-  -moz-appearance: statusbarpanel;
-  -moz-box-align: center;
-  -moz-box-pack: center;
-  border-left: 1px solid ThreeDHighlight;
-  border-top: 1px solid ThreeDHighlight;
-  border-right: 1px solid ThreeDShadow;
-  border-bottom: 1px solid ThreeDShadow;
-  padding: 0 4px;
-}
-
-statusbarpanel:not(.statusbar-resizerpanel):-moz-lwtheme {
-  -moz-appearance: none;
-  border-top-style: none;
-  border-bottom-style: none;
-  border-inline-start-style: none;
-}
-
-.statusbar-resizerpanel {
-  -moz-box-align: end;
-  -moz-box-pack: end;
-  -moz-appearance: resizerpanel;
-  padding: 0;
-  border: none;
-}
-
 /* XXXBlake yeah, shoot me -- these don't belong here.  I'll move them later. */
 
 sidebarheader {
   min-height: 25px;
   text-shadow: none;
 }
 
 sidebarheader > label {
@@ -158,22 +120,16 @@ toolbar[mode="text"] .toolbarbutton-text
 :root:-moz-lwtheme-darktext {
   text-shadow: 0 -0.5px 1.5px white;
 }
 
 :root:-moz-lwtheme-brighttext {
   text-shadow: 1px 1px 1.5px black;
 }
 
-statusbar:-moz-lwtheme {
-  -moz-appearance: none;
-  background: none;
-  border-style: none;
-}
-
 .inset {
   border: 1px solid ThreeDShadow;
   border-right-color: ThreeDHighlight;
   border-bottom-color: ThreeDHighlight;
   margin: 0 5px 5px;
 }
 
 .outset {