Bug 1438193 - part11-6: Value r=surkov
authorTokio Kajitsuka <kajitsuka-tokio@g.ecc.u-tokyo.ac.jp>
Wed, 16 May 2018 01:55:28 +0900
changeset 418610 4e8ac5d56aab8fa261b0aa15c8072d82e8f0883d
parent 418609 152d027ef89db37d54da440898e66fd82aaea40b
child 418611 289b4c6fe61feee2537c0bc027781663516fa52c
push id34007
push usercsabou@mozilla.com
push dateThu, 17 May 2018 09:47:02 +0000
treeherdermozilla-central@8fb36531f7d0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs1438193
milestone62.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 1438193 - part11-6: Value r=surkov turn Accessible::Value into a const function
accessible/generic/Accessible.cpp
accessible/generic/Accessible.h
accessible/generic/ApplicationAccessible.cpp
accessible/generic/ApplicationAccessible.h
accessible/generic/BaseAccessibles.cpp
accessible/generic/BaseAccessibles.h
accessible/generic/FormControlAccessible.cpp
accessible/generic/FormControlAccessible.h
accessible/html/HTMLFormControlAccessible.cpp
accessible/html/HTMLFormControlAccessible.h
accessible/html/HTMLLinkAccessible.cpp
accessible/html/HTMLLinkAccessible.h
accessible/html/HTMLSelectAccessible.cpp
accessible/html/HTMLSelectAccessible.h
accessible/xul/XULColorPickerAccessible.cpp
accessible/xul/XULColorPickerAccessible.h
accessible/xul/XULComboboxAccessible.cpp
accessible/xul/XULComboboxAccessible.h
accessible/xul/XULElementAccessibles.cpp
accessible/xul/XULElementAccessibles.h
accessible/xul/XULListboxAccessible.cpp
accessible/xul/XULListboxAccessible.h
accessible/xul/XULSliderAccessible.cpp
accessible/xul/XULSliderAccessible.h
accessible/xul/XULTabAccessible.cpp
accessible/xul/XULTabAccessible.h
accessible/xul/XULTreeAccessible.cpp
accessible/xul/XULTreeAccessible.h
--- a/accessible/generic/Accessible.cpp
+++ b/accessible/generic/Accessible.cpp
@@ -1338,17 +1338,17 @@ Accessible::ApplyARIAState(uint64_t* aSt
         grid->ApplyARIAState(&gridState);
         *aState |= (gridState & (states::READONLY | states::EDITABLE));
       }
     }
   }
 }
 
 void
