Complete improve performance of table drawing.
parent
1d760290a6
commit
6a49e31e07
|
@ -721,7 +721,6 @@ nsDisplayListBuilder::nsDisplayListBuilder(nsIFrame* aReferenceFrame,
|
||||||
: mReferenceFrame(aReferenceFrame),
|
: mReferenceFrame(aReferenceFrame),
|
||||||
mIgnoreScrollFrame(nullptr),
|
mIgnoreScrollFrame(nullptr),
|
||||||
mLayerEventRegions(nullptr),
|
mLayerEventRegions(nullptr),
|
||||||
mCurrentTableItem(nullptr),
|
|
||||||
mCurrentFrame(aReferenceFrame),
|
mCurrentFrame(aReferenceFrame),
|
||||||
mCurrentReferenceFrame(aReferenceFrame),
|
mCurrentReferenceFrame(aReferenceFrame),
|
||||||
mCurrentAGR(&mRootAGR),
|
mCurrentAGR(&mRootAGR),
|
||||||
|
@ -731,6 +730,7 @@ nsDisplayListBuilder::nsDisplayListBuilder(nsIFrame* aReferenceFrame,
|
||||||
mGlassDisplayItem(nullptr),
|
mGlassDisplayItem(nullptr),
|
||||||
mScrollInfoItemsForHoisting(nullptr),
|
mScrollInfoItemsForHoisting(nullptr),
|
||||||
mMode(aMode),
|
mMode(aMode),
|
||||||
|
mTableBackgroundSet(nullptr),
|
||||||
mCurrentScrollParentId(FrameMetrics::NULL_SCROLL_ID),
|
mCurrentScrollParentId(FrameMetrics::NULL_SCROLL_ID),
|
||||||
mCurrentScrollbarTarget(FrameMetrics::NULL_SCROLL_ID),
|
mCurrentScrollbarTarget(FrameMetrics::NULL_SCROLL_ID),
|
||||||
mCurrentScrollbarFlags(0),
|
mCurrentScrollbarFlags(0),
|
||||||
|
@ -864,10 +864,9 @@ nsDisplayListBuilder::FindAnimatedGeometryRootFor(nsDisplayItem* aItem)
|
||||||
|
|
||||||
|
|
||||||
void nsDisplayListBuilder::MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame,
|
void nsDisplayListBuilder::MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame,
|
||||||
nsIFrame* aFrame,
|
nsIFrame* aFrame)
|
||||||
const nsRect& aDirtyRect)
|
|
||||||
{
|
{
|
||||||
nsRect dirtyRectRelativeToDirtyFrame = aDirtyRect;
|
nsRect dirtyRectRelativeToDirtyFrame = GetDirtyRect();
|
||||||
if (nsLayoutUtils::IsFixedPosFrameInDisplayPort(aFrame) &&
|
if (nsLayoutUtils::IsFixedPosFrameInDisplayPort(aFrame) &&
|
||||||
IsPaintingToWindow()) {
|
IsPaintingToWindow()) {
|
||||||
NS_ASSERTION(aDirtyFrame == aFrame->GetParent(), "Dirty frame should be viewport frame");
|
NS_ASSERTION(aDirtyFrame == aFrame->GetParent(), "Dirty frame should be viewport frame");
|
||||||
|
@ -882,6 +881,7 @@ void nsDisplayListBuilder::MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame,
|
||||||
dirtyRectRelativeToDirtyFrame.SizeTo(aDirtyFrame->GetSize());
|
dirtyRectRelativeToDirtyFrame.SizeTo(aDirtyFrame->GetSize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nsRect dirty = dirtyRectRelativeToDirtyFrame - aFrame->GetOffsetTo(aDirtyFrame);
|
nsRect dirty = dirtyRectRelativeToDirtyFrame - aFrame->GetOffsetTo(aDirtyFrame);
|
||||||
nsRect overflowRect = aFrame->GetVisualOverflowRect();
|
nsRect overflowRect = aFrame->GetVisualOverflowRect();
|
||||||
|
|
||||||
|
@ -925,7 +925,6 @@ nsDisplayListBuilder::~nsDisplayListBuilder() {
|
||||||
"All frames should have been unmarked");
|
"All frames should have been unmarked");
|
||||||
NS_ASSERTION(mPresShellStates.Length() == 0,
|
NS_ASSERTION(mPresShellStates.Length() == 0,
|
||||||
"All presshells should have been exited");
|
"All presshells should have been exited");
|
||||||
NS_ASSERTION(!mCurrentTableItem, "No table item should be active");
|
|
||||||
|
|
||||||
nsCSSRendering::EndFrameTreesLocked();
|
nsCSSRendering::EndFrameTreesLocked();
|
||||||
|
|
||||||
|
@ -1008,8 +1007,22 @@ nsDisplayListBuilder::EnterPresShell(nsIFrame* aReferenceFrame,
|
||||||
}
|
}
|
||||||
state->mInsidePointerEventsNoneDoc = pointerEventsNone;
|
state->mInsidePointerEventsNoneDoc = pointerEventsNone;
|
||||||
|
|
||||||
if (!buildCaret)
|
state->mPresShellIgnoreScrollFrame =
|
||||||
|
state->mPresShell->IgnoringViewportScrolling()
|
||||||
|
? state->mPresShell->GetRootScrollFrame()
|
||||||
|
: nullptr;
|
||||||
|
|
||||||
|
nsPresContext* pc = aReferenceFrame->PresContext();
|
||||||
|
nsCOMPtr<nsIDocShell> docShell = pc->GetDocShell();
|
||||||
|
if (docShell) {
|
||||||
|
docShell->GetWindowDraggingAllowed(&mWindowDraggingAllowed);
|
||||||
|
}
|
||||||
|
|
||||||
|
mIsInChromePresContext = pc->IsChrome();
|
||||||
|
|
||||||
|
if (!buildCaret) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
RefPtr<nsCaret> caret = state->mPresShell->GetCaret();
|
RefPtr<nsCaret> caret = state->mPresShell->GetCaret();
|
||||||
state->mCaretFrame = caret->GetPaintGeometry(&state->mCaretRect);
|
state->mCaretFrame = caret->GetPaintGeometry(&state->mCaretRect);
|
||||||
|
@ -1017,13 +1030,6 @@ nsDisplayListBuilder::EnterPresShell(nsIFrame* aReferenceFrame,
|
||||||
mFramesMarkedForDisplay.AppendElement(state->mCaretFrame);
|
mFramesMarkedForDisplay.AppendElement(state->mCaretFrame);
|
||||||
MarkFrameForDisplay(state->mCaretFrame, nullptr);
|
MarkFrameForDisplay(state->mCaretFrame, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsPresContext* pc = aReferenceFrame->PresContext();
|
|
||||||
nsCOMPtr<nsIDocShell> docShell = pc->GetDocShell();
|
|
||||||
if (docShell) {
|
|
||||||
docShell->GetWindowDraggingAllowed(&mWindowDraggingAllowed);
|
|
||||||
}
|
|
||||||
mIsInChromePresContext = pc->IsChrome();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// A non-blank paint is a paint that does not just contain the canvas background.
|
// A non-blank paint is a paint that does not just contain the canvas background.
|
||||||
|
@ -1094,8 +1100,7 @@ nsDisplayListBuilder::ResetMarkedFramesForDisplayList()
|
||||||
|
|
||||||
void
|
void
|
||||||
nsDisplayListBuilder::MarkFramesForDisplayList(nsIFrame* aDirtyFrame,
|
nsDisplayListBuilder::MarkFramesForDisplayList(nsIFrame* aDirtyFrame,
|
||||||
const nsFrameList& aFrames,
|
const nsFrameList& aFrames) {
|
||||||
const nsRect& aDirtyRect) {
|
|
||||||
for (nsIFrame* e : aFrames) {
|
for (nsIFrame* e : aFrames) {
|
||||||
// Skip the AccessibleCaret frame when building no caret.
|
// Skip the AccessibleCaret frame when building no caret.
|
||||||
if (!IsBuildingCaret()) {
|
if (!IsBuildingCaret()) {
|
||||||
|
@ -1107,9 +1112,8 @@ nsDisplayListBuilder::MarkFramesForDisplayList(nsIFrame* aDirtyFrame,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mFramesMarkedForDisplay.AppendElement(e);
|
mFramesMarkedForDisplay.AppendElement(e);
|
||||||
MarkOutOfFlowFrameForDisplay(aDirtyFrame, e, aDirtyRect);
|
MarkOutOfFlowFrameForDisplay(aDirtyFrame, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2573,8 +2577,7 @@ static nsStyleContext* GetBackgroundStyleContext(nsIFrame* aFrame)
|
||||||
|
|
||||||
/* static */ void
|
/* static */ void
|
||||||
SetBackgroundClipRegion(DisplayListClipState::AutoSaveRestore& aClipState,
|
SetBackgroundClipRegion(DisplayListClipState::AutoSaveRestore& aClipState,
|
||||||
nsIFrame* aFrame, const nsPoint& aToReferenceFrame,
|
nsIFrame* aFrame, const nsStyleImageLayers::Layer& aLayer,
|
||||||
const nsStyleImageLayers::Layer& aLayer,
|
|
||||||
const nsRect& aBackgroundRect,
|
const nsRect& aBackgroundRect,
|
||||||
bool aWillPaintBorder)
|
bool aWillPaintBorder)
|
||||||
{
|
{
|
||||||
|
@ -2626,7 +2629,6 @@ SpecialCutoutRegionCase(nsDisplayListBuilder* aBuilder,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*static*/ bool
|
/*static*/ bool
|
||||||
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuilder,
|
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuilder,
|
||||||
nsIFrame* aFrame,
|
nsIFrame* aFrame,
|
||||||
|
@ -2635,14 +2637,16 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
||||||
bool aAllowWillPaintBorderOptimization,
|
bool aAllowWillPaintBorderOptimization,
|
||||||
nsStyleContext* aStyleContext,
|
nsStyleContext* aStyleContext,
|
||||||
const nsRect& aBackgroundOriginRect,
|
const nsRect& aBackgroundOriginRect,
|
||||||
nsIFrame* aSecondaryReferenceFrame)
|
nsIFrame* aSecondaryReferenceFrame,
|
||||||
|
Maybe<nsDisplayListBuilder::AutoBuildingDisplayList>*
|
||||||
|
aAutoBuildingDisplayList)
|
||||||
{
|
{
|
||||||
nsStyleContext* bgSC = aStyleContext;
|
nsStyleContext* bgSC = aStyleContext;
|
||||||
const nsStyleBackground* bg = nullptr;
|
const nsStyleBackground* bg = nullptr;
|
||||||
nsRect bgRect = aBackgroundRect + aBuilder->ToReferenceFrame(aFrame);
|
nsRect bgRect = aBackgroundRect;
|
||||||
nsRect bgOriginRect = bgRect;
|
nsRect bgOriginRect = bgRect;
|
||||||
if (!aBackgroundOriginRect.IsEmpty()) {
|
if (!aBackgroundOriginRect.IsEmpty()) {
|
||||||
bgOriginRect = aBackgroundOriginRect + aBuilder->ToReferenceFrame(aFrame);
|
bgOriginRect = aBackgroundOriginRect;
|
||||||
}
|
}
|
||||||
nsPresContext* presContext = aFrame->PresContext();
|
nsPresContext* presContext = aFrame->PresContext();
|
||||||
bool isThemed = aFrame->IsThemed();
|
bool isThemed = aFrame->IsThemed();
|
||||||
|
@ -2678,8 +2682,6 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
||||||
!isThemed && !hasInsetShadow &&
|
!isThemed && !hasInsetShadow &&
|
||||||
borderStyle->HasBorder();
|
borderStyle->HasBorder();
|
||||||
|
|
||||||
nsPoint toRef = aBuilder->ToReferenceFrame(aFrame);
|
|
||||||
|
|
||||||
// An auxiliary list is necessary in case we have background blending; if that
|
// An auxiliary list is necessary in case we have background blending; if that
|
||||||
// is the case, background items need to be wrapped by a blend container to
|
// is the case, background items need to be wrapped by a blend container to
|
||||||
// isolate blending to the background
|
// isolate blending to the background
|
||||||
|
@ -2688,6 +2690,9 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
||||||
// to create an item for hit testing.
|
// to create an item for hit testing.
|
||||||
if ((drawBackgroundColor && color != NS_RGBA(0,0,0,0)) ||
|
if ((drawBackgroundColor && color != NS_RGBA(0,0,0,0)) ||
|
||||||
aBuilder->IsForEventDelivery()) {
|
aBuilder->IsForEventDelivery()) {
|
||||||
|
if (aAutoBuildingDisplayList && !*aAutoBuildingDisplayList) {
|
||||||
|
aAutoBuildingDisplayList->emplace(aBuilder, aFrame);
|
||||||
|
}
|
||||||
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
|
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
|
||||||
if (bg && !aBuilder->IsForEventDelivery()) {
|
if (bg && !aBuilder->IsForEventDelivery()) {
|
||||||
// Disable the will-paint-border optimization for background
|
// Disable the will-paint-border optimization for background
|
||||||
|
@ -2699,7 +2704,7 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
||||||
// artifacts along the rounded corners.
|
// artifacts along the rounded corners.
|
||||||
bool useWillPaintBorderOptimization = willPaintBorder &&
|
bool useWillPaintBorderOptimization = willPaintBorder &&
|
||||||
nsLayoutUtils::HasNonZeroCorner(borderStyle->mBorderRadius);
|
nsLayoutUtils::HasNonZeroCorner(borderStyle->mBorderRadius);
|
||||||
SetBackgroundClipRegion(clipState, aFrame, toRef,
|
SetBackgroundClipRegion(clipState, aFrame,
|
||||||
bg->BottomLayer(), bgRect,
|
bg->BottomLayer(), bgRect,
|
||||||
useWillPaintBorderOptimization);
|
useWillPaintBorderOptimization);
|
||||||
}
|
}
|
||||||
|
@ -2752,6 +2757,10 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (aAutoBuildingDisplayList && !*aAutoBuildingDisplayList) {
|
||||||
|
aAutoBuildingDisplayList->emplace(aBuilder, aFrame);
|
||||||
|
}
|
||||||
|
|
||||||
if (bg->mImage.mLayers[i].mBlendMode != NS_STYLE_BLEND_NORMAL) {
|
if (bg->mImage.mLayers[i].mBlendMode != NS_STYLE_BLEND_NORMAL) {
|
||||||
needBlendContainer = true;
|
needBlendContainer = true;
|
||||||
}
|
}
|
||||||
|
@ -2759,8 +2768,8 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
||||||
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
|
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
|
||||||
if (!aBuilder->IsForEventDelivery()) {
|
if (!aBuilder->IsForEventDelivery()) {
|
||||||
const nsStyleImageLayers::Layer& layer = bg->mImage.mLayers[i];
|
const nsStyleImageLayers::Layer& layer = bg->mImage.mLayers[i];
|
||||||
SetBackgroundClipRegion(clipState, aFrame, toRef,
|
SetBackgroundClipRegion(clipState, aFrame, layer, bgRect,
|
||||||
layer, bgRect, willPaintBorder);
|
willPaintBorder);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayList thisItemList;
|
nsDisplayList thisItemList;
|
||||||
|
|
|
@ -48,6 +48,7 @@ class nsISelection;
|
||||||
class nsIScrollableFrame;
|
class nsIScrollableFrame;
|
||||||
class nsDisplayLayerEventRegions;
|
class nsDisplayLayerEventRegions;
|
||||||
class nsDisplayScrollInfoLayer;
|
class nsDisplayScrollInfoLayer;
|
||||||
|
class nsDisplayTableBackgroundSet;
|
||||||
class nsCaret;
|
class nsCaret;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
@ -444,6 +445,10 @@ public:
|
||||||
* BuildDisplayList on right now).
|
* BuildDisplayList on right now).
|
||||||
*/
|
*/
|
||||||
const nsRect& GetDirtyRect() { return mDirtyRect; }
|
const nsRect& GetDirtyRect() { return mDirtyRect; }
|
||||||
|
|
||||||
|
void SetDirtyRect(const nsRect& aDirtyRect) { mDirtyRect = aDirtyRect; }
|
||||||
|
void IntersectDirtyRect(const nsRect& aDirtyRect) { mDirtyRect.IntersectRect(mDirtyRect, aDirtyRect); }
|
||||||
|
|
||||||
const nsIFrame* GetCurrentFrame() { return mCurrentFrame; }
|
const nsIFrame* GetCurrentFrame() { return mCurrentFrame; }
|
||||||
const nsIFrame* GetCurrentReferenceFrame() { return mCurrentReferenceFrame; }
|
const nsIFrame* GetCurrentReferenceFrame() { return mCurrentReferenceFrame; }
|
||||||
const nsPoint& GetCurrentFrameOffsetToReferenceFrame() { return mCurrentOffsetToReferenceFrame; }
|
const nsPoint& GetCurrentFrameOffsetToReferenceFrame() { return mCurrentOffsetToReferenceFrame; }
|
||||||
|
@ -493,11 +498,10 @@ public:
|
||||||
/**
|
/**
|
||||||
* Display the caret if needed.
|
* Display the caret if needed.
|
||||||
*/
|
*/
|
||||||
void DisplayCaret(nsIFrame* aFrame, const nsRect& aDirtyRect,
|
void DisplayCaret(nsIFrame* aFrame, nsDisplayList* aList) {
|
||||||
nsDisplayList* aList) {
|
|
||||||
nsIFrame* frame = GetCaretFrame();
|
nsIFrame* frame = GetCaretFrame();
|
||||||
if (aFrame == frame) {
|
if (aFrame == frame) {
|
||||||
frame->DisplayCaret(this, aDirtyRect, aList);
|
frame->DisplayCaret(this, aList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -517,6 +521,14 @@ public:
|
||||||
* Get the caret associated with the current presshell.
|
* Get the caret associated with the current presshell.
|
||||||
*/
|
*/
|
||||||
nsCaret* GetCaret();
|
nsCaret* GetCaret();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the root scroll frame for the current PresShell, if the PresShell
|
||||||
|
* is ignoring viewport scrolling.
|
||||||
|
*/
|
||||||
|
nsIFrame* GetPresShellIgnoreScrollFrame() {
|
||||||
|
return CurrentPresShellState()->mPresShellIgnoreScrollFrame;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Notify the display list builder that we're entering a presshell.
|
* Notify the display list builder that we're entering a presshell.
|
||||||
* aReferenceFrame should be a frame in the new presshell.
|
* aReferenceFrame should be a frame in the new presshell.
|
||||||
|
@ -577,6 +589,16 @@ public:
|
||||||
mSyncDecodeImages = aSyncDecodeImages;
|
mSyncDecodeImages = aSyncDecodeImages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nsDisplayTableBackgroundSet* SetTableBackgroundSet(
|
||||||
|
nsDisplayTableBackgroundSet* aTableSet) {
|
||||||
|
nsDisplayTableBackgroundSet* old = mTableBackgroundSet;
|
||||||
|
mTableBackgroundSet = aTableSet;
|
||||||
|
return old;
|
||||||
|
}
|
||||||
|
nsDisplayTableBackgroundSet* GetTableBackgroundSet() const {
|
||||||
|
return mTableBackgroundSet;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper method to generate background painting flags based on the
|
* Helper method to generate background painting flags based on the
|
||||||
* information available in the display list builder. Currently only
|
* information available in the display list builder. Currently only
|
||||||
|
@ -602,8 +624,7 @@ public:
|
||||||
* destroyed.
|
* destroyed.
|
||||||
*/
|
*/
|
||||||
void MarkFramesForDisplayList(nsIFrame* aDirtyFrame,
|
void MarkFramesForDisplayList(nsIFrame* aDirtyFrame,
|
||||||
const nsFrameList& aFrames,
|
const nsFrameList& aFrames);
|
||||||
const nsRect& aDirtyRect);
|
|
||||||
/**
|
/**
|
||||||
* Mark all child frames that Preserve3D() as needing display.
|
* Mark all child frames that Preserve3D() as needing display.
|
||||||
* Because these frames include transforms set on their parent, dirty rects
|
* Because these frames include transforms set on their parent, dirty rects
|
||||||
|
@ -700,8 +721,12 @@ public:
|
||||||
friend class AutoBuildingDisplayList;
|
friend class AutoBuildingDisplayList;
|
||||||
class AutoBuildingDisplayList {
|
class AutoBuildingDisplayList {
|
||||||
public:
|
public:
|
||||||
AutoBuildingDisplayList(nsDisplayListBuilder* aBuilder,
|
|
||||||
nsIFrame* aForChild,
|
AutoBuildingDisplayList(nsDisplayListBuilder* aBuilder, nsIFrame* aForChild)
|
||||||
|
: AutoBuildingDisplayList(
|
||||||
|
aBuilder, aForChild, aBuilder->GetDirtyRect(), aForChild->IsTransformed()){}
|
||||||
|
|
||||||
|
AutoBuildingDisplayList(nsDisplayListBuilder* aBuilder, nsIFrame* aForChild,
|
||||||
const nsRect& aDirtyRect, bool aIsRoot)
|
const nsRect& aDirtyRect, bool aIsRoot)
|
||||||
: mBuilder(aBuilder),
|
: mBuilder(aBuilder),
|
||||||
mPrevFrame(aBuilder->mCurrentFrame),
|
mPrevFrame(aBuilder->mCurrentFrame),
|
||||||
|
@ -803,10 +828,11 @@ public:
|
||||||
friend class AutoSaveRestorePerspectiveIndex;
|
friend class AutoSaveRestorePerspectiveIndex;
|
||||||
class AutoSaveRestorePerspectiveIndex {
|
class AutoSaveRestorePerspectiveIndex {
|
||||||
public:
|
public:
|
||||||
AutoSaveRestorePerspectiveIndex(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame)
|
AutoSaveRestorePerspectiveIndex(nsDisplayListBuilder* aBuilder,
|
||||||
|
const bool aChildrenHavePerspective)
|
||||||
: mBuilder(nullptr)
|
: mBuilder(nullptr)
|
||||||
{
|
{
|
||||||
if (aFrame->ChildrenHavePerspective()) {
|
if (aChildrenHavePerspective) {
|
||||||
mBuilder = aBuilder;
|
mBuilder = aBuilder;
|
||||||
mCachedItemIndex = aBuilder->mPerspectiveItemIndex;
|
mCachedItemIndex = aBuilder->mPerspectiveItemIndex;
|
||||||
aBuilder->mPerspectiveItemIndex = 0;
|
aBuilder->mPerspectiveItemIndex = 0;
|
||||||
|
@ -981,10 +1007,6 @@ public:
|
||||||
return mPreserves3DCtx.mAccumulatedRectLevels;
|
return mPreserves3DCtx.mAccumulatedRectLevels;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helpers for tables
|
|
||||||
nsDisplayTableItem* GetCurrentTableItem() { return mCurrentTableItem; }
|
|
||||||
void SetCurrentTableItem(nsDisplayTableItem* aTableItem) { mCurrentTableItem = aTableItem; }
|
|
||||||
|
|
||||||
struct OutOfFlowDisplayData {
|
struct OutOfFlowDisplayData {
|
||||||
OutOfFlowDisplayData(const DisplayItemClip* aContainingBlockClip,
|
OutOfFlowDisplayData(const DisplayItemClip* aContainingBlockClip,
|
||||||
const DisplayItemScrollClip* aContainingBlockScrollClip,
|
const DisplayItemScrollClip* aContainingBlockScrollClip,
|
||||||
|
@ -1120,11 +1142,11 @@ public:
|
||||||
Preserves3DContext mSavedCtx;
|
Preserves3DContext mSavedCtx;
|
||||||
};
|
};
|
||||||
|
|
||||||
const nsRect GetPreserves3DDirtyRect(const nsIFrame *aFrame) const {
|
const nsRect GetPreserves3DRects() const {
|
||||||
return mPreserves3DCtx.mDirtyRect;
|
return mPreserves3DCtx.mDirtyRect;
|
||||||
}
|
}
|
||||||
void SetPreserves3DDirtyRect(const nsRect &aDirtyRect) {
|
void SavePreserves3DRects() {
|
||||||
mPreserves3DCtx.mDirtyRect = aDirtyRect;
|
mPreserves3DCtx.mDirtyRect = mDirtyRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsBuildingInvisibleItems() const { return mBuildingInvisibleItems; }
|
bool IsBuildingInvisibleItems() const { return mBuildingInvisibleItems; }
|
||||||
|
@ -1133,8 +1155,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame, nsIFrame* aFrame,
|
void MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame, nsIFrame* aFrame);
|
||||||
const nsRect& aDirtyRect);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether a frame acts as an animated geometry root, optionally
|
* Returns whether a frame acts as an animated geometry root, optionally
|
||||||
|
@ -1178,6 +1199,7 @@ private:
|
||||||
// in the document, and is set when we enter a subdocument for a pointer-
|
// in the document, and is set when we enter a subdocument for a pointer-
|
||||||
// events:none frame.
|
// events:none frame.
|
||||||
bool mInsidePointerEventsNoneDoc;
|
bool mInsidePointerEventsNoneDoc;
|
||||||
|
nsIFrame* mPresShellIgnoreScrollFrame;
|
||||||
};
|
};
|
||||||
|
|
||||||
PresShellState* CurrentPresShellState() {
|
PresShellState* CurrentPresShellState() {
|
||||||
|
@ -1202,7 +1224,6 @@ private:
|
||||||
AutoTArray<PresShellState,8> mPresShellStates;
|
AutoTArray<PresShellState,8> mPresShellStates;
|
||||||
AutoTArray<nsIFrame*,400> mFramesMarkedForDisplay;
|
AutoTArray<nsIFrame*,400> mFramesMarkedForDisplay;
|
||||||
AutoTArray<ThemeGeometry,2> mThemeGeometries;
|
AutoTArray<ThemeGeometry,2> mThemeGeometries;
|
||||||
nsDisplayTableItem* mCurrentTableItem;
|
|
||||||
DisplayListClipState mClipState;
|
DisplayListClipState mClipState;
|
||||||
// mCurrentFrame is the frame that we're currently calling (or about to call)
|
// mCurrentFrame is the frame that we're currently calling (or about to call)
|
||||||
// BuildDisplayList on.
|
// BuildDisplayList on.
|
||||||
|
@ -1245,6 +1266,7 @@ private:
|
||||||
nsTArray<DisplayItemScrollClip*> mScrollClipsToDestroy;
|
nsTArray<DisplayItemScrollClip*> mScrollClipsToDestroy;
|
||||||
nsTArray<DisplayItemClip*> mDisplayItemClipsToDestroy;
|
nsTArray<DisplayItemClip*> mDisplayItemClipsToDestroy;
|
||||||
nsDisplayListBuilderMode mMode;
|
nsDisplayListBuilderMode mMode;
|
||||||
|
nsDisplayTableBackgroundSet* mTableBackgroundSet;
|
||||||
ViewID mCurrentScrollParentId;
|
ViewID mCurrentScrollParentId;
|
||||||
ViewID mCurrentScrollbarTarget;
|
ViewID mCurrentScrollbarTarget;
|
||||||
uint32_t mCurrentScrollbarFlags;
|
uint32_t mCurrentScrollbarFlags;
|
||||||
|
@ -2287,11 +2309,12 @@ protected:
|
||||||
* to the object, and all distinct.
|
* to the object, and all distinct.
|
||||||
*/
|
*/
|
||||||
struct nsDisplayListCollection : public nsDisplayListSet {
|
struct nsDisplayListCollection : public nsDisplayListSet {
|
||||||
nsDisplayListCollection() :
|
explicit nsDisplayListCollection(nsDisplayListBuilder* aBuilder)
|
||||||
nsDisplayListSet(&mLists[0], &mLists[1], &mLists[2], &mLists[3], &mLists[4],
|
: nsDisplayListSet(&mLists[0], &mLists[1], &mLists[2], &mLists[3], &mLists[4],
|
||||||
&mLists[5]) {}
|
&mLists[5]) {}
|
||||||
explicit nsDisplayListCollection(nsDisplayList* aBorderBackground) :
|
explicit nsDisplayListCollection(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayListSet(aBorderBackground, &mLists[1], &mLists[2], &mLists[3], &mLists[4],
|
nsDisplayList* aBorderBackground)
|
||||||
|
: nsDisplayListSet(aBorderBackground, &mLists[1], &mLists[2], &mLists[3], &mLists[4],
|
||||||
&mLists[5]) {}
|
&mLists[5]) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2739,7 +2762,9 @@ public:
|
||||||
bool aAllowWillPaintBorderOptimization = true,
|
bool aAllowWillPaintBorderOptimization = true,
|
||||||
nsStyleContext* aStyleContext = nullptr,
|
nsStyleContext* aStyleContext = nullptr,
|
||||||
const nsRect& aBackgroundOriginRect = nsRect(),
|
const nsRect& aBackgroundOriginRect = nsRect(),
|
||||||
nsIFrame* aSecondaryReferenceFrame = nullptr);
|
nsIFrame* aSecondaryReferenceFrame = nullptr,
|
||||||
|
mozilla::Maybe<nsDisplayListBuilder::AutoBuildingDisplayList>*
|
||||||
|
aAutoBuildingDisplayList = nullptr);
|
||||||
|
|
||||||
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||||
LayerManager* aManager,
|
LayerManager* aManager,
|
||||||
|
|
|
@ -3111,7 +3111,8 @@ nsLayoutUtils::GetFramesForArea(nsIFrame* aFrame, const nsRect& aRect,
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.EnterPresShell(aFrame);
|
builder.EnterPresShell(aFrame);
|
||||||
aFrame->BuildDisplayListForStackingContext(&builder, aRect, &list);
|
builder.SetDirtyRect(aRect);
|
||||||
|
aFrame->BuildDisplayListForStackingContext(&builder, &list);
|
||||||
builder.LeavePresShell(aFrame, nullptr);
|
builder.LeavePresShell(aFrame, nullptr);
|
||||||
|
|
||||||
#ifdef MOZ_DUMP_PAINTING
|
#ifdef MOZ_DUMP_PAINTING
|
||||||
|
@ -3460,7 +3461,8 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
|
||||||
PROFILER_LABEL("nsLayoutUtils", "PaintFrame::BuildDisplayList",
|
PROFILER_LABEL("nsLayoutUtils", "PaintFrame::BuildDisplayList",
|
||||||
js::ProfileEntry::Category::GRAPHICS);
|
js::ProfileEntry::Category::GRAPHICS);
|
||||||
|
|
||||||
aFrame->BuildDisplayListForStackingContext(&builder, dirtyRect, &list);
|
builder.SetDirtyRect(dirtyRect);
|
||||||
|
aFrame->BuildDisplayListForStackingContext(&builder, &list);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIAtom* frameType = aFrame->GetType();
|
nsIAtom* frameType = aFrame->GetType();
|
||||||
|
|
|
@ -4868,8 +4868,8 @@ PresShell::CreateRangePaintInfo(nsIDOMRange* aRange,
|
||||||
nsIFrame* frame = aNode->AsContent()->GetPrimaryFrame();
|
nsIFrame* frame = aNode->AsContent()->GetPrimaryFrame();
|
||||||
// XXX deal with frame being null due to display:contents
|
// XXX deal with frame being null due to display:contents
|
||||||
for (; frame; frame = nsLayoutUtils::GetNextContinuationOrIBSplitSibling(frame)) {
|
for (; frame; frame = nsLayoutUtils::GetNextContinuationOrIBSplitSibling(frame)) {
|
||||||
frame->BuildDisplayListForStackingContext(&info->mBuilder,
|
info->mBuilder.SetDirtyRect(frame->GetVisualOverflowRect());
|
||||||
frame->GetVisualOverflowRect(), &info->mList);
|
frame->BuildDisplayListForStackingContext(&info->mBuilder, &info->mList);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (startParent->NodeType() == nsIDOMNode::TEXT_NODE) {
|
if (startParent->NodeType() == nsIDOMNode::TEXT_NODE) {
|
||||||
|
|
|
@ -263,8 +263,8 @@ nsButtonFrameRenderer::DisplayButton(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayButtonBoxShadowOuter(aBuilder, this));
|
nsDisplayButtonBoxShadowOuter(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsRect buttonRect;
|
nsRect buttonRect =
|
||||||
GetButtonRect(mFrame->GetRectRelativeToSelf(), buttonRect);
|
mFrame->GetRectRelativeToSelf() + aBuilder->ToReferenceFrame(mFrame);
|
||||||
|
|
||||||
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
||||||
aBuilder, mFrame, buttonRect, aBackground);
|
aBuilder, mFrame, buttonRect, aBackground);
|
||||||
|
|
|
@ -1295,7 +1295,6 @@ public:
|
||||||
nsReflowStatus& aStatus) override;
|
nsReflowStatus& aStatus) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -1336,11 +1335,10 @@ nsComboboxDisplayFrame::Reflow(nsPresContext* aPresContext,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsComboboxDisplayFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsComboboxDisplayFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
nsDisplayListCollection set;
|
nsDisplayListCollection set(aBuilder);
|
||||||
nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, set);
|
nsBlockFrame::BuildDisplayList(aBuilder, set);
|
||||||
|
|
||||||
// remove background items if parent frame is themed
|
// remove background items if parent frame is themed
|
||||||
if (mComboBox->IsThemed()) {
|
if (mComboBox->IsThemed()) {
|
||||||
|
@ -1541,13 +1539,8 @@ void nsDisplayComboboxFocus::Paint(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
#ifdef NOISY
|
|
||||||
printf("%p paint at (%d, %d, %d, %d)\n", this,
|
|
||||||
aDirtyRect.x, aDirtyRect.y, aDirtyRect.width, aDirtyRect.height);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (aBuilder->IsForEventDelivery()) {
|
if (aBuilder->IsForEventDelivery()) {
|
||||||
// Don't allow children to receive events.
|
// Don't allow children to receive events.
|
||||||
|
@ -1556,7 +1549,7 @@ nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
} else {
|
} else {
|
||||||
// REVIEW: Our in-flow child frames are inline-level so they will paint in our
|
// REVIEW: Our in-flow child frames are inline-level so they will paint in our
|
||||||
// content list, so we don't need to mess with layers.
|
// content list, so we don't need to mess with layers.
|
||||||
nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
nsBlockFrame::BuildDisplayList(aBuilder, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw a focus indicator only when focus rings should be drawn
|
// draw a focus indicator only when focus rings should be drawn
|
||||||
|
|
|
@ -92,7 +92,6 @@ public:
|
||||||
nsEventStatus* aEventStatus) override;
|
nsEventStatus* aEventStatus) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
void PaintFocus(DrawTarget& aDrawTarget, nsPoint aPt);
|
void PaintFocus(DrawTarget& aDrawTarget, nsPoint aPt);
|
||||||
|
|
|
@ -153,7 +153,6 @@ nsDisplayFieldSetBorderBackground::ComputeInvalidationRegion(nsDisplayListBuilde
|
||||||
|
|
||||||
void
|
void
|
||||||
nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) {
|
const nsDisplayListSet& aLists) {
|
||||||
// Paint our background and border in a special way.
|
// Paint our background and border in a special way.
|
||||||
// REVIEW: We don't really need to check frame emptiness here; if it's empty,
|
// REVIEW: We don't really need to check frame emptiness here; if it's empty,
|
||||||
|
@ -166,9 +165,11 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayBoxShadowOuter(aBuilder, this));
|
nsDisplayBoxShadowOuter(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const nsRect rect =
|
||||||
|
VisualBorderRectRelativeToSelf() + aBuilder->ToReferenceFrame(this);
|
||||||
|
|
||||||
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
||||||
aBuilder, this, VisualBorderRectRelativeToSelf(),
|
aBuilder, this, rect, aLists.BorderBackground(),
|
||||||
aLists.BorderBackground(),
|
|
||||||
/* aAllowWillPaintBorderOptimization = */ false);
|
/* aAllowWillPaintBorderOptimization = */ false);
|
||||||
|
|
||||||
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
|
@ -180,10 +181,10 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetPrevInFlow()) {
|
if (GetPrevInFlow()) {
|
||||||
DisplayOverflowContainers(aBuilder, aDirtyRect, aLists);
|
DisplayOverflowContainers(aBuilder, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayListCollection contentDisplayItems;
|
nsDisplayListCollection contentDisplayItems(aBuilder);
|
||||||
if (nsIFrame* inner = GetInner()) {
|
if (nsIFrame* inner = GetInner()) {
|
||||||
// Collect the inner frame's display items into their own collection.
|
// Collect the inner frame's display items into their own collection.
|
||||||
// We need to be calling BuildDisplayList on it before the legend in
|
// We need to be calling BuildDisplayList on it before the legend in
|
||||||
|
@ -191,13 +192,13 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
// legend. However, we want the inner frame's display items to be
|
// legend. However, we want the inner frame's display items to be
|
||||||
// after the legend's display items in z-order, so we need to save them
|
// after the legend's display items in z-order, so we need to save them
|
||||||
// and append them later.
|
// and append them later.
|
||||||
BuildDisplayListForChild(aBuilder, inner, aDirtyRect, contentDisplayItems);
|
BuildDisplayListForChild(aBuilder, inner, contentDisplayItems);
|
||||||
}
|
}
|
||||||
if (nsIFrame* legend = GetLegend()) {
|
if (nsIFrame* legend = GetLegend()) {
|
||||||
// The legend's background goes on our BlockBorderBackgrounds list because
|
// The legend's background goes on our BlockBorderBackgrounds list because
|
||||||
// it's a block child.
|
// it's a block child.
|
||||||
nsDisplayListSet set(aLists, aLists.BlockBorderBackgrounds());
|
nsDisplayListSet set(aLists, aLists.BlockBorderBackgrounds());
|
||||||
BuildDisplayListForChild(aBuilder, legend, aDirtyRect, set);
|
BuildDisplayListForChild(aBuilder, legend, set);
|
||||||
}
|
}
|
||||||
// Put the inner frame's display items on the master list. Note that this
|
// Put the inner frame's display items on the master list. Note that this
|
||||||
// moves its border/background display items to our BorderBackground() list,
|
// moves its border/background display items to our BorderBackground() list,
|
||||||
|
|
|
@ -53,7 +53,6 @@ public:
|
||||||
nscoord* aBaseline) const override;
|
nscoord* aBaseline) const override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
DrawResult PaintBorder(nsDisplayListBuilder* aBuilder,
|
DrawResult PaintBorder(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
|
@ -485,10 +485,9 @@ nsFileControlFrame::SetFormProperty(nsIAtom* aName,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsFileControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsFileControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
BuildDisplayListForInline(aBuilder, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ACCESSIBILITY
|
#ifdef ACCESSIBILITY
|
||||||
|
|
|
@ -33,7 +33,6 @@ public:
|
||||||
nsIFrame* aPrevInFlow) override;
|
nsIFrame* aPrevInFlow) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
NS_DECL_QUERYFRAME
|
NS_DECL_QUERYFRAME
|
||||||
|
|
|
@ -40,7 +40,6 @@ public:
|
||||||
|
|
||||||
// nsIFrame replacements
|
// nsIFrame replacements
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override {
|
const nsDisplayListSet& aLists) override {
|
||||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsFormControlFrame");
|
DO_GLOBAL_REFLOW_COUNT_DSP("nsFormControlFrame");
|
||||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||||
|
|
|
@ -107,10 +107,9 @@ nsGfxCheckboxControlFrame::AccessibleType()
|
||||||
//------------------------------------------------------------
|
//------------------------------------------------------------
|
||||||
void
|
void
|
||||||
nsGfxCheckboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsGfxCheckboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
nsFormControlFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
nsFormControlFrame::BuildDisplayList(aBuilder, aLists);
|
||||||
|
|
||||||
// Get current checked state through content model.
|
// Get current checked state through content model.
|
||||||
if ((!IsChecked() && !IsIndeterminate()) || !IsVisibleForPainting(aBuilder))
|
if ((!IsChecked() && !IsIndeterminate()) || !IsVisibleForPainting(aBuilder))
|
||||||
|
|
|
@ -23,7 +23,6 @@ public:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
#ifdef ACCESSIBILITY
|
#ifdef ACCESSIBILITY
|
||||||
|
|
|
@ -70,10 +70,9 @@ PaintCheckedRadioButton(nsIFrame* aFrame,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsGfxRadioControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsGfxRadioControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
nsFormControlFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
nsFormControlFrame::BuildDisplayList(aBuilder, aLists);
|
||||||
|
|
||||||
if (!IsVisibleForPainting(aBuilder))
|
if (!IsVisibleForPainting(aBuilder))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -25,7 +25,6 @@ public:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,6 @@ nsHTMLButtonControlFrame::ShouldClipPaintingToBorderBox()
|
||||||
|
|
||||||
void
|
void
|
||||||
nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
// Clip to our border area for event hit testing.
|
// Clip to our border area for event hit testing.
|
||||||
|
@ -117,7 +116,7 @@ nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
mRenderer.DisplayButton(aBuilder, aLists.BorderBackground(), &onTop);
|
mRenderer.DisplayButton(aBuilder, aLists.BorderBackground(), &onTop);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayListCollection set;
|
nsDisplayListCollection set(aBuilder);
|
||||||
|
|
||||||
// Do not allow the child subtree to receive events.
|
// Do not allow the child subtree to receive events.
|
||||||
if (!isForEventDelivery) {
|
if (!isForEventDelivery) {
|
||||||
|
@ -132,7 +131,7 @@ nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
clipState.ClipContainingBlockDescendants(rect, hasRadii ? radii : nullptr);
|
clipState.ClipContainingBlockDescendants(rect, hasRadii ? radii : nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildDisplayListForChild(aBuilder, mFrames.FirstChild(), aDirtyRect, set,
|
BuildDisplayListForChild(aBuilder, mFrames.FirstChild(), set,
|
||||||
DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT);
|
DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT);
|
||||||
// That should put the display items in set.Content()
|
// That should put the display items in set.Content()
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@ public:
|
||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||||
|
|
|
@ -155,7 +155,6 @@ nsListControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
||||||
|
|
||||||
void
|
void
|
||||||
nsListControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsListControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
// We allow visibility:hidden <select>s to contain visible options.
|
// We allow visibility:hidden <select>s to contain visible options.
|
||||||
|
@ -180,7 +179,7 @@ nsListControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
mLastDropdownBackstopColor));
|
mLastDropdownBackstopColor));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsHTMLScrollFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
nsHTMLScrollFrame::BuildDisplayList(aBuilder, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -81,7 +81,6 @@ public:
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
|
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual nsContainerFrame* GetContentInsertionFrame() override;
|
virtual nsContainerFrame* GetContentInsertionFrame() override;
|
||||||
|
|
|
@ -98,10 +98,9 @@ NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
|
||||||
|
|
||||||
void
|
void
|
||||||
nsProgressFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsProgressFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
BuildDisplayListForInline(aBuilder, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -32,7 +32,6 @@ public:
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
|
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual void Reflow(nsPresContext* aCX,
|
virtual void Reflow(nsPresContext* aCX,
|
||||||
|
|
|
@ -255,7 +255,6 @@ nsDisplayRangeFocusRing::Paint(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsRangeFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsRangeFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
if (IsThemed()) {
|
if (IsThemed()) {
|
||||||
|
@ -270,10 +269,10 @@ nsRangeFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
nsIFrame* thumb = mThumbDiv->GetPrimaryFrame();
|
nsIFrame* thumb = mThumbDiv->GetPrimaryFrame();
|
||||||
if (thumb) {
|
if (thumb) {
|
||||||
nsDisplayListSet set(aLists, aLists.Content());
|
nsDisplayListSet set(aLists, aLists.Content());
|
||||||
BuildDisplayListForChild(aBuilder, thumb, aDirtyRect, set, DISPLAY_CHILD_INLINE);
|
BuildDisplayListForChild(aBuilder, thumb, set, DISPLAY_CHILD_INLINE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
BuildDisplayListForInline(aBuilder, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw a focus outline if appropriate:
|
// Draw a focus outline if appropriate:
|
||||||
|
|
|
@ -43,7 +43,6 @@ public:
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
|
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
|
||||||
|
|
||||||
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual void Reflow(nsPresContext* aPresContext,
|
virtual void Reflow(nsPresContext* aPresContext,
|
||||||
|
|
|
@ -126,16 +126,15 @@ public:
|
||||||
|
|
||||||
void
|
void
|
||||||
nsSelectsAreaFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsSelectsAreaFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
if (!aBuilder->IsForEventDelivery()) {
|
if (!aBuilder->IsForEventDelivery()) {
|
||||||
BuildDisplayListInternal(aBuilder, aDirtyRect, aLists);
|
BuildDisplayListInternal(aBuilder, aLists);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayListCollection set;
|
nsDisplayListCollection set(aBuilder);
|
||||||
BuildDisplayListInternal(aBuilder, aDirtyRect, set);
|
BuildDisplayListInternal(aBuilder, set);
|
||||||
|
|
||||||
nsOptionEventGrabberWrapper wrapper;
|
nsOptionEventGrabberWrapper wrapper;
|
||||||
wrapper.WrapLists(aBuilder, this, set, aLists);
|
wrapper.WrapLists(aBuilder, this, set, aLists);
|
||||||
|
@ -143,10 +142,9 @@ nsSelectsAreaFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsSelectsAreaFrame::BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
|
nsSelectsAreaFrame::BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
nsBlockFrame::BuildDisplayList(aBuilder, aLists);
|
||||||
|
|
||||||
nsListControlFrame* listFrame = GetEnclosingListFrame(this);
|
nsListControlFrame* listFrame = GetEnclosingListFrame(this);
|
||||||
if (listFrame && listFrame->IsFocused()) {
|
if (listFrame && listFrame->IsFocused()) {
|
||||||
|
|
|
@ -18,11 +18,9 @@ public:
|
||||||
nsFrameState aFlags);
|
nsFrameState aFlags);
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
void BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists);
|
const nsDisplayListSet& aLists);
|
||||||
|
|
||||||
virtual void Reflow(nsPresContext* aCX,
|
virtual void Reflow(nsPresContext* aCX,
|
||||||
|
|
|
@ -1419,7 +1419,6 @@ nsTextControlFrame::PeekOffset(nsPeekOffsetStruct *aPos)
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTextControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsTextControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -1447,7 +1446,7 @@ nsTextControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
// placeholder has to be visible.
|
// placeholder has to be visible.
|
||||||
if (kid->GetContent() != txtCtrl->GetPlaceholderNode() ||
|
if (kid->GetContent() != txtCtrl->GetPlaceholderNode() ||
|
||||||
txtCtrl->GetPlaceholderVisibility()) {
|
txtCtrl->GetPlaceholderVisibility()) {
|
||||||
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, set, 0);
|
BuildDisplayListForChild(aBuilder, kid, set, 0);
|
||||||
}
|
}
|
||||||
kid = kid->GetNextSibling();
|
kid = kid->GetNextSibling();
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,6 @@ public:
|
||||||
nsFrameList& aChildList) override;
|
nsFrameList& aChildList) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual mozilla::dom::Element*
|
virtual mozilla::dom::Element*
|
||||||
|
|
|
@ -39,7 +39,6 @@ nsBackdropFrame::GetParentStyleContext(nsIFrame** aProviderFrame) const
|
||||||
|
|
||||||
/* virtual */ void
|
/* virtual */ void
|
||||||
nsBackdropFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsBackdropFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsBackdropFrame");
|
DO_GLOBAL_REFLOW_COUNT_DSP("nsBackdropFrame");
|
||||||
|
|
|
@ -27,7 +27,6 @@ public:
|
||||||
virtual nsStyleContext*
|
virtual nsStyleContext*
|
||||||
GetParentStyleContext(nsIFrame** aProviderFrame) const override;
|
GetParentStyleContext(nsIFrame** aProviderFrame) const override;
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
virtual mozilla::LogicalSize
|
virtual mozilla::LogicalSize
|
||||||
ComputeAutoSize(nsRenderingContext* aRenderingContext,
|
ComputeAutoSize(nsRenderingContext* aRenderingContext,
|
||||||
|
|
|
@ -6525,13 +6525,13 @@ static void DebugOutputDrawLine(int32_t aDepth, nsLineBox* aLine, bool aDrawn) {
|
||||||
|
|
||||||
static void
|
static void
|
||||||
DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea,
|
DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea,
|
||||||
const nsRect& aDirtyRect, nsBlockFrame::LineIterator& aLine,
|
nsBlockFrame::LineIterator& aLine,
|
||||||
int32_t aDepth, int32_t& aDrawnLines, const nsDisplayListSet& aLists,
|
int32_t aDepth, int32_t& aDrawnLines, const nsDisplayListSet& aLists,
|
||||||
nsBlockFrame* aFrame, TextOverflow* aTextOverflow) {
|
nsBlockFrame* aFrame, TextOverflow* aTextOverflow) {
|
||||||
// If the line's combined area (which includes child frames that
|
// If the line's combined area (which includes child frames that
|
||||||
// stick outside of the line's bounding box or our bounding box)
|
// stick outside of the line's bounding box or our bounding box)
|
||||||
// intersects the dirty rect then paint the line.
|
// intersects the dirty rect then paint the line.
|
||||||
bool intersect = aLineArea.Intersects(aDirtyRect);
|
bool intersect = aLineArea.Intersects(aBuilder->GetDirtyRect());
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (nsBlockFrame::gLamePaintMetrics) {
|
if (nsBlockFrame::gLamePaintMetrics) {
|
||||||
aDrawnLines++;
|
aDrawnLines++;
|
||||||
|
@ -6554,7 +6554,7 @@ DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea,
|
||||||
// Collect our line's display items in a temporary nsDisplayListCollection,
|
// Collect our line's display items in a temporary nsDisplayListCollection,
|
||||||
// so that we can apply any "text-overflow" clipping to the entire collection
|
// so that we can apply any "text-overflow" clipping to the entire collection
|
||||||
// without affecting previous lines.
|
// without affecting previous lines.
|
||||||
nsDisplayListCollection collection;
|
nsDisplayListCollection collection(aBuilder);
|
||||||
|
|
||||||
// Block-level child backgrounds go on the blockBorderBackgrounds list ...
|
// Block-level child backgrounds go on the blockBorderBackgrounds list ...
|
||||||
// Inline-level child backgrounds go on the regular child content list.
|
// Inline-level child backgrounds go on the regular child content list.
|
||||||
|
@ -6566,8 +6566,7 @@ DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea,
|
||||||
nsIFrame* kid = aLine->mFirstChild;
|
nsIFrame* kid = aLine->mFirstChild;
|
||||||
int32_t n = aLine->GetChildCount();
|
int32_t n = aLine->GetChildCount();
|
||||||
while (--n >= 0) {
|
while (--n >= 0) {
|
||||||
aFrame->BuildDisplayListForChild(aBuilder, kid, aDirtyRect,
|
aFrame->BuildDisplayListForChild(aBuilder, kid, childLists, flags);
|
||||||
childLists, flags);
|
|
||||||
kid = kid->GetNextSibling();
|
kid = kid->GetNextSibling();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6580,13 +6579,13 @@ DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
int32_t drawnLines; // Will only be used if set (gLamePaintMetrics).
|
int32_t drawnLines; // Will only be used if set (gLamePaintMetrics).
|
||||||
int32_t depth = 0;
|
int32_t depth = 0;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (gNoisyDamageRepair) {
|
if (gNoisyDamageRepair) {
|
||||||
|
nsRect dirty = aBuilder->GetDirtyRect();
|
||||||
depth = GetDepth();
|
depth = GetDepth();
|
||||||
nsRect ca;
|
nsRect ca;
|
||||||
::ComputeVisualOverflowArea(mLines, mRect.width, mRect.height, ca);
|
::ComputeVisualOverflowArea(mLines, mRect.width, mRect.height, ca);
|
||||||
|
@ -6594,7 +6593,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
ListTag(stdout);
|
ListTag(stdout);
|
||||||
printf(": bounds=%d,%d,%d,%d dirty(absolute)=%d,%d,%d,%d ca=%d,%d,%d,%d\n",
|
printf(": bounds=%d,%d,%d,%d dirty(absolute)=%d,%d,%d,%d ca=%d,%d,%d,%d\n",
|
||||||
mRect.x, mRect.y, mRect.width, mRect.height,
|
mRect.x, mRect.y, mRect.width, mRect.height,
|
||||||
aDirtyRect.x, aDirtyRect.y, aDirtyRect.width, aDirtyRect.height,
|
dirty.x, dirty.y, dirty.width, dirty.height,
|
||||||
ca.x, ca.y, ca.width, ca.height);
|
ca.x, ca.y, ca.width, ca.height);
|
||||||
}
|
}
|
||||||
PRTime start = 0; // Initialize these variables to silence the compiler.
|
PRTime start = 0; // Initialize these variables to silence the compiler.
|
||||||
|
@ -6607,21 +6606,21 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||||
|
|
||||||
if (GetPrevInFlow()) {
|
if (GetPrevInFlow()) {
|
||||||
DisplayOverflowContainers(aBuilder, aDirtyRect, aLists);
|
DisplayOverflowContainers(aBuilder, aLists);
|
||||||
for (nsIFrame* f : mFloats) {
|
for (nsIFrame* f : mFloats) {
|
||||||
if (f->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT)
|
if (f->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT)
|
||||||
BuildDisplayListForChild(aBuilder, f, aDirtyRect, aLists);
|
BuildDisplayListForChild(aBuilder, f, aLists);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
aBuilder->MarkFramesForDisplayList(this, mFloats, aDirtyRect);
|
aBuilder->MarkFramesForDisplayList(this, mFloats);
|
||||||
|
|
||||||
// Prepare for text-overflow processing.
|
// Prepare for text-overflow processing.
|
||||||
UniquePtr<TextOverflow> textOverflow(
|
UniquePtr<TextOverflow> textOverflow(
|
||||||
TextOverflow::WillProcessLines(aBuilder, this));
|
TextOverflow::WillProcessLines(aBuilder, this));
|
||||||
|
|
||||||
// We'll collect our lines' display items here, & then append this to aLists.
|
// We'll collect our lines' display items here, & then append this to aLists.
|
||||||
nsDisplayListCollection linesDisplayListCollection;
|
nsDisplayListCollection linesDisplayListCollection(aBuilder);
|
||||||
|
|
||||||
// Don't use the line cursor if we might have a descendant placeholder ...
|
// Don't use the line cursor if we might have a descendant placeholder ...
|
||||||
// it might skip lines that contain placeholders but don't themselves
|
// it might skip lines that contain placeholders but don't themselves
|
||||||
|
@ -6631,7 +6630,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
// approximate it by checking it on |this|; if it's true for any
|
// approximate it by checking it on |this|; if it's true for any
|
||||||
// frame in our child list, it's also true for |this|.
|
// frame in our child list, it's also true for |this|.
|
||||||
nsLineBox* cursor = aBuilder->ShouldDescendIntoFrame(this) ?
|
nsLineBox* cursor = aBuilder->ShouldDescendIntoFrame(this) ?
|
||||||
nullptr : GetFirstLineContaining(aDirtyRect.y);
|
nullptr : GetFirstLineContaining(aBuilder->GetDirtyRect().y);
|
||||||
LineIterator line_end = LinesEnd();
|
LineIterator line_end = LinesEnd();
|
||||||
|
|
||||||
if (cursor) {
|
if (cursor) {
|
||||||
|
@ -6642,10 +6641,10 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
if (!lineArea.IsEmpty()) {
|
if (!lineArea.IsEmpty()) {
|
||||||
// Because we have a cursor, the combinedArea.ys are non-decreasing.
|
// Because we have a cursor, the combinedArea.ys are non-decreasing.
|
||||||
// Once we've passed aDirtyRect.YMost(), we can never see it again.
|
// Once we've passed aDirtyRect.YMost(), we can never see it again.
|
||||||
if (lineArea.y >= aDirtyRect.YMost()) {
|
if (lineArea.y >= aBuilder->GetDirtyRect().YMost()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DisplayLine(aBuilder, lineArea, aDirtyRect, line, depth, drawnLines,
|
DisplayLine(aBuilder, lineArea, line, depth, drawnLines,
|
||||||
linesDisplayListCollection, this, textOverflow.get());
|
linesDisplayListCollection, this, textOverflow.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6658,7 +6657,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
line != line_end;
|
line != line_end;
|
||||||
++line) {
|
++line) {
|
||||||
nsRect lineArea = line->GetVisualOverflowArea();
|
nsRect lineArea = line->GetVisualOverflowArea();
|
||||||
DisplayLine(aBuilder, lineArea, aDirtyRect, line, depth, drawnLines,
|
DisplayLine(aBuilder, lineArea, line, depth, drawnLines,
|
||||||
linesDisplayListCollection, this, textOverflow.get());
|
linesDisplayListCollection, this, textOverflow.get());
|
||||||
if (!lineArea.IsEmpty()) {
|
if (!lineArea.IsEmpty()) {
|
||||||
if (lineArea.y < lastY
|
if (lineArea.y < lastY
|
||||||
|
@ -6688,7 +6687,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
if (HasOutsideBullet()) {
|
if (HasOutsideBullet()) {
|
||||||
// Display outside bullets manually
|
// Display outside bullets manually
|
||||||
nsIFrame* bullet = GetOutsideBullet();
|
nsIFrame* bullet = GetOutsideBullet();
|
||||||
BuildDisplayListForChild(aBuilder, bullet, aDirtyRect, aLists);
|
BuildDisplayListForChild(aBuilder, bullet, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
|
@ -139,7 +139,6 @@ public:
|
||||||
virtual nsSplittableType GetSplittableType() const override;
|
virtual nsSplittableType GetSplittableType() const override;
|
||||||
virtual bool IsFloatContainingBlock() const override;
|
virtual bool IsFloatContainingBlock() const override;
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
virtual nsIAtom* GetType() const override;
|
virtual nsIAtom* GetType() const override;
|
||||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||||
|
|
|
@ -274,7 +274,6 @@ void nsDisplayBullet::Paint(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsBulletFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsBulletFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
if (!IsVisibleForPainting(aBuilder))
|
if (!IsVisibleForPainting(aBuilder))
|
||||||
|
|
|
@ -68,7 +68,6 @@ public:
|
||||||
// nsIFrame
|
// nsIFrame
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
|
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
virtual nsIAtom* GetType() const override;
|
virtual nsIAtom* GetType() const override;
|
||||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) override;
|
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) override;
|
||||||
|
|
|
@ -410,11 +410,10 @@ public:
|
||||||
|
|
||||||
void
|
void
|
||||||
nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
if (GetPrevInFlow()) {
|
if (GetPrevInFlow()) {
|
||||||
DisplayOverflowContainers(aBuilder, aDirtyRect, aLists);
|
DisplayOverflowContainers(aBuilder, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Force a background to be shown. We may have a background propagated to us,
|
// Force a background to be shown. We may have a background propagated to us,
|
||||||
|
@ -488,7 +487,7 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
for (nsIFrame* kid : PrincipalChildList()) {
|
for (nsIFrame* kid : PrincipalChildList()) {
|
||||||
// Put our child into its own pseudo-stack.
|
// Put our child into its own pseudo-stack.
|
||||||
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
BuildDisplayListForChild(aBuilder, kid, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_CANVAS_FOCUS
|
#ifdef DEBUG_CANVAS_FOCUS
|
||||||
|
@ -504,7 +503,7 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
docShell->GetHasFocus(&hasFocus);
|
docShell->GetHasFocus(&hasFocus);
|
||||||
printf("%p - nsCanvasFrame::Paint R:%d,%d,%d,%d DR: %d,%d,%d,%d\n", this,
|
printf("%p - nsCanvasFrame::Paint R:%d,%d,%d,%d DR: %d,%d,%d,%d\n", this,
|
||||||
mRect.x, mRect.y, mRect.width, mRect.height,
|
mRect.x, mRect.y, mRect.width, mRect.height,
|
||||||
aDirtyRect.x, aDirtyRect.y, aDirtyRect.width, aDirtyRect.height);
|
dirty.x, dirty.y, dirty.width, dirty.height);
|
||||||
}
|
}
|
||||||
printf("%p - Focus: %s c: %p DoPaint:%s\n", docShell.get(), hasFocus?"Y":"N",
|
printf("%p - Focus: %s c: %p DoPaint:%s\n", docShell.get(), hasFocus?"Y":"N",
|
||||||
focusContent.get(), mDoPaintFocus?"Y":"N");
|
focusContent.get(), mDoPaintFocus?"Y":"N");
|
||||||
|
|
|
@ -107,7 +107,6 @@ public:
|
||||||
NS_IMETHOD SetHasFocus(bool aHasFocus);
|
NS_IMETHOD SetHasFocus(bool aHasFocus);
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
void PaintFocus(mozilla::gfx::DrawTarget* aRenderingContext, nsPoint aPt);
|
void PaintFocus(mozilla::gfx::DrawTarget* aRenderingContext, nsPoint aPt);
|
||||||
|
|
|
@ -1115,7 +1115,6 @@ nsColumnSetFrame::Reflow(nsPresContext* aPresContext,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||||
|
@ -1128,7 +1127,7 @@ nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
// Our children won't have backgrounds so it doesn't matter where we put them.
|
// Our children won't have backgrounds so it doesn't matter where we put them.
|
||||||
for (nsFrameList::Enumerator e(mFrames); !e.AtEnd(); e.Next()) {
|
for (nsFrameList::Enumerator e(mFrames); !e.AtEnd(); e.Next()) {
|
||||||
BuildDisplayListForChild(aBuilder, e.get(), aDirtyRect, aLists);
|
BuildDisplayListForChild(aBuilder, e.get(), aLists);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual nsIAtom* GetType() const override;
|
virtual nsIAtom* GetType() const override;
|
||||||
|
|
|
@ -331,17 +331,15 @@ nsContainerFrame::GetChildLists(nsTArray<ChildList>* aLists) const
|
||||||
|
|
||||||
void
|
void
|
||||||
nsContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||||
|
|
||||||
BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists);
|
BuildDisplayListForNonBlockChildren(aBuilder, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsContainerFrame::BuildDisplayListForNonBlockChildren(nsDisplayListBuilder* aBuilder,
|
nsContainerFrame::BuildDisplayListForNonBlockChildren(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists,
|
const nsDisplayListSet& aLists,
|
||||||
uint32_t aFlags)
|
uint32_t aFlags)
|
||||||
{
|
{
|
||||||
|
@ -350,7 +348,7 @@ nsContainerFrame::BuildDisplayListForNonBlockChildren(nsDisplayListBuilder* aB
|
||||||
nsDisplayListSet set(aLists, aLists.Content());
|
nsDisplayListSet set(aLists, aLists.Content());
|
||||||
// The children should be in content order
|
// The children should be in content order
|
||||||
while (kid) {
|
while (kid) {
|
||||||
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, set, aFlags);
|
BuildDisplayListForChild(aBuilder, kid, set, aFlags);
|
||||||
kid = kid->GetNextSibling();
|
kid = kid->GetNextSibling();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1340,13 +1338,12 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres
|
||||||
|
|
||||||
void
|
void
|
||||||
nsContainerFrame::DisplayOverflowContainers(nsDisplayListBuilder* aBuilder,
|
nsContainerFrame::DisplayOverflowContainers(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
nsFrameList* overflowconts = GetPropTableFrames(OverflowContainersProperty());
|
nsFrameList* overflowconts = GetPropTableFrames(OverflowContainersProperty());
|
||||||
if (overflowconts) {
|
if (overflowconts) {
|
||||||
for (nsIFrame* frame : *overflowconts) {
|
for (nsIFrame* frame : *overflowconts) {
|
||||||
BuildDisplayListForChild(aBuilder, frame, aDirtyRect, aLists);
|
BuildDisplayListForChild(aBuilder, frame, aLists);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -437,7 +437,6 @@ public:
|
||||||
* Add overflow containers to the display list
|
* Add overflow containers to the display list
|
||||||
*/
|
*/
|
||||||
void DisplayOverflowContainers(nsDisplayListBuilder* aBuilder,
|
void DisplayOverflowContainers(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists);
|
const nsDisplayListSet& aLists);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -450,7 +449,6 @@ public:
|
||||||
* to emulate what nsContainerFrame::Paint did.
|
* to emulate what nsContainerFrame::Paint did.
|
||||||
*/
|
*/
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
static void PlaceFrameView(nsIFrame* aFrame)
|
static void PlaceFrameView(nsIFrame* aFrame)
|
||||||
|
@ -576,7 +574,6 @@ protected:
|
||||||
* display items) go into the Content() list.
|
* display items) go into the Content() list.
|
||||||
*/
|
*/
|
||||||
void BuildDisplayListForNonBlockChildren(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayListForNonBlockChildren(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists,
|
const nsDisplayListSet& aLists,
|
||||||
uint32_t aFlags = 0);
|
uint32_t aFlags = 0);
|
||||||
|
|
||||||
|
@ -585,11 +582,9 @@ protected:
|
||||||
* Intended as a convenience for derived classes.
|
* Intended as a convenience for derived classes.
|
||||||
*/
|
*/
|
||||||
void BuildDisplayListForInline(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayListForInline(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) {
|
const nsDisplayListSet& aLists) {
|
||||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||||
BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists,
|
BuildDisplayListForNonBlockChildren(aBuilder, aLists, DISPLAY_CHILD_INLINE);
|
||||||
DISPLAY_CHILD_INLINE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,10 +50,9 @@ nsFirstLetterFrame::GetType() const
|
||||||
|
|
||||||
void
|
void
|
||||||
nsFirstLetterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsFirstLetterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
BuildDisplayListForInline(aBuilder, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -20,7 +20,6 @@ public:
|
||||||
explicit nsFirstLetterFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
|
explicit nsFirstLetterFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual void Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
|
|
|
@ -2433,7 +2433,6 @@ GetDisplayFlagsForFlexItem(nsIFrame* aFrame)
|
||||||
|
|
||||||
void
|
void
|
||||||
nsFlexContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsFlexContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
// XXXdholbert hacky temporary band-aid for bug 1059138: Trivially pass this
|
// XXXdholbert hacky temporary band-aid for bug 1059138: Trivially pass this
|
||||||
|
@ -2452,7 +2451,7 @@ nsFlexContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
// the BlockBorderBackgrounds list.
|
// the BlockBorderBackgrounds list.
|
||||||
nsDisplayListSet childLists(aLists, aLists.BlockBorderBackgrounds());
|
nsDisplayListSet childLists(aLists, aLists.BlockBorderBackgrounds());
|
||||||
for (nsIFrame* childFrame : mFrames) {
|
for (nsIFrame* childFrame : mFrames) {
|
||||||
BuildDisplayListForChild(aBuilder, childFrame, aDirtyRect, childLists,
|
BuildDisplayListForChild(aBuilder, childFrame, childLists,
|
||||||
GetDisplayFlagsForFlexItem(childFrame));
|
GetDisplayFlagsForFlexItem(childFrame));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,6 @@ public:
|
||||||
nsIFrame* aPrevInFlow) override;
|
nsIFrame* aPrevInFlow) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
void MarkIntrinsicISizesDirty() override;
|
void MarkIntrinsicISizesDirty() override;
|
||||||
|
|
|
@ -1793,6 +1793,13 @@ void
|
||||||
nsFrame::DisplayOutlineUnconditional(nsDisplayListBuilder* aBuilder,
|
nsFrame::DisplayOutlineUnconditional(nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
|
// Per https://drafts.csswg.org/css-tables-3/#global-style-overrides:
|
||||||
|
// "All css properties of table-column and table-column-group boxes are
|
||||||
|
// ignored, except when explicitly specified by this specification."
|
||||||
|
// CSS outlines fall into this category, so we skip them on these boxes.
|
||||||
|
|
||||||
|
MOZ_ASSERT(GetType() != nsGkAtoms::tableColGroupFrame && GetType() != nsGkAtoms::tableColFrame);
|
||||||
|
|
||||||
if (StyleOutline()->mOutlineStyle == NS_STYLE_BORDER_STYLE_NONE) {
|
if (StyleOutline()->mOutlineStyle == NS_STYLE_BORDER_STYLE_NONE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1813,7 +1820,7 @@ nsFrame::DisplayOutline(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsIFrame::DisplayCaret(nsDisplayListBuilder* aBuilder,
|
nsIFrame::DisplayCaret(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect, nsDisplayList* aList)
|
nsDisplayList* aList)
|
||||||
{
|
{
|
||||||
if (!IsVisibleForPainting(aBuilder))
|
if (!IsVisibleForPainting(aBuilder))
|
||||||
return;
|
return;
|
||||||
|
@ -1839,7 +1846,9 @@ nsFrame::DisplayBackgroundUnconditional(nsDisplayListBuilder* aBuilder,
|
||||||
if (aBuilder->IsForEventDelivery() || aForceBackground ||
|
if (aBuilder->IsForEventDelivery() || aForceBackground ||
|
||||||
!StyleBackground()->IsTransparent() || StyleDisplay()->mAppearance) {
|
!StyleBackground()->IsTransparent() || StyleDisplay()->mAppearance) {
|
||||||
return nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
return nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
||||||
aBuilder, this, GetRectRelativeToSelf(), aLists.BorderBackground());
|
aBuilder, this,
|
||||||
|
GetRectRelativeToSelf() + aBuilder->ToReferenceFrame(this),
|
||||||
|
aLists.BorderBackground());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1872,7 +1881,9 @@ nsFrame::DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
// If there's a themed background, we should not create a border item.
|
// If there's a themed background, we should not create a border item.
|
||||||
// It won't be rendered.
|
// It won't be rendered.
|
||||||
if (!bgIsThemed && StyleBorder()->HasBorder()) {
|
// Don't paint borders for tables here, since they paint them in a different
|
||||||
|
// order.
|
||||||
|
if (!bgIsThemed && StyleBorder()->HasBorder() && GetType() != nsGkAtoms::tableFrame) {
|
||||||
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
|
||||||
nsDisplayBorder(aBuilder, this));
|
nsDisplayBorder(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
@ -2072,13 +2083,12 @@ ItemParticipatesIn3DContext(nsIFrame* aAncestor, nsDisplayItem* aItem)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
WrapSeparatorTransform(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
WrapSeparatorTransform(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||||
nsRect& aDirtyRect,
|
|
||||||
nsDisplayList* aSource, nsDisplayList* aTarget,
|
nsDisplayList* aSource, nsDisplayList* aTarget,
|
||||||
int aIndex) {
|
int aIndex) {
|
||||||
if (!aSource->IsEmpty()) {
|
if (!aSource->IsEmpty()) {
|
||||||
nsDisplayTransform *sepIdItem =
|
nsDisplayTransform *sepIdItem =
|
||||||
new (aBuilder) nsDisplayTransform(aBuilder, aFrame, aSource,
|
new (aBuilder) nsDisplayTransform(aBuilder, aFrame, aSource,
|
||||||
aDirtyRect, Matrix4x4(), aIndex);
|
aBuilder->GetDirtyRect(), Matrix4x4(), aIndex);
|
||||||
sepIdItem->SetNoExtendContext();
|
sepIdItem->SetNoExtendContext();
|
||||||
aTarget->AppendToTop(sepIdItem);
|
aTarget->AppendToTop(sepIdItem);
|
||||||
}
|
}
|
||||||
|
@ -2086,7 +2096,6 @@ WrapSeparatorTransform(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
nsDisplayList* aList) {
|
nsDisplayList* aList) {
|
||||||
if (GetStateBits() & NS_FRAME_TOO_DEEP_IN_FRAME_TREE)
|
if (GetStateBits() & NS_FRAME_TOO_DEEP_IN_FRAME_TREE)
|
||||||
return;
|
return;
|
||||||
|
@ -2122,25 +2131,27 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
aBuilder->AddToWillChangeBudget(this, GetSize());
|
aBuilder->AddToWillChangeBudget(this, GetSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool extend3DContext = Extend3DContext();
|
const bool isTransformed = IsTransformed();
|
||||||
|
const bool hasPerspective = isTransformed && HasPerspective();
|
||||||
|
const bool extend3DContext = Extend3DContext();
|
||||||
|
const bool combines3DTransformWithAncestors =
|
||||||
|
(extend3DContext || isTransformed) && Combines3DTransformWithAncestors();
|
||||||
|
const bool childrenHavePerspective = ChildrenHavePerspective();
|
||||||
Maybe<nsDisplayListBuilder::AutoPreserves3DContext> autoPreserves3DContext;
|
Maybe<nsDisplayListBuilder::AutoPreserves3DContext> autoPreserves3DContext;
|
||||||
if (extend3DContext && !Combines3DTransformWithAncestors()) {
|
if (extend3DContext && !combines3DTransformWithAncestors) {
|
||||||
// Start a new preserves3d context to keep informations on
|
// Start a new preserves3d context to keep informations on
|
||||||
// nsDisplayListBuilder.
|
// nsDisplayListBuilder.
|
||||||
autoPreserves3DContext.emplace(aBuilder);
|
autoPreserves3DContext.emplace(aBuilder);
|
||||||
// Save dirty rect on the builder to avoid being distorted for
|
// Save dirty rect on the builder to avoid being distorted for
|
||||||
// multiple transforms along the chain.
|
// multiple transforms along the chain.
|
||||||
aBuilder->SetPreserves3DDirtyRect(aDirtyRect);
|
aBuilder->SavePreserves3DRects();
|
||||||
}
|
}
|
||||||
|
|
||||||
// For preserves3d, use the dirty rect already installed on the
|
// For preserves3d, use the dirty rect already installed on the
|
||||||
// builder, since aDirtyRect maybe distorted for transforms along
|
// builder, since aDirtyRect maybe distorted for transforms along
|
||||||
// the chain.
|
// the chain.
|
||||||
nsRect dirtyRect = aDirtyRect;
|
nsRect dirtyRect = aBuilder->GetDirtyRect();
|
||||||
|
|
||||||
bool inTransform = aBuilder->IsInTransform();
|
|
||||||
bool isTransformed = IsTransformed();
|
|
||||||
bool hasPerspective = HasPerspective();
|
|
||||||
// reset blend mode so we can keep track if this stacking context needs have
|
// reset blend mode so we can keep track if this stacking context needs have
|
||||||
// a nsDisplayBlendContainer. Set the blend mode back when the routine exits
|
// a nsDisplayBlendContainer. Set the blend mode back when the routine exits
|
||||||
// so we keep track if the parent stacking context needs a container too.
|
// so we keep track if the parent stacking context needs a container too.
|
||||||
|
@ -2148,6 +2159,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
aBuilder->SetContainsBlendMode(false);
|
aBuilder->SetContainsBlendMode(false);
|
||||||
|
|
||||||
nsRect dirtyRectOutsideTransform = dirtyRect;
|
nsRect dirtyRectOutsideTransform = dirtyRect;
|
||||||
|
bool inTransform = aBuilder->IsInTransform();
|
||||||
if (isTransformed) {
|
if (isTransformed) {
|
||||||
const nsRect overflow = GetVisualOverflowRectRelativeToSelf();
|
const nsRect overflow = GetVisualOverflowRectRelativeToSelf();
|
||||||
if (nsDisplayTransform::ShouldPrerenderTransformedContent(aBuilder,
|
if (nsDisplayTransform::ShouldPrerenderTransformedContent(aBuilder,
|
||||||
|
@ -2160,8 +2172,8 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
// If we're in preserve-3d then grab the dirty rect that was given to the root
|
// If we're in preserve-3d then grab the dirty rect that was given to the root
|
||||||
// and transform using the combined transform.
|
// and transform using the combined transform.
|
||||||
if (Combines3DTransformWithAncestors()) {
|
if (combines3DTransformWithAncestors) {
|
||||||
dirtyRect = aBuilder->GetPreserves3DDirtyRect(this);
|
dirtyRect = aBuilder->GetPreserves3DRects();
|
||||||
}
|
}
|
||||||
|
|
||||||
nsRect untransformedDirtyRect;
|
nsRect untransformedDirtyRect;
|
||||||
|
@ -2269,19 +2281,19 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
clipState.EnterStackingContextContents(clearClip);
|
clipState.EnterStackingContextContents(clearClip);
|
||||||
|
|
||||||
nsDisplayListCollection set;
|
nsDisplayListCollection set(aBuilder);
|
||||||
{
|
{
|
||||||
DisplayListClipState::AutoSaveRestore nestedClipState(aBuilder);
|
DisplayListClipState::AutoSaveRestore nestedClipState(aBuilder);
|
||||||
nsDisplayListBuilder::AutoInTransformSetter
|
nsDisplayListBuilder::AutoInTransformSetter
|
||||||
inTransformSetter(aBuilder, inTransform);
|
inTransformSetter(aBuilder, inTransform);
|
||||||
nsDisplayListBuilder::AutoSaveRestorePerspectiveIndex
|
nsDisplayListBuilder::AutoSaveRestorePerspectiveIndex
|
||||||
perspectiveIndex(aBuilder, this);
|
perspectiveIndex(aBuilder, childrenHavePerspective);
|
||||||
|
|
||||||
CheckForApzAwareEventHandlers(aBuilder, this);
|
CheckForApzAwareEventHandlers(aBuilder, this);
|
||||||
|
|
||||||
Maybe<nsRect> clipPropClip = GetClipPropClipRect(disp, effects, GetSize());
|
Maybe<nsRect> clipPropClip = GetClipPropClipRect(disp, effects, GetSize());
|
||||||
if (clipPropClip) {
|
if (clipPropClip) {
|
||||||
dirtyRect.IntersectRect(dirtyRect, *clipPropClip);
|
aBuilder->IntersectDirtyRect(*clipPropClip);
|
||||||
nestedClipState.ClipContentDescendants(
|
nestedClipState.ClipContentDescendants(
|
||||||
*clipPropClip + aBuilder->ToReferenceFrame(this));
|
*clipPropClip + aBuilder->ToReferenceFrame(this));
|
||||||
}
|
}
|
||||||
|
@ -2294,7 +2306,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
aBuilder->MarkPreserve3DFramesForDisplayList(this);
|
aBuilder->MarkPreserve3DFramesForDisplayList(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
MarkAbsoluteFramesForDisplayList(aBuilder, dirtyRect);
|
MarkAbsoluteFramesForDisplayList(aBuilder);
|
||||||
|
|
||||||
nsDisplayLayerEventRegions* eventRegions = nullptr;
|
nsDisplayLayerEventRegions* eventRegions = nullptr;
|
||||||
if (aBuilder->IsBuildingLayerEventRegions()) {
|
if (aBuilder->IsBuildingLayerEventRegions()) {
|
||||||
|
@ -2303,7 +2315,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
aBuilder->SetLayerEventRegions(eventRegions);
|
aBuilder->SetLayerEventRegions(eventRegions);
|
||||||
}
|
}
|
||||||
aBuilder->AdjustWindowDraggingRegion(this);
|
aBuilder->AdjustWindowDraggingRegion(this);
|
||||||
BuildDisplayList(aBuilder, dirtyRect, set);
|
BuildDisplayList(aBuilder, set);
|
||||||
if (eventRegions) {
|
if (eventRegions) {
|
||||||
// If the event regions item ended up empty, throw it away rather than
|
// If the event regions item ended up empty, throw it away rather than
|
||||||
// adding it to the display list.
|
// adding it to the display list.
|
||||||
|
@ -2409,7 +2421,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
clipState.ExitStackingContextContents(&containerItemScrollClip);
|
clipState.ExitStackingContextContents(&containerItemScrollClip);
|
||||||
}
|
}
|
||||||
// Revert to the post-filter dirty rect.
|
// Revert to the post-filter dirty rect.
|
||||||
buildingDisplayList.SetDirtyRect(dirtyRectOutsideSVGEffects);
|
aBuilder->SetDirtyRect(dirtyRectOutsideSVGEffects);
|
||||||
|
|
||||||
// Skip all filter effects while generating glyph mask.
|
// Skip all filter effects while generating glyph mask.
|
||||||
if (usingFilter && !aBuilder->IsForGenerateGlyphMask()) {
|
if (usingFilter && !aBuilder->IsForGenerateGlyphMask()) {
|
||||||
|
@ -2474,8 +2486,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
while (nsDisplayItem* item = resultList.RemoveBottom()) {
|
while (nsDisplayItem* item = resultList.RemoveBottom()) {
|
||||||
if (ItemParticipatesIn3DContext(this, item) && !item->GetClip().HasClip()) {
|
if (ItemParticipatesIn3DContext(this, item) && !item->GetClip().HasClip()) {
|
||||||
// The frame of this item participates the same 3D context.
|
// The frame of this item participates the same 3D context.
|
||||||
WrapSeparatorTransform(aBuilder, this, dirtyRect,
|
WrapSeparatorTransform(aBuilder, this, &nonparticipants, &participants, index++);
|
||||||
&nonparticipants, &participants, index++);
|
|
||||||
participants.AppendToTop(item);
|
participants.AppendToTop(item);
|
||||||
} else {
|
} else {
|
||||||
// The frame of the item doesn't participate the current
|
// The frame of the item doesn't participate the current
|
||||||
|
@ -2488,8 +2499,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
nonparticipants.AppendToTop(item);
|
nonparticipants.AppendToTop(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WrapSeparatorTransform(aBuilder, this, dirtyRect,
|
WrapSeparatorTransform(aBuilder, this, &nonparticipants, &participants, index++);
|
||||||
&nonparticipants, &participants, index++);
|
|
||||||
resultList.AppendToTop(&participants);
|
resultList.AppendToTop(&participants);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2500,7 +2510,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
// Revert to the dirtyrect coming in from the parent, without our transform
|
// Revert to the dirtyrect coming in from the parent, without our transform
|
||||||
// taken into account.
|
// taken into account.
|
||||||
buildingDisplayList.SetDirtyRect(dirtyRectOutsideTransform);
|
aBuilder->SetDirtyRect(dirtyRectOutsideTransform);
|
||||||
// Revert to the outer reference frame and offset because all display
|
// Revert to the outer reference frame and offset because all display
|
||||||
// items we create from now on are outside the transform.
|
// items we create from now on are outside the transform.
|
||||||
nsPoint toOuterReferenceFrame;
|
nsPoint toOuterReferenceFrame;
|
||||||
|
@ -2601,10 +2611,63 @@ WrapInWrapList(nsDisplayListBuilder* aBuilder,
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool DescendIntoChild(nsDisplayListBuilder* aBuilder,
|
||||||
|
const nsIFrame* aChild, const nsRect& aDirty) {
|
||||||
|
if (aChild->GetStateBits() & NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the child is a scrollframe that we want to ignore, then we need
|
||||||
|
// to descend into it because its scrolled child may intersect the dirty
|
||||||
|
// area even if the scrollframe itself doesn't.
|
||||||
|
if (aChild == aBuilder->GetIgnoreScrollFrame()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// There are cases where the "ignore scroll frame" on the builder is not set
|
||||||
|
// correctly, and so we additionally want to catch cases where the child is
|
||||||
|
// a root scrollframe and we are ignoring scrolling on the viewport.
|
||||||
|
if (aChild == aBuilder->GetPresShellIgnoreScrollFrame()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const nsRect overflow = aChild->GetVisualOverflowRect();
|
||||||
|
|
||||||
|
if (aDirty.Intersects(overflow)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (aChild->IsFrameOfType(nsIFrame::eTablePart)) {
|
||||||
|
// Relative positioning and transforms can cause table parts to move, but we
|
||||||
|
// will still paint the backgrounds for their ancestor parts under them at
|
||||||
|
// their 'normal' position. That means that we must consider the overflow
|
||||||
|
// rects at both positions.
|
||||||
|
|
||||||
|
// We convert the overflow rect into the nsTableFrame's coordinate
|
||||||
|
// space, applying the normal position offset at each step. Then we
|
||||||
|
// compare that against the builder's cached dirty rect in table
|
||||||
|
// coordinate space.
|
||||||
|
const nsIFrame* f = aChild;
|
||||||
|
nsRect normalPositionOverflowRelativeToTable = overflow;
|
||||||
|
|
||||||
|
while (f->IsFrameOfType(nsIFrame::eTablePart)) {
|
||||||
|
normalPositionOverflowRelativeToTable += f->GetNormalPosition();
|
||||||
|
f = f->GetParent();
|
||||||
|
}
|
||||||
|
|
||||||
|
nsDisplayTableBackgroundSet* tableBGs = aBuilder->GetTableBackgroundSet();
|
||||||
|
if (tableBGs &&
|
||||||
|
tableBGs->GetDirtyRect().Intersects(normalPositionOverflowRelativeToTable)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||||
nsIFrame* aChild,
|
nsIFrame* aChild,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists,
|
const nsDisplayListSet& aLists,
|
||||||
uint32_t aFlags) {
|
uint32_t aFlags) {
|
||||||
// If painting is restricted to just the background of the top level frame,
|
// If painting is restricted to just the background of the top level frame,
|
||||||
|
@ -2623,12 +2686,13 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||||
if (child->GetStateBits() & NS_FRAME_TOO_DEEP_IN_FRAME_TREE)
|
if (child->GetStateBits() & NS_FRAME_TOO_DEEP_IN_FRAME_TREE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool isSVG = (child->GetStateBits() & NS_FRAME_SVG_LAYOUT);
|
const bool isSVG = child->GetStateBits() & NS_FRAME_SVG_LAYOUT;
|
||||||
|
|
||||||
// true if this is a real or pseudo stacking context
|
// true if this is a real or pseudo stacking context
|
||||||
bool pseudoStackingContext =
|
bool pseudoStackingContext =
|
||||||
(aFlags & DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT) != 0;
|
(aFlags & DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT) != 0;
|
||||||
if (!isSVG &&
|
if (!pseudoStackingContext &&
|
||||||
|
!isSVG &&
|
||||||
(aFlags & DISPLAY_CHILD_INLINE) &&
|
(aFlags & DISPLAY_CHILD_INLINE) &&
|
||||||
!child->IsFrameOfType(eLineParticipant)) {
|
!child->IsFrameOfType(eLineParticipant)) {
|
||||||
// child is a non-inline frame in an inline context, i.e.,
|
// child is a non-inline frame in an inline context, i.e.,
|
||||||
|
@ -2637,12 +2701,14 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||||
pseudoStackingContext = true;
|
pseudoStackingContext = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// dirty rect in child-relative coordinates
|
|
||||||
nsRect dirty = aDirtyRect - child->GetOffsetTo(this);
|
|
||||||
|
|
||||||
nsIAtom* childType = child->GetType();
|
nsIAtom* childType = child->GetType();
|
||||||
nsDisplayListBuilder::OutOfFlowDisplayData* savedOutOfFlowData = nullptr;
|
nsDisplayListBuilder::OutOfFlowDisplayData* savedOutOfFlowData = nullptr;
|
||||||
bool isPlaceholder = false;
|
bool isPlaceholder = false;
|
||||||
|
|
||||||
|
// dirty rect in child-relative coordinates
|
||||||
|
NS_ASSERTION(aBuilder->GetCurrentFrame() == this, "Wrong coord space!");
|
||||||
|
nsRect dirty = aBuilder->GetDirtyRect() - child->GetOffsetTo(this);
|
||||||
|
|
||||||
if (childType == nsGkAtoms::placeholderFrame) {
|
if (childType == nsGkAtoms::placeholderFrame) {
|
||||||
isPlaceholder = true;
|
isPlaceholder = true;
|
||||||
nsPlaceholderFrame* placeholder = static_cast<nsPlaceholderFrame*>(child);
|
nsPlaceholderFrame* placeholder = static_cast<nsPlaceholderFrame*>(child);
|
||||||
|
@ -2689,35 +2755,10 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||||
!aChild->IsSelected()) {
|
!aChild->IsSelected()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (aBuilder->GetIncludeAllOutOfFlows() && isPlaceholder) {
|
||||||
if (aBuilder->GetIncludeAllOutOfFlows() &&
|
|
||||||
(child->GetStateBits() & NS_FRAME_OUT_OF_FLOW)) {
|
|
||||||
dirty = child->GetVisualOverflowRect();
|
dirty = child->GetVisualOverflowRect();
|
||||||
} else if (!(child->GetStateBits() & NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO)) {
|
} else if (!DescendIntoChild(aBuilder, child, dirty)) {
|
||||||
// No need to descend into child to catch placeholders for visible
|
|
||||||
// positioned stuff. So see if we can short-circuit frame traversal here.
|
|
||||||
|
|
||||||
// We can stop if child's frame subtree's intersection with the
|
|
||||||
// dirty area is empty.
|
|
||||||
// If the child is a scrollframe that we want to ignore, then we need
|
|
||||||
// to descend into it because its scrolled child may intersect the dirty
|
|
||||||
// area even if the scrollframe itself doesn't.
|
|
||||||
// There are cases where the "ignore scroll frame" on the builder is not set
|
|
||||||
// correctly, and so we additionally want to catch cases where the child is
|
|
||||||
// a root scrollframe and we are ignoring scrolling on the viewport.
|
|
||||||
nsIPresShell* shell = PresContext()->PresShell();
|
|
||||||
bool keepDescending = child == aBuilder->GetIgnoreScrollFrame() ||
|
|
||||||
(shell->IgnoringViewportScrolling() && child == shell->GetRootScrollFrame());
|
|
||||||
if (!keepDescending) {
|
|
||||||
nsRect childDirty;
|
|
||||||
if (!childDirty.IntersectRect(dirty, child->GetVisualOverflowRect()))
|
|
||||||
return;
|
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;
|
|
||||||
// we wouldn't want to clip the dirty area to the scrollframe's
|
|
||||||
// bounds in that case.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX need to have inline-block and inline-table set pseudoStackingContext
|
// XXX need to have inline-block and inline-table set pseudoStackingContext
|
||||||
|
@ -2741,7 +2782,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||||
const nsStyleDisplay* disp = child->StyleDisplay();
|
const nsStyleDisplay* disp = child->StyleDisplay();
|
||||||
const nsStyleEffects* effects = child->StyleEffects();
|
const nsStyleEffects* effects = child->StyleEffects();
|
||||||
const nsStylePosition* pos = child->StylePosition();
|
const nsStylePosition* pos = child->StylePosition();
|
||||||
bool isVisuallyAtomic = child->HasOpacity()
|
const bool isVisuallyAtomic = child->HasOpacity()
|
||||||
|| child->IsTransformed()
|
|| child->IsTransformed()
|
||||||
// strictly speaking, 'perspective' doesn't require visual atomicity,
|
// strictly speaking, 'perspective' doesn't require visual atomicity,
|
||||||
// but the spec says it acts like the rest of these
|
// but the spec says it acts like the rest of these
|
||||||
|
@ -2749,28 +2790,28 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||||
|| effects->mMixBlendMode != NS_STYLE_BLEND_NORMAL
|
|| effects->mMixBlendMode != NS_STYLE_BLEND_NORMAL
|
||||||
|| nsSVGIntegrationUtils::UsingEffectsForFrame(child);
|
|| nsSVGIntegrationUtils::UsingEffectsForFrame(child);
|
||||||
|
|
||||||
bool isPositioned = disp->IsAbsPosContainingBlock(child);
|
const bool isPositioned = disp->IsAbsPosContainingBlock(child);
|
||||||
bool isStackingContext =
|
const bool isStackingContext =
|
||||||
(isPositioned && (disp->IsPositionForcingStackingContext() ||
|
(isPositioned && (disp->IsPositionForcingStackingContext() ||
|
||||||
pos->mZIndex.GetUnit() == eStyleUnit_Integer)) ||
|
pos->mZIndex.GetUnit() == eStyleUnit_Integer)) ||
|
||||||
(disp->mWillChangeBitField & NS_STYLE_WILL_CHANGE_STACKING_CONTEXT) ||
|
(disp->mWillChangeBitField & NS_STYLE_WILL_CHANGE_STACKING_CONTEXT) ||
|
||||||
disp->mIsolation != NS_STYLE_ISOLATION_AUTO ||
|
disp->mIsolation != NS_STYLE_ISOLATION_AUTO ||
|
||||||
isVisuallyAtomic || (aFlags & DISPLAY_CHILD_FORCE_STACKING_CONTEXT);
|
isVisuallyAtomic || (aFlags & DISPLAY_CHILD_FORCE_STACKING_CONTEXT);
|
||||||
|
|
||||||
if (isVisuallyAtomic || isPositioned || (!isSVG && disp->IsFloating(child)) ||
|
if (pseudoStackingContext || isStackingContext || isPositioned ||
|
||||||
((effects->mClipFlags & NS_STYLE_CLIP_RECT) &&
|
(!isSVG && disp->IsFloating(child)) ||
|
||||||
IsSVGContentWithCSSClip(child)) ||
|
(isSVG && (effects->mClipFlags & NS_STYLE_CLIP_RECT) &&
|
||||||
disp->mIsolation != NS_STYLE_ISOLATION_AUTO ||
|
IsSVGContentWithCSSClip(child))) {
|
||||||
(disp->mWillChangeBitField & NS_STYLE_WILL_CHANGE_STACKING_CONTEXT) ||
|
|
||||||
(aFlags & DISPLAY_CHILD_FORCE_STACKING_CONTEXT)) {
|
|
||||||
// If you change this, also change IsPseudoStackingContextFromStyle()
|
// If you change this, also change IsPseudoStackingContextFromStyle()
|
||||||
pseudoStackingContext = true;
|
pseudoStackingContext = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_ASSERTION(!isStackingContext || pseudoStackingContext,
|
NS_ASSERTION(!isStackingContext || pseudoStackingContext,
|
||||||
"Stacking contexts must also be pseudo-stacking-contexts");
|
"Stacking contexts must also be pseudo-stacking-contexts");
|
||||||
|
|
||||||
nsDisplayListBuilder::AutoBuildingDisplayList
|
nsDisplayListBuilder::AutoBuildingDisplayList
|
||||||
buildingForChild(aBuilder, child, dirty, pseudoStackingContext);
|
buildingForChild(aBuilder, child, dirty, pseudoStackingContext);
|
||||||
|
|
||||||
DisplayListClipState::AutoClipMultiple clipState(aBuilder);
|
DisplayListClipState::AutoClipMultiple clipState(aBuilder);
|
||||||
CheckForApzAwareEventHandlers(aBuilder, child);
|
CheckForApzAwareEventHandlers(aBuilder, child);
|
||||||
|
|
||||||
|
@ -2783,7 +2824,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||||
savedOutOfFlowData->mContainingBlockScrollClip);
|
savedOutOfFlowData->mContainingBlockScrollClip);
|
||||||
} else if (GetStateBits() & NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO &&
|
} else if (GetStateBits() & NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO &&
|
||||||
isPlaceholder) {
|
isPlaceholder) {
|
||||||
NS_ASSERTION(dirty.IsEmpty(), "should have empty dirty rect");
|
NS_ASSERTION(dirty.IsEmpty(), "should have empty visible rect");
|
||||||
// Every item we build from now until we descent into an out of flow that
|
// Every item we build from now until we descent into an out of flow that
|
||||||
// does have saved out of flow data should be invisible. This state gets
|
// does have saved out of flow data should be invisible. This state gets
|
||||||
// restored when AutoBuildingDisplayList gets out of scope.
|
// restored when AutoBuildingDisplayList gets out of scope.
|
||||||
|
@ -2819,18 +2860,18 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||||
// True stacking context.
|
// True stacking context.
|
||||||
// For stacking contexts, BuildDisplayListForStackingContext handles
|
// For stacking contexts, BuildDisplayListForStackingContext handles
|
||||||
// clipping and MarkAbsoluteFramesForDisplayList.
|
// clipping and MarkAbsoluteFramesForDisplayList.
|
||||||
child->BuildDisplayListForStackingContext(aBuilder, dirty, &list);
|
child->BuildDisplayListForStackingContext(aBuilder, &list);
|
||||||
aBuilder->DisplayCaret(child, dirty, &list);
|
aBuilder->DisplayCaret(child, &list);
|
||||||
} else {
|
} else {
|
||||||
Maybe<nsRect> clipPropClip =
|
Maybe<nsRect> clipPropClip =
|
||||||
child->GetClipPropClipRect(disp, effects, child->GetSize());
|
child->GetClipPropClipRect(disp, effects, child->GetSize());
|
||||||
if (clipPropClip) {
|
if (clipPropClip) {
|
||||||
dirty.IntersectRect(dirty, *clipPropClip);
|
aBuilder->IntersectDirtyRect(*clipPropClip);
|
||||||
clipState.ClipContentDescendants(
|
clipState.ClipContentDescendants(
|
||||||
*clipPropClip + aBuilder->ToReferenceFrame(child));
|
*clipPropClip + aBuilder->ToReferenceFrame(child));
|
||||||
}
|
}
|
||||||
|
|
||||||
child->MarkAbsoluteFramesForDisplayList(aBuilder, dirty);
|
child->MarkAbsoluteFramesForDisplayList(aBuilder);
|
||||||
|
|
||||||
if (aBuilder->IsBuildingLayerEventRegions()) {
|
if (aBuilder->IsBuildingLayerEventRegions()) {
|
||||||
// If this frame has a different animated geometry root than its parent,
|
// If this frame has a different animated geometry root than its parent,
|
||||||
|
@ -2862,8 +2903,8 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||||
// return early.
|
// return early.
|
||||||
|
|
||||||
aBuilder->AdjustWindowDraggingRegion(child);
|
aBuilder->AdjustWindowDraggingRegion(child);
|
||||||
child->BuildDisplayList(aBuilder, dirty, aLists);
|
child->BuildDisplayList(aBuilder, aLists);
|
||||||
aBuilder->DisplayCaret(child, dirty, aLists.Content());
|
aBuilder->DisplayCaret(child, aLists.Content());
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
DisplayDebugBorders(aBuilder, child, aLists);
|
DisplayDebugBorders(aBuilder, child, aLists);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2874,10 +2915,10 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||||
// We allow positioned descendants of the child to escape to our parent
|
// We allow positioned descendants of the child to escape to our parent
|
||||||
// stacking context's positioned descendant list, because they might be
|
// stacking context's positioned descendant list, because they might be
|
||||||
// z-index:non-auto
|
// z-index:non-auto
|
||||||
nsDisplayListCollection pseudoStack;
|
nsDisplayListCollection pseudoStack(aBuilder);
|
||||||
aBuilder->AdjustWindowDraggingRegion(child);
|
aBuilder->AdjustWindowDraggingRegion(child);
|
||||||
child->BuildDisplayList(aBuilder, dirty, pseudoStack);
|
child->BuildDisplayList(aBuilder, pseudoStack);
|
||||||
aBuilder->DisplayCaret(child, dirty, pseudoStack.Content());
|
aBuilder->DisplayCaret(child, pseudoStack.Content());
|
||||||
|
|
||||||
list.AppendToTop(pseudoStack.BorderBackground());
|
list.AppendToTop(pseudoStack.BorderBackground());
|
||||||
list.AppendToTop(pseudoStack.BlockBorderBackgrounds());
|
list.AppendToTop(pseudoStack.BlockBorderBackgrounds());
|
||||||
|
@ -2927,11 +2968,10 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsIFrame::MarkAbsoluteFramesForDisplayList(nsDisplayListBuilder* aBuilder,
|
nsIFrame::MarkAbsoluteFramesForDisplayList(nsDisplayListBuilder* aBuilder)
|
||||||
const nsRect& aDirtyRect)
|
|
||||||
{
|
{
|
||||||
if (IsAbsoluteContainer()) {
|
if (IsAbsoluteContainer()) {
|
||||||
aBuilder->MarkFramesForDisplayList(this, GetAbsoluteContainingBlock()->GetChildList(), aDirtyRect);
|
aBuilder->MarkFramesForDisplayList(this, GetAbsoluteContainingBlock()->GetChildList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,6 @@ public:
|
||||||
nsIFrame::Cursor& aCursor) override;
|
nsIFrame::Cursor& aCursor) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual void Reflow(nsPresContext* aPresContext,
|
virtual void Reflow(nsPresContext* aPresContext,
|
||||||
|
@ -149,7 +148,6 @@ public:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual void Reflow(nsPresContext* aPresContext,
|
virtual void Reflow(nsPresContext* aPresContext,
|
||||||
|
@ -672,10 +670,9 @@ nsHTMLFramesetFrame::GetCursor(const nsPoint& aPoint,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsHTMLFramesetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsHTMLFramesetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
BuildDisplayListForInline(aBuilder, aLists);
|
||||||
|
|
||||||
if (mDragger && aBuilder->IsForEventDelivery()) {
|
if (mDragger && aBuilder->IsForEventDelivery()) {
|
||||||
aLists.Content()->AppendNewToTop(
|
aLists.Content()->AppendNewToTop(
|
||||||
|
@ -1429,7 +1426,6 @@ void nsDisplayFramesetBorder::Paint(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsHTMLFramesetBorderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsHTMLFramesetBorderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
aLists.Content()->AppendNewToTop(
|
aLists.Content()->AppendNewToTop(
|
||||||
|
@ -1640,7 +1636,6 @@ void nsDisplayFramesetBlank::Paint(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsHTMLFramesetBlankFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsHTMLFramesetBlankFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
aLists.Content()->AppendNewToTop(
|
aLists.Content()->AppendNewToTop(
|
||||||
|
|
|
@ -97,7 +97,6 @@ public:
|
||||||
nsIFrame::Cursor& aCursor) override;
|
nsIFrame::Cursor& aCursor) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual void Reflow(nsPresContext* aPresContext,
|
virtual void Reflow(nsPresContext* aPresContext,
|
||||||
|
|
|
@ -3031,7 +3031,6 @@ struct HoveredStateComparator
|
||||||
|
|
||||||
void
|
void
|
||||||
ScrollFrameHelper::AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
|
ScrollFrameHelper::AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists,
|
const nsDisplayListSet& aLists,
|
||||||
bool aCreateLayer,
|
bool aCreateLayer,
|
||||||
bool aPositioned)
|
bool aPositioned)
|
||||||
|
@ -3093,23 +3092,25 @@ ScrollFrameHelper::AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
|
||||||
// zoomable, and where the scrollbar sizes are bounded by the widget.
|
// zoomable, and where the scrollbar sizes are bounded by the widget.
|
||||||
nsRect dirty = mIsRoot && mOuter->PresContext()->IsRootContentDocument()
|
nsRect dirty = mIsRoot && mOuter->PresContext()->IsRootContentDocument()
|
||||||
? scrollParts[i]->GetVisualOverflowRectRelativeToParent()
|
? scrollParts[i]->GetVisualOverflowRectRelativeToParent()
|
||||||
: aDirtyRect;
|
: aBuilder->GetDirtyRect();
|
||||||
nsDisplayListBuilder::AutoBuildingDisplayList
|
|
||||||
buildingForChild(aBuilder, scrollParts[i],
|
|
||||||
dirty + mOuter->GetOffsetTo(scrollParts[i]), true);
|
|
||||||
|
|
||||||
// Always create layers for overlay scrollbars so that we don't create a
|
// Always create layers for overlay scrollbars so that we don't create a
|
||||||
// giant layer covering the whole scrollport if both scrollbars are visible.
|
// giant layer covering the whole scrollport if both scrollbars are visible.
|
||||||
bool isOverlayScrollbar = (flags != 0) && overlayScrollbars;
|
bool isOverlayScrollbar = (flags != 0) && overlayScrollbars;
|
||||||
bool createLayer = aCreateLayer || isOverlayScrollbar;
|
bool createLayer = aCreateLayer || isOverlayScrollbar;
|
||||||
|
|
||||||
|
nsDisplayListCollection partList(aBuilder);
|
||||||
|
{
|
||||||
|
nsDisplayListBuilder::AutoBuildingDisplayList
|
||||||
|
buildingForChild(aBuilder, mOuter,
|
||||||
|
dirty, true);
|
||||||
|
|
||||||
nsDisplayListBuilder::AutoCurrentScrollbarInfoSetter
|
nsDisplayListBuilder::AutoCurrentScrollbarInfoSetter
|
||||||
infoSetter(aBuilder, scrollTargetId, flags, createLayer);
|
infoSetter(aBuilder, scrollTargetId, flags, createLayer);
|
||||||
nsDisplayListCollection partList;
|
|
||||||
mOuter->BuildDisplayListForChild(
|
mOuter->BuildDisplayListForChild(
|
||||||
aBuilder, scrollParts[i], dirty, partList,
|
aBuilder, scrollParts[i], partList,
|
||||||
nsIFrame::DISPLAY_CHILD_FORCE_STACKING_CONTEXT);
|
nsIFrame::DISPLAY_CHILD_FORCE_STACKING_CONTEXT);
|
||||||
|
}
|
||||||
if (createLayer) {
|
if (createLayer) {
|
||||||
appendToTopFlags |= APPEND_OWN_LAYER;
|
appendToTopFlags |= APPEND_OWN_LAYER;
|
||||||
}
|
}
|
||||||
|
@ -3117,12 +3118,19 @@ ScrollFrameHelper::AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
|
||||||
appendToTopFlags |= APPEND_POSITIONED;
|
appendToTopFlags |= APPEND_POSITIONED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
nsDisplayListBuilder::AutoBuildingDisplayList
|
||||||
|
buildingForChild(aBuilder, scrollParts[i],
|
||||||
|
dirty + mOuter->GetOffsetTo(scrollParts[i]), true);
|
||||||
|
nsDisplayListBuilder::AutoCurrentScrollbarInfoSetter
|
||||||
|
infoSetter(aBuilder, scrollTargetId, flags, createLayer);
|
||||||
// DISPLAY_CHILD_FORCE_STACKING_CONTEXT put everything into
|
// DISPLAY_CHILD_FORCE_STACKING_CONTEXT put everything into
|
||||||
// partList.PositionedDescendants().
|
// partList.PositionedDescendants().
|
||||||
::AppendToTop(aBuilder, aLists,
|
::AppendToTop(aBuilder, aLists,
|
||||||
partList.PositionedDescendants(), scrollParts[i],
|
partList.PositionedDescendants(), scrollParts[i],
|
||||||
appendToTopFlags);
|
appendToTopFlags);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ bool ScrollFrameHelper::sFrameVisPrefsCached = false;
|
/* static */ bool ScrollFrameHelper::sFrameVisPrefsCached = false;
|
||||||
|
@ -3246,7 +3254,6 @@ ClipListsExceptCaret(nsDisplayListCollection* aLists,
|
||||||
|
|
||||||
void
|
void
|
||||||
ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
if (aBuilder->IsForFrameVisibility()) {
|
if (aBuilder->IsForFrameVisibility()) {
|
||||||
|
@ -3283,7 +3290,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
// had dirty rects saved for them by their parent frames calling
|
// had dirty rects saved for them by their parent frames calling
|
||||||
// MarkOutOfFlowChildrenForDisplayList, so it's safe to restrict our
|
// MarkOutOfFlowChildrenForDisplayList, so it's safe to restrict our
|
||||||
// dirty rect here.
|
// dirty rect here.
|
||||||
nsRect dirtyRect = aDirtyRect;
|
nsRect dirtyRect = aBuilder->GetDirtyRect();
|
||||||
if (!ignoringThisScrollFrame) {
|
if (!ignoringThisScrollFrame) {
|
||||||
dirtyRect = dirtyRect.Intersect(mScrollPort);
|
dirtyRect = dirtyRect.Intersect(mScrollPort);
|
||||||
}
|
}
|
||||||
|
@ -3325,20 +3332,20 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
if (addScrollBars) {
|
if (addScrollBars) {
|
||||||
// Add classic scrollbars.
|
// Add classic scrollbars.
|
||||||
AppendScrollPartsTo(aBuilder, aDirtyRect, aLists,
|
AppendScrollPartsTo(aBuilder, aLists, createLayersForScrollbars, false);
|
||||||
createLayersForScrollbars, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nsDisplayListBuilder::AutoBuildingDisplayList
|
||||||
|
building(aBuilder, mOuter, dirtyRect, aBuilder->IsAtRootOfPseudoStackingContext());
|
||||||
|
|
||||||
// Don't clip the scrolled child, and don't paint scrollbars/scrollcorner.
|
// Don't clip the scrolled child, and don't paint scrollbars/scrollcorner.
|
||||||
// The scrolled frame shouldn't have its own background/border, so we
|
// The scrolled frame shouldn't have its own background/border, so we
|
||||||
// can just pass aLists directly.
|
// can just pass aLists directly.
|
||||||
mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame,
|
mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame, aLists);
|
||||||
dirtyRect, aLists);
|
|
||||||
|
|
||||||
if (addScrollBars) {
|
if (addScrollBars) {
|
||||||
// Add overlay scrollbars.
|
// Add overlay scrollbars.
|
||||||
AppendScrollPartsTo(aBuilder, aDirtyRect, aLists,
|
AppendScrollPartsTo(aBuilder, aLists, createLayersForScrollbars, true);
|
||||||
createLayersForScrollbars, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -3376,8 +3383,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
// Note that this does not apply for overlay scrollbars; those are drawn
|
// Note that this does not apply for overlay scrollbars; those are drawn
|
||||||
// in the positioned-elements layer on top of everything else by the call
|
// in the positioned-elements layer on top of everything else by the call
|
||||||
// to AppendScrollPartsTo(..., true) further down.
|
// to AppendScrollPartsTo(..., true) further down.
|
||||||
AppendScrollPartsTo(aBuilder, aDirtyRect, aLists,
|
AppendScrollPartsTo(aBuilder, aLists, createLayersForScrollbars, false);
|
||||||
createLayersForScrollbars, false);
|
|
||||||
|
|
||||||
const nsStyleDisplay* disp = mOuter->StyleDisplay();
|
const nsStyleDisplay* disp = mOuter->StyleDisplay();
|
||||||
if (disp && (disp->mWillChangeBitField & NS_STYLE_WILL_CHANGE_SCROLL)) {
|
if (disp && (disp->mWillChangeBitField & NS_STYLE_WILL_CHANGE_SCROLL)) {
|
||||||
|
@ -3414,7 +3420,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
nsIScrollableFrame* sf = do_QueryFrame(mOuter);
|
nsIScrollableFrame* sf = do_QueryFrame(mOuter);
|
||||||
MOZ_ASSERT(sf);
|
MOZ_ASSERT(sf);
|
||||||
|
|
||||||
nsDisplayListCollection scrolledContent;
|
nsDisplayListCollection scrolledContent(aBuilder);
|
||||||
{
|
{
|
||||||
// Note that setting the current scroll parent id here means that positioned children
|
// Note that setting the current scroll parent id here means that positioned children
|
||||||
// of this scroll info layer will pick up the scroll info layer as their scroll handoff
|
// of this scroll info layer will pick up the scroll info layer as their scroll handoff
|
||||||
|
@ -3506,7 +3512,10 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
scrolledRectClipState.ClipContainingBlockDescendants(
|
scrolledRectClipState.ClipContainingBlockDescendants(
|
||||||
scrolledRectClip + aBuilder->ToReferenceFrame(mOuter));
|
scrolledRectClip + aBuilder->ToReferenceFrame(mOuter));
|
||||||
|
|
||||||
mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame, dirtyRect, scrolledContent);
|
nsDisplayListBuilder::AutoBuildingDisplayList
|
||||||
|
building(aBuilder, mOuter, dirtyRect, aBuilder->IsAtRootOfPseudoStackingContext());
|
||||||
|
|
||||||
|
mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame, scrolledContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (contentBoxClipForNonCaretContent) {
|
if (contentBoxClipForNonCaretContent) {
|
||||||
|
@ -3593,8 +3602,8 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Now display overlay scrollbars and the resizer, if we have one.
|
// Now display overlay scrollbars and the resizer, if we have one.
|
||||||
AppendScrollPartsTo(aBuilder, aDirtyRect, scrolledContent,
|
AppendScrollPartsTo(aBuilder, scrolledContent, createLayersForScrollbars, true);
|
||||||
createLayersForScrollbars, true);
|
|
||||||
scrolledContent.MoveTo(aLists);
|
scrolledContent.MoveTo(aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6175,3 +6184,4 @@ ScrollFrameHelper::UsesContainerScrolling() const
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,11 +70,9 @@ public:
|
||||||
void Destroy();
|
void Destroy();
|
||||||
|
|
||||||
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists);
|
const nsDisplayListSet& aLists);
|
||||||
|
|
||||||
void AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
|
void AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists,
|
const nsDisplayListSet& aLists,
|
||||||
bool aCreateLayer,
|
bool aCreateLayer,
|
||||||
bool aPositioned);
|
bool aPositioned);
|
||||||
|
@ -687,9 +685,8 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override {
|
const nsDisplayListSet& aLists) override {
|
||||||
mHelper.BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
mHelper.BuildDisplayList(aBuilder, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TryLayout(ScrollReflowInput* aState,
|
bool TryLayout(ScrollReflowInput* aState,
|
||||||
|
@ -1105,9 +1102,8 @@ public:
|
||||||
bool aClipAllDescendants);
|
bool aClipAllDescendants);
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override {
|
const nsDisplayListSet& aLists) override {
|
||||||
mHelper.BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
mHelper.BuildDisplayList(aBuilder, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXXldb Is this actually used?
|
// XXXldb Is this actually used?
|
||||||
|
|
|
@ -6643,12 +6643,11 @@ nsGridContainerFrame::GetType() const
|
||||||
|
|
||||||
void
|
void
|
||||||
nsGridContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsGridContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||||
if (GetPrevInFlow()) {
|
if (GetPrevInFlow()) {
|
||||||
DisplayOverflowContainers(aBuilder, aDirtyRect, aLists);
|
DisplayOverflowContainers(aBuilder, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Our children are all grid-level boxes, which behave the same as
|
// Our children are all grid-level boxes, which behave the same as
|
||||||
|
@ -6662,8 +6661,7 @@ nsGridContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
GridItemCSSOrderIterator::eIncludeAll, order);
|
GridItemCSSOrderIterator::eIncludeAll, order);
|
||||||
for (; !iter.AtEnd(); iter.Next()) {
|
for (; !iter.AtEnd(); iter.Next()) {
|
||||||
nsIFrame* child = *iter;
|
nsIFrame* child = *iter;
|
||||||
BuildDisplayListForChild(aBuilder, child, aDirtyRect, aLists,
|
BuildDisplayListForChild(aBuilder, child, aLists, ::GetDisplayFlagsForGridItem(child));
|
||||||
::GetDisplayFlagsForGridItem(child));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
nscoord GetLogicalBaseline(mozilla::WritingMode aWM) const override
|
nscoord GetLogicalBaseline(mozilla::WritingMode aWM) const override
|
||||||
|
|
|
@ -367,7 +367,6 @@ nsHTMLCanvasFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsHTMLCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsHTMLCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
if (!IsVisibleForPainting(aBuilder))
|
if (!IsVisibleForPainting(aBuilder))
|
||||||
|
|
|
@ -45,7 +45,6 @@ public:
|
||||||
nsIFrame* aPrevInFlow) override;
|
nsIFrame* aPrevInFlow) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
|
@ -1451,21 +1451,14 @@ public:
|
||||||
* BuildDisplayListForChild.
|
* BuildDisplayListForChild.
|
||||||
*
|
*
|
||||||
* See nsDisplayList.h for more information about display lists.
|
* See nsDisplayList.h for more information about display lists.
|
||||||
*
|
|
||||||
* @param aDirtyRect content outside this rectangle can be ignored; the
|
|
||||||
* rectangle is in frame coordinates
|
|
||||||
*/
|
*/
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) {}
|
const nsDisplayListSet& aLists) {}
|
||||||
/**
|
/**
|
||||||
* Displays the caret onto the given display list builder. The caret is
|
* Displays the caret onto the given display list builder. The caret is
|
||||||
* painted on top of the rest of the display list items.
|
* 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,
|
void DisplayCaret(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
nsDisplayList* aList);
|
nsDisplayList* aList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1499,11 +1492,8 @@ public:
|
||||||
/**
|
/**
|
||||||
* Builds a display list for the content represented by this frame,
|
* Builds a display list for the content represented by this frame,
|
||||||
* treating this frame as the root of a stacking context.
|
* treating this frame as the root of a stacking context.
|
||||||
* @param aDirtyRect content outside this rectangle can be ignored; the
|
|
||||||
* rectangle is in frame coordinates
|
|
||||||
*/
|
*/
|
||||||
void BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
nsDisplayList* aList);
|
nsDisplayList* aList);
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -1522,7 +1512,6 @@ public:
|
||||||
*/
|
*/
|
||||||
void BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||||
nsIFrame* aChild,
|
nsIFrame* aChild,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists,
|
const nsDisplayListSet& aLists,
|
||||||
uint32_t aFlags = 0);
|
uint32_t aFlags = 0);
|
||||||
|
|
||||||
|
@ -3551,7 +3540,7 @@ private:
|
||||||
nsIFrame* mNextSibling; // doubly-linked list of frames
|
nsIFrame* mNextSibling; // doubly-linked list of frames
|
||||||
nsIFrame* mPrevSibling; // Do not touch outside SetNextSibling!
|
nsIFrame* mPrevSibling; // Do not touch outside SetNextSibling!
|
||||||
|
|
||||||
void MarkAbsoluteFramesForDisplayList(nsDisplayListBuilder* aBuilder, const nsRect& aDirtyRect);
|
void MarkAbsoluteFramesForDisplayList(nsDisplayListBuilder* aBuilder);
|
||||||
|
|
||||||
static void DestroyPaintedPresShellList(nsTArray<nsWeakPtr>* list) {
|
static void DestroyPaintedPresShellList(nsTArray<nsWeakPtr>* list) {
|
||||||
list->Clear();
|
list->Clear();
|
||||||
|
|
|
@ -1730,7 +1730,6 @@ nsImageFrame::PaintImage(nsRenderingContext& aRenderingContext, nsPoint aPt,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
if (!IsVisibleForPainting(aBuilder))
|
if (!IsVisibleForPainting(aBuilder))
|
||||||
|
|
|
@ -82,7 +82,6 @@ public:
|
||||||
nsContainerFrame* aParent,
|
nsContainerFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) override;
|
nsIFrame* aPrevInFlow) override;
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||||
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
|
||||||
|
|
|
@ -243,10 +243,9 @@ nsInlineFrame::StealFrame(nsIFrame* aChild)
|
||||||
|
|
||||||
void
|
void
|
||||||
nsInlineFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsInlineFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
BuildDisplayListForInline(aBuilder, aLists);
|
||||||
|
|
||||||
// The sole purpose of this is to trigger display of the selection
|
// The sole purpose of this is to trigger display of the selection
|
||||||
// window for Named Anchors, which don't have any children and
|
// window for Named Anchors, which don't have any children and
|
||||||
|
|
|
@ -31,7 +31,6 @@ public:
|
||||||
|
|
||||||
// nsIFrame overrides
|
// nsIFrame overrides
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
#ifdef ACCESSIBILITY
|
#ifdef ACCESSIBILITY
|
||||||
|
|
|
@ -24,7 +24,6 @@ public:
|
||||||
|
|
||||||
// nsIFrame replacements
|
// nsIFrame replacements
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override {
|
const nsDisplayListSet& aLists) override {
|
||||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsLeafFrame");
|
DO_GLOBAL_REFLOW_COUNT_DSP("nsLeafFrame");
|
||||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||||
|
|
|
@ -437,7 +437,7 @@ PruneDisplayListForExtraPage(nsDisplayListBuilder* aBuilder,
|
||||||
static void
|
static void
|
||||||
BuildDisplayListForExtraPage(nsDisplayListBuilder* aBuilder,
|
BuildDisplayListForExtraPage(nsDisplayListBuilder* aBuilder,
|
||||||
nsPageFrame* aPage, nsIFrame* aExtraPage,
|
nsPageFrame* aPage, nsIFrame* aExtraPage,
|
||||||
const nsRect& aDirtyRect, nsDisplayList* aList)
|
nsDisplayList* aList)
|
||||||
{
|
{
|
||||||
// The only content in aExtraPage we care about is out-of-flow content whose
|
// The only content in aExtraPage we care about is out-of-flow content whose
|
||||||
// placeholders have occurred in aPage. If
|
// placeholders have occurred in aPage. If
|
||||||
|
@ -447,7 +447,7 @@ BuildDisplayListForExtraPage(nsDisplayListBuilder* aBuilder,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
nsDisplayList list;
|
nsDisplayList list;
|
||||||
aExtraPage->BuildDisplayListForStackingContext(aBuilder, aDirtyRect, &list);
|
aExtraPage->BuildDisplayListForStackingContext(aBuilder, &list);
|
||||||
PruneDisplayListForExtraPage(aBuilder, aPage, aExtraPage, &list);
|
PruneDisplayListForExtraPage(aBuilder, aPage, aExtraPage, &list);
|
||||||
aList->AppendToTop(&list);
|
aList->AppendToTop(&list);
|
||||||
}
|
}
|
||||||
|
@ -517,10 +517,9 @@ protected:
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
nsDisplayListCollection set;
|
nsDisplayListCollection set(aBuilder);
|
||||||
|
|
||||||
if (PresContext()->IsScreen()) {
|
if (PresContext()->IsScreen()) {
|
||||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||||
|
@ -558,7 +557,10 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
clipState.ClipContainingBlockDescendants(clipRect, nullptr);
|
clipState.ClipContainingBlockDescendants(clipRect, nullptr);
|
||||||
|
|
||||||
nsRect dirtyRect = child->GetVisualOverflowRectRelativeToSelf();
|
nsRect dirtyRect = child->GetVisualOverflowRectRelativeToSelf();
|
||||||
child->BuildDisplayListForStackingContext(aBuilder, dirtyRect, &content);
|
nsDisplayListBuilder::AutoBuildingDisplayList
|
||||||
|
buildingForChild(aBuilder, child, dirtyRect,
|
||||||
|
aBuilder->IsAtRootOfPseudoStackingContext());
|
||||||
|
child->BuildDisplayListForStackingContext(aBuilder, &content);
|
||||||
|
|
||||||
// We may need to paint out-of-flow frames whose placeholders are
|
// We may need to paint out-of-flow frames whose placeholders are
|
||||||
// on other pages. Add those pages to our display list. Note that
|
// on other pages. Add those pages to our display list. Note that
|
||||||
|
@ -569,8 +571,12 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
// following placeholders to their out-of-flows) end up on the list.
|
// following placeholders to their out-of-flows) end up on the list.
|
||||||
nsIFrame* page = child;
|
nsIFrame* page = child;
|
||||||
while ((page = GetNextPage(page)) != nullptr) {
|
while ((page = GetNextPage(page)) != nullptr) {
|
||||||
BuildDisplayListForExtraPage(aBuilder, this, page,
|
nsRect childDirty = dirtyRect + child->GetOffsetTo(page);
|
||||||
dirtyRect + child->GetOffsetTo(page), &content);
|
|
||||||
|
nsDisplayListBuilder::AutoBuildingDisplayList
|
||||||
|
buildingForChild(aBuilder, page, childDirty,
|
||||||
|
aBuilder->IsAtRootOfPseudoStackingContext());
|
||||||
|
BuildDisplayListForExtraPage(aBuilder, this, page, &content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Invoke AutoBuildingDisplayList to ensure that the correct dirtyRect
|
// Invoke AutoBuildingDisplayList to ensure that the correct dirtyRect
|
||||||
|
|
|
@ -29,7 +29,6 @@ public:
|
||||||
nsReflowStatus& aStatus) override;
|
nsReflowStatus& aStatus) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -239,7 +239,6 @@ PaintDebugPlaceholder(nsIFrame* aFrame, DrawTarget* aDrawTarget,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsPlaceholderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsPlaceholderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsPlaceholderFrame");
|
DO_GLOBAL_REFLOW_COUNT_DSP("nsPlaceholderFrame");
|
||||||
|
|
|
@ -107,7 +107,6 @@ public:
|
||||||
|
|
||||||
#if defined(DEBUG) || (defined(MOZ_REFLOW_PERF_DSP) && defined(MOZ_REFLOW_PERF))
|
#if defined(DEBUG) || (defined(MOZ_REFLOW_PERF_DSP) && defined(MOZ_REFLOW_PERF))
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
#endif // DEBUG || (MOZ_REFLOW_PERF_DSP && MOZ_REFLOW_PERF)
|
#endif // DEBUG || (MOZ_REFLOW_PERF_DSP && MOZ_REFLOW_PERF)
|
||||||
|
|
||||||
|
|
|
@ -1182,7 +1182,6 @@ nsPluginFrame::IsTransparentMode() const
|
||||||
|
|
||||||
void
|
void
|
||||||
nsPluginFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsPluginFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
// XXX why are we painting collapsed object frames?
|
// XXX why are we painting collapsed object frames?
|
||||||
|
|
|
@ -81,7 +81,6 @@ public:
|
||||||
const ReflowInput* aReflowInput,
|
const ReflowInput* aReflowInput,
|
||||||
nsDidReflowStatus aStatus) override;
|
nsDidReflowStatus aStatus) override;
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual nsresult HandleEvent(nsPresContext* aPresContext,
|
virtual nsresult HandleEvent(nsPresContext* aPresContext,
|
||||||
|
|
|
@ -63,14 +63,13 @@ nsRubyTextFrame::GetFrameName(nsAString& aResult) const
|
||||||
|
|
||||||
/* virtual */ void
|
/* virtual */ void
|
||||||
nsRubyTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsRubyTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
if (IsAutoHidden()) {
|
if (IsAutoHidden()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsRubyContentFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
nsRubyContentFrame::BuildDisplayList(aBuilder, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* virtual */ void
|
/* virtual */ void
|
||||||
|
|
|
@ -34,7 +34,6 @@ public:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual void Reflow(nsPresContext* aPresContext,
|
virtual void Reflow(nsPresContext* aPresContext,
|
||||||
|
|
|
@ -808,7 +808,6 @@ ComputePageSequenceTransform(nsIFrame* aFrame, float aAppUnitsPerPixel)
|
||||||
|
|
||||||
void
|
void
|
||||||
nsSimplePageSequenceFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsSimplePageSequenceFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||||
|
@ -822,13 +821,16 @@ nsSimplePageSequenceFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
clipState.Clear();
|
clipState.Clear();
|
||||||
|
|
||||||
nsIFrame* child = PrincipalChildList().FirstChild();
|
nsIFrame* child = PrincipalChildList().FirstChild();
|
||||||
nsRect dirty = aDirtyRect;
|
nsRect dirty = aBuilder->GetDirtyRect();
|
||||||
dirty.ScaleInverseRoundOut(PresContext()->GetPrintPreviewScale());
|
dirty.ScaleInverseRoundOut(PresContext()->GetPrintPreviewScale());
|
||||||
|
|
||||||
while (child) {
|
while (child) {
|
||||||
if (child->GetVisualOverflowRectRelativeToParent().Intersects(dirty)) {
|
if (child->GetVisualOverflowRectRelativeToParent().Intersects(dirty)) {
|
||||||
child->BuildDisplayListForStackingContext(aBuilder,
|
nsDisplayListBuilder::AutoBuildingDisplayList
|
||||||
dirty - child->GetPosition(), &content);
|
buildingForChild(aBuilder, child,
|
||||||
|
dirty - child->GetPosition(),
|
||||||
|
aBuilder->IsAtRootOfPseudoStackingContext());
|
||||||
|
child->BuildDisplayListForStackingContext(aBuilder, &content);
|
||||||
aBuilder->ResetMarkedFramesForDisplayList();
|
aBuilder->ResetMarkedFramesForDisplayList();
|
||||||
}
|
}
|
||||||
child = child->GetNextSibling();
|
child = child->GetNextSibling();
|
||||||
|
|
|
@ -69,7 +69,6 @@ public:
|
||||||
nsReflowStatus& aStatus) override;
|
nsReflowStatus& aStatus) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
// nsIPageSequenceFrame
|
// nsIPageSequenceFrame
|
||||||
|
|
|
@ -327,7 +327,6 @@ WrapBackgroundColorInOwnLayer(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
if (!IsVisibleForPainting(aBuilder))
|
if (!IsVisibleForPainting(aBuilder))
|
||||||
|
@ -343,7 +342,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
bool pointerEventsNone =
|
bool pointerEventsNone =
|
||||||
StyleUserInterface()->mPointerEvents == NS_STYLE_POINTER_EVENTS_NONE;
|
StyleUserInterface()->mPointerEvents == NS_STYLE_POINTER_EVENTS_NONE;
|
||||||
if (!aBuilder->IsForEventDelivery() || !pointerEventsNone) {
|
if (!aBuilder->IsForEventDelivery() || !pointerEventsNone) {
|
||||||
nsDisplayListCollection decorations;
|
nsDisplayListCollection decorations(aBuilder);
|
||||||
DisplayBorderBackgroundOutline(aBuilder, decorations);
|
DisplayBorderBackgroundOutline(aBuilder, decorations);
|
||||||
if (rfp) {
|
if (rfp) {
|
||||||
// Wrap background colors of <iframe>s with remote subdocuments in their
|
// Wrap background colors of <iframe>s with remote subdocuments in their
|
||||||
|
@ -368,7 +367,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rfp) {
|
if (rfp) {
|
||||||
rfp->BuildDisplayList(aBuilder, this, aDirtyRect, aLists);
|
rfp->BuildDisplayList(aBuilder, this, aLists);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -393,17 +392,18 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
nsIFrame* savedIgnoreScrollFrame = nullptr;
|
nsIFrame* savedIgnoreScrollFrame = nullptr;
|
||||||
if (subdocRootFrame) {
|
if (subdocRootFrame) {
|
||||||
// get the dirty rect relative to the root frame of the subdoc
|
// get the dirty rect relative to the root frame of the subdoc
|
||||||
dirty = aDirtyRect + GetOffsetToCrossDoc(subdocRootFrame);
|
dirty = aBuilder->GetDirtyRect() + GetOffsetToCrossDoc(subdocRootFrame);
|
||||||
// and convert into the appunits of the subdoc
|
// and convert into the appunits of the subdoc
|
||||||
dirty = dirty.ScaleToOtherAppUnitsRoundOut(parentAPD, subdocAPD);
|
dirty = dirty.ScaleToOtherAppUnitsRoundOut(parentAPD, subdocAPD);
|
||||||
|
|
||||||
if (nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame()) {
|
if (nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame()) {
|
||||||
nsIScrollableFrame* rootScrollableFrame = presShell->GetRootScrollFrameAsScrollable();
|
nsIScrollableFrame* rootScrollableFrame = presShell->GetRootScrollFrameAsScrollable();
|
||||||
MOZ_ASSERT(rootScrollableFrame);
|
MOZ_ASSERT(rootScrollableFrame);
|
||||||
// Use a copy, so the dirty rect doesn't get modified to the display port.
|
// Use a copy, so the rects don't get modified.
|
||||||
nsRect copy = dirty;
|
nsRect copyOfDirty = dirty;
|
||||||
haveDisplayPort = rootScrollableFrame->DecideScrollableLayer(aBuilder,
|
haveDisplayPort = rootScrollableFrame->DecideScrollableLayer(aBuilder,
|
||||||
©, /* aAllowCreateDisplayPort = */ true);
|
©OfDirty,
|
||||||
|
/* aAllowCreateDisplayPort = */ true);
|
||||||
if (!gfxPrefs::LayoutUseContainersForRootFrames()) {
|
if (!gfxPrefs::LayoutUseContainersForRootFrames()) {
|
||||||
haveDisplayPort = false;
|
haveDisplayPort = false;
|
||||||
}
|
}
|
||||||
|
@ -417,7 +417,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
aBuilder->EnterPresShell(subdocRootFrame, pointerEventsNone);
|
aBuilder->EnterPresShell(subdocRootFrame, pointerEventsNone);
|
||||||
} else {
|
} else {
|
||||||
dirty = aDirtyRect;
|
dirty = aBuilder->GetDirtyRect();
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
|
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
|
||||||
|
@ -456,6 +456,13 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
nestedClipState.EnterStackingContextContents(true);
|
nestedClipState.EnterStackingContextContents(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Invoke AutoBuildingDisplayList to ensure that the correct dirty rect
|
||||||
|
// is used to compute the visible rect if AddCanvasBackgroundColorItem
|
||||||
|
// creates a display item.
|
||||||
|
nsIFrame* frame = subdocRootFrame ? subdocRootFrame : this;
|
||||||
|
nsDisplayListBuilder::AutoBuildingDisplayList
|
||||||
|
building(aBuilder, frame, dirty, true);
|
||||||
|
|
||||||
if (subdocRootFrame) {
|
if (subdocRootFrame) {
|
||||||
nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame();
|
nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame();
|
||||||
nsDisplayListBuilder::AutoCurrentScrollParentIdSetter idSetter(
|
nsDisplayListBuilder::AutoCurrentScrollParentIdSetter idSetter(
|
||||||
|
@ -466,7 +473,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
aBuilder->SetAncestorHasApzAwareEventHandler(false);
|
aBuilder->SetAncestorHasApzAwareEventHandler(false);
|
||||||
subdocRootFrame->
|
subdocRootFrame->
|
||||||
BuildDisplayListForStackingContext(aBuilder, dirty, &childItems);
|
BuildDisplayListForStackingContext(aBuilder, &childItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!aBuilder->IsForEventDelivery()) {
|
if (!aBuilder->IsForEventDelivery()) {
|
||||||
|
@ -485,15 +492,8 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
// painted on the page itself.
|
// painted on the page itself.
|
||||||
if (nsLayoutUtils::NeedsPrintPreviewBackground(presContext)) {
|
if (nsLayoutUtils::NeedsPrintPreviewBackground(presContext)) {
|
||||||
presShell->AddPrintPreviewBackgroundItem(
|
presShell->AddPrintPreviewBackgroundItem(
|
||||||
*aBuilder, childItems, subdocRootFrame ? subdocRootFrame : this,
|
*aBuilder, childItems, frame, bounds);
|
||||||
bounds);
|
|
||||||
} else {
|
} else {
|
||||||
// Invoke AutoBuildingDisplayList to ensure that the correct dirty rect
|
|
||||||
// is used to compute the visible rect if AddCanvasBackgroundColorItem
|
|
||||||
// creates a display item.
|
|
||||||
nsIFrame* frame = subdocRootFrame ? subdocRootFrame : this;
|
|
||||||
nsDisplayListBuilder::AutoBuildingDisplayList
|
|
||||||
building(aBuilder, frame, dirty, true);
|
|
||||||
// Add the canvas background color to the bottom of the list. This
|
// Add the canvas background color to the bottom of the list. This
|
||||||
// happens after we've built the list so that AddCanvasBackgroundColorItem
|
// happens after we've built the list so that AddCanvasBackgroundColorItem
|
||||||
// can monkey with the contents if necessary.
|
// can monkey with the contents if necessary.
|
||||||
|
|
|
@ -79,7 +79,6 @@ public:
|
||||||
nsReflowStatus& aStatus) override;
|
nsReflowStatus& aStatus) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
|
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
|
||||||
|
|
|
@ -4997,7 +4997,6 @@ nsDisplayText::Paint(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
if (!IsVisibleForPainting(aBuilder))
|
if (!IsVisibleForPainting(aBuilder))
|
||||||
|
|
|
@ -65,7 +65,6 @@ public:
|
||||||
|
|
||||||
// nsIFrame
|
// nsIFrame
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual void Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
|
|
|
@ -446,7 +446,6 @@ public:
|
||||||
|
|
||||||
void
|
void
|
||||||
nsVideoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsVideoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
if (!IsVisibleForPainting(aBuilder))
|
if (!IsVisibleForPainting(aBuilder))
|
||||||
|
@ -482,14 +481,15 @@ nsVideoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
// but only want to draw mPosterImage conditionally. Others we
|
// but only want to draw mPosterImage conditionally. Others we
|
||||||
// always add to the display list.
|
// always add to the display list.
|
||||||
for (nsIFrame* child : mFrames) {
|
for (nsIFrame* child : mFrames) {
|
||||||
if (child->GetContent() != mPosterImage || shouldDisplayPoster) {
|
if (child->GetContent() != mPosterImage || shouldDisplayPoster ||
|
||||||
child->BuildDisplayListForStackingContext(aBuilder,
|
child->GetType() == nsGkAtoms::boxFrame) {
|
||||||
aDirtyRect - child->GetOffsetTo(this),
|
|
||||||
aLists.Content());
|
nsDisplayListBuilder::AutoBuildingDisplayList
|
||||||
} else if (child->GetType() == nsGkAtoms::boxFrame) {
|
buildingForChild(aBuilder, child,
|
||||||
child->BuildDisplayListForStackingContext(aBuilder,
|
aBuilder->GetDirtyRect() - child->GetOffsetTo(this),
|
||||||
aDirtyRect - child->GetOffsetTo(this),
|
aBuilder->IsAtRootOfPseudoStackingContext());
|
||||||
aLists.Content());
|
|
||||||
|
child->BuildDisplayListForStackingContext(aBuilder, aLists.Content());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,6 @@ public:
|
||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
|
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
|
||||||
|
|
|
@ -49,7 +49,6 @@ ViewportFrame::Init(nsIContent* aContent,
|
||||||
|
|
||||||
void
|
void
|
||||||
ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
PROFILER_LABEL("ViewportFrame", "BuildDisplayList",
|
PROFILER_LABEL("ViewportFrame", "BuildDisplayList",
|
||||||
|
@ -59,7 +58,7 @@ ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
// make the kid's BorderBackground our own. This ensures that the canvas
|
// make the kid's BorderBackground our own. This ensures that the canvas
|
||||||
// frame's background becomes our own background and therefore appears
|
// frame's background becomes our own background and therefore appears
|
||||||
// below negative z-index elements.
|
// below negative z-index elements.
|
||||||
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
BuildDisplayListForChild(aBuilder, kid, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayList topLayerList;
|
nsDisplayList topLayerList;
|
||||||
|
@ -110,8 +109,12 @@ BuildDisplayListForTopLayerFrame(nsDisplayListBuilder* aBuilder,
|
||||||
clipState.SetScrollClipForContainingBlockDescendants(
|
clipState.SetScrollClipForContainingBlockDescendants(
|
||||||
aBuilder, savedOutOfFlowData->mContainingBlockScrollClip);
|
aBuilder, savedOutOfFlowData->mContainingBlockScrollClip);
|
||||||
}
|
}
|
||||||
|
nsDisplayListBuilder::AutoBuildingDisplayList
|
||||||
|
buildingForChild(aBuilder, aFrame, dirty,
|
||||||
|
aBuilder->IsAtRootOfPseudoStackingContext());
|
||||||
|
|
||||||
nsDisplayList list;
|
nsDisplayList list;
|
||||||
aFrame->BuildDisplayListForStackingContext(aBuilder, dirty, &list);
|
aFrame->BuildDisplayListForStackingContext(aBuilder, &list);
|
||||||
aList->AppendToTop(&list);
|
aList->AppendToTop(&list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,6 @@ public:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
void BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
|
@ -266,7 +266,6 @@ RenderFrameParent::GetLayerTreeId() const
|
||||||
void
|
void
|
||||||
RenderFrameParent::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
RenderFrameParent::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
nsSubDocumentFrame* aFrame,
|
nsSubDocumentFrame* aFrame,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
// We're the subdoc for <browser remote="true"> and it has
|
// We're the subdoc for <browser remote="true"> and it has
|
||||||
|
|
|
@ -64,7 +64,6 @@ public:
|
||||||
|
|
||||||
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
nsSubDocumentFrame* aFrame,
|
nsSubDocumentFrame* aFrame,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists);
|
const nsDisplayListSet& aLists);
|
||||||
|
|
||||||
already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
|
@ -1992,7 +1992,8 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
|
||||||
if (styleContext != parentContext &&
|
if (styleContext != parentContext &&
|
||||||
NS_GET_A(backg->mBackgroundColor) > 0) {
|
NS_GET_A(backg->mBackgroundColor) > 0) {
|
||||||
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
||||||
aBuilder, aForFrame, mRect, aLists.BorderBackground(),
|
aBuilder, aForFrame, mRect + aBuilder->ToReferenceFrame(aForFrame),
|
||||||
|
aLists.BorderBackground(),
|
||||||
/* aAllowWillPaintBorderOptimization */ true, styleContext);
|
/* aAllowWillPaintBorderOptimization */ true, styleContext);
|
||||||
}
|
}
|
||||||
//else
|
//else
|
||||||
|
|
|
@ -618,7 +618,6 @@ nsMathMLContainerFrame::PropagatePresentationDataFromChildAt(nsIFrame* aPa
|
||||||
|
|
||||||
void
|
void
|
||||||
nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
// report an error if something wrong was found in this frame
|
// report an error if something wrong was found in this frame
|
||||||
|
@ -633,8 +632,7 @@ nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||||
|
|
||||||
BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists,
|
BuildDisplayListForNonBlockChildren(aBuilder, aLists, DISPLAY_CHILD_INLINE);
|
||||||
DISPLAY_CHILD_INLINE);
|
|
||||||
|
|
||||||
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
|
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
|
||||||
// for visual debug
|
// for visual debug
|
||||||
|
|
|
@ -126,7 +126,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual bool ComputeCustomOverflow(nsOverflowAreas& aOverflowAreas) override;
|
virtual bool ComputeCustomOverflow(nsOverflowAreas& aOverflowAreas) override;
|
||||||
|
|
|
@ -71,14 +71,13 @@ nsMathMLSelectedFrame::SetInitialChildList(ChildListID aListID,
|
||||||
// Only paint the selected child...
|
// Only paint the selected child...
|
||||||
void
|
void
|
||||||
nsMathMLSelectedFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsMathMLSelectedFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
// Report an error if something wrong was found in this frame.
|
// Report an error if something wrong was found in this frame.
|
||||||
// We can't call nsDisplayMathMLError from here,
|
// We can't call nsDisplayMathMLError from here,
|
||||||
// so ask nsMathMLContainerFrame to do the work for us.
|
// so ask nsMathMLContainerFrame to do the work for us.
|
||||||
if (NS_MATHML_HAS_ERROR(mPresentationData.flags)) {
|
if (NS_MATHML_HAS_ERROR(mPresentationData.flags)) {
|
||||||
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aLists);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +88,7 @@ nsMathMLSelectedFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
// Put the child's background directly onto the content list
|
// Put the child's background directly onto the content list
|
||||||
nsDisplayListSet set(aLists, aLists.Content());
|
nsDisplayListSet set(aLists, aLists.Content());
|
||||||
// The children should be in content order
|
// The children should be in content order
|
||||||
BuildDisplayListForChild(aBuilder, childFrame, aDirtyRect, set);
|
BuildDisplayListForChild(aBuilder, childFrame, set);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
|
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
|
||||||
|
|
|
@ -26,7 +26,6 @@ public:
|
||||||
ChildListChanged(int32_t aModType) override;
|
ChildListChanged(int32_t aModType) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual nsresult
|
virtual nsresult
|
||||||
|
|
|
@ -201,12 +201,11 @@ nsMathMLmencloseFrame::TransmitAutomaticData()
|
||||||
|
|
||||||
void
|
void
|
||||||
nsMathMLmencloseFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsMathMLmencloseFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
/////////////
|
/////////////
|
||||||
// paint the menclosed content
|
// paint the menclosed content
|
||||||
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aLists);
|
||||||
|
|
||||||
if (NS_MATHML_HAS_ERROR(mPresentationData.flags))
|
if (NS_MATHML_HAS_ERROR(mPresentationData.flags))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -70,7 +70,6 @@ public:
|
||||||
GetAdditionalStyleContext(int32_t aIndex) const override;
|
GetAdditionalStyleContext(int32_t aIndex) const override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
NS_IMETHOD
|
NS_IMETHOD
|
||||||
|
|
|
@ -161,12 +161,11 @@ nsMathMLmfencedFrame::CreateFencesAndSeparators(nsPresContext* aPresContext)
|
||||||
|
|
||||||
void
|
void
|
||||||
nsMathMLmfencedFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsMathMLmfencedFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
/////////////
|
/////////////
|
||||||
// display the content
|
// display the content
|
||||||
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aLists);
|
||||||
|
|
||||||
////////////
|
////////////
|
||||||
// display fences and separators
|
// display fences and separators
|
||||||
|
|
|
@ -41,7 +41,6 @@ public:
|
||||||
nsReflowStatus& aStatus) override;
|
nsReflowStatus& aStatus) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual void
|
virtual void
|
||||||
|
|
|
@ -149,12 +149,11 @@ nsMathMLmfracFrame::CalcLineThickness(nsPresContext* aPresContext,
|
||||||
|
|
||||||
void
|
void
|
||||||
nsMathMLmfracFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsMathMLmfracFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
/////////////
|
/////////////
|
||||||
// paint the numerator and denominator
|
// paint the numerator and denominator
|
||||||
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aLists);
|
||||||
|
|
||||||
/////////////
|
/////////////
|
||||||
// paint the fraction line
|
// paint the fraction line
|
||||||
|
|
|
@ -67,7 +67,6 @@ public:
|
||||||
ReflowOutput& aDesiredSize) override;
|
ReflowOutput& aDesiredSize) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual nsresult
|
virtual nsresult
|
||||||
|
|
|
@ -78,14 +78,13 @@ nsMathMLmoFrame::UseMathMLChar()
|
||||||
|
|
||||||
void
|
void
|
||||||
nsMathMLmoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsMathMLmoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
bool useMathMLChar = UseMathMLChar();
|
bool useMathMLChar = UseMathMLChar();
|
||||||
|
|
||||||
if (!useMathMLChar) {
|
if (!useMathMLChar) {
|
||||||
// let the base class do everything
|
// let the base class do everything
|
||||||
nsMathMLTokenFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
nsMathMLTokenFrame::BuildDisplayList(aBuilder, aLists);
|
||||||
} else {
|
} else {
|
||||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ public:
|
||||||
GetAdditionalStyleContext(int32_t aIndex) const override;
|
GetAdditionalStyleContext(int32_t aIndex) const override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
NS_IMETHOD
|
NS_IMETHOD
|
||||||
|
|
|
@ -77,12 +77,11 @@ nsMathMLmrootFrame::TransmitAutomaticData()
|
||||||
|
|
||||||
void
|
void
|
||||||
nsMathMLmrootFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
nsMathMLmrootFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
/////////////
|
/////////////
|
||||||
// paint the content we are square-rooting
|
// paint the content we are square-rooting
|
||||||
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
nsMathMLContainerFrame::BuildDisplayList(aBuilder, aLists);
|
||||||
|
|
||||||
/////////////
|
/////////////
|
||||||
// paint the sqrt symbol
|
// paint the sqrt symbol
|
||||||
|
|
|
@ -51,7 +51,6 @@ public:
|
||||||
ReflowOutput& aDesiredSize) override;
|
ReflowOutput& aDesiredSize) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
uint8_t
|
uint8_t
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<table>
|
||||||
|
<col style="background:green">
|
||||||
|
<tr>
|
||||||
|
<td style="width:20px; height:20px"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<table>
|
||||||
|
<col style="background:green">
|
||||||
|
<tr>
|
||||||
|
<td style="position:relative; left:-100px; width:20px; height:20px"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<body style="overflow:hidden">
|
||||||
|
<table style="position:relative; top:-50px">
|
||||||
|
<col style="background:green; width: 40px;">
|
||||||
|
<tr style="position:relative; left:-100px; height: 40px">
|
||||||
|
<td rowspan=2></td>
|
||||||
|
</tr>
|
||||||
|
<tr style="height: 40px"></tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<body style="overflow:hidden">
|
||||||
|
<table style="position:relative; top:-50px">
|
||||||
|
<tbody style="background:green">
|
||||||
|
<tr style="position:relative; left:-100px; height: 40px">
|
||||||
|
<td rowspan=2 style="width: 40px;"></td>
|
||||||
|
</tr>
|
||||||
|
<tr style="height: 40px"></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -7,3 +7,6 @@
|
||||||
== table-separate-3.html table-separate-3-ref.html
|
== table-separate-3.html table-separate-3-ref.html
|
||||||
== table-separate-4.html table-separate-4-ref.html
|
== table-separate-4.html table-separate-4-ref.html
|
||||||
== 1115999-1.html 1115999-1-ref.html
|
== 1115999-1.html 1115999-1-ref.html
|
||||||
|
== 1409114-1.html 1409114-1-ref.html
|
||||||
|
!= 1409114-2.html about:blank
|
||||||
|
!= 1409114-3.html about:blank
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
html, body { margin: 0; padding: 0; border: 0; font-size: 16px; }
|
html, body { margin: 0; padding: 0; border: 0; font-size: 16px; }
|
||||||
body { padding: 15px; }
|
body { padding: 15px; }
|
||||||
|
|
||||||
.o { opacity: 0.5; }
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
table {
|
table {
|
||||||
margin: 0px 3px 2px 4px;
|
margin: 0px 3px 2px 4px;
|
||||||
|
@ -55,8 +53,8 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="color o"></div>
|
<div class="color"></div>
|
||||||
<div class="imagetl o"></div>
|
<div class="imagetl"></div>
|
||||||
<div class="imagebr"></div>
|
<div class="imagebr"></div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue