Bug 770106. nsDisplayButtonBorderBackground should use the button's border-box for hit-testing, not its visual overflow area. r=mattwoodrow

This commit is contained in:
Robert O'Callahan
2012-09-28 23:19:38 +12:00
parent 088f1a4202
commit 231f025330
3 changed files with 27 additions and 1 deletions

View File

@@ -126,7 +126,8 @@ private:
nsRect
nsDisplayButtonBorderBackground::GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) {
*aSnap = false;
return mFrame->GetVisualOverflowRectRelativeToSelf() + ToReferenceFrame();
return aBuilder->IsForEventDelivery() ? nsRect(ToReferenceFrame(), mFrame->GetSize())
: mFrame->GetVisualOverflowRectRelativeToSelf() + ToReferenceFrame();
}
class nsDisplayButtonForeground : public nsDisplayItem {