Bug 494117: Mechanically change 'ReParent' to 'Reparent' throughout the tree. r=bzbarsky

This commit is contained in:
Zack Weinberg
2010-04-01 23:07:43 -07:00
parent cee30ca73a
commit 9819bef9dc
10 changed files with 30 additions and 31 deletions
+1 -1
View File
@@ -422,7 +422,7 @@ ReparentFrame(nsFrameManager* aFrameManager,
nsIFrame* aFrame)
{
aFrame->SetParent(aNewParentFrame);
aFrameManager->ReParentStyleContext(aFrame);
aFrameManager->ReparentStyleContext(aFrame);
if (aFrame->GetStateBits() &
(NS_FRAME_HAS_VIEW | NS_FRAME_HAS_CHILD_WITH_VIEW)) {
// No need to walk up the tree, since the bits are already set
+6 -6
View File
@@ -757,7 +757,7 @@ TryStartingTransition(nsPresContext *aPresContext, nsIContent *aContent,
}
nsresult
nsFrameManager::ReParentStyleContext(nsIFrame* aFrame)
nsFrameManager::ReparentStyleContext(nsIFrame* aFrame)
{
if (nsGkAtoms::placeholderFrame == aFrame->GetType()) {
// Also reparent the out-of-flow
@@ -765,7 +765,7 @@ nsFrameManager::ReParentStyleContext(nsIFrame* aFrame)
nsPlaceholderFrame::GetRealFrameForPlaceholder(aFrame);
NS_ASSERTION(outOfFlow, "no out-of-flow frame");
ReParentStyleContext(outOfFlow);
ReparentStyleContext(outOfFlow);
}
// DO NOT verify the style tree before reparenting. The frame
@@ -781,7 +781,7 @@ nsFrameManager::ReParentStyleContext(nsIFrame* aFrame)
&providerIsChild);
nsStyleContext* newParentContext = nsnull;
if (providerIsChild) {
ReParentStyleContext(providerFrame);
ReparentStyleContext(providerFrame);
newParentContext = providerFrame->GetStyleContext();
providerChild = providerFrame;
} else if (providerFrame) {
@@ -841,7 +841,7 @@ nsFrameManager::ReParentStyleContext(nsIFrame* aFrame)
if (newContext) {
if (newContext != oldContext) {
// We probably don't want to initiate transitions from
// ReParentStyleContext, since we call it during frame
// ReparentStyleContext, since we call it during frame
// construction rather than in response to dynamic changes.
// Also see the comment at the start of
// nsTransitionManager::ConsiderStartingTransition.
@@ -886,7 +886,7 @@ nsFrameManager::ReParentStyleContext(nsIFrame* aFrame)
}
#endif
ReParentStyleContext(child);
ReparentStyleContext(child);
}
child = child->GetNextSibling();
@@ -906,7 +906,7 @@ nsFrameManager::ReParentStyleContext(nsIFrame* aFrame)
nsIFrame* sib = static_cast<nsIFrame*>
(aFrame->Properties().Get(nsIFrame::IBSplitSpecialSibling()));
if (sib) {
ReParentStyleContext(sib);
ReparentStyleContext(sib);
}
}
+1 -1
View File
@@ -148,7 +148,7 @@ public:
*
* @param aFrame the root of the subtree to reparent. Must not be null.
*/
NS_HIDDEN_(nsresult) ReParentStyleContext(nsIFrame* aFrame);
NS_HIDDEN_(nsresult) ReparentStyleContext(nsIFrame* aFrame);
/*
* Re-resolve the style contexts for a frame tree, building
+5 -5
View File
@@ -120,7 +120,7 @@ public:
protected:
virtual PRIntn GetSkipSides() const;
void ReParentFrameList(const nsFrameList& aFrameList);
void ReparentFrameList(const nsFrameList& aFrameList);
nsIFrame* mLegendFrame;
nsIFrame* mContentFrame;
@@ -621,7 +621,7 @@ nsFieldSetFrame::AppendFrames(nsIAtom* aListName,
nsFrameList& aFrameList)
{
// aFrameList is not allowed to contain "the legend" for this fieldset
ReParentFrameList(aFrameList);
ReparentFrameList(aFrameList);
return mContentFrame->AppendFrames(aListName, aFrameList);
}
@@ -635,7 +635,7 @@ nsFieldSetFrame::InsertFrames(nsIAtom* aListName,
"inserting after sibling frame with different parent");
// aFrameList is not allowed to contain "the legend" for this fieldset
ReParentFrameList(aFrameList);
ReparentFrameList(aFrameList);
if (NS_UNLIKELY(aPrevFrame == mLegendFrame)) {
aPrevFrame = nsnull;
}
@@ -665,14 +665,14 @@ NS_IMETHODIMP nsFieldSetFrame::GetAccessible(nsIAccessible** aAccessible)
#endif
void
nsFieldSetFrame::ReParentFrameList(const nsFrameList& aFrameList)
nsFieldSetFrame::ReparentFrameList(const nsFrameList& aFrameList)
{
nsFrameManager* frameManager = PresContext()->FrameManager();
for (nsFrameList::Enumerator e(aFrameList); !e.AtEnd(); e.Next()) {
NS_ASSERTION(mLegendFrame || e.get()->GetType() != nsGkAtoms::legendFrame,
"The fieldset's legend is not allowed in this list");
e.get()->SetParent(mContentFrame);
frameManager->ReParentStyleContext(e.get());
frameManager->ReparentStyleContext(e.get());
}
mContentFrame->AddStateBits(GetStateBits() & NS_FRAME_HAS_CHILD_WITH_VIEW);
}
+1 -1
View File
@@ -108,7 +108,7 @@ nsFirstLetterFrame::SetInitialChildList(nsIAtom* aListName,
for (nsFrameList::Enumerator e(aChildList); !e.AtEnd(); e.Next()) {
NS_ASSERTION(e.get()->GetParent() == this, "Unexpected parent");
frameManager->ReParentStyleContext(e.get());
frameManager->ReparentStyleContext(e.get());
}
mFrames.SetFrames(aChildList);
+1 -1
View File
@@ -5824,7 +5824,7 @@ nsFrame::CorrectStyleParentFrame(nsIFrame* aProspectiveParent,
}
// Otherwise, walk up out of all anon boxes. For placeholder frames, walk out
// of all pseudo-elements as well. Otherwise ReParentStyleContext could cause
// of all pseudo-elements as well. Otherwise ReparentStyleContext could cause
// style data to be out of sync with the frame tree.
nsIFrame* parent = aProspectiveParent;
do {
+12 -12
View File
@@ -304,7 +304,7 @@ nsInlineFrame::ReparentFloatsForInlineChild(nsIFrame* aOurLineContainer,
}
static void
ReParentChildListStyle(nsPresContext* aPresContext,
ReparentChildListStyle(nsPresContext* aPresContext,
const nsFrameList::Slice& aFrames,
nsIFrame* aParentFrame)
{
@@ -312,7 +312,7 @@ ReParentChildListStyle(nsPresContext* aPresContext,
for (nsFrameList::Enumerator e(aFrames); !e.AtEnd(); e.Next()) {
NS_ASSERTION(e.get()->GetParent() == aParentFrame, "Bogus parentage");
frameManager->ReParentStyleContext(e.get());
frameManager->ReparentStyleContext(e.get());
}
}
@@ -374,7 +374,7 @@ nsInlineFrame::Reflow(nsPresContext* aPresContext,
// we reparent the style contexts when we set their parents in
// nsInlineFrame::ReflowFrames and nsInlineFrame::ReflowInlineFrame.
if (aReflowState.mLineLayout->GetInFirstLine()) {
ReParentChildListStyle(aPresContext, newFrames, this);
ReparentChildListStyle(aPresContext, newFrames, this);
}
}
}
@@ -522,7 +522,7 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
}
frame->SetParent(this);
if (inFirstLine) {
frameManager->ReParentStyleContext(frame);
frameManager->ReparentStyleContext(frame);
}
// We also need to check if frame has a next-in-flow. If it does, then set
// its parent frame pointer, too. Otherwise, if we reflow frame and it's
@@ -540,7 +540,7 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
}
nextInFlow->SetParent(this);
if (inFirstLine) {
frameManager->ReParentStyleContext(nextInFlow);
frameManager->ReparentStyleContext(nextInFlow);
}
}
@@ -559,7 +559,7 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
if (mFrames.ContainsFrame(nextInFlow)) {
nextInFlow->SetParent(this);
if (inFirstLine) {
frameManager->ReParentStyleContext(nextInFlow);
frameManager->ReparentStyleContext(nextInFlow);
}
}
else {
@@ -744,7 +744,7 @@ nsInlineFrame::ReflowInlineFrame(nsPresContext* aPresContext,
for (nsIFrame* f = aFrame->GetNextSibling(); f; f = f->GetNextSibling()) {
f->SetParent(this);
if (lineLayout->GetInFirstLine()) {
aPresContext->FrameManager()->ReParentStyleContext(f);
aPresContext->FrameManager()->ReparentStyleContext(f);
}
}
}
@@ -1005,7 +1005,7 @@ nsFirstLineFrame::PullOneFrame(nsPresContext* aPresContext, InlineReflowState& i
// We are a first-line frame. Fixup the child frames
// style-context that we just pulled.
NS_ASSERTION(frame->GetParent() == this, "Incorrect parent?");
aPresContext->FrameManager()->ReParentStyleContext(frame);
aPresContext->FrameManager()->ReparentStyleContext(frame);
}
return frame;
}
@@ -1035,7 +1035,7 @@ nsFirstLineFrame::Reflow(nsPresContext* aPresContext,
}
const nsFrameList::Slice& newFrames =
mFrames.InsertFrames(this, nsnull, *prevOverflowFrames);
ReParentChildListStyle(aPresContext, newFrames, this);
ReparentChildListStyle(aPresContext, newFrames, this);
}
}
@@ -1046,7 +1046,7 @@ nsFirstLineFrame::Reflow(nsPresContext* aPresContext,
const nsFrameList::Slice& newFrames =
mFrames.AppendFrames(nsnull, *overflowFrames);
ReParentChildListStyle(aPresContext, newFrames, this);
ReparentChildListStyle(aPresContext, newFrames, this);
}
// Set our own reflow state (additional state above and beyond
@@ -1108,7 +1108,7 @@ nsFirstLineFrame::Reflow(nsPresContext* aPresContext,
SetStyleContext(newSC);
// Re-resolve all children
ReParentChildListStyle(aPresContext, mFrames, this);
ReparentChildListStyle(aPresContext, mFrames, this);
}
}
}
@@ -1135,7 +1135,7 @@ nsFirstLineFrame::PullOverflowsFromPrevInFlow()
// Assume that our prev-in-flow has the same line container that we do.
const nsFrameList::Slice& newFrames =
mFrames.InsertFrames(this, nsnull, *prevOverflowFrames);
ReParentChildListStyle(PresContext(), newFrames, this);
ReparentChildListStyle(PresContext(), newFrames, this);
}
}
}
+1 -1
View File
@@ -393,7 +393,7 @@ nsTransitionManager::StyleContextChanged(nsIContent *aElement,
NS_PRECONDITION(aOldStyleContext->GetPseudo() ==
aNewStyleContext->GetPseudo(),
"pseudo type mismatch");
// If we were called from ReParentStyleContext, this assertion would
// If we were called from ReparentStyleContext, this assertion would
// actually fire. If we need to be called from there, we can probably
// just remove it; the condition probably isn't critical, although
// it's worth thinking about some more.
-1
View File
@@ -343,7 +343,6 @@ private:
static void ActivateLastWindow();
static nsresult OpenWindow( const char *urlstr, const char *args );
static nsresult OpenBrowserWindow();
static nsresult ReParent( nsISupports *window, HWND newParent );
static void SetupSysTrayIcon();
static void RemoveSysTrayIcon();
+2 -2
View File
@@ -122,7 +122,7 @@ AddChild(STCategoryNode * parent, STCategoryNode * child)
}
int
ReParent(STCategoryNode * parent, STCategoryNode * child)
Reparent(STCategoryNode * parent, STCategoryNode * child)
{
PRUint32 i;
@@ -312,7 +312,7 @@ ProcessCategoryParentRule(STCategoryRule * parentRule, STCategoryNode * root,
** we would have created it as the child of root. Now we need to
** remove it from root's child list and add it into this node
*/
ReParent(node, child);
Reparent(node, child);
}
}