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