-Accessible::Value(nsString& aValue)
+Accessible::Value(nsString& aValue) const
 {
   const nsRoleMapEntry* roleMapEntry = ARIARoleMap();
   if (!roleMapEntry)
     return;
 
   if (roleMapEntry->valueRule != eNoValue) {
     // aria-valuenow is a number, and aria-valuetext is the optional text
     // equivalent. For the string value, we will try the optional text
--- a/accessible/generic/Accessible.h
+++ b/accessible/generic/Accessible.h
@@ -190,17 +190,17 @@ public:
   /**
    * Get the description of this accessible.
    */
   virtual void Description(nsString& aDescription);
 
   /**
    * Get the value of this accessible.
    */
-  virtual void Value(nsString& aValue);
+  virtual void Value(nsString& aValue) const;
 
   /**
    * Get help string for the accessible.
    */
   void Help(nsString& aHelp) const { aHelp.Truncate(); }
 
   /**
    * Get the name of this accessible.
--- a/accessible/generic/ApplicationAccessible.cpp
+++ b/accessible/generic/ApplicationAccessible.cpp
@@ -64,17 +64,17 @@ ApplicationAccessible::Name(nsString& aN
 
 void
 ApplicationAccessible::Description(nsString& aDescription)
 {
   aDescription.Truncate();
 }
 
 void
-ApplicationAccessible::Value(nsString& aValue)
+ApplicationAccessible::Value(nsString& aValue) const
 {
   aValue.Truncate();
 }
 
 uint64_t
 ApplicationAccessible::State()
 {
   return IsDefunct() ? states::DEFUNCT : 0;
--- a/accessible/generic/ApplicationAccessible.h
+++ b/accessible/generic/ApplicationAccessible.h
@@ -38,17 +38,17 @@ public:
   virtual void Shutdown() override;
   virtual nsIntRect Bounds() const override;
   virtual nsRect BoundsInAppUnits() const override;
   virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
   virtual GroupPos GroupPosition() override;
   virtual ENameValueFlag Name(nsString& aName) const override;
   virtual void ApplyARIAState(uint64_t* aState) const override;
   virtual void Description(nsString& aDescription) override;
-  virtual void Value(nsString& aValue) override;
+  virtual void Value(nsString& aValue) const override;
   virtual mozilla::a11y::role NativeRole() const override;
   virtual uint64_t State() override;
   virtual uint64_t NativeState() override;
   virtual Relation RelationByType(RelationType aType) const override;
 
   virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
                                    EWhichChildAtPoint aWhichChild) override;
   virtual Accessible* FocusedChild() override;
--- a/accessible/generic/BaseAccessibles.cpp
+++ b/accessible/generic/BaseAccessibles.cpp
@@ -86,43 +86,43 @@ LinkableAccessible::NativeLinkState() co
   if (isLink) {
     return states::LINKED | (actionAcc->LinkState() & states::TRAVERSED);
   }
 
   return 0;
 }
 
 void
-LinkableAccessible::Value(nsString& aValue)
+LinkableAccessible::Value(nsString& aValue) const
 {
   aValue.Truncate();
 
   Accessible::Value(aValue);
   if (!aValue.IsEmpty()) {
     return;
   }
 
   bool isLink;
-  Accessible* actionAcc = ActionWalk(&isLink);
+  const Accessible* actionAcc = ActionWalk(&isLink);
   if (isLink) {
     actionAcc->Value(aValue);
   }
 }
 
 uint8_t
 LinkableAccessible::ActionCount()
 {
   bool isLink, isOnclick, isLabelWithControl;
   ActionWalk(&isLink, &isOnclick, &isLabelWithControl);
   return (isLink || isOnclick || isLabelWithControl) ? 1 : 0;
 }
 
-Accessible*
+const Accessible*
 LinkableAccessible::ActionWalk(bool* aIsLink, bool* aIsOnclick,
-                               bool* aIsLabelWithControl)
+                               bool* aIsLabelWithControl) const
 {
   if (aIsOnclick) {
     *aIsOnclick = false;
   }
   if (aIsLink) {
     *aIsLink = false;
   }
   if (aIsLabelWithControl) {
@@ -134,17 +134,17 @@ LinkableAccessible::ActionWalk(bool* aIs
       *aIsOnclick = true;
     }
     return nullptr;
   }
 
   // XXX: The logic looks broken since the click listener may be registered
   // on non accessible node in parent chain but this node is skipped when tree
   // is traversed.
-  Accessible* walkUpAcc = this;
+  const Accessible* walkUpAcc = this;
   while ((walkUpAcc = walkUpAcc->Parent()) && !walkUpAcc->IsDoc()) {
     if (walkUpAcc->LinkState() & states::LINKED) {
       if (aIsLink) {
         *aIsLink = true;
       }
       return walkUpAcc;
     }
 
--- a/accessible/generic/BaseAccessibles.h
+++ b/accessible/generic/BaseAccessibles.h
@@ -58,30 +58,30 @@ public:
   LinkableAccessible(nsIContent* aContent, DocAccessible* aDoc) :
     AccessibleWrap(aContent, aDoc)
   {
   }
 
   NS_INLINE_DECL_REFCOUNTING_INHERITED(LinkableAccessible, AccessibleWrap)
 
   // Accessible
-  virtual void Value(nsString& aValue) override;
+  virtual void Value(nsString& aValue) const override;
   virtual uint64_t NativeLinkState() const override;
   virtual void TakeFocus() override;
 
   // ActionAccessible
   virtual uint8_t ActionCount() override;
   virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
   virtual bool DoAction(uint8_t index) override;
   virtual KeyBinding AccessKey() const override;
 
   // ActionAccessible helpers
-  Accessible* ActionWalk(bool* aIsLink = nullptr,
-                         bool* aIsOnclick = nullptr,
-                         bool* aIsLabelWithControl = nullptr);
+  const Accessible* ActionWalk(bool* aIsLink = nullptr,
+                               bool* aIsOnclick = nullptr,
+                               bool* aIsLabelWithControl = nullptr) const;
   // HyperLinkAccessible
   virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex) override;
 
 protected:
   virtual ~LinkableAccessible() {}
 
 };
 
--- a/accessible/generic/FormControlAccessible.cpp
+++ b/accessible/generic/FormControlAccessible.cpp
@@ -56,17 +56,17 @@ ProgressMeterAccessible<Max>::IsWidget()
   return true;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // ProgressMeterAccessible<Max>: Value
 
 template<int Max>
 void
-ProgressMeterAccessible<Max>::Value(nsString& aValue)
+ProgressMeterAccessible<Max>::Value(nsString& aValue) const
 {
   LeafAccessible::Value(aValue);
   if (!aValue.IsEmpty())
     return;
 
   double maxValue = MaxValue();
   if (IsNaN(maxValue) || maxValue == 0)
     return;
--- a/accessible/generic/FormControlAccessible.h
+++ b/accessible/generic/FormControlAccessible.h
@@ -23,17 +23,17 @@ public:
   {
     // Ignore 'ValueChange' DOM event in lieu of @value attribute change
     // notifications.
     mStateFlags |= eHasNumericValue | eIgnoreDOMUIEvent;
     mType = eProgressType;
   }
 
   // Accessible
-  virtual void Value(nsString& aValue) override;
+  virtual void Value(nsString& aValue) const override;
   virtual mozilla::a11y::role NativeRole() const override;
   virtual uint64_t NativeState() override;
 
   // Value
   virtual double MaxValue() const override;
   virtual double MinValue() const override;
   virtual double CurValue() const override;
   virtual double Step() const override;
--- a/accessible/html/HTMLFormControlAccessible.cpp
+++ b/accessible/html/HTMLFormControlAccessible.cpp
@@ -334,17 +334,17 @@ HTMLTextFieldAccessible::NativeName(nsSt
     return eNameOK;
 
   // text inputs and textareas might have useful placeholder text
   mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::placeholder, aName);
   return eNameOK;
 }
 
 void
-HTMLTextFieldAccessible::Value(nsString& aValue)
+HTMLTextFieldAccessible::Value(nsString& aValue) const
 {
   aValue.Truncate();
   if (NativeState() & states::PROTECTED)    // Don't return password text!
     return;
 
   HTMLTextAreaElement* textArea = HTMLTextAreaElement::FromNode(mContent);
   if (textArea) {
     textArea->GetValue(aValue);
@@ -544,17 +544,17 @@ HTMLFileInputAccessible::HandleAccEvent(
 
 role
 HTMLSpinnerAccessible::NativeRole() const
 {
   return roles::SPINBUTTON;
 }
 
 void
-HTMLSpinnerAccessible::Value(nsString& aValue)
+HTMLSpinnerAccessible::Value(nsString& aValue) const
 {
   AccessibleWrap::Value(aValue);
   if (!aValue.IsEmpty())
     return;
 
   // Pass NonSystem as the caller type, to be safe.  We don't expect to have a
   // file input here.
   HTMLInputElement::FromNode(mContent)->GetValue(aValue, CallerType::NonSystem);
@@ -622,17 +622,17 @@ HTMLRangeAccessible::NativeRole() const
 
 bool
 HTMLRangeAccessible::IsWidget() const
 {
   return true;
 }
 
 void
-HTMLRangeAccessible::Value(nsString& aValue)
+HTMLRangeAccessible::Value(nsString& aValue) const
 {
   LeafAccessible::Value(aValue);
   if (!aValue.IsEmpty())
     return;
 
   // Pass NonSystem as the caller type, to be safe.  We don't expect to have a
   // file input here.
   HTMLInputElement::FromNode(mContent)->GetValue(aValue,
--- a/accessible/html/HTMLFormControlAccessible.h
+++ b/accessible/html/HTMLFormControlAccessible.h
@@ -116,17 +116,17 @@ public:
 
   NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLTextFieldAccessible,
                                        HyperTextAccessibleWrap)
 
   // HyperTextAccessible
   virtual already_AddRefed<TextEditor> GetEditor() const override;
 
   // Accessible
-  virtual void Value(nsString& aValue) override;
+  virtual void Value(nsString& aValue) const override;
   virtual void ApplyARIAState(uint64_t* aState) const override;
   virtual mozilla::a11y::role NativeRole() const override;
   virtual uint64_t NativeState() override;
   virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
 
   // ActionAccessible
   virtual uint8_t ActionCount() override;
   virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
@@ -172,17 +172,17 @@ public:
   HTMLSpinnerAccessible(nsIContent* aContent, DocAccessible* aDoc) :
     AccessibleWrap(aContent, aDoc)
   {
     mStateFlags |= eHasNumericValue;
 }
 
   // Accessible
   virtual mozilla::a11y::role NativeRole() const override;
-  virtual void Value(nsString& aValue) override;
+  virtual void Value(nsString& aValue) const override;
 
   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;
 };
 
@@ -195,17 +195,17 @@ class HTMLRangeAccessible : public LeafA
 public:
   HTMLRangeAccessible(nsIContent* aContent, DocAccessible* aDoc) :
     LeafAccessible(aContent, aDoc)
   {
     mStateFlags |= eHasNumericValue;
   }
 
   // Accessible
-  virtual void Value(nsString& aValue) override;
+  virtual void Value(nsString& aValue) const override;
   virtual mozilla::a11y::role NativeRole() 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;
--- a/accessible/html/HTMLLinkAccessible.cpp
+++ b/accessible/html/HTMLLinkAccessible.cpp
@@ -68,17 +68,17 @@ HTMLLinkAccessible::NativeInteractiveSta
   // indicate this.
   if (mContent->AsElement()->HasAttr(kNameSpaceID_None, nsGkAtoms::name))
     state |= states::SELECTABLE;
 
   return state;
 }
 
 void
-HTMLLinkAccessible::Value(nsString& aValue)
+HTMLLinkAccessible::Value(nsString& aValue) const
 {
   aValue.Truncate();
 
   HyperTextAccessible::Value(aValue);
   if (aValue.IsEmpty())
     nsContentUtils::GetLinkLocation(mContent->AsElement(), aValue);
 }
 
--- a/accessible/html/HTMLLinkAccessible.h
+++ b/accessible/html/HTMLLinkAccessible.h
@@ -15,17 +15,17 @@ class HTMLLinkAccessible : public HyperT
 {
 public:
   HTMLLinkAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLLinkAccessible,
                                        HyperTextAccessibleWrap)
 
   // Accessible
-  virtual void Value(nsString& aValue) override;
+  virtual void Value(nsString& aValue) const override;
   virtual a11y::role NativeRole() const override;
   virtual uint64_t NativeState() override;
   virtual uint64_t NativeLinkState() const override;
   virtual uint64_t NativeInteractiveState() const override;
 
   // ActionAccessible
   virtual uint8_t ActionCount() override;
   virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
--- a/accessible/html/HTMLSelectAccessible.cpp
+++ b/accessible/html/HTMLSelectAccessible.cpp
@@ -426,17 +426,17 @@ HTMLComboboxAccessible::Description(nsSt
 
   // Otherwise use description of selected option.
   Accessible* option = SelectedOption();
   if (option)
     option->Description(aDescription);
 }
 
 void
-HTMLComboboxAccessible::Value(nsString& aValue)
+HTMLComboboxAccessible::Value(nsString& aValue) const
 {
   // Use accessible name of selected option.
   Accessible* option = SelectedOption();
   if (option)
     option->Name(aValue);
 }
 
 uint8_t
--- a/accessible/html/HTMLSelectAccessible.h
+++ b/accessible/html/HTMLSelectAccessible.h
@@ -160,17 +160,17 @@ public:
   enum { eAction_Click = 0 };
 
   HTMLComboboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
   virtual ~HTMLComboboxAccessible() {}
 
   // Accessible
   virtual void Shutdown() override;
   virtual void Description(nsString& aDescription) override;
-  virtual void Value(nsString& aValue) override;
+  virtual void Value(nsString& aValue) const override;
   virtual a11y::role NativeRole() const override;
   virtual uint64_t NativeState() override;
   virtual bool RemoveChild(Accessible* aChild) override;
   virtual bool IsAcceptableChild(nsIContent* aEl) const override;
 
   // ActionAccessible
   virtual uint8_t ActionCount() override;
   virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
--- a/accessible/xul/XULColorPickerAccessible.cpp
+++ b/accessible/xul/XULColorPickerAccessible.cpp
@@ -24,17 +24,17 @@ XULColorPickerTileAccessible::
   AccessibleWrap(aContent, aDoc)
 {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULColorPickerTileAccessible: Accessible
 
 void
-XULColorPickerTileAccessible::Value(nsString& aValue)
+XULColorPickerTileAccessible::Value(nsString& aValue) const
 {
   aValue.Truncate();
 
   mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::color, aValue);
 }
 
 role
 XULColorPickerTileAccessible::NativeRole() const
--- a/accessible/xul/XULColorPickerAccessible.h
+++ b/accessible/xul/XULColorPickerAccessible.h
@@ -16,17 +16,17 @@ namespace a11y {
  */
 class XULColorPickerTileAccessible : public AccessibleWrap
 {
 public:
   XULColorPickerTileAccessible(nsIContent* aContent,
                                DocAccessible* aDoc);
 
   // Accessible
-  virtual void Value(nsString& aValue) override;
+  virtual void Value(nsString& aValue) const override;
   virtual a11y::role NativeRole() const override;
   virtual uint64_t NativeState() override;
   virtual uint64_t NativeInteractiveState() const override;
 
   // Widgets
   virtual Accessible* ContainerWidget() const override;
 };
 
--- a/accessible/xul/XULComboboxAccessible.cpp
+++ b/accessible/xul/XULComboboxAccessible.cpp
@@ -91,17 +91,17 @@ XULComboboxAccessible::Description(nsStr
   if (focusedOptionContent && mDoc) {
     Accessible* focusedOptionAcc = mDoc->GetAccessible(focusedOptionContent);
     if (focusedOptionAcc)
       focusedOptionAcc->Description(aDescription);
   }
 }
 
 void
-XULComboboxAccessible::Value(nsString& aValue)
+XULComboboxAccessible::Value(nsString& aValue) const
 {
   aValue.Truncate();
 
   // The value is the option or text shown entered in the combobox.
   nsCOMPtr<nsIDOMXULMenuListElement> menuList(do_QueryInterface(mContent));
   if (menuList)
     menuList->GetLabel(aValue);
 }
--- a/accessible/xul/XULComboboxAccessible.h
+++ b/accessible/xul/XULComboboxAccessible.h
@@ -18,17 +18,17 @@ class XULComboboxAccessible : public Acc
 {
 public:
   enum { eAction_Click = 0 };
 
   XULComboboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
   virtual void Description(nsString& aDescription) override;
-  virtual void Value(nsString& aValue) override;
+  virtual void Value(nsString& aValue) const override;
   virtual a11y::role NativeRole() const override;
   virtual uint64_t NativeState() override;
 
   // ActionAccessible
   virtual uint8_t ActionCount() override;
   virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
   virtual bool DoAction(uint8_t aIndex) override;
 
--- a/accessible/xul/XULElementAccessibles.cpp
+++ b/accessible/xul/XULElementAccessibles.cpp
@@ -175,17 +175,17 @@ XULLinkAccessible::
 XULLinkAccessible::~XULLinkAccessible()
 {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULLinkAccessible: Accessible
 
 void
-XULLinkAccessible::Value(nsString& aValue)
+XULLinkAccessible::Value(nsString& aValue) const
 {
   aValue.Truncate();
 
   mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::href, aValue);
 }
 
 ENameValueFlag
 XULLinkAccessible::NativeName(nsString& aName) const
--- a/accessible/xul/XULElementAccessibles.h
+++ b/accessible/xul/XULElementAccessibles.h
@@ -80,17 +80,17 @@ public:
 
 class XULLinkAccessible : public XULLabelAccessible
 {
 
 public:
   XULLinkAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual void Value(nsString& aValue) override;
+  virtual void Value(nsString& aValue) const override;
   virtual a11y::role NativeRole() const override;
   virtual uint64_t NativeLinkState() const override;
 
   // ActionAccessible
   virtual uint8_t ActionCount() override;
   virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
   virtual bool DoAction(uint8_t aIndex) override;
 
--- a/accessible/xul/XULListboxAccessible.cpp
+++ b/accessible/xul/XULListboxAccessible.cpp
@@ -133,17 +133,17 @@ XULListboxAccessible::NativeState()
 
   return states;
 }
 
 /**
   * Our value is the label of our ( first ) selected child.
   */
 void
-XULListboxAccessible::Value(nsString& aValue)
+XULListboxAccessible::Value(nsString& aValue) const
 {
   aValue.Truncate();
 
   nsCOMPtr<nsIDOMXULSelectControlElement> select(do_QueryInterface(mContent));
   if (select) {
     nsCOMPtr<nsIDOMXULSelectControlItemElement> selectedItem;
     select->GetSelectedItem(getter_AddRefs(selectedItem));
     if (selectedItem)
--- a/accessible/xul/XULListboxAccessible.h
+++ b/accessible/xul/XULListboxAccessible.h
@@ -75,17 +75,17 @@ public:
   virtual void SelectedCellIndices(nsTArray<uint32_t>* aCells) override;
   virtual void SelectedColIndices(nsTArray<uint32_t>* aCols) override;
   virtual void SelectedRowIndices(nsTArray<uint32_t>* aRows) override;
   virtual void SelectRow(uint32_t aRowIdx) override;
   virtual void UnselectRow(uint32_t aRowIdx) override;
   virtual Accessible* AsAccessible() override { return this; }
 
   // Accessible
-  virtual void Value(nsString& aValue) override;
+  virtual void Value(nsString& aValue) const override;
   virtual TableAccessible* AsTable() override { return this; }
   virtual a11y::role NativeRole() const override;
   virtual uint64_t NativeState() override;
 
   // Widgets
   virtual bool IsWidget() const override;
   virtual bool IsActiveWidget() const override;
   virtual bool AreItemsOperable() const override;
--- a/accessible/xul/XULSliderAccessible.cpp
+++ b/accessible/xul/XULSliderAccessible.cpp
@@ -54,17 +54,17 @@ XULSliderAccessible::NativeInteractiveSt
 bool
 XULSliderAccessible::NativelyUnavailable() const
 {
   return mContent->AsElement()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::disabled,
                                             nsGkAtoms::_true, eCaseMatters);
 }
 
 void
-XULSliderAccessible::Value(nsString& aValue)
+XULSliderAccessible::Value(nsString& aValue) const
 {
   GetSliderAttr(nsGkAtoms::curpos, aValue);
 }
 
 uint8_t
 XULSliderAccessible::ActionCount()
 {
   return 1;
--- a/accessible/xul/XULSliderAccessible.h
+++ b/accessible/xul/XULSliderAccessible.h
@@ -15,17 +15,17 @@ 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) override;
+  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;
--- a/accessible/xul/XULTabAccessible.cpp
+++ b/accessible/xul/XULTabAccessible.cpp
@@ -144,17 +144,17 @@ XULTabsAccessible::NativeRole() const
 
 uint8_t
 XULTabsAccessible::ActionCount()
 {
   return 0;
 }
 
 void
-XULTabsAccessible::Value(nsString& aValue)
+XULTabsAccessible::Value(nsString& aValue) const
 {
   aValue.Truncate();
 }
 
 ENameValueFlag
 XULTabsAccessible::NativeName(nsString& aName) const
 {
   // no name
--- a/accessible/xul/XULTabAccessible.h
+++ b/accessible/xul/XULTabAccessible.h
@@ -41,17 +41,17 @@ public:
  * A container of tab objects, xul:tabs element.
  */
 class XULTabsAccessible : public XULSelectControlAccessible
 {
 public:
   XULTabsAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual void Value(nsString& aValue) override;
+  virtual void Value(nsString& aValue) const override;
   virtual a11y::role NativeRole() const override;
 
   // ActionAccessible
   virtual uint8_t ActionCount() override;
 
 protected:
   // Accessible
   virtual ENameValueFlag NativeName(nsString& aName) const override;
--- a/accessible/xul/XULTreeAccessible.cpp
+++ b/accessible/xul/XULTreeAccessible.cpp
@@ -104,17 +104,17 @@ XULTreeAccessible::NativeState()
 
   if (!isSingle)
     state |= states::MULTISELECTABLE;
 
   return state;
 }
 
 void
-XULTreeAccessible::Value(nsString& aValue)
+XULTreeAccessible::Value(nsString& aValue) const
 {
   aValue.Truncate();
   if (!mTreeView)
     return;
 
   // Return the value is the first selected child.
   nsCOMPtr<nsITreeSelection> selection;
   mTreeView->GetSelection(getter_AddRefs(selection));
--- a/accessible/xul/XULTreeAccessible.h
+++ b/accessible/xul/XULTreeAccessible.h
@@ -35,17 +35,17 @@ public:
                     nsTreeBodyFrame* aTreeframe);
 
   // nsISupports and cycle collection
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XULTreeAccessible, Accessible)
 
   // Accessible
   virtual void Shutdown() override;
-  virtual void Value(nsString& aValue) override;
+  virtual void Value(nsString& aValue) const override;
   virtual a11y::role NativeRole() const override;
   virtual uint64_t NativeState() override;
   virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
                                    EWhichChildAtPoint aWhichChild) override;
 
   virtual Accessible* GetChildAt(uint32_t aIndex) const override;
   virtual uint32_t ChildCount() const override;
   virtual Relation RelationByType(RelationType aType) const override;