[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:07:02 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit de39634a078d220546a9b7a3151a444fe8097349
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 29 08:57:20 2003 +0000

    	Implement support for <marquee>.  This includes support for the CSS3 specification (although modified a fair
    	bit to actually be compatible with WinIE's version and to correct obvious errors in the draft).  All of the
    	marquee behaviors (slide, scroll, and alternate) are supported.
    
    	This patch also fixes the following bugs that were discovered while testing marquee:
    	(1) An error in the computation of scrollWidth and scrollHeight.
    	(2) The ability to ask for the leftmostPosition as well as the rightmostPosition of content and to
    	be able to ask for the positions of children (via left/right/lowest) without including the parent in the
    	computation.
    	(3) An optimization to RenderFlow's rightmost/lowestPosition functions to avoid examining text elements since
    	they are always fully accounted for by either overflow or by inline flow boxes.
    	(4) A fix for RTL rendering.  A block with direction:RTL was being placed on the right, when in reality only
    	its children should be placed on the right.
    	(5) A fix to prevent inline blocks and tables from computing auto margins (making them just like floats in this
    	regard).
    
            Reviewed by darin
    
            * khtml/css/cssparser.cpp:
            (validUnit):
            (CSSParser::parseValue):
            * khtml/css/cssproperties.c:
            (hash_prop):
            (findProp):
            * khtml/css/cssproperties.h:
            * khtml/css/cssproperties.in:
            * khtml/css/cssstyleselector.cpp:
            (khtml::convertToLength):
            (khtml::CSSStyleSelector::applyRule):
            * khtml/css/cssvalues.c:
            (hash_val):
            (findValue):
            * khtml/css/cssvalues.h:
            * khtml/css/cssvalues.in:
            * khtml/css/html4.css:
            * khtml/html/html_blockimpl.cpp:
            (HTMLMarqueeElementImpl::HTMLMarqueeElementImpl):
            (HTMLMarqueeElementImpl::id):
            (HTMLMarqueeElementImpl::parseAttribute):
            * khtml/html/html_blockimpl.h:
            (DOM::HTMLMarqueeElementImpl::minimumDelay):
            * khtml/html/htmlparser.cpp:
            (KHTMLParser::getElement):
            * khtml/misc/htmlattrs.c:
            (hash_attr):
            (findAttr):
            * khtml/misc/htmlattrs.h:
            * khtml/misc/htmlattrs.in:
            * khtml/rendering/bidi.cpp:
            (khtml::RenderBlock::findNextLineBreak):
            * khtml/rendering/render_block.cpp:
            (khtml::RenderBlock::lowestPosition):
            (khtml::RenderBlock::rightmostPosition):
            (khtml::RenderBlock::leftmostPosition):
            * khtml/rendering/render_block.h:
            * khtml/rendering/render_box.cpp:
            (RenderBox::setStyle):
            (RenderBox::calcWidth):
            (RenderBox::calcHorizontalMargins):
            (RenderBox::lowestPosition):
            (RenderBox::rightmostPosition):
            (RenderBox::leftmostPosition):
            * khtml/rendering/render_box.h:
            * khtml/rendering/render_flow.cpp:
            (RenderFlow::lowestPosition):
            (RenderFlow::rightmostPosition):
            (RenderFlow::leftmostPosition):
            * khtml/rendering/render_flow.h:
            * khtml/rendering/render_layer.cpp:
            (RenderLayer::RenderLayer):
            (RenderLayer::~RenderLayer):
            (RenderLayer::updateLayerPositions):
            (RenderLayer::scrollToOffset):
            (RenderLayer::computeScrollDimensions):
            (RenderLayer::styleChanged):
            (RenderLayer::stopMarquees):
            (m_whiteSpace):
            (Marquee::marqueeSpeed):
            (Marquee::direction):
            (Marquee::isHorizontal):
            (Marquee::computePosition):
            (Marquee::start):
            (Marquee::stop):
            (Marquee::updateMarqueePosition):
            (Marquee::updateMarqueeStyle):
            (Marquee::timerEvent):
            * khtml/rendering/render_layer.h:
            (khtml::):
            (khtml::RenderLayer::marquee):
            * khtml/rendering/render_object.cpp:
            (RenderObject::isHTMLMarquee):
            (RenderObject::sizesToMaxWidth):
            * khtml/rendering/render_object.h:
            (khtml::RenderObject::lowestPosition):
            (khtml::RenderObject::rightmostPosition):
            (khtml::RenderObject::leftmostPosition):
            * khtml/rendering/render_style.cpp:
            (StyleMarqueeData::StyleMarqueeData):
            (StyleMarqueeData::operator==):
            (opacity):
            (marquee):
            (StyleCSS3NonInheritedData::operator==):
            (RenderStyle::RenderStyle):
            * khtml/rendering/render_style.h:
            (khtml::):
            (khtml::StyleMarqueeData::operator!=):
            (khtml::RenderStyle::marqueeIncrement):
            (khtml::RenderStyle::marqueeSpeed):
            (khtml::RenderStyle::marqueeLoopCount):
            (khtml::RenderStyle::marqueeBehavior):
            (khtml::RenderStyle::marqueeDirection):
            (khtml::RenderStyle::setMarqueeIncrement):
            (khtml::RenderStyle::setMarqueeSpeed):
            (khtml::RenderStyle::setMarqueeDirection):
            (khtml::RenderStyle::setMarqueeBehavior):
            (khtml::RenderStyle::setMarqueeLoopCount):
            * khtml/xml/dom_docimpl.cpp:
            (DocumentImpl::createHTMLElement):
            * kwq/KWQKHTMLPart.mm:
            (KWQKHTMLPart::clearTimers):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5301 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index ffb580d..1bbeac1 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,128 @@
 2003-10-29  David Hyatt  <hyatt at apple.com>
 
+	Implement support for <marquee>.  This includes support for the CSS3 specification (although modified a fair
+	bit to actually be compatible with WinIE's version and to correct obvious errors in the draft).  All of the
+	marquee behaviors (slide, scroll, and alternate) are supported.
+
+	This patch also fixes the following bugs that were discovered while testing marquee:
+	(1) An error in the computation of scrollWidth and scrollHeight.  
+	(2) The ability to ask for the leftmostPosition as well as the rightmostPosition of content and to
+	be able to ask for the positions of children (via left/right/lowest) without including the parent in the
+	computation.
+	(3) An optimization to RenderFlow's rightmost/lowestPosition functions to avoid examining text elements since
+	they are always fully accounted for by either overflow or by inline flow boxes.
+	(4) A fix for RTL rendering.  A block with direction:RTL was being placed on the right, when in reality only
+	its children should be placed on the right.
+	(5) A fix to prevent inline blocks and tables from computing auto margins (making them just like floats in this
+	regard).
+	
+        Reviewed by darin
+
+        * khtml/css/cssparser.cpp:
+        (validUnit):
+        (CSSParser::parseValue):
+        * khtml/css/cssproperties.c:
+        (hash_prop):
+        (findProp):
+        * khtml/css/cssproperties.h:
+        * khtml/css/cssproperties.in:
+        * khtml/css/cssstyleselector.cpp:
+        (khtml::convertToLength):
+        (khtml::CSSStyleSelector::applyRule):
+        * khtml/css/cssvalues.c:
+        (hash_val):
+        (findValue):
+        * khtml/css/cssvalues.h:
+        * khtml/css/cssvalues.in:
+        * khtml/css/html4.css:
+        * khtml/html/html_blockimpl.cpp:
+        (HTMLMarqueeElementImpl::HTMLMarqueeElementImpl):
+        (HTMLMarqueeElementImpl::id):
+        (HTMLMarqueeElementImpl::parseAttribute):
+        * khtml/html/html_blockimpl.h:
+        (DOM::HTMLMarqueeElementImpl::minimumDelay):
+        * khtml/html/htmlparser.cpp:
+        (KHTMLParser::getElement):
+        * khtml/misc/htmlattrs.c:
+        (hash_attr):
+        (findAttr):
+        * khtml/misc/htmlattrs.h:
+        * khtml/misc/htmlattrs.in:
+        * khtml/rendering/bidi.cpp:
+        (khtml::RenderBlock::findNextLineBreak):
+        * khtml/rendering/render_block.cpp:
+        (khtml::RenderBlock::lowestPosition):
+        (khtml::RenderBlock::rightmostPosition):
+        (khtml::RenderBlock::leftmostPosition):
+        * khtml/rendering/render_block.h:
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::setStyle):
+        (RenderBox::calcWidth):
+        (RenderBox::calcHorizontalMargins):
+        (RenderBox::lowestPosition):
+        (RenderBox::rightmostPosition):
+        (RenderBox::leftmostPosition):
+        * khtml/rendering/render_box.h:
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::lowestPosition):
+        (RenderFlow::rightmostPosition):
+        (RenderFlow::leftmostPosition):
+        * khtml/rendering/render_flow.h:
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::RenderLayer):
+        (RenderLayer::~RenderLayer):
+        (RenderLayer::updateLayerPositions):
+        (RenderLayer::scrollToOffset):
+        (RenderLayer::computeScrollDimensions):
+        (RenderLayer::styleChanged):
+        (RenderLayer::stopMarquees):
+        (m_whiteSpace):
+        (Marquee::marqueeSpeed):
+        (Marquee::direction):
+        (Marquee::isHorizontal):
+        (Marquee::computePosition):
+        (Marquee::start):
+        (Marquee::stop):
+        (Marquee::updateMarqueePosition):
+        (Marquee::updateMarqueeStyle):
+        (Marquee::timerEvent):
+        * khtml/rendering/render_layer.h:
+        (khtml::):
+        (khtml::RenderLayer::marquee):
+        * khtml/rendering/render_object.cpp:
+        (RenderObject::isHTMLMarquee):
+        (RenderObject::sizesToMaxWidth):
+        * khtml/rendering/render_object.h:
+        (khtml::RenderObject::lowestPosition):
+        (khtml::RenderObject::rightmostPosition):
+        (khtml::RenderObject::leftmostPosition):
+        * khtml/rendering/render_style.cpp:
+        (StyleMarqueeData::StyleMarqueeData):
+        (StyleMarqueeData::operator==):
+        (opacity):
+        (marquee):
+        (StyleCSS3NonInheritedData::operator==):
+        (RenderStyle::RenderStyle):
+        * khtml/rendering/render_style.h:
+        (khtml::):
+        (khtml::StyleMarqueeData::operator!=):
+        (khtml::RenderStyle::marqueeIncrement):
+        (khtml::RenderStyle::marqueeSpeed):
+        (khtml::RenderStyle::marqueeLoopCount):
+        (khtml::RenderStyle::marqueeBehavior):
+        (khtml::RenderStyle::marqueeDirection):
+        (khtml::RenderStyle::setMarqueeIncrement):
+        (khtml::RenderStyle::setMarqueeSpeed):
+        (khtml::RenderStyle::setMarqueeDirection):
+        (khtml::RenderStyle::setMarqueeBehavior):
+        (khtml::RenderStyle::setMarqueeLoopCount):
+        * khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::createHTMLElement):
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::clearTimers):
+
+2003-10-29  David Hyatt  <hyatt at apple.com>
+
 	Make <button> be an inline-block.
 	
         * khtml/css/html4.css:
diff --git a/WebCore/khtml/css/cssparser.cpp b/WebCore/khtml/css/cssparser.cpp
index 8a91325..9ba8a3b 100644
--- a/WebCore/khtml/css/cssparser.cpp
+++ b/WebCore/khtml/css/cssparser.cpp
@@ -378,11 +378,13 @@ static bool validUnit( Value *value, int unitflags, bool strict )
     case CSSPrimitiveValue::CSS_PC:
 	b = (unitflags & FLength);
 	break;
+    case CSSPrimitiveValue::CSS_MS:
+    case CSSPrimitiveValue::CSS_S:
+        b = (unitflags & FTime);
+        break;
     case CSSPrimitiveValue::CSS_DEG:
     case CSSPrimitiveValue::CSS_RAD:
     case CSSPrimitiveValue::CSS_GRAD:
-    case CSSPrimitiveValue::CSS_MS:
-    case CSSPrimitiveValue::CSS_S:
     case CSSPrimitiveValue::CSS_HZ:
     case CSSPrimitiveValue::CSS_KHZ:
     case CSSPrimitiveValue::CSS_DIMENSION:
@@ -505,7 +507,8 @@ bool CSSParser::parseValue( int propId, bool important )
 	break;
 
     case CSS_PROP_OVERFLOW:             // visible | hidden | scroll | auto | inherit
-	if ( id == CSS_VAL_VISIBLE || id == CSS_VAL_HIDDEN || id == CSS_VAL_SCROLL || id == CSS_VAL_AUTO )
+	if (id == CSS_VAL_VISIBLE || id == CSS_VAL_HIDDEN || id == CSS_VAL_SCROLL || id == CSS_VAL_AUTO ||
+            id == CSS_VAL_MARQUEE)
 	    valid_primitive = true;
 	break;
 
@@ -1029,6 +1032,42 @@ bool CSSParser::parseValue( int propId, bool important )
         valid_primitive = validUnit(value, FInteger|FNonNeg, true);
         break;
     
+    case CSS_PROP__KHTML_MARQUEE: {
+        const int properties[5] = { CSS_PROP__KHTML_MARQUEE_DIRECTION, CSS_PROP__KHTML_MARQUEE_INCREMENT,
+                                    CSS_PROP__KHTML_MARQUEE_REPETITION,
+                                    CSS_PROP__KHTML_MARQUEE_STYLE, CSS_PROP__KHTML_MARQUEE_SPEED };
+        return parseShortHand(properties, 5, important);
+    }
+    case CSS_PROP__KHTML_MARQUEE_DIRECTION:
+        if (id == CSS_VAL_FORWARDS || id == CSS_VAL_BACKWARDS || id == CSS_VAL_AHEAD ||
+            id == CSS_VAL_REVERSE || id == CSS_VAL_LEFT || id == CSS_VAL_RIGHT || id == CSS_VAL_DOWN ||
+            id == CSS_VAL_UP || id == CSS_VAL_AUTO)
+            valid_primitive = true;
+        break;
+    case CSS_PROP__KHTML_MARQUEE_INCREMENT:
+        if (id == CSS_VAL_SMALL || id == CSS_VAL_LARGE || id == CSS_VAL_MEDIUM)
+            valid_primitive = true;
+        else
+            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)
+            valid_primitive = true;
+        break;
+    case CSS_PROP__KHTML_MARQUEE_REPETITION:
+        if (id == CSS_VAL_INFINITE)
+            valid_primitive = true;
+        else
+            valid_primitive = validUnit(value, FInteger|FNonNeg, strict&(!nonCSSHint));
+        break;
+    case CSS_PROP__KHTML_MARQUEE_SPEED:
+        if (id == CSS_VAL_NORMAL || id == CSS_VAL_SLOW || id == CSS_VAL_FAST)
+            valid_primitive = true;
+        else
+            valid_primitive = validUnit(value, FTime|FInteger|FNonNeg, strict&(!nonCSSHint));
+        break;
+    // End of CSS3 properties
+        
 	/* shorthand properties */
     case CSS_PROP_BACKGROUND:
     	// ['background-color' || 'background-image' ||'background-repeat' ||
diff --git a/WebCore/khtml/css/cssproperties.c b/WebCore/khtml/css/cssproperties.c
index 0f1b5f2..7410f59 100644
--- a/WebCore/khtml/css/cssproperties.c
+++ b/WebCore/khtml/css/cssproperties.c
@@ -7,7 +7,7 @@ struct props {
     const char *name;
     int id;
 };
-/* maximum key range = 1178, duplicates = 0 */
+/* maximum key range = 1213, duplicates = 0 */
 
 #ifdef __GNUC__
 __inline
