Bug 840902. Part 1: Stop checking the results of various display list methods. r=mattwoodrow

This commit is contained in:
Robert O'Callahan
2013-02-15 00:08:08 +13:00
parent 831705d590
commit 3ac2cf9858
60 changed files with 375 additions and 516 deletions

View File

@@ -584,9 +584,8 @@ nsFileControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
{
// box-shadow
if (GetStyleBorder()->mBoxShadow) {
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
nsDisplayBoxShadowOuter(aBuilder, this));
NS_ENSURE_SUCCESS(rv, rv);
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
nsDisplayBoxShadowOuter(aBuilder, this));
}
// Our background is inherited to the text input, and we don't really want to
@@ -594,9 +593,7 @@ nsFileControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// styles in forms.css) -- doing it just makes us look ugly in some cases and
// has no effect in others.
nsDisplayListCollection tempList;
nsresult rv = nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, tempList);
if (NS_FAILED(rv))
return rv;
nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, tempList);
tempList.BorderBackground()->DeleteAll();
@@ -604,21 +601,19 @@ nsFileControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsRect clipRect(aBuilder->ToReferenceFrame(this), GetSize());
clipRect.width = GetVisualOverflowRect().XMost();
nscoord radii[8] = {0, 0, 0, 0, 0, 0, 0, 0};
rv = OverflowClip(aBuilder, tempList, aLists, clipRect, radii);
NS_ENSURE_SUCCESS(rv, rv);
OverflowClip(aBuilder, tempList, aLists, clipRect, radii);
// 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
nsEventStates eventStates = mContent->AsElement()->State();
if (eventStates.HasState(NS_EVENT_STATE_DISABLED) && IsVisibleForPainting(aBuilder)) {
rv = aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayEventReceiver(aBuilder, this));
if (NS_FAILED(rv))
return rv;
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayEventReceiver(aBuilder, this));
}
return DisplaySelectionOverlay(aBuilder, aLists.Content());
DisplaySelectionOverlay(aBuilder, aLists.Content());
return NS_OK;
}
#ifdef ACCESSIBILITY