Backed out changeset 6c21598704ac (bug 840902)

This commit is contained in:
Ed Morley 2013-02-15 09:05:07 +00:00
Родитель 2c25988734
Коммит be1dc96126
153 изменённых файлов: 799 добавлений и 640 удалений

Просмотреть файл

@ -301,12 +301,14 @@ public:
/**
* Display the caret if needed.
*/
void DisplayCaret(nsIFrame* aFrame, const nsRect& aDirtyRect,
nsDisplayList* aList) {
nsresult DisplayCaret(nsIFrame* aFrame, const nsRect& aDirtyRect,
nsDisplayList* aList) {
nsIFrame* frame = GetCaretFrame();
if (aFrame == frame) {
frame->DisplayCaret(this, aDirtyRect, aList);
if (aFrame != frame) {
return NS_OK;
}
frame->DisplayCaret(this, aDirtyRect, aList);
return NS_OK;
}
/**
* Get the frame that the caret is supposed to draw in.
@ -1190,20 +1192,22 @@ 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 ...);
*/
void AppendNewToTop(nsDisplayItem* aItem) {
if (aItem) {
AppendToTop(aItem);
}
nsresult AppendNewToTop(nsDisplayItem* aItem) {
if (!aItem)
return NS_ERROR_OUT_OF_MEMORY;
AppendToTop(aItem);
return NS_OK;
}
/**
* 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 ...);
*/
void AppendNewToBottom(nsDisplayItem* aItem) {
if (aItem) {
AppendToBottom(aItem);
}
nsresult AppendNewToBottom(nsDisplayItem* aItem) {
if (!aItem)
return NS_ERROR_OUT_OF_MEMORY;
AppendToBottom(aItem);
return NS_OK;
}
/**
@ -1676,8 +1680,10 @@ 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
@ -1685,8 +1691,10 @@ 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
@ -1694,11 +1702,11 @@ protected:
Macro to be used for classes that don't actually implement BuildDisplayList
*/
#define DECL_DO_GLOBAL_REFLOW_COUNT_DSP(_class, _super) \
void BuildDisplayList(nsDisplayListBuilder* aBuilder, \
const nsRect& aDirtyRect, \
const nsDisplayListSet& aLists) { \
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder, \
const nsRect& aDirtyRect, \
const nsDisplayListSet& aLists) { \
DO_GLOBAL_REFLOW_COUNT_DSP(#_class); \
_super::BuildDisplayList(aBuilder, aDirtyRect, aLists); \
return _super::BuildDisplayList(aBuilder, aDirtyRect, aLists); \
}
#else // MOZ_REFLOW_PERF_DSP && MOZ_REFLOW_PERF

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -60,9 +60,9 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
void PaintBorderBackground(nsRenderingContext& aRenderingContext,
nsPoint aPt, const nsRect& aDirtyRect, uint32_t aBGFlags);
@ -177,7 +177,7 @@ nsDisplayFieldSetBorderBackground::Paint(nsDisplayListBuilder* aBuilder,
mVisibleRect, aBuilder->GetBackgroundPaintFlags());
}
void
NS_IMETHODIMP
nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
@ -223,6 +223,7 @@ 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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -96,7 +96,7 @@ nsGfxCheckboxControlFrame::AccessibleType()
#endif
//------------------------------------------------------------
void
NS_IMETHODIMP
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; // we're not checked or not visible, nothing to paint.
return NS_OK; // we're not checked or not visible, nothing to paint.
if (IsThemed())
return; // No need to paint the checkmark. The theme will do it.
return NS_OK; // No need to paint the checkmark. The theme will do it.
aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayGeneric(aBuilder, this,
@ -116,6 +116,7 @@ nsGfxCheckboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
? PaintIndeterminateMark : PaintCheckMark,
"CheckedCheckbox",
nsDisplayItem::TYPE_CHECKED_CHECKBOX));
return NS_OK;
}
//------------------------------------------------------------

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -156,7 +156,7 @@ nsListControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
nsHTMLScrollFrame::DestroyFrom(aDestructRoot);
}
void
NS_IMETHODIMP
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;
return NS_OK;
DO_GLOBAL_REFLOW_COUNT_DSP("nsListControlFrame");
@ -183,7 +183,12 @@ nsListControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
mLastDropdownBackstopColor));
}
nsHTMLScrollFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
// 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);
}
/**

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -282,7 +282,7 @@ public:
NS_DISPLAY_DECL_NAME("CanvasFocus", TYPE_CANVAS_FOCUS)
};
void
NS_IMETHODIMP
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;
return NS_OK;
}
if (!bg) {
return;
return NS_OK;
}
// Create separate items for each background layer.
@ -356,13 +356,14 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
#endif
if (!mDoPaintFocus)
return;
return NS_OK;
// Only paint the focus if we're visible
if (!GetStyleVisibility()->IsVisible())
return;
return NS_OK;
aLists.Outlines()->AppendNewToTop(new (aBuilder)
nsDisplayCanvasFocus(aBuilder, this));
return NS_OK;
}
void

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -1400,28 +1400,28 @@ void nsDisplaySelectionOverlay::Paint(nsDisplayListBuilder* aBuilder,
* Refreshes each content's frame
*********************************************************/
void
nsresult
nsFrame::DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
nsDisplayList* aList,
uint16_t aContentType)
{
if (!IsSelected() || !IsVisibleForPainting(aBuilder))
return;
return NS_OK;
nsPresContext* presContext = PresContext();
nsIPresShell *shell = presContext->PresShell();
if (!shell)
return;
return NS_OK;
int16_t displaySelection = shell->GetSelectionFlags();
if (!(displaySelection & aContentType))
return;
return NS_OK;
const nsFrameSelection* frameSelection = GetConstFrameSelection();
int16_t selectionValue = frameSelection->GetDisplaySelection();
if (selectionValue <= nsISelectionController::SELECTION_HIDDEN)
return; // selection is hidden or off
return NS_OK; // selection is hidden or off
nsIContent *newContent = mContent->GetParent();
@ -1436,7 +1436,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;
return NS_OK;
bool normal = false;
while (details) {
@ -1450,43 +1450,47 @@ nsFrame::DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
if (!normal && aContentType == nsISelectionDisplay::DISPLAY_IMAGES) {
// Don't overlay an image if it's not in the primary selection.
return;
return NS_OK;
}
aList->AppendNewToTop(new (aBuilder)
nsDisplaySelectionOverlay(aBuilder, this, selectionValue));
return NS_OK;
}
void
nsresult
nsFrame::DisplayOutlineUnconditional(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists)
{
if (GetStyleOutline()->GetOutlineStyle() == NS_STYLE_BORDER_STYLE_NONE)
return;
return NS_OK;
aLists.Outlines()->AppendNewToTop(
new (aBuilder) nsDisplayOutline(aBuilder, this));
return NS_OK;
}
void
nsresult
nsFrame::DisplayOutline(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
return;
return NS_OK;
DisplayOutlineUnconditional(aBuilder, aLists);
return NS_OK;
}
void
nsresult
nsIFrame::DisplayCaret(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect, nsDisplayList* aList)
{
if (!IsVisibleForPainting(aBuilder))
return;
return NS_OK;
aList->AppendNewToTop(
new (aBuilder) nsDisplayCaret(aBuilder, this, aBuilder->GetCaret()));
return NS_OK;
}
nscolor
@ -1496,11 +1500,11 @@ nsIFrame::GetCaretColorAt(int32_t aOffset)
return GetStyleColor()->mColor;
}
void
nsFrame::DisplayBackgroundUnconditional(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists,
bool aForceBackground,
nsDisplayBackgroundImage** aBackground)
nsresult
nsFrame::DisplayBackgroundUnconditional(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists,
bool aForceBackground,
nsDisplayBackgroundImage** aBackground)
{
*aBackground = nullptr;
@ -1513,9 +1517,11 @@ nsFrame::DisplayBackgroundUnconditional(nsDisplayListBuilder* aBuilder,
aLists.BorderBackground(),
aBackground);
}
return NS_OK;
}
void
nsresult
nsFrame::DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists,
bool aForceBackground)
@ -1524,7 +1530,7 @@ nsFrame::DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
// opportunity to override the visibility property and display even if
// their parent is hidden.
if (!IsVisibleForPainting(aBuilder))
return;
return NS_OK;
nsCSSShadowArray* shadows = GetStyleBorder()->mBoxShadow;
if (shadows && shadows->HasShadowWithInset(false)) {
@ -1548,6 +1554,7 @@ nsFrame::DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
}
DisplayOutlineUnconditional(aBuilder, aLists);
return NS_OK;
}
inline static bool IsSVGContentWithCSSClip(const nsIFrame *aFrame)
@ -1712,7 +1719,7 @@ nsIFrame::OverflowClip(nsDisplayListBuilder* aBuilder,
return wrapper.WrapLists(aBuilder, this, aFromSet, aToSet);
}
static void
static nsresult
BuildDisplayListWithOverflowClip(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
const nsRect& aDirtyRect, const nsDisplayListSet& aSet,
const nsRect& aClipRect, const nscoord aClipRadii[8])
@ -1721,6 +1728,7 @@ 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
@ -1844,17 +1852,17 @@ WrapPreserve3DList(nsIFrame* aFrame, nsDisplayListBuilder* aBuilder, nsDisplayLi
return rv;
}
void
nsresult
nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
nsDisplayList* aList) {
if (GetStateBits() & NS_FRAME_TOO_DEEP_IN_FRAME_TREE)
return;
return NS_OK;
// Replaced elements have their visibility handled here, because
// they're visually atomic
if (IsFrameOfType(eReplaced) && !IsVisibleForPainting(aBuilder))
return;
return NS_OK;
nsRect clipPropClip;
const nsStyleDisplay* disp = GetStyleDisplay();
@ -1866,7 +1874,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
!aBuilder->WillComputePluginGeometry() &&
!nsLayoutUtils::HasAnimationsForCompositor(mContent,
eCSSProperty_opacity)) {
return;
return NS_OK;
}
bool applyClipPropClipping =
@ -1899,7 +1907,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
dirtyRect.SetEmpty();
}
if (!Preserves3DChildren() && !dirtyRect.Intersects(GetVisualOverflowRectRelativeToSelf())) {
return;
return NS_OK;
}
}
inTransform = true;
@ -2004,8 +2012,10 @@ 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.AppendNewToTop(item);
resultList.AppendToTop(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
@ -2048,6 +2058,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
}
aList->AppendToTop(&resultList);
return NS_OK;
}
static bool
@ -2057,7 +2068,7 @@ IsRootScrollFrameActive(nsIPresShell* aPresShell)
return sf && sf->IsScrollingActive();
}
void
nsresult
nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
nsIFrame* aChild,
const nsRect& aDirtyRect,
@ -2066,11 +2077,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;
return NS_OK;
nsIFrame* child = aChild;
if (child->GetStateBits() & NS_FRAME_TOO_DEEP_IN_FRAME_TREE)
return;
return NS_OK;
bool isSVG = (child->GetStateBits() & NS_FRAME_SVG_LAYOUT);
@ -2099,14 +2110,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;
return NS_OK;
// 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;
return NS_OK;
nsRect* savedDirty = static_cast<nsRect*>
(child->Properties().Get(nsDisplayListBuilder::OutOfFlowDirtyRectProperty()));
if (savedDirty) {
@ -2135,7 +2146,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
aBuilder->GetSelectedFramesOnly() &&
child->IsLeaf() &&
!aChild->IsSelected()) {
return;
return NS_OK;
}
if (aBuilder->GetIncludeAllOutOfFlows() &&
@ -2153,7 +2164,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
if (child != aBuilder->GetIgnoreScrollFrame()) {
nsRect childDirty;
if (!childDirty.IntersectRect(dirty, child->GetVisualOverflowRect()))
return;
return NS_OK;
// 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;
@ -2169,7 +2180,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;
return NS_OK;
// Child is composited if it's transformed, partially transparent, or has
// SVG effects.
@ -2228,7 +2239,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
#ifdef DEBUG
DisplayDebugBorders(aBuilder, child, aLists);
#endif
return;
return NS_OK;
}
nsDisplayList list;
@ -2326,6 +2337,7 @@ 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

Просмотреть файл

@ -507,10 +507,10 @@ public:
* @param aBackground *aBackground is set to the bottom-most
* nsDisplayBackground item, if any are created, otherwise null.
*/
void DisplayBackgroundUnconditional(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists,
bool aForceBackground,
nsDisplayBackgroundImage** aBackground);
nsresult 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
*/
void DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists,
bool aForceBackground = false);
nsresult DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists,
bool aForceBackground = false);
/**
* Add a display item for the CSS outline. Does not check visibility.
*/
void DisplayOutlineUnconditional(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists);
nsresult DisplayOutlineUnconditional(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists);
/**
* Add a display item for the CSS outline, after calling
* IsVisibleForPainting to confirm we are visible.
*/
void DisplayOutline(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists);
nsresult 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
*/
void DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
nsresult DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
nsDisplayList* aList, uint16_t aContentType = nsISelectionDisplay::DISPLAY_FRAMES);
int16_t DisplaySelection(nsPresContext* aPresContext, bool isOkToTurnOn = false);

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -1990,7 +1990,7 @@ protected:
nsIFrame* mScrolledFrame;
};
void
nsresult
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;
return NS_OK;
}
// We put scrollbars in their own layers when this is the root scroll
@ -2126,6 +2126,8 @@ 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,

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -1157,18 +1157,18 @@ public:
* @param aDirtyRect content outside this rectangle can be ignored; the
* rectangle is in frame coordinates
*/
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {}
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) { return NS_OK; }
/**
* 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.
*/
void DisplayCaret(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
nsDisplayList* aList);
nsresult DisplayCaret(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
nsDisplayList* aList);
/**
* Get the preferred caret color at the offset.
@ -1204,9 +1204,9 @@ public:
* @param aDirtyRect content outside this rectangle can be ignored; the
* rectangle is in frame coordinates
*/
void BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
nsDisplayList* aList);
nsresult BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
nsDisplayList* aList);
/**
* Clips the display items of aFromSet, putting the results in aToSet.
@ -1241,11 +1241,11 @@ public:
* @param aFlags combination of DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT,
* DISPLAY_CHILD_FORCE_STACKING_CONTEXT and DISPLAY_CHILD_INLINE
*/
void BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
nsIFrame* aChild,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists,
uint32_t aFlags = 0);
nsresult 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

