diff --git a/layout/forms/nsButtonFrameRenderer.cpp b/layout/forms/nsButtonFrameRenderer.cpp index 563ba2e73cfe..916438376fcc 100644 --- a/layout/forms/nsButtonFrameRenderer.cpp +++ b/layout/forms/nsButtonFrameRenderer.cpp @@ -114,7 +114,7 @@ private: nsRect nsDisplayButtonBoxShadowOuter::GetBounds(nsDisplayListBuilder* aBuilder) { - return mFrame->GetVisualOverflowRect() + ToReferenceFrame(); + return mFrame->GetVisualOverflowRectRelativeToSelf() + ToReferenceFrame(); } void diff --git a/layout/forms/nsSelectsAreaFrame.cpp b/layout/forms/nsSelectsAreaFrame.cpp index 9c4fc4b518ff..10506d92ce78 100644 --- a/layout/forms/nsSelectsAreaFrame.cpp +++ b/layout/forms/nsSelectsAreaFrame.cpp @@ -153,7 +153,7 @@ public: // override bounds because the list item focus ring may extend outside // the nsSelectsAreaFrame nsListControlFrame* listFrame = GetEnclosingListFrame(GetUnderlyingFrame()); - return listFrame->GetVisualOverflowRect() + + return listFrame->GetVisualOverflowRectRelativeToSelf() + aBuilder->ToReferenceFrame(listFrame); } virtual void Paint(nsDisplayListBuilder* aBuilder, diff --git a/layout/generic/nsBulletFrame.cpp b/layout/generic/nsBulletFrame.cpp index a49e12375122..eb3cc0137b09 100644 --- a/layout/generic/nsBulletFrame.cpp +++ b/layout/generic/nsBulletFrame.cpp @@ -226,7 +226,7 @@ public: virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) { - return mFrame->GetVisualOverflowRect() + ToReferenceFrame(); + return mFrame->GetVisualOverflowRectRelativeToSelf() + ToReferenceFrame(); } virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect, HitTestState* aState, nsTArray *aOutFrames) { diff --git a/layout/generic/nsTextFrameThebes.cpp b/layout/generic/nsTextFrameThebes.cpp index 9a491fb01c4d..f7868013594d 100644 --- a/layout/generic/nsTextFrameThebes.cpp +++ b/layout/generic/nsTextFrameThebes.cpp @@ -4137,7 +4137,7 @@ public: #endif virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) { - return mFrame->GetVisualOverflowRect() + ToReferenceFrame(); + return mFrame->GetVisualOverflowRectRelativeToSelf() + ToReferenceFrame(); } virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect, HitTestState* aState, nsTArray *aOutFrames) { diff --git a/layout/xul/base/src/nsTextBoxFrame.cpp b/layout/xul/base/src/nsTextBoxFrame.cpp index 974d0a7fa916..0c1fde0da955 100644 --- a/layout/xul/base/src/nsTextBoxFrame.cpp +++ b/layout/xul/base/src/nsTextBoxFrame.cpp @@ -379,7 +379,7 @@ nsDisplayXULTextBox::PaintTextToContext(nsRenderingContext* aCtx, nsRect nsDisplayXULTextBox::GetBounds(nsDisplayListBuilder* aBuilder) { - return mFrame->GetVisualOverflowRect() + ToReferenceFrame(); + return mFrame->GetVisualOverflowRectRelativeToSelf() + ToReferenceFrame(); } nsRect