зеркало из https://github.com/mozilla/gecko-dev.git
Rename IsSplittable() to GetSplittableType(). b=349973 r+sr=bzbarsky
This commit is contained in:
Родитель
f6b613b4e7
Коммит
79090c0f4b
|
@ -10679,12 +10679,8 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
|
|||
nsIAtom* frameType = aFrame->GetType();
|
||||
nsIContent* content = aFrame->GetContent();
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
nsSplittableType splitType;
|
||||
aFrame->IsSplittable(splitType);
|
||||
NS_ASSERTION(splitType != NS_FRAME_NOT_SPLITTABLE,
|
||||
"why CreateContinuingFrame for a non-splittable frame?");
|
||||
#endif
|
||||
NS_ASSERTION(aFrame->GetSplittableType() != NS_FRAME_NOT_SPLITTABLE,
|
||||
"why CreateContinuingFrame for a non-splittable frame?");
|
||||
|
||||
if (nsLayoutAtoms::textFrame == frameType) {
|
||||
newFrame = NS_NewContinuingTextFrame(shell, styleContext);
|
||||
|
|
|
@ -344,11 +344,10 @@ nsBlockFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
|||
return nsBlockFrameSuper::QueryInterface(aIID, aInstancePtr);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBlockFrame::IsSplittable(nsSplittableType& aIsSplittable) const
|
||||
nsSplittableType
|
||||
nsBlockFrame::GetSplittableType() const
|
||||
{
|
||||
aIsSplittable = NS_FRAME_SPLITTABLE_NON_RECTANGULAR;
|
||||
return NS_OK;
|
||||
return NS_FRAME_SPLITTABLE_NON_RECTANGULAR;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -2839,10 +2838,8 @@ nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
|||
#endif
|
||||
PRBool isImpacted = aState.IsImpactedByFloat() ? PR_TRUE : PR_FALSE;
|
||||
aLine->SetLineIsImpactedByFloat(isImpacted);
|
||||
nsSplittableType splitType = NS_FRAME_NOT_SPLITTABLE;
|
||||
frame->IsSplittable(splitType);
|
||||
nsRect availSpace;
|
||||
aState.ComputeBlockAvailSpace(frame, splitType, display, availSpace);
|
||||
aState.ComputeBlockAvailSpace(frame, display, availSpace);
|
||||
|
||||
// Now put the Y coordinate back to the top of the top-margin +
|
||||
// clearance, and flow the block.
|
||||
|
|
|
@ -176,7 +176,7 @@ public:
|
|||
NS_IMETHOD SetParent(const nsIFrame* aParent);
|
||||
virtual nsIAtom* GetAdditionalChildListName(PRInt32 aIndex) const;
|
||||
virtual void Destroy();
|
||||
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
|
||||
virtual nsSplittableType GetSplittableType() const;
|
||||
virtual PRBool IsContainingBlock() const;
|
||||
virtual PRBool IsFloatContainingBlock() const;
|
||||
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
|
|
|
@ -188,7 +188,6 @@ nsBlockReflowState::FreeLineBox(nsLineBox* aLine)
|
|||
// GetAvailableSpace has already been called.
|
||||
void
|
||||
nsBlockReflowState::ComputeBlockAvailSpace(nsIFrame* aFrame,
|
||||
nsSplittableType aSplitType,
|
||||
const nsStyleDisplay* aDisplay,
|
||||
nsRect& aResult)
|
||||
{
|
||||
|
@ -206,8 +205,9 @@ nsBlockReflowState::ComputeBlockAvailSpace(nsIFrame* aFrame,
|
|||
// text controls are not splittable
|
||||
// XXXldb Why not just set the frame state bit?
|
||||
|
||||
if ((NS_FRAME_SPLITTABLE_NON_RECTANGULAR == aSplitType || // normal blocks
|
||||
NS_FRAME_NOT_SPLITTABLE == aSplitType) && // things like images mapped to display: block
|
||||
nsSplittableType splitType = aFrame->GetSplittableType();
|
||||
if ((NS_FRAME_SPLITTABLE_NON_RECTANGULAR == splitType || // normal blocks
|
||||
NS_FRAME_NOT_SPLITTABLE == splitType) && // things like images mapped to display: block
|
||||
!(aFrame->IsFrameOfType(nsIFrame::eReplaced)) && // but not replaced elements
|
||||
aFrame->GetType() != nsLayoutAtoms::scrollFrame) // or scroll frames
|
||||
{
|
||||
|
@ -577,9 +577,7 @@ nsBlockReflowState::AddFloat(nsLineLayout& aLineLayout,
|
|||
// Note that we could have unconstrained height and yet have
|
||||
// a next-in-flow placeholder --- for example columns can switch
|
||||
// from constrained height to unconstrained height.
|
||||
nsSplittableType splitType;
|
||||
aPlaceholder->IsSplittable(splitType);
|
||||
if (splitType == NS_FRAME_NOT_SPLITTABLE) {
|
||||
if (aPlaceholder->GetSplittableType() == NS_FRAME_NOT_SPLITTABLE) {
|
||||
placed = PR_FALSE;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -133,7 +133,6 @@ public:
|
|||
void ReconstructMarginAbove(nsLineList::iterator aLine);
|
||||
|
||||
void ComputeBlockAvailSpace(nsIFrame* aFrame,
|
||||
nsSplittableType aSplitType,
|
||||
const nsStyleDisplay* aDisplay,
|
||||
nsRect& aResult);
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
* Pierre Phaneuf <pp@ludusdesign.com>
|
||||
* Uri Bernstein <uriber@gmail.com>
|
||||
* Eli Friedman <sharparrow1@yahoo.com>
|
||||
* Mats Palmgren <mats.palmgren@bredband.net>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
|
@ -3238,10 +3239,10 @@ nsFrame::AttributeChanged(PRInt32 aNameSpaceID,
|
|||
|
||||
// Flow member functions
|
||||
|
||||
NS_IMETHODIMP nsFrame::IsSplittable(nsSplittableType& aIsSplittable) const
|
||||
nsSplittableType
|
||||
nsFrame::GetSplittableType() const
|
||||
{
|
||||
aIsSplittable = NS_FRAME_NOT_SPLITTABLE;
|
||||
return NS_OK;
|
||||
return NS_FRAME_NOT_SPLITTABLE;
|
||||
}
|
||||
|
||||
nsIFrame* nsFrame::GetPrevContinuation() const
|
||||
|
|
|
@ -223,7 +223,7 @@ public:
|
|||
NS_IMETHOD AttributeChanged(PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType);
|
||||
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
|
||||
virtual nsSplittableType GetSplittableType() const;
|
||||
virtual nsIFrame* GetPrevContinuation() const;
|
||||
NS_IMETHOD SetPrevContinuation(nsIFrame*);
|
||||
virtual nsIFrame* GetNextContinuation() const;
|
||||
|
|
|
@ -213,11 +213,10 @@ nsHTMLScrollFrame::RemoveFrame(nsIAtom* aListName,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLScrollFrame::IsSplittable(nsSplittableType& aIsSplittable) const
|
||||
nsSplittableType
|
||||
nsHTMLScrollFrame::GetSplittableType() const
|
||||
{
|
||||
aIsSplittable = NS_FRAME_NOT_SPLITTABLE;
|
||||
return NS_OK;
|
||||
return NS_FRAME_NOT_SPLITTABLE;
|
||||
}
|
||||
|
||||
PRIntn
|
||||
|
@ -1010,11 +1009,10 @@ nsXULScrollFrame::RemoveFrame(nsIAtom* aListName,
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULScrollFrame::IsSplittable(nsSplittableType& aIsSplittable) const
|
||||
nsSplittableType
|
||||
nsXULScrollFrame::GetSplittableType() const
|
||||
{
|
||||
aIsSplittable = NS_FRAME_NOT_SPLITTABLE;
|
||||
return NS_OK;
|
||||
return NS_FRAME_NOT_SPLITTABLE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -281,7 +281,7 @@ public:
|
|||
|
||||
virtual PRBool NeedsView() { return PR_TRUE; }
|
||||
virtual PRBool DoesClipChildren() { return PR_TRUE; }
|
||||
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
|
||||
virtual nsSplittableType GetSplittableType() const;
|
||||
|
||||
virtual nsPoint GetPositionOfChildIgnoringScrolling(nsIFrame* aChild)
|
||||
{ nsPoint pt = aChild->GetPosition();
|
||||
|
@ -435,7 +435,7 @@ public:
|
|||
|
||||
virtual PRBool NeedsView() { return PR_TRUE; }
|
||||
virtual PRBool DoesClipChildren() { return PR_TRUE; }
|
||||
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
|
||||
virtual nsSplittableType GetSplittableType() const;
|
||||
|
||||
virtual nsPoint GetPositionOfChildIgnoringScrolling(nsIFrame* aChild)
|
||||
{ nsPoint pt = aChild->GetPosition();
|
||||
|
|
|
@ -100,10 +100,10 @@ struct nsMargin;
|
|||
typedef class nsIFrame nsIBox;
|
||||
|
||||
// IID for the nsIFrame interface
|
||||
// 49d3ddd7-dc10-46f1-8554-98cefb2544a4
|
||||
// 42728a19-b289-48b8-b6f4-1a46b719a63b
|
||||
#define NS_IFRAME_IID \
|
||||
{ 0x49d3ddd7, 0xdc10, 0x46f1, \
|
||||
{ 0x85, 0x54, 0x98, 0xce, 0xfb, 0x25, 0x44, 0xa4 } }
|
||||
{ 0x42728a19, 0xb289, 0x48b8, \
|
||||
{ 0xb6, 0xf4, 0x1a, 0x46, 0xb7, 0x19, 0xa6, 0x3b } }
|
||||
|
||||
/**
|
||||
* Indication of how the frame can be split. This is used when doing runaround
|
||||
|
@ -116,7 +116,7 @@ typedef class nsIFrame nsIBox;
|
|||
* frame to be the same width then return frSplittable and not
|
||||
* frSplittableNonRectangular.
|
||||
*
|
||||
* @see #IsSplittable()
|
||||
* @see #GetSplittableType()
|
||||
*/
|
||||
typedef PRUint32 nsSplittableType;
|
||||
|
||||
|
@ -992,7 +992,7 @@ public:
|
|||
/**
|
||||
* Return how your frame can be split.
|
||||
*/
|
||||
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const = 0;
|
||||
virtual nsSplittableType GetSplittableType() const = 0;
|
||||
|
||||
/**
|
||||
* Continuation member functions
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Mats Palmgren <mats.palmgren@bredband.net>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
|
@ -136,11 +137,11 @@ nsPlaceholderFrame::Destroy()
|
|||
nsSplittableFrame::Destroy();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPlaceholderFrame::IsSplittable(nsSplittableType& aIsSplittable) const
|
||||
nsSplittableType
|
||||
nsPlaceholderFrame::GetSplittableType() const
|
||||
{
|
||||
NS_ASSERTION(mOutOfFlowFrame, "IsSplittable called at the wrong time");
|
||||
return mOutOfFlowFrame->IsSplittable(aIsSplittable);
|
||||
NS_ASSERTION(mOutOfFlowFrame, "GetSplittableType called at the wrong time");
|
||||
return mOutOfFlowFrame->GetSplittableType();
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
nsReflowStatus& aStatus);
|
||||
|
||||
virtual void Destroy();
|
||||
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
|
||||
virtual nsSplittableType GetSplittableType() const;
|
||||
|
||||
// nsIFrame overrides
|
||||
#if defined(DEBUG) || (defined(MOZ_REFLOW_PERF_DSP) && defined(MOZ_REFLOW_PERF))
|
||||
|
|
|
@ -73,11 +73,10 @@ nsSplittableFrame::Destroy()
|
|||
nsFrame::Destroy();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSplittableFrame::IsSplittable(nsSplittableType& aIsSplittable) const
|
||||
nsSplittableType
|
||||
nsSplittableFrame::GetSplittableType() const
|
||||
{
|
||||
aIsSplittable = NS_FRAME_SPLITTABLE;
|
||||
return NS_OK;
|
||||
return NS_FRAME_SPLITTABLE;
|
||||
}
|
||||
|
||||
nsIFrame* nsSplittableFrame::GetPrevContinuation() const
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
nsIFrame* aParent,
|
||||
nsIFrame* aPrevInFlow);
|
||||
|
||||
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
|
||||
virtual nsSplittableType GetSplittableType() const;
|
||||
|
||||
virtual void Destroy();
|
||||
|
||||
|
|
|
@ -309,9 +309,8 @@ public:
|
|||
virtual nsIFrame* GetLastInFlow() const;
|
||||
virtual nsIFrame* GetLastContinuation() const;
|
||||
|
||||
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const {
|
||||
aIsSplittable = NS_FRAME_SPLITTABLE;
|
||||
return NS_OK;
|
||||
virtual nsSplittableType GetSplittableType() const {
|
||||
return NS_FRAME_SPLITTABLE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче