Bug 1448126 - Part 2 - Remove the "scale" binding and its supporting platform code. r=bgrins
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Sun, 24 Jun 2018 17:19:25 +0100
changeset 423685 7cf808cb0b0d
parent 423684 14cc2c33cf99
child 423686 d75a2e268774
push id104631
push userpaolo.mozmail@amadzone.org
push dateTue, 26 Jun 2018 12:12:11 +0000
treeherdermozilla-inbound@7cf808cb0b0d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1448126
milestone63.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 1448126 - Part 2 - Remove the "scale" binding and its supporting platform code. r=bgrins MozReview-Commit-ID: ETmUuosYxeG
accessible/base/XULMap.h
accessible/base/nsAccessibilityService.cpp
accessible/xul/XULSliderAccessible.cpp
accessible/xul/XULSliderAccessible.h
accessible/xul/moz.build
browser/installer/allowed-dupes.mn
dom/base/nsFocusManager.cpp
layout/xul/moz.build
layout/xul/nsISliderListener.idl
layout/xul/nsSliderFrame.cpp
mobile/android/installer/allowed-dupes.mn
toolkit/content/jar.mn
toolkit/content/minimal-xul.css
toolkit/content/widgets/scale.xml
toolkit/content/xul.css
toolkit/themes/mobile/jar.mn
toolkit/themes/shared/jar.inc.mn
toolkit/themes/shared/scale.css
--- a/accessible/base/XULMap.h
+++ b/accessible/base/XULMap.h
@@ -22,17 +22,16 @@ XULMAP_TYPE(menuitem, XULMenuitemAccessi
 XULMAP_TYPE(menulist, XULComboboxAccessible)
 XULMAP_TYPE(menuseparator, XULMenuSeparatorAccessible)
 XULMAP_TYPE(notification, XULAlertAccessible)
 XULMAP_TYPE(progressmeter, XULProgressMeterAccessible)
 XULMAP_TYPE(radio, XULRadioButtonAccessible)
 XULMAP_TYPE(radiogroup, XULRadioGroupAccessible)
 XULMAP_TYPE(richlistbox, XULListboxAccessibleWrap)
 XULMAP_TYPE(richlistitem, XULListitemAccessible)
-XULMAP_TYPE(scale, XULSliderAccessible)
 XULMAP_TYPE(statusbar, XULStatusBarAccessible)
 XULMAP_TYPE(tab, XULTabAccessible)
 XULMAP_TYPE(tabpanels, XULTabpanelsAccessible)
 XULMAP_TYPE(tabs, XULTabsAccessible)
 XULMAP_TYPE(toolbarseparator, XULToolbarSeparatorAccessible)
 XULMAP_TYPE(toolbarspacer, XULToolbarSeparatorAccessible)
 XULMAP_TYPE(toolbarspring, XULToolbarSeparatorAccessible)
 XULMAP_TYPE(treecol, XULColumnItemAccessible)
@@ -145,26 +144,16 @@ XULMAP(
       return new XULComboboxAccessible(aElement, aContext->Document());
     }
 
     return new EnumRoleAccessible<roles::SECTION>(aElement, aContext->Document());
   }
 )
 
 XULMAP(
-  thumb,
-  [](Element* aElement, Accessible* aContext) -> Accessible* {
-    if (aElement->ClassList()->Contains(NS_LITERAL_STRING("scale-thumb"))) {
-      return new XULThumbAccessible(aElement, aContext->Document());
-    }
-    return nullptr;
-  }
-)
-
-XULMAP(
   tree,
   [](Element* aElement, Accessible* aContext) -> Accessible* {
     nsIContent* child = nsTreeUtils::GetDescendantChild(aElement,
                                                         nsGkAtoms::treechildren);
     if (!child)
       return nullptr;
 
     nsTreeBodyFrame* treeFrame = do_QueryFrame(child->GetPrimaryFrame());
--- a/accessible/base/nsAccessibilityService.cpp
+++ b/accessible/base/nsAccessibilityService.cpp
@@ -76,17 +76,16 @@
 #ifdef MOZ_XUL
 #include "XULAlertAccessible.h"
 #include "XULColorPickerAccessible.h"
 #include "XULComboboxAccessible.h"
 #include "XULElementAccessibles.h"
 #include "XULFormControlAccessible.h"
 #include "XULListboxAccessibleWrap.h"
 #include "XULMenuAccessibleWrap.h"
-#include "XULSliderAccessible.h"
 #include "XULTabAccessible.h"
 #include "XULTreeGridAccessibleWrap.h"
 #endif
 
 #if defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK)
 #include "nsNPAPIPluginInstance.h"
 #endif
 
deleted file mode 100644
--- a/accessible/xul/XULSliderAccessible.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-
-#include "XULSliderAccessible.h"
-
-#include "nsAccessibilityService.h"
-#include "Role.h"
-#include "States.h"
-
-#include "nsIFrame.h"
-#include "mozilla/dom/Element.h"
-#include "mozilla/FloatingPoint.h"
-
-namespace mozilla {
-namespace a11y {
-
-////////////////////////////////////////////////////////////////////////////////
-// XULSliderAccessible
-////////////////////////////////////////////////////////////////////////////////
-
-XULSliderAccessible::
-  XULSliderAccessible(nsIContent* aContent, DocAccessible* aDoc) :
-  AccessibleWrap(aContent, aDoc)
-{
-  mStateFlags |= eHasNumericValue | eNoXBLKids;
-}
-
-// Accessible
-
-role
-XULSliderAccessible::NativeRole() const
-{
-  return roles::SLIDER;
-}
-
-uint64_t
-XULSliderAccessible::NativeInteractiveState() const
- {
-  if (NativelyUnavailable())
-    return states::UNAVAILABLE;
-
-  dom::Element* sliderElm = GetSliderElement();
-  if (sliderElm) {
-    nsIFrame* frame = sliderElm->GetPrimaryFrame();
-    if (frame && frame->IsFocusable())
-      return states::FOCUSABLE;
-  }
-
-  return 0;
-}
-
-bool
-XULSliderAccessible::NativelyUnavailable() const
-{
-  return mContent->AsElement()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::disabled,
-                                            nsGkAtoms::_true, eCaseMatters);
-}
-
-void
-XULSliderAccessible::Value(nsString& aValue) const
-{
-  GetSliderAttr(nsGkAtoms::curpos, aValue);
-}
-
-uint8_t
-XULSliderAccessible::ActionCount() const
-{
-  return 1;
-}
-
-void
-XULSliderAccessible::ActionNameAt(uint8_t aIndex, nsAString& aName)
-{
-  aName.Truncate();
-  if (aIndex == 0)
-    aName.AssignLiteral("activate");
-}
-
-bool
-XULSliderAccessible::DoAction(uint8_t aIndex) const
-{
-  if (aIndex != 0)
-    return false;
-
-  dom::Element* sliderElm = GetSliderElement();
-  if (sliderElm)
-    DoCommand(sliderElm);
-
-  return true;
-}
-
-double
-XULSliderAccessible::MaxValue() const
-{
-  double value = AccessibleWrap::MaxValue();
-  return IsNaN(value) ? GetSliderAttr(nsGkAtoms::maxpos) : value;
-}
-
-double
-XULSliderAccessible::MinValue() const
-{
-  double value = AccessibleWrap::MinValue();
-  return IsNaN(value) ? GetSliderAttr(nsGkAtoms::minpos) : value;
-}
-
-double
-XULSliderAccessible::Step() const
-{
-  double value = AccessibleWrap::Step();
-  return IsNaN(value) ? GetSliderAttr(nsGkAtoms::increment) : value;
-}
-
-double
-XULSliderAccessible::CurValue() const
-{
-  double value = AccessibleWrap::CurValue();
-  return IsNaN(value) ? GetSliderAttr(nsGkAtoms::curpos) : value;
-}
-
-bool
-XULSliderAccessible::SetCurValue(double aValue)
-{
-  if (AccessibleWrap::SetCurValue(aValue))
-    return true;
-
-  return SetSliderAttr(nsGkAtoms::curpos, aValue);
-}
-
-// Utils
-
-dom::Element*
-XULSliderAccessible::GetSliderElement() const
-{
-  if (!mSliderElement) {
-    // XXX: we depend on anonymous content.
-    mSliderElement = mContent->OwnerDoc()->
-      GetAnonymousElementByAttribute(mContent, nsGkAtoms::anonid,
-                                     NS_LITERAL_STRING("slider"));
-  }
-
-  return mSliderElement;
-}
-
-nsresult
-XULSliderAccessible::GetSliderAttr(nsAtom* aName, nsAString& aValue) const
-{
-  aValue.Truncate();
-
-  if (IsDefunct())
-    return NS_ERROR_FAILURE;
-
-  Element* sliderElm = GetSliderElement();
-  if (sliderElm)
-    sliderElm->GetAttr(kNameSpaceID_None, aName, aValue);
-
-  return NS_OK;
-}
-
-nsresult
-XULSliderAccessible::SetSliderAttr(nsAtom* aName, const nsAString& aValue)
-{
-  if (IsDefunct())
-    return NS_ERROR_FAILURE;
-
-  if (dom::Element* sliderElm = GetSliderElement())
-    sliderElm->SetAttr(kNameSpaceID_None, aName, aValue, true);
-
-  return NS_OK;
-}
-
-double
-XULSliderAccessible::GetSliderAttr(nsAtom* aName) const
-{
-  nsAutoString attrValue;
-  nsresult rv = GetSliderAttr(aName, attrValue);
-  if (NS_FAILED(rv))
-    return UnspecifiedNaN<double>();
-
-  nsresult error = NS_OK;
-  double value = attrValue.ToDouble(&error);
-  return NS_FAILED(error) ? UnspecifiedNaN<double>() : value;
-}
-
-bool
-XULSliderAccessible::SetSliderAttr(nsAtom* aName, double aValue)
-{
-  nsAutoString value;
-  value.AppendFloat(aValue);
-
-  return NS_SUCCEEDED(SetSliderAttr(aName, value));
-}
-
-
-////////////////////////////////////////////////////////////////////////////////
-// XULThumbAccessible
-////////////////////////////////////////////////////////////////////////////////
-
-XULThumbAccessible::
-  XULThumbAccessible(nsIContent* aContent, DocAccessible* aDoc) :
-  AccessibleWrap(aContent, aDoc)
-{
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// XULThumbAccessible: Accessible
-
-role
-XULThumbAccessible::NativeRole() const
-{
-  return roles::INDICATOR;
-}
-
-}
-}
deleted file mode 100644
--- a/accessible/xul/XULSliderAccessible.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-
-#ifndef mozilla_a11y_XULSliderAccessible_h__
-#define mozilla_a11y_XULSliderAccessible_h__
-
-#include "AccessibleWrap.h"
-
-namespace mozilla {
-namespace a11y {
-
-/**
- * Used for XUL slider and scale elements.
- */
-class XULSliderAccessible : public AccessibleWrap
-{
-public:
-  XULSliderAccessible(nsIContent* aContent, DocAccessible* aDoc);
-
-  // Accessible
-  virtual void Value(nsString& aValue) const override;
-  virtual a11y::role NativeRole() const override;
-  virtual uint64_t NativeInteractiveState() const override;
-  virtual bool NativelyUnavailable() const override;
-
-  // Value
-  virtual double MaxValue() const override;
-  virtual double MinValue() const override;
-  virtual double CurValue() const override;
-  virtual double Step() const override;
-  virtual bool SetCurValue(double aValue) override;
-
-  // ActionAccessible
-  virtual uint8_t ActionCount() const override;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
-  virtual bool DoAction(uint8_t aIndex) const override;
-
-protected:
-  /**
-   * Return anonymous slider element.
-   */
-  dom::Element* GetSliderElement() const;
-
-  nsresult GetSliderAttr(nsAtom *aName, nsAString& aValue) const;
-  nsresult SetSliderAttr(nsAtom *aName, const nsAString& aValue);
-
-  double GetSliderAttr(nsAtom *aName) const;
-  bool SetSliderAttr(nsAtom *aName, double aValue);
-
-private:
-  mutable RefPtr<dom::Element> mSliderElement;
-};
-
-
-/**
- * Used for slider's thumb element.
- */
-class XULThumbAccessible : public AccessibleWrap
-{
-public:
-  XULThumbAccessible(nsIContent* aContent, DocAccessible* aDoc);
-
-  // Accessible
-  virtual a11y::role NativeRole() const override;
-};
-
-} // namespace a11y
-} // namespace mozilla
-
-#endif
-
--- a/accessible/xul/moz.build
+++ b/accessible/xul/moz.build
@@ -8,17 +8,16 @@ UNIFIED_SOURCES += [
     'XULAlertAccessible.cpp',
     'XULColorPickerAccessible.cpp',
     'XULComboboxAccessible.cpp',
     'XULElementAccessibles.cpp',
     'XULFormControlAccessible.cpp',
     'XULListboxAccessible.cpp',
     'XULMenuAccessible.cpp',
     'XULSelectControlAccessible.cpp',
-    'XULSliderAccessible.cpp',
     'XULTabAccessible.cpp',
     'XULTreeAccessible.cpp',
     'XULTreeGridAccessible.cpp',
 ]
 
 LOCAL_INCLUDES += [
     '/accessible/base',
     '/accessible/generic',
--- a/browser/installer/allowed-dupes.mn
+++ b/browser/installer/allowed-dupes.mn
@@ -98,17 +98,16 @@ chrome/toolkit/skin/classic/global/listb
 chrome/toolkit/skin/classic/global/menu.css
 chrome/toolkit/skin/classic/global/menulist.css
 chrome/toolkit/skin/classic/global/numberbox.css
 chrome/toolkit/skin/classic/global/popup.css
 chrome/toolkit/skin/classic/global/preferences.css
 chrome/toolkit/skin/classic/global/progressmeter.css
 chrome/toolkit/skin/classic/global/radio.css
 chrome/toolkit/skin/classic/global/richlistbox.css
-chrome/toolkit/skin/classic/global/scale.css
 chrome/toolkit/skin/classic/global/scrollbars.css
 chrome/toolkit/skin/classic/global/scrollbox.css
 chrome/toolkit/skin/classic/global/splitter.css
 chrome/toolkit/skin/classic/global/tabbox.css
 chrome/toolkit/skin/classic/global/textbox.css
 chrome/toolkit/skin/classic/global/toolbar.css
 chrome/toolkit/skin/classic/global/toolbarbutton.css
 chrome/toolkit/skin/classic/global/tree.css
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -374,28 +374,16 @@ nsFocusManager::GetRedirectedFocus(nsICo
     }
     else {
       nsCOMPtr<nsIDOMXULMenuListElement> menulist = do_QueryInterface(aContent);
       if (menulist) {
         RefPtr<Element> inputField;
         menulist->GetInputField(getter_AddRefs(inputField));
         return inputField;
       }
-      else if (aContent->IsXULElement(nsGkAtoms::scale)) {
-        nsCOMPtr<nsIDocument> doc = aContent->GetComposedDoc();
-        if (!doc)
-          return nullptr;
-
-        nsINodeList* children = doc->BindingManager()->GetAnonymousNodesFor(aContent);
-        if (children) {
-          nsIContent* child = children->Item(0);
-          if (child && child->IsXULElement(nsGkAtoms::slider))
-            return child->AsElement();
-        }
-      }
     }
   }
 #endif
 
   return nullptr;
 }
 
 // static
--- a/layout/xul/moz.build
+++ b/layout/xul/moz.build
@@ -13,17 +13,16 @@ with Files('*Menu*'):
 if CONFIG['ENABLE_TESTS']:
     MOCHITEST_MANIFESTS += ['test/mochitest.ini']
     MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
     BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
 
 XPIDL_SOURCES += [
     'nsIBoxObject.idl',
     'nsIListBoxObject.idl',
-    'nsISliderListener.idl',
 ]
 
 XPIDL_MODULE = 'layout_xul'
 
 EXPORTS += [
     'nsBox.h',
     'nsIScrollbarMediator.h',
     'nsPIBoxObject.h',
deleted file mode 100644
--- a/layout/xul/nsISliderListener.idl
+++ /dev/null
@@ -1,26 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-
-#include "nsISupports.idl"
-
-/**
- * Used for <scale> to listen to slider changes to avoid mutation listeners
- */
-[scriptable, uuid(e5b3074e-ee18-4538-83b9-2487d90a2a34)]
-interface nsISliderListener : nsISupports
-{
-  /**
-   * Called when the current, minimum or maximum value has been changed to
-   * newValue. The which parameter will either be 'curpos', 'minpos' or 'maxpos'.
-   * If userChanged is true, then the user changed ths slider, otherwise it
-   * was changed via some other means.
-   */
-  void valueChanged(in AString which, in long newValue, in boolean userChanged);
-
-  /**
-   * Called when the user begins or ends dragging the thumb.
-   */
-  void dragStateChanged(in boolean isDragging);
-};
--- a/layout/xul/nsSliderFrame.cpp
+++ b/layout/xul/nsSliderFrame.cpp
@@ -19,17 +19,16 @@
 #include "nsIContent.h"
 #include "nsCOMPtr.h"
 #include "nsNameSpaceManager.h"
 #include "nsGkAtoms.h"
 #include "nsHTMLParts.h"
 #include "nsIPresShell.h"
 #include "nsCSSRendering.h"
 #include "nsScrollbarButtonFrame.h"
-#include "nsISliderListener.h"
 #include "nsIScrollableFrame.h"
 #include "nsIScrollbarMediator.h"
 #include "nsISupportsImpl.h"
 #include "nsScrollbarFrame.h"
 #include "nsRepeatService.h"
 #include "nsBoxLayoutState.h"
 #include "nsSprocketLayout.h"
 #include "nsIServiceManager.h"
@@ -198,60 +197,16 @@ nsSliderFrame::GetIntegerAttribute(nsICo
 
       // convert it to an integer
       defaultValue = value.ToInteger(&error);
     }
 
     return defaultValue;
 }
 
-class nsValueChangedRunnable : public Runnable
-{
-public:
-  nsValueChangedRunnable(nsISliderListener* aListener,
-                         nsAtom* aWhich,
-                         int32_t aValue,
-                         bool aUserChanged)
-    : mozilla::Runnable("nsValueChangedRunnable")
-    , mListener(aListener)
-    , mWhich(aWhich)
-    , mValue(aValue)
-    , mUserChanged(aUserChanged)
-  {}
-
-  NS_IMETHOD Run() override
-  {
-    return mListener->ValueChanged(nsDependentAtomString(mWhich),
-                                   mValue, mUserChanged);
-  }
-
-  nsCOMPtr<nsISliderListener> mListener;
-  RefPtr<nsAtom> mWhich;
-  int32_t mValue;
-  bool mUserChanged;
-};
-
-class nsDragStateChangedRunnable : public Runnable
-{
-public:
-  nsDragStateChangedRunnable(nsISliderListener* aListener, bool aDragBeginning)
-    : mozilla::Runnable("nsDragStateChangedRunnable")
-    , mListener(aListener)
-    , mDragBeginning(aDragBeginning)
-  {}
-
-  NS_IMETHOD Run() override
-  {
-    return mListener->DragStateChanged(mDragBeginning);
-  }
-
-  nsCOMPtr<nsISliderListener> mListener;
-  bool mDragBeginning;
-};
-
 nsresult
 nsSliderFrame::AttributeChanged(int32_t aNameSpaceID,
                                 nsAtom* aAttribute,
                                 int32_t aModType)
 {
   nsresult rv = nsBoxFrame::AttributeChanged(aNameSpaceID, aAttribute,
                                              aModType);
   // if the current position changes
@@ -262,27 +217,16 @@ nsSliderFrame::AttributeChanged(int32_t 
       // bounds check it.
 
       nsIFrame* scrollbarBox = GetScrollbar();
       nsCOMPtr<nsIContent> scrollbar = GetContentOfBox(scrollbarBox);
       int32_t current = GetCurrentPosition(scrollbar);
       int32_t min = GetMinPosition(scrollbar);
       int32_t max = GetMaxPosition(scrollbar);
 
-      // inform the parent <scale> that the minimum or maximum changed
-      nsIFrame* parent = GetParent();
-      if (parent) {
-        nsCOMPtr<nsISliderListener> sliderListener = do_QueryInterface(parent->GetContent());
-        if (sliderListener) {
-          nsContentUtils::AddScriptRunner(
-            new nsValueChangedRunnable(sliderListener, aAttribute,
-                                       aAttribute == nsGkAtoms::minpos ? min : max, false));
-        }
-      }
-
       if (current < min || current > max)
       {
         int32_t direction = 0;
         if (current < min || max < min) {
           current = min;
           direction = -1;
         } else if (current > max) {
           current = max;
@@ -853,26 +797,16 @@ nsSliderFrame::CurrentPositionChanged()
   nsScrollbarFrame* scrollbarFrame = do_QueryFrame(scrollbarBox);
   nsIScrollbarMediator* mediator = scrollbarFrame
       ? scrollbarFrame->GetScrollbarMediator() : nullptr;
   if (!mediator || !mediator->ShouldSuppressScrollbarRepaints()) {
     SchedulePaint();
   }
 
   mCurPos = curPos;
-
-  // inform the parent <scale> if it exists that the value changed
-  nsIFrame* parent = GetParent();
-  if (parent) {
-    nsCOMPtr<nsISliderListener> sliderListener = do_QueryInterface(parent->GetContent());
-    if (sliderListener) {
-      nsContentUtils::AddScriptRunner(
-        new nsValueChangedRunnable(sliderListener, nsGkAtoms::curpos, mCurPos, mUserChanged));
-    }
-  }
 }
 
 static void UpdateAttribute(Element* aScrollbar, nscoord aNewPos, bool aNotify, bool aIsSmooth) {
   nsAutoString str;
   str.AppendInt(aNewPos);
 
   if (aIsSmooth) {
     aScrollbar->SetAttr(kNameSpaceID_None, nsGkAtoms::smooth, NS_LITERAL_STRING("true"), false);
@@ -1251,26 +1185,16 @@ nsSliderFrame::StopDrag()
   return NS_OK;
 }
 
 void
 nsSliderFrame::DragThumb(bool aGrabMouseEvents)
 {
   mDragFinished = !aGrabMouseEvents;
 
-  // inform the parent <scale> that a drag is beginning or ending
-  nsIFrame* parent = GetParent();
-  if (parent) {
-    nsCOMPtr<nsISliderListener> sliderListener = do_QueryInterface(parent->GetContent());
-    if (sliderListener) {
-      nsContentUtils::AddScriptRunner(
-        new nsDragStateChangedRunnable(sliderListener, aGrabMouseEvents));
-    }
-  }
-
   nsIPresShell::SetCapturingContent(aGrabMouseEvents ? GetContent() : nullptr,
                                     aGrabMouseEvents ? CAPTURE_IGNOREALLOWED : 0);
 }
 
 bool
 nsSliderFrame::isDraggingThumb()
 {
   return (nsIPresShell::GetCapturingContent() == GetContent());
--- a/mobile/android/installer/allowed-dupes.mn
+++ b/mobile/android/installer/allowed-dupes.mn
@@ -16,17 +16,16 @@ chrome/toolkit/skin/classic/global/listb
 chrome/toolkit/skin/classic/global/menu.css
 chrome/toolkit/skin/classic/global/menulist.css
 chrome/toolkit/skin/classic/global/numberbox.css
 chrome/toolkit/skin/classic/global/popup.css
 chrome/toolkit/skin/classic/global/preferences.css
 chrome/toolkit/skin/classic/global/progressmeter.css
 chrome/toolkit/skin/classic/global/radio.css
 chrome/toolkit/skin/classic/global/richlistbox.css
-chrome/toolkit/skin/classic/global/scale.css
 chrome/toolkit/skin/classic/global/scrollbars.css
 chrome/toolkit/skin/classic/global/scrollbox.css
 chrome/toolkit/skin/classic/global/splitter.css
 chrome/toolkit/skin/classic/global/tabbox.css
 chrome/toolkit/skin/classic/global/textbox.css
 chrome/toolkit/skin/classic/global/toolbar.css
 chrome/toolkit/skin/classic/global/toolbarbutton.css
 chrome/toolkit/skin/classic/global/tree.css
--- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn
@@ -83,17 +83,16 @@ toolkit.jar:
    content/global/bindings/menulist.xml        (widgets/menulist.xml)
    content/global/bindings/notification.xml    (widgets/notification.xml)
    content/global/bindings/numberbox.xml       (widgets/numberbox.xml)
    content/global/bindings/popup.xml           (widgets/popup.xml)
    content/global/bindings/progressmeter.xml   (widgets/progressmeter.xml)
    content/global/bindings/radio.xml           (widgets/radio.xml)
    content/global/bindings/remote-browser.xml  (widgets/remote-browser.xml)
    content/global/bindings/richlistbox.xml     (widgets/richlistbox.xml)
-   content/global/bindings/scale.xml           (widgets/scale.xml)
    content/global/bindings/scrollbox.xml       (widgets/scrollbox.xml)
    content/global/bindings/spinner.js          (widgets/spinner.js)
 *  content/global/bindings/tabbox.xml          (widgets/tabbox.xml)
    content/global/bindings/text.xml            (widgets/text.xml)
 *  content/global/bindings/textbox.xml         (widgets/textbox.xml)
    content/global/bindings/timekeeper.js       (widgets/timekeeper.js)
    content/global/bindings/timepicker.js       (widgets/timepicker.js)
    content/global/bindings/toolbar.xml         (widgets/toolbar.xml)
--- a/toolkit/content/minimal-xul.css
+++ b/toolkit/content/minimal-xul.css
@@ -134,17 +134,17 @@ resizer[dir="topright"] {
 scrollbar[orient="horizontal"] {
   direction: ltr;
 }
 
 thumb {
   display: -moz-box !important;
 }
 
-scrollbar, scrollbarbutton, scrollcorner, slider, thumb, scale {
+scrollbar, scrollbarbutton, scrollcorner, slider, thumb {
   -moz-user-select: none;
 }
 
 scrollcorner {
   display: -moz-box !important;
 }
 
 scrollcorner[hidden="true"] {
deleted file mode 100644
--- a/toolkit/content/widgets/scale.xml
+++ /dev/null
@@ -1,219 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-
-
-<bindings id="scaleBindings"
-   xmlns="http://www.mozilla.org/xbl"
-   xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-   xmlns:xbl="http://www.mozilla.org/xbl">
-
-  <binding id="scale"
-           extends="chrome://global/content/bindings/general.xml#basecontrol">
-    <resources>
-      <stylesheet src="chrome://global/skin/scale.css"/>
-    </resources>
-
-    <content align="center" pack="center">
-      <xul:slider anonid="slider" class="scale-slider" snap="true" flex="1"
-                  xbl:inherits="disabled,orient,dir,curpos=value,minpos=min,maxpos=max,increment,pageincrement,movetoclick">
-        <xul:thumb class="scale-thumb" xbl:inherits="disabled,orient"/>
-      </xul:slider>
-    </content>
-
-    <implementation implements="nsISliderListener">
-      <property name="value" onget="return this._getIntegerAttribute('curpos', 0);"
-                             onset="return this._setIntegerAttribute('curpos', val);"/>
-      <property name="min" onget="return this._getIntegerAttribute('minpos', 0);"
-                           onset="return this._setIntegerAttribute('minpos', val);"/>
-      <property name="max" onget="return this._getIntegerAttribute('maxpos', 100);"
-                           onset="return this._setIntegerAttribute('maxpos', val);"/>
-      <property name="increment" onget="return this._getIntegerAttribute('increment', 1);"
-                                 onset="return this._setIntegerAttribute('increment', val);"/>
-      <property name="pageIncrement" onget="return this._getIntegerAttribute('pageincrement', 10);"
-                                     onset="return this._setIntegerAttribute('pageincrement', val);"/>
-
-      <property name="_slider" readonly="true">
-        <getter>
-          if (!this._sliderElement)
-            this._sliderElement = document.getAnonymousElementByAttribute(this, "anonid", "slider");
-          return this._sliderElement;
-        </getter>
-      </property>
-
-      <constructor>
-        <![CDATA[
-          this._userChanged = false;
-          var value = parseInt(this.getAttribute("value"), 10);
-          if (!isNaN(value))
-            this.value = value;
-          else if (this.min > 0)
-            this.value = this.min;
-          else if (this.max < 0)
-            this.value = this.max;
-        ]]>
-      </constructor>
-
-      <method name="_getIntegerAttribute">
-        <parameter name="aAttr"/>
-        <parameter name="aDefaultValue"/>
-        <body>
-          var value = this._slider.getAttribute(aAttr);
-          var intvalue = parseInt(value, 10);
-          if (!isNaN(intvalue))
-            return intvalue;
-          return aDefaultValue;
-        </body>
-      </method>
-
-      <method name="_setIntegerAttribute">
-        <parameter name="aAttr"/>
-        <parameter name="aValue"/>
-        <body>
-        <![CDATA[
-          var intvalue = parseInt(aValue, 10);
-          if (!isNaN(intvalue)) {
-            if (aAttr == "curpos") {
-              if (intvalue < this.min)
-                intvalue = this.min;
-              else if (intvalue > this.max)
-                intvalue = this.max;
-            }
-            this._slider.setAttribute(aAttr, intvalue);
-          }
-          return aValue;
-        ]]>
-        </body>
-      </method>
-
-      <method name="decrease">
-        <body>
-        <![CDATA[
-          var newpos = this.value - this.increment;
-          var startpos = this.min;
-          this.value = (newpos > startpos) ? newpos : startpos;
-        ]]>
-        </body>
-      </method>
-      <method name="increase">
-        <body>
-        <![CDATA[
-          var newpos = this.value + this.increment;
-          var endpos = this.max;
-          this.value = (newpos < endpos) ? newpos : endpos;
-        ]]>
-        </body>
-      </method>
-
-      <method name="decreasePage">
-        <body>
-        <![CDATA[
-          var newpos = this.value - this.pageIncrement;
-          var startpos = this.min;
-          this.value = (newpos > startpos) ? newpos : startpos;
-        ]]>
-        </body>
-      </method>
-      <method name="increasePage">
-        <body>
-        <![CDATA[
-          var newpos = this.value + this.pageIncrement;
-          var endpos = this.max;
-          this.value = (newpos < endpos) ? newpos : endpos;
-        ]]>
-        </body>
-      </method>
-
-      <method name="valueChanged">
-        <parameter name="which"/>
-        <parameter name="newValue"/>
-        <parameter name="userChanged"/>
-        <body>
-        <![CDATA[
-          switch (which) {
-            case "curpos":
-              this.setAttribute("value", newValue);
-
-              // in the future, only fire the change event when userChanged
-              // or _userChanged is true
-              var changeEvent = document.createEvent("Events");
-              changeEvent.initEvent("change", true, true);
-              this.dispatchEvent(changeEvent);
-              break;
-
-            case "minpos":
-              this.setAttribute("min", newValue);
-              break;
-
-            case "maxpos":
-              this.setAttribute("max", newValue);
-              break;
-          }
-        ]]>
-        </body>
-      </method>
-
-      <method name="dragStateChanged">
-        <parameter name="isDragging"/>
-        <body/>
-      </method>
-    </implementation>
-
-    <handlers>
-      <handler event="keypress" keycode="VK_LEFT" preventdefault="true">
-        <![CDATA[
-          this._userChanged = true;
-          (this.orient != "vertical" && this.dir == "reverse") ? this.increase() : this.decrease();
-          this._userChanged = false;
-        ]]>
-      </handler>
-      <handler event="keypress" keycode="VK_RIGHT" preventdefault="true">
-        <![CDATA[
-          this._userChanged = true;
-          (this.orient != "vertical" && this.dir == "reverse") ? this.decrease() : this.increase();
-          this._userChanged = false;
-        ]]>
-      </handler>
-      <handler event="keypress" keycode="VK_UP" preventdefault="true">
-        <![CDATA[
-          this._userChanged = true;
-          (this.orient == "vertical" && this.dir != "reverse") ? this.decrease() : this.increase();
-          this._userChanged = false;
-        ]]>
-      </handler>
-      <handler event="keypress" keycode="VK_DOWN" preventdefault="true">
-        <![CDATA[
-          this._userChanged = true;
-          (this.orient == "vertical" && this.dir != "reverse") ? this.increase() : this.decrease();
-          this._userChanged = false;
-        ]]>
-      </handler>
-      <handler event="keypress" keycode="VK_PAGE_UP" preventdefault="true">
-        <![CDATA[
-          this._userChanged = true;
-          (this.orient == "vertical" && this.dir != "reverse") ? this.decreasePage() : this.increasePage();
-          this._userChanged = false;
-        ]]>
-      </handler>
-      <handler event="keypress" keycode="VK_PAGE_DOWN" preventdefault="true">
-        <![CDATA[
-          this._userChanged = true;
-          (this.orient == "vertical" && this.dir != "reverse") ? this.increasePage() : this.decreasePage();
-          this._userChanged = false;
-        ]]>
-      </handler>
-      <handler event="keypress" keycode="VK_HOME" preventdefault="true">
-        this._userChanged = true;
-        this.value = (this.dir == "reverse") ? this.max : this.min;
-        this._userChanged = false;
-      </handler>
-      <handler event="keypress" keycode="VK_END" preventdefault="true">
-        this._userChanged = true;
-        this.value = (this.dir == "reverse") ? this.min : this.max;
-        this._userChanged = false;
-      </handler>
-    </handlers>
-
-  </binding>
-</bindings>
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -255,17 +255,16 @@ toolbar:not([nowindowdrag="true"]):not([
 toolbaritem,
 toolbarbutton,
 toolbarseparator,
 button,
 textbox,
 tab,
 radio,
 splitter,
-scale,
 menulist {
   -moz-window-dragging: no-drag;
 }
 
 /******* toolbar *******/
 
 toolbox {
   -moz-box-orient: vertical;
@@ -828,27 +827,16 @@ dropmarker > .dropmarker-icon {
 .tree-splitter {
   width: 0px;
   max-width: 0px;
   min-width: 0% ! important;
   min-height: 0% ! important;
   -moz-box-ordinal-group: 2147483646;
 }
 
-/********** scale **************/
-
-scale {
-  -moz-binding: url(chrome://global/content/bindings/scale.xml#scale);
-}
-
-.scale-slider {
-  -moz-binding: url(chrome://global/content/bindings/general.xml#basecontrol);
-  -moz-user-focus: normal;
-}
-
 /******** scrollbar ********/
 
 slider {
   /* This is a hint to layerization that the scrollbar thumb can never leave
      the scrollbar track. */
   overflow: hidden;
 }
 
--- a/toolkit/themes/mobile/jar.mn
+++ b/toolkit/themes/mobile/jar.mn
@@ -15,17 +15,16 @@ toolkit.jar:
    skin/classic/global/listbox.css                         (global/empty.css)
    skin/classic/global/menu.css                            (global/empty.css)
    skin/classic/global/menulist.css                        (global/empty.css)
    skin/classic/global/numberbox.css                       (global/empty.css)
    skin/classic/global/popup.css                           (global/empty.css)
    skin/classic/global/progressmeter.css                   (global/empty.css)
    skin/classic/global/radio.css                           (global/empty.css)
    skin/classic/global/richlistbox.css                     (global/empty.css)
-   skin/classic/global/scale.css                           (global/empty.css)
    skin/classic/global/scrollbox.css                       (global/empty.css)
    skin/classic/global/splitter.css                        (global/empty.css)
    skin/classic/global/tabbox.css                          (global/empty.css)
    skin/classic/global/textbox.css                         (global/empty.css)
    skin/classic/global/toolbar.css                         (global/empty.css)
    skin/classic/global/toolbarbutton.css                   (global/empty.css)
    skin/classic/global/tree.css                            (global/empty.css)
    skin/classic/global/wizard.css                          (global/empty.css)
--- a/toolkit/themes/shared/jar.inc.mn
+++ b/toolkit/themes/shared/jar.inc.mn
@@ -19,17 +19,16 @@ toolkit.jar:
   skin/classic/global/aboutRights.css                      (../../shared/aboutRights.css)
   skin/classic/global/aboutLicense.css                     (../../shared/aboutLicense.css)
   skin/classic/global/aboutSupport.css                     (../../shared/aboutSupport.css)
   skin/classic/global/appPicker.css                        (../../shared/appPicker.css)
   skin/classic/global/config.css                           (../../shared/config.css)
   skin/classic/global/datetimeinputpickers.css             (../../shared/datetimeinputpickers.css)
   skin/classic/global/datetimepopup.css                    (../../shared/datetimepopup.css)
   skin/classic/global/passwordmgr.css                      (../../shared/passwordmgr.css)
-  skin/classic/global/scale.css                            (../../shared/scale.css)
   skin/classic/global/icons/autoscroll.svg                 (../../shared/icons/autoscroll.svg)
   skin/classic/global/icons/autoscroll-horizontal.svg      (../../shared/icons/autoscroll-horizontal.svg)
   skin/classic/global/icons/autoscroll-vertical.svg        (../../shared/icons/autoscroll-vertical.svg)
   skin/classic/global/icons/calendar-arrow-left.svg        (../../shared/icons/calendar-arrow-left.svg)
   skin/classic/global/icons/calendar-arrow-right.svg       (../../shared/icons/calendar-arrow-right.svg)
   skin/classic/global/icons/close.svg                      (../../shared/icons/close.svg)
   skin/classic/global/icons/error.svg                      (../../shared/icons/error.svg)
   skin/classic/global/icons/find-previous-arrow.svg        (../../shared/icons/find-previous-arrow.svg)
deleted file mode 100644
--- a/toolkit/themes/shared/scale.css
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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/. */
-
-@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
-
-.scale-slider {
-  -moz-appearance: scale-horizontal;
-  margin: 2px 4px;
-  width: 100px;
-}
-
-.scale-slider[orient="vertical"] {
-  -moz-appearance: scale-vertical;
-  margin: 4px 2px;
-  width: auto;
-  height: 100px;
-}
-
-.scale-thumb {
-  -moz-appearance: scalethumb-horizontal;
-  min-width: 30px;
-  min-height: 15px;
-}
-
-.scale-thumb[orient="vertical"] {
-  -moz-appearance: scalethumb-vertical;
-  min-width: 15px;
-  min-height: 30px;
-}
-