Bug 843003 - Send events and allow :hover to apply on <button>'s children. r=bz
This commit is contained in:
@@ -119,28 +119,25 @@ nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
nsDisplayListCollection set;
|
||||
|
||||
// Do not allow the child subtree to receive events.
|
||||
if (!aBuilder->IsForEventDelivery()) {
|
||||
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
|
||||
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
|
||||
|
||||
if (IsInput() || StyleDisplay()->mOverflowX != NS_STYLE_OVERFLOW_VISIBLE) {
|
||||
nsMargin border = StyleBorder()->GetComputedBorder();
|
||||
nsRect rect(aBuilder->ToReferenceFrame(this), GetSize());
|
||||
rect.Deflate(border);
|
||||
nscoord radii[8];
|
||||
bool hasRadii = GetPaddingBoxBorderRadii(radii);
|
||||
clipState.ClipContainingBlockDescendants(rect, hasRadii ? radii : nullptr);
|
||||
}
|
||||
|
||||
BuildDisplayListForChild(aBuilder, mFrames.FirstChild(), aDirtyRect, set,
|
||||
DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT);
|
||||
// That should put the display items in set.Content()
|
||||
if (IsInput() || StyleDisplay()->mOverflowX != NS_STYLE_OVERFLOW_VISIBLE) {
|
||||
nsMargin border = StyleBorder()->GetComputedBorder();
|
||||
nsRect rect(aBuilder->ToReferenceFrame(this), GetSize());
|
||||
rect.Deflate(border);
|
||||
nscoord radii[8];
|
||||
bool hasRadii = GetPaddingBoxBorderRadii(radii);
|
||||
clipState.ClipContainingBlockDescendants(rect, hasRadii ? radii : nullptr);
|
||||
}
|
||||
|
||||
|
||||
// That should put the display items in set.Content()
|
||||
BuildDisplayListForChild(aBuilder, mFrames.FirstChild(), aDirtyRect, set,
|
||||
DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT);
|
||||
|
||||
// Put the foreground outline and focus rects on top of the children
|
||||
set.Content()->AppendToTop(&onTop);
|
||||
set.MoveTo(aLists);
|
||||
|
||||
|
||||
DisplayOutline(aBuilder, aLists);
|
||||
|
||||
// to draw border when selected in editor
|
||||
|
||||
Reference in New Issue
Block a user