Bug 840902. Part 2: Remove nsresults from various display list methods. r=mattwoodrow

--HG--
extra : rebase_source : de498510bf8d85d9b0b2fab0137ef3be01c9adfa
This commit is contained in:
Robert O'Callahan 2013-02-15 00:12:27 +13:00
parent a2485753ff
commit 013943dc4f
153 changed files with 641 additions and 799 deletions

View File

@ -301,14 +301,12 @@ public:
/**
* Display the caret if needed.
*/
nsresult DisplayCaret(nsIFrame* aFrame, const nsRect& aDirtyRect,
nsDisplayList* aList) {
void DisplayCaret(nsIFrame* aFrame, const nsRect& aDirtyRect,
nsDisplayList* aList) {
nsIFrame* frame = GetCaretFrame();
if (aFrame != frame) {
return NS_OK;
if (aFrame == frame) {
frame->DisplayCaret(this, aDirtyRect, aList);
}
frame->DisplayCaret(this, aDirtyRect, aList);
return NS_OK;
}
/**
* Get the frame that the caret is supposed to draw in.
@ -1192,22 +1190,20 @@ public:
* Append a new item to the top of the list. If the item is null we return
* NS_ERROR_OUT_OF_MEMORY. The intended usage is AppendNewToTop(new ...);
*/
nsresult AppendNewToTop(nsDisplayItem* aItem) {
if (!aItem)
return NS_ERROR_OUT_OF_MEMORY;
AppendToTop(aItem);
return NS_OK;
void AppendNewToTop(nsDisplayItem* aItem) {
if (aItem) {
AppendToTop(aItem);
}
}
/**
* Append a new item to the bottom of the list. If the item is null we return
* NS_ERROR_OUT_OF_MEMORY. The intended usage is AppendNewToBottom(new ...);
*/
nsresult AppendNewToBottom(nsDisplayItem* aItem) {
if (!aItem)
return NS_ERROR_OUT_OF_MEMORY;
AppendToBottom(aItem);
return NS_OK;
void AppendNewToBottom(nsDisplayItem* aItem) {
if (aItem) {
AppendToBottom(aItem);
}
}
/**
@ -1680,10 +1676,8 @@ protected:
PR_BEGIN_MACRO \
if (!aBuilder->IsBackgroundOnly() && !aBuilder->IsForEventDelivery() && \
PresContext()->PresShell()->IsPaintingFrameCounts()) { \
nsresult _rv = \
aLists.Outlines()->AppendNewToTop( \
new (aBuilder) nsDisplayReflowCount(aBuilder, this, _name)); \
NS_ENSURE_SUCCESS(_rv, _rv); \
} \
PR_END_MACRO
@ -1691,10 +1685,8 @@ protected:
PR_BEGIN_MACRO \
if (!aBuilder->IsBackgroundOnly() && !aBuilder->IsForEventDelivery() && \
PresContext()->PresShell()->IsPaintingFrameCounts()) { \
nsresult _rv = \
aLists.Outlines()->AppendNewToTop( \
new (aBuilder) nsDisplayReflowCount(aBuilder, this, _name, _color)); \
NS_ENSURE_SUCCESS(_rv, _rv); \
} \
PR_END_MACRO
@ -1702,11 +1694,11 @@ protected:
Macro to be used for classes that don't actually implement BuildDisplayList
*/
#define DECL_DO_GLOBAL_REFLOW_COUNT_DSP(_class, _super) \
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder, \
const nsRect& aDirtyRect, \
const nsDisplayListSet& aLists) { \
void BuildDisplayList(nsDisplayListBuilder* aBuilder, \
const nsRect& aDirtyRect, \
const nsDisplayListSet& aLists) { \
DO_GLOBAL_REFLOW_COUNT_DSP(#_class); \
return _super::BuildDisplayList(aBuilder, aDirtyRect, aLists); \
_super::BuildDisplayList(aBuilder, aDirtyRect, aLists); \
}
#else // MOZ_REFLOW_PERF_DSP && MOZ_REFLOW_PERF

View File

@ -1086,12 +1086,12 @@ public:
enum {
FORCE_DRAW = 0x01
};
virtual nsresult AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
nsDisplayList& aList,
nsIFrame* aFrame,
const nsRect& aBounds,
nscolor aBackstopColor = NS_RGBA(0,0,0,0),
uint32_t aFlags = 0) = 0;
virtual void AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
nsDisplayList& aList,
nsIFrame* aFrame,
const nsRect& aBounds,
nscolor aBackstopColor = NS_RGBA(0,0,0,0),
uint32_t aFlags = 0) = 0;
/**
@ -1099,10 +1099,10 @@ public:
* bounds aBounds representing the dark grey background behind the page of a
* print preview presentation.
*/
virtual nsresult AddPrintPreviewBackgroundItem(nsDisplayListBuilder& aBuilder,
nsDisplayList& aList,
nsIFrame* aFrame,
const nsRect& aBounds) = 0;
virtual void AddPrintPreviewBackgroundItem(nsDisplayListBuilder& aBuilder,
nsDisplayList& aList,
nsIFrame* aFrame,
const nsRect& aBounds) = 0;
/**
* Computes the backstop color for the view: transparent if in a transparent

View File

@ -4868,13 +4868,13 @@ PresShell::RenderSelection(nsISelection* aSelection,
aScreenRect);
}
nsresult
void
PresShell::AddPrintPreviewBackgroundItem(nsDisplayListBuilder& aBuilder,
nsDisplayList& aList,
nsIFrame* aFrame,
const nsRect& aBounds)
{
return aList.AppendNewToBottom(new (&aBuilder)
aList.AppendNewToBottom(new (&aBuilder)
nsDisplaySolidColor(&aBuilder, aFrame, aBounds, NS_RGB(115, 115, 115)));
}
@ -4896,15 +4896,16 @@ AddCanvasBackgroundColor(const nsDisplayList& aList, nsIFrame* aCanvasFrame,
return false;
}
nsresult PresShell::AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
nsDisplayList& aList,
nsIFrame* aFrame,
const nsRect& aBounds,
nscolor aBackstopColor,
uint32_t aFlags)
void
PresShell::AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
nsDisplayList& aList,
nsIFrame* aFrame,
const nsRect& aBounds,
nscolor aBackstopColor,
uint32_t aFlags)
{
if (aBounds.IsEmpty()) {
return NS_OK;
return;
}
// We don't want to add an item for the canvas background color if the frame
// (sub)tree we are painting doesn't include any canvas frames. There isn't
@ -4914,12 +4915,12 @@ nsresult PresShell::AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
// the (sub)tree).
if (!(aFlags & nsIPresShell::FORCE_DRAW) &&
!nsCSSRendering::IsCanvasFrame(aFrame)) {
return NS_OK;
return;
}
nscolor bgcolor = NS_ComposeColors(aBackstopColor, mCanvasBackgroundColor);
if (NS_GET_A(bgcolor) == 0)
return NS_OK;
return;
// To make layers work better, we want to avoid having a big non-scrolled
// color background behind a scrolled transparent background. Instead,
@ -4932,13 +4933,13 @@ nsresult PresShell::AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
nsCanvasFrame* canvasFrame = do_QueryFrame(sf->GetScrolledFrame());
if (canvasFrame && canvasFrame->IsVisibleForPainting(&aBuilder)) {
if (AddCanvasBackgroundColor(aList, canvasFrame, bgcolor))
return NS_OK;
return;
}
}
}
return aList.AppendNewToBottom(
new (&aBuilder) nsDisplaySolidColor(&aBuilder, aFrame, aBounds, bgcolor));
aList.AppendNewToBottom(
new (&aBuilder) nsDisplaySolidColor(&aBuilder, aFrame, aBounds, bgcolor));
}
static bool IsTransparentContainerElement(nsPresContext* aPresContext)

View File

@ -292,17 +292,17 @@ public:
virtual void UpdateCanvasBackground();
virtual nsresult AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
nsDisplayList& aList,
nsIFrame* aFrame,
const nsRect& aBounds,
nscolor aBackstopColor,
uint32_t aFlags);
virtual void AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
nsDisplayList& aList,
nsIFrame* aFrame,
const nsRect& aBounds,
nscolor aBackstopColor,
uint32_t aFlags);
virtual nsresult AddPrintPreviewBackgroundItem(nsDisplayListBuilder& aBuilder,
nsDisplayList& aList,
nsIFrame* aFrame,
const nsRect& aBounds);
virtual void AddPrintPreviewBackgroundItem(nsDisplayListBuilder& aBuilder,
nsDisplayList& aList,
nsIFrame* aFrame,
const nsRect& aBounds);
virtual nscolor ComputeBackstopColor(nsView* aDisplayRoot);

View File

@ -1279,9 +1279,9 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
protected:
nsComboboxControlFrame* mComboBox;
@ -1318,7 +1318,7 @@ nsComboboxDisplayFrame::Reflow(nsPresContext* aPresContext,
return nsBlockFrame::Reflow(aPresContext, aDesiredSize, state, aStatus);
}
NS_IMETHODIMP
void
nsComboboxDisplayFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -1332,8 +1332,6 @@ nsComboboxDisplayFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
set.MoveTo(aLists);
return NS_OK;
}
nsIFrame*
@ -1535,7 +1533,7 @@ void nsDisplayComboboxFocus::Paint(nsDisplayListBuilder* aBuilder,
->PaintFocus(*aCtx, ToReferenceFrame());
}
NS_IMETHODIMP
void
nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -1572,7 +1570,6 @@ nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
DisplaySelectionOverlay(aBuilder, aLists.Content());
return NS_OK;
}
void nsComboboxControlFrame::PaintFocus(nsRenderingContext& aRenderingContext,

View File

@ -81,9 +81,9 @@ public:
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
void PaintFocus(nsRenderingContext& aRenderingContext, nsPoint aPt);

View File

@ -60,9 +60,9 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
void PaintBorderBackground(nsRenderingContext& aRenderingContext,
nsPoint aPt, const nsRect& aDirtyRect, uint32_t aBGFlags);
@ -177,7 +177,7 @@ nsDisplayFieldSetBorderBackground::Paint(nsDisplayListBuilder* aBuilder,
mVisibleRect, aBuilder->GetBackgroundPaintFlags());
}
NS_IMETHODIMP
void
nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
@ -223,7 +223,6 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// BorderBackground() list, which isn't really correct, but it's OK because
// mContentFrame is anonymous and can't have its own border and background.
contentDisplayItems.MoveTo(aLists);
return NS_OK;
}
void

View File

@ -577,7 +577,7 @@ nsFileControlFrame::GetFormProperty(nsIAtom* aName, nsAString& aValue) const
return NS_OK;
}
NS_IMETHODIMP
void
nsFileControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -613,7 +613,6 @@ nsFileControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
DisplaySelectionOverlay(aBuilder, aLists.Content());
return NS_OK;
}
#ifdef ACCESSIBILITY

View File

@ -28,9 +28,9 @@ public:
nsIFrame* aParent,
nsIFrame* aPrevInFlow);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS

View File

@ -96,7 +96,7 @@ nsGfxCheckboxControlFrame::AccessibleType()
#endif
//------------------------------------------------------------
NS_IMETHODIMP
void
nsGfxCheckboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -105,10 +105,10 @@ nsGfxCheckboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// Get current checked state through content model.
if ((!IsChecked() && !IsIndeterminate()) || !IsVisibleForPainting(aBuilder))
return NS_OK; // we're not checked or not visible, nothing to paint.
return; // we're not checked or not visible, nothing to paint.
if (IsThemed())
return NS_OK; // No need to paint the checkmark. The theme will do it.
return; // No need to paint the checkmark. The theme will do it.
aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayGeneric(aBuilder, this,
@ -116,7 +116,6 @@ nsGfxCheckboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
? PaintIndeterminateMark : PaintCheckMark,
"CheckedCheckbox",
nsDisplayItem::TYPE_CHECKED_CHECKBOX));
return NS_OK;
}
//------------------------------------------------------------

View File

@ -22,9 +22,9 @@ public:
}
#endif
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
#ifdef ACCESSIBILITY
virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;

View File

@ -59,7 +59,7 @@ PaintCheckedRadioButton(nsIFrame* aFrame,
aCtx->FillEllipse(rect);
}
NS_IMETHODIMP
void
nsGfxRadioControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -67,19 +67,18 @@ nsGfxRadioControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsFormControlFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
if (!IsVisibleForPainting(aBuilder))
return NS_OK;
return;
if (IsThemed())
return NS_OK; // The theme will paint the check, if any.
return; // The theme will paint the check, if any.
bool checked = true;
GetCurrentCheckState(&checked); // Get check state from the content model
if (!checked)
return NS_OK;
return;
aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayGeneric(aBuilder, this, PaintCheckedRadioButton,
"CheckedRadioButton",
nsDisplayItem::TYPE_CHECKED_RADIOBUTTON));
return NS_OK;
}

View File

@ -24,9 +24,9 @@ public:
virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
#endif
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
};
#endif

View File

@ -110,7 +110,7 @@ nsHTMLButtonControlFrame::HandleEvent(nsPresContext* aPresContext,
}
NS_IMETHODIMP
void
nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -149,7 +149,6 @@ nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// to draw border when selected in editor
DisplaySelectionOverlay(aBuilder, aLists.Content());
return NS_OK;
}
nscoord

View File

@ -35,9 +35,9 @@ public:
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;

View File

@ -156,7 +156,7 @@ nsListControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
nsHTMLScrollFrame::DestroyFrom(aDestructRoot);
}
NS_IMETHODIMP
void
nsListControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -167,7 +167,7 @@ nsListControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// XXX why do we need this here? we should never reach this. Maybe
// because these can have widgets? Hmm
if (aBuilder->IsBackgroundOnly())
return NS_OK;
return;
DO_GLOBAL_REFLOW_COUNT_DSP("nsListControlFrame");
@ -183,12 +183,7 @@ nsListControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
mLastDropdownBackstopColor));
}
// REVIEW: The selection visibility code that used to be here is what
// we already do by default.
// REVIEW: There was code here to paint the theme background. But as far
// as I can tell, we'd just paint the theme background twice because
// it was redundant with nsCSSRendering::PaintBackground
return nsHTMLScrollFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
nsHTMLScrollFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
}
/**

View File

@ -73,9 +73,9 @@ public:
nsDidReflowStatus aStatus);
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nsIFrame* GetContentInsertionFrame();

View File

@ -96,13 +96,12 @@ NS_QUERYFRAME_HEAD(nsProgressFrame)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
NS_IMETHODIMP
void
nsProgressFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
return NS_OK;
}
NS_IMETHODIMP nsProgressFrame::Reflow(nsPresContext* aPresContext,

View File

@ -26,9 +26,9 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,

View File

@ -133,23 +133,24 @@ public:
NS_DISPLAY_DECL_NAME("ListFocus", TYPE_LIST_FOCUS)
};
NS_IMETHODIMP
void
nsSelectsAreaFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!aBuilder->IsForEventDelivery())
return BuildDisplayListInternal(aBuilder, aDirtyRect, aLists);
if (!aBuilder->IsForEventDelivery()) {
BuildDisplayListInternal(aBuilder, aDirtyRect, aLists);
return;
}
nsDisplayListCollection set;
nsresult rv = BuildDisplayListInternal(aBuilder, aDirtyRect, set);
NS_ENSURE_SUCCESS(rv, rv);
BuildDisplayListInternal(aBuilder, aDirtyRect, set);
nsOptionEventGrabberWrapper wrapper;
return wrapper.WrapLists(aBuilder, this, set, aLists);
wrapper.WrapLists(aBuilder, this, set, aLists);
}
nsresult
void
nsSelectsAreaFrame::BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -164,8 +165,6 @@ nsSelectsAreaFrame::BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
aLists.Outlines()->AppendNewToTop(new (aBuilder)
nsDisplayListFocus(aBuilder, this));
}
return NS_OK;
}
NS_IMETHODIMP

View File

@ -15,13 +15,13 @@ public:
friend nsIFrame* NS_NewSelectsAreaFrame(nsIPresShell* aShell, nsStyleContext* aContext, uint32_t aFlags);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
nsresult BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
void BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
NS_IMETHOD Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,

View File

@ -1459,7 +1459,7 @@ nsTextControlFrame::PeekOffset(nsPeekOffsetStruct *aPos)
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
void
nsTextControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -1489,8 +1489,6 @@ nsTextControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
kid = kid->GetNextSibling();
}
return NS_OK;
}
NS_IMETHODIMP

View File

@ -98,9 +98,9 @@ public:
NS_IMETHOD SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) MOZ_OVERRIDE;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
//==== BEGIN NSIFORMCONTROLFRAME
virtual void SetFocus(bool aOn , bool aRepaint);

View File

@ -6144,7 +6144,7 @@ static void DebugOutputDrawLine(int32_t aDepth, nsLineBox* aLine, bool aDrawn) {
}
#endif
static nsresult
static void
DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea,
const nsRect& aDirtyRect, nsBlockFrame::line_iterator& aLine,
int32_t aDepth, int32_t& aDrawnLines, const nsDisplayListSet& aLists,
@ -6170,7 +6170,7 @@ DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea,
bool lineMayHaveTextOverflow = aTextOverflow && lineInline;
if (!intersect && !aBuilder->ShouldDescendIntoFrame(aFrame) &&
!lineMayHaveTextOverflow)
return NS_OK;
return;
// Block-level child backgrounds go on the blockBorderBackgrounds list ...
// Inline-level child backgrounds go on the regular child content list.
@ -6182,20 +6182,17 @@ DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea,
nsIFrame* kid = aLine->mFirstChild;
int32_t n = aLine->GetChildCount();
while (--n >= 0) {
nsresult rv = aFrame->BuildDisplayListForChild(aBuilder, kid, aDirtyRect,
childLists, flags);
NS_ENSURE_SUCCESS(rv, rv);
aFrame->BuildDisplayListForChild(aBuilder, kid, aDirtyRect,
childLists, flags);
kid = kid->GetNextSibling();
}
if (lineMayHaveTextOverflow) {
aTextOverflow->ProcessLine(aLists, aLine.get());
}
return NS_OK;
}
NS_IMETHODIMP
void
nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -6328,8 +6325,6 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
printf("%s\n", buf);
}
#endif
return NS_OK;
}
#ifdef ACCESSIBILITY

View File

@ -154,9 +154,9 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot);
virtual nsSplittableType GetSplittableType() const;
virtual bool IsFloatContainingBlock() const;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nsIAtom* GetType() const;
virtual bool IsFrameOfType(uint32_t aFlags) const
{

View File

@ -244,19 +244,18 @@ void nsDisplayBullet::Paint(nsDisplayListBuilder* aBuilder,
PaintBullet(*aCtx, ToReferenceFrame(), mVisibleRect);
}
NS_IMETHODIMP
void
nsBulletFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
return NS_OK;
return;
DO_GLOBAL_REFLOW_COUNT_DSP("nsBulletFrame");
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayBullet(aBuilder, this));
return NS_OK;
}
void

View File

@ -55,9 +55,9 @@ public:
// nsIFrame
virtual void DestroyFrom(nsIFrame* aDestructRoot);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE;
#ifdef DEBUG

View File

@ -282,7 +282,7 @@ public:
NS_DISPLAY_DECL_NAME("CanvasFocus", TYPE_CANVAS_FOCUS)
};
NS_IMETHODIMP
void
nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -312,11 +312,11 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (isThemed) {
aLists.BorderBackground()->AppendNewToTop(
new (aBuilder) nsDisplayCanvasBackgroundImage(aBuilder, this, 0, isThemed, nullptr));
return NS_OK;
return;
}
if (!bg) {
return NS_OK;
return;
}
// Create separate items for each background layer.
@ -356,14 +356,13 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
#endif
if (!mDoPaintFocus)
return NS_OK;
return;
// Only paint the focus if we're visible
if (!GetStyleVisibility()->IsVisible())
return NS_OK;
return;
aLists.Outlines()->AppendNewToTop(new (aBuilder)
nsDisplayCanvasFocus(aBuilder, this));
return NS_OK;
}
void

View File

@ -68,9 +68,9 @@ public:
*/
NS_IMETHOD SetHasFocus(bool aHasFocus);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
void PaintFocus(nsRenderingContext& aRenderingContext, nsPoint aPt);

View File

@ -64,9 +64,9 @@ public:
return nsContainerFrame::StealFrame(aPresContext, aChild, true);
}
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nsIAtom* GetType() const;
@ -1083,7 +1083,7 @@ nsColumnSetFrame::Reflow(nsPresContext* aPresContext,
return NS_OK;
}
NS_IMETHODIMP
void
nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
@ -1097,7 +1097,6 @@ nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
for (nsFrameList::Enumerator e(mFrames); !e.AtEnd(); e.Next()) {
BuildDisplayListForChild(aBuilder, e.get(), aDirtyRect, aLists);
}
return NS_OK;
}
NS_IMETHODIMP

View File

@ -328,7 +328,7 @@ nsContainerFrame::GetChildLists(nsTArray<ChildList>* aLists) const
/////////////////////////////////////////////////////////////////////////////
// Painting/Events
NS_IMETHODIMP
void
nsContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -336,10 +336,9 @@ nsContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DisplayBorderBackgroundOutline(aBuilder, aLists);
BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists);
return NS_OK;
}
nsresult
void
nsContainerFrame::BuildDisplayListForNonBlockChildren(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists,
@ -353,7 +352,6 @@ nsContainerFrame::BuildDisplayListForNonBlockChildren(nsDisplayListBuilder* aB
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, set, aFlags);
kid = kid->GetNextSibling();
}
return NS_OK;
}
/* virtual */ void