Просмотреть файл

@ -1366,13 +1366,13 @@ nsImageFrame::PaintImage(nsRenderingContext& aRenderingContext, nsPoint aPt,
}
}
void
NS_IMETHODIMP
nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
return;
return NS_OK;
// 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,6 +1446,8 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
WrapReplacedContentForBorderRadius(aBuilder, &replacedContent, aLists);
return NS_OK;
}
bool

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -1208,14 +1208,14 @@ nsObjectFrame::IsTransparentMode() const
#endif
}
void
NS_IMETHODIMP
nsObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// XXX why are we painting collapsed object frames?
if (!IsVisibleOrCollapsedForPainting(aBuilder))
return;
return NS_OK;
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;
return NS_OK;
DO_GLOBAL_REFLOW_COUNT_DSP("nsObjectFrame");
#ifndef XP_MACOSX
if (mWidget && aBuilder->IsInTransform()) {
// Windowed plugins should not be rendered inside a transform.
return;
return NS_OK;
}
#endif
@ -1289,6 +1289,8 @@ nsObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
WrapReplacedContentForBorderRadius(aBuilder, &replacedContent, aLists);
return NS_OK;
}
#ifdef XP_OS2

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -178,7 +178,7 @@ PaintDebugPlaceholder(nsIFrame* aFrame, nsRenderingContext* aCtx,
#if defined(DEBUG) || (defined(MOZ_REFLOW_PERF_DSP) && defined(MOZ_REFLOW_PERF))
void
NS_IMETHODIMP
nsPlaceholderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
@ -187,12 +187,13 @@ nsPlaceholderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
#ifdef DEBUG
if (GetShowFrameBorders()) {
aLists.Outlines()->AppendNewToTop(
return 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)

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -294,36 +294,35 @@ nsSubDocumentFrame::PassPointerEventsToChildren()
return false;
}
void
NS_IMETHODIMP
nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!IsVisibleForPainting(aBuilder))
return;
return NS_OK;
// 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;
return NS_OK;
DisplayBorderBackgroundOutline(aBuilder, aLists);
if (!mInnerView)
return;
return NS_OK;
nsFrameLoader* frameLoader = FrameLoader();
if (frameLoader) {
RenderFrameParent* rfp = frameLoader->GetCurrentRemoteFrame();
if (rfp) {
rfp->BuildDisplayList(aBuilder, this, aDirtyRect, aLists);
return;
return rfp->BuildDisplayList(aBuilder, this, aDirtyRect, aLists);
}
}
nsView* subdocView = mInnerView->GetFirstChild();
if (!subdocView)
return;
return NS_OK;
nsCOMPtr<nsIPresShell> presShell = nullptr;
@ -354,14 +353,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;
return NS_OK;
nsCOMPtr<nsIDocShell> docShell;
mFrameLoader->GetDocShell(getter_AddRefs(docShell));
if (!docShell)
return;
return NS_OK;
presShell = docShell->GetPresShell();
if (!presShell)
return;
return NS_OK;
}
}
@ -473,6 +472,8 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// delete childItems in case of OOM
childItems.DeleteAll();
return NS_OK;
}
nscoord

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -50,9 +50,9 @@ public:
NS_IMETHOD RemoveFrame(ChildListID aListID,
nsIFrame* aOldFrame) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD 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;

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -1752,7 +1752,7 @@ void nsDisplayMathMLCharDebug::Paint(nsDisplayListBuilder* aBuilder,
#endif
void
nsresult
nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
nsIFrame* aForFrame,
const nsDisplayListSet& aLists,
@ -1769,7 +1769,7 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
}
if (!styleContext->GetStyleVisibility()->IsVisible())
return;
return NS_OK;
// 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,6 +1801,7 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
aIndex,
aSelectedRect &&
!aSelectedRect->IsEmpty()));
return NS_OK;
}
void

