mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-29 13:15:47 +00:00
Bug 1127773 - Use the entire scrollable overflow rect so that scrolledframes build event regions more correctly. r=tn
(Patch dictated by roc)
This commit is contained in:
parent
5e878ba66f
commit
6bcbfc5468
@ -3126,9 +3126,22 @@ nsDisplayLayerEventRegions::AddFrame(nsDisplayListBuilder* aBuilder,
|
||||
return;
|
||||
}
|
||||
// XXX handle other pointerEvents values for SVG
|
||||
|
||||
// XXX Do something clever here for the common case where the border box
|
||||
// is obviously entirely inside mHitRegion.
|
||||
nsRect borderBox(aBuilder->ToReferenceFrame(aFrame), aFrame->GetSize());
|
||||
nsRect borderBox;
|
||||
if (nsLayoutUtils::GetScrollableFrameFor(aFrame)) {
|
||||
// If the frame is content of a scrollframe, then we need to pick up the
|
||||
// area corresponding to the overflow rect as well. Otherwise the parts of
|
||||
// the overflow that are not occupied by descendants get skipped and the
|
||||
// APZ code sends touch events to the content underneath instead.
|
||||
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1127773#c15.
|
||||
borderBox = aFrame->GetScrollableOverflowRect();
|
||||
} else {
|
||||
borderBox = nsRect(nsPoint(0, 0), aFrame->GetSize());
|
||||
}
|
||||
borderBox += aBuilder->ToReferenceFrame(aFrame);
|
||||
|
||||
const DisplayItemClip* clip = aBuilder->ClipState().GetCurrentCombinedClip(aBuilder);
|
||||
bool borderBoxHasRoundedCorners =
|
||||
nsLayoutUtils::HasNonZeroCorner(aFrame->StyleBorder()->mBorderRadius);
|
||||
|
Loading…
Reference in New Issue
Block a user