diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 14a00466509..b2bf147f9ec 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -387,18 +387,6 @@ GetSpecialSibling(nsIFrameManager* aFrameManager, nsIFrame* aFrame, nsIFrame** a *aResult = NS_STATIC_CAST(nsIFrame*, value); } -static nsIFrame* -GetLastSpecialSibling(nsIFrameManager* aFrameManager, nsIFrame* aFrame) -{ - for (nsIFrame *frame = aFrame, *next; ; frame = next) { - GetSpecialSibling(aFrameManager, frame, &next); - if (!next) - return frame; - } - NS_NOTREACHED("unreachable code"); - return nsnull; -} - // Get the frame's next-in-flow, or, if it doesn't have one, // its special sibling. static nsIFrame* @@ -7824,14 +7812,6 @@ FindPreviousAnonymousSibling(nsIPresShell* aPresShell, nsIFrame* prevSibling; aPresShell->GetPrimaryFrameFor(child, &prevSibling); if (prevSibling) { - // The frame may be a special frame (a split inline frame that - // contains a block). Get the last part of that split. - if (IsFrameSpecial(prevSibling)) { - nsCOMPtr fm; - aPresShell->GetFrameManager(getter_AddRefs(fm)); - prevSibling = GetLastSpecialSibling(fm, prevSibling); - } - // The frame may have a continuation. If so, we want the // last-in-flow as our previous sibling. prevSibling = prevSibling->GetLastInFlow(); @@ -8031,14 +8011,6 @@ nsCSSFrameConstructor::FindPreviousSibling(nsIPresShell* aPresShell, aPresShell->GetPrimaryFrameFor(nsCOMPtr(*iter), &prevSibling); if (prevSibling) { - // The frame may be a special frame (a split inline frame that - // contains a block). Get the last part of that split. - if (IsFrameSpecial(prevSibling)) { - nsCOMPtr fm; - aPresShell->GetFrameManager(getter_AddRefs(fm)); - prevSibling = GetLastSpecialSibling(fm, prevSibling); - } - // The frame may have a continuation. Get the last-in-flow prevSibling = prevSibling->GetLastInFlow(); diff --git a/mozilla/layout/generic/nsLineLayout.cpp b/mozilla/layout/generic/nsLineLayout.cpp index a2ceb515943..c384d879b66 100644 --- a/mozilla/layout/generic/nsLineLayout.cpp +++ b/mozilla/layout/generic/nsLineLayout.cpp @@ -2149,17 +2149,16 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd) PRBool zeroEffectiveSpanBox = PR_FALSE; // XXXldb If we really have empty continuations, then all these other // checks don't make sense for them. - if (emptyContinuation || - (mCompatMode != eCompatibility_FullStandards && - (psd == mRootSpan || - (0 == spanFramePFD->mBorderPadding.top && - 0 == spanFramePFD->mBorderPadding.right && - 0 == spanFramePFD->mBorderPadding.bottom && - 0 == spanFramePFD->mBorderPadding.left && - 0 == spanFramePFD->mMargin.top && - 0 == spanFramePFD->mMargin.right && - 0 == spanFramePFD->mMargin.bottom && - 0 == spanFramePFD->mMargin.left)))) { + if ((emptyContinuation || mCompatMode != eCompatibility_FullStandards) && + ((psd == mRootSpan) || + ((0 == spanFramePFD->mBorderPadding.top) && + (0 == spanFramePFD->mBorderPadding.right) && + (0 == spanFramePFD->mBorderPadding.bottom) && + (0 == spanFramePFD->mBorderPadding.left) && + (0 == spanFramePFD->mMargin.top) && + (0 == spanFramePFD->mMargin.right) && + (0 == spanFramePFD->mMargin.bottom) && + (0 == spanFramePFD->mMargin.left)))) { // This code handles an issue with compatability with non-css // conformant browsers. In particular, there are some cases // where the font-size and line-height for a span must be diff --git a/mozilla/layout/html/base/src/nsLineLayout.cpp b/mozilla/layout/html/base/src/nsLineLayout.cpp index a2ceb515943..c384d879b66 100644 --- a/mozilla/layout/html/base/src/nsLineLayout.cpp +++ b/mozilla/layout/html/base/src/nsLineLayout.cpp @@ -2149,17 +2149,16 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd) PRBool zeroEffectiveSpanBox = PR_FALSE; // XXXldb If we really have empty continuations, then all these other // checks don't make sense for them. - if (emptyContinuation || - (mCompatMode != eCompatibility_FullStandards && - (psd == mRootSpan || - (0 == spanFramePFD->mBorderPadding.top && - 0 == spanFramePFD->mBorderPadding.right && - 0 == spanFramePFD->mBorderPadding.bottom && - 0 == spanFramePFD->mBorderPadding.left && - 0 == spanFramePFD->mMargin.top && - 0 == spanFramePFD->mMargin.right && - 0 == spanFramePFD->mMargin.bottom && - 0 == spanFramePFD->mMargin.left)))) { + if ((emptyContinuation || mCompatMode != eCompatibility_FullStandards) && + ((psd == mRootSpan) || + ((0 == spanFramePFD->mBorderPadding.top) && + (0 == spanFramePFD->mBorderPadding.right) && + (0 == spanFramePFD->mBorderPadding.bottom) && + (0 == spanFramePFD->mBorderPadding.left) && + (0 == spanFramePFD->mMargin.top) && + (0 == spanFramePFD->mMargin.right) && + (0 == spanFramePFD->mMargin.bottom) && + (0 == spanFramePFD->mMargin.left)))) { // This code handles an issue with compatability with non-css // conformant browsers. In particular, there are some cases // where the font-size and line-height for a span must be diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 14a00466509..b2bf147f9ec 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -387,18 +387,6 @@ GetSpecialSibling(nsIFrameManager* aFrameManager, nsIFrame* aFrame, nsIFrame** a *aResult = NS_STATIC_CAST(nsIFrame*, value); } -static nsIFrame* -GetLastSpecialSibling(nsIFrameManager* aFrameManager, nsIFrame* aFrame) -{ - for (nsIFrame *frame = aFrame, *next; ; frame = next) { - GetSpecialSibling(aFrameManager, frame, &next); - if (!next) - return frame; - } - NS_NOTREACHED("unreachable code"); - return nsnull; -} - // Get the frame's next-in-flow, or, if it doesn't have one, // its special sibling. static nsIFrame* @@ -7824,14 +7812,6 @@ FindPreviousAnonymousSibling(nsIPresShell* aPresShell, nsIFrame* prevSibling; aPresShell->GetPrimaryFrameFor(child, &prevSibling); if (prevSibling) { - // The frame may be a special frame (a split inline frame that - // contains a block). Get the last part of that split. - if (IsFrameSpecial(prevSibling)) { - nsCOMPtr fm; - aPresShell->GetFrameManager(getter_AddRefs(fm)); - prevSibling = GetLastSpecialSibling(fm, prevSibling); - } - // The frame may have a continuation. If so, we want the // last-in-flow as our previous sibling. prevSibling = prevSibling->GetLastInFlow(); @@ -8031,14 +8011,6 @@ nsCSSFrameConstructor::FindPreviousSibling(nsIPresShell* aPresShell, aPresShell->GetPrimaryFrameFor(nsCOMPtr(*iter), &prevSibling); if (prevSibling) { - // The frame may be a special frame (a split inline frame that - // contains a block). Get the last part of that split. - if (IsFrameSpecial(prevSibling)) { - nsCOMPtr fm; - aPresShell->GetFrameManager(getter_AddRefs(fm)); - prevSibling = GetLastSpecialSibling(fm, prevSibling); - } - // The frame may have a continuation. Get the last-in-flow prevSibling = prevSibling->GetLastInFlow();