Просмотреть файл

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

Просмотреть файл

@ -621,7 +621,7 @@ nsMathMLContainerFrame::PropagatePresentationDataFromChildAt(nsIFrame* aPa
*/
void
NS_IMETHODIMP
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;
return NS_OK;
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayMathMLError(aBuilder, this));
return;
return NS_OK;
}
DisplayBorderBackgroundOutline(aBuilder, aLists);
@ -650,6 +650,7 @@ 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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -271,7 +271,7 @@ nsMathMLmactionFrame::AttributeChanged(int32_t aNameSpaceID,
}
// Only paint the selected child...
void
NS_IMETHODIMP
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;
return NS_OK;
}
DisplayBorderBackgroundOutline(aBuilder, aLists);
@ -298,6 +298,7 @@ nsMathMLmactionFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// visual debug
DisplayBoundingMetrics(aBuilder, this, mReference, mBoundingMetrics, aLists);
#endif
return NS_OK;
}
// Only reflow the selected child ...

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -68,9 +68,9 @@ public:
virtual nsStyleContext*
GetAdditionalStyleContext(int32_t aIndex) const;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD 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
void DisplayNotation(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsRect& aRect,
const nsDisplayListSet& aLists,
nscoord aThickness, nsMencloseNotation aType);
nsresult DisplayNotation(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsRect& aRect,
const nsDisplayListSet& aLists,
nscoord aThickness, nsMencloseNotation aType);
};
#endif /* nsMathMLmencloseFrame_h___ */

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -67,9 +67,9 @@ public:
bool aPlaceOrigin,
nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
NS_IMETHOD 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
void DisplaySlash(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsRect& aRect,
nscoord aThickness,
const nsDisplayListSet& aLists);
nsresult DisplaySlash(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsRect& aRect,
nscoord aThickness,
const nsDisplayListSet& aLists);
nsRect mLineRect;
nsMathMLChar* mSlashChar;

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше