Bug 1438193 - turn IsLink() into a const function, r=surkov
authorTokio Kajitsuka <kajitsuka-tokio@g.ecc.u-tokyo.ac.jp>
Fri, 04 May 2018 21:48:34 +0900
changeset 473030 5e42fccea4f3cd91f90744629a734e440cc44567
parent 473029 b758d18e45a581300c993fd738077772f7d5a498
child 473031 329030905869c9dca57f6951aaa4f66b5f7b4f11
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs1438193
milestone61.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 - turn IsLink() into a const function, r=surkov
accessible/generic/Accessible.cpp
accessible/generic/Accessible.h
accessible/html/HTMLLinkAccessible.cpp
accessible/html/HTMLLinkAccessible.h
accessible/xul/XULElementAccessibles.cpp
accessible/xul/XULElementAccessibles.h
--- a/accessible/generic/Accessible.cpp
+++ b/accessible/generic/Accessible.cpp
@@ -2341,17 +2341,17 @@ Accessible::GetIndexOfEmbeddedChild(Acce
 
   return GetIndexOf(aChild);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // HyperLinkAccessible methods
 
 bool
-Accessible::IsLink()
+Accessible::IsLink() const
 {
   // Every embedded accessible within hypertext accessible implements
   // hyperlink interface.
   return mParent && mParent->IsHyperText() && !IsText();
 }
 
 uint32_t
 Accessible::StartOffset()
--- a/accessible/generic/Accessible.h
+++ b/accessible/generic/Accessible.h
@@ -721,17 +721,17 @@ public:
 
   //////////////////////////////////////////////////////////////////////////////
   // HyperLinkAccessible (any embedded object in text can implement HyperLink,
   // which helps determine where it is located within containing text).
 
   /**
    * Return true if the accessible is hyper link accessible.
    */
-  virtual bool IsLink();
+  virtual bool IsLink() const;
 
   /**
    * Return the start offset of the link within the parent accessible.
    */
   virtual uint32_t StartOffset();
 
   /**
    * Return the end offset of the link within the parent accessible.
--- a/accessible/html/HTMLLinkAccessible.cpp
+++ b/accessible/html/HTMLLinkAccessible.cpp
@@ -116,17 +116,17 @@ HTMLLinkAccessible::DoAction(uint8_t aIn
   DoCommand();
   return true;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // HyperLinkAccessible
 
 bool
-HTMLLinkAccessible::IsLink()
+HTMLLinkAccessible::IsLink() const
 {
   // Expose HyperLinkAccessible unconditionally.
   return true;
 }
 
 already_AddRefed<nsIURI>
 HTMLLinkAccessible::AnchorURIAt(uint32_t aAnchorIndex)
 {
--- a/accessible/html/HTMLLinkAccessible.h
+++ b/accessible/html/HTMLLinkAccessible.h
@@ -27,17 +27,17 @@ public:
   virtual uint64_t NativeInteractiveState() const override;
 
   // ActionAccessible
   virtual uint8_t ActionCount() override;
   virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
   virtual bool DoAction(uint8_t aIndex) override;
 
   // HyperLinkAccessible
-  virtual bool IsLink() override;
+  virtual bool IsLink() const override;
   virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex) override;
 
 protected:
   virtual ~HTMLLinkAccessible() {}
 
   enum { eAction_Jump = 0 };
 
   /**
--- a/accessible/xul/XULElementAccessibles.cpp
+++ b/accessible/xul/XULElementAccessibles.cpp
@@ -235,17 +235,17 @@ XULLinkAccessible::DoAction(uint8_t aInd
   DoCommand();
   return true;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULLinkAccessible: HyperLinkAccessible
 
 bool
-XULLinkAccessible::IsLink()
+XULLinkAccessible::IsLink() const
 {
   // Expose HyperLinkAccessible unconditionally.
   return true;
 }
 
 uint32_t
 XULLinkAccessible::StartOffset()
 {
--- a/accessible/xul/XULElementAccessibles.h
+++ b/accessible/xul/XULElementAccessibles.h
@@ -90,17 +90,17 @@ public:
   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;
 
   // HyperLinkAccessible
-  virtual bool IsLink() override;
+  virtual bool IsLink() const override;
   virtual uint32_t StartOffset() override;
   virtual uint32_t EndOffset() override;
   virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex) override;
 
 protected:
   virtual ~XULLinkAccessible();
 
   // Accessible