Commit b8ebb4ee authored by Alexander Surkov's avatar Alexander Surkov
Browse files

Bug 751496 - get rid nsAccessible::GetBoundsFrame, r=rbsaunde

parent 85b5ff0f
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -914,7 +914,7 @@ void nsAccessible::GetBoundsRect(nsRect& aTotalBounds, nsIFrame** aBoundingFrame

  // Initialization area
  *aBoundingFrame = nsnull;
  nsIFrame *firstFrame = GetBoundsFrame();
  nsIFrame* firstFrame = GetFrame();
  if (!firstFrame)
    return;

@@ -1029,13 +1029,6 @@ nsAccessible::GetBounds(PRInt32* aX, PRInt32* aY,
  return NS_OK;
}

// helpers

nsIFrame* nsAccessible::GetBoundsFrame()
{
  return GetFrame();
}

NS_IMETHODIMP nsAccessible::SetSelected(bool aSelect)
{
  if (IsDefunct())
+5 −3
Original line number Diff line number Diff line
@@ -445,6 +445,11 @@ public:
   */
  void TestChildCache(nsAccessible* aCachedChild) const;

  /**
   * Return boundaries rect relative the bounding frame.
   */
  virtual void GetBoundsRect(nsRect& aRect, nsIFrame** aRelativeFrame);

  //////////////////////////////////////////////////////////////////////////////
  // Downcasting and types

@@ -745,9 +750,6 @@ protected:
   */
  mozilla::a11y::role ARIATransformRole(mozilla::a11y::role aRole);

  virtual nsIFrame* GetBoundsFrame();
  virtual void GetBoundsRect(nsRect& aRect, nsIFrame** aRelativeFrame);

  //////////////////////////////////////////////////////////////////////////////
  // Name helpers

+2 −1
Original line number Diff line number Diff line
@@ -123,6 +123,8 @@ public:
  virtual nsresult HandleAccEvent(AccEvent* aAccEvent);
#endif

  virtual void GetBoundsRect(nsRect& aRect, nsIFrame** aRelativeFrame);

  // nsHyperTextAccessible
  virtual already_AddRefed<nsIEditor> GetEditor() const;

@@ -384,7 +386,6 @@ protected:
  virtual void CacheChildren();

  // nsDocAccessible
    virtual void GetBoundsRect(nsRect& aRect, nsIFrame** aRelativeFrame);
    virtual nsresult AddEventListeners();
    virtual nsresult RemoveEventListeners();

+1 −1
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ public:
  virtual PRUint64 NativeState();
  virtual nsAccessible* ChildAtPoint(PRInt32 aX, PRInt32 aY,
                                     EWhichChildAtPoint aWhichChild);
  virtual void GetBoundsRect(nsRect& aBounds, nsIFrame** aBoundingFrame);

  // HyperLinkAccessible
  virtual PRUint32 StartOffset();
@@ -114,7 +115,6 @@ protected:

  // nsAccessible
  virtual void CacheChildren();
  virtual void GetBoundsRect(nsRect& aBounds, nsIFrame** aBoundingFrame);
};

#endif  
+10 −18
Original line number Diff line number Diff line
@@ -256,22 +256,6 @@ nsHTMLSelectOptionAccessible::GetNameInternal(nsAString& aName)
  return NS_OK;
}

// nsAccessible protected
nsIFrame* nsHTMLSelectOptionAccessible::GetBoundsFrame()
{
  PRUint64 state = 0;
  nsIContent* content = GetSelectState(&state);
  if (state & states::COLLAPSED) {
    if (content) {
      return content->GetPrimaryFrame();
    }

    return nsnull;
  }

  return nsAccessible::GetBoundsFrame();
}

PRUint64
nsHTMLSelectOptionAccessible::NativeState()
{
@@ -348,8 +332,16 @@ nsHTMLSelectOptionAccessible::GetLevelInternal()
  return level;
}

////////////////////////////////////////////////////////////////////////////////
// nsHTMLSelectOptionAccessible: nsIAccessible
void
nsHTMLSelectOptionAccessible::GetBoundsRect(nsRect& aTotalBounds,
                                            nsIFrame** aBoundingFrame)
{
  nsAccessible* combobox = GetCombobox();
  if (combobox && (combobox->State() & states::COLLAPSED))
    combobox->GetBoundsRect(aTotalBounds, aBoundingFrame);
  else
    nsHyperTextAccessibleWrap::GetBoundsRect(aTotalBounds, aBoundingFrame);
}

/** select us! close combo box if necessary*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
Loading