View File

@ -354,9 +354,9 @@ public:
* probably be avoided and eventually removed. It's currently here
* to emulate what nsContainerFrame::Paint did.
*/
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
// Destructor function for the proptable-stored framelists
static void DestroyFrameList(void* aPropertyValue)
@ -391,22 +391,21 @@ protected:
* so its background and all other display items (except for positioned
* display items) go into the Content() list.
*/
nsresult BuildDisplayListForNonBlockChildren(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists,
uint32_t aFlags = 0);
void BuildDisplayListForNonBlockChildren(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists,
uint32_t aFlags = 0);
/**
* A version of BuildDisplayList that use DISPLAY_CHILD_INLINE.
* Intended as a convenience for derived classes.
*/
nsresult BuildDisplayListForInline(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
void BuildDisplayListForInline(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
DisplayBorderBackgroundOutline(aBuilder, aLists);
BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists,
DISPLAY_CHILD_INLINE);
return NS_OK;
}

View File

@ -46,13 +46,12 @@ nsFirstLetterFrame::GetType() const
return nsGkAtoms::letterFrame;
}
NS_IMETHODIMP
void
nsFirstLetterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
return NS_OK;
}
NS_IMETHODIMP

View File

@ -19,9 +19,9 @@ public:
nsFirstLetterFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,

