Bug 584282. Add nsDisplayItem::mToReferenceFrame and initialize it in the constructor. r=tnikkel,a=dbaron

This commit is contained in:
Robert O'Callahan
2010-08-13 22:01:13 +12:00
parent 23cb3c01d8
commit 6994544c46
49 changed files with 354 additions and 266 deletions

View File

@@ -1007,7 +1007,7 @@ nsFileControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// box-shadow
if (GetStyleBorder()->mBoxShadow) {
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
nsDisplayBoxShadowOuter(this));
nsDisplayBoxShadowOuter(aBuilder, this));
NS_ENSURE_SUCCESS(rv, rv);
}
@@ -1031,14 +1031,12 @@ nsFileControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// Disabled file controls don't pass mouse events to their children, so we
// put an invisible item in the display list above the children
// just to catch events
// REVIEW: I'm not sure why we do this, but that's what nsFileControlFrame::
// GetFrameForPoint was doing
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::disabled) &&
IsVisibleForPainting(aBuilder)) {
nsDisplayItem* item = new (aBuilder) nsDisplayEventReceiver(this);
if (!item)
return NS_ERROR_OUT_OF_MEMORY;
aLists.Content()->AppendToTop(item);
rv = aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayEventReceiver(aBuilder, this));
if (NS_FAILED(rv))
return rv;
}
return DisplaySelectionOverlay(aBuilder, aLists);