Bug 937298 part 2: De-virtualize nsIFrame::GetOffsetFromView, since it only has one implementation. r=mats

This commit is contained in:
Daniel Holbert 2013-11-11 23:57:44 -08:00
parent 7c931756a8
commit debd9697ab
3 changed files with 3 additions and 4 deletions

View File

@ -4515,10 +4515,10 @@ nsRect nsIFrame::GetScreenRectInAppUnits() const
// Returns the offset from this frame to the closest geometric parent that
// has a view. Also returns the containing view or null in case of error
void
nsFrame::GetOffsetFromView(nsPoint& aOffset, nsView** aView) const
nsIFrame::GetOffsetFromView(nsPoint& aOffset, nsView** aView) const
{
NS_PRECONDITION(nullptr != aView, "null OUT parameter pointer");
nsIFrame* frame = const_cast<nsFrame*>(this);
nsIFrame* frame = const_cast<nsIFrame*>(this);
*aView = nullptr;
aOffset.MoveTo(0, 0);

View File

@ -198,7 +198,6 @@ public:
virtual void SetPrevInFlow(nsIFrame*) MOZ_OVERRIDE;
virtual nsIFrame* GetNextInFlowVirtual() const MOZ_OVERRIDE;
virtual void SetNextInFlow(nsIFrame*) MOZ_OVERRIDE;
virtual void GetOffsetFromView(nsPoint& aOffset, nsView** aView) const MOZ_OVERRIDE;
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
NS_IMETHOD IsSelectable(bool* aIsSelectable, uint8_t* aSelectStyle) const MOZ_OVERRIDE;

View File

@ -2039,7 +2039,7 @@ public:
* Returns the offset from this frame to the closest geometric parent that
* has a view. Also returns the containing view or null in case of error
*/
virtual void GetOffsetFromView(nsPoint& aOffset, nsView** aView) const = 0;
void GetOffsetFromView(nsPoint& aOffset, nsView** aView) const;
/**
* Returns the nearest widget containing this frame. If this frame has a