View File

@ -1073,7 +1073,7 @@ GetDisplayFlagsForFlexItem(nsIFrame* aFrame)
return 0;
}
NS_IMETHODIMP
void
nsFlexContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -1090,8 +1090,6 @@ nsFlexContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
BuildDisplayListForChild(aBuilder, e.get(), aDirtyRect, childLists,
GetDisplayFlagsForFlexItem(e.get()));
}
return NS_OK;
}
#ifdef DEBUG

View File

@ -35,9 +35,9 @@ class nsFlexContainerFrame : public nsFlexContainerFrameSuper {
public:
// nsIFrame overrides
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,

View File

@ -1399,28 +1399,28 @@ void nsDisplaySelectionOverlay::Paint(nsDisplayListBuilder* aBuilder,
* Refreshes each content's frame
*********************************************************/
nsresult
void
nsFrame::DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
nsDisplayList* aList,
uint16_t aContentType)
{
if (!IsSelected() || !IsVisibleForPainting(aBuilder))
return NS_OK;
return;
nsPresContext* presContext = PresContext();
nsIPresShell *shell = presContext->PresShell();
if (!shell)
return NS_OK;
return;
int16_t displaySelection = shell->GetSelectionFlags();
if (!(displaySelection & aContentType))
return NS_OK;
return;
const nsFrameSelection* frameSelection = GetConstFrameSelection();
int16_t selectionValue = frameSelection->GetDisplaySelection();
if (selectionValue <= nsISelectionController::SELECTION_HIDDEN)
return NS_OK; // selection is hidden or off
return; // selection is hidden or off
nsIContent *newContent = mContent->GetParent();
@ -1435,7 +1435,7 @@ nsFrame::DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
//look up to see what selection(s) are on this frame
details = frameSelection->LookUpSelection(newContent, offset, 1, false);
if (!details)
return NS_OK;
return;
bool normal = false;
while (details) {
@ -1449,47 +1449,43 @@ nsFrame::DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
if (!normal && aContentType == nsISelectionDisplay::DISPLAY_IMAGES) {
// Don't overlay an image if it's not in the primary selection.
return NS_OK;
return;
}
aList->AppendNewToTop(new (aBuilder)
nsDisplaySelectionOverlay(aBuilder, this, selectionValue));
return NS_OK;
}
nsresult
void
nsFrame::DisplayOutlineUnconditional(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists)
{
if (GetStyleOutline()->GetOutlineStyle() == NS_STYLE_BORDER_STYLE_NONE)
return NS_OK;
return;
aLists.Outlines()->AppendNewToTop(
new (aBuilder) nsDisplayOutline(aBuilder, this));
return NS_OK;
}
nsresult
void
nsFrame::DisplayOutline(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
return NS_OK;
return;
DisplayOutlineUnconditional(aBuilder, aLists);
return NS_OK;
}
nsresult
void
nsIFrame::DisplayCaret(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect, nsDisplayList* aList)
{
if (!IsVisibleForPainting(aBuilder))
return NS_OK;
return;
aList->AppendNewToTop(
new (aBuilder) nsDisplayCaret(aBuilder, this, aBuilder->GetCaret()));
return NS_OK;
}
nscolor
@ -1499,11 +1495,11 @@ nsIFrame::GetCaretColorAt(int32_t aOffset)
return GetStyleColor()->mColor;
}
nsresult
nsFrame::DisplayBackgroundUnconditional(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists,
bool aForceBackground,
nsDisplayBackgroundImage** aBackground)
void
nsFrame::DisplayBackgroundUnconditional(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists,
bool aForceBackground,
nsDisplayBackgroundImage** aBackground)
{
*aBackground = nullptr;
@ -1516,11 +1512,9 @@ nsFrame::DisplayBackgroundUnconditional(nsDisplayListBuilder* aBuilder,
aLists.BorderBackground(),
aBackground);
}
return NS_OK;
}
nsresult
void
nsFrame::DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists,
bool aForceBackground)
@ -1529,7 +1523,7 @@ nsFrame::DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
// opportunity to override the visibility property and display even if
// their parent is hidden.
if (!IsVisibleForPainting(aBuilder))
return NS_OK;
return;
nsCSSShadowArray* shadows = GetStyleBorder()->mBoxShadow;
if (shadows && shadows->HasShadowWithInset(false)) {
@ -1553,7 +1547,6 @@ nsFrame::DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
}
DisplayOutlineUnconditional(aBuilder, aLists);
return NS_OK;
}
inline static bool IsSVGContentWithCSSClip(const nsIFrame *aFrame)
@ -1718,7 +1711,7 @@ nsIFrame::OverflowClip(nsDisplayListBuilder* aBuilder,
return wrapper.WrapLists(aBuilder, this, aFromSet, aToSet);
}
static nsresult
static void
BuildDisplayListWithOverflowClip(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
const nsRect& aDirtyRect, const nsDisplayListSet& aSet,
const nsRect& aClipRect, const nscoord aClipRadii[8])
@ -1727,7 +1720,6 @@ BuildDisplayListWithOverflowClip(nsDisplayListBuilder* aBuilder, nsIFrame* aFram
aFrame->BuildDisplayList(aBuilder, aDirtyRect, set);
aBuilder->DisplayCaret(aFrame, aDirtyRect, aSet.Content());
aFrame->OverflowClip(aBuilder, set, aSet, aClipRect, aClipRadii);
return NS_OK;
}
#ifdef DEBUG
@ -1851,17 +1843,17 @@ WrapPreserve3DList(nsIFrame* aFrame, nsDisplayListBuilder* aBuilder, nsDisplayLi
return rv;
}
nsresult
void
nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
nsDisplayList* aList) {
if (GetStateBits() & NS_FRAME_TOO_DEEP_IN_FRAME_TREE)
return NS_OK;
return;
// Replaced elements have their visibility handled here, because
// they're visually atomic
if (IsFrameOfType(eReplaced) && !IsVisibleForPainting(aBuilder))
return NS_OK;
return;
nsRect clipPropClip;
const nsStyleDisplay* disp = GetStyleDisplay();
@ -1873,7 +1865,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
!aBuilder->WillComputePluginGeometry() &&
!nsLayoutUtils::HasAnimationsForCompositor(mContent,
eCSSProperty_opacity)) {
return NS_OK;
return;
}
bool applyClipPropClipping =
@ -1906,7 +1898,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
dirtyRect.SetEmpty();
}
if (!Preserves3DChildren() && !dirtyRect.Intersects(GetVisualOverflowRectRelativeToSelf())) {
return NS_OK;
return;
}
}
inTransform = true;
@ -2011,10 +2003,8 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
(!resultList.IsEmpty() || usingSVGEffects)) {
nsDisplayClipPropWrapper wrapper(clipPropClip);
nsDisplayItem* item = wrapper.WrapList(aBuilder, this, &resultList);
if (!item)
return NS_ERROR_OUT_OF_MEMORY;
// resultList was emptied
resultList.AppendToTop(item);
resultList.AppendNewToTop(item);
}
/* If there are any SVG effects, wrap the list up in an SVG effects item
* (which also handles CSS group opacity). Note that we create an SVG effects
@ -2057,7 +2047,6 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
}
aList->AppendToTop(&resultList);
return NS_OK;
}
static bool
@ -2067,7 +2056,7 @@ IsRootScrollFrameActive(nsIPresShell* aPresShell)
return sf && sf->IsScrollingActive();
}
nsresult
void
nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
nsIFrame* aChild,
const nsRect& aDirtyRect,
@ -2076,11 +2065,11 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
// If painting is restricted to just the background of the top level frame,
// then we have nothing to do here.
if (aBuilder->IsBackgroundOnly())
return NS_OK;
return;
nsIFrame* child = aChild;
if (child->GetStateBits() & NS_FRAME_TOO_DEEP_IN_FRAME_TREE)
return NS_OK;
return;
bool isSVG = (child->GetStateBits() & NS_FRAME_SVG_LAYOUT);
@ -2109,14 +2098,14 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
// should not be painted through the placeholder.
if (!child || nsLayoutUtils::IsPopup(child) ||
(child->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT))
return NS_OK;
return;
// Make sure that any attempt to use childType below is disappointed. We
// could call GetType again but since we don't currently need it, let's
// avoid the virtual call.
childType = nullptr;
// Recheck NS_FRAME_TOO_DEEP_IN_FRAME_TREE
if (child->GetStateBits() & NS_FRAME_TOO_DEEP_IN_FRAME_TREE)
return NS_OK;
return;
nsRect* savedDirty = static_cast<nsRect*>
(child->Properties().Get(nsDisplayListBuilder::OutOfFlowDirtyRectProperty()));
if (savedDirty) {
@ -2145,7 +2134,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
aBuilder->GetSelectedFramesOnly() &&
child->IsLeaf() &&
!aChild->IsSelected()) {
return NS_OK;
return;
}
if (aBuilder->GetIncludeAllOutOfFlows() &&
@ -2163,7 +2152,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
if (child != aBuilder->GetIgnoreScrollFrame()) {
nsRect childDirty;
if (!childDirty.IntersectRect(dirty, child->GetVisualOverflowRect()))
return NS_OK;
return;
// Usually we could set dirty to childDirty now but there's no
// benefit, and it can be confusing. It can especially confuse
// situations where we're going to ignore a scrollframe's clipping;
@ -2179,7 +2168,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
// Don't paint our children if the theme object is a leaf.
if (IsThemed(ourDisp) &&
!PresContext()->GetTheme()->WidgetIsContainer(ourDisp->mAppearance))
return NS_OK;
return;
// Child is composited if it's transformed, partially transparent, or has
// SVG effects.
@ -2238,7 +2227,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
#ifdef DEBUG
DisplayDebugBorders(aBuilder, child, aLists);
#endif
return NS_OK;
return;
}
nsDisplayList list;
@ -2336,7 +2325,6 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
// is sorted by z-order and content in BuildDisplayListForStackingContext,
// but it means that sort routine needs to do less work.
aLists.PositionedDescendants()->AppendToTop(&extraPositionedDescendants);
return NS_OK;
}
void

View File

@ -507,10 +507,10 @@ public:
* @param aBackground *aBackground is set to the bottom-most
* nsDisplayBackground item, if any are created, otherwise null.
*/
nsresult DisplayBackgroundUnconditional(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists,
bool aForceBackground,
nsDisplayBackgroundImage** aBackground);
void DisplayBackgroundUnconditional(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists,
bool aForceBackground,
nsDisplayBackgroundImage** aBackground);
/**
* Adds display items for standard CSS borders, background and outline for
* for this frame, as necessary. Checks IsVisibleForPainting and won't
@ -520,20 +520,20 @@ public:
* for frames that might receive a propagated background via
* nsCSSRendering::FindBackground
*/
nsresult DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists,
bool aForceBackground = false);
void DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists,
bool aForceBackground = false);
/**
* Add a display item for the CSS outline. Does not check visibility.
*/
nsresult DisplayOutlineUnconditional(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists);
void DisplayOutlineUnconditional(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists);
/**
* Add a display item for the CSS outline, after calling
* IsVisibleForPainting to confirm we are visible.
*/
nsresult DisplayOutline(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists);
void DisplayOutline(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists);
/**
* Adjust the given parent frame to the right style context parent frame for
@ -558,7 +558,7 @@ protected:
* @param aContentType an nsISelectionDisplay DISPLAY_ constant identifying
* which kind of content this is for
*/
nsresult DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
void DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
nsDisplayList* aList, uint16_t aContentType = nsISelectionDisplay::DISPLAY_FRAMES);
int16_t DisplaySelection(nsPresContext* aPresContext, bool isOkToTurnOn = false);

View File

@ -103,9 +103,9 @@ public:
NS_IMETHOD GetCursor(const nsPoint& aPoint,
nsIFrame::Cursor& aCursor);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
@ -150,9 +150,9 @@ public:
uint32_t aFlags = 0) const MOZ_OVERRIDE;
#endif
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
@ -758,7 +758,7 @@ nsHTMLFramesetFrame::GetCursor(const nsPoint& aPoint,
return NS_OK;
}
NS_IMETHODIMP
void
nsHTMLFramesetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -769,7 +769,6 @@ nsHTMLFramesetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayEventReceiver(aBuilder, this));
}
return NS_OK;
}
void
@ -1540,14 +1539,13 @@ void nsDisplayFramesetBorder::Paint(nsDisplayListBuilder* aBuilder,
PaintBorder(*aCtx, ToReferenceFrame());
}
NS_IMETHODIMP
void
nsHTMLFramesetBorderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayFramesetBorder(aBuilder, this));
return NS_OK;
}
void nsHTMLFramesetBorderFrame::PaintBorder(nsRenderingContext& aRenderingContext,
@ -1750,12 +1748,11 @@ nsHTMLFramesetBlankFrame::List(FILE* out,
}
#endif
NS_IMETHODIMP
void
nsHTMLFramesetBlankFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayFramesetBlank(aBuilder, this));
return NS_OK;
}

