зеркало из https://github.com/mozilla/gecko-dev.git
Bug 840902. Part 1: Stop checking the results of various display list methods. r=mattwoodrow
--HG-- extra : rebase_source : f90be285148c68fae306d09714f0fe642b490c45
This commit is contained in:
Родитель
9468e105e3
Коммит
40d4209ce7
|
@ -1617,10 +1617,7 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
|||
if (isThemed) {
|
||||
nsDisplayBackgroundImage* bgItem =
|
||||
new (aBuilder) nsDisplayBackgroundImage(aBuilder, aFrame, 0, isThemed, nullptr);
|
||||
nsresult rv = aList->AppendNewToTop(bgItem);
|
||||
if (rv != NS_OK) {
|
||||
return rv;
|
||||
}
|
||||
aList->AppendNewToTop(bgItem);
|
||||
if (aBackground) {
|
||||
*aBackground = bgItem;
|
||||
}
|
||||
|
@ -1640,10 +1637,7 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
|||
}
|
||||
nsDisplayBackgroundImage* bgItem =
|
||||
new (aBuilder) nsDisplayBackgroundImage(aBuilder, aFrame, i, isThemed, bg);
|
||||
nsresult rv = aList->AppendNewToTop(bgItem);
|
||||
if (rv != NS_OK) {
|
||||
return rv;
|
||||
}
|
||||
aList->AppendNewToTop(bgItem);
|
||||
if (!backgroundSet) {
|
||||
*aBackground = bgItem;
|
||||
backgroundSet = true;
|
||||
|
|
|
@ -307,7 +307,8 @@ public:
|
|||
if (aFrame != frame) {
|
||||
return NS_OK;
|
||||
}
|
||||
return frame->DisplayCaret(this, aDirtyRect, aList);
|
||||
frame->DisplayCaret(this, aDirtyRect, aList);
|
||||
return NS_OK;
|
||||
}
|
||||
/**
|
||||
* Get the frame that the caret is supposed to draw in.
|
||||
|
|
|
@ -1725,12 +1725,8 @@ nsLayoutUtils::GetRemoteContentIds(nsIFrame* aFrame,
|
|||
}
|
||||
|
||||
builder.EnterPresShell(aFrame, aTarget);
|
||||
|
||||
nsresult rv =
|
||||
aFrame->BuildDisplayListForStackingContext(&builder, aTarget, &list);
|
||||
|
||||
aFrame->BuildDisplayListForStackingContext(&builder, aTarget, &list);
|
||||
builder.LeavePresShell(aFrame, aTarget);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsAutoTArray<nsIFrame*,8> outFrames;
|
||||
nsDisplayItem::HitTestState hitTestState(&aOutIDs);
|
||||
|
@ -1779,12 +1775,8 @@ nsLayoutUtils::GetFramesForArea(nsIFrame* aFrame, const nsRect& aRect,
|
|||
}
|
||||
|
||||
builder.EnterPresShell(aFrame, target);
|
||||
|
||||
nsresult rv =
|
||||
aFrame->BuildDisplayListForStackingContext(&builder, target, &list);
|
||||
|
||||
aFrame->BuildDisplayListForStackingContext(&builder, target, &list);
|
||||
builder.LeavePresShell(aFrame, target);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
if (gDumpEventList) {
|
||||
|
@ -1918,13 +1910,12 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
|
|||
}
|
||||
}
|
||||
}
|
||||
nsresult rv;
|
||||
|
||||
nsRect dirtyRect = visibleRegion.GetBounds();
|
||||
builder.EnterPresShell(aFrame, dirtyRect);
|
||||
{
|
||||
SAMPLE_LABEL("nsLayoutUtils","PaintFrame::BuildDisplayList");
|
||||
rv = aFrame->BuildDisplayListForStackingContext(&builder, dirtyRect, &list);
|
||||
SAMPLE_LABEL("nsLayoutUtils","PaintFrame::BuildDisplayList");
|
||||
aFrame->BuildDisplayListForStackingContext(&builder, dirtyRect, &list);
|
||||
}
|
||||
const bool paintAllContinuations = aFlags & PAINT_ALL_CONTINUATIONS;
|
||||
NS_ASSERTION(!paintAllContinuations || !aFrame->GetPrevContinuation(),
|
||||
|
@ -1935,12 +1926,11 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
|
|||
|
||||
if (paintAllContinuations) {
|
||||
nsIFrame* currentFrame = aFrame;
|
||||
while (NS_SUCCEEDED(rv) &&
|
||||
(currentFrame = currentFrame->GetNextContinuation()) != nullptr) {
|
||||
while ((currentFrame = currentFrame->GetNextContinuation()) != nullptr) {
|
||||
SAMPLE_LABEL("nsLayoutUtils","PaintFrame::ContinuationsBuildDisplayList");
|
||||
nsRect frameDirty = dirtyRect - builder.ToReferenceFrame(currentFrame);
|
||||
rv = currentFrame->BuildDisplayListForStackingContext(&builder,
|
||||
frameDirty, &list);
|
||||
currentFrame->BuildDisplayListForStackingContext(&builder,
|
||||
frameDirty, &list);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1950,7 +1940,7 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
|
|||
nsLayoutUtils::NeedsPrintPreviewBackground(presContext)) {
|
||||
nsRect bounds = nsRect(builder.ToReferenceFrame(aFrame),
|
||||
aFrame->GetSize());
|
||||
rv = presShell->AddPrintPreviewBackgroundItem(builder, list, aFrame, bounds);
|
||||
presShell->AddPrintPreviewBackgroundItem(builder, list, aFrame, bounds);
|
||||
} else if (frameType != nsGkAtoms::pageFrame) {
|
||||
// For printing, this function is first called on an nsPageFrame, which
|
||||
// creates a display list with a PageContent item. The PageContent item's
|
||||
|
@ -1962,7 +1952,7 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
|
|||
// happens after we've built the list so that AddCanvasBackgroundColorItem
|
||||
// can monkey with the contents if necessary.
|
||||
canvasArea.IntersectRect(canvasArea, visibleRegion.GetBounds());
|
||||
rv = presShell->AddCanvasBackgroundColorItem(
|
||||
presShell->AddCanvasBackgroundColorItem(
|
||||
builder, list, aFrame, canvasArea, aBackstop);
|
||||
|
||||
// If the passed in backstop color makes us draw something different from
|
||||
|
@ -1983,7 +1973,6 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
|
|||
}
|
||||
|
||||
builder.LeavePresShell(aFrame, dirtyRect);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (builder.GetHadToIgnorePaintSuppression()) {
|
||||
willFlushRetainedLayers = true;
|
||||
|
|
|
@ -181,17 +181,16 @@ nsButtonFrameRenderer::DisplayButton(nsDisplayListBuilder* aBuilder,
|
|||
nsDisplayList* aForeground)
|
||||
{
|
||||
if (mFrame->GetStyleBorder()->mBoxShadow) {
|
||||
nsresult rv = aBackground->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayButtonBoxShadowOuter(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aBackground->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayButtonBoxShadowOuter(aBuilder, this));
|
||||
}
|
||||
|
||||
nsresult rv = aBackground->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayButtonBorderBackground(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aBackground->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayButtonBorderBackground(aBuilder, this));
|
||||
|
||||
return aForeground->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayButtonForeground(aBuilder, this));
|
||||
aForeground->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayButtonForeground(aBuilder, this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1324,9 +1324,7 @@ nsComboboxDisplayFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsDisplayListCollection set;
|
||||
nsresult rv = nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, set);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, set);
|
||||
|
||||
// remove background items if parent frame is themed
|
||||
if (mComboBox->IsThemed()) {
|
||||
|
@ -1550,13 +1548,11 @@ nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (aBuilder->IsForEventDelivery()) {
|
||||
// Don't allow children to receive events.
|
||||
// REVIEW: following old GetFrameForPoint
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
} else {
|
||||
// REVIEW: Our in-flow child frames are inline-level so they will paint in our
|
||||
// content list, so we don't need to mess with layers.
|
||||
nsresult rv = nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
}
|
||||
|
||||
// draw a focus indicator only when focus rings should be drawn
|
||||
|
@ -1569,14 +1565,14 @@ nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if ((!IsThemed(disp) ||
|
||||
!presContext->GetTheme()->ThemeDrawsFocusForWidget(presContext, this, disp->mAppearance)) &&
|
||||
mDisplayFrame && IsVisibleForPainting(aBuilder)) {
|
||||
nsresult rv = aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayComboboxFocus(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayComboboxFocus(aBuilder, this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return DisplaySelectionOverlay(aBuilder, aLists.Content());
|
||||
DisplaySelectionOverlay(aBuilder, aLists.Content());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsComboboxControlFrame::PaintFocus(nsRenderingContext& aRenderingContext,
|
||||
|
|
|
@ -187,19 +187,16 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// we need to paint the outline
|
||||
if (IsVisibleForPainting(aBuilder)) {
|
||||
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));
|
||||
}
|
||||
|
||||
// don't bother checking to see if we really have a border or background.
|
||||
// we usually will have a border.
|
||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayFieldSetBorderBackground(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayFieldSetBorderBackground(aBuilder, this));
|
||||
|
||||
rv = DisplayOutlineUnconditional(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayOutlineUnconditional(aBuilder, aLists);
|
||||
|
||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsFieldSetFrame");
|
||||
}
|
||||
|
@ -212,16 +209,14 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// mLegendFrame. However, we want mContentFrame's display items to be
|
||||
// after mLegendFrame's display items in z-order, so we need to save them
|
||||
// and append them later.
|
||||
nsresult rv = BuildDisplayListForChild(aBuilder, mContentFrame, aDirtyRect,
|
||||
contentDisplayItems);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForChild(aBuilder, mContentFrame, aDirtyRect,
|
||||
contentDisplayItems);
|
||||
}
|
||||
if (mLegendFrame) {
|
||||
// The legend's background goes on our BlockBorderBackgrounds list because
|
||||
// it's a block child.
|
||||
nsDisplayListSet set(aLists, aLists.BlockBorderBackgrounds());
|
||||
nsresult rv = BuildDisplayListForChild(aBuilder, mLegendFrame, aDirtyRect, set);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForChild(aBuilder, mLegendFrame, aDirtyRect, set);
|
||||
}
|
||||
// Put mContentFrame's display items on the master list. Note that
|
||||
// this moves mContentFrame's border/background display items to our
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -101,9 +101,7 @@ nsGfxCheckboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsresult rv = nsFormControlFrame::BuildDisplayList(aBuilder, aDirtyRect,
|
||||
aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsFormControlFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
|
||||
// Get current checked state through content model.
|
||||
if ((!IsChecked() && !IsIndeterminate()) || !IsVisibleForPainting(aBuilder))
|
||||
|
@ -112,12 +110,13 @@ nsGfxCheckboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (IsThemed())
|
||||
return NS_OK; // No need to paint the checkmark. The theme will do it.
|
||||
|
||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayGeneric(aBuilder, this,
|
||||
IsIndeterminate()
|
||||
? PaintIndeterminateMark : PaintCheckMark,
|
||||
"CheckedCheckbox",
|
||||
nsDisplayItem::TYPE_CHECKED_CHECKBOX));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------
|
||||
|
|
|
@ -64,10 +64,8 @@ nsGfxRadioControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsresult rv = nsFormControlFrame::BuildDisplayList(aBuilder, aDirtyRect,
|
||||
aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsFormControlFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
|
||||
if (!IsVisibleForPainting(aBuilder))
|
||||
return NS_OK;
|
||||
|
||||
|
@ -79,8 +77,9 @@ nsGfxRadioControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (!checked)
|
||||
return NS_OK;
|
||||
|
||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayGeneric(aBuilder, this, PaintCheckedRadioButton,
|
||||
"CheckedRadioButton",
|
||||
nsDisplayItem::TYPE_CHECKED_RADIOBUTTON));
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -117,17 +117,14 @@ nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
{
|
||||
nsDisplayList onTop;
|
||||
if (IsVisibleForPainting(aBuilder)) {
|
||||
nsresult rv = mRenderer.DisplayButton(aBuilder, aLists.BorderBackground(), &onTop);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
mRenderer.DisplayButton(aBuilder, aLists.BorderBackground(), &onTop);
|
||||
}
|
||||
|
||||
nsDisplayListCollection set;
|
||||
// Do not allow the child subtree to receive events.
|
||||
if (!aBuilder->IsForEventDelivery()) {
|
||||
nsresult rv =
|
||||
BuildDisplayListForChild(aBuilder, mFrames.FirstChild(), aDirtyRect, set,
|
||||
DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForChild(aBuilder, mFrames.FirstChild(), aDirtyRect, set,
|
||||
DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT);
|
||||
// That should put the display items in set.Content()
|
||||
}
|
||||
|
||||
|
@ -143,17 +140,16 @@ nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
nscoord radii[8];
|
||||
GetPaddingBoxBorderRadii(radii);
|
||||
|
||||
nsresult rv = OverflowClip(aBuilder, set, aLists, rect, radii);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
OverflowClip(aBuilder, set, aLists, rect, radii);
|
||||
} else {
|
||||
set.MoveTo(aLists);
|
||||
}
|
||||
|
||||
nsresult rv = DisplayOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayOutline(aBuilder, aLists);
|
||||
|
||||
// to draw border when selected in editor
|
||||
return DisplaySelectionOverlay(aBuilder, aLists.Content());
|
||||
DisplaySelectionOverlay(aBuilder, aLists.Content());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nscoord
|
||||
|
|
|
@ -101,7 +101,8 @@ nsProgressFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
return BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
||||
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsProgressFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
|
|
@ -154,15 +154,14 @@ nsSelectsAreaFrame::BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsresult rv = nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
|
||||
nsListControlFrame* listFrame = GetEnclosingListFrame(this);
|
||||
if (listFrame && listFrame->IsFocused()) {
|
||||
// we can't just associate the display item with the list frame,
|
||||
// because then the list's scrollframe won't clip it (the scrollframe
|
||||
// only clips contained descendants).
|
||||
return aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||
aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayListFocus(aBuilder, this));
|
||||
}
|
||||
|
||||
|
|
|
@ -1475,8 +1475,7 @@ nsTextControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
nsCOMPtr<nsITextControlElement> txtCtrl = do_QueryInterface(GetContent());
|
||||
NS_ASSERTION(txtCtrl, "Content not a text control element!");
|
||||
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
nsIFrame* kid = mFrames.FirstChild();
|
||||
nsDisplayListSet set(aLists, aLists.Content());
|
||||
|
@ -1486,8 +1485,7 @@ nsTextControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// placeholder has to be visible.
|
||||
if (kid->GetContent() != txtCtrl->GetPlaceholderNode() ||
|
||||
txtCtrl->GetPlaceholderVisibility()) {
|
||||
nsresult rv = BuildDisplayListForChild(aBuilder, kid, aDirtyRect, set, 0);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, set, 0);
|
||||
}
|
||||
kid = kid->GetNextSibling();
|
||||
}
|
||||
|
|
|
@ -6250,7 +6250,6 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
nsLineBox* cursor = aBuilder->ShouldDescendIntoFrame(this) ?
|
||||
nullptr : GetFirstLineContaining(aDirtyRect.y);
|
||||
line_iterator line_end = end_lines();
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
if (cursor) {
|
||||
for (line_iterator line = mLines.begin(cursor);
|
||||
|
@ -6263,10 +6262,8 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (lineArea.y >= aDirtyRect.YMost()) {
|
||||
break;
|
||||
}
|
||||
rv = DisplayLine(aBuilder, lineArea, aDirtyRect, line, depth, drawnLines,
|
||||
linesDisplayListCollection, this, textOverflow);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
DisplayLine(aBuilder, lineArea, aDirtyRect, line, depth, drawnLines,
|
||||
linesDisplayListCollection, this, textOverflow);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -6278,10 +6275,8 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
line != line_end;
|
||||
++line) {
|
||||
nsRect lineArea = line->GetVisualOverflowArea();
|
||||
rv = DisplayLine(aBuilder, lineArea, aDirtyRect, line, depth, drawnLines,
|
||||
linesDisplayListCollection, this, textOverflow);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
DisplayLine(aBuilder, lineArea, aDirtyRect, line, depth, drawnLines,
|
||||
linesDisplayListCollection, this, textOverflow);
|
||||
if (!lineArea.IsEmpty()) {
|
||||
if (lineArea.y < lastY
|
||||
|| lineArea.YMost() < lastYMost) {
|
||||
|
@ -6293,7 +6288,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
lineCount++;
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(rv) && nonDecreasingYs && lineCount >= MIN_LINES_NEEDING_CURSOR) {
|
||||
if (nonDecreasingYs && lineCount >= MIN_LINES_NEEDING_CURSOR) {
|
||||
SetupLineCursor();
|
||||
}
|
||||
}
|
||||
|
@ -6307,10 +6302,10 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
linesDisplayListCollection.MoveTo(aLists);
|
||||
|
||||
if (NS_SUCCEEDED(rv) && HasOutsideBullet()) {
|
||||
if (HasOutsideBullet()) {
|
||||
// Display outside bullets manually
|
||||
nsIFrame* bullet = GetOutsideBullet();
|
||||
rv = BuildDisplayListForChild(aBuilder, bullet, aDirtyRect, aLists);
|
||||
BuildDisplayListForChild(aBuilder, bullet, aDirtyRect, aLists);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -6334,7 +6329,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
#endif
|
||||
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
|
|
|
@ -254,8 +254,9 @@ nsBulletFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsBulletFrame");
|
||||
|
||||
return aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayBullet(aBuilder, this));
|
||||
aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayBullet(aBuilder, this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -287,8 +287,6 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
if (GetPrevInFlow()) {
|
||||
DisplayOverflowContainers(aBuilder, aDirtyRect, aLists);
|
||||
}
|
||||
|
@ -312,8 +310,9 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
new (aBuilder) nsDisplayCanvasBackgroundColor(aBuilder, this));
|
||||
|
||||
if (isThemed) {
|
||||
return aLists.BorderBackground()->AppendNewToTop(
|
||||
aLists.BorderBackground()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayCanvasBackgroundImage(aBuilder, this, 0, isThemed, nullptr));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (!bg) {
|
||||
|
@ -325,18 +324,16 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (bg->mLayers[i].mImage.IsEmpty()) {
|
||||
continue;
|
||||
}
|
||||
rv = aLists.BorderBackground()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayCanvasBackgroundImage(aBuilder, this, i,
|
||||
isThemed, bg));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayCanvasBackgroundImage(aBuilder, this, i,
|
||||
isThemed, bg));
|
||||
}
|
||||
}
|
||||
|
||||
nsIFrame* kid;
|
||||
for (kid = GetFirstPrincipalChild(); kid; kid = kid->GetNextSibling()) {
|
||||
// Put our child into its own pseudo-stack.
|
||||
rv = BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_CANVAS_FOCUS
|
||||
|
@ -364,8 +361,9 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (!GetStyleVisibility()->IsVisible())
|
||||
return NS_OK;
|
||||
|
||||
return aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayCanvasFocus(aBuilder, this));
|
||||
aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayCanvasFocus(aBuilder, this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1087,8 +1087,7 @@ NS_IMETHODIMP
|
|||
nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) {
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayGeneric(aBuilder, this, ::PaintColumnRule, "ColumnRule",
|
||||
|
@ -1096,9 +1095,7 @@ nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
// Our children won't have backgrounds so it doesn't matter where we put them.
|
||||
for (nsFrameList::Enumerator e(mFrames); !e.AtEnd(); e.Next()) {
|
||||
nsresult rv = BuildDisplayListForChild(aBuilder, e.get(),
|
||||
aDirtyRect, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForChild(aBuilder, e.get(), aDirtyRect, aLists);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -333,10 +333,10 @@ nsContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
return BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists);
|
||||
BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -350,8 +350,7 @@ nsContainerFrame::BuildDisplayListForNonBlockChildren(nsDisplayListBuilder* aB
|
|||
nsDisplayListSet set(aLists, aLists.Content());
|
||||
// The children should be in content order
|
||||
while (kid) {
|
||||
nsresult rv = BuildDisplayListForChild(aBuilder, kid, aDirtyRect, set, aFlags);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, set, aFlags);
|
||||
kid = kid->GetNextSibling();
|
||||
}
|
||||
return NS_OK;
|
||||
|
|
|
@ -403,12 +403,10 @@ protected:
|
|||
nsresult BuildDisplayListForInline(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) {
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists,
|
||||
DISPLAY_CHILD_INLINE);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
return rv;
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists,
|
||||
DISPLAY_CHILD_INLINE);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -51,7 +51,8 @@ nsFirstLetterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
return BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
||||
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -1045,16 +1045,14 @@ nsFlexContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
MOZ_ASSERT(nsLayoutUtils::IsFrameListSorted<IsOrderLEQWithDOMFallback>(mFrames),
|
||||
"Frame list should've been sorted in reflow");
|
||||
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
// Our children are all block-level, so their borders/backgrounds all go on
|
||||
// the BlockBorderBackgrounds list.
|
||||
nsDisplayListSet childLists(aLists, aLists.BlockBorderBackgrounds());
|
||||
for (nsFrameList::Enumerator e(mFrames); !e.AtEnd(); e.Next()) {
|
||||
rv = BuildDisplayListForChild(aBuilder, e.get(), aDirtyRect, childLists,
|
||||
GetDisplayFlagsForFlexItem(e.get()));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForChild(aBuilder, e.get(), aDirtyRect, childLists,
|
||||
GetDisplayFlagsForFlexItem(e.get()));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -1453,8 +1453,9 @@ nsFrame::DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
return aList->AppendNewToTop(new (aBuilder)
|
||||
nsDisplaySelectionOverlay(aBuilder, this, selectionValue));
|
||||
aList->AppendNewToTop(new (aBuilder)
|
||||
nsDisplaySelectionOverlay(aBuilder, this, selectionValue));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -1464,8 +1465,9 @@ nsFrame::DisplayOutlineUnconditional(nsDisplayListBuilder* aBuilder,
|
|||
if (GetStyleOutline()->GetOutlineStyle() == NS_STYLE_BORDER_STYLE_NONE)
|
||||
return NS_OK;
|
||||
|
||||
return aLists.Outlines()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayOutline(aBuilder, this));
|
||||
aLists.Outlines()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayOutline(aBuilder, this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -1475,7 +1477,8 @@ nsFrame::DisplayOutline(nsDisplayListBuilder* aBuilder,
|
|||
if (!IsVisibleForPainting(aBuilder))
|
||||
return NS_OK;
|
||||
|
||||
return DisplayOutlineUnconditional(aBuilder, aLists);
|
||||
DisplayOutlineUnconditional(aBuilder, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -1485,8 +1488,9 @@ nsIFrame::DisplayCaret(nsDisplayListBuilder* aBuilder,
|
|||
if (!IsVisibleForPainting(aBuilder))
|
||||
return NS_OK;
|
||||
|
||||
return aList->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayCaret(aBuilder, this, aBuilder->GetCaret()));
|
||||
aList->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayCaret(aBuilder, this, aBuilder->GetCaret()));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nscolor
|
||||
|
@ -1509,9 +1513,9 @@ nsFrame::DisplayBackgroundUnconditional(nsDisplayListBuilder* aBuilder,
|
|||
// true.
|
||||
if (aBuilder->IsForEventDelivery() || aForceBackground ||
|
||||
!GetStyleBackground()->IsTransparent() || GetStyleDisplay()->mAppearance) {
|
||||
return nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder, this,
|
||||
aLists.BorderBackground(),
|
||||
aBackground);
|
||||
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder, this,
|
||||
aLists.BorderBackground(),
|
||||
aBackground);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -1530,31 +1534,27 @@ nsFrame::DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
nsCSSShadowArray* shadows = GetStyleBorder()->mBoxShadow;
|
||||
if (shadows && shadows->HasShadowWithInset(false)) {
|
||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayBoxShadowOuter(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayBoxShadowOuter(aBuilder, this));
|
||||
}
|
||||
|
||||
nsDisplayBackgroundImage* bg;
|
||||
nsresult rv =
|
||||
DisplayBackgroundUnconditional(aBuilder, aLists, aForceBackground, &bg);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBackgroundUnconditional(aBuilder, aLists, aForceBackground, &bg);
|
||||
|
||||
if (shadows && shadows->HasShadowWithInset(true)) {
|
||||
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayBoxShadowInner(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayBoxShadowInner(aBuilder, this));
|
||||
}
|
||||
|
||||
// If there's a themed background, we should not create a border item.
|
||||
// It won't be rendered.
|
||||
if ((!bg || !bg->IsThemed()) && GetStyleBorder()->HasBorder()) {
|
||||
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayBorder(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayBorder(aBuilder, this));
|
||||
}
|
||||
|
||||
return DisplayOutlineUnconditional(aBuilder, aLists);
|
||||
DisplayOutlineUnconditional(aBuilder, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
inline static bool IsSVGContentWithCSSClip(const nsIFrame *aFrame)
|
||||
|
@ -1725,12 +1725,10 @@ BuildDisplayListWithOverflowClip(nsDisplayListBuilder* aBuilder, nsIFrame* aFram
|
|||
const nsRect& aClipRect, const nscoord aClipRadii[8])
|
||||
{
|
||||
nsDisplayListCollection set;
|
||||
nsresult rv = aFrame->BuildDisplayList(aBuilder, aDirtyRect, set);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = aBuilder->DisplayCaret(aFrame, aDirtyRect, aSet.Content());
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return aFrame->OverflowClip(aBuilder, set, aSet, aClipRect, aClipRadii);
|
||||
aFrame->BuildDisplayList(aBuilder, aDirtyRect, set);
|
||||
aBuilder->DisplayCaret(aFrame, aDirtyRect, aSet.Content());
|
||||
aFrame->OverflowClip(aBuilder, set, aSet, aClipRect, aClipRadii);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -1935,14 +1933,12 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
nsDisplayListCollection set;
|
||||
nsresult rv;
|
||||
{
|
||||
nsDisplayListBuilder::AutoBuildingDisplayList rootSetter(aBuilder, true);
|
||||
nsDisplayListBuilder::AutoInTransformSetter
|
||||
inTransformSetter(aBuilder, inTransform);
|
||||
rv = BuildDisplayList(aBuilder, dirtyRect, set);
|
||||
BuildDisplayList(aBuilder, dirtyRect, set);
|
||||
}
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (aBuilder->IsBackgroundOnly()) {
|
||||
set.BlockBorderBackgrounds()->DeleteAll();
|
||||
|
@ -1966,8 +1962,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
|||
this->GetPaddingBoxBorderRadii(radii);
|
||||
nsOverflowClipWrapper wrapper(this, overflowClip, radii,
|
||||
false, false);
|
||||
rv = wrapper.WrapListsInPlace(aBuilder, this, set);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
wrapper.WrapListsInPlace(aBuilder, this, set);
|
||||
}
|
||||
// We didn't use overflowClip to restrict the dirty rect, since some of the
|
||||
// descendants may not be clipped by it. Even if we end up with unnecessary
|
||||
|
@ -2029,10 +2024,8 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
|||
*/
|
||||
if (usingSVGEffects) {
|
||||
/* List now emptied, so add the new list to the top. */
|
||||
rv = resultList.AppendNewToTop(
|
||||
resultList.AppendNewToTop(
|
||||
new (aBuilder) nsDisplaySVGEffects(aBuilder, this, &resultList));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
}
|
||||
/* Else, if the list is non-empty and there is CSS group opacity without SVG
|
||||
* effects, wrap it up in an opacity item.
|
||||
|
@ -2040,10 +2033,8 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
|||
else if (HasOpacity() &&
|
||||
!nsSVGUtils::CanOptimizeOpacity(this) &&
|
||||
!resultList.IsEmpty()) {
|
||||
rv = resultList.AppendNewToTop(
|
||||
resultList.AppendNewToTop(
|
||||
new (aBuilder) nsDisplayOpacity(aBuilder, this, &resultList));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* If we're going to apply a transformation and don't have preserve-3d set, wrap
|
||||
|
@ -2059,19 +2050,15 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
|||
*/
|
||||
if (IsTransformed() && !resultList.IsEmpty()) {
|
||||
if (Preserves3DChildren()) {
|
||||
rv = WrapPreserve3DList(this, aBuilder, &resultList);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
WrapPreserve3DList(this, aBuilder, &resultList);
|
||||
} else {
|
||||
rv = resultList.AppendNewToTop(
|
||||
resultList.AppendNewToTop(
|
||||
new (aBuilder) nsDisplayTransform(aBuilder, this, &resultList));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
aList->AppendToTop(&resultList);
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -2238,24 +2225,21 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||
// overflow:hidden etc creates an nsHTML/XULScrollFrame which does its own
|
||||
// clipping.
|
||||
|
||||
nsresult rv;
|
||||
if (!pseudoStackingContext) {
|
||||
// THIS IS THE COMMON CASE.
|
||||
// Not a pseudo or real stacking context. Do the simple thing and
|
||||
// return early.
|
||||
if (applyOverflowClip) {
|
||||
rv = BuildDisplayListWithOverflowClip(aBuilder, child, dirty, aLists,
|
||||
overflowClip, overflowClipRadii);
|
||||
BuildDisplayListWithOverflowClip(aBuilder, child, dirty, aLists,
|
||||
overflowClip, overflowClipRadii);
|
||||
} else {
|
||||
rv = child->BuildDisplayList(aBuilder, dirty, aLists);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = aBuilder->DisplayCaret(child, dirty, aLists.Content());
|
||||
}
|
||||
child->BuildDisplayList(aBuilder, dirty, aLists);
|
||||
aBuilder->DisplayCaret(child, dirty, aLists.Content());
|
||||
}
|
||||
#ifdef DEBUG
|
||||
DisplayDebugBorders(aBuilder, child, aLists);
|
||||
#endif
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsDisplayList list;
|
||||
|
@ -2264,10 +2248,8 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||
if ((isPositioned && pos->mZIndex.GetUnit() == eStyleUnit_Integer) ||
|
||||
isVisuallyAtomic || (aFlags & DISPLAY_CHILD_FORCE_STACKING_CONTEXT)) {
|
||||
// True stacking context
|
||||
rv = child->BuildDisplayListForStackingContext(aBuilder, dirty, &list);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = aBuilder->DisplayCaret(child, dirty, &list);
|
||||
}
|
||||
child->BuildDisplayListForStackingContext(aBuilder, dirty, &list);
|
||||
aBuilder->DisplayCaret(child, dirty, &list);
|
||||
} else {
|
||||
nsRect clipRect;
|
||||
bool applyClipPropClipping =
|
||||
|
@ -2286,21 +2268,17 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
if (applyOverflowClip) {
|
||||
rv = BuildDisplayListWithOverflowClip(aBuilder, child, clippedDirtyRect,
|
||||
pseudoStack, overflowClip,
|
||||
overflowClipRadii);
|
||||
BuildDisplayListWithOverflowClip(aBuilder, child, clippedDirtyRect,
|
||||
pseudoStack, overflowClip,
|
||||
overflowClipRadii);
|
||||
} else {
|
||||
rv = child->BuildDisplayList(aBuilder, clippedDirtyRect, pseudoStack);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = aBuilder->DisplayCaret(child, dirty, pseudoStack.Content());
|
||||
}
|
||||
child->BuildDisplayList(aBuilder, clippedDirtyRect, pseudoStack);
|
||||
aBuilder->DisplayCaret(child, dirty, pseudoStack.Content());
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
if (applyClipPropClipping) {
|
||||
nsDisplayClipPropWrapper wrapper(clipRect);
|
||||
rv = wrapper.WrapListsInPlace(aBuilder, child, pseudoStack);
|
||||
}
|
||||
if (applyClipPropClipping) {
|
||||
nsDisplayClipPropWrapper wrapper(clipRect);
|
||||
wrapper.WrapListsInPlace(aBuilder, child, pseudoStack);
|
||||
}
|
||||
list.AppendToTop(pseudoStack.BorderBackground());
|
||||
list.AppendToTop(pseudoStack.BlockBorderBackgrounds());
|
||||
|
@ -2312,7 +2290,6 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||
DisplayDebugBorders(aBuilder, child, aLists);
|
||||
#endif
|
||||
}
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (isPositioned || isVisuallyAtomic ||
|
||||
(aFlags & DISPLAY_CHILD_FORCE_STACKING_CONTEXT)) {
|
||||
|
@ -2328,11 +2305,10 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||
item = new (aBuilder) nsDisplayWrapList(aBuilder, child, &list);
|
||||
}
|
||||
if (isSVG) {
|
||||
rv = aLists.Content()->AppendNewToTop(item);
|
||||
aLists.Content()->AppendNewToTop(item);
|
||||
} else {
|
||||
rv = aLists.PositionedDescendants()->AppendNewToTop(item);
|
||||
aLists.PositionedDescendants()->AppendNewToTop(item);
|
||||
}
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Make sure that extra positioned descendants don't escape having
|
||||
// their fixed-position metadata applied to them.
|
||||
|
@ -2349,9 +2325,8 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
} else if (!isSVG && disp->IsFloating(child)) {
|
||||
if (!list.IsEmpty()) {
|
||||
rv = aLists.Floats()->AppendNewToTop(new (aBuilder)
|
||||
aLists.Floats()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayWrapList(aBuilder, child, &list));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
} else {
|
||||
aLists.Content()->AppendToTop(&list);
|
||||
|
|
|
@ -763,14 +763,13 @@ nsHTMLFramesetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsresult rv = BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
||||
|
||||
if (mDragger && aBuilder->IsForEventDelivery()) {
|
||||
rv = aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayEventReceiver(aBuilder, this));
|
||||
aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayEventReceiver(aBuilder, this));
|
||||
}
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1546,8 +1545,9 @@ nsHTMLFramesetBorderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
return aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayFramesetBorder(aBuilder, this));
|
||||
aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayFramesetBorder(aBuilder, this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsHTMLFramesetBorderFrame::PaintBorder(nsRenderingContext& aRenderingContext,
|
||||
|
@ -1755,6 +1755,7 @@ nsHTMLFramesetBlankFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
return aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayFramesetBlank(aBuilder, this));
|
||||
aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayFramesetBlank(aBuilder, this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -1995,8 +1995,7 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsresult rv = mOuter->DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
mOuter->DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
if (aBuilder->IsPaintingToWindow()) {
|
||||
mScrollPosAtLastPaint = GetScrollPosition();
|
||||
|
@ -2016,8 +2015,9 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// Don't clip the scrolled child, and don't paint scrollbars/scrollcorner.
|
||||
// The scrolled frame shouldn't have its own background/border, so we
|
||||
// can just pass aLists directly.
|
||||
return mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame,
|
||||
aDirtyRect, aLists);
|
||||
mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame,
|
||||
aDirtyRect, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// We put scrollbars in their own layers when this is the root scroll
|
||||
|
@ -2062,8 +2062,7 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
nsDisplayListCollection set;
|
||||
rv = mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame, dirtyRect, set);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame, dirtyRect, set);
|
||||
|
||||
// Since making new layers is expensive, only use nsDisplayScrollLayer
|
||||
// if the area is scrollable and we're the content process.
|
||||
|
@ -2101,9 +2100,8 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// to end up on our BorderBackground list.
|
||||
// If we are the viewport scrollframe, then clip all our descendants (to ensure
|
||||
// that fixed-pos elements get clipped by us).
|
||||
rv = mOuter->OverflowClip(aBuilder, set, aLists, clip, radii,
|
||||
true, mIsRoot);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
mOuter->OverflowClip(aBuilder, set, aLists, clip, radii,
|
||||
true, mIsRoot);
|
||||
|
||||
if (ShouldBuildLayer()) {
|
||||
// ScrollLayerWrapper must always be created because it initializes the
|
||||
|
|
|
@ -286,18 +286,15 @@ nsHTMLCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (!IsVisibleForPainting(aBuilder))
|
||||
return NS_OK;
|
||||
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
nsDisplayList replacedContent;
|
||||
|
||||
rv = replacedContent.AppendNewToTop(
|
||||
new (aBuilder) nsDisplayCanvas(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
replacedContent.AppendNewToTop(
|
||||
new (aBuilder) nsDisplayCanvas(aBuilder, this));
|
||||
|
||||
rv = DisplaySelectionOverlay(aBuilder, &replacedContent,
|
||||
nsISelectionDisplay::DISPLAY_IMAGES);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplaySelectionOverlay(aBuilder, &replacedContent,
|
||||
nsISelectionDisplay::DISPLAY_IMAGES);
|
||||
|
||||
WrapReplacedContentForBorderRadius(aBuilder, &replacedContent, aLists);
|
||||
|
||||
|
|
|
@ -1378,8 +1378,7 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// to put the background in ... it goes in aLists.BorderBackground() and
|
||||
// then if we have a block parent, it will put our background in the right
|
||||
// place.
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
// REVIEW: Checking mRect.IsEmpty() makes no sense to me, so I removed it.
|
||||
// It can't have been protecting us against bad situations with zero-size
|
||||
// images since adding a border would make the rect non-empty.
|
||||
|
@ -1417,14 +1416,12 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (!imageOK || !haveSize) {
|
||||
// No image yet, or image load failed. Draw the alt-text and an icon
|
||||
// indicating the status
|
||||
rv = replacedContent.AppendNewToTop(new (aBuilder)
|
||||
nsDisplayAltFeedback(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
replacedContent.AppendNewToTop(new (aBuilder)
|
||||
nsDisplayAltFeedback(aBuilder, this));
|
||||
}
|
||||
else {
|
||||
rv = replacedContent.AppendNewToTop(new (aBuilder)
|
||||
nsDisplayImage(aBuilder, this, imgCon));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
replacedContent.AppendNewToTop(new (aBuilder)
|
||||
nsDisplayImage(aBuilder, this, imgCon));
|
||||
|
||||
// If we were previously displaying an icon, we're not anymore
|
||||
if (mDisplayingIcon) {
|
||||
|
@ -1435,19 +1432,17 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
#ifdef DEBUG
|
||||
if (GetShowFrameBorders() && GetImageMap()) {
|
||||
rv = aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayGeneric(aBuilder, this, PaintDebugImageMap, "DebugImageMap",
|
||||
nsDisplayItem::TYPE_DEBUG_IMAGE_MAP));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayGeneric(aBuilder, this, PaintDebugImageMap, "DebugImageMap",
|
||||
nsDisplayItem::TYPE_DEBUG_IMAGE_MAP));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (ShouldDisplaySelection()) {
|
||||
rv = DisplaySelectionOverlay(aBuilder, &replacedContent,
|
||||
nsISelectionDisplay::DISPLAY_IMAGES);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplaySelectionOverlay(aBuilder, &replacedContent,
|
||||
nsISelectionDisplay::DISPLAY_IMAGES);
|
||||
}
|
||||
|
||||
WrapReplacedContentForBorderRadius(aBuilder, &replacedContent, aLists);
|
||||
|
|
|
@ -179,17 +179,16 @@ nsInlineFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsresult rv = BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
||||
|
||||
// The sole purpose of this is to trigger display of the selection
|
||||
// window for Named Anchors, which don't have any children and
|
||||
// normally don't have any size, but in Editor we use CSS to display
|
||||
// an image to represent this "hidden" element.
|
||||
if (!mFrames.FirstChild()) {
|
||||
rv = DisplaySelectionOverlay(aBuilder, aLists.Content());
|
||||
DisplaySelectionOverlay(aBuilder, aLists.Content());
|
||||
}
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -27,7 +27,8 @@ public:
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) {
|
||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsLeafFrame");
|
||||
return DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1217,8 +1217,7 @@ nsObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (!IsVisibleOrCollapsedForPainting(aBuilder))
|
||||
return NS_OK;
|
||||
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
nsPresContext::nsPresContextType type = PresContext()->Type();
|
||||
|
||||
|
@ -1252,9 +1251,9 @@ nsObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
// determine if we are printing
|
||||
if (type == nsPresContext::eContext_Print) {
|
||||
rv = replacedContent.AppendNewToTop(new (aBuilder)
|
||||
nsDisplayGeneric(aBuilder, this, PaintPrintPlugin, "PrintPlugin",
|
||||
nsDisplayItem::TYPE_PRINT_PLUGIN));
|
||||
replacedContent.AppendNewToTop(new (aBuilder)
|
||||
nsDisplayGeneric(aBuilder, this, PaintPrintPlugin, "PrintPlugin",
|
||||
nsDisplayItem::TYPE_PRINT_PLUGIN));
|
||||
} else {
|
||||
LayerState state = GetLayerState(aBuilder, nullptr);
|
||||
if (state == LAYER_INACTIVE &&
|
||||
|
@ -1266,9 +1265,8 @@ nsObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (aBuilder->IsPaintingToWindow() &&
|
||||
state == LAYER_ACTIVE &&
|
||||
IsTransparentMode()) {
|
||||
rv = replacedContent.AppendNewToTop(new (aBuilder)
|
||||
nsDisplayPluginReadback(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
replacedContent.AppendNewToTop(new (aBuilder)
|
||||
nsDisplayPluginReadback(aBuilder, this));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1280,17 +1278,15 @@ nsObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
mInstanceOwner->GetVideos(videos);
|
||||
|
||||
for (uint32_t i = 0; i < videos.Length(); i++) {
|
||||
rv = replacedContent.AppendNewToTop(new (aBuilder)
|
||||
replacedContent.AppendNewToTop(new (aBuilder)
|
||||
nsDisplayPluginVideo(aBuilder, this, videos[i]));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
rv = replacedContent.AppendNewToTop(new (aBuilder)
|
||||
nsDisplayPlugin(aBuilder, this));
|
||||
replacedContent.AppendNewToTop(new (aBuilder)
|
||||
nsDisplayPlugin(aBuilder, this));
|
||||
}
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
WrapReplacedContentForBorderRadius(aBuilder, &replacedContent, aLists);
|
||||
|
||||
|
|
|
@ -467,10 +467,7 @@ BuildDisplayListForExtraPage(nsDisplayListBuilder* aBuilder,
|
|||
// have already been marked as NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO.
|
||||
// Note that we should still do a prune step since we don't want to
|
||||
// rely on dirty-rect checking for correctness.
|
||||
nsresult rv =
|
||||
aExtraPage->BuildDisplayListForStackingContext(aBuilder, nsRect(), &list);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
aExtraPage->BuildDisplayListForStackingContext(aBuilder, nsRect(), &list);
|
||||
PruneDisplayListForExtraPage(aBuilder, aPage, aExtraPage, aY, &list);
|
||||
aList->AppendToTop(&list);
|
||||
return NS_OK;
|
||||
|
@ -514,18 +511,15 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsDisplayListCollection set;
|
||||
nsresult rv;
|
||||
|
||||
if (PresContext()->IsScreen()) {
|
||||
rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
}
|
||||
|
||||
nsDisplayList content;
|
||||
nsIFrame *child = mFrames.FirstChild();
|
||||
rv = child->BuildDisplayListForStackingContext(aBuilder,
|
||||
child->BuildDisplayListForStackingContext(aBuilder,
|
||||
child->GetVisualOverflowRectRelativeToSelf(), &content);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// We may need to paint out-of-flow frames whose placeholders are
|
||||
// on other pages. Add those pages to our display list. Note that
|
||||
|
@ -537,9 +531,7 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
nsIFrame* page = child;
|
||||
nscoord y = child->GetSize().height;
|
||||
while ((page = GetNextPage(page)) != nullptr) {
|
||||
rv = BuildDisplayListForExtraPage(aBuilder, this, page, y, &content);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
BuildDisplayListForExtraPage(aBuilder, this, page, y, &content);
|
||||
y += page->GetSize().height;
|
||||
}
|
||||
|
||||
|
@ -548,8 +540,8 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// can monkey with the contents if necessary.
|
||||
nsRect backgroundRect =
|
||||
nsRect(aBuilder->ToReferenceFrame(child), child->GetSize());
|
||||
rv = PresContext()->GetPresShell()->AddCanvasBackgroundColorItem(
|
||||
*aBuilder, content, child, backgroundRect, NS_RGBA(0,0,0,0));
|
||||
PresContext()->GetPresShell()->AddCanvasBackgroundColorItem(
|
||||
*aBuilder, content, child, backgroundRect, NS_RGBA(0,0,0,0));
|
||||
|
||||
float scale = PresContext()->GetPageScale();
|
||||
nsRect clipRect(nsPoint(0, 0), child->GetSize());
|
||||
|
@ -571,20 +563,16 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
"Should be clipping to region inside the page content bounds");
|
||||
}
|
||||
clipRect += aBuilder->ToReferenceFrame(child);
|
||||
rv = content.AppendNewToTop(new (aBuilder) nsDisplayClip(aBuilder, child, &content, clipRect));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = content.AppendNewToTop(new (aBuilder) nsDisplayTransform(aBuilder, child, &content, ::ComputePageTransform));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
content.AppendNewToTop(new (aBuilder) nsDisplayClip(aBuilder, child, &content, clipRect));
|
||||
content.AppendNewToTop(new (aBuilder) nsDisplayTransform(aBuilder, child, &content, ::ComputePageTransform));
|
||||
|
||||
set.Content()->AppendToTop(&content);
|
||||
|
||||
if (PresContext()->IsRootPaginatedDocument()) {
|
||||
rv = set.Content()->AppendNewToTop(new (aBuilder)
|
||||
set.Content()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayGeneric(aBuilder, this, ::PaintHeaderFooter,
|
||||
"HeaderFooter",
|
||||
nsDisplayItem::TYPE_HEADER_FOOTER));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
set.MoveTo(aLists);
|
||||
|
|
|
@ -808,21 +808,18 @@ nsSimplePageSequenceFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
nsDisplayList content;
|
||||
nsIFrame* child = GetFirstPrincipalChild();
|
||||
while (child) {
|
||||
rv = child->BuildDisplayListForStackingContext(aBuilder,
|
||||
child->BuildDisplayListForStackingContext(aBuilder,
|
||||
child->GetVisualOverflowRectRelativeToSelf(), &content);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
child = child->GetNextSibling();
|
||||
}
|
||||
|
||||
rv = content.AppendNewToTop(new (aBuilder)
|
||||
content.AppendNewToTop(new (aBuilder)
|
||||
nsDisplayTransform(aBuilder, this, &content, ::ComputePageSequenceTransform));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
aLists.Content()->AppendToTop(&content);
|
||||
return NS_OK;
|
||||
|
|
|
@ -307,8 +307,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (aBuilder->IsForEventDelivery() && !PassPointerEventsToChildren())
|
||||
return NS_OK;
|
||||
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
if (!mInnerView)
|
||||
return NS_OK;
|
||||
|
@ -393,8 +392,8 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
mInnerView->GetBounds() + aBuilder->ToReferenceFrame(this);
|
||||
|
||||
if (subdocRootFrame) {
|
||||
rv = subdocRootFrame->
|
||||
BuildDisplayListForStackingContext(aBuilder, dirty, &childItems);
|
||||
subdocRootFrame->
|
||||
BuildDisplayListForStackingContext(aBuilder, dirty, &childItems);
|
||||
}
|
||||
|
||||
if (!aBuilder->IsForEventDelivery()) {
|
||||
|
@ -413,17 +412,17 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// background behind the page, not the canvas color. The canvas color gets
|
||||
// painted on the page itself.
|
||||
if (nsLayoutUtils::NeedsPrintPreviewBackground(presContext)) {
|
||||
rv = presShell->AddPrintPreviewBackgroundItem(
|
||||
*aBuilder, childItems, subdocRootFrame ? subdocRootFrame : this,
|
||||
bounds);
|
||||
presShell->AddPrintPreviewBackgroundItem(
|
||||
*aBuilder, childItems, subdocRootFrame ? subdocRootFrame : this,
|
||||
bounds);
|
||||
} else {
|
||||
// Add the canvas background color to the bottom of the list. This
|
||||
// happens after we've built the list so that AddCanvasBackgroundColorItem
|
||||
// can monkey with the contents if necessary.
|
||||
uint32_t flags = nsIPresShell::FORCE_DRAW;
|
||||
rv = presShell->AddCanvasBackgroundColorItem(
|
||||
*aBuilder, childItems, subdocRootFrame ? subdocRootFrame : this,
|
||||
bounds, NS_RGBA(0,0,0,0), flags);
|
||||
presShell->AddCanvasBackgroundColorItem(
|
||||
*aBuilder, childItems, subdocRootFrame ? subdocRootFrame : this,
|
||||
bounds, NS_RGBA(0,0,0,0), flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -474,7 +473,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// delete childItems in case of OOM
|
||||
childItems.DeleteAll();
|
||||
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nscoord
|
||||
|
|
|
@ -375,15 +375,13 @@ nsVideoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsVideoFrame");
|
||||
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
nsDisplayList replacedContent;
|
||||
|
||||
if (HasVideoElement() && !ShouldDisplayPoster()) {
|
||||
rv = replacedContent.AppendNewToTop(
|
||||
replacedContent.AppendNewToTop(
|
||||
new (aBuilder) nsDisplayVideo(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
// Add child frames to display list. We expect up to two children, an image
|
||||
|
@ -392,15 +390,13 @@ nsVideoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
child;
|
||||
child = child->GetNextSibling()) {
|
||||
if (child->GetType() == nsGkAtoms::imageFrame && ShouldDisplayPoster()) {
|
||||
rv = child->BuildDisplayListForStackingContext(aBuilder,
|
||||
aDirtyRect - child->GetOffsetTo(this),
|
||||
&replacedContent);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
child->BuildDisplayListForStackingContext(aBuilder,
|
||||
aDirtyRect - child->GetOffsetTo(this),
|
||||
&replacedContent);
|
||||
} else if (child->GetType() == nsGkAtoms::boxFrame) {
|
||||
rv = child->BuildDisplayListForStackingContext(aBuilder,
|
||||
aDirtyRect - child->GetOffsetTo(this),
|
||||
&replacedContent);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
child->BuildDisplayListForStackingContext(aBuilder,
|
||||
aDirtyRect - child->GetOffsetTo(this),
|
||||
&replacedContent);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,8 @@ ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// make the kid's BorderBackground our own. This ensures that the canvas
|
||||
// frame's background becomes our own background and therefore appears
|
||||
// below negative z-index elements.
|
||||
return BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -959,9 +959,10 @@ RenderFrameParent::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
nsPoint offset = aBuilder->ToReferenceFrame(aFrame);
|
||||
nsRect bounds = aFrame->EnsureInnerView()->GetBounds() + offset;
|
||||
|
||||
return aLists.Content()->AppendNewToTop(
|
||||
aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayClip(aBuilder, aFrame, &shadowTree,
|
||||
bounds));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1759,7 +1759,6 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
|
|||
uint32_t aIndex,
|
||||
const nsRect* aSelectedRect)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
nsStyleContext* parentContext = mStyleContext->GetParent();
|
||||
nsStyleContext* styleContext = mStyleContext;
|
||||
|
||||
|
@ -1777,34 +1776,32 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
|
|||
// purposes. Normally, users will set the background on the container frame.
|
||||
// paint the selection background -- beware MathML frames overlap a lot
|
||||
if (aSelectedRect && !aSelectedRect->IsEmpty()) {
|
||||
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayMathMLSelectionRect(aBuilder, aForFrame, *aSelectedRect));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayMathMLSelectionRect(aBuilder, aForFrame, *aSelectedRect));
|
||||
}
|
||||
else if (mRect.width && mRect.height) {
|
||||
const nsStyleBackground* backg = styleContext->GetStyleBackground();
|
||||
if (styleContext != parentContext &&
|
||||
NS_GET_A(backg->mBackgroundColor) > 0) {
|
||||
rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayMathMLCharBackground(aBuilder, aForFrame, mRect,
|
||||
styleContext));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayMathMLCharBackground(aBuilder, aForFrame, mRect,
|
||||
styleContext));
|
||||
}
|
||||
//else
|
||||
// our container frame will take care of painting its background
|
||||
|
||||
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
|
||||
// for visual debug
|
||||
rv = aLists.BorderBackground()->AppendToTop(new (aBuilder)
|
||||
nsDisplayMathMLCharDebug(aBuilder, aForFrame, mRect));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendToTop(new (aBuilder)
|
||||
nsDisplayMathMLCharDebug(aBuilder, aForFrame, mRect));
|
||||
#endif
|
||||
}
|
||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayMathMLCharForeground(aBuilder, aForFrame, this,
|
||||
aIndex,
|
||||
aSelectedRect &&
|
||||
!aSelectedRect->IsEmpty()));
|
||||
aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayMathMLCharForeground(aBuilder, aForFrame, this,
|
||||
aIndex,
|
||||
aSelectedRect &&
|
||||
!aSelectedRect->IsEmpty()));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -631,16 +631,15 @@ nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (!IsVisibleForPainting(aBuilder))
|
||||
return NS_OK;
|
||||
|
||||
return aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayMathMLError(aBuilder, this));
|
||||
aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayMathMLError(aBuilder, this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
rv = BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists,
|
||||
DISPLAY_CHILD_INLINE);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists,
|
||||
DISPLAY_CHILD_INLINE);
|
||||
|
||||
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
|
||||
// for visual debug
|
||||
|
@ -649,9 +648,9 @@ nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// your mBoundingMetrics and mReference point, and set
|
||||
// mPresentationData.flags |= NS_MATHML_SHOW_BOUNDING_METRICS
|
||||
// in the Init() of your sub-class
|
||||
rv = DisplayBoundingMetrics(aBuilder, this, mReference, mBoundingMetrics, aLists);
|
||||
DisplayBoundingMetrics(aBuilder, this, mReference, mBoundingMetrics, aLists);
|
||||
#endif
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Note that this method re-builds the automatic data in the children -- not
|
||||
|
|
|
@ -474,6 +474,6 @@ nsMathMLFrame::DisplayBar(nsDisplayListBuilder* aBuilder,
|
|||
if (!aFrame->GetStyleVisibility()->IsVisible() || aRect.IsEmpty())
|
||||
return NS_OK;
|
||||
|
||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayMathMLBar(aBuilder, aFrame, aRect));
|
||||
aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayMathMLBar(aBuilder, aFrame, aRect));
|
||||
}
|
||||
|
|
|
@ -280,26 +280,25 @@ nsMathMLmactionFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// We can't call nsDisplayMathMLError from here,
|
||||
// so ask nsMathMLContainerFrame to do the work for us.
|
||||
if (NS_MATHML_HAS_ERROR(mPresentationData.flags)) {
|
||||
return nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
nsIFrame* childFrame = GetSelectedFrame();
|
||||
if (childFrame) {
|
||||
// Put the child's background directly onto the content list
|
||||
nsDisplayListSet set(aLists, aLists.Content());
|
||||
// The children should be in content order
|
||||
rv = BuildDisplayListForChild(aBuilder, childFrame, aDirtyRect, set);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForChild(aBuilder, childFrame, aDirtyRect, set);
|
||||
}
|
||||
|
||||
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
|
||||
// visual debug
|
||||
rv = DisplayBoundingMetrics(aBuilder, this, mReference, mBoundingMetrics, aLists);
|
||||
DisplayBoundingMetrics(aBuilder, this, mReference, mBoundingMetrics, aLists);
|
||||
#endif
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Only reflow the selected child ...
|
||||
|
|
|
@ -85,16 +85,13 @@ nsMathMLmoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
bool useMathMLChar = UseMathMLChar();
|
||||
|
||||
if (!useMathMLChar) {
|
||||
// let the base class do everything
|
||||
rv = nsMathMLTokenFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsMathMLTokenFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
} else {
|
||||
rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
// make our char selected if our inner child text frame is selected
|
||||
bool isSelected = false;
|
||||
|
@ -106,15 +103,14 @@ nsMathMLmoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
selectedRect.Inflate(nsPresContext::CSSPixelsToAppUnits(1));
|
||||
isSelected = true;
|
||||
}
|
||||
rv = mMathMLChar.Display(aBuilder, this, aLists, 0, isSelected ? &selectedRect : nullptr);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
mMathMLChar.Display(aBuilder, this, aLists, 0, isSelected ? &selectedRect : nullptr);
|
||||
|
||||
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
|
||||
// for visual debug
|
||||
rv = DisplayBoundingMetrics(aBuilder, this, mReference, mBoundingMetrics, aLists);
|
||||
DisplayBoundingMetrics(aBuilder, this, mReference, mBoundingMetrics, aLists);
|
||||
#endif
|
||||
}
|
||||
return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// get the text that we enclose and setup our nsMathMLChar
|
||||
|
|
|
@ -176,7 +176,8 @@ nsSVGForeignObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (!static_cast<const nsSVGElement*>(mContent)->HasValidDimensions()) {
|
||||
return NS_OK;
|
||||
}
|
||||
return BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists);
|
||||
BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -360,8 +360,9 @@ nsSVGGlyphFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (GetStyleFont()->mFont.size <= 0) {
|
||||
return NS_OK;
|
||||
}
|
||||
return aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplaySVGGlyphs(aBuilder, this));
|
||||
aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplaySVGGlyphs(aBuilder, this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -697,8 +697,7 @@ nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
nsDisplayList childItems;
|
||||
|
||||
|
@ -708,13 +707,10 @@ nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
nsDisplayList *nonContentList = &childItems;
|
||||
nsDisplayListSet set(nonContentList, nonContentList, nonContentList,
|
||||
&childItems, nonContentList, nonContentList);
|
||||
nsresult rv =
|
||||
BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, set);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, set);
|
||||
} else {
|
||||
rv = childItems.AppendNewToTop(
|
||||
new (aBuilder) nsDisplayOuterSVG(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
childItems.AppendNewToTop(
|
||||
new (aBuilder) nsDisplayOuterSVG(aBuilder, this));
|
||||
}
|
||||
|
||||
// Clip to our _content_ box:
|
||||
|
@ -722,8 +718,7 @@ nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
GetContentRectRelativeToSelf() + aBuilder->ToReferenceFrame(this);
|
||||
nsDisplayClip* item =
|
||||
new (aBuilder) nsDisplayClip(aBuilder, this, &childItems, clipRect);
|
||||
rv = childItems.AppendNewToTop(item);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
childItems.AppendNewToTop(item);
|
||||
|
||||
WrapReplacedContentForBorderRadius(aBuilder, &childItems, aLists);
|
||||
|
||||
|
|
|
@ -171,8 +171,9 @@ nsSVGPathGeometryFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (!static_cast<const nsSVGElement*>(mContent)->HasValidDimensions()) {
|
||||
return NS_OK;
|
||||
}
|
||||
return aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplaySVGPathGeometry(aBuilder, this));
|
||||
aLists.Content()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplaySVGPathGeometry(aBuilder, this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -99,7 +99,7 @@ nsSVGSwitchFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
{
|
||||
nsIFrame* kid = GetActiveChildFrame();
|
||||
if (kid) {
|
||||
return BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -447,9 +447,8 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsStyleBorder* borderStyle = GetStyleBorder();
|
||||
bool hasBoxShadow = !!borderStyle->mBoxShadow;
|
||||
if (hasBoxShadow) {
|
||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayBoxShadowOuter(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayBoxShadowOuter(aBuilder, this));
|
||||
}
|
||||
|
||||
// display background if we need to.
|
||||
|
@ -461,39 +460,34 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// so we need to duplicate some code from nsFrame::DisplayBorderBackgroundOutline
|
||||
nsDisplayTableItem* item =
|
||||
new (aBuilder) nsDisplayTableCellBackground(aBuilder, this);
|
||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(item);
|
||||
item->UpdateForFrameBackground(this);
|
||||
}
|
||||
|
||||
// display inset box-shadows if we need to.
|
||||
if (hasBoxShadow) {
|
||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayBoxShadowInner(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayBoxShadowInner(aBuilder, this));
|
||||
}
|
||||
|
||||
// display borders if we need to
|
||||
if (!tableFrame->IsBorderCollapse() && borderStyle->HasBorder() &&
|
||||
emptyCellStyle == NS_STYLE_TABLE_EMPTY_CELLS_SHOW) {
|
||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayBorder(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayBorder(aBuilder, this));
|
||||
}
|
||||
|
||||
// and display the selection border if we need to
|
||||
if (IsSelected()) {
|
||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayGeneric(aBuilder, this, ::PaintTableCellSelection,
|
||||
"TableCellSelection",
|
||||
nsDisplayItem::TYPE_TABLE_CELL_SELECTION));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayGeneric(aBuilder, this, ::PaintTableCellSelection,
|
||||
"TableCellSelection",
|
||||
nsDisplayItem::TYPE_TABLE_CELL_SELECTION));
|
||||
}
|
||||
}
|
||||
|
||||
// the 'empty-cells' property has no effect on 'outline'
|
||||
nsresult rv = DisplayOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayOutline(aBuilder, aLists);
|
||||
}
|
||||
|
||||
// Push a null 'current table item' so that descendant tables can't
|
||||
|
@ -509,7 +503,8 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// because that/ would put the child's background in the Content() list
|
||||
// which isn't right (e.g., would end up on top of our child floats for
|
||||
// event handling).
|
||||
return BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1117,8 +1117,7 @@ nsTableFrame::GenericTraversal(nsDisplayListBuilder* aBuilder, nsFrame* aFrame,
|
|||
// lets us get cell borders into the nsTableFrame's BorderBackground list.
|
||||
nsIFrame* kid = aFrame->GetFirstPrincipalChild();
|
||||
while (kid) {
|
||||
nsresult rv = aFrame->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aFrame->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
kid = kid->GetNextSibling();
|
||||
}
|
||||
return NS_OK;
|
||||
|
@ -1155,30 +1154,26 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
|
|||
// Paint the outset box-shadows for the table frames
|
||||
bool hasBoxShadow = aFrame->GetStyleBorder()->mBoxShadow != nullptr;
|
||||
if (hasBoxShadow) {
|
||||
nsresult rv = lists->BorderBackground()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayBoxShadowOuter(aBuilder, aFrame));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
lists->BorderBackground()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayBoxShadowOuter(aBuilder, aFrame));
|
||||
}
|
||||
|
||||
// Create dedicated background display items per-frame when we're
|
||||
// handling events.
|
||||
// XXX how to handle collapsed borders?
|
||||
if (aBuilder->IsForEventDelivery()) {
|
||||
nsresult rv = nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder, aFrame,
|
||||
lists->BorderBackground());
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder, aFrame,
|
||||
lists->BorderBackground());
|
||||
}
|
||||
|
||||
// Paint the inset box-shadows for the table frames
|
||||
if (hasBoxShadow) {
|
||||
nsresult rv = lists->BorderBackground()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayBoxShadowInner(aBuilder, aFrame));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
lists->BorderBackground()->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayBoxShadowInner(aBuilder, aFrame));
|
||||
}
|
||||
}
|
||||
|
||||
nsresult rv = aTraversal(aBuilder, aFrame, aDirtyRect, *lists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aTraversal(aBuilder, aFrame, aDirtyRect, *lists);
|
||||
|
||||
if (sortEventBackgrounds) {
|
||||
// Ensure that the table frame event background goes before the
|
||||
|
@ -1188,7 +1183,8 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
|
|||
separatedCollection.MoveTo(aLists);
|
||||
}
|
||||
|
||||
return aFrame->DisplayOutline(aBuilder, aLists);
|
||||
aFrame->DisplayOutline(aBuilder, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -1243,8 +1239,7 @@ nsTableFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// opacity and visibility optimizations
|
||||
if (deflate == nsMargin(0, 0, 0, 0)) {
|
||||
nsDisplayBackgroundImage* bg;
|
||||
nsresult rv = DisplayBackgroundUnconditional(aBuilder, aLists, false, &bg);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBackgroundUnconditional(aBuilder, aLists, false, &bg);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1257,11 +1252,12 @@ nsTableFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
AnyTablePartHasBorderOrBackground(this, GetNextSibling()) ||
|
||||
AnyTablePartHasBorderOrBackground(mColGroups.FirstChild(), nullptr)) {
|
||||
item = new (aBuilder) nsDisplayTableBorderBackground(aBuilder, this);
|
||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(item);
|
||||
}
|
||||
}
|
||||
return DisplayGenericTablePart(aBuilder, this, aDirtyRect, aLists, item);
|
||||
DisplayGenericTablePart(aBuilder, this, aDirtyRect, aLists, item);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsMargin
|
||||
|
|
|
@ -297,17 +297,17 @@ nsTableOuterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
// If there's no caption, take a short cut to avoid having to create
|
||||
// the special display list set and then sort it.
|
||||
if (mCaptionFrames.IsEmpty())
|
||||
return BuildDisplayListForInnerTable(aBuilder, aDirtyRect, aLists);
|
||||
|
||||
if (mCaptionFrames.IsEmpty()) {
|
||||
BuildDisplayListForInnerTable(aBuilder, aDirtyRect, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsDisplayListCollection set;
|
||||
nsresult rv = BuildDisplayListForInnerTable(aBuilder, aDirtyRect, set);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForInnerTable(aBuilder, aDirtyRect, set);
|
||||
|
||||
nsDisplayListSet captionSet(set, set.BlockBorderBackgrounds());
|
||||
rv = BuildDisplayListForChild(aBuilder, mCaptionFrames.FirstChild(),
|
||||
aDirtyRect, captionSet);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForChild(aBuilder, mCaptionFrames.FirstChild(),
|
||||
aDirtyRect, captionSet);
|
||||
|
||||
// Now we have to sort everything by content order, since the caption
|
||||
// may be somewhere inside the table
|
||||
|
@ -326,8 +326,7 @@ nsTableOuterFrame::BuildDisplayListForInnerTable(nsDisplayListBuilder* aBuilde
|
|||
nsIFrame* kid = mFrames.FirstChild();
|
||||
// The children should be in content order
|
||||
while (kid) {
|
||||
nsresult rv = BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
kid = kid->GetNextSibling();
|
||||
}
|
||||
return NS_OK;
|
||||
|
|
|
@ -571,11 +571,11 @@ nsTableRowFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// need the background to be larger than the row frame in some
|
||||
// cases.
|
||||
item = new (aBuilder) nsDisplayTableRowBackground(aBuilder, this);
|
||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(item);
|
||||
}
|
||||
}
|
||||
return nsTableFrame::DisplayGenericTablePart(aBuilder, this, aDirtyRect, aLists, item);
|
||||
nsTableFrame::DisplayGenericTablePart(aBuilder, this, aDirtyRect, aLists, item);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -178,8 +178,7 @@ DisplayRows(nsDisplayListBuilder* aBuilder, nsFrame* aFrame,
|
|||
while (kid) {
|
||||
if (kid->GetRect().y - overflowAbove >= aDirtyRect.YMost())
|
||||
break;
|
||||
nsresult rv = f->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
f->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
kid = kid->GetNextSibling();
|
||||
}
|
||||
return NS_OK;
|
||||
|
@ -189,11 +188,7 @@ DisplayRows(nsDisplayListBuilder* aBuilder, nsFrame* aFrame,
|
|||
nsTableRowGroupFrame::FrameCursorData* cursor = f->SetupRowCursor();
|
||||
kid = f->GetFirstPrincipalChild();
|
||||
while (kid) {
|
||||
nsresult rv = f->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
if (NS_FAILED(rv)) {
|
||||
f->ClearRowCursor();
|
||||
return rv;
|
||||
}
|
||||
f->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
|
||||
if (cursor) {
|
||||
if (!cursor->AppendFrame(kid)) {
|
||||
|
@ -224,12 +219,12 @@ nsTableRowGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// visible or not. Visibility decisions are delegated to the
|
||||
// table background painter.
|
||||
item = new (aBuilder) nsDisplayTableRowGroupBackground(aBuilder, this);
|
||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(item);
|
||||
}
|
||||
}
|
||||
return nsTableFrame::DisplayGenericTablePart(aBuilder, this, aDirtyRect,
|
||||
aLists, item, DisplayRows);
|
||||
nsTableFrame::DisplayGenericTablePart(aBuilder, this, aDirtyRect,
|
||||
aLists, item, DisplayRows);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1311,27 +1311,22 @@ nsBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
nsDisplayListCollection tempLists;
|
||||
const nsDisplayListSet& destination = forceLayer ? tempLists : aLists;
|
||||
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, destination);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, destination);
|
||||
|
||||
#ifdef DEBUG_LAYOUT
|
||||
if (mState & NS_STATE_CURRENTLY_IN_DEBUG) {
|
||||
rv = destination.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayGeneric(aBuilder, this, PaintXULDebugBackground,
|
||||
"XULDebugBackground"));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = destination.Outlines()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayXULDebug(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
destination.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayGeneric(aBuilder, this, PaintXULDebugBackground,
|
||||
"XULDebugBackground"));
|
||||
destination.Outlines()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayXULDebug(aBuilder, this));
|
||||
}
|
||||
#endif
|
||||
|
||||
rv = BuildDisplayListForChildren(aBuilder, aDirtyRect, destination);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForChildren(aBuilder, aDirtyRect, destination);
|
||||
|
||||
// see if we have to draw a selection frame around this container
|
||||
rv = DisplaySelectionOverlay(aBuilder, destination.Content());
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplaySelectionOverlay(aBuilder, destination.Content());
|
||||
|
||||
if (forceLayer) {
|
||||
// This is a bit of a hack. Collect up all descendant display items
|
||||
|
@ -1346,9 +1341,8 @@ nsBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
masterList.AppendToTop(tempLists.PositionedDescendants());
|
||||
masterList.AppendToTop(tempLists.Outlines());
|
||||
// Wrap the list to make it its own layer
|
||||
rv = aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayOwnLayer(aBuilder, this, &masterList));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayOwnLayer(aBuilder, this, &masterList));
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -1364,8 +1358,7 @@ nsBoxFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
|
|||
nsDisplayListSet set(aLists, aLists.BlockBorderBackgrounds());
|
||||
// The children should be in the right order
|
||||
while (kid) {
|
||||
nsresult rv = BuildDisplayListForChild(aBuilder, kid, aDirtyRect, set);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, set);
|
||||
kid = kid->GetNextSibling();
|
||||
}
|
||||
return NS_OK;
|
||||
|
|
|
@ -171,7 +171,8 @@ nsDeckFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
|
|||
// Putting the child in the background list. This is a little weird but
|
||||
// it matches what we were doing before.
|
||||
nsDisplayListSet set(aLists, aLists.BlockBorderBackgrounds());
|
||||
return BuildDisplayListForChild(aBuilder, box, aDirtyRect, set);
|
||||
BuildDisplayListForChild(aBuilder, box, aDirtyRect, set);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -111,16 +111,14 @@ nsGroupBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
{
|
||||
// Paint our background and border
|
||||
if (IsVisibleForPainting(aBuilder)) {
|
||||
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayXULGroupBackground(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayXULGroupBackground(aBuilder, this));
|
||||
|
||||
rv = DisplayOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayOutline(aBuilder, aLists);
|
||||
}
|
||||
|
||||
return BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
|
||||
// REVIEW: Debug borders now painted by nsFrame::BuildDisplayListForChild
|
||||
BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -291,8 +291,7 @@ nsImageBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsresult rv = nsLeafBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsLeafBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
|
||||
if ((0 == mRect.width) || (0 == mRect.height)) {
|
||||
// Do not render when given a zero area. This avoids some useless
|
||||
|
@ -306,9 +305,8 @@ nsImageBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
|
||||
nsDisplayList list;
|
||||
rv = list.AppendNewToTop(
|
||||
new (aBuilder) nsDisplayXULImage(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
list.AppendNewToTop(
|
||||
new (aBuilder) nsDisplayXULImage(aBuilder, this));
|
||||
|
||||
CreateOwnLayerIfNeeded(aBuilder, &list);
|
||||
|
||||
|
|
|
@ -116,14 +116,14 @@ nsLeafBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// BlockBorderBackground() list. But I don't see any need to preserve
|
||||
// that anomalous behaviour. The important thing I'm preserving is that
|
||||
// leaf boxes continue to receive events in the foreground layer.
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
if (!aBuilder->IsForEventDelivery() || !IsVisibleForPainting(aBuilder))
|
||||
return NS_OK;
|
||||
|
||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayEventReceiver(aBuilder, this));
|
||||
aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayEventReceiver(aBuilder, this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
|
|
|
@ -207,10 +207,10 @@ nsRootBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// root boxes don't need a debug border/outline or a selection overlay...
|
||||
// They *may* have a background propagated to them, so force creation
|
||||
// of a background display list element.
|
||||
nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists, true);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists, true);
|
||||
|
||||
return BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
|
||||
BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -298,11 +298,13 @@ nsSliderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (aBuilder->IsForEventDelivery() && isDraggingThumb()) {
|
||||
// This is EVIL, we shouldn't be messing with event delivery just to get
|
||||
// thumb mouse drag events to arrive at the slider!
|
||||
return aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayEventReceiver(aBuilder, this));
|
||||
aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayEventReceiver(aBuilder, this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return nsBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
nsBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -365,15 +365,15 @@ nsSplitterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsresult rv = nsBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
|
||||
// if the mouse is captured always return us as the frame.
|
||||
if (mInner->mDragging)
|
||||
{
|
||||
// XXX It's probably better not to check visibility here, right?
|
||||
return aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayEventReceiver(aBuilder, this));
|
||||
aLists.Outlines()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayEventReceiver(aBuilder, this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -361,11 +361,11 @@ nsTextBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (!IsVisibleForPainting(aBuilder))
|
||||
return NS_OK;
|
||||
|
||||
nsresult rv = nsLeafBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsLeafBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
|
||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayXULTextBox(aBuilder, this));
|
||||
aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayXULTextBox(aBuilder, this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -114,18 +114,19 @@ nsTreeColFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
if (!aBuilder->IsForEventDelivery())
|
||||
return nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
|
||||
if (!aBuilder->IsForEventDelivery()) {
|
||||
nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsDisplayListCollection set;
|
||||
nsresult rv = nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, set);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, set);
|
||||
|
||||
rv = WrapListsInRedirector(aBuilder, set, aLists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
WrapListsInRedirector(aBuilder, set, aLists);
|
||||
|
||||
return aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayXULTreeColSplitterTarget(aBuilder, this));
|
||||
aLists.Content()->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayXULTreeColSplitterTarget(aBuilder, this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
Загрузка…
Ссылка в новой задаче