[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:11:31 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 76f6b35e423819bfbaef76f557a1fa2fafa14c82
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Nov 13 20:13:11 2003 +0000
Implement a custom unfurl marquee style.
Reviewed by john
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyRule):
* khtml/css/cssvalues.c:
(hash_val):
(findValue):
* khtml/css/cssvalues.h:
* khtml/css/cssvalues.in:
* khtml/rendering/render_box.cpp:
(RenderBox::calcHeight):
* khtml/rendering/render_layer.cpp:
(m_direction):
(Marquee::isUnfurlMarquee):
(Marquee::start):
(Marquee::updateMarqueePosition):
(Marquee::updateMarqueeStyle):
(Marquee::timerEvent):
* khtml/rendering/render_layer.h:
(khtml::):
* khtml/rendering/render_style.h:
(khtml::):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 9caea4c..8dd4dc5 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,32 @@
+2003-11-13 David Hyatt <hyatt at apple.com>
+
+ Implement a custom unfurl marquee style.
+
+ Reviewed by john
+
+ * khtml/css/cssparser.cpp:
+ (CSSParser::parseValue):
+ * khtml/css/cssstyleselector.cpp:
+ (khtml::CSSStyleSelector::applyRule):
+ * khtml/css/cssvalues.c:
+ (hash_val):
+ (findValue):
+ * khtml/css/cssvalues.h:
+ * khtml/css/cssvalues.in:
+ * khtml/rendering/render_box.cpp:
+ (RenderBox::calcHeight):
+ * khtml/rendering/render_layer.cpp:
+ (m_direction):
+ (Marquee::isUnfurlMarquee):
+ (Marquee::start):
+ (Marquee::updateMarqueePosition):
+ (Marquee::updateMarqueeStyle):
+ (Marquee::timerEvent):
+ * khtml/rendering/render_layer.h:
+ (khtml::):
+ * khtml/rendering/render_style.h:
+ (khtml::):
+
2003-11-13 Ken Kocienda <kocienda at apple.com>
Reviewed by John
diff --git a/WebCore/khtml/css/cssparser.cpp b/WebCore/khtml/css/cssparser.cpp
index 5213726..8091341 100644
--- a/WebCore/khtml/css/cssparser.cpp
+++ b/WebCore/khtml/css/cssparser.cpp
@@ -1041,7 +1041,8 @@ bool CSSParser::parseValue( int propId, bool important )
valid_primitive = validUnit(value, FLength|FPercent, strict&(!nonCSSHint));
break;
case CSS_PROP__KHTML_MARQUEE_STYLE:
- if (id == CSS_VAL_NONE || id == CSS_VAL_SLIDE || id == CSS_VAL_SCROLL || id == CSS_VAL_ALTERNATE)
+ if (id == CSS_VAL_NONE || id == CSS_VAL_SLIDE || id == CSS_VAL_SCROLL || id == CSS_VAL_ALTERNATE ||
+ id == CSS_VAL_UNFURL)
valid_primitive = true;
break;
case CSS_PROP__KHTML_MARQUEE_REPETITION:
diff --git a/WebCore/khtml/css/cssstyleselector.cpp b/WebCore/khtml/css/cssstyleselector.cpp
index 3b10533..2325448 100644
--- a/WebCore/khtml/css/cssstyleselector.cpp
+++ b/WebCore/khtml/css/cssstyleselector.cpp
@@ -3459,6 +3459,9 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
case CSS_VAL_ALTERNATE:
style->setMarqueeBehavior(MALTERNATE);
break;
+ case CSS_VAL_UNFURL:
+ style->setMarqueeBehavior(MUNFURL);
+ break;
}
break;
}
diff --git a/WebCore/khtml/css/cssvalues.c b/WebCore/khtml/css/cssvalues.c
index cc72f03..2a72bba 100644
--- a/WebCore/khtml/css/cssvalues.c
+++ b/WebCore/khtml/css/cssvalues.c
@@ -7,7 +7,7 @@ struct css_value {
const char *name;
int id;
};
-/* maximum key range = 1944, duplicates = 1 */
+/* maximum key range = 1964, duplicates = 1 */
#ifdef __GNUC__
__inline
@@ -21,32 +21,32 @@ hash_val (register const char *str, register unsigned int len)
{
static const unsigned short asso_values[] =
{
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 5, 1944, 1944, 0, 15,
- 20, 25, 30, 35, 40, 5, 10, 0, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 0, 99, 34,
- 15, 205, 115, 94, 135, 55, 0, 84, 0, 93,
- 30, 200, 145, 50, 140, 59, 0, 190, 68, 120,
- 223, 30, 95, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944,
- 1944, 1944, 1944, 1944, 1944, 1944
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 5, 1964, 1964, 0, 5,
+ 10, 15, 20, 25, 30, 35, 40, 0, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 0, 99, 34,
+ 15, 205, 135, 94, 135, 55, 5, 84, 0, 93,
+ 30, 200, 145, 40, 140, 59, 0, 190, 68, 120,
+ 223, 30, 95, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964,
+ 1964, 1964, 1964, 1964, 1964, 1964
};
register int hval = 0;
@@ -110,24 +110,24 @@ findValue (register const char *str, register unsigned int len)
{
enum
{
- TOTAL_KEYWORDS = 254,
+ TOTAL_KEYWORDS = 255,
MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 22,
MIN_HASH_VALUE = 0,
- MAX_HASH_VALUE = 1943
+ MAX_HASH_VALUE = 1963
};
static const struct css_value wordlist_value[] =
{
{"900", CSS_VAL_900},
- {"700", CSS_VAL_700},
- {"800", CSS_VAL_800},
{"100", CSS_VAL_100},
{"200", CSS_VAL_200},
{"300", CSS_VAL_300},
{"400", CSS_VAL_400},
{"500", CSS_VAL_500},
{"600", CSS_VAL_600},
+ {"700", CSS_VAL_700},
+ {"800", CSS_VAL_800},
{"navy", CSS_VAL_NAVY},
{"ltr", CSS_VAL_LTR},
{"rtl", CSS_VAL_RTL},
@@ -135,9 +135,9 @@ findValue (register const char *str, register unsigned int len)
{"static", CSS_VAL_STATIC},
{"small", CSS_VAL_SMALL},
{"disc", CSS_VAL_DISC},
- {"fast", CSS_VAL_FAST},
{"wait", CSS_VAL_WAIT},
{"hand", CSS_VAL_HAND},
+ {"fast", CSS_VAL_FAST},
{"initial", CSS_VAL_INITIAL},
{"katakana", CSS_VAL_KATAKANA},
{"start", CSS_VAL_START},
@@ -145,20 +145,20 @@ findValue (register const char *str, register unsigned int len)
{"always", CSS_VAL_ALWAYS},
{"black", CSS_VAL_BLACK},
{"thin", CSS_VAL_THIN},
- {"fantasy", CSS_VAL_FANTASY},
{"aqua", CSS_VAL_AQUA},
{"end", CSS_VAL_END},
+ {"fantasy", CSS_VAL_FANTASY},
{"gray", CSS_VAL_GRAY},
{"blink", CSS_VAL_BLINK},
{"table", CSS_VAL_TABLE},
{"thick", CSS_VAL_THICK},
{"bold", CSS_VAL_BOLD},
{"icon", CSS_VAL_ICON},
- {"left", CSS_VAL_LEFT},
{"solid", CSS_VAL_SOLID},
{"slide", CSS_VAL_SLIDE},
{"up", CSS_VAL_UP},
{"avoid", CSS_VAL_AVOID},
+ {"left", CSS_VAL_LEFT},
{"top", CSS_VAL_TOP},
{"sub", CSS_VAL_SUB},
{"inset", CSS_VAL_INSET},
@@ -186,7 +186,6 @@ findValue (register const char *str, register unsigned int len)
{"dotted", CSS_VAL_DOTTED},
{"large", CSS_VAL_LARGE},
{"single", CSS_VAL_SINGLE},
- {"justify", CSS_VAL_JUSTIFY},
{"run-in", CSS_VAL_RUN_IN},
{"hiragana", CSS_VAL_HIRAGANA},
{"hidden", CSS_VAL_HIDDEN},
@@ -196,6 +195,7 @@ findValue (register const char *str, register unsigned int len)
{"circle", CSS_VAL_CIRCLE},
{"grey", CSS_VAL_GREY},
{"list-item", CSS_VAL_LIST_ITEM},
+ {"justify", CSS_VAL_JUSTIFY},
{"level", CSS_VAL_LEVEL},
{"help", CSS_VAL_HELP},
{"landscape", CSS_VAL_LANDSCAPE},
@@ -211,43 +211,43 @@ findValue (register const char *str, register unsigned int len)
{"white", CSS_VAL_WHITE},
{"menu", CSS_VAL_MENU},
{"crop", CSS_VAL_CROP},
- {"default", CSS_VAL_DEFAULT},
{"silver", CSS_VAL_SILVER},
{"olive", CSS_VAL_OLIVE},
{"wider", CSS_VAL_WIDER},
{"window", CSS_VAL_WINDOW},
{"visible", CSS_VAL_VISIBLE},
- {"infinite", CSS_VAL_INFINITE},
+ {"default", CSS_VAL_DEFAULT},
{"table-cell", CSS_VAL_TABLE_CELL},
{"backwards", CSS_VAL_BACKWARDS},
{"status-bar", CSS_VAL_STATUS_BAR},
{"armenian", CSS_VAL_ARMENIAN},
{"yellow", CSS_VAL_YELLOW},
+ {"infinite", CSS_VAL_INFINITE},
{"move", CSS_VAL_MOVE},
{"above", CSS_VAL_ABOVE},
{"stretch", CSS_VAL_STRETCH},
- {"serif", CSS_VAL_SERIF},
{"larger", CSS_VAL_LARGER},
{"alternate", CSS_VAL_ALTERNATE},
- {"fuchsia", CSS_VAL_FUCHSIA},
{"capitalize", CSS_VAL_CAPITALIZE},
{"bottom", CSS_VAL_BOTTOM},
+ {"serif", CSS_VAL_SERIF},
{"xx-small", CSS_VAL_XX_SMALL},
- {"fixed", CSS_VAL_FIXED},
+ {"fuchsia", CSS_VAL_FUCHSIA},
{"center", CSS_VAL_CENTER},
{"embed", CSS_VAL_EMBED},
{"inherit", CSS_VAL_INHERIT},
{"small-caption", CSS_VAL_SMALL_CAPTION},
{"below", CSS_VAL_BELOW},
{"lighter", CSS_VAL_LIGHTER},
+ {"fixed", CSS_VAL_FIXED},
+ {"square", CSS_VAL_SQUARE},
{"nowrap", CSS_VAL_NOWRAP},
- {"-khtml-left", CSS_VAL__KHTML_LEFT},
{"collapse", CSS_VAL_COLLAPSE},
- {"square", CSS_VAL_SQUARE},
{"medium", CSS_VAL_MEDIUM},
{"baseline", CSS_VAL_BASELINE},
{"outset", CSS_VAL_OUTSET},
{"bolder", CSS_VAL_BOLDER},
+ {"-khtml-left", CSS_VAL__KHTML_LEFT},
{"maroon", CSS_VAL_MAROON},
{"lower", CSS_VAL_LOWER},
{"-khtml-body", CSS_VAL__KHTML_BODY},
@@ -258,6 +258,7 @@ findValue (register const char *str, register unsigned int len)
{"green", CSS_VAL_GREEN},
{"portrait", CSS_VAL_PORTRAIT},
{"inline-table", CSS_VAL_INLINE_TABLE},
+ {"unfurl", CSS_VAL_UNFURL},
{"multiple", CSS_VAL_MULTIPLE},
{"graytext", CSS_VAL_GRAYTEXT},
{"repeat", CSS_VAL_REPEAT},
@@ -266,12 +267,12 @@ findValue (register const char *str, register unsigned int len)
{"-khtml-auto", CSS_VAL__KHTML_AUTO},
{"inline-axis", CSS_VAL_INLINE_AXIS},
{"outside", CSS_VAL_OUTSIDE},
- {"sans-serif", CSS_VAL_SANS_SERIF},
{"repeat-y", CSS_VAL_REPEAT_Y},
{"katakana-iroha", CSS_VAL_KATAKANA_IROHA},
- {"super", CSS_VAL_SUPER},
{"-apple-aqua", CSS_VAL__APPLE_AQUA},
+ {"super", CSS_VAL_SUPER},
{"-khtml-right", CSS_VAL__KHTML_RIGHT},
+ {"sans-serif", CSS_VAL_SANS_SERIF},
{"transparent", CSS_VAL_TRANSPARENT},
{"-khtml-text", CSS_VAL__KHTML_TEXT},
{"cursive", CSS_VAL_CURSIVE},
@@ -285,28 +286,28 @@ findValue (register const char *str, register unsigned int len)
{"pointer", CSS_VAL_POINTER},
{"text-top", CSS_VAL_TEXT_TOP},
{"-khtml-normal", CSS_VAL__KHTML_NORMAL},
- {"forwards", CSS_VAL_FORWARDS},
+ {"oblique", CSS_VAL_OBLIQUE},
{"condensed", CSS_VAL_CONDENSED},
{"n-resize", CSS_VAL_N_RESIZE},
{"inline-block", CSS_VAL_INLINE_BLOCK},
- {"oblique", CSS_VAL_OBLIQUE},
+ {"forwards", CSS_VAL_FORWARDS},
{"georgian", CSS_VAL_GEORGIAN},
{"crosshair", CSS_VAL_CROSSHAIR},
{"s-resize", CSS_VAL_S_RESIZE},
{"purple", CSS_VAL_PURPLE},
{"activecaption", CSS_VAL_ACTIVECAPTION},
- {"infotext", CSS_VAL_INFOTEXT},
{"expanded", CSS_VAL_EXPANDED},
{"-khtml-box", CSS_VAL__KHTML_BOX},
+ {"infotext", CSS_VAL_INFOTEXT},
{"horizontal", CSS_VAL_HORIZONTAL},
{"table-column", CSS_VAL_TABLE_COLUMN},
{"underline", CSS_VAL_UNDERLINE},
- {"buttonface", CSS_VAL_BUTTONFACE},
{"marquee", CSS_VAL_MARQUEE},
{"w-resize", CSS_VAL_W_RESIZE},
{"background", CSS_VAL_BACKGROUND},
{"xx-large", CSS_VAL_XX_LARGE},
{"captiontext", CSS_VAL_CAPTIONTEXT},
+ {"buttonface", CSS_VAL_BUTTONFACE},
{"overline", CSS_VAL_OVERLINE},
{"hebrew", CSS_VAL_HEBREW},
{"groove", CSS_VAL_GROOVE},
@@ -333,8 +334,8 @@ findValue (register const char *str, register unsigned int len)
{"se-resize", CSS_VAL_SE_RESIZE},
{"buttonshadow", CSS_VAL_BUTTONSHADOW},
{"threedface", CSS_VAL_THREEDFACE},
- {"windowframe", CSS_VAL_WINDOWFRAME},
{"upper-alpha", CSS_VAL_UPPER_ALPHA},
+ {"windowframe", CSS_VAL_WINDOWFRAME},
{"uppercase", CSS_VAL_UPPERCASE},
{"ultra-condensed", CSS_VAL_ULTRA_CONDENSED},
{"highlighttext", CSS_VAL_HIGHLIGHTTEXT},
@@ -345,18 +346,18 @@ findValue (register const char *str, register unsigned int len)
{"line-through", CSS_VAL_LINE_THROUGH},
{"cjk-ideographic", CSS_VAL_CJK_IDEOGRAPHIC},
{"semi-condensed", CSS_VAL_SEMI_CONDENSED},
+ {"open-quote", CSS_VAL_OPEN_QUOTE},
{"buttonhighlight", CSS_VAL_BUTTONHIGHLIGHT},
{"-khtml-inline-box", CSS_VAL__KHTML_INLINE_BOX},
{"threedshadow", CSS_VAL_THREEDSHADOW},
- {"open-quote", CSS_VAL_OPEN_QUOTE},
{"message-box", CSS_VAL_MESSAGE_BOX},
{"inactiveborder", CSS_VAL_INACTIVEBORDER},
{"semi-expanded", CSS_VAL_SEMI_EXPANDED},
{"bidi-override", CSS_VAL_BIDI_OVERRIDE},
- {"-khtml-around-floats", CSS_VAL__KHTML_AROUND_FLOATS},
{"appworkspace", CSS_VAL_APPWORKSPACE},
- {"infobackground", CSS_VAL_INFOBACKGROUND},
{"upper-roman", CSS_VAL_UPPER_ROMAN},
+ {"-khtml-around-floats", CSS_VAL__KHTML_AROUND_FLOATS},
+ {"infobackground", CSS_VAL_INFOBACKGROUND},
{"inactivecaptiontext", CSS_VAL_INACTIVECAPTIONTEXT},
{"-khtml-baseline-middle", CSS_VAL__KHTML_BASELINE_MIDDLE},
{"extra-condensed", CSS_VAL_EXTRA_CONDENSED},
@@ -394,21 +395,21 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
9, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -396, -244, -2, -1,
+ -1, -1, -1, -1, -397, -245, -2, -1,
12, -1, -1, -1, 13, -1, -1, -1,
14, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 15, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 16, 17,
- -1, -1, -1, -1, 18, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 16,
+ -1, -1, -1, -1, 17, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 19, -1, -1, 20, 21,
+ -1, -1, 18, 19, -1, -1, 20, 21,
-1, -1, -1, -1, -1, 22, -1, -1,
-1, 23, -1, -1, -1, -1, -1, -1,
-1, 24, -1, -1, 25, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 26, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 26, -1, -1, -1, -1, -1,
- 27, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 28, -1, -1, -1, -1, -1,
+ -1, -1, 27, -1, -1, -1, 28, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
29, -1, -1, -1, 30, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
@@ -417,9 +418,9 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1,
31, -1, -1, -1, 32, -1, -1, -1,
-1, -1, 33, -1, -1, -1, -1, 34,
- 35, -1, -1, -1, -1, -1, -1, -1,
- -1, 36, -1, -1, -1, -1, 37, 38,
- -1, -1, 39, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 35, -1, -1, -1, -1, 36, 37,
+ -1, -1, 38, -1, 39, -1, -1, -1,
-1, 40, -1, -1, 41, 42, -1, -1,
-1, 43, -1, 44, -1, -1, -1, -1,
45, -1, -1, -1, -1, 46, -1, -1,
@@ -433,143 +434,146 @@ findValue (register const char *str, register unsigned int len)
59, -1, -1, -1, 60, 61, -1, -1,
-1, 62, 63, 64, -1, -1, -1, 65,
-1, -1, -1, 66, -1, -1, -1, -1,
- -1, 67, 68, -1, -1, -1, 69, 70,
- -1, -1, -1, -1, -1, -1, -1, 71,
- 72, 73, -1, -1, 74, 75, -1, -1,
- 76, -1, -1, -1, -1, -1, 77, -1,
+ -1, -1, 67, -1, -1, -1, 68, 69,
+ -1, -1, -1, -1, -1, -1, -1, 70,
+ 71, 72, -1, -1, 73, 74, -1, -1,
+ 75, -1, 76, -1, -1, -1, 77, -1,
-1, -1, -1, -1, -1, 78, -1, -1,
79, -1, 80, -1, 81, -1, 82, -1,
-1, 83, 84, -1, -1, -1, 85, -1,
-1, -1, 86, -1, -1, 87, -1, -1,
-1, -1, 88, 89, -1, -1, 90, 91,
- -1, -1, -1, -1, -1, 92, -1, 93,
- 94, -1, -1, -1, -1, -1, -1, 95,
- -1, -1, -1, -1, 96, 97, -1, -1,
- -1, 98, -1, -1, 99, -1, -1, 100,
- 101, 102, -1, 103, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 104, -1,
- -1, -1, -1, -1, 105, 106, 107, -1,
- -1, -1, -1, 108, 109, -1, -1, -1,
- -1, -1, -1, -1, 110, 111, -1, -1,
- 112, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 113, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 114, 115, -1,
- -1, 116, -1, -1, 117, 118, -1, -1,
- 119, -1, -1, -1, -1, 120, -1, -1,
- -1, -1, -1, 121, -1, -1, -1, -1,
- -1, -1, 122, 123, 124, -1, -1, -1,
- -1, -1, -1, 125, -1, 126, 127, -1,
- -1, -1, -1, 128, -1, -1, -1, 129,
+ -1, -1, -1, -1, -1, -1, -1, 92,
+ 93, -1, -1, -1, -1, -1, -1, 94,
+ -1, -1, -1, -1, 95, 96, -1, -1,
+ -1, 97, -1, -1, 98, -1, -1, 99,
+ 100, 101, -1, 102, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 103, 104, -1,
+ -1, -1, -1, -1, 105, 106, -1, -1,
+ -1, -1, -1, 107, 108, -1, -1, -1,
+ -1, -1, -1, -1, -1, 109, -1, -1,
+ 110, -1, 111, -1, -1, -1, -1, -1,
+ -1, -1, -1, 112, -1, -1, -1, -1,
+ 113, -1, -1, -1, -1, -1, 114, -1,
+ -1, 115, -1, -1, 116, 117, -1, -1,
+ 118, -1, -1, -1, -1, 119, -1, -1,
+ -1, 120, 121, 122, -1, -1, -1, -1,
+ -1, -1, -1, 123, -1, -1, -1, -1,
+ -1, -1, -1, 124, -1, 125, 126, -1,
+ -1, -1, -1, 127, -1, -1, 128, 129,
-1, 130, 131, 132, -1, 133, -1, -1,
134, 135, 136, -1, -1, -1, -1, -1,
- 137, -1, -1, -1, 138, -1, -1, -1,
- 139, -1, -1, -1, 140, -1, -1, 141,
- -1, -1, -1, -1, -1, -1, -1, 142,
- -1, -1, -1, -1, -1, 143, -1, -1,
- 144, -1, -1, -1, -1, 145, -1, -1,
- -1, -1, -1, -1, 146, -1, -1, 147,
- -1, -1, 148, -1, -1, 149, -1, -1,
- -1, -1, -1, 150, -1, -1, -1, -1,
- -1, 151, 152, -1, -1, 153, 154, 155,
- -1, 156, 157, 158, -1, -1, -1, 159,
- -1, -1, -1, -1, 160, -1, -1, -1,
- -1, 161, -1, -1, -1, 162, -1, 163,
- -1, -1, 164, -1, -1, -1, -1, -1,
- -1, 165, -1, -1, -1, 166, -1, -1,
- -1, 167, 168, -1, -1, 169, -1, 170,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 171, -1, -1, -1, 172, 173,
- -1, 174, 175, -1, 176, -1, -1, -1,
+ 137, -1, -1, -1, 138, 139, -1, -1,
+ 140, -1, -1, -1, 141, -1, -1, 142,
+ -1, -1, -1, -1, -1, -1, -1, 143,
+ -1, -1, -1, -1, -1, 144, -1, -1,
+ 145, -1, -1, -1, -1, 146, -1, -1,
+ -1, -1, -1, -1, 147, -1, -1, -1,
+ -1, -1, 148, -1, -1, 149, -1, 150,
+ -1, -1, -1, 151, -1, -1, -1, -1,
+ -1, -1, 152, 153, -1, 154, 155, 156,
+ -1, 157, 158, 159, -1, -1, -1, 160,
+ -1, -1, -1, -1, 161, -1, -1, -1,
+ -1, 162, -1, -1, -1, 163, -1, 164,
+ -1, -1, 165, -1, -1, -1, -1, -1,
+ -1, 166, -1, -1, -1, 167, -1, -1,
+ -1, 168, 169, -1, -1, 170, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 171, -1, -1, -1, -1, -1, -1,
+ -1, -1, 172, -1, -1, -1, 173, 174,
+ -1, 175, 176, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 177, -1,
-1, -1, -1, -1, 178, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 179,
- 180, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 181, -1,
- -1, 182, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 183, 184, -1, 185, -1,
- -1, -1, 186, -1, 187, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 188,
- 189, -1, -1, 190, -1, -1, -1, 191,
- -1, -1, 192, 193, -1, -1, -1, -1,
- -1, -1, -1, 194, -1, -1, -1, -1,
- -1, -1, 195, -1, -1, -1, -1, -1,
- 196, -1, -1, -1, -1, -1, -1, 197,
- -1, -1, 198, 199, -1, -1, 200, -1,
- -1, -1, -1, -1, -1, 201, -1, -1,
- -1, -1, -1, 202, -1, -1, 203, -1,
- 204, 205, -1, -1, -1, -1, -1, 206,
+ 179, -1, -1, -1, -1, -1, -1, 180,
+ 181, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 182, -1,
+ -1, 183, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 184, -1, 185, -1,
+ -1, -1, 186, -1, 187, 188, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 189,
+ 190, -1, -1, 191, -1, -1, -1, 192,
+ -1, -1, 193, 194, -1, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, 196, -1, -1, -1, -1, -1,
+ 197, -1, -1, -1, -1, -1, -1, 198,
+ -1, -1, 199, 200, -1, -1, 201, -1,
+ -1, -1, -1, -1, -1, 202, -1, -1,
+ -1, -1, -1, 203, -1, -1, 204, -1,
+ 205, 206, -1, -1, -1, -1, -1, 207,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 207, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 208,
+ -1, -1, -1, -1, -1, 208, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 209,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 209, -1,
- -1, 210, -1, -1, 211, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 210, -1,
+ -1, 211, -1, -1, 212, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- 212, -1, -1, -1, -1, -1, 213, -1,
+ 213, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 214, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 214, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 215, -1,
+ -1, 216, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 217, -1, -1, -1, -1,
+ 218, -1, -1, 219, -1, 220, -1, -1,
+ -1, -1, 221, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 216, -1, -1, -1, -1,
- 217, -1, -1, 218, -1, 219, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 220, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 221, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 222, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 222, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 223, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, 224, -1, -1, -1, -1, -1, -1,
- -1, -1, 225, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 226, -1,
- 227, -1, -1, -1, -1, 228, 229, -1,
+ -1, -1, -1, -1, -1, 224, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 230, -1, -1, -1, 231, -1,
- -1, -1, -1, -1, -1, -1, -1, 232,
- -1, 233, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 225, -1,
+ -1, -1, 226, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 227, -1, 228, -1,
+ 229, -1, -1, -1, -1, 230, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 234, 235, -1, -1,
- -1, -1, -1, -1, -1, -1, 236, -1,
- -1, -1, -1, -1, -1, 237, -1, -1,
+ -1, -1, 231, -1, -1, -1, 232, -1,
+ -1, -1, -1, -1, -1, -1, -1, 233,
+ -1, 234, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 235, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 236, -1, -1,
+ 237, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 238, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 238, -1, -1, -1, -1,
+ -1, -1, -1, 239, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 239, -1, -1, 240, -1,
+ -1, -1, -1, 240, -1, -1, 241, -1,
+ -1, -1, -1, -1, -1, 242, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 241,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 242, -1,
- -1, -1, -1, 243, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 243, -1,
-1, -1, -1, 244, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 245, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 246, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, 247, -1, -1, 248, -1, -1, -1,
+ -1, -1, -1, 247, -1, -1, -1, 248,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 249, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 250, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 251,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, 249, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 250,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
@@ -577,10 +581,10 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 252, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 251, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
@@ -596,10 +600,10 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 253,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 252,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
@@ -619,7 +623,7 @@ findValue (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 253
+ -1, -1, -1, 254
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -912,6 +916,7 @@ static const char * const valueList[] = {
"infinite",
"slide",
"alternate",
+"unfurl",
0
};
DOMString getValueName(unsigned short id)
diff --git a/WebCore/khtml/css/cssvalues.h b/WebCore/khtml/css/cssvalues.h
index 9c2678b..c88dee1 100644
--- a/WebCore/khtml/css/cssvalues.h
+++ b/WebCore/khtml/css/cssvalues.h
@@ -263,7 +263,8 @@ DOM::DOMString getValueName(unsigned short id);
#define CSS_VAL_INFINITE 252
#define CSS_VAL_SLIDE 253
#define CSS_VAL_ALTERNATE 254
+#define CSS_VAL_UNFURL 255
-#define CSS_VAL_TOTAL 255
+#define CSS_VAL_TOTAL 256
#endif
diff --git a/WebCore/khtml/css/cssvalues.in b/WebCore/khtml/css/cssvalues.in
index 3801dd6..46aed53 100644
--- a/WebCore/khtml/css/cssvalues.in
+++ b/WebCore/khtml/css/cssvalues.in
@@ -436,4 +436,5 @@ infinite
slide
# scroll
alternate
+unfurl
diff --git a/WebCore/khtml/rendering/render_box.cpp b/WebCore/khtml/rendering/render_box.cpp
index 965d48c..8d87f8b 100644
--- a/WebCore/khtml/rendering/render_box.cpp
+++ b/WebCore/khtml/rendering/render_box.cpp
@@ -933,6 +933,13 @@ void RenderBox::calcHeight()
}
}
}
+
+ // Unfurling marquees override with the furled height.
+ if (style()->overflow() == OMARQUEE && m_layer && m_layer->marquee() &&
+ m_layer->marquee()->isUnfurlMarquee() && !m_layer->marquee()->isHorizontal()) {
+ m_layer->marquee()->setEnd(m_height);
+ m_height = kMin(m_height, m_layer->marquee()->unfurlPos());
+ }
}
short RenderBox::calcReplacedWidth() const
diff --git a/WebCore/khtml/rendering/render_layer.cpp b/WebCore/khtml/rendering/render_layer.cpp
index 78ab2a8..c44133e 100644
--- a/WebCore/khtml/rendering/render_layer.cpp
+++ b/WebCore/khtml/rendering/render_layer.cpp
@@ -1227,8 +1227,8 @@ void RenderLayer::stopMarquees()
// Marquee implementation
Marquee::Marquee(RenderLayer* l)
-:m_layer(l), m_currentLoop(0), m_timerId(0), m_start(0), m_end(0), m_speed(0), m_reset(false),
- m_whiteSpace(NORMAL)
+:m_layer(l), m_currentLoop(0), m_timerId(0), m_start(0), m_end(0), m_speed(0), m_unfurlPos(0), m_reset(false),
+ m_whiteSpace(NORMAL), m_direction(MAUTO)
{
}
@@ -1270,6 +1270,12 @@ bool Marquee::isHorizontal() const
return direction() == MLEFT || direction() == MRIGHT;
}
+bool Marquee::isUnfurlMarquee() const
+{
+ EMarqueeBehavior behavior = m_layer->renderer()->style()->marqueeBehavior();
+ return (behavior == MUNFURL);
+}
+
int Marquee::computePosition(EMarqueeDirection dir, bool stopAtContentEdge)
{
RenderObject* o = m_layer->renderer();
@@ -1321,10 +1327,18 @@ void Marquee::start()
if (m_timerId)
return;
- if (isHorizontal())
- m_layer->scrollToOffset(m_start, 0, false, false);
- else
- m_layer->scrollToOffset(0, m_start, false, false);
+ if (isUnfurlMarquee()) {
+ bool forward = direction() == MDOWN || direction() == MRIGHT;
+ bool isReversed = (forward && m_currentLoop % 2) || (!forward && !(m_currentLoop % 2));
+ m_unfurlPos = isReversed ? m_end : m_start;
+ m_layer->renderer()->setChildNeedsLayout(true);
+ }
+ else {
+ if (isHorizontal())
+ m_layer->scrollToOffset(m_start, 0, false, false);
+ else
+ m_layer->scrollToOffset(0, m_start, false, false);
+ }
m_timerId = startTimer(speed());
}
@@ -1344,9 +1358,21 @@ void Marquee::updateMarqueePosition()
{
bool activate = (m_totalLoops <= 0 || m_currentLoop < m_totalLoops);
if (activate) {
- EMarqueeBehavior behavior = m_layer->renderer()->style()->marqueeBehavior();
- m_start = computePosition(direction(), behavior == MALTERNATE);
- m_end = computePosition(reverseDirection(), behavior == MALTERNATE || behavior == MSLIDE);
+ if (isUnfurlMarquee()) {
+ if (m_unfurlPos < m_start) {
+ m_unfurlPos = m_start;
+ m_layer->renderer()->setChildNeedsLayout(true);
+ }
+ else if (m_unfurlPos > m_end) {
+ m_unfurlPos = m_end;
+ m_layer->renderer()->setChildNeedsLayout(true);
+ }
+ }
+ else {
+ EMarqueeBehavior behavior = m_layer->renderer()->style()->marqueeBehavior();
+ m_start = computePosition(direction(), behavior == MALTERNATE);
+ m_end = computePosition(reverseDirection(), behavior == MALTERNATE || behavior == MSLIDE);
+ }
start();
}
}
@@ -1355,13 +1381,17 @@ void Marquee::updateMarqueeStyle()
{
RenderStyle* s = m_layer->renderer()->style();
+ if (m_direction != s->marqueeDirection() || (m_totalLoops != s->marqueeLoopCount() && m_currentLoop >= m_totalLoops))
+ m_currentLoop = 0; // When direction changes or our loopCount is a smaller number than our current loop, reset our loop.
+
m_totalLoops = s->marqueeLoopCount();
+ m_direction = s->marqueeDirection();
m_whiteSpace = s->whiteSpace();
if (m_layer->renderer()->isHTMLMarquee()) {
// Hack for WinIE. In WinIE, a value of 0 or lower for the loop count for SLIDE means to only do
// one loop.
- if (m_totalLoops <= 0 && s->marqueeBehavior() == MSLIDE)
+ if (m_totalLoops <= 0 && (s->marqueeBehavior() == MSLIDE || s->marqueeBehavior() == MUNFURL))
m_totalLoops = 1;
// Hack alert: Set the white-space value to nowrap for horizontal marquees with inline children, thus ensuring
@@ -1418,36 +1448,49 @@ void Marquee::timerEvent(QTimerEvent* evt)
newPos = m_end;
else {
bool addIncrement = direction() == MUP || direction() == MLEFT;
- if (s->marqueeBehavior() == MALTERNATE && m_currentLoop % 2) {
+ bool isReversed = s->marqueeBehavior() == MALTERNATE && m_currentLoop % 2;
+ if (isUnfurlMarquee()) {
+ isReversed = (!addIncrement && m_currentLoop % 2) || (addIncrement && !(m_currentLoop % 2));
+ addIncrement = !isReversed;
+ }
+ if (isReversed) {
// We're going in the reverse direction.
endPoint = m_start;
range = -range;
- addIncrement = !addIncrement;
+ if (!isUnfurlMarquee())
+ addIncrement = !addIncrement;
}
bool positive = range > 0;
int clientSize = (isHorizontal() ? m_layer->renderer()->clientWidth() : m_layer->renderer()->clientHeight());
int increment = abs(m_layer->renderer()->style()->marqueeIncrement().width(clientSize));
- newPos = (isHorizontal() ? m_layer->scrollXOffset() : m_layer->scrollYOffset()) +
- (addIncrement ? increment : -increment);
+ int currentPos = isUnfurlMarquee() ? m_unfurlPos :
+ (isHorizontal() ? m_layer->scrollXOffset() : m_layer->scrollYOffset());
+ newPos = currentPos + (addIncrement ? increment : -increment);
if (positive)
newPos = kMin(newPos, endPoint);
else
newPos = kMax(newPos, endPoint);
}
-
+
if (newPos == endPoint) {
m_currentLoop++;
if (m_totalLoops > 0 && m_currentLoop >= m_totalLoops) {
killTimer(m_timerId);
m_timerId = 0;
}
- else if (s->marqueeBehavior() != MALTERNATE)
+ else if (s->marqueeBehavior() != MALTERNATE && s->marqueeBehavior() != MUNFURL)
m_reset = true;
}
- if (isHorizontal())
- m_layer->scrollToXOffset(newPos);
- else
- m_layer->scrollToYOffset(newPos);
+ if (isUnfurlMarquee()) {
+ m_unfurlPos = newPos;
+ m_layer->renderer()->setChildNeedsLayout(true);
+ }
+ else {
+ if (isHorizontal())
+ m_layer->scrollToXOffset(newPos);
+ else
+ m_layer->scrollToYOffset(newPos);
+ }
}
diff --git a/WebCore/khtml/rendering/render_layer.h b/WebCore/khtml/rendering/render_layer.h
index 6cd2ea1..edd4dce 100644
--- a/WebCore/khtml/rendering/render_layer.h
+++ b/WebCore/khtml/rendering/render_layer.h
@@ -93,16 +93,21 @@ public:
EMarqueeDirection direction() const;
EMarqueeDirection reverseDirection() const { return static_cast<EMarqueeDirection>(-direction()); }
bool isHorizontal() const;
+ bool isUnfurlMarquee() const;
+ int unfurlPos() const { return m_unfurlPos; }
+
EWhiteSpace whiteSpace() { return m_whiteSpace; }
int computePosition(EMarqueeDirection dir, bool stopAtClientEdge);
+
+ void setEnd(int end) { m_end = end; }
void start();
void stop();
void updateMarqueeStyle();
void updateMarqueePosition();
-
+
private:
RenderLayer* m_layer;
int m_currentLoop;
@@ -111,8 +116,10 @@ private:
int m_start;
int m_end;
int m_speed;
+ int m_unfurlPos;
bool m_reset;
EWhiteSpace m_whiteSpace : 2;
+ EMarqueeDirection m_direction : 4;
};
class RenderLayer
diff --git a/WebCore/khtml/rendering/render_style.h b/WebCore/khtml/rendering/render_style.h
index 1409c41..b262d60 100644
--- a/WebCore/khtml/rendering/render_style.h
+++ b/WebCore/khtml/rendering/render_style.h
@@ -418,7 +418,7 @@ public:
//------------------------------------------------
// CSS3 Marquee Properties
-enum EMarqueeBehavior { MNONE, MSCROLL, MSLIDE, MALTERNATE };
+enum EMarqueeBehavior { MNONE, MSCROLL, MSLIDE, MALTERNATE, MUNFURL };
enum EMarqueeDirection { MAUTO = 0, MLEFT = 1, MRIGHT = -1, MUP = 2, MDOWN = -2, MFORWARD = 3, MBACKWARD = -3 };
class StyleMarqueeData : public Shared<StyleMarqueeData>
@@ -437,7 +437,7 @@ public:
int loops; // -1 means infinite.
- EMarqueeBehavior behavior : 2;
+ EMarqueeBehavior behavior : 3;
EMarqueeDirection direction : 3;
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list