View File

@ -100,9 +100,9 @@ public:
NS_IMETHOD GetCursor(const nsPoint& aPoint,
nsIFrame::Cursor& aCursor) MOZ_OVERRIDE;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,

View File

@ -1990,7 +1990,7 @@ protected:
nsIFrame* mScrolledFrame;
};
nsresult
void
nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -2017,7 +2017,7 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// can just pass aLists directly.
mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame,
aDirtyRect, aLists);
return NS_OK;
return;
}
// We put scrollbars in their own layers when this is the root scroll
@ -2126,8 +2126,6 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// Now display overlay scrollbars and the resizer, if we have one.
AppendScrollPartsTo(aBuilder, aDirtyRect, aLists, createLayersForScrollbars,
true);
return NS_OK;
}
static void HandleScrollPref(nsIScrollable *aScrollable, int32_t aOrientation,

View File

@ -69,9 +69,9 @@ public:
bool ShouldBuildLayer() const;
nsresult BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
void AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
@ -371,10 +371,10 @@ public:
NS_IMETHOD SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) MOZ_OVERRIDE;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
return mInner.BuildDisplayList(aBuilder, aDirtyRect, aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE {
mInner.BuildDisplayList(aBuilder, aDirtyRect, aLists);
}
bool TryLayout(ScrollReflowState* aState,
@ -612,10 +612,10 @@ public:
NS_IMETHOD SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE {
return mInner.BuildDisplayList(aBuilder, aDirtyRect, aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE {
mInner.BuildDisplayList(aBuilder, aDirtyRect, aLists);
}
// XXXldb Is this actually used?

View File

@ -278,13 +278,13 @@ nsHTMLCanvasFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
return layer.forget();
}
NS_IMETHODIMP
void
nsHTMLCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
return NS_OK;
return;
DisplayBorderBackgroundOutline(aBuilder, aLists);
@ -297,8 +297,6 @@ nsHTMLCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsISelectionDisplay::DISPLAY_IMAGES);
WrapReplacedContentForBorderRadius(aBuilder, &replacedContent, aLists);
return NS_OK;
}
nsIAtom*

View File

@ -42,9 +42,9 @@ public:
nsIFrame* aParent,
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
LayerManager* aManager,

View File

@ -1156,18 +1156,18 @@ public:
* @param aDirtyRect content outside this rectangle can be ignored; the
* rectangle is in frame coordinates
*/
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) { return NS_OK; }
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {}
/**
* Displays the caret onto the given display list builder. The caret is
* painted on top of the rest of the display list items.
*
* @param aDirtyRect is the dirty rectangle that we're repainting.
*/
nsresult DisplayCaret(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
nsDisplayList* aList);
void DisplayCaret(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
nsDisplayList* aList);
/**
* Get the preferred caret color at the offset.
@ -1203,9 +1203,9 @@ public:
* @param aDirtyRect content outside this rectangle can be ignored; the
* rectangle is in frame coordinates
*/
nsresult BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
nsDisplayList* aList);
void BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
nsDisplayList* aList);
/**
* Clips the display items of aFromSet, putting the results in aToSet.
@ -1240,11 +1240,11 @@ public:
* @param aFlags combination of DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT,
* DISPLAY_CHILD_FORCE_STACKING_CONTEXT and DISPLAY_CHILD_INLINE
*/
nsresult BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
nsIFrame* aChild,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists,
uint32_t aFlags = 0);
void BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
nsIFrame* aChild,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists,
uint32_t aFlags = 0);
/**
* A helper for replaced elements that want to clip their content to a

View File

@ -1366,13 +1366,13 @@ nsImageFrame::PaintImage(nsRenderingContext& aRenderingContext, nsPoint aPt,
}
}
NS_IMETHODIMP
void
nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
return NS_OK;
return;
// REVIEW: We don't need any special logic here for deciding which layer
// to put the background in ... it goes in aLists.BorderBackground() and
@ -1446,8 +1446,6 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
WrapReplacedContentForBorderRadius(aBuilder, &replacedContent, aLists);
return NS_OK;
}
bool

View File

@ -77,9 +77,9 @@ public:
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,
nsIFrame* aPrevInFlow);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext);
virtual IntrinsicSize GetIntrinsicSize();

View File

@ -174,7 +174,7 @@ nsInlineFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset,
return false;
}
NS_IMETHODIMP
void
nsInlineFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -188,7 +188,6 @@ nsInlineFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (!mFrames.FirstChild()) {
DisplaySelectionOverlay(aBuilder, aLists.Content());
}
return NS_OK;
}
//////////////////////////////////////////////////////////////////////

View File

@ -42,9 +42,9 @@ public:
friend nsIFrame* NS_NewInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
// nsIFrame overrides
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
#ifdef ACCESSIBILITY
virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;

View File

@ -23,12 +23,11 @@ public:
NS_DECL_FRAMEARENA_HELPERS
// nsIFrame replacements
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE {
DO_GLOBAL_REFLOW_COUNT_DSP("nsLeafFrame");
DisplayBorderBackgroundOutline(aBuilder, aLists);
return NS_OK;
}
/**

View File

@ -1208,14 +1208,14 @@ nsObjectFrame::IsTransparentMode() const
#endif
}
NS_IMETHODIMP
void
nsObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// XXX why are we painting collapsed object frames?
if (!IsVisibleOrCollapsedForPainting(aBuilder))
return NS_OK;
return;
DisplayBorderBackgroundOutline(aBuilder, aLists);
@ -1223,14 +1223,14 @@ nsObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// If we are painting in Print Preview do nothing....
if (type == nsPresContext::eContext_PrintPreview)
return NS_OK;
return;
DO_GLOBAL_REFLOW_COUNT_DSP("nsObjectFrame");
#ifndef XP_MACOSX
if (mWidget && aBuilder->IsInTransform()) {
// Windowed plugins should not be rendered inside a transform.
return NS_OK;
return;
}
#endif
@ -1289,8 +1289,6 @@ nsObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
WrapReplacedContentForBorderRadius(aBuilder, &replacedContent, aLists);
return NS_OK;
}
#ifdef XP_OS2

View File

@ -62,9 +62,9 @@ public:
NS_IMETHOD DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,

View File

@ -505,7 +505,7 @@ static gfx3DMatrix ComputePageTransform(nsIFrame* aFrame, float aAppUnitsPerPixe
}
//------------------------------------------------------------------------------
NS_IMETHODIMP
void
nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -576,7 +576,6 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
set.MoveTo(aLists);
return NS_OK;
}
//------------------------------------------------------------------------------

View File

@ -24,9 +24,9 @@ public:
const nsHTMLReflowState& aMaxSize,
nsReflowStatus& aStatus);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
/**
* Get the "type" of the frame

View File

@ -178,7 +178,7 @@ PaintDebugPlaceholder(nsIFrame* aFrame, nsRenderingContext* aCtx,
#if defined(DEBUG) || (defined(MOZ_REFLOW_PERF_DSP) && defined(MOZ_REFLOW_PERF))
NS_IMETHODIMP
void
nsPlaceholderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -187,13 +187,12 @@ nsPlaceholderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
#ifdef DEBUG
if (GetShowFrameBorders()) {
return aLists.Outlines()->AppendNewToTop(
aLists.Outlines()->AppendNewToTop(
new (aBuilder) nsDisplayGeneric(aBuilder, this, PaintDebugPlaceholder,
"DebugPlaceholder",
nsDisplayItem::TYPE_DEBUG_PLACEHOLDER));
}
#endif
return NS_OK;
}
#endif // DEBUG || (MOZ_REFLOW_PERF_DSP && MOZ_REFLOW_PERF)

View File

@ -106,9 +106,9 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
#if defined(DEBUG) || (defined(MOZ_REFLOW_PERF_DSP) && defined(MOZ_REFLOW_PERF))
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
#endif // DEBUG || (MOZ_REFLOW_PERF_DSP && MOZ_REFLOW_PERF)
#ifdef DEBUG

View File

@ -803,7 +803,7 @@ ComputePageSequenceTransform(nsIFrame* aFrame, float aAppUnitsPerPixel)
return gfx3DMatrix::ScalingMatrix(scale, scale, 1);
}
NS_IMETHODIMP
void
nsSimplePageSequenceFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -822,7 +822,6 @@ nsSimplePageSequenceFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsDisplayTransform(aBuilder, this, &content, ::ComputePageSequenceTransform));
aLists.Content()->AppendToTop(&content);
return NS_OK;
}
nsIAtom*

View File

@ -58,9 +58,9 @@ public:
const nsHTMLReflowState& aMaxSize,
nsReflowStatus& aStatus);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
// nsIPageSequenceFrame
NS_IMETHOD SetPageNo(int32_t aPageNo) { return NS_OK;}

View File

@ -294,35 +294,36 @@ nsSubDocumentFrame::PassPointerEventsToChildren()
return false;
}
NS_IMETHODIMP
void
nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
return NS_OK;
return;
// If mozpasspointerevents is set, then we should allow subdocument content
// to handle events even if we're pointer-events:none.
if (aBuilder->IsForEventDelivery() && !PassPointerEventsToChildren())
return NS_OK;
return;
DisplayBorderBackgroundOutline(aBuilder, aLists);
if (!mInnerView)
return NS_OK;
return;
nsFrameLoader* frameLoader = FrameLoader();
if (frameLoader) {
RenderFrameParent* rfp = frameLoader->GetCurrentRemoteFrame();
if (rfp) {
return rfp->BuildDisplayList(aBuilder, this, aDirtyRect, aLists);
rfp->BuildDisplayList(aBuilder, this, aDirtyRect, aLists);
return;
}
}
nsView* subdocView = mInnerView->GetFirstChild();
if (!subdocView)
return NS_OK;
return;
nsCOMPtr<nsIPresShell> presShell = nullptr;
@ -353,14 +354,14 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (!presShell) {
// If we don't have a frame we use this roundabout way to get the pres shell.
if (!mFrameLoader)
return NS_OK;
return;
nsCOMPtr<nsIDocShell> docShell;
mFrameLoader->GetDocShell(getter_AddRefs(docShell));
if (!docShell)
return NS_OK;
return;
presShell = docShell->GetPresShell();
if (!presShell)
return NS_OK;
return;
}
}
@ -472,8 +473,6 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// delete childItems in case of OOM
childItems.DeleteAll();
return NS_OK;
}
nscoord

View File

@ -66,9 +66,9 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,

View File

@ -51,9 +51,9 @@ public:
NS_DECL_QUERYFRAME
// nsIFrame
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,

View File

@ -4623,22 +4623,22 @@ nsDisplayText::Paint(nsDisplayListBuilder* aBuilder,
f->PaintText(aCtx, ToReferenceFrame(), extraVisible, *this);
}
NS_IMETHODIMP
void
nsTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
return NS_OK;
return;
DO_GLOBAL_REFLOW_COUNT_DSP("nsTextFrame");
if ((0 != (mState & TEXT_BLINK_ON)) && nsBlinkTimer::GetBlinkIsOff() &&
PresContext()->IsDynamic() && !aBuilder->IsForEventDelivery())
return NS_OK;
return;
return aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayText(aBuilder, this));
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayText(aBuilder, this));
}
static nsIFrame*

View File

@ -365,13 +365,13 @@ public:
}
};
NS_IMETHODIMP
void
nsVideoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
return NS_OK;
return;
DO_GLOBAL_REFLOW_COUNT_DSP("nsVideoFrame");
@ -401,8 +401,6 @@ nsVideoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
WrapReplacedContentForBorderRadius(aBuilder, &replacedContent, aLists);
return NS_OK;
}
nsIAtom*

View File

@ -43,9 +43,9 @@ public:
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,

View File

@ -57,7 +57,7 @@ ViewportFrame::SetInitialChildList(ChildListID aListID,
return nsContainerFrame::SetInitialChildList(aListID, aChildList);
}
NS_IMETHODIMP
void
ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -65,13 +65,12 @@ ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
SAMPLE_LABEL("ViewportFrame", "BuildDisplayList");
nsIFrame* kid = mFrames.FirstChild();
if (!kid)
return NS_OK;
return;
// 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.
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
return NS_OK;
}
NS_IMETHODIMP

View File

@ -50,9 +50,9 @@ public:
NS_IMETHOD RemoveFrame(ChildListID aListID,
nsIFrame* aOldFrame) MOZ_OVERRIDE;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;

View File

@ -935,7 +935,7 @@ RenderFrameParent::GetRootLayer() const
return shadowLayers ? shadowLayers->GetRoot() : nullptr;
}
NS_IMETHODIMP
void
RenderFrameParent::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsSubDocumentFrame* aFrame,
const nsRect& aDirtyRect,
@ -962,7 +962,6 @@ RenderFrameParent::BuildDisplayList(nsDisplayListBuilder* aBuilder,
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayClip(aBuilder, aFrame, &shadowTree,
bounds));
return NS_OK;
}
void

View File

@ -76,10 +76,10 @@ public:
const TargetConfig& aTargetConfig,
bool isFirstPaint) MOZ_OVERRIDE;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsSubDocumentFrame* aFrame,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsSubDocumentFrame* aFrame,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame,

View File

@ -1752,7 +1752,7 @@ void nsDisplayMathMLCharDebug::Paint(nsDisplayListBuilder* aBuilder,
#endif
nsresult
void
nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
nsIFrame* aForFrame,
const nsDisplayListSet& aLists,
@ -1769,7 +1769,7 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
}
if (!styleContext->GetStyleVisibility()->IsVisible())
return NS_OK;
return;
// if the leaf style context that we use for stretchy chars has a background
// color we use it -- this feature is mostly used for testing and debugging
@ -1801,7 +1801,6 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
aIndex,
aSelectedRect &&
!aSelectedRect->IsEmpty()));
return NS_OK;
}
void

View File

@ -76,12 +76,11 @@ public:
mStyleContext->Release();
}
nsresult
Display(nsDisplayListBuilder* aBuilder,
nsIFrame* aForFrame,
const nsDisplayListSet& aLists,
uint32_t aIndex,
const nsRect* aSelectedRect = nullptr);
void Display(nsDisplayListBuilder* aBuilder,
nsIFrame* aForFrame,
const nsDisplayListSet& aLists,
uint32_t aIndex,
const nsRect* aSelectedRect = nullptr);
void PaintForeground(nsPresContext* aPresContext,
nsRenderingContext& aRenderingContext,

View File

@ -621,7 +621,7 @@ nsMathMLContainerFrame::PropagatePresentationDataFromChildAt(nsIFrame* aPa
*/
NS_IMETHODIMP
void
nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -629,11 +629,11 @@ nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// report an error if something wrong was found in this frame
if (NS_MATHML_HAS_ERROR(mPresentationData.flags)) {
if (!IsVisibleForPainting(aBuilder))
return NS_OK;
return;
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayMathMLError(aBuilder, this));
return NS_OK;
return;
}
DisplayBorderBackgroundOutline(aBuilder, aLists);
@ -650,7 +650,6 @@ nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// in the Init() of your sub-class
DisplayBoundingMetrics(aBuilder, this, mReference, mBoundingMetrics, aLists);
#endif
return NS_OK;
}
// Note that this method re-builds the automatic data in the children -- not

