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
Родитель 8a195f54ce
Коммит 7a53bd381f
3 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -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);

Просмотреть файл

@ -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;

Просмотреть файл

@ -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