Bug 854231 - Remove Element::GetOffsetRect; r=jst

This commit is contained in:
Ms2ger 2013-06-12 09:00:08 +02:00
parent 496c47f152
commit a92489b0f8
3 changed files with 3 additions and 37 deletions

View File

@ -115,8 +115,8 @@ class UndoManager;
// IID for the dom::Element interface
#define NS_ELEMENT_IID \
{ 0xcae9f7e7, 0x6163, 0x47b5, \
{ 0xa1, 0x63, 0x30, 0xc8, 0x1d, 0x2d, 0x79, 0x39 } }
{ 0xec962aa7, 0x53ee, 0x46ff, \
{ 0x90, 0x34, 0x68, 0xea, 0x79, 0x9d, 0x7d, 0xf7 } }
class Element : public FragmentOrElement
{
@ -1054,14 +1054,6 @@ protected:
*/
virtual const nsAttrName* InternalGetExistingAttrNameFromQName(const nsAString& aStr) const;
/**
* Retrieve the rectangle for the offsetX properties, which
* are coordinates relative to the returned element.
*
* @param aRect offset rectangle
*/
virtual Element* GetOffsetRect(nsRect& aRect);
nsIFrame* GetStyledFrame();
virtual Element* GetNameSpaceElement()

View File

@ -486,32 +486,6 @@ Element::GetStyledFrame()
return frame ? nsLayoutUtils::GetStyleFrame(frame) : nullptr;
}
Element*
Element::GetOffsetRect(nsRect& aRect)
{
aRect = nsRect();
nsIFrame* frame = GetStyledFrame();
if (!frame) {
return nullptr;
}
nsPoint origin = frame->GetPosition();
aRect.x = nsPresContext::AppUnitsToIntCSSPixels(origin.x);
aRect.y = nsPresContext::AppUnitsToIntCSSPixels(origin.y);
// Get the union of all rectangles in this and continuation frames.
// It doesn't really matter what we use as aRelativeTo here, since
// we only care about the size. Using 'parent' might make things
// a bit faster by speeding up the internal GetOffsetTo operations.
nsIFrame* parent = frame->GetParent() ? frame->GetParent() : frame;
nsRect rcFrame = nsLayoutUtils::GetAllInFlowRectsUnion(frame, parent);
aRect.width = nsPresContext::AppUnitsToIntCSSPixels(rcFrame.width);
aRect.height = nsPresContext::AppUnitsToIntCSSPixels(rcFrame.height);
return nullptr;
}
nsIScrollableFrame*
Element::GetScrollFrame(nsIFrame **aStyledFrame)
{

View File

@ -976,7 +976,7 @@ protected:
* @note This method flushes pending notifications (Flush_Layout).
* @param aRect the offset information [OUT]
*/
virtual mozilla::dom::Element* GetOffsetRect(nsRect& aRect);
mozilla::dom::Element* GetOffsetRect(nsRect& aRect);
/**
* Returns true if this is the current document's body element