зеркало из https://github.com/mozilla/gecko-dev.git
Rename float continuations to pushed floats. (Bug 563584, patch 33) r=roc
This patch was generated with the following sed commands on layout/generic/*.{h,cpp}: 's/FLOAT_CONTINUATION/PUSHED_FLOAT/g;s/FloatContinuation/PushedFloat/g;s/float continuation/pushed float/g' plus whitespace fixup where the frame state bits are defined.
This commit is contained in:
Родитель
051d2eec64
Коммит
7afdbd9a59
|
@ -565,7 +565,7 @@ nsBlockFrame::GetChildList(nsIAtom* aListName) const
|
|||
return list ? *list : nsFrameList::EmptyList();
|
||||
}
|
||||
else if (aListName == nsGkAtoms::floatContinuationsList) {
|
||||
const nsFrameList* list = GetFloatContinuations();
|
||||
const nsFrameList* list = GetPushedFloats();
|
||||
return list ? *list : nsFrameList::EmptyList();
|
||||
}
|
||||
else if (aListName == nsGkAtoms::floatList) {
|
||||
|
@ -582,7 +582,7 @@ nsBlockFrame::GetChildList(nsIAtom* aListName) const
|
|||
#define NS_BLOCK_FRAME_FLOAT_LIST_INDEX (NS_CONTAINER_LIST_COUNT_INCL_OC + 1)
|
||||
#define NS_BLOCK_FRAME_BULLET_LIST_INDEX (NS_CONTAINER_LIST_COUNT_INCL_OC + 2)
|
||||
#define NS_BLOCK_FRAME_ABSOLUTE_LIST_INDEX (NS_CONTAINER_LIST_COUNT_INCL_OC + 3)
|
||||
#define NS_BLOCK_FRAME_FLOAT_CONTINUATIONS_LIST_INDEX (NS_CONTAINER_LIST_COUNT_INCL_OC + 4)
|
||||
#define NS_BLOCK_FRAME_PUSHED_FLOATS_LIST_INDEX (NS_CONTAINER_LIST_COUNT_INCL_OC + 4)
|
||||
// If adding/removing lists, don't forget to update the count in nsBlockFrame.h
|
||||
|
||||
nsIAtom*
|
||||
|
@ -600,7 +600,7 @@ nsBlockFrame::GetAdditionalChildListName(PRInt32 aIndex) const
|
|||
return nsGkAtoms::overflowOutOfFlowList;
|
||||
case NS_BLOCK_FRAME_ABSOLUTE_LIST_INDEX:
|
||||
return nsGkAtoms::absoluteList;
|
||||
case NS_BLOCK_FRAME_FLOAT_CONTINUATIONS_LIST_INDEX:
|
||||
case NS_BLOCK_FRAME_PUSHED_FLOATS_LIST_INDEX:
|
||||
return nsGkAtoms::floatContinuationsList;
|
||||
default:
|
||||
return nsnull;
|
||||
|
@ -997,11 +997,11 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
|||
nsOverflowContinuationTracker tracker(aPresContext, this, PR_FALSE);
|
||||
state.mOverflowTracker = &tracker;
|
||||
|
||||
// Drain & handle float continuations
|
||||
DrainFloatContinuations(state);
|
||||
// Drain & handle pushed floats
|
||||
DrainPushedFloats(state);
|
||||
nsRect fcBounds;
|
||||
nsReflowStatus fcStatus = NS_FRAME_COMPLETE;
|
||||
rv = ReflowFloatContinuations(state, fcBounds, fcStatus);
|
||||
rv = ReflowPushedFloats(state, fcBounds, fcStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// If we're not dirty (which means we'll mark everything dirty later)
|
||||
|
@ -1029,7 +1029,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
|||
}
|
||||
|
||||
if (!NS_FRAME_IS_FULLY_COMPLETE(state.mReflowStatus)) {
|
||||
if (GetOverflowLines() || GetFloatContinuations()) {
|
||||
if (GetOverflowLines() || GetPushedFloats()) {
|
||||
state.mReflowStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
|
||||
}
|
||||
|
||||
|
@ -1088,7 +1088,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
|||
ComputeCombinedArea(aReflowState, aMetrics, bottomEdgeOfChildren);
|
||||
// Factor overflow container child bounds into the overflow area
|
||||
aMetrics.mOverflowArea.UnionRect(aMetrics.mOverflowArea, ocBounds);
|
||||
// Factor float continuation child bounds into the overflow area
|
||||
// Factor pushed float child bounds into the overflow area
|
||||
aMetrics.mOverflowArea.UnionRect(aMetrics.mOverflowArea, fcBounds);
|
||||
|
||||
// Let the absolutely positioned container reflow any absolutely positioned
|
||||
|
@ -1770,9 +1770,9 @@ nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState)
|
|||
// recompute the carried out margin before the line if we want to
|
||||
// reflow it or if its previous margin is dirty
|
||||
PRBool needToRecoverState = PR_FALSE;
|
||||
// Float continuations were reflowed in ReflowFloatContinuations
|
||||
// Float continuations were reflowed in ReflowPushedFloats
|
||||
PRBool reflowedFloat = mFloats.NotEmpty() &&
|
||||
(mFloats.FirstChild()->GetStateBits() & NS_FRAME_IS_FLOAT_CONTINUATION);
|
||||
(mFloats.FirstChild()->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT);
|
||||
PRBool lastLineMovedUp = PR_FALSE;
|
||||
// We save up information about BR-clearance here
|
||||
PRUint8 inlineFloatBreakType = aState.mFloatBreakType;
|
||||
|
@ -3933,7 +3933,7 @@ nsBlockFrame::SplitFloat(nsBlockReflowState& aState,
|
|||
aState.mFloatManager->SetSplitRightFloatAcrossBreak();
|
||||
}
|
||||
|
||||
aState.AppendFloatContinuation(nextInFlow);
|
||||
aState.AppendPushedFloat(nextInFlow);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -3954,7 +3954,7 @@ CheckPlaceholderInLine(nsIFrame* aBlock, nsLineBox* aLine, nsFloatCache* aFC)
|
|||
return PR_TRUE;
|
||||
NS_ASSERTION(!aFC->mFloat->GetPrevContinuation(),
|
||||
"float in a line should never be a continuation");
|
||||
NS_ASSERTION(!(aFC->mFloat->GetStateBits() & NS_FRAME_IS_FLOAT_CONTINUATION),
|
||||
NS_ASSERTION(!(aFC->mFloat->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT),
|
||||
"float in a line should never be a pushed float");
|
||||
nsIFrame* ph = aBlock->PresContext()->FrameManager()->
|
||||
GetPlaceholderFrameFor(aFC->mFloat->GetFirstInFlow());
|
||||
|
@ -4447,15 +4447,15 @@ nsBlockFrame::DrainOverflowLines(nsBlockReflowState& aState)
|
|||
|
||||
// This function assumes our prev-in-flow has completed reflow and its
|
||||
// mFloats may contain frames at the end of its float list, marked with
|
||||
// NS_FRAME_IS_FLOAT_CONTINUATION, that should be pulled to this block.
|
||||
// NS_FRAME_IS_PUSHED_FLOAT, that should be pulled to this block.
|
||||
void
|
||||
nsBlockFrame::DrainFloatContinuations(nsBlockReflowState& aState)
|
||||
nsBlockFrame::DrainPushedFloats(nsBlockReflowState& aState)
|
||||
{
|
||||
// Take any continuations we need to take from our prev-in-flow.
|
||||
nsBlockFrame* prevBlock = static_cast<nsBlockFrame*>(GetPrevInFlow());
|
||||
if (!prevBlock)
|
||||
return;
|
||||
nsFrameList *list = prevBlock->RemoveFloatContinuations();
|
||||
nsFrameList *list = prevBlock->RemovePushedFloats();
|
||||
if (list) {
|
||||
if (list->NotEmpty()) {
|
||||
mFloats.InsertFrames(this, nsnull, *list);
|
||||
|
@ -4563,41 +4563,41 @@ nsBlockFrame::SetOverflowOutOfFlows(const nsFrameList& aList,
|
|||
}
|
||||
|
||||
nsFrameList*
|
||||
nsBlockFrame::GetFloatContinuations() const
|
||||
nsBlockFrame::GetPushedFloats() const
|
||||
{
|
||||
if (!(GetStateBits() & NS_BLOCK_HAS_FLOAT_CONTINUATIONS)) {
|
||||
if (!(GetStateBits() & NS_BLOCK_HAS_PUSHED_FLOATS)) {
|
||||
return nsnull;
|
||||
}
|
||||
nsFrameList* result =
|
||||
static_cast<nsFrameList*>(Properties().Get(FloatContinuationProperty()));
|
||||
static_cast<nsFrameList*>(Properties().Get(PushedFloatProperty()));
|
||||
NS_ASSERTION(result, "value should always be non-empty when state set");
|
||||
return result;
|
||||
}
|
||||
|
||||
nsFrameList*
|
||||
nsBlockFrame::EnsureFloatContinuations()
|
||||
nsBlockFrame::EnsurePushedFloats()
|
||||
{
|
||||
nsFrameList *result = GetFloatContinuations();
|
||||
nsFrameList *result = GetPushedFloats();
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
result = new nsFrameList;
|
||||
Properties().Set(FloatContinuationProperty(), result);
|
||||
AddStateBits(NS_BLOCK_HAS_FLOAT_CONTINUATIONS);
|
||||
Properties().Set(PushedFloatProperty(), result);
|
||||
AddStateBits(NS_BLOCK_HAS_PUSHED_FLOATS);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
nsFrameList*
|
||||
nsBlockFrame::RemoveFloatContinuations()
|
||||
nsBlockFrame::RemovePushedFloats()
|
||||
{
|
||||
if (!(GetStateBits() & NS_BLOCK_HAS_FLOAT_CONTINUATIONS)) {
|
||||
if (!(GetStateBits() & NS_BLOCK_HAS_PUSHED_FLOATS)) {
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
nsFrameList *result =
|
||||
static_cast<nsFrameList*>(Properties().Remove(FloatContinuationProperty()));
|
||||
RemoveStateBits(NS_BLOCK_HAS_FLOAT_CONTINUATIONS);
|
||||
static_cast<nsFrameList*>(Properties().Remove(PushedFloatProperty()));
|
||||
RemoveStateBits(NS_BLOCK_HAS_PUSHED_FLOATS);
|
||||
NS_ASSERTION(result, "value should always be non-empty when state set");
|
||||
return result;
|
||||
}
|
||||
|
@ -4935,7 +4935,7 @@ nsBlockFrame::RemoveFrame(nsIAtom* aListName,
|
|||
// we are removing; this way is a bit messy, but so is the rest of the code.
|
||||
// See bug 390762.
|
||||
NS_ASSERTION(!aOldFrame->GetPrevContinuation(),
|
||||
"RemoveFrame should not be called on float continuations.");
|
||||
"RemoveFrame should not be called on pushed floats.");
|
||||
for (nsIFrame* f = aOldFrame;
|
||||
f && !(f->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER);
|
||||
f = f->GetNextContinuation()) {
|
||||
|
@ -5421,7 +5421,7 @@ nsBlockFrame::StealFrame(nsPresContext* aPresContext,
|
|||
aChild->GetStyleDisplay()->IsFloating()) {
|
||||
PRBool removed = mFloats.RemoveFrameIfPresent(aChild);
|
||||
if (!removed) {
|
||||
nsFrameList* list = GetFloatContinuations();
|
||||
nsFrameList* list = GetPushedFloats();
|
||||
if (list) {
|
||||
removed = list->RemoveFrameIfPresent(aChild);
|
||||
}
|
||||
|
@ -5733,13 +5733,13 @@ nsBlockFrame::FindTrailingClear()
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsBlockFrame::ReflowFloatContinuations(nsBlockReflowState& aState,
|
||||
nsBlockFrame::ReflowPushedFloats(nsBlockReflowState& aState,
|
||||
nsRect& aBounds,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
for (nsIFrame* f = mFloats.FirstChild(), *next;
|
||||
f && (f->GetStateBits() & NS_FRAME_IS_FLOAT_CONTINUATION);
|
||||
f && (f->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT);
|
||||
f = next) {
|
||||
// save next sibling now, since reflowing could push the entire
|
||||
// float, changing its siblings
|
||||
|
@ -5789,7 +5789,7 @@ void
|
|||
nsBlockFrame::RecoverFloats(nsFloatManager& aFloatManager)
|
||||
{
|
||||
// Recover our own floats
|
||||
nsIFrame* stop = nsnull; // Stop before we reach float continuations that
|
||||
nsIFrame* stop = nsnull; // Stop before we reach pushed floats that
|
||||
// belong to our next-in-flow
|
||||
for (nsIFrame* f = mFloats.FirstChild(); f && f != stop; f = f->GetNextSibling()) {
|
||||
nsRect region = nsFloatManager::GetRegionFor(f);
|
||||
|
@ -6061,7 +6061,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
if (GetPrevInFlow()) {
|
||||
DisplayOverflowContainers(aBuilder, aDirtyRect, aLists);
|
||||
for (nsIFrame* f = mFloats.FirstChild(); f; f = f->GetNextSibling()) {
|
||||
if (f->GetStateBits() & NS_FRAME_IS_FLOAT_CONTINUATION)
|
||||
if (f->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT)
|
||||
BuildDisplayListForChild(aBuilder, f, aDirtyRect, aLists);
|
||||
}
|
||||
}
|
||||
|
@ -6681,9 +6681,9 @@ void nsBlockFrame::CollectFloats(nsIFrame* aFrame, nsFrameList& aList,
|
|||
aFrame->GetType() == nsGkAtoms::placeholderFrame ?
|
||||
nsLayoutUtils::GetFloatFromPlaceholder(aFrame) : nsnull;
|
||||
if (outOfFlowFrame) {
|
||||
if (outOfFlowFrame->GetStateBits() & NS_FRAME_IS_FLOAT_CONTINUATION) {
|
||||
if (outOfFlowFrame->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT) {
|
||||
if (outOfFlowFrame->GetParent() == this) {
|
||||
nsFrameList* list = GetFloatContinuations();
|
||||
nsFrameList* list = GetPushedFloats();
|
||||
if (!list || !list->RemoveFrameIfPresent(outOfFlowFrame)) {
|
||||
mFloats.RemoveFrame(outOfFlowFrame);
|
||||
}
|
||||
|
@ -6749,7 +6749,7 @@ nsBlockFrame::CheckFloats(nsBlockReflowState& aState)
|
|||
PRBool equal = PR_TRUE;
|
||||
PRUint32 i = 0;
|
||||
for (nsIFrame* f = mFloats.FirstChild(); f; f = f->GetNextSibling()) {
|
||||
if (f->GetStateBits() & NS_FRAME_IS_FLOAT_CONTINUATION)
|
||||
if (f->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT)
|
||||
continue;
|
||||
storedFloats.AppendElement(f);
|
||||
if (i < lineFloats.Length() && lineFloats.ElementAt(i) != f) {
|
||||
|
|
|
@ -94,7 +94,7 @@ class nsIntervalSet;
|
|||
* frame in a block's normal child list.
|
||||
* -- While a block is being reflowed, and from then until
|
||||
* its next-in-flow is reflowed it may have a
|
||||
* FloatContinuationProperty frame property that points to
|
||||
* PushedFloatProperty frame property that points to
|
||||
* an nsFrameList. This list contains continuations for
|
||||
* floats whose prev-in-flow is in the block's regular float
|
||||
* list and first-in-flows of floats that did not fit, but
|
||||
|
@ -118,7 +118,7 @@ class nsIntervalSet;
|
|||
* continuation chain or none of them.
|
||||
*/
|
||||
#define NS_BLOCK_NEEDS_BIDI_RESOLUTION NS_FRAME_STATE_BIT(20)
|
||||
#define NS_BLOCK_HAS_FLOAT_CONTINUATIONS NS_FRAME_STATE_BIT(21)
|
||||
#define NS_BLOCK_HAS_PUSHED_FLOATS NS_FRAME_STATE_BIT(21)
|
||||
#define NS_BLOCK_HAS_LINE_CURSOR NS_FRAME_STATE_BIT(24)
|
||||
#define NS_BLOCK_HAS_OVERFLOW_LINES NS_FRAME_STATE_BIT(25)
|
||||
#define NS_BLOCK_HAS_OVERFLOW_OUT_OF_FLOWS NS_FRAME_STATE_BIT(26)
|
||||
|
@ -161,7 +161,7 @@ public:
|
|||
|
||||
// This is a child list too, but we let nsBlockReflowState get to it
|
||||
// directly too.
|
||||
NS_DECLARE_FRAME_PROPERTY(FloatContinuationProperty,
|
||||
NS_DECLARE_FRAME_PROPERTY(PushedFloatProperty,
|
||||
nsContainerFrame::DestroyFrameList)
|
||||
|
||||
// nsQueryFrame
|
||||
|
@ -461,19 +461,19 @@ protected:
|
|||
*/
|
||||
PRBool DrainOverflowLines(nsBlockReflowState& aState);
|
||||
|
||||
/** grab float continuations from this block's prevInFlow, and splice
|
||||
/** grab pushed floats from this block's prevInFlow, and splice
|
||||
* them into this block's mFloats list.
|
||||
*/
|
||||
void DrainFloatContinuations(nsBlockReflowState& aState);
|
||||
void DrainPushedFloats(nsBlockReflowState& aState);
|
||||
|
||||
/** Load all our floats into the float manager (without reflowing them).
|
||||
* Assumes float manager is in our own coordinate system.
|
||||
*/
|
||||
void RecoverFloats(nsFloatManager& aFloatManager);
|
||||
|
||||
/** Reflow float continuations
|
||||
/** Reflow pushed floats
|
||||
*/
|
||||
nsresult ReflowFloatContinuations(nsBlockReflowState& aState,
|
||||
nsresult ReflowPushedFloats(nsBlockReflowState& aState,
|
||||
nsRect& aBounds,
|
||||
nsReflowStatus& aStatus);
|
||||
|
||||
|
@ -724,13 +724,13 @@ protected:
|
|||
nsFrameList* GetOverflowOutOfFlows() const;
|
||||
void SetOverflowOutOfFlows(const nsFrameList& aList, nsFrameList* aPropValue);
|
||||
|
||||
// Get the float continuations list
|
||||
nsFrameList* GetFloatContinuations() const;
|
||||
// Get the float continuations list, or if there is not currently one,
|
||||
// Get the pushed floats list
|
||||
nsFrameList* GetPushedFloats() const;
|
||||
// Get the pushed floats list, or if there is not currently one,
|
||||
// make a new empty one.
|
||||
nsFrameList* EnsureFloatContinuations();
|
||||
// Remove and return the float continuations list.
|
||||
nsFrameList* RemoveFloatContinuations();
|
||||
nsFrameList* EnsurePushedFloats();
|
||||
// Remove and return the pushed floats list.
|
||||
nsFrameList* RemovePushedFloats();
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
void VerifyLines(PRBool aFinalCheckOK);
|
||||
|
|
|
@ -71,7 +71,7 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState,
|
|||
: mBlock(aFrame),
|
||||
mPresContext(aPresContext),
|
||||
mReflowState(aReflowState),
|
||||
mFloatContinuations(nsnull),
|
||||
mPushedFloats(nsnull),
|
||||
mOverflowTracker(nsnull),
|
||||
mPrevBottomMargin(),
|
||||
mLineNumber(0),
|
||||
|
@ -426,19 +426,19 @@ nsBlockReflowState::ReconstructMarginAbove(nsLineList::iterator aLine)
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockReflowState::SetupFloatContinuationList()
|
||||
nsBlockReflowState::SetupPushedFloatList()
|
||||
{
|
||||
NS_ABORT_IF_FALSE(!GetFlag(BRS_PROPTABLE_FLOATCLIST) == !mFloatContinuations,
|
||||
NS_ABORT_IF_FALSE(!GetFlag(BRS_PROPTABLE_FLOATCLIST) == !mPushedFloats,
|
||||
"flag mismatch");
|
||||
if (!GetFlag(BRS_PROPTABLE_FLOATCLIST)) {
|
||||
// If we're being re-Reflow'd without our next-in-flow having been
|
||||
// reflowed, some float continuations from our previous reflow might
|
||||
// still be on our float continuations list. However, that's
|
||||
// reflowed, some pushed floats from our previous reflow might
|
||||
// still be on our pushed floats list. However, that's
|
||||
// actually fine, since they'll all end up being stolen and
|
||||
// reordered into the correct order again.
|
||||
// (nsBlockFrame::ReflowDirtyLines ensures that any lines with
|
||||
// pushed floats are reflowed.)
|
||||
mFloatContinuations = mBlock->EnsureFloatContinuations();
|
||||
mPushedFloats = mBlock->EnsurePushedFloats();
|
||||
SetFlag(BRS_PROPTABLE_FLOATCLIST, PR_TRUE);
|
||||
}
|
||||
}
|
||||
|
@ -552,10 +552,10 @@ nsBlockReflowState::AddFloat(nsLineLayout* aLineLayout,
|
|||
NS_ABORT_IF_FALSE(aFloat->GetParent()->IsFrameOfType(nsIFrame::eBlockFrame),
|
||||
"float's parent must be block");
|
||||
NS_ABORT_IF_FALSE(aFloat->GetParent() == mBlock ||
|
||||
(aFloat->GetStateBits() & NS_FRAME_IS_FLOAT_CONTINUATION),
|
||||
(aFloat->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT),
|
||||
"float should be in this block unless it was marked as "
|
||||
"float continuation");
|
||||
if (aFloat->GetStateBits() & NS_FRAME_IS_FLOAT_CONTINUATION) {
|
||||
"pushed float");
|
||||
if (aFloat->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT) {
|
||||
// If, in a previous reflow, the float was pushed entirely to
|
||||
// another column/page, we need to steal it back. (We might just
|
||||
// push it again, though.) Likewise, if that previous reflow
|
||||
|
@ -565,7 +565,7 @@ nsBlockReflowState::AddFloat(nsLineLayout* aLineLayout,
|
|||
static_cast<nsBlockFrame*>(aFloat->GetParent());
|
||||
floatParent->StealFrame(mPresContext, aFloat);
|
||||
|
||||
aFloat->RemoveStateBits(NS_FRAME_IS_FLOAT_CONTINUATION);
|
||||
aFloat->RemoveStateBits(NS_FRAME_IS_PUSHED_FLOAT);
|
||||
|
||||
// Appending is fine, since if a float was pushed to the next
|
||||
// page/column, all later floats were also pushed.
|
||||
|
@ -947,11 +947,11 @@ nsBlockReflowState::PushFloatPastBreak(nsIFrame *aFloat)
|
|||
mFloatManager->SetPushedRightFloatPastBreak();
|
||||
}
|
||||
|
||||
// Put the float on the float continuations list, even though it
|
||||
// Put the float on the pushed floats list, even though it
|
||||
// isn't actually a continuation.
|
||||
nsresult rv = mBlock->StealFrame(mPresContext, aFloat);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "StealFrame should succeed");
|
||||
AppendFloatContinuation(aFloat);
|
||||
AppendPushedFloat(aFloat);
|
||||
|
||||
NS_FRAME_SET_OVERFLOW_INCOMPLETE(mReflowStatus);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
// the current line
|
||||
#define BRS_LINE_LAYOUT_EMPTY 0x00000080
|
||||
#define BRS_ISOVERFLOWCONTAINER 0x00000100
|
||||
// Our mFloatContinuations list is stored on the blocks' proptable
|
||||
// Our mPushedFloats list is stored on the blocks' proptable
|
||||
#define BRS_PROPTABLE_FLOATCLIST 0x00000200
|
||||
#define BRS_LASTFLAG BRS_PROPTABLE_FLOATCLIST
|
||||
|
||||
|
@ -101,7 +101,7 @@ public:
|
|||
* The following functions all return PR_TRUE if they were able to
|
||||
* place the float, PR_FALSE if the float did not fit in available
|
||||
* space.
|
||||
* aLineLayout is null when we are reflowing float continuations (because
|
||||
* aLineLayout is null when we are reflowing pushed floats (because
|
||||
* they are not associated with a line box).
|
||||
*/
|
||||
PRBool AddFloat(nsLineLayout* aLineLayout,
|
||||
|
@ -230,15 +230,15 @@ public:
|
|||
// Continuation out-of-flow float frames that need to move to our
|
||||
// next in flow are placed here during reflow. It's a pointer to
|
||||
// a frame list stored in the block's property table.
|
||||
nsFrameList *mFloatContinuations;
|
||||
// This method makes sure float continuations are accessible to
|
||||
// StealFrame. Call it before adding any frames to mFloatContinuations.
|
||||
void SetupFloatContinuationList();
|
||||
// Use this method to append to mFloatContinuations.
|
||||
void AppendFloatContinuation(nsIFrame* aFloatCont) {
|
||||
SetupFloatContinuationList();
|
||||
aFloatCont->AddStateBits(NS_FRAME_IS_FLOAT_CONTINUATION);
|
||||
mFloatContinuations->AppendFrame(mBlock, aFloatCont);
|
||||
nsFrameList *mPushedFloats;
|
||||
// This method makes sure pushed floats are accessible to
|
||||
// StealFrame. Call it before adding any frames to mPushedFloats.
|
||||
void SetupPushedFloatList();
|
||||
// Use this method to append to mPushedFloats.
|
||||
void AppendPushedFloat(nsIFrame* aFloatCont) {
|
||||
SetupPushedFloatList();
|
||||
aFloatCont->AddStateBits(NS_FRAME_IS_PUSHED_FLOAT);
|
||||
mPushedFloats->AppendFrame(mBlock, aFloatCont);
|
||||
}
|
||||
|
||||
// Track child overflow continuations.
|
||||
|
|
|
@ -260,7 +260,7 @@ typedef PRUint64 nsFrameState;
|
|||
// placeholder. This can happen for two reasons: (1) the float was
|
||||
// split, and this piece is the continuation, or (2) the entire float
|
||||
// didn't fit on the page.
|
||||
#define NS_FRAME_IS_FLOAT_CONTINUATION NS_FRAME_STATE_BIT(32)
|
||||
#define NS_FRAME_IS_PUSHED_FLOAT NS_FRAME_STATE_BIT(32)
|
||||
|
||||
// The lower 20 bits and upper 32 bits of the frame state are reserved
|
||||
// by this API.
|
||||
|
|
Загрузка…
Ссылка в новой задаче