From e1a57c9002bbfbceb6502ca7d55b6cb18c6d8ed5 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Sun, 2 May 2004 04:51:08 +0000 Subject: [PATCH] Blink changes need to reflow. Bug 236897, r+sr=dbaron git-svn-id: svn://10.0.0.236/trunk@155815 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/shared/src/nsStyleStruct.cpp | 10 ++++++++-- mozilla/layout/style/nsStyleStruct.cpp | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/mozilla/content/shared/src/nsStyleStruct.cpp b/mozilla/content/shared/src/nsStyleStruct.cpp index 8e931facda5..514c2e2e145 100644 --- a/mozilla/content/shared/src/nsStyleStruct.cpp +++ b/mozilla/content/shared/src/nsStyleStruct.cpp @@ -1311,8 +1311,14 @@ nsChangeHint nsStyleTextReset::CalcDifference(const nsStyleTextReset& aOther) co { if (mVerticalAlign == aOther.mVerticalAlign && mUnicodeBidi == aOther.mUnicodeBidi) { - if (mTextDecoration != aOther.mTextDecoration) - return NS_STYLE_HINT_VISUAL; + if (mTextDecoration != aOther.mTextDecoration) { + // Reflow for blink changes, repaint for others + return + (mTextDecoration & NS_STYLE_TEXT_DECORATION_BLINK) == + (aOther.mTextDecoration & NS_STYLE_TEXT_DECORATION_BLINK) ? + NS_STYLE_HINT_VISUAL : NS_STYLE_HINT_REFLOW; + } + return NS_STYLE_HINT_NONE; } return NS_STYLE_HINT_REFLOW; diff --git a/mozilla/layout/style/nsStyleStruct.cpp b/mozilla/layout/style/nsStyleStruct.cpp index 8e931facda5..514c2e2e145 100644 --- a/mozilla/layout/style/nsStyleStruct.cpp +++ b/mozilla/layout/style/nsStyleStruct.cpp @@ -1311,8 +1311,14 @@ nsChangeHint nsStyleTextReset::CalcDifference(const nsStyleTextReset& aOther) co { if (mVerticalAlign == aOther.mVerticalAlign && mUnicodeBidi == aOther.mUnicodeBidi) { - if (mTextDecoration != aOther.mTextDecoration) - return NS_STYLE_HINT_VISUAL; + if (mTextDecoration != aOther.mTextDecoration) { + // Reflow for blink changes, repaint for others + return + (mTextDecoration & NS_STYLE_TEXT_DECORATION_BLINK) == + (aOther.mTextDecoration & NS_STYLE_TEXT_DECORATION_BLINK) ? + NS_STYLE_HINT_VISUAL : NS_STYLE_HINT_REFLOW; + } + return NS_STYLE_HINT_NONE; } return NS_STYLE_HINT_REFLOW;