зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
b734fd1741
Коммит
cd77d3b7fb
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче