Bug 852428 part 2. Make nsIFrame::Init infallible. r=dholbert
This commit is contained in:
@@ -4549,14 +4549,12 @@ nsCSSFrameConstructor::InitAndRestoreFrame(const nsFrameConstructorState& aState
|
|||||||
NS_PRECONDITION(mUpdateCount != 0,
|
NS_PRECONDITION(mUpdateCount != 0,
|
||||||
"Should be in an update while creating frames");
|
"Should be in an update while creating frames");
|
||||||
|
|
||||||
nsresult rv = NS_OK;
|
|
||||||
|
|
||||||
NS_ASSERTION(aNewFrame, "Null frame cannot be initialized");
|
NS_ASSERTION(aNewFrame, "Null frame cannot be initialized");
|
||||||
if (!aNewFrame)
|
if (!aNewFrame)
|
||||||
return NS_ERROR_NULL_POINTER;
|
return NS_ERROR_NULL_POINTER;
|
||||||
|
|
||||||
// Initialize the frame
|
// Initialize the frame
|
||||||
rv = aNewFrame->Init(aContent, aParentFrame, aPrevInFlow);
|
aNewFrame->Init(aContent, aParentFrame, aPrevInFlow);
|
||||||
aNewFrame->AddStateBits(aState.mAdditionalStateBits);
|
aNewFrame->AddStateBits(aState.mAdditionalStateBits);
|
||||||
|
|
||||||
if (aState.mFrameState) {
|
if (aState.mFrameState) {
|
||||||
@@ -4569,7 +4567,7 @@ nsCSSFrameConstructor::InitAndRestoreFrame(const nsFrameConstructorState& aState
|
|||||||
CountersDirty();
|
CountersDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<nsStyleContext>
|
already_AddRefed<nsStyleContext>
|
||||||
|
|||||||
@@ -1371,12 +1371,7 @@ nsComboboxControlFrame::CreateFrameFor(nsIContent* aContent)
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult rv = mDisplayFrame->Init(mContent, this, nullptr);
|
mDisplayFrame->Init(mContent, this, nullptr);
|
||||||
if (NS_FAILED(rv)) {
|
|
||||||
mDisplayFrame->Destroy();
|
|
||||||
mDisplayFrame = nullptr;
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a text frame and put it inside the block frame
|
// Create a text frame and put it inside the block frame
|
||||||
nsIFrame* textFrame = NS_NewTextFrame(shell, textStyleContext);
|
nsIFrame* textFrame = NS_NewTextFrame(shell, textStyleContext);
|
||||||
@@ -1385,14 +1380,7 @@ nsComboboxControlFrame::CreateFrameFor(nsIContent* aContent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// initialize the text frame
|
// initialize the text frame
|
||||||
rv = textFrame->Init(aContent, mDisplayFrame, nullptr);
|
textFrame->Init(aContent, mDisplayFrame, nullptr);
|
||||||
if (NS_FAILED(rv)) {
|
|
||||||
mDisplayFrame->Destroy();
|
|
||||||
mDisplayFrame = nullptr;
|
|
||||||
textFrame->Destroy();
|
|
||||||
textFrame = nullptr;
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
mDisplayContent->SetPrimaryFrame(textFrame);
|
mDisplayContent->SetPrimaryFrame(textFrame);
|
||||||
|
|
||||||
nsFrameList textList(textFrame, textFrame);
|
nsFrameList textList(textFrame, textFrame);
|
||||||
|
|||||||
@@ -71,20 +71,15 @@ nsFileControlFrame::nsFileControlFrame(nsStyleContext* aContext):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsFileControlFrame::Init(nsIContent* aContent,
|
nsFileControlFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv = nsBlockFrame::Init(aContent, aParent, aPrevInFlow);
|
nsBlockFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
mMouseListener = new BrowseMouseListener(this);
|
mMouseListener = new BrowseMouseListener(this);
|
||||||
NS_ENSURE_TRUE(mMouseListener, NS_ERROR_OUT_OF_MEMORY);
|
|
||||||
mCaptureMouseListener = new CaptureMouseListener(this);
|
mCaptureMouseListener = new CaptureMouseListener(this);
|
||||||
NS_ENSURE_TRUE(mCaptureMouseListener, NS_ERROR_OUT_OF_MEMORY);
|
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ class nsFileControlFrame : public nsBlockFrame,
|
|||||||
public:
|
public:
|
||||||
nsFileControlFrame(nsStyleContext* aContext);
|
nsFileControlFrame(nsStyleContext* aContext);
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
|
|||||||
@@ -58,17 +58,14 @@ nsHTMLButtonControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
|||||||
nsContainerFrame::DestroyFrom(aDestructRoot);
|
nsContainerFrame::DestroyFrom(aDestructRoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsHTMLButtonControlFrame::Init(
|
nsHTMLButtonControlFrame::Init(
|
||||||
nsIContent* aContent,
|
nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv = nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
if (NS_SUCCEEDED(rv)) {
|
mRenderer.SetFrame(this, PresContext());
|
||||||
mRenderer.SetFrame(this, PresContext());
|
|
||||||
}
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_QUERYFRAME_HEAD(nsHTMLButtonControlFrame)
|
NS_QUERYFRAME_HEAD(nsHTMLButtonControlFrame)
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ public:
|
|||||||
nsGUIEvent* aEvent,
|
nsGUIEvent* aEvent,
|
||||||
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
|
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* asPrevInFlow) MOZ_OVERRIDE;
|
nsIFrame* asPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsStyleContext* GetAdditionalStyleContext(int32_t aIndex) const;
|
virtual nsStyleContext* GetAdditionalStyleContext(int32_t aIndex) const;
|
||||||
virtual void SetAdditionalStyleContext(int32_t aIndex,
|
virtual void SetAdditionalStyleContext(int32_t aIndex,
|
||||||
|
|||||||
@@ -41,9 +41,9 @@ public:
|
|||||||
~nsImageControlFrame();
|
~nsImageControlFrame();
|
||||||
|
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_DECL_QUERYFRAME
|
NS_DECL_QUERYFRAME
|
||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
@@ -104,23 +104,20 @@ NS_NewImageControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
|||||||
|
|
||||||
NS_IMPL_FRAMEARENA_HELPERS(nsImageControlFrame)
|
NS_IMPL_FRAMEARENA_HELPERS(nsImageControlFrame)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsImageControlFrame::Init(nsIContent* aContent,
|
nsImageControlFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv = nsImageControlFrameSuper::Init(aContent, aParent, aPrevInFlow);
|
nsImageControlFrameSuper::Init(aContent, aParent, aPrevInFlow);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
// nsIntPoint allocation can fail, in which case we just set the property
|
|
||||||
// to null, which is safe
|
|
||||||
if (aPrevInFlow) {
|
if (aPrevInFlow) {
|
||||||
return NS_OK;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mContent->SetProperty(nsGkAtoms::imageClickedPoint,
|
mContent->SetProperty(nsGkAtoms::imageClickedPoint,
|
||||||
new nsIntPoint(0, 0),
|
new nsIntPoint(0, 0),
|
||||||
IntPointDtorFunc);
|
IntPointDtorFunc);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_QUERYFRAME_HEAD(nsImageControlFrame)
|
NS_QUERYFRAME_HEAD(nsImageControlFrame)
|
||||||
|
|||||||
@@ -984,23 +984,18 @@ nsListControlFrame::GetSizeAttribute(uint32_t *aSize) {
|
|||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsListControlFrame::Init(nsIContent* aContent,
|
nsListControlFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult result = nsHTMLScrollFrame::Init(aContent, aParent, aPrevInFlow);
|
nsHTMLScrollFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
|
|
||||||
// get the receiver interface from the browser button's content node
|
|
||||||
NS_ENSURE_STATE(mContent);
|
|
||||||
|
|
||||||
// we shouldn't have to unregister this listener because when
|
// we shouldn't have to unregister this listener because when
|
||||||
// our frame goes away all these content node go away as well
|
// our frame goes away all these content node go away as well
|
||||||
// because our frame is the only one who references them.
|
// because our frame is the only one who references them.
|
||||||
// we need to hook up our listeners before the editor is initialized
|
// we need to hook up our listeners before the editor is initialized
|
||||||
mEventListener = new nsListEventListener(this);
|
mEventListener = new nsListEventListener(this);
|
||||||
if (!mEventListener)
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
|
|
||||||
mContent->AddEventListener(NS_LITERAL_STRING("keypress"), mEventListener,
|
mContent->AddEventListener(NS_LITERAL_STRING("keypress"), mEventListener,
|
||||||
false, false);
|
false, false);
|
||||||
@@ -1019,8 +1014,6 @@ nsListControlFrame::Init(nsIContent* aContent,
|
|||||||
if (IsInDropDownMode()) {
|
if (IsInDropDownMode()) {
|
||||||
AddStateBits(NS_FRAME_IN_POPUP);
|
AddStateBits(NS_FRAME_IN_POPUP);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<nsIContent>
|
already_AddRefed<nsIContent>
|
||||||
|
|||||||
@@ -64,9 +64,9 @@ public:
|
|||||||
const nsHTMLReflowState& aReflowState,
|
const nsHTMLReflowState& aReflowState,
|
||||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD DidReflow(nsPresContext* aPresContext,
|
NS_IMETHOD DidReflow(nsPresContext* aPresContext,
|
||||||
const nsHTMLReflowState* aReflowState,
|
const nsHTMLReflowState* aReflowState,
|
||||||
|
|||||||
@@ -6455,7 +6455,7 @@ nsBlockFrame::ChildIsDirty(nsIFrame* aChild)
|
|||||||
nsBlockFrameSuper::ChildIsDirty(aChild);
|
nsBlockFrameSuper::ChildIsDirty(aChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsBlockFrame::Init(nsIContent* aContent,
|
nsBlockFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -6466,7 +6466,7 @@ nsBlockFrame::Init(nsIContent* aContent,
|
|||||||
(NS_BLOCK_FLAGS_MASK & ~NS_BLOCK_FLAGS_NON_INHERITED_MASK));
|
(NS_BLOCK_FLAGS_MASK & ~NS_BLOCK_FLAGS_NON_INHERITED_MASK));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult rv = nsBlockFrameSuper::Init(aContent, aParent, aPrevInFlow);
|
nsBlockFrameSuper::Init(aContent, aParent, aPrevInFlow);
|
||||||
|
|
||||||
if (!aPrevInFlow ||
|
if (!aPrevInFlow ||
|
||||||
aPrevInFlow->GetStateBits() & NS_BLOCK_NEEDS_BIDI_RESOLUTION)
|
aPrevInFlow->GetStateBits() & NS_BLOCK_NEEDS_BIDI_RESOLUTION)
|
||||||
@@ -6477,8 +6477,6 @@ nsBlockFrame::Init(nsIContent* aContent,
|
|||||||
(NS_FRAME_FONT_INFLATION_CONTAINER | NS_BLOCK_FLOAT_MGR)) {
|
(NS_FRAME_FONT_INFLATION_CONTAINER | NS_BLOCK_FLOAT_MGR)) {
|
||||||
AddStateBits(NS_FRAME_FONT_INFLATION_FLOW_ROOT);
|
AddStateBits(NS_FRAME_FONT_INFLATION_FLOW_ROOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|||||||
@@ -135,9 +135,9 @@ public:
|
|||||||
NS_DECL_QUERYFRAME
|
NS_DECL_QUERYFRAME
|
||||||
|
|
||||||
// nsIFrame
|
// nsIFrame
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
||||||
nsFrameList& aChildList);
|
nsFrameList& aChildList);
|
||||||
NS_IMETHOD AppendFrames(ChildListID aListID,
|
NS_IMETHOD AppendFrames(ChildListID aListID,
|
||||||
|
|||||||
@@ -59,12 +59,12 @@ NS_QUERYFRAME_HEAD(nsContainerFrame)
|
|||||||
NS_QUERYFRAME_ENTRY(nsContainerFrame)
|
NS_QUERYFRAME_ENTRY(nsContainerFrame)
|
||||||
NS_QUERYFRAME_TAIL_INHERITING(nsSplittableFrame)
|
NS_QUERYFRAME_TAIL_INHERITING(nsSplittableFrame)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsContainerFrame::Init(nsIContent* aContent,
|
nsContainerFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv = nsSplittableFrame::Init(aContent, aParent, aPrevInFlow);
|
nsSplittableFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
if (aPrevInFlow) {
|
if (aPrevInFlow) {
|
||||||
// Make sure we copy bits from our prev-in-flow that will affect
|
// Make sure we copy bits from our prev-in-flow that will affect
|
||||||
// us. A continuation for a container frame needs to know if it
|
// us. A continuation for a container frame needs to know if it
|
||||||
@@ -72,7 +72,6 @@ nsContainerFrame::Init(nsIContent* aContent,
|
|||||||
if (aPrevInFlow->GetStateBits() & NS_FRAME_HAS_CHILD_WITH_VIEW)
|
if (aPrevInFlow->GetStateBits() & NS_FRAME_HAS_CHILD_WITH_VIEW)
|
||||||
AddStateBits(NS_FRAME_HAS_CHILD_WITH_VIEW);
|
AddStateBits(NS_FRAME_HAS_CHILD_WITH_VIEW);
|
||||||
}
|
}
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|||||||
@@ -53,9 +53,9 @@ public:
|
|||||||
NS_DECL_QUERYFRAME
|
NS_DECL_QUERYFRAME
|
||||||
|
|
||||||
// nsIFrame overrides
|
// nsIFrame overrides
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
||||||
nsFrameList& aChildList) MOZ_OVERRIDE;
|
nsFrameList& aChildList) MOZ_OVERRIDE;
|
||||||
NS_IMETHOD AppendFrames(ChildListID aListID,
|
NS_IMETHOD AppendFrames(ChildListID aListID,
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ nsFirstLetterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsFirstLetterFrame::Init(nsIContent* aContent,
|
nsFirstLetterFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -73,7 +73,7 @@ nsFirstLetterFrame::Init(nsIContent* aContent,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ public:
|
|||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
||||||
nsFrameList& aChildList) MOZ_OVERRIDE;
|
nsFrameList& aChildList) MOZ_OVERRIDE;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|||||||
@@ -492,7 +492,7 @@ IsFontSizeInflationContainer(nsIFrame* aFrame,
|
|||||||
return !isInline;
|
return !isInline;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsFrame::Init(nsIContent* aContent,
|
nsFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -560,8 +560,6 @@ nsFrame::Init(nsIContent* aContent,
|
|||||||
|
|
||||||
if (IsBoxWrapped())
|
if (IsBoxWrapped())
|
||||||
InitBoxMetrics(false);
|
InitBoxMetrics(false);
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsFrame::SetInitialChildList(ChildListID aListID,
|
NS_IMETHODIMP nsFrame::SetInitialChildList(ChildListID aListID,
|
||||||
|
|||||||
@@ -142,9 +142,9 @@ public:
|
|||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
// nsIFrame
|
// nsIFrame
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* asPrevInFlow);
|
nsIFrame* asPrevInFlow) MOZ_OVERRIDE;
|
||||||
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
||||||
nsFrameList& aChildList);
|
nsFrameList& aChildList);
|
||||||
NS_IMETHOD AppendFrames(ChildListID aListID,
|
NS_IMETHOD AppendFrames(ChildListID aListID,
|
||||||
|
|||||||
@@ -249,14 +249,13 @@ nsHTMLFramesetFrame::FrameResizePrefCallback(const char* aPref, void* aClosure)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsHTMLFramesetFrame::Init(nsIContent* aContent,
|
nsHTMLFramesetFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
// find the highest ancestor that is a frameset
|
// find the highest ancestor that is a frameset
|
||||||
nsresult rv = NS_OK;
|
|
||||||
nsIFrame* parentFrame = GetParent();
|
nsIFrame* parentFrame = GetParent();
|
||||||
mTopLevelFrameset = this;
|
mTopLevelFrameset = this;
|
||||||
while (parentFrame) {
|
while (parentFrame) {
|
||||||
@@ -281,17 +280,15 @@ nsHTMLFramesetFrame::Init(nsIContent* aContent,
|
|||||||
NS_ASSERTION(ourContent, "Someone gave us a broken frameset element!");
|
NS_ASSERTION(ourContent, "Someone gave us a broken frameset element!");
|
||||||
const nsFramesetSpec* rowSpecs = nullptr;
|
const nsFramesetSpec* rowSpecs = nullptr;
|
||||||
const nsFramesetSpec* colSpecs = nullptr;
|
const nsFramesetSpec* colSpecs = nullptr;
|
||||||
nsresult result = ourContent->GetRowSpec(&mNumRows, &rowSpecs);
|
// GetRowSpec and GetColSpec can fail, but when they do they set
|
||||||
NS_ENSURE_SUCCESS(result, result);
|
// mNumRows and mNumCols respectively to 0, so we deal with it fine.
|
||||||
result = ourContent->GetColSpec(&mNumCols, &colSpecs);
|
ourContent->GetRowSpec(&mNumRows, &rowSpecs);
|
||||||
NS_ENSURE_SUCCESS(result, result);
|
ourContent->GetColSpec(&mNumCols, &colSpecs);
|
||||||
|
|
||||||
// Maximum value of mNumRows and mNumCols is NS_MAX_FRAMESET_SPEC_COUNT
|
// Maximum value of mNumRows and mNumCols is NS_MAX_FRAMESET_SPEC_COUNT
|
||||||
PR_STATIC_ASSERT(NS_MAX_FRAMESET_SPEC_COUNT < UINT_MAX / sizeof(nscoord));
|
PR_STATIC_ASSERT(NS_MAX_FRAMESET_SPEC_COUNT < UINT_MAX / sizeof(nscoord));
|
||||||
mRowSizes = new nscoord[mNumRows];
|
mRowSizes = new nscoord[mNumRows];
|
||||||
mColSizes = new nscoord[mNumCols];
|
mColSizes = new nscoord[mNumCols];
|
||||||
if (!mRowSizes || !mColSizes)
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
|
|
||||||
// Ensure we can't overflow numCells
|
// Ensure we can't overflow numCells
|
||||||
PR_STATIC_ASSERT(NS_MAX_FRAMESET_SPEC_COUNT < INT32_MAX / NS_MAX_FRAMESET_SPEC_COUNT);
|
PR_STATIC_ASSERT(NS_MAX_FRAMESET_SPEC_COUNT < INT32_MAX / NS_MAX_FRAMESET_SPEC_COUNT);
|
||||||
@@ -299,15 +296,11 @@ nsHTMLFramesetFrame::Init(nsIContent* aContent,
|
|||||||
|
|
||||||
PR_STATIC_ASSERT(NS_MAX_FRAMESET_SPEC_COUNT < UINT_MAX / sizeof(nsHTMLFramesetBorderFrame*));
|
PR_STATIC_ASSERT(NS_MAX_FRAMESET_SPEC_COUNT < UINT_MAX / sizeof(nsHTMLFramesetBorderFrame*));
|
||||||
mVerBorders = new nsHTMLFramesetBorderFrame*[mNumCols]; // 1 more than number of ver borders
|
mVerBorders = new nsHTMLFramesetBorderFrame*[mNumCols]; // 1 more than number of ver borders
|
||||||
if (!mVerBorders)
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
|
|
||||||
for (int verX = 0; verX < mNumCols; verX++)
|
for (int verX = 0; verX < mNumCols; verX++)
|
||||||
mVerBorders[verX] = nullptr;
|
mVerBorders[verX] = nullptr;
|
||||||
|
|
||||||
mHorBorders = new nsHTMLFramesetBorderFrame*[mNumRows]; // 1 more than number of hor borders
|
mHorBorders = new nsHTMLFramesetBorderFrame*[mNumRows]; // 1 more than number of hor borders
|
||||||
if (!mHorBorders)
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
|
|
||||||
for (int horX = 0; horX < mNumRows; horX++)
|
for (int horX = 0; horX < mNumRows; horX++)
|
||||||
mHorBorders[horX] = nullptr;
|
mHorBorders[horX] = nullptr;
|
||||||
@@ -320,8 +313,6 @@ nsHTMLFramesetFrame::Init(nsIContent* aContent,
|
|||||||
< UINT_MAX / sizeof(nsBorderColor) / NS_MAX_FRAMESET_SPEC_COUNT);
|
< UINT_MAX / sizeof(nsBorderColor) / NS_MAX_FRAMESET_SPEC_COUNT);
|
||||||
mChildFrameborder = new nsFrameborder[numCells];
|
mChildFrameborder = new nsFrameborder[numCells];
|
||||||
mChildBorderColors = new nsBorderColor[numCells];
|
mChildBorderColors = new nsBorderColor[numCells];
|
||||||
if (!mChildFrameborder || !mChildBorderColors)
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
|
|
||||||
// create the children frames; skip content which isn't <frameset> or <frame>
|
// create the children frames; skip content which isn't <frameset> or <frame>
|
||||||
mChildCount = 0; // number of <frame> or <frameset> children
|
mChildCount = 0; // number of <frame> or <frameset> children
|
||||||
@@ -359,45 +350,29 @@ nsHTMLFramesetFrame::Init(nsIContent* aContent,
|
|||||||
nsIAtom *tag = child->Tag();
|
nsIAtom *tag = child->Tag();
|
||||||
if (tag == nsGkAtoms::frameset || tag == nsGkAtoms::frame) {
|
if (tag == nsGkAtoms::frameset || tag == nsGkAtoms::frame) {
|
||||||
nsRefPtr<nsStyleContext> kidSC;
|
nsRefPtr<nsStyleContext> kidSC;
|
||||||
nsresult result;
|
|
||||||
|
|
||||||
kidSC = shell->StyleSet()->ResolveStyleFor(child->AsElement(),
|
kidSC = shell->StyleSet()->ResolveStyleFor(child->AsElement(),
|
||||||
mStyleContext);
|
mStyleContext);
|
||||||
if (tag == nsGkAtoms::frameset) {
|
if (tag == nsGkAtoms::frameset) {
|
||||||
frame = NS_NewHTMLFramesetFrame(shell, kidSC);
|
frame = NS_NewHTMLFramesetFrame(shell, kidSC);
|
||||||
if (MOZ_UNLIKELY(!frame))
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
|
|
||||||
nsHTMLFramesetFrame* childFrame = (nsHTMLFramesetFrame*)frame;
|
nsHTMLFramesetFrame* childFrame = (nsHTMLFramesetFrame*)frame;
|
||||||
childFrame->SetParentFrameborder(frameborder);
|
childFrame->SetParentFrameborder(frameborder);
|
||||||
childFrame->SetParentBorderWidth(borderWidth);
|
childFrame->SetParentBorderWidth(borderWidth);
|
||||||
childFrame->SetParentBorderColor(borderColor);
|
childFrame->SetParentBorderColor(borderColor);
|
||||||
result = frame->Init(child, this, nullptr);
|
frame->Init(child, this, nullptr);
|
||||||
if (NS_FAILED(result)) {
|
|
||||||
frame->Destroy();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
mChildBorderColors[mChildCount].Set(childFrame->GetBorderColor());
|
mChildBorderColors[mChildCount].Set(childFrame->GetBorderColor());
|
||||||
} else { // frame
|
} else { // frame
|
||||||
frame = NS_NewSubDocumentFrame(shell, kidSC);
|
frame = NS_NewSubDocumentFrame(shell, kidSC);
|
||||||
if (MOZ_UNLIKELY(!frame))
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
|
|
||||||
result = frame->Init(child, this, nullptr);
|
frame->Init(child, this, nullptr);
|
||||||
if (NS_FAILED(result)) {
|
|
||||||
frame->Destroy();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
mChildFrameborder[mChildCount] = GetFrameBorder(child);
|
mChildFrameborder[mChildCount] = GetFrameBorder(child);
|
||||||
mChildBorderColors[mChildCount].Set(GetBorderColor(child));
|
mChildBorderColors[mChildCount].Set(GetBorderColor(child));
|
||||||
}
|
}
|
||||||
child->SetPrimaryFrame(frame);
|
child->SetPrimaryFrame(frame);
|
||||||
|
|
||||||
if (NS_FAILED(result))
|
|
||||||
return result;
|
|
||||||
|
|
||||||
mFrames.AppendFrame(nullptr, frame);
|
mFrames.AppendFrame(nullptr, frame);
|
||||||
|
|
||||||
mChildCount++;
|
mChildCount++;
|
||||||
@@ -410,19 +385,12 @@ nsHTMLFramesetFrame::Init(nsIContent* aContent,
|
|||||||
nsRefPtr<nsStyleContext> pseudoStyleContext;
|
nsRefPtr<nsStyleContext> pseudoStyleContext;
|
||||||
pseudoStyleContext = shell->StyleSet()->
|
pseudoStyleContext = shell->StyleSet()->
|
||||||
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::framesetBlank, mStyleContext);
|
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::framesetBlank, mStyleContext);
|
||||||
if (!pseudoStyleContext) {
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
}
|
|
||||||
|
|
||||||
// XXX the blank frame is using the content of its parent - at some point it
|
// XXX the blank frame is using the content of its parent - at some point it
|
||||||
// should just have null content, if we support that
|
// should just have null content, if we support that
|
||||||
nsHTMLFramesetBlankFrame* blankFrame = new (shell) nsHTMLFramesetBlankFrame(pseudoStyleContext);
|
nsHTMLFramesetBlankFrame* blankFrame = new (shell) nsHTMLFramesetBlankFrame(pseudoStyleContext);
|
||||||
|
|
||||||
result = blankFrame->Init(mContent, this, nullptr);
|
blankFrame->Init(mContent, this, nullptr);
|
||||||
if (NS_FAILED(result)) {
|
|
||||||
blankFrame->Destroy();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
mFrames.AppendFrame(nullptr, blankFrame);
|
mFrames.AppendFrame(nullptr, blankFrame);
|
||||||
|
|
||||||
@@ -431,7 +399,6 @@ nsHTMLFramesetFrame::Init(nsIContent* aContent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
mNonBorderChildCount = mChildCount;
|
mNonBorderChildCount = mChildCount;
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|||||||
@@ -78,9 +78,9 @@ public:
|
|||||||
|
|
||||||
virtual ~nsHTMLFramesetFrame();
|
virtual ~nsHTMLFramesetFrame();
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
||||||
nsFrameList& aChildList);
|
nsFrameList& aChildList);
|
||||||
|
|||||||
@@ -90,19 +90,17 @@ NS_NewHTMLCanvasFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
|||||||
|
|
||||||
NS_IMPL_FRAMEARENA_HELPERS(nsHTMLCanvasFrame)
|
NS_IMPL_FRAMEARENA_HELPERS(nsHTMLCanvasFrame)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsHTMLCanvasFrame::Init(nsIContent* aContent,
|
nsHTMLCanvasFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv = nsSplittableFrame::Init(aContent, aParent, aPrevInFlow);
|
nsSplittableFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
|
|
||||||
// We can fill in the canvas before the canvas frame is created, in
|
// We can fill in the canvas before the canvas frame is created, in
|
||||||
// which case we never get around to marking the layer active. Therefore,
|
// which case we never get around to marking the layer active. Therefore,
|
||||||
// we mark it active here when we create the frame.
|
// we mark it active here when we create the frame.
|
||||||
MarkLayersActive(nsChangeHint(0));
|
MarkLayersActive(nsChangeHint(0));
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsHTMLCanvasFrame::~nsHTMLCanvasFrame()
|
nsHTMLCanvasFrame::~nsHTMLCanvasFrame()
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ public:
|
|||||||
|
|
||||||
nsHTMLCanvasFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
|
nsHTMLCanvasFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
|
|||||||
@@ -577,17 +577,15 @@ public:
|
|||||||
* frame (the frame that was split).
|
* frame (the frame that was split).
|
||||||
*
|
*
|
||||||
* If you want a view associated with your frame, you should create the view
|
* If you want a view associated with your frame, you should create the view
|
||||||
* now.
|
* after Init() has returned.
|
||||||
*
|
*
|
||||||
* @param aContent the content object associated with the frame
|
* @param aContent the content object associated with the frame
|
||||||
* @param aGeometricParent the geometric parent frame
|
* @param aParent the parent frame
|
||||||
* @param aContentParent the content parent frame
|
|
||||||
* @param aContext the style context associated with the frame
|
|
||||||
* @param aPrevInFlow the prev-in-flow frame
|
* @param aPrevInFlow the prev-in-flow frame
|
||||||
*/
|
*/
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) = 0;
|
nsIFrame* aPrevInFlow) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroys this frame and each of its child frames (recursively calls
|
* Destroys this frame and each of its child frames (recursively calls
|
||||||
|
|||||||
@@ -226,18 +226,19 @@ nsImageFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsImageFrame::Init(nsIContent* aContent,
|
nsImageFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv = nsSplittableFrame::Init(aContent, aParent, aPrevInFlow);
|
nsSplittableFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
mListener = new nsImageListener(this);
|
mListener = new nsImageListener(this);
|
||||||
|
|
||||||
nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(aContent);
|
nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(aContent);
|
||||||
NS_ENSURE_TRUE(imageLoader, NS_ERROR_UNEXPECTED);
|
if (!imageLoader) {
|
||||||
|
NS_RUNTIMEABORT("Why do we have an nsImageFrame here at all?");
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
// Push a null JSContext on the stack so that code that runs
|
// Push a null JSContext on the stack so that code that runs
|
||||||
@@ -275,8 +276,6 @@ nsImageFrame::Init(nsIContent* aContent,
|
|||||||
image->SetAnimationMode(aPresContext->ImageAnimationMode());
|
image->SetAnimationMode(aPresContext->ImageAnimationMode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|||||||
@@ -74,9 +74,9 @@ public:
|
|||||||
NS_DECL_QUERYFRAME
|
NS_DECL_QUERYFRAME
|
||||||
|
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ NS_IMETHODIMP nsObjectFrame::GetPluginPort(HWND *aPort)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsObjectFrame::Init(nsIContent* aContent,
|
nsObjectFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -296,9 +296,7 @@ nsObjectFrame::Init(nsIContent* aContent,
|
|||||||
PR_LOG(GetObjectFrameLog(), PR_LOG_DEBUG,
|
PR_LOG(GetObjectFrameLog(), PR_LOG_DEBUG,
|
||||||
("Initializing nsObjectFrame %p for content %p\n", this, aContent));
|
("Initializing nsObjectFrame %p for content %p\n", this, aContent));
|
||||||
|
|
||||||
nsresult rv = nsObjectFrameSuper::Init(aContent, aParent, aPrevInFlow);
|
nsObjectFrameSuper::Init(aContent, aParent, aPrevInFlow);
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -50,9 +50,9 @@ public:
|
|||||||
NS_DECL_QUERYFRAME
|
NS_DECL_QUERYFRAME
|
||||||
NS_DECL_QUERYFRAME_TARGET(nsObjectFrame)
|
NS_DECL_QUERYFRAME_TARGET(nsObjectFrame)
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
|
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
|
||||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext);
|
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext);
|
||||||
NS_IMETHOD Reflow(nsPresContext* aPresContext,
|
NS_IMETHOD Reflow(nsPresContext* aPresContext,
|
||||||
|
|||||||
@@ -15,20 +15,18 @@
|
|||||||
|
|
||||||
NS_IMPL_FRAMEARENA_HELPERS(nsSplittableFrame)
|
NS_IMPL_FRAMEARENA_HELPERS(nsSplittableFrame)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSplittableFrame::Init(nsIContent* aContent,
|
nsSplittableFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv = nsFrame::Init(aContent, aParent, aPrevInFlow);
|
nsFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
|
|
||||||
if (aPrevInFlow) {
|
if (aPrevInFlow) {
|
||||||
// Hook the frame into the flow
|
// Hook the frame into the flow
|
||||||
SetPrevInFlow(aPrevInFlow);
|
SetPrevInFlow(aPrevInFlow);
|
||||||
aPrevInFlow->SetNextInFlow(this);
|
aPrevInFlow->SetNextInFlow(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ class nsSplittableFrame : public nsFrame
|
|||||||
public:
|
public:
|
||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsSplittableType GetSplittableType() const;
|
virtual nsSplittableType GetSplittableType() const;
|
||||||
|
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ InsertViewsInReverseOrder(nsView* aSibling, nsView* aParent);
|
|||||||
static void
|
static void
|
||||||
EndSwapDocShellsForViews(nsView* aView);
|
EndSwapDocShellsForViews(nsView* aView);
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSubDocumentFrame::Init(nsIContent* aContent,
|
nsSubDocumentFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -125,9 +125,7 @@ nsSubDocumentFrame::Init(nsIContent* aContent,
|
|||||||
mIsInline = frameElem ? false : true;
|
mIsInline = frameElem ? false : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult rv = nsLeafFrame::Init(aContent, aParent, aPrevInFlow);
|
nsLeafFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
if (NS_FAILED(rv))
|
|
||||||
return rv;
|
|
||||||
|
|
||||||
// We are going to create an inner view. If we need a view for the
|
// We are going to create an inner view. If we need a view for the
|
||||||
// OuterFrame but we wait for the normal view creation path in
|
// OuterFrame but we wait for the normal view creation path in
|
||||||
@@ -169,7 +167,6 @@ nsSubDocumentFrame::Init(nsIContent* aContent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsContentUtils::AddScriptRunner(new AsyncFrameInit(this));
|
nsContentUtils::AddScriptRunner(new AsyncFrameInit(this));
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int32_t ConvertOverflow(uint8_t aOverflow)
|
inline int32_t ConvertOverflow(uint8_t aOverflow)
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ public:
|
|||||||
~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
|
~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||||
|
|
||||||
|
|||||||
@@ -55,9 +55,9 @@ public:
|
|||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||||
|
|
||||||
|
|||||||
@@ -3912,7 +3912,7 @@ nsTextFrame::AccessibleType()
|
|||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsTextFrame::Init(nsIContent* aContent,
|
nsTextFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -3933,7 +3933,7 @@ nsTextFrame::Init(nsIContent* aContent,
|
|||||||
|
|
||||||
// We're not a continuing frame.
|
// We're not a continuing frame.
|
||||||
// mContentOffset = 0; not necessary since we get zeroed out at init
|
// mContentOffset = 0; not necessary since we get zeroed out at init
|
||||||
return nsFrame::Init(aContent, aParent, aPrevInFlow);
|
nsFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -3975,9 +3975,9 @@ public:
|
|||||||
|
|
||||||
friend nsIFrame* NS_NewContinuingTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
friend nsIFrame* NS_NewContinuingTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||||
|
|
||||||
@@ -4026,14 +4026,14 @@ protected:
|
|||||||
nsIFrame* mPrevContinuation;
|
nsIFrame* mPrevContinuation;
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsContinuingTextFrame::Init(nsIContent* aContent,
|
nsContinuingTextFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
NS_ASSERTION(aPrevInFlow, "Must be a continuation!");
|
NS_ASSERTION(aPrevInFlow, "Must be a continuation!");
|
||||||
// NOTE: bypassing nsTextFrame::Init!!!
|
// NOTE: bypassing nsTextFrame::Init!!!
|
||||||
nsresult rv = nsFrame::Init(aContent, aParent, aPrevInFlow);
|
nsFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
|
|
||||||
#ifdef IBMBIDI
|
#ifdef IBMBIDI
|
||||||
nsTextFrame* nextContinuation =
|
nsTextFrame* nextContinuation =
|
||||||
@@ -4092,8 +4092,6 @@ nsContinuingTextFrame::Init(nsIContent* aContent,
|
|||||||
mState |= NS_FRAME_IS_BIDI;
|
mState |= NS_FRAME_IS_BIDI;
|
||||||
} // prev frame is bidi
|
} // prev frame is bidi
|
||||||
#endif // IBMBIDI
|
#endif // IBMBIDI
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -29,12 +29,12 @@ NS_NewViewportFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
|||||||
|
|
||||||
NS_IMPL_FRAMEARENA_HELPERS(ViewportFrame)
|
NS_IMPL_FRAMEARENA_HELPERS(ViewportFrame)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
ViewportFrame::Init(nsIContent* aContent,
|
ViewportFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv = Super::Init(aContent, aParent, aPrevInFlow);
|
Super::Init(aContent, aParent, aPrevInFlow);
|
||||||
|
|
||||||
nsIFrame* parent = nsLayoutUtils::GetCrossDocParentFrame(this);
|
nsIFrame* parent = nsLayoutUtils::GetCrossDocParentFrame(this);
|
||||||
if (parent) {
|
if (parent) {
|
||||||
@@ -42,8 +42,6 @@ ViewportFrame::Init(nsIContent* aContent,
|
|||||||
|
|
||||||
mState |= state & (NS_FRAME_IN_POPUP);
|
mState |= state & (NS_FRAME_IN_POPUP);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ public:
|
|||||||
{}
|
{}
|
||||||
virtual ~ViewportFrame() { } // useful for debugging
|
virtual ~ViewportFrame() { } // useful for debugging
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* asPrevInFlow) MOZ_OVERRIDE;
|
nsIFrame* asPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
||||||
nsFrameList& aChildList) MOZ_OVERRIDE;
|
nsFrameList& aChildList) MOZ_OVERRIDE;
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ nsMathMLmactionFrame::~nsMathMLmactionFrame()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsMathMLmactionFrame::Init(nsIContent* aContent,
|
nsMathMLmactionFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -104,7 +104,7 @@ nsMathMLmactionFrame::Init(nsIContent* aContent,
|
|||||||
mActionType = GetActionType(aContent);
|
mActionType = GetActionType(aContent);
|
||||||
|
|
||||||
// Let the base class do the rest
|
// Let the base class do the rest
|
||||||
return nsMathMLContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
nsMathMLContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ public:
|
|||||||
NS_IMETHOD
|
NS_IMETHOD
|
||||||
TransmitAutomaticData();
|
TransmitAutomaticData();
|
||||||
|
|
||||||
NS_IMETHOD
|
virtual void
|
||||||
Init(nsIContent* aContent,
|
Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD
|
NS_IMETHOD
|
||||||
SetInitialChildList(ChildListID aListID,
|
SetInitialChildList(ChildListID aListID,
|
||||||
|
|||||||
@@ -51,12 +51,12 @@ nsMathMLmrootFrame::~nsMathMLmrootFrame()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsMathMLmrootFrame::Init(nsIContent* aContent,
|
nsMathMLmrootFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv = nsMathMLContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
nsMathMLContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
|
|
||||||
nsPresContext *presContext = PresContext();
|
nsPresContext *presContext = PresContext();
|
||||||
|
|
||||||
@@ -66,8 +66,6 @@ nsMathMLmrootFrame::Init(nsIContent* aContent,
|
|||||||
nsAutoString sqrChar; sqrChar.Assign(kSqrChar);
|
nsAutoString sqrChar; sqrChar.Assign(kSqrChar);
|
||||||
mSqrChar.SetData(presContext, sqrChar);
|
mSqrChar.SetData(presContext, sqrChar);
|
||||||
ResolveMathMLCharStyle(presContext, mContent, mStyleContext, &mSqrChar, true);
|
ResolveMathMLCharStyle(presContext, mContent, mStyleContext, &mSqrChar, true);
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ public:
|
|||||||
virtual nsStyleContext*
|
virtual nsStyleContext*
|
||||||
GetAdditionalStyleContext(int32_t aIndex) const;
|
GetAdditionalStyleContext(int32_t aIndex) const;
|
||||||
|
|
||||||
NS_IMETHOD
|
virtual void
|
||||||
Init(nsIContent* aContent,
|
Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD
|
NS_IMETHOD
|
||||||
TransmitAutomaticData() MOZ_OVERRIDE;
|
TransmitAutomaticData() MOZ_OVERRIDE;
|
||||||
|
|||||||
@@ -35,16 +35,14 @@ nsMathMLmsqrtFrame::~nsMathMLmsqrtFrame()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsMathMLmsqrtFrame::Init(nsIContent* aContent,
|
nsMathMLmsqrtFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv = nsMathMLContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
nsMathMLContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
AllocateMathMLChar(NOTATION_RADICAL);
|
AllocateMathMLChar(NOTATION_RADICAL);
|
||||||
mNotationsToDraw |= NOTATION_RADICAL;
|
mNotationsToDraw |= NOTATION_RADICAL;
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ public:
|
|||||||
friend nsIFrame* NS_NewMathMLmsqrtFrame(nsIPresShell* aPresShell,
|
friend nsIFrame* NS_NewMathMLmsqrtFrame(nsIPresShell* aPresShell,
|
||||||
nsStyleContext* aContext);
|
nsStyleContext* aContext);
|
||||||
|
|
||||||
NS_IMETHOD
|
virtual void
|
||||||
Init(nsIContent* aContent,
|
Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD
|
NS_IMETHOD
|
||||||
InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE;
|
InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE;
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ public:
|
|||||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
|
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
* Get the "type" of the frame
|
* Get the "type" of the frame
|
||||||
@@ -84,7 +84,7 @@ SVGFEContainerFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
SVGFEContainerFrame::Init(nsIContent* aContent,
|
SVGFEContainerFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -93,7 +93,7 @@ SVGFEContainerFrame::Init(nsIContent* aContent,
|
|||||||
"Trying to construct an SVGFEContainerFrame for a "
|
"Trying to construct an SVGFEContainerFrame for a "
|
||||||
"content element that doesn't support the right interfaces");
|
"content element that doesn't support the right interfaces");
|
||||||
|
|
||||||
return SVGFEContainerFrameBase::Init(aContent, aParent, aPrevInFlow);
|
SVGFEContainerFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ protected:
|
|||||||
public:
|
public:
|
||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||||
|
|
||||||
virtual bool IsFrameOfType(uint32_t aFlags) const
|
virtual bool IsFrameOfType(uint32_t aFlags) const
|
||||||
@@ -96,7 +96,7 @@ SVGFEImageFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
|||||||
SVGFEImageFrameBase::DestroyFrom(aDestructRoot);
|
SVGFEImageFrameBase::DestroyFrom(aDestructRoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
SVGFEImageFrame::Init(nsIContent* aContent,
|
SVGFEImageFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -114,8 +114,6 @@ SVGFEImageFrame::Init(nsIContent* aContent,
|
|||||||
// We assume that feImage's are always visible.
|
// We assume that feImage's are always visible.
|
||||||
imageLoader->IncrementVisibleCount();
|
imageLoader->IncrementVisibleCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIAtom *
|
nsIAtom *
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ public:
|
|||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual bool IsFrameOfType(uint32_t aFlags) const
|
virtual bool IsFrameOfType(uint32_t aFlags) const
|
||||||
@@ -82,7 +82,7 @@ SVGFELeafFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
SVGFELeafFrame::Init(nsIContent* aContent,
|
SVGFELeafFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -91,7 +91,7 @@ SVGFELeafFrame::Init(nsIContent* aContent,
|
|||||||
"Trying to construct an SVGFELeafFrame for a "
|
"Trying to construct an SVGFELeafFrame for a "
|
||||||
"content element that doesn't support the right interfaces");
|
"content element that doesn't support the right interfaces");
|
||||||
|
|
||||||
return SVGFELeafFrameBase::Init(aContent, aParent, aPrevInFlow);
|
SVGFELeafFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ public:
|
|||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual bool IsFrameOfType(uint32_t aFlags) const
|
virtual bool IsFrameOfType(uint32_t aFlags) const
|
||||||
@@ -78,7 +78,7 @@ NS_NewSVGViewFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
|||||||
NS_IMPL_FRAMEARENA_HELPERS(SVGViewFrame)
|
NS_IMPL_FRAMEARENA_HELPERS(SVGViewFrame)
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
SVGViewFrame::Init(nsIContent* aContent,
|
SVGViewFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -86,7 +86,7 @@ SVGViewFrame::Init(nsIContent* aContent,
|
|||||||
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::view),
|
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::view),
|
||||||
"Content is not an SVG view");
|
"Content is not an SVG view");
|
||||||
|
|
||||||
return SVGViewFrameBase::Init(aContent, aParent, aPrevInFlow);
|
SVGViewFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ public:
|
|||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// nsIFrame:
|
// nsIFrame:
|
||||||
@@ -86,7 +86,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSVGAFrame)
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsIFrame methods
|
// nsIFrame methods
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGAFrame::Init(nsIContent* aContent,
|
nsSVGAFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -95,7 +95,7 @@ nsSVGAFrame::Init(nsIContent* aContent,
|
|||||||
"Trying to construct an SVGAFrame for a "
|
"Trying to construct an SVGAFrame for a "
|
||||||
"content element that doesn't support the right interfaces");
|
"content element that doesn't support the right interfaces");
|
||||||
|
|
||||||
return nsSVGAFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGAFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ nsSVGClipPathFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||||||
aAttribute, aModType);
|
aAttribute, aModType);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGClipPathFrame::Init(nsIContent* aContent,
|
nsSVGClipPathFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -305,7 +305,7 @@ nsSVGClipPathFrame::Init(nsIContent* aContent,
|
|||||||
"Content is not an SVG clipPath!");
|
"Content is not an SVG clipPath!");
|
||||||
|
|
||||||
AddStateBits(NS_STATE_SVG_CLIPPATH_CHILD);
|
AddStateBits(NS_STATE_SVG_CLIPPATH_CHILD);
|
||||||
return nsSVGClipPathFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGClipPathFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIAtom *
|
nsIAtom *
|
||||||
|
|||||||
@@ -56,9 +56,9 @@ public:
|
|||||||
nsIAtom* aAttribute,
|
nsIAtom* aAttribute,
|
||||||
int32_t aModType);
|
int32_t aModType);
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the "type" of the frame
|
* Get the "type" of the frame
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ nsSVGContainerFrame::UpdateOverflow()
|
|||||||
return nsSVGContainerFrameBase::UpdateOverflow();
|
return nsSVGContainerFrameBase::UpdateOverflow();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGDisplayContainerFrame::Init(nsIContent* aContent,
|
nsSVGDisplayContainerFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -89,8 +89,7 @@ nsSVGDisplayContainerFrame::Init(nsIContent* aContent,
|
|||||||
AddStateBits(aParent->GetStateBits() &
|
AddStateBits(aParent->GetStateBits() &
|
||||||
(NS_STATE_SVG_NONDISPLAY_CHILD | NS_STATE_SVG_CLIPPATH_CHILD));
|
(NS_STATE_SVG_NONDISPLAY_CHILD | NS_STATE_SVG_CLIPPATH_CHILD));
|
||||||
}
|
}
|
||||||
nsresult rv = nsSVGContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
nsSVGContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -125,9 +125,9 @@ public:
|
|||||||
nsFrameList& aFrameList) MOZ_OVERRIDE;
|
nsFrameList& aFrameList) MOZ_OVERRIDE;
|
||||||
NS_IMETHOD RemoveFrame(ChildListID aListID,
|
NS_IMETHOD RemoveFrame(ChildListID aListID,
|
||||||
nsIFrame* aOldFrame) MOZ_OVERRIDE;
|
nsIFrame* aOldFrame) MOZ_OVERRIDE;
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
|
|||||||
@@ -528,7 +528,7 @@ nsSVGFilterFrame::GetPostFilterBounds(nsIFrame *aFilteredFrame,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGFilterFrame::Init(nsIContent* aContent,
|
nsSVGFilterFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -536,7 +536,7 @@ nsSVGFilterFrame::Init(nsIContent* aContent,
|
|||||||
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::filter),
|
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::filter),
|
||||||
"Content is not an SVG filter");
|
"Content is not an SVG filter");
|
||||||
|
|
||||||
return nsSVGFilterFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGFilterFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -97,9 +97,9 @@ public:
|
|||||||
const nsRect *aPreFilterBounds = nullptr);
|
const nsRect *aPreFilterBounds = nullptr);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ NS_QUERYFRAME_HEAD(nsSVGForeignObjectFrame)
|
|||||||
NS_QUERYFRAME_ENTRY(nsISVGChildFrame)
|
NS_QUERYFRAME_ENTRY(nsISVGChildFrame)
|
||||||
NS_QUERYFRAME_TAIL_INHERITING(nsSVGForeignObjectFrameBase)
|
NS_QUERYFRAME_TAIL_INHERITING(nsSVGForeignObjectFrameBase)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGForeignObjectFrame::Init(nsIContent* aContent,
|
nsSVGForeignObjectFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -60,16 +60,14 @@ nsSVGForeignObjectFrame::Init(nsIContent* aContent,
|
|||||||
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::foreignObject),
|
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::foreignObject),
|
||||||
"Content is not an SVG foreignObject!");
|
"Content is not an SVG foreignObject!");
|
||||||
|
|
||||||
nsresult rv = nsSVGForeignObjectFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGForeignObjectFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
AddStateBits(aParent->GetStateBits() &
|
AddStateBits(aParent->GetStateBits() &
|
||||||
(NS_STATE_SVG_NONDISPLAY_CHILD | NS_STATE_SVG_CLIPPATH_CHILD));
|
(NS_STATE_SVG_NONDISPLAY_CHILD | NS_STATE_SVG_CLIPPATH_CHILD));
|
||||||
AddStateBits(NS_FRAME_FONT_INFLATION_CONTAINER |
|
AddStateBits(NS_FRAME_FONT_INFLATION_CONTAINER |
|
||||||
NS_FRAME_FONT_INFLATION_FLOW_ROOT);
|
NS_FRAME_FONT_INFLATION_FLOW_ROOT);
|
||||||
if (NS_SUCCEEDED(rv) &&
|
if (!(mState & NS_STATE_SVG_NONDISPLAY_CHILD)) {
|
||||||
!(mState & NS_STATE_SVG_NONDISPLAY_CHILD)) {
|
|
||||||
nsSVGUtils::GetOuterSVGFrame(this)->RegisterForeignObject(this);
|
nsSVGUtils::GetOuterSVGFrame(this)->RegisterForeignObject(this);
|
||||||
}
|
}
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsSVGForeignObjectFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
void nsSVGForeignObjectFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ public:
|
|||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
// nsIFrame:
|
// nsIFrame:
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||||
nsIAtom* aAttribute,
|
nsIAtom* aAttribute,
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ NS_NewSVGGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
|||||||
NS_IMPL_FRAMEARENA_HELPERS(nsSVGGFrame)
|
NS_IMPL_FRAMEARENA_HELPERS(nsSVGGFrame)
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGGFrame::Init(nsIContent* aContent,
|
nsSVGGFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -37,7 +37,7 @@ nsSVGGFrame::Init(nsIContent* aContent,
|
|||||||
NS_ASSERTION(transformable,
|
NS_ASSERTION(transformable,
|
||||||
"The element doesn't support nsIDOMSVGTransformable\n");
|
"The element doesn't support nsIDOMSVGTransformable\n");
|
||||||
|
|
||||||
return nsSVGGFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGGFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ public:
|
|||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -19,15 +19,14 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSVGGeometryFrame)
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsIFrame methods
|
// nsIFrame methods
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGGeometryFrame::Init(nsIContent* aContent,
|
nsSVGGeometryFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
AddStateBits(aParent->GetStateBits() &
|
AddStateBits(aParent->GetStateBits() &
|
||||||
(NS_STATE_SVG_NONDISPLAY_CHILD | NS_STATE_SVG_CLIPPATH_CHILD));
|
(NS_STATE_SVG_NONDISPLAY_CHILD | NS_STATE_SVG_CLIPPATH_CHILD));
|
||||||
nsresult rv = nsSVGGeometryFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGGeometryFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// nsIFrame interface:
|
// nsIFrame interface:
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual bool IsFrameOfType(uint32_t aFlags) const
|
virtual bool IsFrameOfType(uint32_t aFlags) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ nsSVGGlyphFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGGlyphFrame::Init(nsIContent* aContent,
|
nsSVGGlyphFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -332,7 +332,7 @@ nsSVGGlyphFrame::Init(nsIContent* aContent,
|
|||||||
"trying to construct an SVGGlyphFrame for wrong content element");
|
"trying to construct an SVGGlyphFrame for wrong content element");
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
return nsSVGGlyphFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGGlyphFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIAtom *
|
nsIAtom *
|
||||||
|
|||||||
@@ -193,9 +193,9 @@ public:
|
|||||||
|
|
||||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
|
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the "type" of the frame
|
* Get the "type" of the frame
|
||||||
|
|||||||
@@ -420,7 +420,7 @@ nsSVGGradientFrame::GetStopFrame(int32_t aIndex, nsIFrame * *aStopFrame)
|
|||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGLinearGradientFrame::Init(nsIContent* aContent,
|
nsSVGLinearGradientFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -428,7 +428,7 @@ nsSVGLinearGradientFrame::Init(nsIContent* aContent,
|
|||||||
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::linearGradient),
|
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::linearGradient),
|
||||||
"Content is not an SVG linearGradient");
|
"Content is not an SVG linearGradient");
|
||||||
|
|
||||||
return nsSVGLinearGradientFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGLinearGradientFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
@@ -533,7 +533,7 @@ nsSVGLinearGradientFrame::CreateGradient()
|
|||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGRadialGradientFrame::Init(nsIContent* aContent,
|
nsSVGRadialGradientFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -541,7 +541,7 @@ nsSVGRadialGradientFrame::Init(nsIContent* aContent,
|
|||||||
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::radialGradient),
|
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::radialGradient),
|
||||||
"Content is not an SVG radialGradient");
|
"Content is not an SVG radialGradient");
|
||||||
|
|
||||||
return nsSVGRadialGradientFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGRadialGradientFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -143,9 +143,9 @@ public:
|
|||||||
|
|
||||||
// nsIFrame interface:
|
// nsIFrame interface:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual nsIAtom* GetType() const; // frame type: nsGkAtoms::svgLinearGradientFrame
|
virtual nsIAtom* GetType() const; // frame type: nsGkAtoms::svgLinearGradientFrame
|
||||||
@@ -188,9 +188,9 @@ public:
|
|||||||
|
|
||||||
// nsIFrame interface:
|
// nsIFrame interface:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual nsIAtom* GetType() const; // frame type: nsGkAtoms::svgRadialGradientFrame
|
virtual nsIAtom* GetType() const; // frame type: nsGkAtoms::svgRadialGradientFrame
|
||||||
|
|||||||
@@ -66,9 +66,9 @@ public:
|
|||||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||||
nsIAtom* aAttribute,
|
nsIAtom* aAttribute,
|
||||||
int32_t aModType);
|
int32_t aModType);
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -129,7 +129,7 @@ nsSVGImageFrame::~nsSVGImageFrame()
|
|||||||
mListener = nullptr;
|
mListener = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGImageFrame::Init(nsIContent* aContent,
|
nsSVGImageFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -137,13 +137,13 @@ nsSVGImageFrame::Init(nsIContent* aContent,
|
|||||||
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::image),
|
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::image),
|
||||||
"Content is not an SVG image!");
|
"Content is not an SVG image!");
|
||||||
|
|
||||||
nsresult rv = nsSVGImageFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGImageFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
if (NS_FAILED(rv)) return rv;
|
|
||||||
|
|
||||||
mListener = new nsSVGImageListener(this);
|
mListener = new nsSVGImageListener(this);
|
||||||
if (!mListener) return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mContent);
|
nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mContent);
|
||||||
NS_ENSURE_TRUE(imageLoader, NS_ERROR_UNEXPECTED);
|
if (!imageLoader) {
|
||||||
|
NS_RUNTIMEABORT("Why is this not an image loading content?");
|
||||||
|
}
|
||||||
|
|
||||||
// We should have a PresContext now, so let's notify our image loader that
|
// We should have a PresContext now, so let's notify our image loader that
|
||||||
// we need to register any image animations with the refresh driver.
|
// we need to register any image animations with the refresh driver.
|
||||||
@@ -156,8 +156,6 @@ nsSVGImageFrame::Init(nsIContent* aContent,
|
|||||||
pusher.PushNull();
|
pusher.PushNull();
|
||||||
|
|
||||||
imageLoader->AddObserver(mListener);
|
imageLoader->AddObserver(mListener);
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* virtual */ void
|
/* virtual */ void
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ NS_QUERYFRAME_HEAD(nsSVGInnerSVGFrame)
|
|||||||
NS_QUERYFRAME_TAIL_INHERITING(nsSVGInnerSVGFrameBase)
|
NS_QUERYFRAME_TAIL_INHERITING(nsSVGInnerSVGFrameBase)
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGInnerSVGFrame::Init(nsIContent* aContent,
|
nsSVGInnerSVGFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -43,7 +43,7 @@ nsSVGInnerSVGFrame::Init(nsIContent* aContent,
|
|||||||
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::svg),
|
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::svg),
|
||||||
"Content is not an SVG 'svg' element!");
|
"Content is not an SVG 'svg' element!");
|
||||||
|
|
||||||
return nsSVGInnerSVGFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGInnerSVGFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ public:
|
|||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -49,14 +49,14 @@ nsSVGMarkerFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGMarkerFrame::Init(nsIContent* aContent,
|
nsSVGMarkerFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::marker), "Content is not an SVG marker");
|
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::marker), "Content is not an SVG marker");
|
||||||
|
|
||||||
return nsSVGMarkerFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGMarkerFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -51,9 +51,9 @@ public:
|
|||||||
|
|
||||||
// nsIFrame interface:
|
// nsIFrame interface:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ nsSVGMaskFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGMaskFrame::Init(nsIContent* aContent,
|
nsSVGMaskFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -167,7 +167,7 @@ nsSVGMaskFrame::Init(nsIContent* aContent,
|
|||||||
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::mask),
|
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::mask),
|
||||||
"Content is not an SVG mask");
|
"Content is not an SVG mask");
|
||||||
|
|
||||||
return nsSVGMaskFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGMaskFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ public:
|
|||||||
int32_t aModType);
|
int32_t aModType);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ nsSVGOuterSVGFrame::nsSVGOuterSVGFrame(nsStyleContext* aContext)
|
|||||||
RemoveStateBits(NS_FRAME_SVG_LAYOUT);
|
RemoveStateBits(NS_FRAME_SVG_LAYOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGOuterSVGFrame::Init(nsIContent* aContent,
|
nsSVGOuterSVGFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -168,7 +168,7 @@ nsSVGOuterSVGFrame::Init(nsIContent* aContent,
|
|||||||
AddStateBits(NS_STATE_SVG_NONDISPLAY_CHILD);
|
AddStateBits(NS_STATE_SVG_NONDISPLAY_CHILD);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult rv = nsSVGOuterSVGFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGOuterSVGFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
|
|
||||||
nsIDocument* doc = mContent->GetCurrentDoc();
|
nsIDocument* doc = mContent->GetCurrentDoc();
|
||||||
if (doc) {
|
if (doc) {
|
||||||
@@ -180,8 +180,6 @@ nsSVGOuterSVGFrame::Init(nsIContent* aContent,
|
|||||||
// not need to be removed
|
// not need to be removed
|
||||||
doc->AddMutationObserverUnlessExists(&sSVGMutationObserver);
|
doc->AddMutationObserverUnlessExists(&sSVGMutationObserver);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -921,14 +919,14 @@ NS_NewSVGOuterSVGAnonChildFrame(nsIPresShell* aPresShell,
|
|||||||
NS_IMPL_FRAMEARENA_HELPERS(nsSVGOuterSVGAnonChildFrame)
|
NS_IMPL_FRAMEARENA_HELPERS(nsSVGOuterSVGAnonChildFrame)
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGOuterSVGAnonChildFrame::Init(nsIContent* aContent,
|
nsSVGOuterSVGAnonChildFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
NS_ABORT_IF_FALSE(aParent->GetType() == nsGkAtoms::svgOuterSVGFrame,
|
NS_ABORT_IF_FALSE(aParent->GetType() == nsGkAtoms::svgOuterSVGFrame,
|
||||||
"Unexpected parent");
|
"Unexpected parent");
|
||||||
return nsSVGOuterSVGAnonChildFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGOuterSVGAnonChildFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ public:
|
|||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsSplittableType GetSplittableType() const;
|
virtual nsSplittableType GetSplittableType() const;
|
||||||
|
|
||||||
@@ -239,9 +239,9 @@ public:
|
|||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD GetFrameName(nsAString& aResult) const {
|
NS_IMETHOD GetFrameName(nsAString& aResult) const {
|
||||||
return MakeFrameName(NS_LITERAL_STRING("SVGOuterSVGAnonChild"), aResult);
|
return MakeFrameName(NS_LITERAL_STRING("SVGOuterSVGAnonChild"), aResult);
|
||||||
|
|||||||
@@ -101,14 +101,14 @@ nsSVGPatternFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGPatternFrame::Init(nsIContent* aContent,
|
nsSVGPatternFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::pattern), "Content is not an SVG pattern");
|
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::pattern), "Content is not an SVG pattern");
|
||||||
|
|
||||||
return nsSVGPatternFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGPatternFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ public:
|
|||||||
int32_t aModType);
|
int32_t aModType);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ public:
|
|||||||
|
|
||||||
// nsIFrame interface:
|
// nsIFrame interface:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
@@ -75,14 +75,14 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSVGStopFrame)
|
|||||||
// nsIFrame methods:
|
// nsIFrame methods:
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGStopFrame::Init(nsIContent* aContent,
|
nsSVGStopFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::stop), "Content is not a stop element");
|
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::stop), "Content is not a stop element");
|
||||||
|
|
||||||
return nsSVGStopFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGStopFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ public:
|
|||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -74,7 +74,7 @@ NS_NewSVGSwitchFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
|||||||
NS_IMPL_FRAMEARENA_HELPERS(nsSVGSwitchFrame)
|
NS_IMPL_FRAMEARENA_HELPERS(nsSVGSwitchFrame)
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGSwitchFrame::Init(nsIContent* aContent,
|
nsSVGSwitchFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -82,7 +82,7 @@ nsSVGSwitchFrame::Init(nsIContent* aContent,
|
|||||||
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::svgSwitch),
|
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::svgSwitch),
|
||||||
"Content is not an SVG switch\n");
|
"Content is not an SVG switch\n");
|
||||||
|
|
||||||
return nsSVGSwitchFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGSwitchFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ NS_QUERYFRAME_TAIL_INHERITING(nsSVGTSpanFrameBase)
|
|||||||
// nsIFrame methods
|
// nsIFrame methods
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGTSpanFrame::Init(nsIContent* aContent,
|
nsSVGTSpanFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -63,7 +63,7 @@ nsSVGTSpanFrame::Init(nsIContent* aContent,
|
|||||||
"Content is not an SVG tspan or altGlyph");
|
"Content is not an SVG tspan or altGlyph");
|
||||||
}
|
}
|
||||||
|
|
||||||
return nsSVGTSpanFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGTSpanFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ public:
|
|||||||
|
|
||||||
// nsIFrame:
|
// nsIFrame:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSVGTextFrame)
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsIFrame methods
|
// nsIFrame methods
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGTextFrame::Init(nsIContent* aContent,
|
nsSVGTextFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -41,7 +41,7 @@ nsSVGTextFrame::Init(nsIContent* aContent,
|
|||||||
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::text),
|
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::text),
|
||||||
"Content is not an SVG text");
|
"Content is not an SVG text");
|
||||||
|
|
||||||
return nsSVGTextFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGTextFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ public:
|
|||||||
|
|
||||||
// nsIFrame:
|
// nsIFrame:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||||
|
|||||||
@@ -2913,20 +2913,19 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSVGTextFrame2)
|
|||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
// nsIFrame methods
|
// nsIFrame methods
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGTextFrame2::Init(nsIContent* aContent,
|
nsSVGTextFrame2::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::text), "Content is not an SVG text");
|
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::text), "Content is not an SVG text");
|
||||||
|
|
||||||
nsresult rv = nsSVGTextFrame2Base::Init(aContent, aParent, aPrevInFlow);
|
nsSVGTextFrame2Base::Init(aContent, aParent, aPrevInFlow);
|
||||||
AddStateBits((aParent->GetStateBits() &
|
AddStateBits((aParent->GetStateBits() &
|
||||||
(NS_STATE_SVG_NONDISPLAY_CHILD | NS_STATE_SVG_CLIPPATH_CHILD)) |
|
(NS_STATE_SVG_NONDISPLAY_CHILD | NS_STATE_SVG_CLIPPATH_CHILD)) |
|
||||||
NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_SVG_TEXT);
|
NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_SVG_TEXT);
|
||||||
|
|
||||||
mMutationObserver.StartObserving(this);
|
mMutationObserver.StartObserving(this);
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -193,9 +193,9 @@ public:
|
|||||||
NS_DECL_FRAMEARENA_HELPERS
|
NS_DECL_FRAMEARENA_HELPERS
|
||||||
|
|
||||||
// nsIFrame:
|
// nsIFrame:
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ NS_NewSVGTextPathFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
|||||||
NS_IMPL_FRAMEARENA_HELPERS(nsSVGTextPathFrame)
|
NS_IMPL_FRAMEARENA_HELPERS(nsSVGTextPathFrame)
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGTextPathFrame::Init(nsIContent* aContent,
|
nsSVGTextPathFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -46,7 +46,7 @@ nsSVGTextPathFrame::Init(nsIContent* aContent,
|
|||||||
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::textPath),
|
NS_ASSERTION(aContent->IsSVG(nsGkAtoms::textPath),
|
||||||
"Content is not an SVG textPath");
|
"Content is not an SVG textPath");
|
||||||
|
|
||||||
return nsSVGTextPathFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGTextPathFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
|||||||
@@ -41,9 +41,9 @@ public:
|
|||||||
|
|
||||||
// nsIFrame:
|
// nsIFrame:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// nsIFrame interface:
|
// nsIFrame interface:
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||||
nsIAtom* aAttribute,
|
nsIAtom* aAttribute,
|
||||||
@@ -97,7 +97,7 @@ NS_QUERYFRAME_TAIL_INHERITING(nsSVGUseFrameBase)
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsIFrame methods:
|
// nsIFrame methods:
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsSVGUseFrame::Init(nsIContent* aContent,
|
nsSVGUseFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -108,7 +108,7 @@ nsSVGUseFrame::Init(nsIContent* aContent,
|
|||||||
mHasValidDimensions =
|
mHasValidDimensions =
|
||||||
static_cast<SVGUseElement*>(aContent)->HasValidDimensions();
|
static_cast<SVGUseElement*>(aContent)->HasValidDimensions();
|
||||||
|
|
||||||
return nsSVGUseFrameBase::Init(aContent, aParent, aPrevInFlow);
|
nsSVGUseFrameBase::Init(aContent, aParent, aPrevInFlow);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|||||||
@@ -66,13 +66,13 @@ nsTableCellFrame::GetNextCell() const
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsTableCellFrame::Init(nsIContent* aContent,
|
nsTableCellFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
// Let the base class do its initialization
|
// Let the base class do its initialization
|
||||||
nsresult rv = nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
|
|
||||||
if (GetStateBits() & NS_FRAME_FONT_INFLATION_CONTAINER) {
|
if (GetStateBits() & NS_FRAME_FONT_INFLATION_CONTAINER) {
|
||||||
AddStateBits(NS_FRAME_FONT_INFLATION_FLOW_ROOT);
|
AddStateBits(NS_FRAME_FONT_INFLATION_FLOW_ROOT);
|
||||||
@@ -85,8 +85,6 @@ nsTableCellFrame::Init(nsIContent* aContent,
|
|||||||
cellFrame->GetColIndex(colIndex);
|
cellFrame->GetColIndex(colIndex);
|
||||||
SetColIndex(colIndex);
|
SetColIndex(colIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// nsIPercentHeightObserver methods
|
// nsIPercentHeightObserver methods
|
||||||
|
|||||||
@@ -50,9 +50,9 @@ public:
|
|||||||
nsTableCellFrame(nsStyleContext* aContext);
|
nsTableCellFrame(nsStyleContext* aContext);
|
||||||
~nsTableCellFrame();
|
~nsTableCellFrame();
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
#ifdef ACCESSIBILITY
|
#ifdef ACCESSIBILITY
|
||||||
virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
|
virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ nsTableFrame::nsTableFrame(nsStyleContext* aContext)
|
|||||||
NS_QUERYFRAME_HEAD(nsTableFrame)
|
NS_QUERYFRAME_HEAD(nsTableFrame)
|
||||||
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
|
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsTableFrame::Init(nsIContent* aContent,
|
nsTableFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -174,7 +174,7 @@ nsTableFrame::Init(nsIContent* aContent,
|
|||||||
"prev-in-flow must be of same type");
|
"prev-in-flow must be of same type");
|
||||||
|
|
||||||
// Let the base class do its processing
|
// Let the base class do its processing
|
||||||
nsresult rv = nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
|
|
||||||
// see if border collapse is on, if so set it
|
// see if border collapse is on, if so set it
|
||||||
const nsStyleTableBorder* tableStyle = StyleTableBorder();
|
const nsStyleTableBorder* tableStyle = StyleTableBorder();
|
||||||
@@ -184,8 +184,6 @@ nsTableFrame::Init(nsIContent* aContent,
|
|||||||
// Create the cell map if this frame is the first-in-flow.
|
// Create the cell map if this frame is the first-in-flow.
|
||||||
if (!aPrevInFlow) {
|
if (!aPrevInFlow) {
|
||||||
mCellMap = new nsTableCellMap(*this, borderCollapse);
|
mCellMap = new nsTableCellMap(*this, borderCollapse);
|
||||||
if (!mCellMap)
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aPrevInFlow) {
|
if (aPrevInFlow) {
|
||||||
@@ -200,11 +198,7 @@ nsTableFrame::Init(nsIContent* aContent,
|
|||||||
mTableLayoutStrategy = new BasicTableLayoutStrategy(this);
|
mTableLayoutStrategy = new BasicTableLayoutStrategy(this);
|
||||||
else
|
else
|
||||||
mTableLayoutStrategy = new FixedTableLayoutStrategy(this);
|
mTableLayoutStrategy = new FixedTableLayoutStrategy(this);
|
||||||
if (!mTableLayoutStrategy)
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsTableFrame::~nsTableFrame()
|
nsTableFrame::~nsTableFrame()
|
||||||
|
|||||||
@@ -124,9 +124,9 @@ public:
|
|||||||
/** sets defaults for table-specific style.
|
/** sets defaults for table-specific style.
|
||||||
* @see nsIFrame::Init
|
* @see nsIFrame::Init
|
||||||
*/
|
*/
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow);
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
static float GetTwipsToPixels(nsPresContext* aPresContext);
|
static float GetTwipsToPixels(nsPresContext* aPresContext);
|
||||||
|
|
||||||
|
|||||||
@@ -130,15 +130,13 @@ nsTableRowFrame::~nsTableRowFrame()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsTableRowFrame::Init(nsIContent* aContent,
|
nsTableRowFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv;
|
|
||||||
|
|
||||||
// Let the base class do its initialization
|
// Let the base class do its initialization
|
||||||
rv = nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
|
|
||||||
NS_ASSERTION(NS_STYLE_DISPLAY_TABLE_ROW == StyleDisplay()->mDisplay,
|
NS_ASSERTION(NS_STYLE_DISPLAY_TABLE_ROW == StyleDisplay()->mDisplay,
|
||||||
"wrong display on table row frame");
|
"wrong display on table row frame");
|
||||||
@@ -149,8 +147,6 @@ nsTableRowFrame::Init(nsIContent* aContent,
|
|||||||
|
|
||||||
SetRowIndex(rowFrame->GetRowIndex());
|
SetRowIndex(rowFrame->GetRowIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* virtual */ void
|
/* virtual */ void
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ public:
|
|||||||
|
|
||||||
virtual ~nsTableRowFrame();
|
virtual ~nsTableRowFrame();
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
/** @see nsIFrame::DidSetStyleContext */
|
/** @see nsIFrame::DidSetStyleContext */
|
||||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
|
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
|
||||||
|
|
||||||
|
|||||||
@@ -158,13 +158,12 @@ nsBoxFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
|||||||
/**
|
/**
|
||||||
* Initialize us. This is a good time to get the alignment of the box
|
* Initialize us. This is a good time to get the alignment of the box
|
||||||
*/
|
*/
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsBoxFrame::Init(nsIContent* aContent,
|
nsBoxFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv = nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
if (GetStateBits() & NS_FRAME_FONT_INFLATION_CONTAINER) {
|
if (GetStateBits() & NS_FRAME_FONT_INFLATION_CONTAINER) {
|
||||||
AddStateBits(NS_FRAME_FONT_INFLATION_FLOW_ROOT);
|
AddStateBits(NS_FRAME_FONT_INFLATION_FLOW_ROOT);
|
||||||
@@ -183,9 +182,7 @@ nsBoxFrame::Init(nsIContent* aContent,
|
|||||||
UpdateMouseThrough();
|
UpdateMouseThrough();
|
||||||
|
|
||||||
// register access key
|
// register access key
|
||||||
rv = RegUnregAccessKey(true);
|
RegUnregAccessKey(true);
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsBoxFrame::UpdateMouseThrough()
|
void nsBoxFrame::UpdateMouseThrough()
|
||||||
@@ -1844,12 +1841,10 @@ nsBoxFrame::GetFrameSizeWithMargin(nsIFrame* aBox, nsSize& aSize)
|
|||||||
|
|
||||||
// If you make changes to this function, check its counterparts
|
// If you make changes to this function, check its counterparts
|
||||||
// in nsTextBoxFrame and nsXULLabelFrame
|
// in nsTextBoxFrame and nsXULLabelFrame
|
||||||
nsresult
|
void
|
||||||
nsBoxFrame::RegUnregAccessKey(bool aDoReg)
|
nsBoxFrame::RegUnregAccessKey(bool aDoReg)
|
||||||
{
|
{
|
||||||
// if we have no content, we can't do anything
|
MOZ_ASSERT(mContent);
|
||||||
if (!mContent)
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
|
|
||||||
// find out what type of element this is
|
// find out what type of element this is
|
||||||
nsIAtom *atom = mContent->Tag();
|
nsIAtom *atom = mContent->Tag();
|
||||||
@@ -1861,14 +1856,14 @@ nsBoxFrame::RegUnregAccessKey(bool aDoReg)
|
|||||||
atom != nsGkAtoms::textbox &&
|
atom != nsGkAtoms::textbox &&
|
||||||
atom != nsGkAtoms::tab &&
|
atom != nsGkAtoms::tab &&
|
||||||
atom != nsGkAtoms::radio) {
|
atom != nsGkAtoms::radio) {
|
||||||
return NS_OK;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsAutoString accessKey;
|
nsAutoString accessKey;
|
||||||
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::accesskey, accessKey);
|
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::accesskey, accessKey);
|
||||||
|
|
||||||
if (accessKey.IsEmpty())
|
if (accessKey.IsEmpty())
|
||||||
return NS_OK;
|
return;
|
||||||
|
|
||||||
// With a valid PresContext we can get the ESM
|
// With a valid PresContext we can get the ESM
|
||||||
// and register the access key
|
// and register the access key
|
||||||
@@ -1879,8 +1874,6 @@ nsBoxFrame::RegUnregAccessKey(bool aDoReg)
|
|||||||
esm->RegisterAccessKey(mContent, key);
|
esm->RegisterAccessKey(mContent, key);
|
||||||
else
|
else
|
||||||
esm->UnregisterAccessKey(mContent, key);
|
esm->UnregisterAccessKey(mContent, key);
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|||||||
@@ -83,9 +83,9 @@ public:
|
|||||||
|
|
||||||
// ----- public methods -------
|
// ----- public methods -------
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* asPrevInFlow) MOZ_OVERRIDE;
|
nsIFrame* asPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
|
|
||||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||||
@@ -218,7 +218,7 @@ protected:
|
|||||||
bool GetEventPoint(nsGUIEvent *aEvent, nsIntPoint &aPoint);
|
bool GetEventPoint(nsGUIEvent *aEvent, nsIntPoint &aPoint);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
nsresult RegUnregAccessKey(bool aDoReg);
|
void RegUnregAccessKey(bool aDoReg);
|
||||||
|
|
||||||
NS_HIDDEN_(void) CheckBoxOrder();
|
NS_HIDDEN_(void) CheckBoxOrder();
|
||||||
|
|
||||||
|
|||||||
@@ -74,16 +74,14 @@ nsDeckFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsDeckFrame::Init(nsIContent* aContent,
|
nsDeckFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv = nsBoxFrame::Init(aContent, aParent, aPrevInFlow);
|
nsBoxFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
|
|
||||||
mIndex = GetSelectedIndex();
|
mIndex = GetSelectedIndex();
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -41,9 +41,9 @@ public:
|
|||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||||
|
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ nsImageBoxFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsImageBoxFrame::Init(nsIContent* aContent,
|
nsImageBoxFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
@@ -193,13 +193,11 @@ nsImageBoxFrame::Init(nsIContent* aContent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
mSuppressStyleCheck = true;
|
mSuppressStyleCheck = true;
|
||||||
nsresult rv = nsLeafBoxFrame::Init(aContent, aParent, aPrevInFlow);
|
nsLeafBoxFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
mSuppressStyleCheck = false;
|
mSuppressStyleCheck = false;
|
||||||
|
|
||||||
UpdateLoadFlags();
|
UpdateLoadFlags();
|
||||||
UpdateImage();
|
UpdateImage();
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -50,9 +50,9 @@ public:
|
|||||||
|
|
||||||
friend nsIFrame* NS_NewImageBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
friend nsIFrame* NS_NewImageBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||||
|
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* asPrevInFlow) MOZ_OVERRIDE;
|
nsIFrame* asPrevInFlow) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||||
nsIAtom* aAttribute,
|
nsIAtom* aAttribute,
|
||||||
|
|||||||
@@ -55,22 +55,19 @@ nsLeafBoxFrame::GetBoxName(nsAutoString& aName)
|
|||||||
/**
|
/**
|
||||||
* Initialize us. This is a good time to get the alignment of the box
|
* Initialize us. This is a good time to get the alignment of the box
|
||||||
*/
|
*/
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsLeafBoxFrame::Init(
|
nsLeafBoxFrame::Init(
|
||||||
nsIContent* aContent,
|
nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv = nsLeafFrame::Init(aContent, aParent, aPrevInFlow);
|
nsLeafFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
if (GetStateBits() & NS_FRAME_FONT_INFLATION_CONTAINER) {
|
if (GetStateBits() & NS_FRAME_FONT_INFLATION_CONTAINER) {
|
||||||
AddStateBits(NS_FRAME_FONT_INFLATION_FLOW_ROOT);
|
AddStateBits(NS_FRAME_FONT_INFLATION_FLOW_ROOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateMouseThrough();
|
UpdateMouseThrough();
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|||||||
@@ -56,10 +56,9 @@ public:
|
|||||||
|
|
||||||
NS_IMETHOD CharacterDataChanged(CharacterDataChangeInfo* aInfo) MOZ_OVERRIDE;
|
NS_IMETHOD CharacterDataChanged(CharacterDataChangeInfo* aInfo) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD Init(
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIContent* aContent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* asPrevInFlow) MOZ_OVERRIDE;
|
||||||
nsIFrame* asPrevInFlow) MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
|
|||||||
@@ -176,13 +176,12 @@ NS_QUERYFRAME_TAIL_INHERITING(nsBoxFrame)
|
|||||||
|
|
||||||
////////// nsIFrame /////////////////
|
////////// nsIFrame /////////////////
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsListBoxBodyFrame::Init(nsIContent* aContent,
|
nsListBoxBodyFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv = nsBoxFrame::Init(aContent, aParent, aPrevInFlow);
|
nsBoxFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
nsIScrollableFrame* scrollFrame = nsLayoutUtils::GetScrollableFrameFor(this);
|
nsIScrollableFrame* scrollFrame = nsLayoutUtils::GetScrollableFrameFor(this);
|
||||||
if (scrollFrame) {
|
if (scrollFrame) {
|
||||||
nsIFrame* verticalScrollbar = scrollFrame->GetScrollbarBox(true);
|
nsIFrame* verticalScrollbar = scrollFrame->GetScrollbarBox(true);
|
||||||
@@ -194,8 +193,6 @@ nsListBoxBodyFrame::Init(nsIContent* aContent,
|
|||||||
nsRefPtr<nsFontMetrics> fm;
|
nsRefPtr<nsFontMetrics> fm;
|
||||||
nsLayoutUtils::GetFontMetricsForFrame(this, getter_AddRefs(fm));
|
nsLayoutUtils::GetFontMetricsForFrame(this, getter_AddRefs(fm));
|
||||||
mRowHeight = fm->MaxHeight();
|
mRowHeight = fm->MaxHeight();
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ public:
|
|||||||
nsStyleContext* aContext);
|
nsStyleContext* aContext);
|
||||||
|
|
||||||
// nsIFrame
|
// nsIFrame
|
||||||
NS_IMETHOD Init(nsIContent* aContent,
|
virtual void Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||||
|
|
||||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE;
|
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) MOZ_OVERRIDE;
|
||||||
|
|||||||
@@ -59,18 +59,16 @@ nsMenuBarFrame::nsMenuBarFrame(nsIPresShell* aShell, nsStyleContext* aContext):
|
|||||||
{
|
{
|
||||||
} // cntr
|
} // cntr
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsMenuBarFrame::Init(nsIContent* aContent,
|
nsMenuBarFrame::Init(nsIContent* aContent,
|
||||||
nsIFrame* aParent,
|
nsIFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow)
|
nsIFrame* aPrevInFlow)
|
||||||
{
|
{
|
||||||
nsresult rv = nsBoxFrame::Init(aContent, aParent, aPrevInFlow);
|
nsBoxFrame::Init(aContent, aParent, aPrevInFlow);
|
||||||
|
|
||||||
// Create the menu bar listener.
|
// Create the menu bar listener.
|
||||||
mMenuBarListener = new nsMenuBarListener(this);
|
mMenuBarListener = new nsMenuBarListener(this);
|
||||||
NS_IF_ADDREF(mMenuBarListener);
|
NS_ADDREF(mMenuBarListener);
|
||||||
if (! mMenuBarListener)
|
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
|
|
||||||
// Hook up the menu bar as a key listener on the whole document. It will see every
|
// Hook up the menu bar as a key listener on the whole document. It will see every
|
||||||
// key press that occurs, but after everyone else does.
|
// key press that occurs, but after everyone else does.
|
||||||
@@ -89,8 +87,6 @@ nsMenuBarFrame::Init(nsIContent* aContent,
|
|||||||
target->AddEventListener(NS_LITERAL_STRING("mousedown"), mMenuBarListener, true);
|
target->AddEventListener(NS_LITERAL_STRING("mousedown"), mMenuBarListener, true);
|
||||||
target->AddEventListener(NS_LITERAL_STRING("mousedown"), mMenuBarListener, false);
|
target->AddEventListener(NS_LITERAL_STRING("mousedown"), mMenuBarListener, false);
|
||||||
target->AddEventListener(NS_LITERAL_STRING("blur"), mMenuBarListener, true);
|
target->AddEventListener(NS_LITERAL_STRING("blur"), mMenuBarListener, true);
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user