mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
Bug 1302470 Part 4: Fix the case where HTML buttons need to generate display item children when doing opaque hit tests. r=mattwoodrow
MozReview-Commit-ID: HwDYsnMJkM8 --HG-- extra : rebase_source : 4de1945f2a53e1f7f52bb59639330c45530610c4
This commit is contained in:
parent
3ae93f9a3a
commit
8872dcf750
@ -3232,6 +3232,8 @@ nsLayoutUtils::GetFramesForArea(nsIFrame* aFrame, const nsRect& aRect,
|
||||
builder.SetDescendIntoSubdocuments(false);
|
||||
}
|
||||
|
||||
builder.SetHitTestShouldStopAtFirstOpaque(aFlags & ONLY_VISIBLE);
|
||||
|
||||
builder.EnterPresShell(aFrame);
|
||||
aFrame->BuildDisplayListForStackingContext(&builder, aRect, &list);
|
||||
builder.LeavePresShell(aFrame, nullptr);
|
||||
@ -3247,7 +3249,6 @@ nsLayoutUtils::GetFramesForArea(nsIFrame* aFrame, const nsRect& aRect,
|
||||
#endif
|
||||
|
||||
nsDisplayItem::HitTestState hitTestState;
|
||||
builder.SetHitTestShouldStopAtFirstOpaque(aFlags & ONLY_VISIBLE);
|
||||
list.HitTest(&builder, aRect, &hitTestState, &aOutFrames);
|
||||
list.DeleteAll();
|
||||
return NS_OK;
|
||||
|
@ -119,7 +119,7 @@ nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayListCollection set;
|
||||
|
||||
// Do not allow the child subtree to receive events.
|
||||
if (!isForEventDelivery) {
|
||||
if (!isForEventDelivery || aBuilder->HitTestShouldStopAtFirstOpaque()) {
|
||||
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
|
||||
|
||||
if (ShouldClipPaintingToBorderBox()) {
|
||||
|
Loading…
Reference in New Issue
Block a user