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