View File

@ -130,9 +130,9 @@ public:
return nsContainerFrame::DidReflow(aPresContext, aReflowState, aStatus);
}
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual bool UpdateOverflow();

View File

@ -467,12 +467,12 @@ void nsDisplayMathMLBar::Paint(nsDisplayListBuilder* aBuilder,
aCtx->FillRect(mRect + ToReferenceFrame());
}
nsresult
void
nsMathMLFrame::DisplayBar(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsRect& aRect,
const nsDisplayListSet& aLists) {
if (!aFrame->GetStyleVisibility()->IsVisible() || aRect.IsEmpty())
return NS_OK;
return;
aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayMathMLBar(aBuilder, aFrame, aRect));

View File

@ -363,9 +363,9 @@ protected:
* Display a solid rectangle in the frame's text color. Used for drawing
* fraction separators and root/sqrt overbars.
*/
nsresult DisplayBar(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsRect& aRect,
const nsDisplayListSet& aLists);
void DisplayBar(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsRect& aRect,
const nsDisplayListSet& aLists);
// information about the presentation policy of the frame
nsPresentationData mPresentationData;

View File

@ -271,7 +271,7 @@ nsMathMLmactionFrame::AttributeChanged(int32_t aNameSpaceID,
}
// Only paint the selected child...
NS_IMETHODIMP
void
nsMathMLmactionFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -281,7 +281,7 @@ nsMathMLmactionFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// so ask nsMathMLContainerFrame to do the work for us.
if (NS_MATHML_HAS_ERROR(mPresentationData.flags)) {
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
return NS_OK;
return;
}
DisplayBorderBackgroundOutline(aBuilder, aLists);
@ -298,7 +298,6 @@ nsMathMLmactionFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// visual debug
DisplayBoundingMetrics(aBuilder, this, mReference, mBoundingMetrics, aLists);
#endif
return NS_OK;
}
// Only reflow the selected child ...

View File

@ -36,9 +36,9 @@ public:
virtual nsresult
ChildListChanged(int32_t aModType) MOZ_OVERRIDE;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nsresult
Place(nsRenderingContext& aRenderingContext,

View File

@ -180,112 +180,94 @@ nsMathMLmencloseFrame::TransmitAutomaticData()
return NS_OK;
}
NS_IMETHODIMP
void
nsMathMLmencloseFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
/////////////
// paint the menclosed content
nsresult rv = nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect,
aLists);
NS_ENSURE_SUCCESS(rv, rv);
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
if (NS_MATHML_HAS_ERROR(mPresentationData.flags))
return rv;
return;
nsRect mencloseRect = nsIFrame::GetRect();
mencloseRect.x = mencloseRect.y = 0;
if (IsToDraw(NOTATION_RADICAL)) {
rv = mMathMLChar[mRadicalCharIndex].Display(aBuilder, this, aLists, 0);
NS_ENSURE_SUCCESS(rv, rv);
mMathMLChar[mRadicalCharIndex].Display(aBuilder, this, aLists, 0);
nsRect rect;
mMathMLChar[mRadicalCharIndex].GetRect(rect);
rect.MoveBy(NS_MATHML_IS_RTL(mPresentationData.flags) ?
-mContentWidth : rect.width, 0);
rect.SizeTo(mContentWidth, mRuleThickness);
rv = DisplayBar(aBuilder, this, rect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
DisplayBar(aBuilder, this, rect, aLists);
}
if (IsToDraw(NOTATION_LONGDIV)) {
rv = mMathMLChar[mLongDivCharIndex].Display(aBuilder, this, aLists, 1);
NS_ENSURE_SUCCESS(rv, rv);
mMathMLChar[mLongDivCharIndex].Display(aBuilder, this, aLists, 1);
nsRect rect;
mMathMLChar[mLongDivCharIndex].GetRect(rect);
rect.SizeTo(rect.width + mContentWidth, mRuleThickness);
rv = DisplayBar(aBuilder, this, rect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
DisplayBar(aBuilder, this, rect, aLists);
}
if (IsToDraw(NOTATION_TOP)) {
nsRect rect(0, 0, mencloseRect.width, mRuleThickness);
rv = DisplayBar(aBuilder, this, rect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
DisplayBar(aBuilder, this, rect, aLists);
}
if (IsToDraw(NOTATION_BOTTOM)) {
nsRect rect(0, mencloseRect.height - mRuleThickness,
mencloseRect.width, mRuleThickness);
rv = DisplayBar(aBuilder, this, rect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
DisplayBar(aBuilder, this, rect, aLists);
}
if (IsToDraw(NOTATION_LEFT)) {
nsRect rect(0, 0, mRuleThickness, mencloseRect.height);
rv = DisplayBar(aBuilder, this, rect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
DisplayBar(aBuilder, this, rect, aLists);
}
if (IsToDraw(NOTATION_RIGHT)) {
nsRect rect(mencloseRect.width - mRuleThickness, 0,
mRuleThickness, mencloseRect.height);
rv = DisplayBar(aBuilder, this, rect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
DisplayBar(aBuilder, this, rect, aLists);
}
if (IsToDraw(NOTATION_ROUNDEDBOX)) {
rv = DisplayNotation(aBuilder, this, mencloseRect, aLists,
mRuleThickness, NOTATION_ROUNDEDBOX);
NS_ENSURE_SUCCESS(rv, rv);
DisplayNotation(aBuilder, this, mencloseRect, aLists,
mRuleThickness, NOTATION_ROUNDEDBOX);
}
if (IsToDraw(NOTATION_CIRCLE)) {
rv = DisplayNotation(aBuilder, this, mencloseRect, aLists,
mRuleThickness, NOTATION_CIRCLE);
NS_ENSURE_SUCCESS(rv, rv);
DisplayNotation(aBuilder, this, mencloseRect, aLists,
mRuleThickness, NOTATION_CIRCLE);
}
if (IsToDraw(NOTATION_UPDIAGONALSTRIKE)) {
rv = DisplayNotation(aBuilder, this, mencloseRect, aLists,
mRuleThickness, NOTATION_UPDIAGONALSTRIKE);
NS_ENSURE_SUCCESS(rv, rv);
DisplayNotation(aBuilder, this, mencloseRect, aLists,
mRuleThickness, NOTATION_UPDIAGONALSTRIKE);
}
if (IsToDraw(NOTATION_DOWNDIAGONALSTRIKE)) {
rv = DisplayNotation(aBuilder, this, mencloseRect, aLists,
mRuleThickness, NOTATION_DOWNDIAGONALSTRIKE);
NS_ENSURE_SUCCESS(rv, rv);
DisplayNotation(aBuilder, this, mencloseRect, aLists,
mRuleThickness, NOTATION_DOWNDIAGONALSTRIKE);
}
if (IsToDraw(NOTATION_HORIZONTALSTRIKE)) {
nsRect rect(0, mencloseRect.height / 2 - mRuleThickness / 2,
mencloseRect.width, mRuleThickness);
rv = DisplayBar(aBuilder, this, rect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
DisplayBar(aBuilder, this, rect, aLists);
}
if (IsToDraw(NOTATION_VERTICALSTRIKE)) {
nsRect rect(mencloseRect.width / 2 - mRuleThickness / 2, 0,
mRuleThickness, mencloseRect.height);
rv = DisplayBar(aBuilder, this, rect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
DisplayBar(aBuilder, this, rect, aLists);
}
return rv;
}
/* virtual */ nsresult
@ -771,7 +753,7 @@ void nsDisplayNotation::Paint(nsDisplayListBuilder* aBuilder,
gfxCtx->SetLineWidth(currentLineWidth);
}
nsresult
void
nsMathMLmencloseFrame::DisplayNotation(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsRect& aRect,
const nsDisplayListSet& aLists,
@ -780,8 +762,8 @@ nsMathMLmencloseFrame::DisplayNotation(nsDisplayListBuilder* aBuilder,
{
if (!aFrame->GetStyleVisibility()->IsVisible() || aRect.IsEmpty() ||
aThickness <= 0)
return NS_OK;
return;
return aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayNotation(aBuilder, aFrame, aRect, aThickness, aType));
aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayNotation(aBuilder, aFrame, aRect, aThickness, aType));
}

View File

@ -68,9 +68,9 @@ public:
virtual nsStyleContext*
GetAdditionalStyleContext(int32_t aIndex) const;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD
InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE;
@ -109,10 +109,10 @@ protected:
// Display a frame of the specified type.
// @param aType Type of frame to display
nsresult DisplayNotation(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsRect& aRect,
const nsDisplayListSet& aLists,
nscoord aThickness, nsMencloseNotation aType);
void DisplayNotation(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsRect& aRect,
const nsDisplayListSet& aLists,
nscoord aThickness, nsMencloseNotation aType);
};
#endif /* nsMathMLmencloseFrame_h___ */

View File

@ -172,34 +172,29 @@ nsMathMLmfencedFrame::CreateFencesAndSeparators(nsPresContext* aPresContext)
}
}
NS_IMETHODIMP
void
nsMathMLmfencedFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
/////////////
// display the content
nsresult rv = nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
////////////
// display fences and separators
uint32_t count = 0;
if (mOpenChar) {
rv = mOpenChar->Display(aBuilder, this, aLists, count++);
NS_ENSURE_SUCCESS(rv, rv);
mOpenChar->Display(aBuilder, this, aLists, count++);
}
if (mCloseChar) {
rv = mCloseChar->Display(aBuilder, this, aLists, count++);
NS_ENSURE_SUCCESS(rv, rv);
mCloseChar->Display(aBuilder, this, aLists, count++);
}
for (int32_t i = 0; i < mSeparatorsCount; i++) {
rv = mSeparatorsChar[i].Display(aBuilder, this, aLists, count++);
NS_ENSURE_SUCCESS(rv, rv);
mSeparatorsChar[i].Display(aBuilder, this, aLists, count++);
}
return NS_OK;
}
NS_IMETHODIMP

View File

@ -39,9 +39,9 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nscoord
GetIntrinsicWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;

View File

@ -131,25 +131,22 @@ nsMathMLmfracFrame::CalcLineThickness(nsPresContext* aPresContext,
return lineThickness;
}
NS_IMETHODIMP
void
nsMathMLmfracFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
/////////////
// paint the numerator and denominator
nsresult rv = nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
/////////////
// paint the fraction line
if (mIsBevelled) {
rv = DisplaySlash(aBuilder, this, mLineRect, mLineThickness, aLists);
DisplaySlash(aBuilder, this, mLineRect, mLineThickness, aLists);
} else {
rv = DisplayBar(aBuilder, this, mLineRect, aLists);
DisplayBar(aBuilder, this, mLineRect, aLists);
}
return rv;
}
/* virtual */ nsresult
@ -588,15 +585,15 @@ void nsDisplayMathMLSlash::Paint(nsDisplayListBuilder* aBuilder,
gfxCtx->Fill();
}
nsresult
void
nsMathMLmfracFrame::DisplaySlash(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsRect& aRect,
nscoord aThickness,
const nsDisplayListSet& aLists) {
if (!aFrame->GetStyleVisibility()->IsVisible() || aRect.IsEmpty())
return NS_OK;
return;
return aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayMathMLSlash(aBuilder, aFrame, aRect, aThickness,
NS_MATHML_IS_RTL(mPresentationData.flags)));
aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayMathMLSlash(aBuilder, aFrame, aRect, aThickness,
NS_MATHML_IS_RTL(mPresentationData.flags)));
}

