зеркало из https://github.com/mozilla/pjs.git
In almost-standards mode, standards-mode text decorations and quirks-mode inline box model have to interact -- so make standards-mode text-decorations (when text-decorations are present) cause the standards-mode inline box model. b=199673 r+sr=bzbarsky
This commit is contained in:
Родитель
22a52f5cbc
Коммит
fc8f3eda8e
|
@ -537,6 +537,7 @@
|
|||
#define NS_STYLE_TEXT_DECORATION_BLINK 0x08
|
||||
#define NS_STYLE_TEXT_DECORATION_OVERRIDE_ALL 0x10
|
||||
#define NS_STYLE_TEXT_DECORATION_PREF_ANCHORS 0x20
|
||||
#define NS_STYLE_TEXT_DECORATION_LINES_MASK (NS_STYLE_TEXT_DECORATION_UNDERLINE | NS_STYLE_TEXT_DECORATION_OVERLINE | NS_STYLE_TEXT_DECORATION_LINE_THROUGH)
|
||||
|
||||
// See nsStyleText
|
||||
#define NS_STYLE_TEXT_TRANSFORM_NONE 0
|
||||
|
|
|
@ -537,6 +537,7 @@
|
|||
#define NS_STYLE_TEXT_DECORATION_BLINK 0x08
|
||||
#define NS_STYLE_TEXT_DECORATION_OVERRIDE_ALL 0x10
|
||||
#define NS_STYLE_TEXT_DECORATION_PREF_ANCHORS 0x20
|
||||
#define NS_STYLE_TEXT_DECORATION_LINES_MASK (NS_STYLE_TEXT_DECORATION_UNDERLINE | NS_STYLE_TEXT_DECORATION_OVERLINE | NS_STYLE_TEXT_DECORATION_LINE_THROUGH)
|
||||
|
||||
// See nsStyleText
|
||||
#define NS_STYLE_TEXT_TRANSFORM_NONE 0
|
||||
|
|
|
@ -167,7 +167,11 @@ nsInlineFrame::IsEmpty()
|
|||
!IsMarginZero(margin->mMargin.GetRightUnit(),
|
||||
margin->mMargin.GetRight(coord)) ||
|
||||
!IsMarginZero(margin->mMargin.GetLeftUnit(),
|
||||
margin->mMargin.GetLeft(coord))) {
|
||||
margin->mMargin.GetLeft(coord)) ||
|
||||
// do we have any standards-mode text decorations?
|
||||
(GetPresContext()->CompatibilityMode() != eCompatibility_NavQuirks &&
|
||||
(GetStyleTextReset()->mTextDecoration &
|
||||
NS_STYLE_TEXT_DECORATION_LINES_MASK) != 0)) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -161,6 +161,7 @@ nsLineLayout::nsLineLayout(nsIPresContext* aPresContext,
|
|||
|
||||
// Stash away some style data that we need
|
||||
mStyleText = aOuterReflowState->frame->GetStyleText();
|
||||
mStyleTextReset = aOuterReflowState->frame->GetStyleTextReset();
|
||||
mTextAlign = mStyleText->mTextAlign;
|
||||
mLineNumber = 0;
|
||||
mColumn = 0;
|
||||
|
@ -2037,15 +2038,21 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd)
|
|||
// 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)))) {
|
||||
((psd == mRootSpan)
|
||||
? (mCompatMode == eCompatibility_NavQuirks ||
|
||||
(mStyleTextReset->mTextDecoration &
|
||||
NS_STYLE_TEXT_DECORATION_LINES_MASK) == 0)
|
||||
: ((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) &&
|
||||
(mCompatMode == eCompatibility_NavQuirks ||
|
||||
(spanFrame->GetStyleTextReset()->mTextDecoration &
|
||||
NS_STYLE_TEXT_DECORATION_LINES_MASK) == 0)))) {
|
||||
// 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
|
||||
|
|
|
@ -267,6 +267,7 @@ protected:
|
|||
// This state is constant for a given block frame doing line layout
|
||||
nsSpaceManager* mSpaceManager;
|
||||
const nsStyleText* mStyleText; // for the block
|
||||
const nsStyleTextReset* mStyleTextReset; // for the block
|
||||
const nsHTMLReflowState* mBlockReflowState;
|
||||
|
||||
// XXX remove this when landing bug 154892 (splitting absolute positioned frames)
|
||||
|
|
|
@ -167,7 +167,11 @@ nsInlineFrame::IsEmpty()
|
|||
!IsMarginZero(margin->mMargin.GetRightUnit(),
|
||||
margin->mMargin.GetRight(coord)) ||
|
||||
!IsMarginZero(margin->mMargin.GetLeftUnit(),
|
||||
margin->mMargin.GetLeft(coord))) {
|
||||
margin->mMargin.GetLeft(coord)) ||
|
||||
// do we have any standards-mode text decorations?
|
||||
(GetPresContext()->CompatibilityMode() != eCompatibility_NavQuirks &&
|
||||
(GetStyleTextReset()->mTextDecoration &
|
||||
NS_STYLE_TEXT_DECORATION_LINES_MASK) != 0)) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -161,6 +161,7 @@ nsLineLayout::nsLineLayout(nsIPresContext* aPresContext,
|
|||
|
||||
// Stash away some style data that we need
|
||||
mStyleText = aOuterReflowState->frame->GetStyleText();
|
||||
mStyleTextReset = aOuterReflowState->frame->GetStyleTextReset();
|
||||
mTextAlign = mStyleText->mTextAlign;
|
||||
mLineNumber = 0;
|
||||
mColumn = 0;
|
||||
|
@ -2037,15 +2038,21 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd)
|
|||
// 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)))) {
|
||||
((psd == mRootSpan)
|
||||
? (mCompatMode == eCompatibility_NavQuirks ||
|
||||
(mStyleTextReset->mTextDecoration &
|
||||
NS_STYLE_TEXT_DECORATION_LINES_MASK) == 0)
|
||||
: ((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) &&
|
||||
(mCompatMode == eCompatibility_NavQuirks ||
|
||||
(spanFrame->GetStyleTextReset()->mTextDecoration &
|
||||
NS_STYLE_TEXT_DECORATION_LINES_MASK) == 0)))) {
|
||||
// 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
|
||||
|
|
|
@ -267,6 +267,7 @@ protected:
|
|||
// This state is constant for a given block frame doing line layout
|
||||
nsSpaceManager* mSpaceManager;
|
||||
const nsStyleText* mStyleText; // for the block
|
||||
const nsStyleTextReset* mStyleTextReset; // for the block
|
||||
const nsHTMLReflowState* mBlockReflowState;
|
||||
|
||||
// XXX remove this when landing bug 154892 (splitting absolute positioned frames)
|
||||
|
|
Загрузка…
Ссылка в новой задаче