Bug 599080 - Part 1: Rename mSetPrimaryFrame to mCreatingExtraFrames and invert its boolean semantics; r=roc a=blocking-final+
This commit is contained in:
@@ -740,13 +740,13 @@ public:
|
||||
// we have not yet created the relevant frame.
|
||||
PRPackedBool mHavePendingPopupgroup;
|
||||
|
||||
// If true (which is the default) then call SetPrimaryFrame() as needed
|
||||
// during frame construction. If false, don't make any SetPrimaryFrame()
|
||||
// calls. The mSetPrimaryFrames == PR_FALSE mode is meant to be used for
|
||||
// If false (which is the default) then call SetPrimaryFrame() as needed
|
||||
// during frame construction. If true, don't make any SetPrimaryFrame()
|
||||
// calls. The mCreatingExtraFrames == PR_TRUE mode is meant to be used for
|
||||
// construction of random "extra" frames for elements via normal frame
|
||||
// construction APIs (e.g. replication of things across pages in paginated
|
||||
// mode).
|
||||
PRPackedBool mSetPrimaryFrames;
|
||||
PRPackedBool mCreatingExtraFrames;
|
||||
|
||||
nsCOMArray<nsIContent> mGeneratedTextNodesWithInitializer;
|
||||
|
||||
@@ -911,7 +911,7 @@ nsFrameConstructorState::nsFrameConstructorState(nsIPresShell* aPresShe
|
||||
aAbsoluteContainingBlock->GetStyleDisplay()->
|
||||
HasTransform()),
|
||||
mHavePendingPopupgroup(PR_FALSE),
|
||||
mSetPrimaryFrames(PR_TRUE),
|
||||
mCreatingExtraFrames(PR_FALSE),
|
||||
mCurrentPendingBindingInsertionPoint(&mPendingBindings)
|
||||
{
|
||||
#ifdef MOZ_XUL
|
||||
@@ -943,7 +943,7 @@ nsFrameConstructorState::nsFrameConstructorState(nsIPresShell* aPresShell,
|
||||
aAbsoluteContainingBlock->GetStyleDisplay()->
|
||||
HasTransform()),
|
||||
mHavePendingPopupgroup(PR_FALSE),
|
||||
mSetPrimaryFrames(PR_TRUE),
|
||||
mCreatingExtraFrames(PR_FALSE),
|
||||
mCurrentPendingBindingInsertionPoint(&mPendingBindings)
|
||||
{
|
||||
#ifdef MOZ_XUL
|
||||
@@ -2162,7 +2162,7 @@ NeedFrameFor(const nsFrameConstructorState& aState,
|
||||
// XXX the GetContent() != aChildContent check is needed due to bug 135040.
|
||||
// Remove it once that's fixed.
|
||||
NS_PRECONDITION(!aChildContent->GetPrimaryFrame() ||
|
||||
!aState.mSetPrimaryFrames ||
|
||||
aState.mCreatingExtraFrames ||
|
||||
aChildContent->GetPrimaryFrame()->GetContent() != aChildContent,
|
||||
"Why did we get called?");
|
||||
|
||||
@@ -3435,7 +3435,7 @@ nsCSSFrameConstructor::ConstructTextFrame(const FrameConstructionData* aData,
|
||||
// Add the newly constructed frame to the flow
|
||||
aFrameItems.AddChild(newFrame);
|
||||
|
||||
if (aState.mSetPrimaryFrames)
|
||||
if (!aState.mCreatingExtraFrames)
|
||||
aContent->SetPrimaryFrame(newFrame);
|
||||
|
||||
return rv;
|
||||
@@ -3865,7 +3865,7 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
|
||||
((bits & FCDATA_IS_LINE_PARTICIPANT) != 0),
|
||||
"Incorrectly set FCDATA_IS_LINE_PARTICIPANT bits");
|
||||
|
||||
if (aState.mSetPrimaryFrames && !(bits & FCDATA_SKIP_FRAMESET)) {
|
||||
if (!aState.mCreatingExtraFrames && !(bits & FCDATA_SKIP_FRAMESET)) {
|
||||
aItem.mContent->SetPrimaryFrame(primaryFrame);
|
||||
}
|
||||
|
||||
@@ -8407,7 +8407,7 @@ nsCSSFrameConstructor::CreateContinuingTableFrame(nsIPresShell* aPresShell,
|
||||
nsFrameConstructorState state(mPresShell, mFixedContainingBlock,
|
||||
GetAbsoluteContainingBlock(newFrame),
|
||||
nsnull);
|
||||
state.mSetPrimaryFrames = PR_FALSE;
|
||||
state.mCreatingExtraFrames = PR_TRUE;
|
||||
|
||||
headerFooterFrame = static_cast<nsTableRowGroupFrame*>
|
||||
(NS_NewTableRowGroupFrame(aPresShell, rowGroupFrame->GetStyleContext()));
|
||||
@@ -8734,7 +8734,7 @@ nsCSSFrameConstructor::ReplicateFixedFrames(nsPageContentFrame* aParentFrame)
|
||||
nsFrameConstructorState state(mPresShell, aParentFrame,
|
||||
nsnull,
|
||||
mRootElementFrame);
|
||||
state.mSetPrimaryFrames = PR_FALSE;
|
||||
state.mCreatingExtraFrames = PR_TRUE;
|
||||
|
||||
// Iterate across fixed frames and replicate each whose placeholder is a
|
||||
// descendant of aFrame. (We don't want to explicitly copy placeholders that
|
||||
@@ -11720,7 +11720,7 @@ PRBool
|
||||
nsCSSFrameConstructor::
|
||||
FrameConstructionItem::IsWhitespace(nsFrameConstructorState& aState) const
|
||||
{
|
||||
NS_PRECONDITION(!aState.mSetPrimaryFrames ||
|
||||
NS_PRECONDITION(aState.mCreatingExtraFrames ||
|
||||
!mContent->GetPrimaryFrame(), "How did that happen?");
|
||||
if (!mIsText) {
|
||||
return PR_FALSE;
|
||||
|
||||
Reference in New Issue
Block a user