@@ -21,32 +21,32 @@ hash_prop (register const char *str, register unsigned int len)
 {
   static const unsigned short asso_values[] =
     {
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185,    0, 1185, 1185, 1185, 1185,
-      1185,    0, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185,   15,   10,    0,
-         0,    0,  228,   35,    0,    0,    0,    0,  160,   40,
-         0,    0,   40,    5,    0,   45,    0,  250,   20,  180,
-       120,  210,   20, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
-      1185, 1185, 1185, 1185, 1185, 1185
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218,    0, 1218, 1218, 1218, 1218,
+      1218,   10, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218,   15,   10,    0,
+         0,    0,  205,   35,    0,    0,    0,    0,    0,   10,
+       390,    0,   65,   25,    0,   25,    0,   20,    5,  250,
+       125,  155,    5, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
+      1218, 1218, 1218, 1218, 1218, 1218
     };
   register int hval = len;
 
@@ -130,252 +130,261 @@ findProp (register const char *str, register unsigned int len)
 {
   enum
     {
-      TOTAL_KEYWORDS = 123,
+      TOTAL_KEYWORDS = 129,
       MIN_WORD_LENGTH = 3,
       MAX_WORD_LENGTH = 32,
-      MIN_HASH_VALUE = 7,
-      MAX_HASH_VALUE = 1184
+      MIN_HASH_VALUE = 5,
+      MAX_HASH_VALUE = 1217
     };
 
   static const struct props wordlist_prop[] =
     {
-      {"content", CSS_PROP_CONTENT},
-      {"direction", CSS_PROP_DIRECTION},
+      {"color", CSS_PROP_COLOR},
       {"border", CSS_PROP_BORDER},
+      {"clear", CSS_PROP_CLEAR},
+      {"border-color", CSS_PROP_BORDER_COLOR},
+      {"bottom", CSS_PROP_BOTTOM},
+      {"size", CSS_PROP_SIZE},
       {"right", CSS_PROP_RIGHT},
       {"height", CSS_PROP_HEIGHT},
-      {"top", CSS_PROP_TOP},
-      {"bottom", CSS_PROP_BOTTOM},
+      {"border-bottom", CSS_PROP_BORDER_BOTTOM},
+      {"border-bottom-color", CSS_PROP_BORDER_BOTTOM_COLOR},
+      {"cursor", CSS_PROP_CURSOR},
       {"border-right", CSS_PROP_BORDER_RIGHT},
+      {"border-right-color", CSS_PROP_BORDER_RIGHT_COLOR},
+      {"top", CSS_PROP_TOP},
+      {"clip", CSS_PROP_CLIP},
+      {"quotes", CSS_PROP_QUOTES},
       {"border-top", CSS_PROP_BORDER_TOP},
-      {"size", CSS_PROP_SIZE},
-      {"border-bottom", CSS_PROP_BORDER_BOTTOM},
-      {"min-height", CSS_PROP_MIN_HEIGHT},
-      {"position", CSS_PROP_POSITION},
+      {"scrollbar-track-color", CSS_PROP_SCROLLBAR_TRACK_COLOR},
+      {"border-top-color", CSS_PROP_BORDER_TOP_COLOR},
+      {"-khtml-marquee", CSS_PROP__KHTML_MARQUEE},
+      {"scrollbar-3dlight-color", CSS_PROP_SCROLLBAR_3DLIGHT_COLOR},
       {"page", CSS_PROP_PAGE},
-      {"margin", CSS_PROP_MARGIN},
-      {"padding", CSS_PROP_PADDING},
-      {"orphans", CSS_PROP_ORPHANS},
-      {"caption-side", CSS_PROP_CAPTION_SIDE},
-      {"text-indent", CSS_PROP_TEXT_INDENT},
-      {"margin-right", CSS_PROP_MARGIN_RIGHT},
-      {"padding-right", CSS_PROP_PADDING_RIGHT},
-      {"margin-top", CSS_PROP_MARGIN_TOP},
-      {"padding-top", CSS_PROP_PADDING_TOP},
-      {"z-index", CSS_PROP_Z_INDEX},
-      {"text-decoration", CSS_PROP_TEXT_DECORATION},
-      {"margin-bottom", CSS_PROP_MARGIN_BOTTOM},
-      {"padding-bottom", CSS_PROP_PADDING_BOTTOM},
-      {"border-spacing", CSS_PROP_BORDER_SPACING},
-      {"color", CSS_PROP_COLOR},
-      {"page-break-inside", CSS_PROP_PAGE_BREAK_INSIDE},
-      {"clear", CSS_PROP_CLEAR},
-      {"border-color", CSS_PROP_BORDER_COLOR},
+      {"border-collapse", CSS_PROP_BORDER_COLLAPSE},
+      {"scrollbar-highlight-color", CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR},
+      {"-khtml-marquee-speed", CSS_PROP__KHTML_MARQUEE_SPEED},
+      {"max-height", CSS_PROP_MAX_HEIGHT},
+      {"border-style", CSS_PROP_BORDER_STYLE},
+      {"visibility", CSS_PROP_VISIBILITY},
+      {"left", CSS_PROP_LEFT},
+      {"list-style", CSS_PROP_LIST_STYLE},
+      {"float", CSS_PROP_FLOAT},
+      {"border-left", CSS_PROP_BORDER_LEFT},
+      {"table-layout", CSS_PROP_TABLE_LAYOUT},
+      {"border-bottom-style", CSS_PROP_BORDER_BOTTOM_STYLE},
+      {"border-left-color", CSS_PROP_BORDER_LEFT_COLOR},
+      {"-khtml-box-pack", CSS_PROP__KHTML_BOX_PACK},
+      {"border-right-style", CSS_PROP_BORDER_RIGHT_STYLE},
       {"width", CSS_PROP_WIDTH},
+      {"-khtml-opacity", CSS_PROP__KHTML_OPACITY},
+      {"empty-cells", CSS_PROP_EMPTY_CELLS},
+      {"display", CSS_PROP_DISPLAY},
+      {"border-top-style", CSS_PROP_BORDER_TOP_STYLE},
       {"border-width", CSS_PROP_BORDER_WIDTH},
-      {"clip", CSS_PROP_CLIP},
-      {"line-height", CSS_PROP_LINE_HEIGHT},
-      {"max-height", CSS_PROP_MAX_HEIGHT},
-      {"border-right-color", CSS_PROP_BORDER_RIGHT_COLOR},
-      {"border-top-color", CSS_PROP_BORDER_TOP_COLOR},
-      {"min-width", CSS_PROP_MIN_WIDTH},
-      {"font", CSS_PROP_FONT},
-      {"border-bottom-color", CSS_PROP_BORDER_BOTTOM_COLOR},
+      {"-khtml-marquee-style", CSS_PROP__KHTML_MARQUEE_STYLE},
+      {"list-style-image", CSS_PROP_LIST_STYLE_IMAGE},
+      {"scrollbar-face-color", CSS_PROP_SCROLLBAR_FACE_COLOR},
+      {"border-bottom-width", CSS_PROP_BORDER_BOTTOM_WIDTH},
       {"border-right-width", CSS_PROP_BORDER_RIGHT_WIDTH},
+      {"scrollbar-arrow-color", CSS_PROP_SCROLLBAR_ARROW_COLOR},
       {"border-top-width", CSS_PROP_BORDER_TOP_WIDTH},
-      {"border-bottom-width", CSS_PROP_BORDER_BOTTOM_WIDTH},
-      {"unicode-bidi", CSS_PROP_UNICODE_BIDI},
-      {"font-stretch", CSS_PROP_FONT_STRETCH},
-      {"font-variant", CSS_PROP_FONT_VARIANT},
+      {"scrollbar-shadow-color", CSS_PROP_SCROLLBAR_SHADOW_COLOR},
       {"white-space", CSS_PROP_WHITE_SPACE},
-      {"cursor", CSS_PROP_CURSOR},
-      {"font-size", CSS_PROP_FONT_SIZE},
-      {"quotes", CSS_PROP_QUOTES},
-      {"counter-increment", CSS_PROP_COUNTER_INCREMENT},
+      {"page-break-before", CSS_PROP_PAGE_BREAK_BEFORE},
+      {"page-break-after", CSS_PROP_PAGE_BREAK_AFTER},
+      {"scrollbar-darkshadow-color", CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR},
+      {"direction", CSS_PROP_DIRECTION},
+      {"max-width", CSS_PROP_MAX_WIDTH},
+      {"border-left-style", CSS_PROP_BORDER_LEFT_STYLE},
+      {"outline", CSS_PROP_OUTLINE},
+      {"outline-color", CSS_PROP_OUTLINE_COLOR},
+      {"text-shadow", CSS_PROP_TEXT_SHADOW},
+      {"unicode-bidi", CSS_PROP_UNICODE_BIDI},
+      {"line-height", CSS_PROP_LINE_HEIGHT},
+      {"list-style-type", CSS_PROP_LIST_STYLE_TYPE},
+      {"min-height", CSS_PROP_MIN_HEIGHT},
       {"counter-reset", CSS_PROP_COUNTER_RESET},
+      {"margin", CSS_PROP_MARGIN},
+      {"overflow", CSS_PROP_OVERFLOW},
+      {"marker-offset", CSS_PROP_MARKER_OFFSET},
+      {"vertical-align", CSS_PROP_VERTICAL_ALIGN},
+      {"background", CSS_PROP_BACKGROUND},
+      {"border-left-width", CSS_PROP_BORDER_LEFT_WIDTH},
+      {"margin-bottom", CSS_PROP_MARGIN_BOTTOM},
+      {"background-color", CSS_PROP_BACKGROUND_COLOR},
+      {"position", CSS_PROP_POSITION},
+      {"-khtml-box-flex", CSS_PROP__KHTML_BOX_FLEX},
+      {"-khtml-flow-mode", CSS_PROP__KHTML_FLOW_MODE},
+      {"-khtml-marquee-direction", CSS_PROP__KHTML_MARQUEE_DIRECTION},
+      {"margin-right", CSS_PROP_MARGIN_RIGHT},
+      {"orphans", CSS_PROP_ORPHANS},
+      {"caption-side", CSS_PROP_CAPTION_SIDE},
+      {"padding", CSS_PROP_PADDING},
+      {"margin-top", CSS_PROP_MARGIN_TOP},
+      {"z-index", CSS_PROP_Z_INDEX},
+      {"widows", CSS_PROP_WIDOWS},
+      {"padding-bottom", CSS_PROP_PADDING_BOTTOM},
       {"letter-spacing", CSS_PROP_LETTER_SPACING},
+      {"text-decoration", CSS_PROP_TEXT_DECORATION},
+      {"background-image", CSS_PROP_BACKGROUND_IMAGE},
       {"text-decoration-color", CSS_PROP_TEXT_DECORATION_COLOR},
-      {"background", CSS_PROP_BACKGROUND},
-      {"word-spacing", CSS_PROP_WORD_SPACING},
-      {"text-align", CSS_PROP_TEXT_ALIGN},
       {"-khtml-box-orient", CSS_PROP__KHTML_BOX_ORIENT},
+      {"padding-right", CSS_PROP_PADDING_RIGHT},
+      {"border-spacing", CSS_PROP_BORDER_SPACING},
       {"-khtml-box-direction", CSS_PROP__KHTML_BOX_DIRECTION},
-      {"max-width", CSS_PROP_MAX_WIDTH},
-      {"page-break-before", CSS_PROP_PAGE_BREAK_BEFORE},
-      {"text-shadow", CSS_PROP_TEXT_SHADOW},
-      {"page-break-after", CSS_PROP_PAGE_BREAK_AFTER},
+      {"-khtml-marquee-repetition", CSS_PROP__KHTML_MARQUEE_REPETITION},
       {"background-repeat", CSS_PROP_BACKGROUND_REPEAT},
-      {"left", CSS_PROP_LEFT},
-      {"-khtml-box-pack", CSS_PROP__KHTML_BOX_PACK},
-      {"background-attachment", CSS_PROP_BACKGROUND_ATTACHMENT},
-      {"float", CSS_PROP_FLOAT},
-      {"border-left", CSS_PROP_BORDER_LEFT},
-      {"widows", CSS_PROP_WIDOWS},
-      {"background-position", CSS_PROP_BACKGROUND_POSITION},
-      {"background-image", CSS_PROP_BACKGROUND_IMAGE},
-      {"outline", CSS_PROP_OUTLINE},
-      {"vertical-align", CSS_PROP_VERTICAL_ALIGN},
-      {"border-style", CSS_PROP_BORDER_STYLE},
-      {"border-collapse", CSS_PROP_BORDER_COLLAPSE},
-      {"font-weight", CSS_PROP_FONT_WEIGHT},
-      {"visibility", CSS_PROP_VISIBILITY},
-      {"text-transform", CSS_PROP_TEXT_TRANSFORM},
-      {"display", CSS_PROP_DISPLAY},
-      {"border-right-style", CSS_PROP_BORDER_RIGHT_STYLE},
-      {"-khtml-opacity", CSS_PROP__KHTML_OPACITY},
-      {"border-top-style", CSS_PROP_BORDER_TOP_STYLE},
-      {"background-color", CSS_PROP_BACKGROUND_COLOR},
-      {"margin-left", CSS_PROP_MARGIN_LEFT},
-      {"padding-left", CSS_PROP_PADDING_LEFT},
-      {"border-bottom-style", CSS_PROP_BORDER_BOTTOM_STYLE},
-      {"background-position-x", CSS_PROP_BACKGROUND_POSITION_X},
+      {"page-break-inside", CSS_PROP_PAGE_BREAK_INSIDE},
+      {"text-align", CSS_PROP_TEXT_ALIGN},
       {"-khtml-box-lines", CSS_PROP__KHTML_BOX_LINES},
-      {"-khtml-box-align", CSS_PROP__KHTML_BOX_ALIGN},
-      {"marker-offset", CSS_PROP_MARKER_OFFSET},
+      {"padding-top", CSS_PROP_PADDING_TOP},
+      {"font", CSS_PROP_FONT},
       {"-khtml-border-vertical-spacing", CSS_PROP__KHTML_BORDER_VERTICAL_SPACING},
-      {"-khtml-border-horizontal-spacing", CSS_PROP__KHTML_BORDER_HORIZONTAL_SPACING},
-      {"border-left-color", CSS_PROP_BORDER_LEFT_COLOR},
-      {"outline-color", CSS_PROP_OUTLINE_COLOR},
-      {"scrollbar-track-color", CSS_PROP_SCROLLBAR_TRACK_COLOR},
-      {"border-left-width", CSS_PROP_BORDER_LEFT_WIDTH},
-      {"overflow", CSS_PROP_OVERFLOW},
+      {"-khtml-box-align", CSS_PROP__KHTML_BOX_ALIGN},
+      {"outline-style", CSS_PROP_OUTLINE_STYLE},
+      {"-khtml-box-flex-group", CSS_PROP__KHTML_BOX_FLEX_GROUP},
+      {"font-stretch", CSS_PROP_FONT_STRETCH},
+      {"font-size", CSS_PROP_FONT_SIZE},
+      {"min-width", CSS_PROP_MIN_WIDTH},
+      {"margin-left", CSS_PROP_MARGIN_LEFT},
       {"outline-width", CSS_PROP_OUTLINE_WIDTH},
+      {"-khtml-box-ordinal-group", CSS_PROP__KHTML_BOX_ORDINAL_GROUP},
       {"font-size-adjust", CSS_PROP_FONT_SIZE_ADJUST},
-      {"background-position-y", CSS_PROP_BACKGROUND_POSITION_Y},
-      {"list-style", CSS_PROP_LIST_STYLE},
-      {"font-style", CSS_PROP_FONT_STYLE},
-      {"empty-cells", CSS_PROP_EMPTY_CELLS},
       {"list-style-position", CSS_PROP_LIST_STYLE_POSITION},
-      {"list-style-image", CSS_PROP_LIST_STYLE_IMAGE},
-      {"scrollbar-arrow-color", CSS_PROP_SCROLLBAR_ARROW_COLOR},
-      {"scrollbar-3dlight-color", CSS_PROP_SCROLLBAR_3DLIGHT_COLOR},
-      {"scrollbar-highlight-color", CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR},
-      {"scrollbar-shadow-color", CSS_PROP_SCROLLBAR_SHADOW_COLOR},
-      {"scrollbar-face-color", CSS_PROP_SCROLLBAR_FACE_COLOR},
-      {"-khtml-flow-mode", CSS_PROP__KHTML_FLOW_MODE},
-      {"border-left-style", CSS_PROP_BORDER_LEFT_STYLE},
-      {"scrollbar-darkshadow-color", CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR},
-      {"table-layout", CSS_PROP_TABLE_LAYOUT},
-      {"outline-style", CSS_PROP_OUTLINE_STYLE},
-      {"-khtml-box-flex", CSS_PROP__KHTML_BOX_FLEX},
-      {"-khtml-box-ordinal-group", CSS_PROP__KHTML_BOX_ORDINAL_GROUP},
-      {"list-style-type", CSS_PROP_LIST_STYLE_TYPE},
+      {"padding-left", CSS_PROP_PADDING_LEFT},
+      {"text-transform", CSS_PROP_TEXT_TRANSFORM},
+      {"font-style", CSS_PROP_FONT_STYLE},
+      {"content", CSS_PROP_CONTENT},
+      {"word-spacing", CSS_PROP_WORD_SPACING},
+      {"font-weight", CSS_PROP_FONT_WEIGHT},
+      {"-khtml-marquee-increment", CSS_PROP__KHTML_MARQUEE_INCREMENT},
+      {"text-indent", CSS_PROP_TEXT_INDENT},
+      {"background-attachment", CSS_PROP_BACKGROUND_ATTACHMENT},
+      {"background-position", CSS_PROP_BACKGROUND_POSITION},
       {"font-family", CSS_PROP_FONT_FAMILY},
-      {"-khtml-box-flex-group", CSS_PROP__KHTML_BOX_FLEX_GROUP}
+      {"-khtml-border-horizontal-spacing", CSS_PROP__KHTML_BORDER_HORIZONTAL_SPACING},
+      {"font-variant", CSS_PROP_FONT_VARIANT},
+      {"background-position-x", CSS_PROP_BACKGROUND_POSITION_X},
+      {"background-position-y", CSS_PROP_BACKGROUND_POSITION_Y},
+      {"counter-increment", CSS_PROP_COUNTER_INCREMENT}
     };
 
-  static const signed char lookup[] =
+  static const short lookup[] =
     {
-       -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,
-       -1,  -1,  -1,  -1,  -1,  -1,   2,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-        3,   4,  -1,   5,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  -1,   6,   7,  -1,  -1,
-        8,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   9,
-       -1,  -1,  -1,  10,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  11,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  12,  13,  -1,  14,  15,  -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,  -1,  -1,  -1,
-       -1,  18,  -1,  -1,  -1,  -1,  -1,  19,  20,  -1,
-       21,  22,  -1,  -1,  -1,  -1,  -1,  23,  -1,  -1,
-       24,  -1,  -1,  25,  26,  -1,  -1,  -1,  -1,  27,
-       -1,  -1,  -1,  -1,  -1,  28,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  -1,  -1,  29,  -1,  -1,
-       30,  -1,  31,  -1,  -1,  32,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  33,  -1,  34,  -1,  35,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,  -1,   0,  -1,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,  -1,  -1,   1,  -1,  -1,  -1,
+        2,  -1,   3,  -1,  -1,  -1,   4,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,   5,  -1,  -1,  -1,  -1,  -1,
+        6,   7,  -1,   8,  -1,  -1,  -1,  -1,  -1,   9,
+       -1,  10,  -1,  -1,  -1,  -1,  -1,  11,  -1,  -1,
+       -1,  -1,  -1,  12,  -1,  -1,  -1,  -1,  13,  14,
+       -1,  -1,  -1,  -1,  -1,  -1,  15,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,  -1,  16,  17,  -1,  -1,  -1,
+       -1,  18,  -1,  -1,  19,  -1,  -1,  -1,  -1,  -1,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       36,  -1,  -1,  37,  -1,  -1,  38,  -1,  -1,  39,
-       -1,  -1,  40,  -1,  -1,  -1,  -1,  -1,  -1,  41,
-       -1,  -1,  -1,  42,  -1,  -1,  43,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  44,
+       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  20,  21,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  45,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  46,  -1,  -1,  -1,  -1,
-       47,  48,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  49,  50,  -1,  -1,  -1,  51,  52,  53,  54,
-       -1,  -1,  -1,  -1,  -1,  -1,  55,  -1,  -1,  -1,
-       56,  -1,  -1,  -1,  -1,  -1,  -1,  57,  -1,  -1,
+       22,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,  -1,  23,  -1,  -1,  -1,  -1,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       58,  -1,  -1,  -1,  -1,  -1,  -1,  59,  -1,  -1,
-       60,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  61,  -1,  -1,  -1,  -1,  -1,
-       62,  63,  -1,  -1,  64,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  65,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  66,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       67,  68,  -1,  -1,  -1,  -1,  -1,  -1,  69,  70,
-       -1,  71,  -1,  -1,  72,  -1,  73,  74,  -1,  75,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  -1,  -1,  76,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  77,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  78,  79,  -1,  -1,  -1,  -1,
-       -1,  -1,  80,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  -1,  -1,  81,  82,  83,
-       -1,  84,  -1,  -1,  -1,  -1,  85,  -1,  -1,  86,
-       87,  -1,  -1,  -1,  88,  -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,
+       24,  -1,  -1,  -1,  -1,  25,  -1,  -1,  -1,  -1,
+       -1,  -1,  26,  -1,  -1,  27,  -1,  -1,  -1,  28,
+       -1,  -1,  -1,  -1,  -1,  29,  -1,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,  -1,  30,  31,  32,  -1,  33,
+       -1,  -1,  34,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       35,  -1,  -1,  36,  -1,  -1,  -1,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,  -1,  37,  -1,  -1,  -1,  38,
+       -1,  -1,  -1,  -1,  -1,  -1,  39,  40,  -1,  -1,
+       -1,  41,  42,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       43,  44,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       45,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  46,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  -1,  89,  -1,  -1,  -1,
+       -1,  -1,  -1,  47,  -1,  -1,  -1,  -1,  -1,  -1,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  90,  -1,  -1,  -1,  -1,  91,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  92,
-       93,  -1,  94,  -1,  -1,  95,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  96,  -1,  -1,  97,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  98,  99,  -1,  -1,  -1,
-       -1,  -1,  -1, 100,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 101,
-       -1,  -1,  -1,  -1,  -1,  -1, 102,  -1,  -1,  -1,
-      103,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,  -1,  -1,  48,  -1,  -1,  -1,
+       -1,  49,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1, 104,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1,  -1,  -1, 105,  -1,  -1,  -1,
+       -1,  -1,  50,  -1,  -1,  -1,  51,  -1,  -1,  -1,
+       -1,  -1,  52,  -1,  -1,  -1,  53,  -1,  -1,  -1,
+       -1,  54,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  55,
+       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  56,
+       -1,  -1,  57,  -1,  -1,  -1,  -1,  58,  -1,  -1,
+       -1,  -1,  -1,  59,  -1,  -1,  60,  -1,  -1,  -1,
+       -1,  -1,  61,  -1,  -1,  -1,  62,  -1,  -1,  -1,
+       63,  -1,  -1,  -1,  -1,  64,  -1,  -1,  65,  -1,
+       -1,  -1,  -1,  -1,  -1,  -1,  66,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  67,  -1,
+       -1,  -1,  -1,  68,  69,  -1,  -1,  -1,  -1,  -1,
+       70,  -1,  71,  72,  -1,  -1,  73,  -1,  74,  -1,
+       75,  76,  -1,  -1,  77,  -1,  -1,  78,  -1,  -1,
+       -1,  -1,  79,  -1,  -1,  -1,  -1,  80,  -1,  -1,
+       -1,  -1,  81,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,  -1,  82,  -1,  83,  -1,  -1,
+       -1,  84,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  85,
+       -1,  -1,  -1,  -1,  86,  87,  88,  -1,  -1,  -1,
+       -1,  89,  90,  91,  92,  93,  -1,  -1,  -1,  -1,
+       94,  -1,  -1,  -1,  -1,  -1,  -1,  95,  -1,  -1,
+       -1,  -1,  96,  -1,  -1,  97,  98,  -1,  -1,  -1,
+       -1,  99,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 100,
+      101, 102,  -1, 103,  -1,  -1,  -1,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,  -1,  -1, 104,  -1,  -1,  -1,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       -1,  -1, 105,  -1, 106,  -1,  -1,  -1,  -1,  -1,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 107,
+       -1,  -1,  -1,  -1,  -1,  -1, 108,  -1,  -1,  -1,
+       -1,  -1,  -1, 109,  -1,  -1,  -1,  -1,  -1,  -1,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1, 110,  -1,  -1,  -1,  -1,  -1,
+       -1, 111,  -1,  -1, 112,  -1,  -1,  -1,  -1,  -1,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       -1,  -1, 113,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1, 106,  -1, 107,  -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, 108,  -1, 109,  -1,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1, 114, 115,  -1, 116,  -1,  -1,
+       -1,  -1, 117,  -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, 110,  -1,  -1,  -1,  -1,
-       -1,  -1, 111, 112,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1,  -1, 113,  -1,  -1,  -1,  -1,  -1,
-      114, 115, 116,  -1,  -1,  -1,  -1,  -1, 117,  -1,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-       -1,  -1,  -1, 118, 119,  -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, 120,  -1,  -1,  -1,  -1,
-       -1,  -1, 121,  -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,  -1,  -1,  -1,
+       -1, 118,  -1,  -1, 119,  -1,  -1,  -1,  -1,  -1,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,  -1,  -1, 120,  -1,  -1,  -1,
+       -1, 121,  -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,  -1,  -1,  -1, 122,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       -1, 123, 124,  -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, 125,  -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,  -1,  -1,  -1,
        -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+       -1,  -1,  -1,  -1,  -1,  -1, 126,  -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, 127,  -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,
@@ -384,7 +393,7 @@ findProp (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,  -1,  -1,  -1, 122
+       -1,  -1,  -1,  -1,  -1,  -1,  -1, 128
     };
 
   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -471,6 +480,12 @@ static const char * const propertyList[] = {
 "margin-bottom", 
 "margin-left", 
 "marker-offset", 
+"-khtml-marquee", 
+"-khtml-marquee-direction", 
+"-khtml-marquee-increment", 
+"-khtml-marquee-repetition", 
+"-khtml-marquee-speed", 
+"-khtml-marquee-style", 
 "max-height", 
 "max-width", 
 "min-height", 
diff --git a/WebCore/khtml/css/cssproperties.h b/WebCore/khtml/css/cssproperties.h
index a1fa2e0..cb4c3f7 100644
--- a/WebCore/khtml/css/cssproperties.h
+++ b/WebCore/khtml/css/cssproperties.h
@@ -70,68 +70,74 @@
 #define CSS_PROP_MARGIN_BOTTOM 61
 #define CSS_PROP_MARGIN_LEFT 62
 #define CSS_PROP_MARKER_OFFSET 63
-#define CSS_PROP_MAX_HEIGHT 64
-#define CSS_PROP_MAX_WIDTH 65
-#define CSS_PROP_MIN_HEIGHT 66
-#define CSS_PROP_MIN_WIDTH 67
-#define CSS_PROP__KHTML_OPACITY 68
-#define CSS_PROP_ORPHANS 69
-#define CSS_PROP_OUTLINE_COLOR 70
-#define CSS_PROP_OUTLINE_STYLE 71
-#define CSS_PROP_OUTLINE_WIDTH 72
-#define CSS_PROP_OVERFLOW 73
-#define CSS_PROP_PADDING_TOP 74
-#define CSS_PROP_PADDING_RIGHT 75
-#define CSS_PROP_PADDING_BOTTOM 76
-#define CSS_PROP_PADDING_LEFT 77
-#define CSS_PROP_PAGE 78
-#define CSS_PROP_PAGE_BREAK_AFTER 79
-#define CSS_PROP_PAGE_BREAK_BEFORE 80
-#define CSS_PROP_PAGE_BREAK_INSIDE 81
-#define CSS_PROP_POSITION 82
-#define CSS_PROP_QUOTES 83
-#define CSS_PROP_RIGHT 84
-#define CSS_PROP_SIZE 85
-#define CSS_PROP_TABLE_LAYOUT 86
-#define CSS_PROP_TEXT_ALIGN 87
-#define CSS_PROP_TEXT_DECORATION 88
-#define CSS_PROP_TEXT_DECORATION_COLOR 89
-#define CSS_PROP_TEXT_INDENT 90
-#define CSS_PROP_TEXT_SHADOW 91
-#define CSS_PROP_TEXT_TRANSFORM 92
-#define CSS_PROP_TOP 93
-#define CSS_PROP_UNICODE_BIDI 94
-#define CSS_PROP_VERTICAL_ALIGN 95
-#define CSS_PROP_VISIBILITY 96
-#define CSS_PROP_WHITE_SPACE 97
-#define CSS_PROP_WIDOWS 98
-#define CSS_PROP_WIDTH 99
-#define CSS_PROP_WORD_SPACING 100
-#define CSS_PROP_Z_INDEX 101
-#define CSS_PROP_BACKGROUND 102
-#define CSS_PROP_BORDER 103
-#define CSS_PROP_BORDER_COLOR 104
-#define CSS_PROP_BORDER_STYLE 105
-#define CSS_PROP_BORDER_TOP 106
-#define CSS_PROP_BORDER_RIGHT 107
-#define CSS_PROP_BORDER_BOTTOM 108
-#define CSS_PROP_BORDER_LEFT 109
-#define CSS_PROP_BORDER_WIDTH 110
-#define CSS_PROP_FONT 111
-#define CSS_PROP_LIST_STYLE 112
-#define CSS_PROP_MARGIN 113
-#define CSS_PROP_OUTLINE 114
-#define CSS_PROP_PADDING 115
-#define CSS_PROP_SCROLLBAR_FACE_COLOR 116
-#define CSS_PROP_SCROLLBAR_SHADOW_COLOR 117
-#define CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR 118
-#define CSS_PROP_SCROLLBAR_3DLIGHT_COLOR 119
-#define CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR 120
-#define CSS_PROP_SCROLLBAR_TRACK_COLOR 121
-#define CSS_PROP_SCROLLBAR_ARROW_COLOR 122
-#define CSS_PROP__KHTML_FLOW_MODE 123
+#define CSS_PROP__KHTML_MARQUEE 64
+#define CSS_PROP__KHTML_MARQUEE_DIRECTION 65
+#define CSS_PROP__KHTML_MARQUEE_INCREMENT 66
+#define CSS_PROP__KHTML_MARQUEE_REPETITION 67
+#define CSS_PROP__KHTML_MARQUEE_SPEED 68
+#define CSS_PROP__KHTML_MARQUEE_STYLE 69
+#define CSS_PROP_MAX_HEIGHT 70
+#define CSS_PROP_MAX_WIDTH 71
+#define CSS_PROP_MIN_HEIGHT 72
+#define CSS_PROP_MIN_WIDTH 73
+#define CSS_PROP__KHTML_OPACITY 74
+#define CSS_PROP_ORPHANS 75
+#define CSS_PROP_OUTLINE_COLOR 76
+#define CSS_PROP_OUTLINE_STYLE 77
+#define CSS_PROP_OUTLINE_WIDTH 78
+#define CSS_PROP_OVERFLOW 79
+#define CSS_PROP_PADDING_TOP 80
+#define CSS_PROP_PADDING_RIGHT 81
+#define CSS_PROP_PADDING_BOTTOM 82
+#define CSS_PROP_PADDING_LEFT 83
+#define CSS_PROP_PAGE 84
+#define CSS_PROP_PAGE_BREAK_AFTER 85
+#define CSS_PROP_PAGE_BREAK_BEFORE 86
+#define CSS_PROP_PAGE_BREAK_INSIDE 87
+#define CSS_PROP_POSITION 88
+#define CSS_PROP_QUOTES 89
+#define CSS_PROP_RIGHT 90
+#define CSS_PROP_SIZE 91
+#define CSS_PROP_TABLE_LAYOUT 92
+#define CSS_PROP_TEXT_ALIGN 93
+#define CSS_PROP_TEXT_DECORATION 94
+#define CSS_PROP_TEXT_DECORATION_COLOR 95
+#define CSS_PROP_TEXT_INDENT 96
+#define CSS_PROP_TEXT_SHADOW 97
+#define CSS_PROP_TEXT_TRANSFORM 98
+#define CSS_PROP_TOP 99
+#define CSS_PROP_UNICODE_BIDI 100
+#define CSS_PROP_VERTICAL_ALIGN 101
+#define CSS_PROP_VISIBILITY 102
+#define CSS_PROP_WHITE_SPACE 103
+#define CSS_PROP_WIDOWS 104
+#define CSS_PROP_WIDTH 105
+#define CSS_PROP_WORD_SPACING 106
+#define CSS_PROP_Z_INDEX 107
+#define CSS_PROP_BACKGROUND 108
+#define CSS_PROP_BORDER 109
+#define CSS_PROP_BORDER_COLOR 110
+#define CSS_PROP_BORDER_STYLE 111
+#define CSS_PROP_BORDER_TOP 112
+#define CSS_PROP_BORDER_RIGHT 113
+#define CSS_PROP_BORDER_BOTTOM 114
+#define CSS_PROP_BORDER_LEFT 115
+#define CSS_PROP_BORDER_WIDTH 116
+#define CSS_PROP_FONT 117
+#define CSS_PROP_LIST_STYLE 118
+#define CSS_PROP_MARGIN 119
+#define CSS_PROP_OUTLINE 120
+#define CSS_PROP_PADDING 121
+#define CSS_PROP_SCROLLBAR_FACE_COLOR 122
+#define CSS_PROP_SCROLLBAR_SHADOW_COLOR 123
+#define CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR 124
+#define CSS_PROP_SCROLLBAR_3DLIGHT_COLOR 125
+#define CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR 126
+#define CSS_PROP_SCROLLBAR_TRACK_COLOR 127
+#define CSS_PROP_SCROLLBAR_ARROW_COLOR 128
+#define CSS_PROP__KHTML_FLOW_MODE 129
 
 #define CSS_PROP_MAX CSS_PROP_Z_INDEX
-#define CSS_PROP_TOTAL 124
+#define CSS_PROP_TOTAL 130
 #endif
 
diff --git a/WebCore/khtml/css/cssproperties.in b/WebCore/khtml/css/cssproperties.in
index 233d2dd..389f454 100644
--- a/WebCore/khtml/css/cssproperties.in
+++ b/WebCore/khtml/css/cssproperties.in
@@ -81,6 +81,12 @@ margin-right
 margin-bottom
 margin-left
 marker-offset
+-khtml-marquee
+-khtml-marquee-direction
+-khtml-marquee-increment
+-khtml-marquee-repetition
+-khtml-marquee-speed
+-khtml-marquee-style
 max-height
 max-width
 min-height
diff --git a/WebCore/khtml/css/cssstyleselector.cpp b/WebCore/khtml/css/cssstyleselector.cpp
index 26691d3..6442a5f 100644
--- a/WebCore/khtml/css/cssstyleselector.cpp
+++ b/WebCore/khtml/css/cssstyleselector.cpp
@@ -1421,7 +1421,7 @@ void CSSOrderedPropertyList::append(DOM::CSSStyleDeclarationImpl *decl, uint sel
 // -------------------------------------------------------------------------------------
 // this is mostly boring stuff on how to apply a certain rule to the renderstyle...
 
-static Length convertToLength( CSSPrimitiveValueImpl *primitiveValue, RenderStyle *style, QPaintDeviceMetrics *paintDeviceMetrics, CSSStyleSelector* selector, bool *ok = 0 )
+static Length convertToLength( CSSPrimitiveValueImpl *primitiveValue, RenderStyle *style, QPaintDeviceMetrics *paintDeviceMetrics, bool *ok = 0 )
 {
     Length l;
     if ( !primitiveValue ) {
@@ -2006,6 +2006,8 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
             o = OSCROLL; break;
         case CSS_VAL_AUTO:
             o = OAUTO; break;
+        case CSS_VAL_MARQUEE:
+            o = OMARQUEE; break;
         default:
             return;
         }
@@ -2916,10 +2918,10 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
 	    RectImpl *rect = primitiveValue->getRectValue();
 	    if ( !rect )
 		break;
-	    top = convertToLength( rect->top(), style, paintDeviceMetrics, this );
-	    right = convertToLength( rect->right(), style, paintDeviceMetrics, this );
-	    bottom = convertToLength( rect->bottom(), style, paintDeviceMetrics, this );
-	    left = convertToLength( rect->left(), style, paintDeviceMetrics, this );
+	    top = convertToLength( rect->top(), style, paintDeviceMetrics );
+	    right = convertToLength( rect->right(), style, paintDeviceMetrics );
+	    bottom = convertToLength( rect->bottom(), style, paintDeviceMetrics );
+	    left = convertToLength( rect->left(), style, paintDeviceMetrics );
 
 	} else if ( primitiveValue->getIdent() != CSS_VAL_AUTO ) {
 	    break;
@@ -3387,7 +3389,145 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
         if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER)
             return; // Error case.
         style->setBoxOrdinalGroup((unsigned int)(primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_NUMBER)));
-        return;      
+        return;
+    case CSS_PROP__KHTML_MARQUEE:
+        if (value->cssValueType() != CSSValue::CSS_INHERIT || !parentNode) return;
+        style->setMarqueeDirection(parentStyle->marqueeDirection());
+        style->setMarqueeIncrement(parentStyle->marqueeIncrement());
+        style->setMarqueeSpeed(parentStyle->marqueeSpeed());
+        style->setMarqueeLoopCount(parentStyle->marqueeLoopCount());
+        style->setMarqueeBehavior(parentStyle->marqueeBehavior());
+        break;
+    case CSS_PROP__KHTML_MARQUEE_REPETITION: {
+        if (value->cssValueType() == CSSValue::CSS_INHERIT) {
+            if(!parentNode) return;
+            style->setMarqueeLoopCount(parentStyle->marqueeLoopCount());
+            return;
+        }
+        if (!primitiveValue) return;
+        if (primitiveValue->getIdent() == CSS_VAL_INFINITE)
+            style->setMarqueeLoopCount(-1); // -1 means repeat forever.
+        else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_NUMBER)
+            style->setMarqueeLoopCount((int)(primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_NUMBER)));
+        break;
+    }
+    case CSS_PROP__KHTML_MARQUEE_SPEED: {
+        if (value->cssValueType() == CSSValue::CSS_INHERIT) {
+            if(!parentNode) return;
+            style->setMarqueeSpeed(parentStyle->marqueeSpeed());
+            return;
+        }        
+        if (!primitiveValue) return;
+        if (primitiveValue->getIdent()) {
+            switch (primitiveValue->getIdent())
+            {
+                case CSS_VAL_SLOW:
+                    style->setMarqueeSpeed(500); // 500 msec.
+                    break;
+                case CSS_VAL_NORMAL:
+                    style->setMarqueeSpeed(85); // 85msec. The WinIE default.
+                    break;
+                case CSS_VAL_FAST:
+                    style->setMarqueeSpeed(10); // 10msec. Super fast.
+                    break;
+            }
+        }
+        else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_S)
+            style->setMarqueeSpeed(int(1000*primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_S)));
+        else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_MS)
+            style->setMarqueeSpeed(int(primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_MS)));
+        else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_NUMBER) // For scrollamount support.
+            style->setMarqueeSpeed(int(primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_NUMBER)));
+        break;
+    }
+    case CSS_PROP__KHTML_MARQUEE_INCREMENT: {
+        if (value->cssValueType() == CSSValue::CSS_INHERIT) {
+            if(!parentNode) return;
+            style->setMarqueeIncrement(parentStyle->marqueeIncrement());
+            return;
+        }        
+        if (!primitiveValue) return;
+        if (primitiveValue->getIdent()) {
+            switch (primitiveValue->getIdent())
+            {
+                case CSS_VAL_SMALL:
+                    style->setMarqueeIncrement(Length(1, Fixed)); // 1px.
+                    break;
+                case CSS_VAL_NORMAL:
+                    style->setMarqueeIncrement(Length(6, Fixed)); // 6px. The WinIE default.
+                    break;
+                case CSS_VAL_LARGE:
+                    style->setMarqueeIncrement(Length(36, Fixed)); // 36px.
+                    break;
+            }
+        }
+        else {
+            bool ok = true;
+            Length l = convertToLength(primitiveValue, style, paintDeviceMetrics, &ok);
+            if (ok)
+                style->setMarqueeIncrement(l);
+        }
+        break;
+    }
+    case CSS_PROP__KHTML_MARQUEE_STYLE: {
+        if (value->cssValueType() == CSSValue::CSS_INHERIT) {
+            if(!parentNode) return;
+            style->setMarqueeBehavior(parentStyle->marqueeBehavior());
+            return;
+        }        
+        if (!primitiveValue || !primitiveValue->getIdent()) return;
+        switch (primitiveValue->getIdent())
+        {
+            case CSS_VAL_NONE:
+                style->setMarqueeBehavior(MNONE);
+                break;
+            case CSS_VAL_SCROLL:
+                style->setMarqueeBehavior(MSCROLL);
+                break;
+            case CSS_VAL_SLIDE:
+                style->setMarqueeBehavior(MSLIDE);
+                break;
+            case CSS_VAL_ALTERNATE:
+                style->setMarqueeBehavior(MALTERNATE);
+                break;
+        }
+        break;
+    }
+    case CSS_PROP__KHTML_MARQUEE_DIRECTION: {
+        if (value->cssValueType() == CSSValue::CSS_INHERIT) {
+            if(!parentNode) return;
+            style->setMarqueeDirection(parentStyle->marqueeDirection());
+            return;
+        }        
+        if (!primitiveValue || !primitiveValue->getIdent()) return;
+        switch (primitiveValue->getIdent())
+        {
+            case CSS_VAL_FORWARDS:
+                style->setMarqueeDirection(MFORWARD);
+                break;
+            case CSS_VAL_BACKWARDS:
+                style->setMarqueeDirection(MBACKWARD);
+                break;
+            case CSS_VAL_AUTO:
+                style->setMarqueeDirection(MAUTO);
+                break;
+            case CSS_VAL_AHEAD:
+            case CSS_VAL_UP: // We don't support vertical languages, so AHEAD just maps to UP.
+                style->setMarqueeDirection(MUP);
+                break;
+            case CSS_VAL_REVERSE:
+            case CSS_VAL_DOWN: // REVERSE just maps to DOWN, since we don't do vertical text.
+                style->setMarqueeDirection(MDOWN);
+                break;
+            case CSS_VAL_LEFT:
+                style->setMarqueeDirection(MLEFT);
+                break;
+            case CSS_VAL_RIGHT:
+                style->setMarqueeDirection(MRIGHT);
+                break;
+        }
+        break;
+    }
     default:
         return;
     }
diff --git a/WebCore/khtml/css/cssvalues.c b/WebCore/khtml/css/cssvalues.c
index 2957b25..6383c68 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 = 1719, duplicates = 1 */
+/* maximum key range = 2079, 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[] =
     {
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719,   20, 1719, 1719,    0,   10,
-        20,   25,   30,   35,   40,   45,   50,    0, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719,    0,  200,   95,
-        35,  170,  230,    4,  105,    0,    5,   83,    0,    4,
-        50,  205,   24,   45,    5,   10,    0,  255,   12,  186,
-        24,  139,  184, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
-      1719, 1719, 1719, 1719, 1719, 1719
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079,   20, 2079, 2079,    0,    5,
+        10,   15,   20,   25,   30,   35,   40,    0, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079,    0,  100,  195,
+        44,  250,  125,   98,    4,   40,    0,  144,    0,   99,
+        94,  205,   25,   30,  160,   95,    0,  255,  134,  228,
+       119,   25,  110, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079,
+      2079, 2079, 2079, 2079, 2079, 2079
     };
   register int hval = 0;
 
@@ -110,423 +110,465 @@ findValue (register const char *str, register unsigned int len)
 {
   enum
     {
-      TOTAL_KEYWORDS = 241,
-      MIN_WORD_LENGTH = 3,
+      TOTAL_KEYWORDS = 252,
+      MIN_WORD_LENGTH = 2,
       MAX_WORD_LENGTH = 22,
       MIN_HASH_VALUE = 0,
-      MAX_HASH_VALUE = 1718
+      MAX_HASH_VALUE = 2078
     };
 
   static const struct css_value wordlist_value[] =
     {
       {"900", CSS_VAL_900},
-      {"ltr", CSS_VAL_LTR},
-      {"rtl", CSS_VAL_RTL},
       {"100", CSS_VAL_100},
-      {"small", CSS_VAL_SMALL},
-      {"start", CSS_VAL_START},
       {"200", CSS_VAL_200},
       {"300", CSS_VAL_300},
-      {"mix", CSS_VAL_MIX},
       {"400", CSS_VAL_400},
       {"500", CSS_VAL_500},
       {"600", CSS_VAL_600},
       {"700", CSS_VAL_700},
       {"800", CSS_VAL_800},
-      {"x-small", CSS_VAL_X_SMALL},
-      {"xx-small", CSS_VAL_XX_SMALL},
-      {"italic", CSS_VAL_ITALIC},
-      {"static", CSS_VAL_STATIC},
-      {"right", CSS_VAL_RIGHT},
-      {"disc", CSS_VAL_DISC},
-      {"gray", CSS_VAL_GRAY},
       {"thin", CSS_VAL_THIN},
-      {"small-caps", CSS_VAL_SMALL_CAPS},
-      {"hiragana", CSS_VAL_HIRAGANA},
+      {"hand", CSS_VAL_HAND},
+      {"ltr", CSS_VAL_LTR},
+      {"rtl", CSS_VAL_RTL},
+      {"small", CSS_VAL_SMALL},
+      {"fast", CSS_VAL_FAST},
+      {"top", CSS_VAL_TOP},
       {"teal", CSS_VAL_TEAL},
-      {"lime", CSS_VAL_LIME},
-      {"large", CSS_VAL_LARGE},
-      {"larger", CSS_VAL_LARGER},
+      {"navy", CSS_VAL_NAVY},
+      {"start", CSS_VAL_START},
+      {"mix", CSS_VAL_MIX},
       {"wait", CSS_VAL_WAIT},
-      {"smaller", CSS_VAL_SMALLER},
-      {"hand", CSS_VAL_HAND},
+      {"italic", CSS_VAL_ITALIC},
+      {"help", CSS_VAL_HELP},
+      {"up", CSS_VAL_UP},
+      {"gray", CSS_VAL_GRAY},
+      {"aqua", CSS_VAL_AQUA},
+      {"highlight", CSS_VAL_HIGHLIGHT},
+      {"ahead", CSS_VAL_AHEAD},
+      {"right", CSS_VAL_RIGHT},
+      {"both", CSS_VAL_BOTH},
+      {"static", CSS_VAL_STATIC},
+      {"x-small", CSS_VAL_X_SMALL},
+      {"hide", CSS_VAL_HIDE},
+      {"fantasy", CSS_VAL_FANTASY},
+      {"always", CSS_VAL_ALWAYS},
+      {"bold", CSS_VAL_BOLD},
+      {"table", CSS_VAL_TABLE},
       {"text", CSS_VAL_TEXT},
-      {"silver", CSS_VAL_SILVER},
-      {"pre", CSS_VAL_PRE},
-      {"navy", CSS_VAL_NAVY},
-      {"list-item", CSS_VAL_LIST_ITEM},
-      {"red", CSS_VAL_RED},
-      {"ridge", CSS_VAL_RIDGE},
+      {"disc", CSS_VAL_DISC},
+      {"left", CSS_VAL_LEFT},
+      {"blink", CSS_VAL_BLINK},
       {"katakana", CSS_VAL_KATAKANA},
-      {"x-large", CSS_VAL_X_LARGE},
-      {"top", CSS_VAL_TOP},
-      {"inset", CSS_VAL_INSET},
-      {"single", CSS_VAL_SINGLE},
-      {"invert", CSS_VAL_INVERT},
-      {"portrait", CSS_VAL_PORTRAIT},
-      {"middle", CSS_VAL_MIDDLE},
-      {"xx-large", CSS_VAL_XX_LARGE},
+      {"thick", CSS_VAL_THICK},
       {"solid", CSS_VAL_SOLID},
-      {"avoid", CSS_VAL_AVOID},
       {"end", CSS_VAL_END},
-      {"normal", CSS_VAL_NORMAL},
-      {"inside", CSS_VAL_INSIDE},
+      {"lime", CSS_VAL_LIME},
+      {"hiragana", CSS_VAL_HIRAGANA},
+      {"avoid", CSS_VAL_AVOID},
+      {"slide", CSS_VAL_SLIDE},
+      {"pre", CSS_VAL_PRE},
+      {"dashed", CSS_VAL_DASHED},
+      {"black", CSS_VAL_BLACK},
+      {"sub", CSS_VAL_SUB},
+      {"xx-small", CSS_VAL_XX_SMALL},
+      {"red", CSS_VAL_RED},
+      {"auto", CSS_VAL_AUTO},
+      {"hidden", CSS_VAL_HIDDEN},
+      {"middle", CSS_VAL_MIDDLE},
+      {"inset", CSS_VAL_INSET},
+      {"loud", CSS_VAL_LOUD},
+      {"large", CSS_VAL_LARGE},
       {"inline", CSS_VAL_INLINE},
-      {"armenian", CSS_VAL_ARMENIAN},
-      {"vertical", CSS_VAL_VERTICAL},
-      {"thick", CSS_VAL_THICK},
-      {"lighter", CSS_VAL_LIGHTER},
-      {"help", CSS_VAL_HELP},
-      {"aqua", CSS_VAL_AQUA},
-      {"decimal", CSS_VAL_DECIMAL},
-      {"hide", CSS_VAL_HIDE},
-      {"transparent", CSS_VAL_TRANSPARENT},
-      {"scroll", CSS_VAL_SCROLL},
+      {"white", CSS_VAL_WHITE},
+      {"slow", CSS_VAL_SLOW},
+      {"small-caps", CSS_VAL_SMALL_CAPS},
+      {"show", CSS_VAL_SHOW},
       {"grey", CSS_VAL_GREY},
-      {"highlight", CSS_VAL_HIGHLIGHT},
-      {"inline-axis", CSS_VAL_INLINE_AXIS},
-      {"cross", CSS_VAL_CROSS},
+      {"icon", CSS_VAL_ICON},
+      {"justify", CSS_VAL_JUSTIFY},
+      {"dotted", CSS_VAL_DOTTED},
+      {"list-item", CSS_VAL_LIST_ITEM},
+      {"lighter", CSS_VAL_LIGHTER},
+      {"higher", CSS_VAL_HIGHER},
+      {"normal", CSS_VAL_NORMAL},
+      {"caption", CSS_VAL_CAPTION},
+      {"inside", CSS_VAL_INSIDE},
+      {"down", CSS_VAL_DOWN},
+      {"single", CSS_VAL_SINGLE},
+      {"fixed", CSS_VAL_FIXED},
       {"crop", CSS_VAL_CROP},
       {"inherit", CSS_VAL_INHERIT},
-      {"blink", CSS_VAL_BLINK},
-      {"always", CSS_VAL_ALWAYS},
-      {"graytext", CSS_VAL_GRAYTEXT},
       {"-khtml-right", CSS_VAL__KHTML_RIGHT},
-      {"icon", CSS_VAL_ICON},
+      {"portrait", CSS_VAL_PORTRAIT},
+      {"ridge", CSS_VAL_RIDGE},
+      {"smaller", CSS_VAL_SMALLER},
+      {"blue", CSS_VAL_BLUE},
+      {"bottom", CSS_VAL_BOTTOM},
+      {"text-top", CSS_VAL_TEXT_TOP},
+      {"decimal", CSS_VAL_DECIMAL},
+      {"olive", CSS_VAL_OLIVE},
       {"level", CSS_VAL_LEVEL},
-      {"dashed", CSS_VAL_DASHED},
-      {"relative", CSS_VAL_RELATIVE},
-      {"circle", CSS_VAL_CIRCLE},
-      {"repeat", CSS_VAL_REPEAT},
-      {"table", CSS_VAL_TABLE},
-      {"caption", CSS_VAL_CAPTION},
-      {"black", CSS_VAL_BLACK},
-      {"separate", CSS_VAL_SEPARATE},
+      {"none", CSS_VAL_NONE},
+      {"block", CSS_VAL_BLOCK},
+      {"x-large", CSS_VAL_X_LARGE},
+      {"graytext", CSS_VAL_GRAYTEXT},
+      {"scroll", CSS_VAL_SCROLL},
+      {"-khtml-text", CSS_VAL__KHTML_TEXT},
+      {"highlighttext", CSS_VAL_HIGHLIGHTTEXT},
+      {"visible", CSS_VAL_VISIBLE},
+      {"capitalize", CSS_VAL_CAPITALIZE},
+      {"-khtml-body", CSS_VAL__KHTML_BODY},
+      {"-khtml-left", CSS_VAL__KHTML_LEFT},
       {"run-in", CSS_VAL_RUN_IN},
+      {"larger", CSS_VAL_LARGER},
+      {"multiple", CSS_VAL_MULTIPLE},
+      {"serif", CSS_VAL_SERIF},
+      {"default", CSS_VAL_DEFAULT},
+      {"invert", CSS_VAL_INVERT},
+      {"silver", CSS_VAL_SILVER},
+      {"infinite", CSS_VAL_INFINITE},
+      {"repeat", CSS_VAL_REPEAT},
+      {"move", CSS_VAL_MOVE},
+      {"above", CSS_VAL_ABOVE},
+      {"menu", CSS_VAL_MENU},
       {"landscape", CSS_VAL_LANDSCAPE},
       {"stretch", CSS_VAL_STRETCH},
-      {"olive", CSS_VAL_OLIVE},
-      {"higher", CSS_VAL_HIGHER},
-      {"move", CSS_VAL_MOVE},
-      {"visible", CSS_VAL_VISIBLE},
-      {"hidden", CSS_VAL_HIDDEN},
+      {"yellow", CSS_VAL_YELLOW},
+      {"-khtml-box", CSS_VAL__KHTML_BOX},
+      {"nowrap", CSS_VAL_NOWRAP},
+      {"fuchsia", CSS_VAL_FUCHSIA},
+      {"purple", CSS_VAL_PURPLE},
+      {"compact", CSS_VAL_COMPACT},
       {"wider", CSS_VAL_WIDER},
-      {"green", CSS_VAL_GREEN},
-      {"left", CSS_VAL_LEFT},
+      {"status-bar", CSS_VAL_STATUS_BAR},
+      {"repeat-y", CSS_VAL_REPEAT_Y},
+      {"armenian", CSS_VAL_ARMENIAN},
+      {"embed", CSS_VAL_EMBED},
+      {"-khtml-auto", CSS_VAL__KHTML_AUTO},
+      {"cross", CSS_VAL_CROSS},
+      {"alternate", CSS_VAL_ALTERNATE},
+      {"bolder", CSS_VAL_BOLDER},
+      {"maroon", CSS_VAL_MAROON},
+      {"upper-alpha", CSS_VAL_UPPER_ALPHA},
+      {"xx-large", CSS_VAL_XX_LARGE},
+      {"collapse", CSS_VAL_COLLAPSE},
       {"small-caption", CSS_VAL_SMALL_CAPTION},
-      {"repeat-x", CSS_VAL_REPEAT_X},
-      {"serif", CSS_VAL_SERIF},
-      {"compact", CSS_VAL_COMPACT},
-      {"-khtml-text", CSS_VAL__KHTML_TEXT},
-      {"fantasy", CSS_VAL_FANTASY},
-      {"orange", CSS_VAL_ORANGE},
-      {"crosshair", CSS_VAL_CROSSHAIR},
-      {"georgian", CSS_VAL_GEORGIAN},
-      {"bold", CSS_VAL_BOLD},
-      {"text-top", CSS_VAL_TEXT_TOP},
-      {"dotted", CSS_VAL_DOTTED},
-      {"multiple", CSS_VAL_MULTIPLE},
       {"pointer", CSS_VAL_POINTER},
-      {"fixed", CSS_VAL_FIXED},
-      {"auto", CSS_VAL_AUTO},
-      {"white", CSS_VAL_WHITE},
+      {"vertical", CSS_VAL_VERTICAL},
+      {"separate", CSS_VAL_SEPARATE},
+      {"below", CSS_VAL_BELOW},
       {"super", CSS_VAL_SUPER},
-      {"sub", CSS_VAL_SUB},
       {"medium", CSS_VAL_MEDIUM},
-      {"maroon", CSS_VAL_MAROON},
-      {"nowrap", CSS_VAL_NOWRAP},
-      {"capitalize", CSS_VAL_CAPITALIZE},
-      {"none", CSS_VAL_NONE},
-      {"purple", CSS_VAL_PURPLE},
-      {"menu", CSS_VAL_MENU},
       {"square", CSS_VAL_SQUARE},
-      {"center", CSS_VAL_CENTER},
-      {"loud", CSS_VAL_LOUD},
-      {"-khtml-normal", CSS_VAL__KHTML_NORMAL},
+      {"inline-axis", CSS_VAL_INLINE_AXIS},
+      {"outset", CSS_VAL_OUTSET},
+      {"orange", CSS_VAL_ORANGE},
+      {"katakana-iroha", CSS_VAL_KATAKANA_IROHA},
+      {"table-cell", CSS_VAL_TABLE_CELL},
+      {"horizontal", CSS_VAL_HORIZONTAL},
+      {"repeat-x", CSS_VAL_REPEAT_X},
       {"hiragana-iroha", CSS_VAL_HIRAGANA_IROHA},
-      {"status-bar", CSS_VAL_STATUS_BAR},
-      {"-khtml-xxx-large", CSS_VAL__KHTML_XXX_LARGE},
-      {"collapse", CSS_VAL_COLLAPSE},
-      {"sans-serif", CSS_VAL_SANS_SERIF},
-      {"show", CSS_VAL_SHOW},
       {"expanded", CSS_VAL_EXPANDED},
-      {"both", CSS_VAL_BOTH},
-      {"highlighttext", CSS_VAL_HIGHLIGHTTEXT},
-      {"scrollbar", CSS_VAL_SCROLLBAR},
-      {"repeat-y", CSS_VAL_REPEAT_Y},
-      {"reverse", CSS_VAL_REVERSE},
-      {"cursive", CSS_VAL_CURSIVE},
-      {"upper-latin", CSS_VAL_UPPER_LATIN},
-      {"katakana-iroha", CSS_VAL_KATAKANA_IROHA},
+      {"baseline", CSS_VAL_BASELINE},
+      {"infotext", CSS_VAL_INFOTEXT},
+      {"relative", CSS_VAL_RELATIVE},
+      {"window", CSS_VAL_WINDOW},
+      {"circle", CSS_VAL_CIRCLE},
       {"lower", CSS_VAL_LOWER},
+      {"-khtml-normal", CSS_VAL__KHTML_NORMAL},
+      {"green", CSS_VAL_GREEN},
+      {"double", CSS_VAL_DOUBLE},
+      {"upper-latin", CSS_VAL_UPPER_LATIN},
+      {"transparent", CSS_VAL_TRANSPARENT},
+      {"oblique", CSS_VAL_OBLIQUE},
+      {"inline-table", CSS_VAL_INLINE_TABLE},
+      {"outside", CSS_VAL_OUTSIDE},
+      {"lower-alpha", CSS_VAL_LOWER_ALPHA},
+      {"absolute", CSS_VAL_ABSOLUTE},
+      {"scrollbar", CSS_VAL_SCROLLBAR},
+      {"block-axis", CSS_VAL_BLOCK_AXIS},
       {"captiontext", CSS_VAL_CAPTIONTEXT},
-      {"s-resize", CSS_VAL_S_RESIZE},
-      {"embed", CSS_VAL_EMBED},
-      {"block", CSS_VAL_BLOCK},
-      {"above", CSS_VAL_ABOVE},
-      {"baseline", CSS_VAL_BASELINE},
-      {"groove", CSS_VAL_GROOVE},
-      {"n-resize", CSS_VAL_N_RESIZE},
-      {"overline", CSS_VAL_OVERLINE},
-      {"bottom", CSS_VAL_BOTTOM},
-      {"bolder", CSS_VAL_BOLDER},
-      {"blue", CSS_VAL_BLUE},
-      {"narrower", CSS_VAL_NARROWER},
-      {"upper-alpha", CSS_VAL_UPPER_ALPHA},
-      {"-khtml-left", CSS_VAL__KHTML_LEFT},
+      {"table-caption", CSS_VAL_TABLE_CAPTION},
+      {"buttonhighlight", CSS_VAL_BUTTONHIGHLIGHT},
+      {"georgian", CSS_VAL_GEORGIAN},
+      {"center", CSS_VAL_CENTER},
+      {"crosshair", CSS_VAL_CROSSHAIR},
+      {"table-row", CSS_VAL_TABLE_ROW},
+      {"backwards", CSS_VAL_BACKWARDS},
+      {"sans-serif", CSS_VAL_SANS_SERIF},
+      {"hebrew", CSS_VAL_HEBREW},
+      {"threedhighlight", CSS_VAL_THREEDHIGHLIGHT},
       {"lower-latin", CSS_VAL_LOWER_LATIN},
-      {"block-axis", CSS_VAL_BLOCK_AXIS},
-      {"justify", CSS_VAL_JUSTIFY},
-      {"outset", CSS_VAL_OUTSET},
+      {"text-bottom", CSS_VAL_TEXT_BOTTOM},
+      {"-khtml-nowrap", CSS_VAL__KHTML_NOWRAP},
       {"no-repeat", CSS_VAL_NO_REPEAT},
-      {"activecaption", CSS_VAL_ACTIVECAPTION},
-      {"table-cell", CSS_VAL_TABLE_CELL},
-      {"inline-table", CSS_VAL_INLINE_TABLE},
-      {"-khtml-box", CSS_VAL__KHTML_BOX},
-      {"window", CSS_VAL_WINDOW},
+      {"forwards", CSS_VAL_FORWARDS},
+      {"n-resize", CSS_VAL_N_RESIZE},
+      {"s-resize", CSS_VAL_S_RESIZE},
+      {"buttontext", CSS_VAL_BUTTONTEXT},
+      {"marquee", CSS_VAL_MARQUEE},
+      {"groove", CSS_VAL_GROOVE},
       {"menutext", CSS_VAL_MENUTEXT},
-      {"outside", CSS_VAL_OUTSIDE},
-      {"infotext", CSS_VAL_INFOTEXT},
-      {"default", CSS_VAL_DEFAULT},
-      {"-khtml-auto", CSS_VAL__KHTML_AUTO},
-      {"fuchsia", CSS_VAL_FUCHSIA},
-      {"yellow", CSS_VAL_YELLOW},
-      {"inactivecaption", CSS_VAL_INACTIVECAPTION},
-      {"-khtml-nowrap", CSS_VAL__KHTML_NOWRAP},
-      {"semi-expanded", CSS_VAL_SEMI_EXPANDED},
-      {"lower-alpha", CSS_VAL_LOWER_ALPHA},
-      {"-khtml-center", CSS_VAL__KHTML_CENTER},
-      {"extra-expanded", CSS_VAL_EXTRA_EXPANDED},
+      {"cursive", CSS_VAL_CURSIVE},
+      {"line-through", CSS_VAL_LINE_THROUGH},
+      {"overline", CSS_VAL_OVERLINE},
+      {"w-resize", CSS_VAL_W_RESIZE},
+      {"monospace", CSS_VAL_MONOSPACE},
+      {"-khtml-xxx-large", CSS_VAL__KHTML_XXX_LARGE},
       {"e-resize", CSS_VAL_E_RESIZE},
+      {"activecaption", CSS_VAL_ACTIVECAPTION},
+      {"inline-block", CSS_VAL_INLINE_BLOCK},
       {"underline", CSS_VAL_UNDERLINE},
-      {"se-resize", CSS_VAL_SE_RESIZE},
-      {"w-resize", CSS_VAL_W_RESIZE},
-      {"uppercase", CSS_VAL_UPPERCASE},
-      {"horizontal", CSS_VAL_HORIZONTAL},
+      {"windowtext", CSS_VAL_WINDOWTEXT},
+      {"table-column", CSS_VAL_TABLE_COLUMN},
+      {"buttonface", CSS_VAL_BUTTONFACE},
+      {"buttonshadow", CSS_VAL_BUTTONSHADOW},
+      {"-khtml-center", CSS_VAL__KHTML_CENTER},
+      {"nw-resize", CSS_VAL_NW_RESIZE},
       {"sw-resize", CSS_VAL_SW_RESIZE},
-      {"below", CSS_VAL_BELOW},
-      {"upper-roman", CSS_VAL_UPPER_ROMAN},
-      {"monospace", CSS_VAL_MONOSPACE},
-      {"table-caption", CSS_VAL_TABLE_CAPTION},
-      {"ne-resize", CSS_VAL_NE_RESIZE},
-      {"table-row", CSS_VAL_TABLE_ROW},
+      {"-khtml-inline-box", CSS_VAL__KHTML_INLINE_BOX},
+      {"uppercase", CSS_VAL_UPPERCASE},
+      {"narrower", CSS_VAL_NARROWER},
       {"ultra-expanded", CSS_VAL_ULTRA_EXPANDED},
-      {"nw-resize", CSS_VAL_NW_RESIZE},
-      {"threedhighlight", CSS_VAL_THREEDHIGHLIGHT},
-      {"-khtml-body", CSS_VAL__KHTML_BODY},
-      {"message-box", CSS_VAL_MESSAGE_BOX},
+      {"ne-resize", CSS_VAL_NE_RESIZE},
+      {"se-resize", CSS_VAL_SE_RESIZE},
       {"condensed", CSS_VAL_CONDENSED},
+      {"threedface", CSS_VAL_THREEDFACE},
+      {"threedshadow", CSS_VAL_THREEDSHADOW},
+      {"upper-roman", CSS_VAL_UPPER_ROMAN},
+      {"background", CSS_VAL_BACKGROUND},
+      {"reverse", CSS_VAL_REVERSE},
+      {"inactivecaption", CSS_VAL_INACTIVECAPTION},
+      {"semi-expanded", CSS_VAL_SEMI_EXPANDED},
+      {"message-box", CSS_VAL_MESSAGE_BOX},
+      {"open-quote", CSS_VAL_OPEN_QUOTE},
       {"appworkspace", CSS_VAL_APPWORKSPACE},
-      {"text-bottom", CSS_VAL_TEXT_BOTTOM},
-      {"hebrew", CSS_VAL_HEBREW},
-      {"absolute", CSS_VAL_ABSOLUTE},
+      {"extra-expanded", CSS_VAL_EXTRA_EXPANDED},
       {"lowercase", CSS_VAL_LOWERCASE},
       {"cjk-ideographic", CSS_VAL_CJK_IDEOGRAPHIC},
       {"lower-roman", CSS_VAL_LOWER_ROMAN},
-      {"windowtext", CSS_VAL_WINDOWTEXT},
+      {"threedlightshadow", CSS_VAL_THREEDLIGHTSHADOW},
+      {"windowframe", CSS_VAL_WINDOWFRAME},
       {"bidi-override", CSS_VAL_BIDI_OVERRIDE},
-      {"double", CSS_VAL_DOUBLE},
-      {"inline-block", CSS_VAL_INLINE_BLOCK},
-      {"oblique", CSS_VAL_OBLIQUE},
-      {"inactivecaptiontext", CSS_VAL_INACTIVECAPTIONTEXT},
+      {"-khtml-around-floats", CSS_VAL__KHTML_AROUND_FLOATS},
+      {"close-quote", CSS_VAL_CLOSE_QUOTE},
       {"activeborder", CSS_VAL_ACTIVEBORDER},
-      {"buttontext", CSS_VAL_BUTTONTEXT},
-      {"line-through", CSS_VAL_LINE_THROUGH},
-      {"background", CSS_VAL_BACKGROUND},
-      {"inactiveborder", CSS_VAL_INACTIVEBORDER},
-      {"-khtml-inline-box", CSS_VAL__KHTML_INLINE_BOX},
-      {"threedface", CSS_VAL_THREEDFACE},
-      {"table-column", CSS_VAL_TABLE_COLUMN},
-      {"lower-greek", CSS_VAL_LOWER_GREEK},
-      {"semi-condensed", CSS_VAL_SEMI_CONDENSED},
-      {"threedshadow", CSS_VAL_THREEDSHADOW},
-      {"buttonhighlight", CSS_VAL_BUTTONHIGHLIGHT},
-      {"extra-condensed", CSS_VAL_EXTRA_CONDENSED},
-      {"windowframe", CSS_VAL_WINDOWFRAME},
       {"-khtml-baseline-middle", CSS_VAL__KHTML_BASELINE_MIDDLE},
-      {"ultra-condensed", CSS_VAL_ULTRA_CONDENSED},
-      {"threedlightshadow", CSS_VAL_THREEDLIGHTSHADOW},
-      {"open-quote", CSS_VAL_OPEN_QUOTE},
       {"threeddarkshadow", CSS_VAL_THREEDDARKSHADOW},
-      {"decimal-leading-zero", CSS_VAL_DECIMAL_LEADING_ZERO},
-      {"close-quote", CSS_VAL_CLOSE_QUOTE},
-      {"buttonface", CSS_VAL_BUTTONFACE},
-      {"-khtml-around-floats", CSS_VAL__KHTML_AROUND_FLOATS},
-      {"buttonshadow", CSS_VAL_BUTTONSHADOW},
+      {"no-open-quote", CSS_VAL_NO_OPEN_QUOTE},
+      {"inactiveborder", CSS_VAL_INACTIVEBORDER},
+      {"inactivecaptiontext", CSS_VAL_INACTIVECAPTIONTEXT},
+      {"ultra-condensed", CSS_VAL_ULTRA_CONDENSED},
       {"table-row-group", CSS_VAL_TABLE_ROW_GROUP},
-      {"table-header-group", CSS_VAL_TABLE_HEADER_GROUP},
       {"infobackground", CSS_VAL_INFOBACKGROUND},
-      {"no-open-quote", CSS_VAL_NO_OPEN_QUOTE},
+      {"lower-greek", CSS_VAL_LOWER_GREEK},
+      {"semi-condensed", CSS_VAL_SEMI_CONDENSED},
+      {"extra-condensed", CSS_VAL_EXTRA_CONDENSED},
       {"no-close-quote", CSS_VAL_NO_CLOSE_QUOTE},
+      {"table-header-group", CSS_VAL_TABLE_HEADER_GROUP},
+      {"decimal-leading-zero", CSS_VAL_DECIMAL_LEADING_ZERO},
       {"table-column-group", CSS_VAL_TABLE_COLUMN_GROUP},
       {"table-footer-group", CSS_VAL_TABLE_FOOTER_GROUP}
     };
 
   static const short lookup[] =
     {
-         0,   -1,   -1,   -1,   -1, -248, -240,   -2,
-        -1,   -1,    3,   -1,   -1,   -1,    4,    5,
-        -1,   -1,   -1,   -1,    6,   -1,   -1,   -1,
-        -1,    7,   -1,   -1,    8,   -1,    9,   -1,
-        -1,   -1,   -1,   10,   -1,   -1,   -1,   -1,
-        11,   -1,   -1,   -1,   -1,   12,   -1,   -1,
-        -1,   -1,   13,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   14,   -1,   -1,   -1,   -1,   -1,
+         0,   -1,   -1,   -1,   -1,    1,   -1,   -1,
+        -1,   -1,    2,   -1,   -1,   -1,   -1,    3,
+        -1,   -1,   -1,   -1,    4,   -1,   -1,   -1,
+        -1,    5,   -1,   -1,   -1,   -1,    6,   -1,
+        -1,   -1,   -1,    7,   -1,   -1,   -1,   -1,
+         8,   -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,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   15,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   16,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   17,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   18,   -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,   19,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,    9,   -1,   -1,   -1,   10,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+      -414, -241,   -2,   -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,   13,   -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,   14,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   15,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   16,   -1,   -1,   17,   -1,   18,
+        -1,   -1,   19,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   20,   -1,   -1,   -1,
-        -1,   -1,   -1,   21,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   22,   23,   -1,   -1,   -1,
-        -1,   -1,   24,   -1,   -1,   -1,   25,   -1,
-        -1,   -1,   -1,   26,   -1,   -1,   -1,   -1,
-        27,   -1,   28,   -1,   -1,   29,   30,   -1,
-        -1,   -1,   31,   -1,   -1,   32,   -1,   33,
-        -1,   34,   -1,   -1,   35,   -1,   -1,   -1,
-        -1,   -1,   36,   -1,   -1,   -1,   37,   -1,
-        38,   -1,   -1,   -1,   -1,   -1,   -1,   39,
-        -1,   -1,   -1,   -1,   -1,   40,   41,   -1,
-        -1,   -1,   42,   -1,   -1,   43,   -1,   44,
-        -1,   -1,   -1,   -1,   45,   -1,   -1,   46,
-        -1,   -1,   47,   -1,   48,   -1,   -1,   49,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        50,   51,   -1,   -1,   -1,   -1,   52,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   53,
-        -1,   -1,   54,   55,   56,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   57,   58,   -1,   -1,   -1,
-        59,   -1,   -1,   -1,   -1,   -1,   60,   -1,
-        -1,   -1,   61,   62,   -1,   -1,   63,   -1,
-        -1,   -1,   -1,   64,   65,   66,   -1,   -1,
-        -1,   67,   68,   -1,   -1,   69,   -1,   70,
-        -1,   -1,   -1,   -1,   -1,   -1,   71,   -1,
-        -1,   -1,   72,   -1,   -1,   -1,   73,   -1,
-        74,   -1,   -1,   75,   -1,   76,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   77,   -1,   -1,
-        -1,   78,   79,   -1,   -1,   -1,   80,   -1,
-        -1,   -1,   81,   82,   83,   -1,   -1,   -1,
-        84,   85,   -1,   86,   -1,   87,   -1,   88,
-        89,   -1,   -1,   90,   91,   -1,   -1,   92,
-        93,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        94,   -1,   -1,   -1,   -1,   95,   -1,   96,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   97,
-        -1,   -1,   98,   -1,   -1,   99,   -1,   -1,
-        -1,   -1,  100,  101,   -1,   -1,  102,   -1,
-       103,   -1,   -1,  104,   -1,  105,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,  106,  107,   -1,
-        -1,   -1,   -1,  108,  109,  110,   -1,   -1,
-       111,  112,   -1,   -1,  113,  114,  115,   -1,
-        -1,  116,   -1,  117,   -1,   -1,  118,  119,
-        -1,   -1,   -1,   -1,   -1,  120,   -1,   -1,
-        -1,   -1,  121,   -1,   -1,   -1,   -1,  122,
-       123,   -1,   -1,  124,  125,   -1,   -1,  126,
-       127,  128,  129,   -1,  130,   -1,  131,   -1,
-        -1,   -1,   -1,   -1,   -1,  132,   -1,   -1,
-       133,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-       134,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,  135,   -1,
-        -1,   -1,   -1,  136,  137,   -1,   -1,  138,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,  139,   -1,
-       140,  141,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,  142,   -1,   -1,   -1,  143,
-        -1,   -1,   -1,  144,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-       145,  146,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,  147,   -1,   -1,  148,   -1,  149,  150,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,  151,  152,  153,   -1,   -1,   -1,   -1,
-       154,   -1,   -1,   -1,  155,  156,   -1,  157,
-       158,   -1,   -1,   -1,  159,   -1,   -1,   -1,
-        -1,   -1,   -1,  160,   -1,   -1,   -1,  161,
-        -1,   -1,   -1,   -1,  162,  163,  164,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,  165,   -1,  166,   -1,   -1,   -1,  167,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,  168,   -1,  169,   -1,   -1,  170,
-        -1,   -1,   -1,   -1,  171,  172,  173,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-       174,   -1,   -1,  175,   -1,   -1,   -1,   -1,
-        -1,   -1,  176,   -1,   -1,   -1,   -1,  177,
-        -1,  178,   -1,   -1,   -1,   -1,   -1,  179,
-        -1,   -1,   -1,  180,   -1,   -1,   -1,   -1,
-        -1,  181,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,  182,  183,  184,   -1,   -1,   -1,   -1,
-        -1,  185,  186,  187,  188,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,  189,   -1,   -1,   -1,   -1,
-        -1,   -1,  190,   -1,  191,   -1,   -1,   -1,
-        -1,   -1,   -1,  192,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-       193,   -1,   -1,  194,   -1,   -1,   -1,   -1,
-        -1,  195,   -1,   -1,  196,   -1,   -1,   -1,
-        -1,   -1,  197,   -1,  198,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,  199,   -1,   -1,   -1,
-       200,  201,   -1,   -1,   -1,   -1,  202,   -1,
-        -1,   -1,  203,   -1,   -1,   -1,   -1,   -1,
-       204,  205,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,  206,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,  207,   -1,  208,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   21,   -1,   -1,   -1,   22,
+        23,   -1,   -1,   24,   -1,   25,   -1,   -1,
+        26,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   27,   -1,   -1,   -1,   28,   -1,
+        -1,   -1,   -1,   -1,   -1,   29,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,  209,
-        -1,  210,   -1,   -1,   -1,   -1,   -1,   -1,
-       211,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,  212,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,  213,   -1,   -1,   -1,
+        -1,   -1,   30,   -1,   -1,   31,   -1,   -1,
+        -1,   -1,   32,   33,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   34,   35,   36,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,  214,   -1,   -1,   -1,  215,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   37,   -1,   -1,   -1,   -1,   38,   39,
+        -1,   -1,   40,   -1,   -1,   -1,   41,   42,
+        43,   -1,   -1,   -1,   44,   45,   -1,   -1,
+        -1,   -1,   -1,   -1,   46,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,  216,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   47,
+        -1,   -1,   -1,   -1,   -1,   48,   -1,   -1,
+        -1,   -1,   -1,   49,   -1,   50,   -1,   51,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,  217,
+        -1,   -1,   52,   -1,   53,   -1,   54,   -1,
+        -1,   -1,   -1,   -1,   55,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   56,   57,   -1,   58,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,  218,   -1,   -1,   -1,   -1,   -1,
-       219,   -1,  220,   -1,   -1,   -1,   -1,   -1,
-        -1,  221,   -1,   -1,   -1,   -1,   -1,  222,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        59,   -1,   -1,   -1,   60,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   61,   -1,
+        -1,   -1,   62,   -1,   -1,   -1,   -1,   -1,
+        63,   64,   -1,   -1,   65,   66,   67,   -1,
+        -1,   -1,   -1,   -1,   68,   -1,   -1,   69,
+        70,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        71,   -1,   -1,   -1,   72,   -1,   73,   74,
+        -1,   -1,   -1,   75,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   76,   -1,   -1,   -1,   -1,
+        -1,   77,   78,   -1,   -1,   -1,   -1,   -1,
+        -1,   79,   -1,   -1,   80,   81,   82,   -1,
+        83,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   84,   85,   -1,   -1,
+        -1,   86,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   87,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   88,   89,   -1,   -1,
+        -1,   -1,   90,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   91,   92,   -1,   -1,   93,
+        -1,   -1,   -1,   -1,   94,   -1,   -1,   95,
+        96,   97,   -1,   98,   99,  100,  101,  102,
+        -1,   -1,   -1,   -1,  103,  104,  105,   -1,
+        -1,   -1,  106,   -1,   -1,   -1,  107,  108,
+        -1,   -1,   -1,  109,   -1,  110,   -1,   -1,
+       111,  112,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,  113,   -1,   -1,   -1,   -1,  114,
+       115,   -1,   -1,   -1,  116,   -1,   -1,  117,
+       118,   -1,  119,  120,   -1,   -1,   -1,  121,
+        -1,   -1,  122,   -1,   -1,  123,   -1,   -1,
+        -1,   -1,  124,   -1,   -1,   -1,   -1,   -1,
+        -1,  125,   -1,   -1,   -1,   -1,   -1,  126,
+        -1,   -1,   -1,  127,   -1,   -1,  128,   -1,
+        -1,   -1,  129,   -1,   -1,   -1,   -1,  130,
+        -1,   -1,   -1,  131,  132,   -1,  133,   -1,
+        -1,   -1,  134,   -1,   -1,  135,  136,   -1,
+        -1,   -1,   -1,  137,  138,   -1,   -1,  139,
+        -1,  140,   -1,  141,   -1,   -1,  142,   -1,
+       143,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,  144,   -1,  145,
+        -1,   -1,   -1,  146,   -1,   -1,   -1,  147,
+        -1,   -1,  148,   -1,   -1,   -1,   -1,   -1,
+       149,  150,  151,   -1,   -1,  152,   -1,   -1,
+        -1,  153,  154,   -1,   -1,   -1,   -1,  155,
+       156,   -1,   -1,  157,   -1,  158,   -1,   -1,
+        -1,   -1,   -1,   -1,  159,   -1,  160,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,  223,
+        -1,   -1,   -1,   -1,   -1,  161,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,  162,   -1,
+       163,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+       164,  165,   -1,   -1,  166,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,  167,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,  168,   -1,   -1,  169,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+       170,  171,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,  172,   -1,
+        -1,  173,   -1,   -1,   -1,  174,   -1,   -1,
+        -1,   -1,  175,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,  176,   -1,   -1,  177,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,  178,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-       224,   -1,   -1,   -1,  225,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+       179,   -1,   -1,   -1,  180,  181,  182,  183,
+        -1,   -1,   -1,   -1,  184,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,  185,   -1,  186,  187,   -1,   -1,  188,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,  189,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,  190,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,  191,   -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,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,  192,  193,   -1,   -1,  194,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,  195,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+       196,   -1,   -1,   -1,  197,   -1,   -1,  198,
+        -1,   -1,  199,   -1,   -1,   -1,  200,   -1,
+        -1,   -1,   -1,  201,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+       202,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,  203,   -1,   -1,   -1,   -1,   -1,
+       204,   -1,   -1,   -1,   -1,   -1,  205,   -1,
+        -1,   -1,   -1,   -1,  206,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,  207,
+       208,  209,   -1,   -1,   -1,   -1,   -1,  210,
+        -1,  211,   -1,   -1,   -1,  212,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,  213,  214,  215,
+        -1,   -1,   -1,   -1,   -1,   -1,  216,   -1,
+        -1,   -1,   -1,   -1,  217,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,  218,   -1,  219,
+        -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,   -1,   -1,   -1,   -1,
+        -1,   -1,  222,  223,   -1,   -1,  224,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+       225,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,  226,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,  227,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-       227,   -1,   -1,   -1,   -1,  228,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,  229,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,  230,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,  228,  229,   -1,   -1,
+        -1,   -1,  230,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,  231,   -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,  231,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,  232,
-        -1,   -1,   -1,  233,   -1,   -1,   -1,   -1,
+        -1,   -1,  233,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,  234,   -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,  235,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,  234,   -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,
@@ -534,32 +576,45 @@ 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,  236,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+       237,   -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,  238,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+       239,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,  240,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,  236,   -1,  237,   -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,   -1,   -1,   -1,   -1,   -1,  242,   -1,
         -1,   -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,  243,
+        -1,   -1,   -1,   -1,   -1,  244,   -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,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-       239,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,  246,   -1,   -1,   -1,
+       247,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,  248,   -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,   -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,  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,
@@ -567,6 +622,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,  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,
@@ -578,7 +634,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,  240
+        -1,   -1,   -1,   -1,   -1,   -1,  251
     };
 
   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -829,6 +885,7 @@ static const char * const valueList[] = {
 "line-through", 
 "loud", 
 "lower", 
+"marquee", 
 "mix", 
 "no-close-quote", 
 "no-open-quote", 
@@ -858,6 +915,16 @@ static const char * const valueList[] = {
 "block-axis", 
 "single", 
 "multiple", 
+"forwards", 
+"backwards", 
+"ahead", 
+"up", 
+"down", 
+"slow", 
+"fast", 
+"infinite", 
+"slide", 
+"alternate", 
     0
 };
 DOMString getValueName(unsigned short id)
diff --git a/WebCore/khtml/css/cssvalues.h b/WebCore/khtml/css/cssvalues.h
index 804f1f4..86378f6 100644
--- a/WebCore/khtml/css/cssvalues.h
+++ b/WebCore/khtml/css/cssvalues.h
@@ -221,36 +221,47 @@ DOM::DOMString getValueName(unsigned short id);
 #define CSS_VAL_LINE_THROUGH 210
 #define CSS_VAL_LOUD 211
 #define CSS_VAL_LOWER 212
-#define CSS_VAL_MIX 213
-#define CSS_VAL_NO_CLOSE_QUOTE 214
-#define CSS_VAL_NO_OPEN_QUOTE 215
-#define CSS_VAL_NOWRAP 216
-#define CSS_VAL_OPEN_QUOTE 217
-#define CSS_VAL_OVERLINE 218
-#define CSS_VAL_PORTRAIT 219
-#define CSS_VAL_PRE 220
-#define CSS_VAL_RELATIVE 221
-#define CSS_VAL_SCROLL 222
-#define CSS_VAL_SEPARATE 223
-#define CSS_VAL_SHOW 224
-#define CSS_VAL_STATIC 225
-#define CSS_VAL_THICK 226
-#define CSS_VAL_THIN 227
-#define CSS_VAL_UNDERLINE 228
-#define CSS_VAL__KHTML_NOWRAP 229
-#define CSS_VAL__KHTML_NORMAL 230
-#define CSS_VAL__KHTML_AROUND_FLOATS 231
-#define CSS_VAL_STRETCH 232
-#define CSS_VAL_START 233
-#define CSS_VAL_END 234
-#define CSS_VAL_REVERSE 235
-#define CSS_VAL_HORIZONTAL 236
-#define CSS_VAL_VERTICAL 237
-#define CSS_VAL_INLINE_AXIS 238
-#define CSS_VAL_BLOCK_AXIS 239
-#define CSS_VAL_SINGLE 240
-#define CSS_VAL_MULTIPLE 241
+#define CSS_VAL_MARQUEE 213
+#define CSS_VAL_MIX 214
+#define CSS_VAL_NO_CLOSE_QUOTE 215
+#define CSS_VAL_NO_OPEN_QUOTE 216
+#define CSS_VAL_NOWRAP 217
+#define CSS_VAL_OPEN_QUOTE 218
+#define CSS_VAL_OVERLINE 219
+#define CSS_VAL_PORTRAIT 220
+#define CSS_VAL_PRE 221
+#define CSS_VAL_RELATIVE 222
+#define CSS_VAL_SCROLL 223
+#define CSS_VAL_SEPARATE 224
+#define CSS_VAL_SHOW 225
+#define CSS_VAL_STATIC 226
+#define CSS_VAL_THICK 227
+#define CSS_VAL_THIN 228
+#define CSS_VAL_UNDERLINE 229
+#define CSS_VAL__KHTML_NOWRAP 230
+#define CSS_VAL__KHTML_NORMAL 231
+#define CSS_VAL__KHTML_AROUND_FLOATS 232
+#define CSS_VAL_STRETCH 233
+#define CSS_VAL_START 234
+#define CSS_VAL_END 235
+#define CSS_VAL_REVERSE 236
+#define CSS_VAL_HORIZONTAL 237
+#define CSS_VAL_VERTICAL 238
+#define CSS_VAL_INLINE_AXIS 239
+#define CSS_VAL_BLOCK_AXIS 240
+#define CSS_VAL_SINGLE 241
+#define CSS_VAL_MULTIPLE 242
+#define CSS_VAL_FORWARDS 243
+#define CSS_VAL_BACKWARDS 244
+#define CSS_VAL_AHEAD 245
+#define CSS_VAL_UP 246
+#define CSS_VAL_DOWN 247
+#define CSS_VAL_SLOW 248
+#define CSS_VAL_FAST 249
+#define CSS_VAL_INFINITE 250
+#define CSS_VAL_SLIDE 251
+#define CSS_VAL_ALTERNATE 252
 
-#define CSS_VAL_TOTAL 242
+#define CSS_VAL_TOTAL 253
 #endif
 
diff --git a/WebCore/khtml/css/cssvalues.in b/WebCore/khtml/css/cssvalues.in
index 4b60fbc..5fc76d8 100644
--- a/WebCore/khtml/css/cssvalues.in
+++ b/WebCore/khtml/css/cssvalues.in
@@ -298,6 +298,7 @@ level
 line-through
 loud
 lower
+marquee
 mix
 no-close-quote
 no-open-quote
@@ -413,3 +414,28 @@ block-axis
 single
 multiple
 
+# CSS_PROP_MARQUEE_DIRECTION
+forwards
+backwards
+ahead
+# reverse
+# left
+# right
+up
+down
+# auto
+
+# CSS_PROP_MARQUEE_SPEED
+slow
+# normal
+fast
+
+# CSS_PROP_MARQUEE_REPETITION
+infinite
+
+# CSS_PROP_MARQUEE_STYLE
+# none
+slide
+# scroll
+alternate
+
diff --git a/WebCore/khtml/css/html4.css b/WebCore/khtml/css/html4.css
index 89a3acd..e1f0b90 100644
--- a/WebCore/khtml/css/html4.css
+++ b/WebCore/khtml/css/html4.css
@@ -61,6 +61,11 @@ layer {
 	display: block;
 }
 
+marquee {
+    display: inline-block;
+    overflow: marquee;
+}
+
 address {
 	display: block;
 }
@@ -491,10 +496,6 @@ wbr {
         white-space: normal;
 }
 
-marquee {
-        display: none;
-}
-
 /* noscript is handled internally, as it depends on the html settings */
 
 /* media rules are commented out for the moment. We'll have to add
diff --git a/WebCore/khtml/html/html_blockimpl.cpp b/WebCore/khtml/html/html_blockimpl.cpp
index 700a352..cdcb77f 100644
--- a/WebCore/khtml/html/html_blockimpl.cpp
+++ b/WebCore/khtml/html/html_blockimpl.cpp
@@ -233,6 +233,106 @@ void HTMLPreElementImpl::setWidth( long /*w*/ )
     // ###
 }
 
+// -------------------------------------------------------------------------
+
+ // WinIE uses 60ms as the minimum delay by default.
+const int defaultMinimumDelay = 60;
+
+HTMLMarqueeElementImpl::HTMLMarqueeElementImpl(DocumentPtr *doc)
+: HTMLElementImpl(doc),
+  m_minimumDelay(defaultMinimumDelay)
+{
+}
+
+NodeImpl::Id HTMLMarqueeElementImpl::id() const
+{
+    return ID_MARQUEE;
+}
+
+void HTMLMarqueeElementImpl::parseAttribute(AttributeImpl *attr)
+{
+    switch(attr->id())
+    {
+        case ATTR_WIDTH:
+            if (!attr->value().isEmpty())
+                addCSSLength(CSS_PROP_WIDTH, attr->value());
+            else
+                removeCSSProperty(CSS_PROP_WIDTH);
+            break;
+        case ATTR_HEIGHT:
+            if (!attr->value().isEmpty())
+                addCSSLength(CSS_PROP_HEIGHT, attr->value());
+            else
+                removeCSSProperty(CSS_PROP_HEIGHT);
+            break;
+        case ATTR_BGCOLOR:
+            if (!attr->value().isEmpty())
+                addHTMLColor(CSS_PROP_BACKGROUND_COLOR, attr->value());
+            else
+                removeCSSProperty(CSS_PROP_BACKGROUND_COLOR);
+            break;
+        case ATTR_VSPACE:
+            if (!attr->value().isEmpty()) {
+                addCSSLength(CSS_PROP_MARGIN_TOP, attr->value());
+                addCSSLength(CSS_PROP_MARGIN_BOTTOM, attr->value());
+            }
+            else {
+                removeCSSProperty(CSS_PROP_MARGIN_TOP);
+                removeCSSProperty(CSS_PROP_MARGIN_BOTTOM);
+            }
+            break;
+        case ATTR_HSPACE:
+            if (!attr->value().isEmpty()) {
+                addCSSLength(CSS_PROP_MARGIN_LEFT, attr->value());
+                addCSSLength(CSS_PROP_MARGIN_RIGHT, attr->value());
+            }
+            else {
+                removeCSSProperty(CSS_PROP_MARGIN_LEFT);
+                removeCSSProperty(CSS_PROP_MARGIN_RIGHT);
+            }
+            break;
+        case ATTR_SCROLLAMOUNT:
+            if (!attr->value().isEmpty())
+                addCSSLength(CSS_PROP__KHTML_MARQUEE_INCREMENT, attr->value());
+            else
+                removeCSSProperty(CSS_PROP__KHTML_MARQUEE_INCREMENT);
+            break;
+        case ATTR_SCROLLDELAY:
+            if (!attr->value().isEmpty())
+                addCSSLength(CSS_PROP__KHTML_MARQUEE_SPEED, attr->value());
+            else
+                removeCSSProperty(CSS_PROP__KHTML_MARQUEE_SPEED);
+            break;
+        case ATTR_LOOP:
+            if (!attr->value().isEmpty()) {
+                if (attr->value() == "-1" || strcasecmp(attr->value(), "infinite") == 0)
+                    addCSSProperty(CSS_PROP__KHTML_MARQUEE_REPETITION, CSS_VAL_INFINITE);
+                else
+                    addCSSLength(CSS_PROP__KHTML_MARQUEE_REPETITION, attr->value());
+            }
+            else
+                removeCSSProperty(CSS_PROP__KHTML_MARQUEE_REPETITION);
+            break;
+        case ATTR_BEHAVIOR:
+            if (!attr->value().isEmpty())
+                addCSSProperty(CSS_PROP__KHTML_MARQUEE_STYLE, attr->value());
+            else
+                removeCSSProperty(CSS_PROP__KHTML_MARQUEE_STYLE);
+            break;
+        case ATTR_DIRECTION:
+            if (!attr->value().isEmpty())
+                addCSSProperty(CSS_PROP__KHTML_MARQUEE_DIRECTION, attr->value());
+            else
+                removeCSSProperty(CSS_PROP__KHTML_MARQUEE_DIRECTION);
+            break;
+        case ATTR_TRUESPEED:
+            m_minimumDelay = attr->val() ? 0 : defaultMinimumDelay;
+            break;
+        default:
+            HTMLElementImpl::parseAttribute(attr);
+    }
+}
+
 // ------------------------------------------------------------------------
 
 HTMLLayerElementImpl::HTMLLayerElementImpl(DocumentPtr *doc)
diff --git a/WebCore/khtml/html/html_blockimpl.h b/WebCore/khtml/html/html_blockimpl.h
index ce789cc..b263d57 100644
--- a/WebCore/khtml/html/html_blockimpl.h
+++ b/WebCore/khtml/html/html_blockimpl.h
@@ -112,6 +112,22 @@ public:
 
 // -------------------------------------------------------------------------
 
+class HTMLMarqueeElementImpl : public HTMLElementImpl
+{
+public:
+    HTMLMarqueeElementImpl(DocumentPtr *doc);
+
+    virtual NodeImpl::Id id() const;
+    virtual void parseAttribute(AttributeImpl *token);
+
+    int minimumDelay() const { return m_minimumDelay; }
+    
+private:
+    int m_minimumDelay;
+};
+
+// -------------------------------------------------------------------------
+
 class HTMLLayerElementImpl : public HTMLDivElementImpl
 {
 public:
diff --git a/WebCore/khtml/html/htmlparser.cpp b/WebCore/khtml/html/htmlparser.cpp
index 0988fb5..21e2123 100644
--- a/WebCore/khtml/html/htmlparser.cpp
+++ b/WebCore/khtml/html/htmlparser.cpp
@@ -1077,7 +1077,7 @@ NodeImpl *KHTMLParser::getElement(Token* t)
         return 0;
         break;
     case ID_MARQUEE:
-        n = new HTMLGenericElementImpl(document, t->id);
+        n = new HTMLMarqueeElementImpl(document);
         break;
 // text
     case ID_TEXT:
diff --git a/WebCore/khtml/misc/htmlattrs.c b/WebCore/khtml/misc/htmlattrs.c
index a727a12..f77a737 100644
--- a/WebCore/khtml/misc/htmlattrs.c
+++ b/WebCore/khtml/misc/htmlattrs.c
@@ -8,7 +8,7 @@ struct attrs {
     const char *name;
     int id;
 };
-/* maximum key range = 1208, duplicates = 1 */
+/* maximum key range = 1233, duplicates = 1 */
 
 #ifdef __GNUC__
 __inline
@@ -22,32 +22,32 @@ hash_attr (register const char *str, register unsigned int len)
 {
   static const unsigned short asso_values[] =
     {
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211,    5, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211,   45,   65,   10,
-        50,    0,   75,   60,  170,  200,    0,   45,    0,  175,
-         0,    0,    0,    0,   25,    5,    0,  160,  160,   15,
-        30,  170,   20, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
-      1211, 1211, 1211, 1211, 1211, 1211
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236,    0, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236,   45,  175,   10,
+        50,    0,  280,   65,   55,  195,   10,   50,    0,  140,
+         0,    0,    0,    0,   25,    5,    0,    0,  220,   60,
+        80,   45,    0, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+      1236, 1236, 1236, 1236, 1236, 1236
     };
   register int hval = len;
 
@@ -97,158 +97,164 @@ findAttr (register const char *str, register unsigned int len)
 {
   enum
     {
-      TOTAL_KEYWORDS = 146,
+      TOTAL_KEYWORDS = 152,
       MIN_WORD_LENGTH = 2,
       MAX_WORD_LENGTH = 15,
       MIN_HASH_VALUE = 3,
-      MAX_HASH_VALUE = 1210
+      MAX_HASH_VALUE = 1235
     };
 
   static const struct attrs wordlist_attr[] =
     {
       {"top", ATTR_TOP},
+      {"loop", ATTR_LOOP},
       {"content", ATTR_CONTENT},
       {"cols", ATTR_COLS},
       {"scope", ATTR_SCOPE},
       {"onselect", ATTR_ONSELECT},
       {"rel", ATTR_REL},
-      {"text", ATTR_TEXT},
+      {"rules", ATTR_RULES},
       {"onreset", ATTR_ONRESET},
       {"color", ATTR_COLOR},
       {"src", ATTR_SRC},
       {"alt", ATTR_ALT},
-      {"rows", ATTR_ROWS},
+      {"type", ATTR_TYPE},
       {"span", ATTR_SPAN},
+      {"style", ATTR_STYLE},
+      {"enctype", ATTR_ENCTYPE},
       {"code", ATTR_CODE},
       {"colspan", ATTR_COLSPAN},
       {"class", ATTR_CLASS},
       {"accept", ATTR_ACCEPT},
       {"selected", ATTR_SELECTED},
-      {"left", ATTR_LEFT},
       {"start", ATTR_START},
-      {"object", ATTR_OBJECT},
       {"onerror", ATTR_ONERROR},
+      {"text", ATTR_TEXT},
       {"clear", ATTR_CLEAR},
-      {"wrap", ATTR_WRAP},
-      {"nowrap", ATTR_NOWRAP},
+      {"truespeed", ATTR_TRUESPEED},
+      {"rows", ATTR_ROWS},
       {"coords", ATTR_COORDS},
-      {"rowspan", ATTR_ROWSPAN},
       {"onload", ATTR_ONLOAD},
-      {"for", ATTR_FOR},
+      {"onkeyup", ATTR_ONKEYUP},
+      {"onunload", ATTR_ONUNLOAD},
+      {"shape", ATTR_SHAPE},
+      {"codetype", ATTR_CODETYPE},
       {"lang", ATTR_LANG},
-      {"label", ATTR_LABEL},
+      {"unknown", ATTR_UNKNOWN},
+      {"hspace", ATTR_HSPACE},
+      {"wrap", ATTR_WRAP},
+      {"nowrap", ATTR_NOWRAP},
+      {"declare", ATTR_DECLARE},
       {"longdesc", ATTR_LONGDESC},
-      {"face", ATTR_FACE},
+      {"char", ATTR_CHAR},
+      {"onkeypress", ATTR_ONKEYPRESS},
       {"target", ATTR_TARGET},
-      {"declare", ATTR_DECLARE},
-      {"pagex", ATTR_PAGEX},
-      {"onabort", ATTR_ONABORT},
+      {"rowspan", ATTR_ROWSPAN},
       {"data", ATTR_DATA},
-      {"defer", ATTR_DEFER},
-      {"bgcolor", ATTR_BGCOLOR},
-      {"border", ATTR_BORDER},
-      {"type", ATTR_TYPE},
-      {"style", ATTR_STYLE},
-      {"codebase", ATTR_CODEBASE},
-      {"enctype", ATTR_ENCTYPE},
-      {"rev", ATTR_REV},
-      {"rules", ATTR_RULES},
-      {"abbr", ATTR_ABBR},
-      {"title", ATTR_TITLE},
+      {"charset", ATTR_CHARSET},
+      {"onmouseup", ATTR_ONMOUSEUP},
+      {"onmouseout", ATTR_ONMOUSEOUT},
+      {"pagey", ATTR_PAGEY},
+      {"noshade", ATTR_NOSHADE},
       {"prompt", ATTR_PROMPT},
-      {"bordercolor", ATTR_BORDERCOLOR},
-      {"cite", ATTR_CITE},
-      {"nosave", ATTR_NOSAVE},
+      {"readonly", ATTR_READONLY},
+      {"accesskey", ATTR_ACCESSKEY},
+      {"checked", ATTR_CHECKED},
+      {"onchange", ATTR_ONCHANGE},
+      {"challenge", ATTR_CHALLENGE},
+      {"headers", ATTR_HEADERS},
       {"name", ATTR_NAME},
-      {"shape", ATTR_SHAPE},
-      {"vspace", ATTR_VSPACE},
-      {"unknown", ATTR_UNKNOWN},
+      {"scrolldelay", ATTR_SCROLLDELAY},
+      {"pagex", ATTR_PAGEX},
+      {"usemap", ATTR_USEMAP},
+      {"html", ATTR_HTML},
+      {"title", ATTR_TITLE},
+      {"object", ATTR_OBJECT},
       {"size", ATTR_SIZE},
-      {"oversrc", ATTR_OVERSRC},
-      {"hspace", ATTR_HSPACE},
-      {"codetype", ATTR_CODETYPE},
-      {"compact", ATTR_COMPACT},
-      {"link", ATTR_LINK},
-      {"plain", ATTR_PLAIN},
-      {"id", ATTR_ID},
-      {"char", ATTR_CHAR},
       {"onblur", ATTR_ONBLUR},
-      {"onfocus", ATTR_ONFOCUS},
+      {"autocomplete", ATTR_AUTOCOMPLETE},
+      {"cite", ATTR_CITE},
+      {"compact", ATTR_COMPACT},
+      {"onkeydown", ATTR_ONKEYDOWN},
+      {"scheme", ATTR_SCHEME},
+      {"accept-charset", ATTR_ACCEPT_CHARSET},
+      {"label", ATTR_LABEL},
+      {"language", ATTR_LANGUAGE},
       {"noresize", ATTR_NORESIZE},
       {"onresize", ATTR_ONRESIZE},
-      {"onkeypress", ATTR_ONKEYPRESS},
+      {"scrollamount", ATTR_SCROLLAMOUNT},
+      {"oncontextmenu", ATTR_ONCONTEXTMENU},
+      {"plain", ATTR_PLAIN},
+      {"id", ATTR_ID},
+      {"rev", ATTR_REV},
+      {"link", ATTR_LINK},
+      {"method", ATTR_METHOD},
+      {"onabort", ATTR_ONABORT},
       {"action", ATTR_ACTION},
-      {"charset", ATTR_CHARSET},
-      {"onunload", ATTR_ONUNLOAD},
+      {"onmousedown", ATTR_ONMOUSEDOWN},
+      {"value", ATTR_VALUE},
       {"onclick", ATTR_ONCLICK},
-      {"href", ATTR_HREF},
-      {"nohref", ATTR_NOHREF},
-      {"noshade", ATTR_NOSHADE},
       {"dir", ATTR_DIR},
-      {"pagey", ATTR_PAGEY},
-      {"axis", ATTR_AXIS},
-      {"onkeydown", ATTR_ONKEYDOWN},
-      {"checked", ATTR_CHECKED},
-      {"onchange", ATTR_ONCHANGE},
-      {"challenge", ATTR_CHALLENGE},
+      {"nosave", ATTR_NOSAVE},
+      {"border", ATTR_BORDER},
+      {"bgcolor", ATTR_BGCOLOR},
+      {"left", ATTR_LEFT},
+      {"vspace", ATTR_VSPACE},
+      {"oversrc", ATTR_OVERSRC},
+      {"codebase", ATTR_CODEBASE},
+      {"pluginurl", ATTR_PLUGINURL},
       {"alink", ATTR_ALINK},
-      {"readonly", ATTR_READONLY},
-      {"accesskey", ATTR_ACCESSKEY},
-      {"headers", ATTR_HEADERS},
-      {"profile", ATTR_PROFILE},
+      {"onfocus", ATTR_ONFOCUS},
+      {"for", ATTR_FOR},
       {"scrolling", ATTR_SCROLLING},
       {"align", ATTR_ALIGN},
-      {"z-index", ATTR_Z_INDEX},
       {"classid", ATTR_CLASSID},
-      {"frame", ATTR_FRAME},
-      {"accept-charset", ATTR_ACCEPT_CHARSET},
-      {"cellspacing", ATTR_CELLSPACING},
+      {"valuetype", ATTR_VALUETYPE},
+      {"bordercolor", ATTR_BORDERCOLOR},
       {"standby", ATTR_STANDBY},
-      {"html", ATTR_HTML},
-      {"scheme", ATTR_SCHEME},
-      {"value", ATTR_VALUE},
-      {"language", ATTR_LANGUAGE},
-      {"onkeyup", ATTR_ONKEYUP},
-      {"hreflang", ATTR_HREFLANG},
-      {"contenteditable", ATTR_CONTENTEDITABLE},
-      {"oncontextmenu", ATTR_ONCONTEXTMENU},
-      {"ondblclick", ATTR_ONDBLCLICK},
-      {"usemap", ATTR_USEMAP},
-      {"bgproperties", ATTR_BGPROPERTIES},
-      {"version", ATTR_VERSION},
-      {"tabindex", ATTR_TABINDEX},
-      {"method", ATTR_METHOD},
-      {"autocomplete", ATTR_AUTOCOMPLETE},
-      {"charoff", ATTR_CHAROFF},
-      {"vlink", ATTR_VLINK},
-      {"onmousedown", ATTR_ONMOUSEDOWN},
-      {"disabled", ATTR_DISABLED},
-      {"cellpadding", ATTR_CELLPADDING},
-      {"ismap", ATTR_ISMAP},
+      {"axis", ATTR_AXIS},
+      {"z-index", ATTR_Z_INDEX},
+      {"face", ATTR_FACE},
+      {"cellspacing", ATTR_CELLSPACING},
+      {"multiple", ATTR_MULTIPLE},
+      {"hidden", ATTR_HIDDEN},
+      {"defer", ATTR_DEFER},
+      {"href", ATTR_HREF},
       {"width", ATTR_WIDTH},
+      {"nohref", ATTR_NOHREF},
+      {"height", ATTR_HEIGHT},
+      {"pluginpage", ATTR_PLUGINPAGE},
+      {"pluginspage", ATTR_PLUGINSPAGE},
+      {"ismap", ATTR_ISMAP},
+      {"maxlength", ATTR_MAXLENGTH},
+      {"onmouseover", ATTR_ONMOUSEOVER},
+      {"summary", ATTR_SUMMARY},
+      {"abbr", ATTR_ABBR},
+      {"cellpadding", ATTR_CELLPADDING},
       {"background", ATTR_BACKGROUND},
-      {"valign", ATTR_VALIGN},
       {"media", ATTR_MEDIA},
-      {"hidden", ATTR_HIDDEN},
       {"datetime", ATTR_DATETIME},
-      {"maxlength", ATTR_MAXLENGTH},
-      {"frameborder", ATTR_FRAMEBORDER},
-      {"onmouseup", ATTR_ONMOUSEUP},
-      {"onmouseout", ATTR_ONMOUSEOUT},
+      {"version", ATTR_VERSION},
+      {"vlink", ATTR_VLINK},
+      {"hreflang", ATTR_HREFLANG},
       {"topmargin", ATTR_TOPMARGIN},
-      {"pluginpage", ATTR_PLUGINPAGE},
-      {"onmouseover", ATTR_ONMOUSEOVER},
-      {"pluginspage", ATTR_PLUGINSPAGE},
-      {"multiple", ATTR_MULTIPLE},
-      {"valuetype", ATTR_VALUETYPE},
-      {"leftmargin", ATTR_LEFTMARGIN},
-      {"height", ATTR_HEIGHT},
+      {"http-equiv", ATTR_HTTP_EQUIV},
+      {"direction", ATTR_DIRECTION},
+      {"contenteditable", ATTR_CONTENTEDITABLE},
+      {"frame", ATTR_FRAME},
+      {"ondblclick", ATTR_ONDBLCLICK},
+      {"bgproperties", ATTR_BGPROPERTIES},
+      {"profile", ATTR_PROFILE},
+      {"onmousemove", ATTR_ONMOUSEMOVE},
       {"onsubmit", ATTR_ONSUBMIT},
-      {"pluginurl", ATTR_PLUGINURL},
+      {"disabled", ATTR_DISABLED},
+      {"valign", ATTR_VALIGN},
+      {"tabindex", ATTR_TABINDEX},
       {"archive", ATTR_ARCHIVE},
-      {"onmousemove", ATTR_ONMOUSEMOVE},
-      {"http-equiv", ATTR_HTTP_EQUIV},
-      {"summary", ATTR_SUMMARY},
+      {"charoff", ATTR_CHAROFF},
+      {"behavior", ATTR_BEHAVIOR},
+      {"leftmargin", ATTR_LEFTMARGIN},
+      {"frameborder", ATTR_FRAMEBORDER},
       {"marginwidth", ATTR_MARGINWIDTH},
       {"marginheight", ATTR_MARGINHEIGHT},
       {"visibility", ATTR_VISIBILITY}
@@ -256,84 +262,86 @@ findAttr (register const char *str, register unsigned int len)
 
   static const short lookup[] =
     {
-        -1,   -1,   -1,    0,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,    0,    1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,    2,   -1,    3,    4,   -1,   -1,    5,
+        -1,   -1,   -1,   -1,    6,   -1,   -1,   -1,
+        -1,   -1,   -1,    7,   -1,    8,   -1,   -1,
+         9,   -1,   -1,   10,   -1,   -1,   -1,   -1,
+        11,   12,   -1,   -1,   -1,   -1,   13,   14,
+        -1,   -1,   -1,   -1,   -1,   -1,   15,   -1,
+        16,   -1,   -1,   17,   -1,   -1,   18,   19,
+        -1,   20,   -1,   -1,   -1,   -1,   -1,   -1,
+        21,   -1,   22,   -1,   23,   24,   -1,   -1,
+        -1,   25,   -1,   -1,   -1,   -1,   26,   -1,
+        27,   -1,   -1,   -1,   -1,   28,   29,   30,
+        -1,   -1,   -1,   -1,   -1,   -1,   31,   -1,
+        -1,   32,   33,   -1,   -1,   34,   -1,   -1,
+        -1,   35,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   36,   -1,
+        37,   38,   39,   40,   41,   42,   43,   -1,
+        44,   -1,   -1,   45,   -1,   -1,   -1,   -1,
+        -1,   -1,   46,   47,   -1,   -1,   -1,   -1,
+        48,   -1,   49,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   50,   -1,   51,   -1,   -1,
+        -1,   -1,   -1,   52,   -1,   -1,   53,   54,
+        55,   -1,   -1,   56,   -1,   57,   -1,   58,
+        -1,   -1,   -1,   59,   60,   -1,   -1,   61,
+        62,   63,   -1,   -1,   64,   -1,   65,   66,
+        -1,   67,   -1,   -1,   68,   -1,   69,   -1,
+        70,   -1,   -1,   71,   -1,   -1,   -1,   -1,
+        -1,   72,   -1,   -1,   73,   -1,   -1,   -1,
+        -1, -387,  -78,   -2,   -1,   76,   -1,   -1,
+        -1,   -1,   -1,   77,   -1,   78,   -1,   79,
+        80,   81,   -1,   82,   83,   -1,   -1,   -1,
+        84,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   85,   -1,   -1,   -1,   86,   -1,
+        87,   88,   -1,   -1,   89,   -1,   -1,   -1,
+        -1,   90,   91,   -1,   92,   -1,   93,   -1,
+        -1,   -1,   -1,   -1,   94,   95,   96,   97,
+        -1,   -1,   -1,   -1,   -1,   -1,   98,   -1,
+        -1,   -1,   -1,   -1,   99,  100,  101,   -1,
+        -1,   -1,   -1,   -1,   -1,  102,   -1,  103,
+        -1,  104,   -1,   -1,   -1,   -1,   -1,  105,
+        -1,  106,   -1,   -1,  107,   -1,   -1,   -1,
+        -1,   -1,   -1,  108,   -1,  109,   -1,  110,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,  111,   -1,   -1,   -1,
+       112,   -1,   -1,   -1,  113,  114,  115,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+       116,   -1,   -1,   -1,  117,   -1,   -1,   -1,
+        -1,   -1,  118,   -1,   -1,   -1,  119,   -1,
+        -1,   -1,  120,   -1,   -1,   -1,   -1,   -1,
+        -1,  121,   -1,   -1,   -1,   -1,   -1,  122,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,    1,   -1,    2,    3,   -1,   -1,    4,
-        -1,   -1,   -1,   -1,    5,   -1,   -1,   -1,
-        -1,   -1,    6,   -1,   -1,    7,   -1,   -1,
-         8,   -1,   -1,    9,   -1,   -1,   -1,   -1,
-        10,   11,   -1,   -1,   -1,   -1,   12,   -1,
+       123,   -1,  124,   -1,   -1,   -1,  125,   -1,
+        -1,   -1,   -1,  126,   -1,   -1,  127,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        13,   -1,   -1,   14,   -1,   -1,   15,   16,
-        -1,   17,   -1,   -1,   -1,   -1,   -1,   18,
-        19,   20,   21,   -1,   -1,   22,   -1,   -1,
-        -1,   23,   -1,   24,   -1,   -1,   -1,   -1,
-        25,   26,   -1,   -1,   -1,   27,   -1,   28,
-        -1,   -1,   -1,   -1,   -1,   29,   -1,   -1,
-        -1,   -1,   -1,   30,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,  128,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   31,   32,   -1,
-        33,   34,   -1,   -1,   35,   -1,   36,   -1,
-        37,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   38,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   39,
-        -1,   -1,   -1,   40,   -1,   -1,   41,   -1,
-        -1,   -1,   -1,   -1,   42,   -1,   -1,   43,
-        -1,   -1,   -1,   44,   45,   -1,   -1,   -1,
-        -1,   -1,   -1,   46,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   47,   48,   49,   -1,
-        -1,   -1,   -1,   50,   -1,   -1,   51,   -1,
-        52,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        53,   54,   55,   56,   -1,   57,   -1,   -1,
-        58,   -1,   -1,   -1,   59,   -1,   60,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   61,
-        -1,   62,   63,   -1,   64,   -1,   65,   -1,
-        66,   67, -411,   -1,   70,   71,   72,   73,
-       -78,   -2,   -1,   -1,   -1,   -1,   -1,   -1,
-        74,   -1,   75,   -1,   76,   77,   78,   -1,
-        79,   -1,   -1,   -1,   80,   -1,   -1,   -1,
-        -1,   81,   -1,   -1,   82,   83,   84,   85,
-        -1,   -1,   86,   87,   -1,   -1,   88,   -1,
-        -1,   -1,   -1,   89,   -1,   90,   91,   -1,
-        92,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   93,   -1,   -1,   94,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,  129,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,  130,  131,
+       132,   -1,   -1,   -1,  133,   -1,   -1,   -1,
+        -1,   -1,  134,   -1,   -1,   -1,   -1,  135,
+        -1,   -1,   -1,   -1,  136,   -1,  137,   -1,
+        -1,   -1,   -1,  138,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,  139,   -1,   -1,   -1,
+        -1,   -1,   -1,  140,   -1,   -1,   -1,   -1,
+       141,   -1,   -1,  142,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   95,   -1,   96,   97,   -1,
-        -1,   -1,   -1,   -1,   -1,   98,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   99,   -1,
-        -1,   -1,  100,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,  101,   -1,   -1,   -1,  102,  103,
-        -1,  104,   -1,   -1,  105,   -1,  106,  107,
-       108,   -1,   -1,   -1,   -1,  109,  110,   -1,
-        -1,  111,  112,   -1,   -1,   -1,   -1,  113,
-        -1,   -1,  114,   -1,   -1,   -1,   -1,   -1,
-       115,   -1,   -1,   -1,   -1,   -1,   -1,  116,
-        -1,   -1,  117,   -1,   -1,   -1,  118,   -1,
+        -1,  143,   -1,   -1,   -1,  144,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-       119,   -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,  120,  121,
-        -1,   -1,   -1,  122,  123,   -1,  124,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,  125,   -1,   -1,   -1,   -1,   -1,   -1,
-       126,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,  127,  128,   -1,
-        -1,   -1,  129,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,  130,
-       131,   -1,   -1,   -1,   -1,  132,   -1,  133,
-       134,   -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,   -1,  135,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,  136,   -1,
-        -1,   -1,   -1,   -1,   -1,  137,  138,   -1,
-        -1,  139,   -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,
@@ -341,23 +349,26 @@ findAttr (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,  140,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,  145,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,  141,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,  146,   -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,
+       147,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+       148,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,  142,   -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,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,  149,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,  150,   -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,
@@ -374,7 +385,6 @@ findAttr (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,  143,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
@@ -395,7 +405,6 @@ findAttr (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,  144,   -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,
@@ -407,7 +416,7 @@ findAttr (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,  145
+        -1,   -1,   -1,  151
     };
 
   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -459,6 +468,7 @@ static const char * const attrList[] = {
     "AUTOCOMPLETE",
     "AXIS",
     "BACKGROUND",
+    "BEHAVIOR",
     "BGCOLOR",
     "BGPROPERTIES",
     "BORDER",
@@ -489,6 +499,7 @@ static const char * const attrList[] = {
     "DECLARE",
     "DEFER",
     "DIR",
+    "DIRECTION",
     "DISABLED",
     "ENCTYPE",
     "FACE",
@@ -512,6 +523,7 @@ static const char * const attrList[] = {
     "LEFTMARGIN",
     "LINK",
     "LONGDESC",
+    "LOOP",
     "MARGINHEIGHT",
     "MARGINWIDTH",
     "MAXLENGTH",
@@ -564,6 +576,8 @@ static const char * const attrList[] = {
     "RULES",
     "SCHEME",
     "SCOPE",
+    "SCROLLAMOUNT",
+    "SCROLLDELAY",
     "SCROLLING",
     "SELECTED",
     "SHAPE",
@@ -580,6 +594,7 @@ static const char * const attrList[] = {
     "TITLE",
     "TOP",
     "TOPMARGIN",
+    "TRUESPEED",
     "TYPE",
     "UNKNOWN",
     "USEMAP",
diff --git a/WebCore/khtml/misc/htmlattrs.h b/WebCore/khtml/misc/htmlattrs.h
index e712afe..f9fc8c4 100644
--- a/WebCore/khtml/misc/htmlattrs.h
+++ b/WebCore/khtml/misc/htmlattrs.h
@@ -20,141 +20,147 @@ using namespace DOM;
 #define ATTR_AUTOCOMPLETE 10
 #define ATTR_AXIS 11
 #define ATTR_BACKGROUND 12
-#define ATTR_BGCOLOR 13
-#define ATTR_BGPROPERTIES 14
-#define ATTR_BORDER 15
-#define ATTR_BORDERCOLOR 16
-#define ATTR_CELLPADDING 17
-#define ATTR_CELLSPACING 18
-#define ATTR_CHAR 19
-#define ATTR_CHALLENGE 20
-#define ATTR_CHAROFF 21
-#define ATTR_CHARSET 22
-#define ATTR_CHECKED 23
-#define ATTR_CITE 24
-#define ATTR_CLASS 25
-#define ATTR_CLASSID 26
-#define ATTR_CLEAR 27
-#define ATTR_CODE 28
-#define ATTR_CODEBASE 29
-#define ATTR_CODETYPE 30
-#define ATTR_COLOR 31
-#define ATTR_COLS 32
-#define ATTR_COLSPAN 33
-#define ATTR_COMPACT 34
-#define ATTR_CONTENT 35
-#define ATTR_CONTENTEDITABLE 36
-#define ATTR_COORDS 37
-#define ATTR_DATA 38
-#define ATTR_DATETIME 39
-#define ATTR_DECLARE 40
-#define ATTR_DEFER 41
-#define ATTR_DIR 42
-#define ATTR_DISABLED 43
-#define ATTR_ENCTYPE 44
-#define ATTR_FACE 45
-#define ATTR_FOR 46
-#define ATTR_FRAME 47
-#define ATTR_FRAMEBORDER 48
-#define ATTR_HEADERS 49
-#define ATTR_HEIGHT 50
-#define ATTR_HIDDEN 51
-#define ATTR_HREF 52
-#define ATTR_HREFLANG 53
-#define ATTR_HSPACE 54
-#define ATTR_HTML 55
-#define ATTR_HTTP_EQUIV 56
-#define ATTR_ID 57
-#define ATTR_ISMAP 58
-#define ATTR_LABEL 59
-#define ATTR_LANG 60
-#define ATTR_LANGUAGE 61
-#define ATTR_LEFT 62
-#define ATTR_LEFTMARGIN 63
-#define ATTR_LINK 64
-#define ATTR_LONGDESC 65
-#define ATTR_MARGINHEIGHT 66
-#define ATTR_MARGINWIDTH 67
-#define ATTR_MAXLENGTH 68
-#define ATTR_MEDIA 69
-#define ATTR_METHOD 70
-#define ATTR_MULTIPLE 71
-#define ATTR_NAME 72
-#define ATTR_NOHREF 73
-#define ATTR_NORESIZE 74
-#define ATTR_NOSAVE 75
-#define ATTR_NOSHADE 76
-#define ATTR_NOWRAP 77
-#define ATTR_OBJECT 78
-#define ATTR_ONABORT 79
-#define ATTR_ONBLUR 80
-#define ATTR_ONCHANGE 81
-#define ATTR_ONCLICK 82
-#define ATTR_ONCONTEXTMENU 83
-#define ATTR_ONDBLCLICK 84
-#define ATTR_ONERROR 85
-#define ATTR_ONFOCUS 86
-#define ATTR_ONKEYDOWN 87
-#define ATTR_ONKEYPRESS 88
-#define ATTR_ONKEYUP 89
-#define ATTR_ONLOAD 90
-#define ATTR_ONMOUSEDOWN 91
-#define ATTR_ONMOUSEMOVE 92
-#define ATTR_ONMOUSEOUT 93
-#define ATTR_ONMOUSEOVER 94
-#define ATTR_ONMOUSEUP 95
-#define ATTR_ONRESET 96
-#define ATTR_ONRESIZE 97
-#define ATTR_ONSELECT 98
-#define ATTR_ONSUBMIT 99
-#define ATTR_ONUNLOAD 100
-#define ATTR_OVERSRC 101
-#define ATTR_PAGEX 102
-#define ATTR_PAGEY 103
-#define ATTR_PLAIN 104
-#define ATTR_PLUGINPAGE 105
-#define ATTR_PLUGINSPAGE 106
-#define ATTR_PLUGINURL 107
-#define ATTR_PROFILE 108
-#define ATTR_PROMPT 109
-#define ATTR_READONLY 110
-#define ATTR_REL 111
-#define ATTR_REV 112
-#define ATTR_ROWS 113
-#define ATTR_ROWSPAN 114
-#define ATTR_RULES 115
-#define ATTR_SCHEME 116
-#define ATTR_SCOPE 117
-#define ATTR_SCROLLING 118
-#define ATTR_SELECTED 119
-#define ATTR_SHAPE 120
-#define ATTR_SIZE 121
-#define ATTR_SPAN 122
-#define ATTR_SRC 123
-#define ATTR_STANDBY 124
-#define ATTR_START 125
-#define ATTR_STYLE 126
-#define ATTR_SUMMARY 127
-#define ATTR_TABINDEX 128
-#define ATTR_TARGET 129
-#define ATTR_TEXT 130
-#define ATTR_TITLE 131
-#define ATTR_TOP 132
-#define ATTR_TOPMARGIN 133
-#define ATTR_TYPE 134
-#define ATTR_UNKNOWN 135
-#define ATTR_USEMAP 136
-#define ATTR_VALIGN 137
-#define ATTR_VALUE 138
-#define ATTR_VALUETYPE 139
-#define ATTR_VERSION 140
-#define ATTR_VISIBILITY 141
-#define ATTR_VLINK 142
-#define ATTR_VSPACE 143
-#define ATTR_WIDTH 144
-#define ATTR_WRAP 145
-#define ATTR_Z_INDEX 146
-#define ATTR_LAST_ATTR 146
+#define ATTR_BEHAVIOR 13
+#define ATTR_BGCOLOR 14
+#define ATTR_BGPROPERTIES 15
+#define ATTR_BORDER 16
+#define ATTR_BORDERCOLOR 17
+#define ATTR_CELLPADDING 18
+#define ATTR_CELLSPACING 19
+#define ATTR_CHAR 20
+#define ATTR_CHALLENGE 21
+#define ATTR_CHAROFF 22
+#define ATTR_CHARSET 23
+#define ATTR_CHECKED 24
+#define ATTR_CITE 25
+#define ATTR_CLASS 26
+#define ATTR_CLASSID 27
+#define ATTR_CLEAR 28
+#define ATTR_CODE 29
+#define ATTR_CODEBASE 30
+#define ATTR_CODETYPE 31
+#define ATTR_COLOR 32
+#define ATTR_COLS 33
+#define ATTR_COLSPAN 34
+#define ATTR_COMPACT 35
+#define ATTR_CONTENT 36
+#define ATTR_CONTENTEDITABLE 37
+#define ATTR_COORDS 38
+#define ATTR_DATA 39
+#define ATTR_DATETIME 40
+#define ATTR_DECLARE 41
+#define ATTR_DEFER 42
+#define ATTR_DIR 43
+#define ATTR_DIRECTION 44
+#define ATTR_DISABLED 45
+#define ATTR_ENCTYPE 46
+#define ATTR_FACE 47
+#define ATTR_FOR 48
+#define ATTR_FRAME 49
+#define ATTR_FRAMEBORDER 50
+#define ATTR_HEADERS 51
+#define ATTR_HEIGHT 52
+#define ATTR_HIDDEN 53
+#define ATTR_HREF 54
+#define ATTR_HREFLANG 55
+#define ATTR_HSPACE 56
+#define ATTR_HTML 57
+#define ATTR_HTTP_EQUIV 58
+#define ATTR_ID 59
+#define ATTR_ISMAP 60
+#define ATTR_LABEL 61
+#define ATTR_LANG 62
+#define ATTR_LANGUAGE 63
+#define ATTR_LEFT 64
+#define ATTR_LEFTMARGIN 65
+#define ATTR_LINK 66
+#define ATTR_LONGDESC 67
+#define ATTR_LOOP 68
+#define ATTR_MARGINHEIGHT 69
+#define ATTR_MARGINWIDTH 70
+#define ATTR_MAXLENGTH 71
+#define ATTR_MEDIA 72
+#define ATTR_METHOD 73
+#define ATTR_MULTIPLE 74
+#define ATTR_NAME 75
+#define ATTR_NOHREF 76
+#define ATTR_NORESIZE 77
+#define ATTR_NOSAVE 78
+#define ATTR_NOSHADE 79
+#define ATTR_NOWRAP 80
+#define ATTR_OBJECT 81
+#define ATTR_ONABORT 82
+#define ATTR_ONBLUR 83
+#define ATTR_ONCHANGE 84
+#define ATTR_ONCLICK 85
+#define ATTR_ONCONTEXTMENU 86
+#define ATTR_ONDBLCLICK 87
+#define ATTR_ONERROR 88
+#define ATTR_ONFOCUS 89
+#define ATTR_ONKEYDOWN 90
+#define ATTR_ONKEYPRESS 91
+#define ATTR_ONKEYUP 92
+#define ATTR_ONLOAD 93
+#define ATTR_ONMOUSEDOWN 94
+#define ATTR_ONMOUSEMOVE 95
+#define ATTR_ONMOUSEOUT 96
+#define ATTR_ONMOUSEOVER 97
+#define ATTR_ONMOUSEUP 98
+#define ATTR_ONRESET 99
+#define ATTR_ONRESIZE 100
+#define ATTR_ONSELECT 101
+#define ATTR_ONSUBMIT 102
+#define ATTR_ONUNLOAD 103
+#define ATTR_OVERSRC 104
+#define ATTR_PAGEX 105
+#define ATTR_PAGEY 106
+#define ATTR_PLAIN 107
+#define ATTR_PLUGINPAGE 108
+#define ATTR_PLUGINSPAGE 109
+#define ATTR_PLUGINURL 110
+#define ATTR_PROFILE 111
+#define ATTR_PROMPT 112
+#define ATTR_READONLY 113
+#define ATTR_REL 114
+#define ATTR_REV 115
+#define ATTR_ROWS 116
+#define ATTR_ROWSPAN 117
+#define ATTR_RULES 118
+#define ATTR_SCHEME 119
+#define ATTR_SCOPE 120
+#define ATTR_SCROLLAMOUNT 121
+#define ATTR_SCROLLDELAY 122
+#define ATTR_SCROLLING 123
+#define ATTR_SELECTED 124
+#define ATTR_SHAPE 125
+#define ATTR_SIZE 126
+#define ATTR_SPAN 127
+#define ATTR_SRC 128
+#define ATTR_STANDBY 129
+#define ATTR_START 130
+#define ATTR_STYLE 131
+#define ATTR_SUMMARY 132
+#define ATTR_TABINDEX 133
+#define ATTR_TARGET 134
+#define ATTR_TEXT 135
+#define ATTR_TITLE 136
+#define ATTR_TOP 137
+#define ATTR_TOPMARGIN 138
+#define ATTR_TRUESPEED 139
+#define ATTR_TYPE 140
+#define ATTR_UNKNOWN 141
+#define ATTR_USEMAP 142
+#define ATTR_VALIGN 143
+#define ATTR_VALUE 144
+#define ATTR_VALUETYPE 145
+#define ATTR_VERSION 146
+#define ATTR_VISIBILITY 147
+#define ATTR_VLINK 148
+#define ATTR_VSPACE 149
+#define ATTR_WIDTH 150
+#define ATTR_WRAP 151
+#define ATTR_Z_INDEX 152
+#define ATTR_LAST_ATTR 152
 DOMString getAttrName(unsigned short id);
 
 #endif
diff --git a/WebCore/khtml/misc/htmlattrs.in b/WebCore/khtml/misc/htmlattrs.in
index a63e538..05206d8 100644
--- a/WebCore/khtml/misc/htmlattrs.in
+++ b/WebCore/khtml/misc/htmlattrs.in
@@ -10,6 +10,7 @@ archive
 autocomplete
 axis
 background
+behavior
 bgcolor
 bgproperties
 border
@@ -40,6 +41,7 @@ datetime
 declare
 defer
 dir
+direction
 disabled
 enctype
 face
@@ -63,6 +65,7 @@ left
 leftmargin
 link
 longdesc
+loop
 marginheight
 marginwidth
 maxlength
@@ -115,6 +118,8 @@ rowspan
 rules
 scheme
 scope
+scrollamount
+scrolldelay
 scrolling
 selected
 shape
@@ -131,6 +136,7 @@ text
 title
 top
 topmargin
+truespeed
 type
 unknown
 usemap
diff --git a/WebCore/khtml/rendering/bidi.cpp b/WebCore/khtml/rendering/bidi.cpp
index 65ac67f..fe1e08a 100644
--- a/WebCore/khtml/rendering/bidi.cpp
+++ b/WebCore/khtml/rendering/bidi.cpp
@@ -1577,7 +1577,23 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
             tmpW += o->marginLeft()+o->borderLeft()+o->paddingLeft()+
                     o->marginRight()+o->borderRight()+o->paddingRight();
         } else if ( o->isReplaced() ) {
-            if (o->style()->whiteSpace() == NORMAL || last->style()->whiteSpace() == NORMAL) {
+            EWhiteSpace currWS = o->style()->whiteSpace();
+            EWhiteSpace lastWS = last->style()->whiteSpace();
+            
+            // WinIE marquees have different whitespace characteristics by default when viewed from
+            // the outside vs. the inside.  Text inside is NOWRAP, and so we altered the marquee's
+            // style to reflect this, but we now have to get back to the original whitespace value
+            // for the marquee when checking for line breaking.
+            if (o->isHTMLMarquee() && o->layer() && o->layer()->marquee())
+                currWS = o->layer()->marquee()->whiteSpace();
+            if (last->isHTMLMarquee() && last->layer() && last->layer()->marquee())
+                lastWS = last->layer()->marquee()->whiteSpace();
+            
+            // Break on replaced elements if either has normal white-space.
+            // FIXME: This does not match WinIE, Opera, and Mozilla.  They treat replaced elements
+            // like characters in a word, and require spaces between the replaced elements in order
+            // to break.
+            if (currWS == NORMAL || lastWS == NORMAL) {
                 w += tmpW;
                 tmpW = 0;
                 lBreak.obj = o;
diff --git a/WebCore/khtml/rendering/render_block.cpp b/WebCore/khtml/rendering/render_block.cpp
index cfd6be0..c1532f5 100644
--- a/WebCore/khtml/rendering/render_block.cpp
+++ b/WebCore/khtml/rendering/render_block.cpp
@@ -1586,12 +1586,12 @@ RenderBlock::floatBottom() const
 }
 
 int
-RenderBlock::lowestPosition(bool includeOverflowInterior) const
+RenderBlock::lowestPosition(bool includeOverflowInterior, bool includeSelf) const
 {
-    int bottom = RenderFlow::lowestPosition(includeOverflowInterior);
+    int bottom = RenderFlow::lowestPosition(includeOverflowInterior, includeSelf);
     if (!includeOverflowInterior && style()->hidesOverflow())
         return bottom;
-    if (m_overflowHeight > bottom)
+    if (includeSelf && m_overflowHeight > bottom)
         bottom = m_overflowHeight;
     
     if (m_floatingObjects) {
@@ -1600,7 +1600,7 @@ RenderBlock::lowestPosition(bool includeOverflowInterior) const
         for ( ; (r = it.current()); ++it ) {
             if (!r->noPaint) {
                 int lp = r->startY + r->node->lowestPosition(false);
-                bottom = QMAX(bottom, lp);
+                bottom = kMax(bottom, lp);
             }
         }
     }
@@ -1612,19 +1612,24 @@ RenderBlock::lowestPosition(bool includeOverflowInterior) const
         QPtrListIterator<RenderObject> it(*m_positionedObjects);
         for ( ; (r = it.current()); ++it ) {
             int lp = r->yPos() + r->lowestPosition(false);
-            bottom = QMAX(bottom, lp);
+            bottom = kMax(bottom, lp);
         }
     }
 
+    if (!includeSelf && lastLineBox()) {
+        int lp = lastLineBox()->yPos() + lastLineBox()->height();
+        bottom = kMax(bottom, lp);
+    }
+    
     return bottom;
 }
 
-int RenderBlock::rightmostPosition(bool includeOverflowInterior) const
+int RenderBlock::rightmostPosition(bool includeOverflowInterior, bool includeSelf) const
 {
-    int right = RenderFlow::rightmostPosition(includeOverflowInterior);
+    int right = RenderFlow::rightmostPosition(includeOverflowInterior, includeSelf);
     if (!includeOverflowInterior && style()->hidesOverflow())
         return right;
-    if (m_overflowWidth > right)
+    if (includeSelf && m_overflowWidth > right)
         right = m_overflowWidth;
     
     if (m_floatingObjects) {
@@ -1633,7 +1638,7 @@ int RenderBlock::rightmostPosition(bool includeOverflowInterior) const
         for ( ; (r = it.current()); ++it ) {
             if (!r->noPaint) {
                 int rp = r->left + r->node->rightmostPosition(false);
-           	right = QMAX(right, rp);
+           	right = kMax(right, rp);
             }
         }
     }
@@ -1643,13 +1648,55 @@ int RenderBlock::rightmostPosition(bool includeOverflowInterior) const
         QPtrListIterator<RenderObject> it(*m_positionedObjects);
         for ( ; (r = it.current()); ++it ) {
             int rp = r->xPos() + r->rightmostPosition(false);
-            right = QMAX(right, rp);
+            right = kMax(right, rp);
         }
     }
 
+    if (!includeSelf && firstLineBox()) {
+        for (InlineRunBox* currBox = firstLineBox(); currBox; currBox = currBox->nextLineBox()) {
+            int rp = currBox->xPos() + currBox->width();
+            right = kMax(right, rp);
+        }
+    }
+    
     return right;
 }
 
+int RenderBlock::leftmostPosition(bool includeOverflowInterior, bool includeSelf) const
+{
+    int left = RenderFlow::leftmostPosition(includeOverflowInterior, includeSelf);
+    if (!includeOverflowInterior && style()->hidesOverflow())
+        return left;
+    
+    // FIXME: Check left overflow when we eventually support it.
+    
+    if (m_floatingObjects) {
+        FloatingObject* r;
+        QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+        for ( ; (r = it.current()); ++it ) {
+            if (!r->noPaint) {
+                int lp = r->left + r->node->leftmostPosition(false);
+                left = kMin(left, lp);
+            }
+        }
+    }
+    
+    if (m_positionedObjects && !isCanvas()) {
+        RenderObject* r;
+        QPtrListIterator<RenderObject> it(*m_positionedObjects);
+        for ( ; (r = it.current()); ++it ) {
+            int lp = r->xPos() + r->leftmostPosition(false);
+            left = kMin(left, lp);
+        }
+    }
+    
+    if (!includeSelf && firstLineBox()) {
+        for (InlineRunBox* currBox = firstLineBox(); currBox; currBox = currBox->nextLineBox())
+            left = kMin(left, (int)currBox->xPos());
+    }
+    
+    return left;
+}
 
 int
 RenderBlock::leftBottom()
diff --git a/WebCore/khtml/rendering/render_block.h b/WebCore/khtml/rendering/render_block.h
index 3628045..9e64e18 100644
--- a/WebCore/khtml/rendering/render_block.h
+++ b/WebCore/khtml/rendering/render_block.h
@@ -151,8 +151,9 @@ public:
     inline int rightBottom();
 
     virtual unsigned short lineWidth(int y) const;
-    virtual int lowestPosition(bool includeOverflowInterior=true) const;
-    virtual int rightmostPosition(bool includeOverflowInterior=true) const;
+    virtual int lowestPosition(bool includeOverflowInterior=true, bool includeSelf=true) const;
+    virtual int rightmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const;
+    virtual int leftmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const;
 
     int rightOffset() const;
     int rightRelOffset(int y, int fixedOffset, bool applyTextIndent = true,
diff --git a/WebCore/khtml/rendering/render_box.cpp b/WebCore/khtml/rendering/render_box.cpp
index 55d1366..fd01a38 100644
--- a/WebCore/khtml/rendering/render_box.cpp
+++ b/WebCore/khtml/rendering/render_box.cpp
@@ -108,6 +108,9 @@ void RenderBox::setStyle(RenderStyle *_style)
         m_layer = 0;
     }
 
+    if (m_layer)
+        m_layer->styleChanged();
+    
     // Set the text color if we're the body.
     if (isBody())
         element()->getDocument()->setTextColor(_style->color());
@@ -753,7 +756,7 @@ void RenderBox::calcWidth()
         if (cw && cw != m_width + m_marginLeft + m_marginRight && !isFloating() && !isInline() &&
             !cb->isFlexibleBox())
         {
-            if (style()->direction()==LTR)
+            if (cb->style()->direction()==LTR)
                 m_marginRight = cw - m_width - m_marginLeft;
             else
                 m_marginLeft = cw - m_width - m_marginRight;
@@ -802,7 +805,7 @@ int RenderBox::calcWidthUsing(WidthType widthType, int cw, LengthType& lengthTyp
 
 void RenderBox::calcHorizontalMargins(const Length& ml, const Length& mr, int cw)
 {
-    if (isFloating())
+    if (isFloating() || isInline()) // Inline blocks/tables and floats don't have their margins increased.
     {
         m_marginLeft = ml.minWidth(cw);
         m_marginRight = mr.minWidth(cw);
@@ -1364,14 +1367,19 @@ void RenderBox::calcAbsoluteVertical()
 }
 
 
-int RenderBox::lowestPosition(bool includeOverflowInterior) const
+int RenderBox::lowestPosition(bool includeOverflowInterior, bool includeSelf) const
 {
-    return m_height;
+    return includeSelf ? m_height : 0;
 }
 
-int RenderBox::rightmostPosition(bool includeOverflowInterior) const
+int RenderBox::rightmostPosition(bool includeOverflowInterior, bool includeSelf) const
 {
-    return m_width;
+    return includeSelf ? m_width : 0;
+}
+
+int RenderBox::leftmostPosition(bool includeOverflowInterior, bool includeSelf) const
+{
+    return includeSelf ? 0 : m_width;
 }
 
 #undef DEBUG_LAYOUT
diff --git a/WebCore/khtml/rendering/render_box.h b/WebCore/khtml/rendering/render_box.h
index 3a27639..2c8e891 100644
--- a/WebCore/khtml/rendering/render_box.h
+++ b/WebCore/khtml/rendering/render_box.h
@@ -84,8 +84,9 @@ public:
 
     virtual void position(InlineBox* box, int from, int len, bool reverse);
     
-    virtual int lowestPosition(bool includeOverflowInterior=true) const;
-    virtual int rightmostPosition(bool includeOverflowInterior=true) const;
+    virtual int lowestPosition(bool includeOverflowInterior=true, bool includeSelf=true) const;
+    virtual int rightmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const;
+    virtual int leftmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const;
 
     virtual QRect getAbsoluteRepaintRect();
     virtual void computeAbsoluteRepaintRect(QRect& r, bool f=false);
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index b273f05..fa3cafe 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -268,9 +268,9 @@ QRect RenderFlow::getAbsoluteRepaintRect()
 }
 
 int
-RenderFlow::lowestPosition(bool includeOverflowInterior) const
+RenderFlow::lowestPosition(bool includeOverflowInterior, bool includeSelf) const
 {
-    int bottom = RenderBox::lowestPosition(includeOverflowInterior);
+    int bottom = RenderBox::lowestPosition(includeOverflowInterior, includeSelf);
     if (!includeOverflowInterior && style()->hidesOverflow())
         return bottom;
 
@@ -279,18 +279,18 @@ RenderFlow::lowestPosition(bool includeOverflowInterior) const
     // a tiny rel div buried somewhere deep in our child tree.  In this case we have to get to
     // the abs div.
     for (RenderObject *c = firstChild(); c; c = c->nextSibling()) {
-        if (!c->isFloatingOrPositioned()) {
+        if (!c->isFloatingOrPositioned() && !c->isText()) {
             int lp = c->yPos() + c->lowestPosition(false);
-            bottom = QMAX(bottom, lp);
+            bottom = kMax(bottom, lp);
         }
     }
     
     return bottom;
 }
 
-int RenderFlow::rightmostPosition(bool includeOverflowInterior) const
+int RenderFlow::rightmostPosition(bool includeOverflowInterior, bool includeSelf) const
 {
-    int right = RenderBox::rightmostPosition(includeOverflowInterior);
+    int right = RenderBox::rightmostPosition(includeOverflowInterior, includeSelf);
     if (!includeOverflowInterior && style()->hidesOverflow())
         return right;
 
@@ -299,12 +299,32 @@ int RenderFlow::rightmostPosition(bool includeOverflowInterior) const
     // a tiny rel div buried somewhere deep in our child tree.  In this case we have to get to
     // the abs div.
     for (RenderObject *c = firstChild(); c; c = c->nextSibling()) {
-        if (!c->isFloatingOrPositioned()) {
+        if (!c->isFloatingOrPositioned() && !c->isText()) {
             int rp = c->xPos() + c->rightmostPosition(false);
-            right = QMAX(right, rp);
+            right = kMax(right, rp);
         }
     }
     
     return right;
 }
 
+int RenderFlow::leftmostPosition(bool includeOverflowInterior, bool includeSelf) const
+{
+    int left = RenderBox::leftmostPosition(includeOverflowInterior, includeSelf);
+    if (!includeOverflowInterior && style()->hidesOverflow())
+        return left;
+    
+    // FIXME: Come up with a way to use the layer tree to avoid visiting all the kids.
+    // For now, we have to descend into all the children, since we may have a huge abs div inside
+    // a tiny rel div buried somewhere deep in our child tree.  In this case we have to get to
+    // the abs div.
+    for (RenderObject *c = firstChild(); c; c = c->nextSibling()) {
+        if (!c->isFloatingOrPositioned() && !c->isText()) {
+            int lp = c->xPos() + c->leftmostPosition(false);
+            left = kMin(left, lp);
+        }
+    }
+    
+    return left;
+}
+
diff --git a/WebCore/khtml/rendering/render_flow.h b/WebCore/khtml/rendering/render_flow.h
index 985add1..31265be 100644
--- a/WebCore/khtml/rendering/render_flow.h
+++ b/WebCore/khtml/rendering/render_flow.h
@@ -71,8 +71,9 @@ public:
 
     virtual QRect getAbsoluteRepaintRect();
     
-    virtual int lowestPosition(bool includeOverflowInterior=true) const;
-    virtual int rightmostPosition(bool includeOverflowInterior=true) const;
+    virtual int lowestPosition(bool includeOverflowInterior=true, bool includeSelf=true) const;
+    virtual int rightmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const;
+    virtual int leftmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const;
     
 protected:
     // An inline can be split with blocks occurring in between the inline content.
diff --git a/WebCore/khtml/rendering/render_layer.cpp b/WebCore/khtml/rendering/render_layer.cpp
index fa47d3c..d927b7d 100644
--- a/WebCore/khtml/rendering/render_layer.cpp
+++ b/WebCore/khtml/rendering/render_layer.cpp
@@ -48,6 +48,8 @@
 #include "render_canvas.h"
 #include "render_arena.h"
 #include "xml/dom_docimpl.h"
+#include "misc/htmltags.h"
+#include "html/html_blockimpl.h"
 
 #include <qscrollbar.h>
 #include <qptrvector.h>
@@ -94,7 +96,8 @@ m_vBar( 0 ),
 m_scrollMediator( 0 ),
 m_posZOrderList( 0 ),
 m_negZOrderList( 0 ),
-m_zOrderListsDirty( true )
+m_zOrderListsDirty( true ),
+m_marquee( 0 )
 {
 }
 
@@ -102,12 +105,12 @@ RenderLayer::~RenderLayer()
 {
     // Child layers will be deleted by their corresponding render objects, so
     // our destructor doesn't have to do anything.
-    m_parent = m_previous = m_next = m_first = m_last = 0;
     delete m_hBar;
     delete m_vBar;
     delete m_scrollMediator;
     delete m_posZOrderList;
     delete m_negZOrderList;
+    delete m_marquee;
 }
 
 #ifdef INCREMENTAL_REPAINTING
@@ -147,7 +150,7 @@ void RenderLayer::updateLayerPositions()
         QRect layerBounds = QRect(x,y,width(),height());
         positionScrollbars(layerBounds);
     }
-    
+
     // FIXME: Child object could override visibility.
     if (checkForRepaint && (m_object->style()->visibility() == VISIBLE))
         m_object->repaintAfterLayoutIfNeeded(m_repaintRect, m_fullRepaintRect);
@@ -159,6 +162,10 @@ void RenderLayer::updateLayerPositions()
 #else
         child->updateLayerPositions();
 #endif
+        
+    // With all our children positioned, now update our marquee if we need to.
+    if (m_marquee)
+        m_marquee->updateMarqueePosition();
 }
 
 void RenderLayer::updateLayerPosition()
@@ -421,19 +428,21 @@ RenderLayer::subtractScrollOffset(int& x, int& y)
 }
 
 void
-RenderLayer::scrollToOffset(int x, int y, bool updateScrollbars)
+RenderLayer::scrollToOffset(int x, int y, bool updateScrollbars, bool repaint)
 {
-    if (x < 0) x = 0;
-    if (y < 0) y = 0;
-
-    // Call the scrollWidth/Height functions so that the dimensions will be computed if they need
-    // to be (for overflow:hidden blocks).
-    int maxX = scrollWidth() - m_object->clientWidth();
-    int maxY = scrollHeight() - m_object->clientHeight();
+    if (renderer()->style()->overflow() != OMARQUEE) {
+        if (x < 0) x = 0;
+        if (y < 0) y = 0;
+    
+        // Call the scrollWidth/Height functions so that the dimensions will be computed if they need
+        // to be (for overflow:hidden blocks).
+        int maxX = scrollWidth() - m_object->clientWidth();
+        int maxY = scrollHeight() - m_object->clientHeight();
+        
+        if (x > maxX) x = maxX;
+        if (y > maxY) y = maxY;
+    }
     
-    if (x > maxX) x = maxX;
-    if (y > maxY) y = maxY;
-
     // FIXME: Eventually, we will want to perform a blit.  For now never
     // blit, since the check for blitting is going to be very
     // complicated (since it will involve testing whether our layer
@@ -445,7 +454,8 @@ RenderLayer::scrollToOffset(int x, int y, bool updateScrollbars)
     // FIXME: Fire the onscroll DOM event.
     
     // Just schedule a full repaint of our object.
-    m_object->repaint(true);
+    if (repaint)
+        m_object->repaint(true);
     
     if (updateScrollbars) {
         if (m_hBar)
@@ -583,23 +593,20 @@ int RenderLayer::scrollHeight()
 void RenderLayer::computeScrollDimensions(bool* needHBar, bool* needVBar)
 {
     m_scrollDimensionsDirty = false;
-    int rightPos = m_object->rightmostPosition();
-    int bottomPos = m_object->lowestPosition();
+
+    int rightPos = m_object->rightmostPosition(true, false) - m_object->borderLeft();
+    int bottomPos = m_object->lowestPosition(true, false) - m_object->borderTop();
 
     int clientWidth = m_object->clientWidth();
     int clientHeight = m_object->clientHeight();
-    m_scrollWidth = clientWidth;
-    m_scrollHeight = clientHeight;
 
-    if (rightPos - m_object->borderLeft() > m_scrollWidth)
-        m_scrollWidth = rightPos - m_object->borderLeft();
-    if (bottomPos - m_object->borderTop() > m_scrollHeight)
-        m_scrollHeight = bottomPos - m_object->borderTop();
+    m_scrollWidth = kMax(rightPos, clientWidth);
+    m_scrollHeight = kMax(bottomPos, clientHeight);
 
     if (needHBar)
-        *needHBar = rightPos > m_object->overflowWidth(false);
+        *needHBar = rightPos > clientWidth;
     if (needVBar)
-        *needVBar = bottomPos > m_object->overflowHeight(false);
+        *needVBar = bottomPos > clientHeight;
 }
 
 void
@@ -1179,3 +1186,254 @@ void RenderLayer::collectLayers(QPtrVector<RenderLayer>*& posBuffer, QPtrVector<
             child->collectLayers(posBuffer, negBuffer);
     }
 }
+
+void RenderLayer::styleChanged()
+{
+    if (m_object->style()->overflow() == OMARQUEE && m_object->style()->marqueeBehavior() != MNONE) {
+        if (!m_marquee)
+            m_marquee = new Marquee(this);
+        m_marquee->updateMarqueeStyle();
+    }
+    else if (m_marquee) {
+        delete m_marquee;
+        m_marquee = 0;
+    }
+}
+
+void RenderLayer::stopMarquees()
+{
+    if (m_marquee)
+        m_marquee->stop();
+    
+    for (RenderLayer* curr = firstChild(); curr; curr = curr->nextSibling())
+        curr->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)
+{
+}
+
+int Marquee::marqueeSpeed() const
+{
+    int result = m_layer->renderer()->style()->marqueeSpeed();
+    DOM::NodeImpl* elt = m_layer->renderer()->element();
+    if (elt && elt->id() == ID_MARQUEE) {
+        HTMLMarqueeElementImpl* marqueeElt = static_cast<HTMLMarqueeElementImpl*>(elt);
+        result = kMax(result, marqueeElt->minimumDelay());
+    }
+    return result;
+}
+
+EMarqueeDirection Marquee::direction() const
+{
+    // FIXME: Support the CSS3 "auto" value for determining the direction of the marquee.
+    // For now just map MAUTO to MBACKWARD
+    EMarqueeDirection result = m_layer->renderer()->style()->marqueeDirection();
+    EDirection dir =  m_layer->renderer()->style()->direction();
+    if (result == MAUTO)
+        result = MBACKWARD;
+    if (result == MFORWARD)
+        result = (dir == LTR) ? MRIGHT : MLEFT;
+    if (result == MBACKWARD)
+        result = (dir == LTR) ? MLEFT : MRIGHT;
+    
+    // Now we have the real direction.  Next we check to see if the increment is negative.
+    // If so, then we reverse the direction.
+    Length increment = m_layer->renderer()->style()->marqueeIncrement();
+    if (increment.value < 0)
+        result = static_cast<EMarqueeDirection>(-result);
+    
+    return result;
+}
+
+bool Marquee::isHorizontal() const
+{
+    return direction() == MLEFT || direction() == MRIGHT;
+}
+
+int Marquee::computePosition(EMarqueeDirection dir, bool stopAtContentEdge)
+{
+    RenderObject* o = m_layer->renderer();
+    RenderStyle* s = o->style();
+    if (isHorizontal()) {
+        bool ltr = s->direction() == LTR;
+        int clientWidth = o->clientWidth();
+        int contentWidth = ltr ? o->rightmostPosition(true, false) : o->leftmostPosition(true, false);
+        if (ltr)
+            contentWidth += (o->paddingRight() - o->borderLeft());
+        else {
+            contentWidth = o->width() - contentWidth;
+            contentWidth += (o->paddingLeft() - o->borderRight());
+        }
+        if (dir == MRIGHT) {
+            if (stopAtContentEdge)
+                return kMax(0, ltr ? (contentWidth - clientWidth) : (clientWidth - contentWidth));
+            else
+                return ltr ? contentWidth : clientWidth;
+        }
+        else {
+            if (stopAtContentEdge)
+                return kMin(0, ltr ? (contentWidth - clientWidth) : (clientWidth - contentWidth));
+            else
+                return ltr ? -clientWidth : -contentWidth;
+        }
+    }
+    else {
+        int contentHeight = m_layer->renderer()->lowestPosition(true, false) - 
+                            m_layer->renderer()->borderTop() + m_layer->renderer()->paddingBottom();
+        int clientHeight = m_layer->renderer()->clientHeight();
+        if (dir == MUP) {
+            if (stopAtContentEdge)
+                 return kMin(contentHeight - clientHeight, 0);
+            else
+                return -clientHeight;
+        }
+        else {
+            if (stopAtContentEdge)
+                return kMax(contentHeight - clientHeight, 0);
+            else 
+                return contentHeight;
+        }
+    }    
+}
+
+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);
+
+    m_timerId = startTimer(speed());
+}
+
+void Marquee::stop()
+{
+    m_currentLoop = 0;
+    m_reset = false;
+    
+    if (m_timerId) {
+        killTimer(m_timerId);
+        m_timerId = 0;
+    }
+}
+
+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);
+        start();
+    }
+}
+
+void Marquee::updateMarqueeStyle()
+{
+    RenderStyle* s = m_layer->renderer()->style();
+    
+    m_totalLoops = s->marqueeLoopCount();
+    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)
+            m_totalLoops = 1;
+        
+        // Hack alert: Set the white-space value to nowrap for horizontal marquees with inline children, thus ensuring
+        // all the text ends up on one line by default.  Limit this hack to the <marquee> element to emulate
+        // WinIE's behavior.  Someone using CSS3 can use white-space: nowrap on their own to get this effect.
+        // Second hack alert: Set the text-align back to auto.  WinIE completely ignores text-align on the
+        // marquee element.
+        // FIXME: Bring these up with the CSS WG.
+        if (isHorizontal() && m_layer->renderer()->childrenInline()) {
+            s->setWhiteSpace(NOWRAP);
+            s->setTextAlign(TAAUTO);
+        }
+    }
+    
+    if (speed() != marqueeSpeed()) {
+        m_speed = marqueeSpeed();
+        if (m_timerId) {
+            killTimer(m_timerId);
+            m_timerId = startTimer(speed());
+        }
+    }
+    
+    // Check the loop count to see if we should now stop.
+    bool activate = (m_totalLoops <= 0 || m_currentLoop < m_totalLoops);
+    if (activate && !m_timerId)
+        m_layer->renderer()->setNeedsLayout(true);
+    else if (!activate && m_timerId) {
+        // Destroy the timer.
+        killTimer(m_timerId);
+        m_timerId = 0;
+    }
+}
+
+void Marquee::timerEvent(QTimerEvent* evt)
+{
+    if (m_layer->renderer()->needsLayout())
+        return;
+    
+    if (m_reset) {
+        m_reset = false;
+        if (isHorizontal())
+            m_layer->scrollToXOffset(m_start);
+        else
+            m_layer->scrollToYOffset(m_start);
+        return;
+    }
+    
+    RenderStyle* s = m_layer->renderer()->style();
+    
+    int endPoint = m_end;
+    int range = m_end - m_start;
+    int newPos;
+    if (range == 0)
+        newPos = m_end;
+    else {  
+        bool addIncrement = direction() == MUP || direction() == MLEFT;
+        if (s->marqueeBehavior() == MALTERNATE && m_currentLoop % 2) {
+            // We're going in the reverse direction.
+            endPoint = m_start;
+            range = -range;
+            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);
+        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)
+            m_reset = true;
+    }
+    
+    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 dd652ce..2d3564f 100644
--- a/WebCore/khtml/rendering/render_layer.h
+++ b/WebCore/khtml/rendering/render_layer.h
@@ -77,7 +77,44 @@ public:
 private:
     RenderLayer* m_layer;
 };
+
+// This class handles the auto-scrolling of layers with overflow: marquee.
+class Marquee: public QObject
+{
+    Q_OBJECT
+    
+public:
+    Marquee(RenderLayer* l);
+
+    void timerEvent(QTimerEvent*);
+
+    int speed() const { return m_speed; }
+    int marqueeSpeed() const;
+    EMarqueeDirection direction() const;
+    EMarqueeDirection reverseDirection() const { return static_cast<EMarqueeDirection>(-direction()); }
+    bool isHorizontal() const;
+    EWhiteSpace whiteSpace() { return m_whiteSpace; }
+    
+    int computePosition(EMarqueeDirection dir, bool stopAtClientEdge);
+    
+    void start();
+    void stop();
     
+    void updateMarqueeStyle();
+    void updateMarqueePosition();
+    
+private:
+    RenderLayer* m_layer;
+    int m_currentLoop;
+    int m_totalLoops;
+    int m_timerId;
+    int m_start;
+    int m_end;
+    int m_speed;
+    bool m_reset;
+    EWhiteSpace m_whiteSpace : 2;
+};
+
 class RenderLayer
 {
 public:
@@ -102,6 +139,11 @@ public:
     void removeOnlyThisLayer();
     void insertOnlyThisLayer();
 
+    void styleChanged();
+    
+    Marquee* marquee() const { return m_marquee; }
+    void stopMarquees();
+    
 #if APPLE_CHANGES
     bool isTransparent();
     RenderLayer* transparentAncestor();
@@ -134,7 +176,7 @@ public:
     void subtractScrollOffset(int& x, int& y);
     short scrollXOffset() { return m_scrollX; }
     int scrollYOffset() { return m_scrollY; }
-    void scrollToOffset(int x, int y, bool updateScrollbars = true);
+    void scrollToOffset(int x, int y, bool updateScrollbars = true, bool repaint = true);
     void scrollToXOffset(int x) { scrollToOffset(x, m_scrollY); }
     void scrollToYOffset(int y) { scrollToOffset(m_scrollX, y); }
     void setHasHorizontalScrollbar(bool hasScrollbar);
@@ -278,6 +320,8 @@ protected:
     QPtrVector<RenderLayer>* m_posZOrderList;
     QPtrVector<RenderLayer>* m_negZOrderList;
     bool m_zOrderListsDirty;
+    
+    Marquee* m_marquee; // Used by layers with overflow:marquee
 };
 
 }; // namespace
diff --git a/WebCore/khtml/rendering/render_object.cpp b/WebCore/khtml/rendering/render_object.cpp
index d0f82da..5a1c18c 100644
--- a/WebCore/khtml/rendering/render_object.cpp
+++ b/WebCore/khtml/rendering/render_object.cpp
@@ -170,6 +170,11 @@ bool RenderObject::isBody() const
     return element() && element()->renderer() == this && element()->id() == ID_BODY;
 }
 
+bool RenderObject::isHTMLMarquee() const
+{
+    return element() && element()->renderer() == this && element()->id() == ID_MARQUEE;
+}
+
 bool RenderObject::canHaveChildren() const
 {
     return false;
@@ -560,10 +565,21 @@ int RenderObject::containingBlockHeight() const
 
 bool RenderObject::sizesToMaxWidth() const
 {
-    if (isFloating() || isCompact() || isInlineBlockOrInlineTable() ||
+    // Marquees in WinIE are like a mixture of blocks and inline-blocks.  They size as though they're blocks,
+    // but they allow text to sit on the same line as the marquee.
+    if (isFloating() || isCompact() || 
+        (isInlineBlockOrInlineTable() && !isHTMLMarquee()) ||
         (element() && (element()->id() == ID_BUTTON || element()->id() == ID_LEGEND)))
         return true;
-
+    
+    // Children of a horizontal marquee do not fill the container by default.
+    // FIXME: Need to deal with MAUTO value properly.  It could be vertical.
+    if (parent()->style()->overflow() == OMARQUEE) {
+        EMarqueeDirection dir = parent()->style()->marqueeDirection();
+        if (dir == MAUTO || dir == MFORWARD || dir == MBACKWARD || dir == MLEFT || dir == MRIGHT)
+            return true;
+    }
+    
     // Flexible horizontal boxes lay out children at their maxwidths.  Also vertical boxes
     // that don't stretch their kids lay out their children at their maxwidths.
     if (parent()->isFlexibleBox() &&
diff --git a/WebCore/khtml/rendering/render_object.h b/WebCore/khtml/rendering/render_object.h
index e48effc..19e59cd 100644
--- a/WebCore/khtml/rendering/render_object.h
+++ b/WebCore/khtml/rendering/render_object.h
@@ -235,6 +235,8 @@ public:
     virtual bool isFrameSet() const { return false; }
     virtual bool isApplet() const { return false; }
 
+    bool isHTMLMarquee() const;
+    
     bool isAnonymous() const { return m_isAnonymous; }
     void setIsAnonymous(bool b) { m_isAnonymous = b; }
     
@@ -639,13 +641,10 @@ public:
 
     virtual void cursorPos(int /*offset*/, int &/*_x*/, int &/*_y*/, int &/*height*/);
 
-    virtual int lowestPosition(bool includeOverflowInterior=true) const {return 0;}
-
-    virtual int rightmostPosition(bool includeOverflowInterior=true) const {return 0;}
-
-    // recursively invalidate current layout
-    // unused: void invalidateLayout();
-
+    virtual int lowestPosition(bool includeOverflowInterior=true, bool includeSelf=true) const { return 0; }
+    virtual int rightmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const { return 0; }
+    virtual int leftmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const { return 0; }
+    
     virtual void calcVerticalMargins() {}
     void removeFromObjectLists();
 
diff --git a/WebCore/khtml/rendering/render_style.cpp b/WebCore/khtml/rendering/render_style.cpp
index f8fcb99..539e304 100644
--- a/WebCore/khtml/rendering/render_style.cpp
+++ b/WebCore/khtml/rendering/render_style.cpp
@@ -129,6 +129,22 @@ bool StyleBackgroundData::operator==(const StyleBackgroundData& o) const
 	outline == o.outline;
 }
 
+StyleMarqueeData::StyleMarqueeData()
+{
+    increment.type = Fixed;
+    increment.value = 6; // 6 pixels is the WinIE default.
+    speed = 85; // 85msec is the WinIE default.
+    direction = MAUTO; // Direction is auto-determined by overflow by default.
+    behavior = MSCROLL; // Scrolling marquee is the default.
+    loops = -1; // Loop forever by default. Matches WinIE.
+}
+
+bool StyleMarqueeData::operator==(const StyleMarqueeData& o) const
+{
+    return (increment == o.increment && speed == o.speed && direction == o.direction &&
+            behavior == o.behavior && loops == o.loops);
+}
+
 StyleFlexibleBoxData::StyleFlexibleBoxData()
 : Shared<StyleFlexibleBoxData>()
 {
@@ -166,17 +182,16 @@ bool StyleFlexibleBoxData::operator==(const StyleFlexibleBoxData& o) const
 StyleCSS3NonInheritedData::StyleCSS3NonInheritedData()
 :Shared<StyleCSS3NonInheritedData>(), opacity(1.0f)
 {
-    
 }
 
 StyleCSS3NonInheritedData::StyleCSS3NonInheritedData(const StyleCSS3NonInheritedData& o)
-:Shared<StyleCSS3NonInheritedData>(), opacity(o.opacity), flexibleBox(o.flexibleBox)
+:Shared<StyleCSS3NonInheritedData>(), opacity(o.opacity), flexibleBox(o.flexibleBox), marquee(o.marquee)
 {
 }
 
 bool StyleCSS3NonInheritedData::operator==(const StyleCSS3NonInheritedData& o) const
 {
-    return opacity == o.opacity && flexibleBox == o.flexibleBox;
+    return opacity == o.opacity && flexibleBox == o.flexibleBox && marquee == o.marquee;
 }
 
 StyleCSS3InheritedData::StyleCSS3InheritedData()
@@ -273,6 +288,7 @@ RenderStyle::RenderStyle(bool)
     surround.init();
     css3NonInheritedData.init();
     css3NonInheritedData.access()->flexibleBox.init();
+    css3NonInheritedData.access()->marquee.init();
     css3InheritedData.init();
     inherited.init();
 
diff --git a/WebCore/khtml/rendering/render_style.h b/WebCore/khtml/rendering/render_style.h
index 4796fa6..6e7969e 100644
--- a/WebCore/khtml/rendering/render_style.h
+++ b/WebCore/khtml/rendering/render_style.h
@@ -323,7 +323,7 @@ public:
 // Random visual rendering model attributes. Not inherited.
 
 enum EOverflow {
-    OVISIBLE, OHIDDEN, OSCROLL, OAUTO
+    OVISIBLE, OHIDDEN, OSCROLL, OAUTO, OMARQUEE
 };
 
 enum EVerticalAlign {
@@ -404,6 +404,31 @@ public:
 };
 
 //------------------------------------------------
+// CSS3 Marquee Properties
+
+enum EMarqueeBehavior { MNONE, MSCROLL, MSLIDE, MALTERNATE };
+enum EMarqueeDirection { MAUTO = 0, MLEFT = 1, MRIGHT = -1, MUP = 2, MDOWN = -2, MFORWARD = 3, MBACKWARD = -3 };
+
+class StyleMarqueeData : public Shared<StyleMarqueeData>
+{
+public:
+    StyleMarqueeData();
+    
+    bool operator==(const StyleMarqueeData& o) const;
+    bool operator!=(const StyleMarqueeData& o) const {
+        return !(*this == o);
+    }
+    
+    Length increment;
+    int speed;
+    
+    int loops; // -1 means infinite.
+    
+    EMarqueeBehavior behavior : 2;
+    EMarqueeDirection direction : 3;
+};
+    
+//------------------------------------------------
 // CSS3 Flexible Box Properties
 
 enum EBoxAlignment { BSTRETCH, BSTART, BCENTER, BEND, BJUSTIFY, BBASELINE };
@@ -471,6 +496,7 @@ public:
     
     float opacity;         // Whether or not we're transparent.
     DataRef<StyleFlexibleBoxData> flexibleBox; // Flexible box properties 
+    DataRef<StyleMarqueeData> marquee; // Marquee properties
 };
 
 // This struct is for rarely used inherited CSS3 properties.  By grouping them together,
@@ -949,6 +975,11 @@ public:
     EBoxOrient boxOrient() { return css3NonInheritedData->flexibleBox->orient; }
     EBoxAlignment boxPack() { return css3NonInheritedData->flexibleBox->pack; }
     int boxFlexedHeight() { return css3NonInheritedData->flexibleBox->flexed_height; }
+    Length marqueeIncrement() { return css3NonInheritedData->marquee->increment; }
+    int marqueeSpeed() { return css3NonInheritedData->marquee->speed; }
+    int marqueeLoopCount() { return css3NonInheritedData->marquee->loops; }
+    EMarqueeBehavior marqueeBehavior() { return css3NonInheritedData->marquee->behavior; }
+    EMarqueeDirection marqueeDirection() { return css3NonInheritedData->marquee->direction; }
     // End CSS3 Getters
 
 // attribute setter methods
@@ -1106,6 +1137,11 @@ public:
     void setBoxOrient(EBoxOrient o) { SET_VAR(css3NonInheritedData.access()->flexibleBox, orient, o); }
     void setBoxPack(EBoxAlignment p) { SET_VAR(css3NonInheritedData.access()->flexibleBox, pack, p); }
     void setBoxFlexedHeight(int h) { SET_VAR(css3NonInheritedData.access()->flexibleBox, flexed_height, h); }
+    void setMarqueeIncrement(const Length& f) { SET_VAR(css3NonInheritedData.access()->marquee, increment, f); }
+    void setMarqueeSpeed(int f) { SET_VAR(css3NonInheritedData.access()->marquee, speed, f); }
+    void setMarqueeDirection(EMarqueeDirection d) { SET_VAR(css3NonInheritedData.access()->marquee, direction, d); }
+    void setMarqueeBehavior(EMarqueeBehavior b) { SET_VAR(css3NonInheritedData.access()->marquee, behavior, b); }
+    void setMarqueeLoopCount(int i) { SET_VAR(css3NonInheritedData.access()->marquee, loops, i); }
     // End CSS3 Setters
     
     QPalette palette() const { return visual->palette; }
diff --git a/WebCore/khtml/xml/dom_docimpl.cpp b/WebCore/khtml/xml/dom_docimpl.cpp
index 5b53c2a..b8d26b6 100644
--- a/WebCore/khtml/xml/dom_docimpl.cpp
+++ b/WebCore/khtml/xml/dom_docimpl.cpp
@@ -850,6 +850,10 @@ ElementImpl *DocumentImpl::createHTMLElement( const DOMString &name )
         n = new HTMLGenericElementImpl(docPtr(), id);
         break;
 
+    case ID_MARQUEE:
+        n = new HTMLMarqueeElementImpl(docPtr());
+        break;
+        
     case ID_BDO:
         break;
 
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 1ff2472..8ed426c 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -1726,8 +1726,14 @@ void KWQKHTMLPart::khtmlMouseReleaseEvent(MouseReleaseEvent *event)
 
 void KWQKHTMLPart::clearTimers(KHTMLView *view)
 {
-    if (view)
+    if (view) {
         view->unscheduleRelayout();
+        if (view->part()) {
+            DocumentImpl* document = view->part()->xmlDocImpl();
+            if (document && document->renderer() && document->renderer()->layer())
+                document->renderer()->layer()->stopMarquees();
+        }
+    }
 }
 
 void KWQKHTMLPart::clearTimers()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list