Fix 'text-decoration: blink' and the blink element. Patch from Chase Tingley <tingley@sundell.net>. r=dbaron sr=hyatt b=89065

This commit is contained in:
dbaron%fas.harvard.edu 2001-10-11 00:15:09 +00:00
Родитель ea18234e39
Коммит edc11e5ad3
6 изменённых файлов: 24 добавлений и 2 удалений

Просмотреть файл

@ -226,6 +226,9 @@ struct nsHTMLReflowState {
// set it. if false, the reflow sets alignCharOffset
PRPackedBool mUseAlignCharOffset;
// Keep track of text-decoration: blink
PRPackedBool mBlinks;
// Cached pointers to the various style structs used during intialization
const nsStyleDisplay* mStyleDisplay;
const nsStyleVisibility* mStyleVisibility;

Просмотреть файл

@ -1831,6 +1831,14 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext,
aContainingBlockHeight);
}
}
/* Check for blinking text. */
mBlinks = (parentReflowState && parentReflowState->mBlinks);
if (!mBlinks) {
const nsStyleTextReset* st;
frame->GetStyleData(eStyleStruct_TextReset,
(const nsStyleStruct*&)st);
mBlinks = (st->mTextDecoration & NS_STYLE_TEXT_DECORATION_BLINK);
}
}
// Compute the box data for block and block-replaced elements in the

Просмотреть файл

@ -226,6 +226,9 @@ struct nsHTMLReflowState {
// set it. if false, the reflow sets alignCharOffset
PRPackedBool mUseAlignCharOffset;
// Keep track of text-decoration: blink
PRPackedBool mBlinks;
// Cached pointers to the various style structs used during intialization
const nsStyleDisplay* mStyleDisplay;
const nsStyleVisibility* mStyleVisibility;

Просмотреть файл

@ -5011,7 +5011,7 @@ nsTextFrame::Reflow(nsIPresContext* aPresContext,
// the TEXT_BLINK_ON bit).
PRBool lastTimeWeSkippedLeadingWS = 0 != (mState & TEXT_SKIP_LEADING_WS);
mState &= ~TEXT_REFLOW_FLAGS;
if (ts.mFont->mFont.decorations & NS_STYLE_TEXT_DECORATION_BLINK) {
if (aReflowState.mBlinks) {
if (0 == (mState & TEXT_BLINK_ON)) {
mState |= TEXT_BLINK_ON;
nsBlinkTimer::AddBlinkFrame(aPresContext, this);

Просмотреть файл

@ -1831,6 +1831,14 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext,
aContainingBlockHeight);
}
}
/* Check for blinking text. */
mBlinks = (parentReflowState && parentReflowState->mBlinks);
if (!mBlinks) {
const nsStyleTextReset* st;
frame->GetStyleData(eStyleStruct_TextReset,
(const nsStyleStruct*&)st);
mBlinks = (st->mTextDecoration & NS_STYLE_TEXT_DECORATION_BLINK);
}
}
// Compute the box data for block and block-replaced elements in the

Просмотреть файл

@ -5011,7 +5011,7 @@ nsTextFrame::Reflow(nsIPresContext* aPresContext,
// the TEXT_BLINK_ON bit).
PRBool lastTimeWeSkippedLeadingWS = 0 != (mState & TEXT_SKIP_LEADING_WS);
mState &= ~TEXT_REFLOW_FLAGS;
if (ts.mFont->mFont.decorations & NS_STYLE_TEXT_DECORATION_BLINK) {
if (aReflowState.mBlinks) {
if (0 == (mState & TEXT_BLINK_ON)) {
mState |= TEXT_BLINK_ON;
nsBlinkTimer::AddBlinkFrame(aPresContext, this);