Bug 1140900 - IPC Proxy for ScrollSubstringTo*, r=tbsaunde
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Mon, 09 Mar 2015 22:51:02 +0200
changeset 232709 d929f723b8e300a83ab88a9b5eef197242763c01
parent 232708 d11e756b726f67c23b68b325ab2c64856adda9b8
child 232710 737f554af428dac7e744acf3089bc1a54fd6f54a
push id56637
push useropettay@mozilla.com
push dateTue, 10 Mar 2015 11:07:52 +0000
treeherdermozilla-inbound@737f554af428 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs1140900
milestone39.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 1140900 - IPC Proxy for ScrollSubstringTo*, r=tbsaunde
accessible/ipc/DocAccessibleChild.cpp
accessible/ipc/DocAccessibleChild.h
accessible/ipc/PDocAccessible.ipdl
accessible/ipc/ProxyAccessible.cpp
accessible/ipc/ProxyAccessible.h
--- a/accessible/ipc/DocAccessibleChild.cpp
+++ b/accessible/ipc/DocAccessibleChild.cpp
@@ -471,10 +471,42 @@ DocAccessibleChild::RecvRemoveFromSelect
   HyperTextAccessible* acc = IdToHyperTextAccessible(aID);
   if (acc && acc->IsTextRole()) {
     *aSucceeded = acc->RemoveFromSelection(aSelectionNum);
   }
 
   return true;
 }
 
+bool
+DocAccessibleChild::RecvScrollSubstringTo(const uint64_t& aID,
+                                          const int32_t& aStartOffset,
+                                          const int32_t& aEndOffset,
+                                          const uint32_t& aScrollType)
+{
+  HyperTextAccessible* acc = IdToHyperTextAccessible(aID);
+  if (acc) {
+    acc->ScrollSubstringTo(aStartOffset, aEndOffset, aScrollType);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvScrollSubstringToPoint(const uint64_t& aID,
+                                               const int32_t& aStartOffset,
+                                               const int32_t& aEndOffset,
+                                               const uint32_t& aCoordinateType,
+                                               const int32_t& aX,
+                                               const int32_t& aY)
+{
+  HyperTextAccessible* acc = IdToHyperTextAccessible(aID);
+  if (acc) {
+    acc->ScrollSubstringToPoint(aStartOffset, aEndOffset, aCoordinateType,
+                                aX, aY);
+  }
+
+  return true;
+}
+
+
 }
 }
--- a/accessible/ipc/DocAccessibleChild.h
+++ b/accessible/ipc/DocAccessibleChild.h
@@ -145,16 +145,28 @@ public:
                                   const int32_t& aStartOffset,
                                   const int32_t& aEndOffset,
                                   bool* aSucceeded) MOZ_OVERRIDE;
 
   virtual bool RecvRemoveFromSelection(const uint64_t& aID,
                                        const int32_t& aSelectionNum,
                                        bool* aSucceeded) MOZ_OVERRIDE;
 
+  virtual bool RecvScrollSubstringTo(const uint64_t& aID,
+                                     const int32_t& aStartOffset,
+                                     const int32_t& aEndOffset,
+                                     const uint32_t& aScrollType) MOZ_OVERRIDE;
+
+  virtual bool RecvScrollSubstringToPoint(const uint64_t& aID,
+                                          const int32_t& aStartOffset,
+                                          const int32_t& aEndOffset,
+                                          const uint32_t& aCoordinateType,
+                                          const int32_t& aX,
+                                          const int32_t& aY) MOZ_OVERRIDE;
+
 private:
   bool PersistentPropertiesToArray(nsIPersistentProperties* aProps,
                                    nsTArray<Attribute>* aAttributes);
 
   DocAccessible* mDoc;
 };
 
 }
--- a/accessible/ipc/PDocAccessible.ipdl
+++ b/accessible/ipc/PDocAccessible.ipdl
@@ -101,12 +101,20 @@ child:
     returns(bool aSucceeded, nsString aData, int32_t aStartOffset, int32_t aEndOffset);
   prio(high) sync SetSelectionBoundsAt(uint64_t aID, int32_t aSelectionNum,
                                        int32_t aStartOffset, int32_t aEndOffset)
     returns(bool aSucceeded);
   prio(high) sync AddToSelection(uint64_t aID, int32_t aStartOffset, int32_t aEndOffset)
     returns(bool aSucceeded);
   prio(high) sync RemoveFromSelection(uint64_t aID, int32_t aSelectionNum)
     returns(bool aSucceeded);
+
+  ScrollSubstringTo(uint64_t aID, int32_t aStartOffset, int32_t aEndOffset,
+                    uint32_t aScrollType);
+  ScrollSubstringToPoint(uint64_t aID,
+                         int32_t aStartOffset,
+                         int32_t aEndOffset,
+                         uint32_t aCoordinateType,
+                         int32_t aX, int32_t aY);
 };
 
 }
 }
--- a/accessible/ipc/ProxyAccessible.cpp
+++ b/accessible/ipc/ProxyAccessible.cpp
@@ -305,10 +305,27 @@ ProxyAccessible::AddToSelection(int32_t 
 bool
 ProxyAccessible::RemoveFromSelection(int32_t aSelectionNum)
 {
   bool retVal = false;
   unused << mDoc->SendRemoveFromSelection(mID, aSelectionNum, &retVal);
   return retVal;
 }
 
+void
+ProxyAccessible::ScrollSubstringTo(int32_t aStartOffset, int32_t aEndOffset,
+                                   uint32_t aScrollType)
+{
+  unused << mDoc->SendScrollSubstringTo(mID, aStartOffset, aEndOffset, aScrollType);
+}
+
+void
+ProxyAccessible::ScrollSubstringToPoint(int32_t aStartOffset,
+                                        int32_t aEndOffset,
+                                        uint32_t aCoordinateType,
+                                        int32_t aX, int32_t aY)
+{
+  unused << mDoc->SendScrollSubstringToPoint(mID, aStartOffset, aEndOffset,
+                                             aCoordinateType, aX, aY);
+}
+
 }
 }
--- a/accessible/ipc/ProxyAccessible.h
+++ b/accessible/ipc/ProxyAccessible.h
@@ -149,16 +149,24 @@ public:
                             int32_t aStartOffset,
                             int32_t aEndOffset);
 
   bool AddToSelection(int32_t aStartOffset,
                       int32_t aEndOffset);
 
   bool RemoveFromSelection(int32_t aSelectionNum);
 
+  void ScrollSubstringTo(int32_t aStartOffset, int32_t aEndOffset,
+                         uint32_t aScrollType);
+
+  void ScrollSubstringToPoint(int32_t aStartOffset,
+                              int32_t aEndOffset,
+                              uint32_t aCoordinateType,
+                              int32_t aX, int32_t aY);
+
   /**
    * Allow the platform to store a pointers worth of data on us.
    */
   uintptr_t GetWrapper() const { return mWrapper; }
   void SetWrapper(uintptr_t aWrapper) { mWrapper = aWrapper; }
 
   /*
    * Return the ID of the accessible being proxied.