View File

@ -67,9 +67,9 @@ public:
bool aPlaceOrigin,
nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD
TransmitAutomaticData() MOZ_OVERRIDE;
@ -102,10 +102,10 @@ protected:
bool aWidthOnly);
// Display a slash
nsresult DisplaySlash(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsRect& aRect,
nscoord aThickness,
const nsDisplayListSet& aLists);
void DisplaySlash(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsRect& aRect,
nscoord aThickness,
const nsDisplayListSet& aLists);
nsRect mLineRect;
nsMathMLChar* mSlashChar;

View File

@ -80,7 +80,7 @@ nsMathMLmoFrame::UseMathMLChar()
NS_MATHML_OPERATOR_IS_INVISIBLE(mFlags);
}
NS_IMETHODIMP
void
nsMathMLmoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -110,7 +110,6 @@ nsMathMLmoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DisplayBoundingMetrics(aBuilder, this, mReference, mBoundingMetrics, aLists);
#endif
}
return NS_OK;
}
// get the text that we enclose and setup our nsMathMLChar

View File

@ -28,9 +28,9 @@ public:
virtual nsStyleContext*
GetAdditionalStyleContext(int32_t aIndex) const;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD
InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE;

View File

@ -28,9 +28,9 @@ public:
return TransmitAutomaticDataForMrowLikeElement();
}
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE { return NS_OK; }
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE {}
protected:
nsMathMLmphantomFrame(nsStyleContext* aContext)

View File

@ -86,24 +86,21 @@ nsMathMLmrootFrame::TransmitAutomaticData()
return NS_OK;
}
NS_IMETHODIMP
void
nsMathMLmrootFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
/////////////
// paint the content we are square-rooting
nsresult rv = nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
/////////////
// paint the sqrt symbol
if (!NS_MATHML_HAS_ERROR(mPresentationData.flags)) {
rv = mSqrChar.Display(aBuilder, this, aLists, 0);
NS_ENSURE_SUCCESS(rv, rv);
mSqrChar.Display(aBuilder, this, aLists, 0);
rv = DisplayBar(aBuilder, this, mBarRect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
DisplayBar(aBuilder, this, mBarRect, aLists);
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
// for visual debug
@ -111,11 +108,9 @@ nsMathMLmrootFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
mSqrChar.GetRect(rect);
nsBoundingMetrics bm;
mSqrChar.GetBoundingMetrics(bm);
rv = DisplayBoundingMetrics(aBuilder, this, rect.TopLeft(), bm, aLists);
DisplayBoundingMetrics(aBuilder, this, rect.TopLeft(), bm, aLists);
#endif
}
return rv;
}
static void

View File

@ -43,9 +43,9 @@ public:
virtual nscoord
GetIntrinsicWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
protected:
nsMathMLmrootFrame(nsStyleContext* aContext);

View File

@ -25,11 +25,9 @@ protected:
public:
NS_DECL_FRAMEARENA_HELPERS
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
return NS_OK;
}
const nsDisplayListSet& aLists) MOZ_OVERRIDE {}
virtual bool IsFrameOfType(uint32_t aFlags) const
{

View File

@ -31,11 +31,9 @@ public:
NS_DECL_FRAMEARENA_HELPERS
// nsIFrame methods:
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
return NS_OK;
}
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE {}
// nsSVGClipPathFrame methods:
nsresult ClipPaint(nsRenderingContext* aContext,

View File

@ -93,14 +93,14 @@ nsSVGDisplayContainerFrame::Init(nsIContent* aContent,
return rv;
}
NS_IMETHODIMP
void
nsSVGDisplayContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (mContent->IsSVG() &&
!static_cast<const nsSVGElement*>(mContent)->HasValidDimensions()) {
return NS_OK;
return;
}
return BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists);
}

View File

@ -86,11 +86,9 @@ public:
aFlags & ~(nsIFrame::eSVG | nsIFrame::eSVGContainer));
}
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE {
return NS_OK;
}
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE {}
virtual bool UpdateOverflow() MOZ_OVERRIDE;
};
@ -131,9 +129,9 @@ public:
nsIFrame* aParent,
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual bool IsSVGTransformed(gfxMatrix *aOwnTransform = nullptr,
gfxMatrix *aFromParentTransform = nullptr) const MOZ_OVERRIDE;

View File

@ -42,11 +42,9 @@ public:
NS_DECL_FRAMEARENA_HELPERS
// nsIFrame methods:
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
return NS_OK;
}
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE {}
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,

View File

@ -168,16 +168,15 @@ nsSVGForeignObjectFrame::Reflow(nsPresContext* aPresContext,
return NS_OK;
}
NS_IMETHODIMP
void
nsSVGForeignObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!static_cast<const nsSVGElement*>(mContent)->HasValidDimensions()) {
return NS_OK;
return;
}
BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists);
return NS_OK;
}
bool

View File

@ -50,9 +50,9 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
/**
* Get the "type" of the frame

View File

@ -352,17 +352,16 @@ nsSVGGlyphFrame::GetType() const
return nsGkAtoms::svgGlyphFrame;
}
NS_IMETHODIMP
void
nsSVGGlyphFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (GetStyleFont()->mFont.size <= 0) {
return NS_OK;
return;
}
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplaySVGGlyphs(aBuilder, this));
return NS_OK;
}
//----------------------------------------------------------------------

View File

@ -221,9 +221,9 @@ public:
}
#endif
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
// nsISVGChildFrame interface:
// These four always use the global transform, even if NS_STATE_NONDISPLAY_CHILD

View File

@ -56,11 +56,9 @@ public:
nsIFrame* aPrevInFlow);
#endif
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
return NS_OK;
}
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE {}
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,

View File

@ -49,11 +49,9 @@ public:
nsIFrame* aPrevInFlow);
#endif
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
return NS_OK;
}
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE {}
/**
* Get the "type" of the frame

View File

@ -688,13 +688,13 @@ nsSVGOuterSVGFrame::AttributeChanged(int32_t aNameSpaceID,
//----------------------------------------------------------------------
// painting
NS_IMETHODIMP
void
nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD) {
return NS_OK;
return;
}
DisplayBorderBackgroundOutline(aBuilder, aLists);
@ -721,8 +721,6 @@ nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
childItems.AppendNewToTop(item);
WrapReplacedContentForBorderRadius(aBuilder, &childItems, aLists);
return NS_OK;
}
nsSplittableType

View File

@ -57,9 +57,9 @@ public:
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD Init(nsIContent* aContent,
nsIFrame* aParent,

Some files were not shown because too many files have changed in this diff Show More