[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

trey trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:45:31 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit c5d829021414a9091ac849d7572bb057c3fade81
Author: trey <trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jun 14 20:58:21 2004 +0000

    WebCore:
    
    	Support for DHTML cut/copy/paste.  We now support oncut, oncopy, onpaste.  The events
    	are sent to the first node in the selection, or else the body.  Current holes are
    	that we do not send events for operations in text fields or text areas (because it
    	is hard to get the right hooks into the AppKit).
    
    	We also send onbeforecut, onbeforecopy, onbeforepaste before the other events, which
    	isn't really WinIE compatible, but is close.  WinIE uses these to enable cut/paste
    	menu items in its UI.  DB doesn't need this for now.
    
            Reviewed by NOBODY (OOPS!).
    
            * khtml/ecma/kjs_dom.cpp:
            (DOMNode::getValueProperty):  Boilerplate for new events
            (DOMNode::putValue):    Boilerplate for new events
            * khtml/ecma/kjs_dom.h:
            (KJS::DOMNode::):    Boilerplate for new events
            * khtml/ecma/kjs_dom.lut.h:
            * khtml/ecma/kjs_events.cpp:
            (DOMEvent::DOMEvent): "dataTransfer" and "clipboardData" properties are conditionally
    	defined on DOMEvent, depending on if the event is a dragging or clipboard event.
            (DOMMouseEvent::mark):  Pass mark along to any clipboard object we have.
            (DOMEvent::getValueProperty):  Return "dataTransfer" or "clipboardData".
            (DOMMouseEvent::getValueProperty):  Returning "dataTransfer" now handled by
    	the superclass.
            * khtml/ecma/kjs_events.h:
            (KJS::DOMEvent::):
            (KJS::DOMMouseEvent::DOMMouseEvent):
            (KJS::DOMMouseEvent::):
            (KJS::DOMMouseEvent::toMouseEvent):
            * khtml/ecma/kjs_events.lut.h:
            * khtml/html/html_elementimpl.cpp:
            (HTMLElementImpl::parseHTMLAttribute):  Boilerplate for new events
            * khtml/misc/htmlattrs.c:
            * khtml/misc/htmlattrs.h:
            * khtml/misc/htmlattrs.in:  Boilerplate for new events
            * khtml/xml/dom2_eventsimpl.cpp:
            (EventImpl::typeToId):  Boilerplate for new events
            (EventImpl::idToType):  Boilerplate for new events
            (EventImpl::isDragEvent):  New utility
            (EventImpl::isClipboardEvent):  New utility
            (MouseEventImpl::isDragEvent):  New utility
            (ClipboardEventImpl::ClipboardEventImpl):  ref optional clipboard
            (ClipboardEventImpl::~ClipboardEventImpl):  deref optional clipboard
            (ClipboardEventImpl::isClipboardEvent):  New utility
            * khtml/xml/dom2_eventsimpl.h:
            (DOM::EventImpl::):  Boilerplate for new events
            (DOM::ClipboardEventImpl::clipboard):
            * kwq/KWQClipboard.h:  Monkey business so this file is includable in C++.
            * kwq/KWQClipboard.mm:
            * kwq/KWQKHTMLPart.h:
            * kwq/KWQKHTMLPart.mm:
            (KWQKHTMLPart::dispatchCPPEvent):  Send one of the new events.
            (KWQKHTMLPart::tryCut):  Declare pasteboard types, send cut events.
            (KWQKHTMLPart::tryCopy):  Declare pasteboard types, send copy events.
            (KWQKHTMLPart::tryPaste):  Send paste events.
            * kwq/WebCoreBridge.h:
            * kwq/WebCoreBridge.mm:
            (-[WebCoreBridge tryDHTMLCut]):  Pass through to part
            (-[WebCoreBridge tryDHTMLCopy]):  Ditto
            (-[WebCoreBridge tryDHTMLPaste]):  Ditto
    
    WebKit:
    
    	Support for DHTML cut/copy/paste.
    
            Reviewed by NOBODY (OOPS!).
    
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView copy:]):  Give DHTML first crack at executing the command.
            (-[WebHTMLView cut:]):  Ditto
            (-[WebHTMLView paste:]):  Ditto
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6830 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5342382..a1ee56f 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,66 @@
+2004-06-13  Trey Matteson  <trey at apple.com>
+
+	Support for DHTML cut/copy/paste.  We now support oncut, oncopy, onpaste.  The events
+	are sent to the first node in the selection, or else the body.  Current holes are
+	that we do not send events for operations in text fields or text areas (because it
+	is hard to get the right hooks into the AppKit).
+
+	We also send onbeforecut, onbeforecopy, onbeforepaste before the other events, which
+	isn't really WinIE compatible, but is close.  WinIE uses these to enable cut/paste
+	menu items in its UI.  DB doesn't need this for now.
+
+        Reviewed by NOBODY (OOPS!).
+
+        * khtml/ecma/kjs_dom.cpp:
+        (DOMNode::getValueProperty):  Boilerplate for new events
+        (DOMNode::putValue):    Boilerplate for new events
+        * khtml/ecma/kjs_dom.h:
+        (KJS::DOMNode::):    Boilerplate for new events
+        * khtml/ecma/kjs_dom.lut.h:
+        * khtml/ecma/kjs_events.cpp:
+        (DOMEvent::DOMEvent): "dataTransfer" and "clipboardData" properties are conditionally
+	defined on DOMEvent, depending on if the event is a dragging or clipboard event.
+        (DOMMouseEvent::mark):  Pass mark along to any clipboard object we have.
+        (DOMEvent::getValueProperty):  Return "dataTransfer" or "clipboardData".
+        (DOMMouseEvent::getValueProperty):  Returning "dataTransfer" now handled by
+	the superclass.
+        * khtml/ecma/kjs_events.h:
+        (KJS::DOMEvent::):
+        (KJS::DOMMouseEvent::DOMMouseEvent):
+        (KJS::DOMMouseEvent::):
+        (KJS::DOMMouseEvent::toMouseEvent):
+        * khtml/ecma/kjs_events.lut.h:
+        * khtml/html/html_elementimpl.cpp:
+        (HTMLElementImpl::parseHTMLAttribute):  Boilerplate for new events
+        * khtml/misc/htmlattrs.c:
+        * khtml/misc/htmlattrs.h:
+        * khtml/misc/htmlattrs.in:  Boilerplate for new events
+        * khtml/xml/dom2_eventsimpl.cpp:
+        (EventImpl::typeToId):  Boilerplate for new events
+        (EventImpl::idToType):  Boilerplate for new events
+        (EventImpl::isDragEvent):  New utility
+        (EventImpl::isClipboardEvent):  New utility
+        (MouseEventImpl::isDragEvent):  New utility
+        (ClipboardEventImpl::ClipboardEventImpl):  ref optional clipboard
+        (ClipboardEventImpl::~ClipboardEventImpl):  deref optional clipboard
+        (ClipboardEventImpl::isClipboardEvent):  New utility
+        * khtml/xml/dom2_eventsimpl.h:
+        (DOM::EventImpl::):  Boilerplate for new events
+        (DOM::ClipboardEventImpl::clipboard):
+        * kwq/KWQClipboard.h:  Monkey business so this file is includable in C++.
+        * kwq/KWQClipboard.mm:
+        * kwq/KWQKHTMLPart.h:
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::dispatchCPPEvent):  Send one of the new events.
+        (KWQKHTMLPart::tryCut):  Declare pasteboard types, send cut events.
+        (KWQKHTMLPart::tryCopy):  Declare pasteboard types, send copy events.
+        (KWQKHTMLPart::tryPaste):  Send paste events.
+        * kwq/WebCoreBridge.h:
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge tryDHTMLCut]):  Pass through to part
+        (-[WebCoreBridge tryDHTMLCopy]):  Ditto
+        (-[WebCoreBridge tryDHTMLPaste]):  Ditto
+
 2004-06-14  Trey Matteson  <trey at apple.com>
 
 	A new CSS pseudo-class ".drag" is added.  Analogous to the "hover" class,
diff --git a/WebCore/khtml/ecma/kjs_dom.cpp b/WebCore/khtml/ecma/kjs_dom.cpp
index 4e07438..02b7ad9 100644
--- a/WebCore/khtml/ecma/kjs_dom.cpp
+++ b/WebCore/khtml/ecma/kjs_dom.cpp
@@ -94,7 +94,7 @@ bool DOMNode::toBoolean(ExecState *) const
 }
 
 /* Source for DOMNodeTable. Use "make hashtables" to regenerate.
- at begin DOMNodeTable 60
+ at begin DOMNodeTable 66
   nodeName	DOMNode::NodeName	DontDelete|ReadOnly
   nodeValue	DOMNode::NodeValue	DontDelete
   nodeType	DOMNode::NodeType	DontDelete|ReadOnly
@@ -118,6 +118,12 @@ bool DOMNode::toBoolean(ExecState *) const
   onclick	DOMNode::OnClick		DontDelete
   oncontextmenu	DOMNode::OnContextMenu		DontDelete
   ondblclick	DOMNode::OnDblClick		DontDelete
+  onbeforecut	DOMNode::OnBeforeCut		DontDelete
+  oncut         DOMNode::OnCut                  DontDelete
+  onbeforecopy	DOMNode::OnBeforeCopy		DontDelete
+  oncopy	DOMNode::OnCopy                 DontDelete
+  onbeforepaste	DOMNode::OnBeforePaste		DontDelete
+  onpaste	DOMNode::OnPaste		DontDelete
   ondrag	DOMNode::OnDrag			DontDelete
   ondragdrop	DOMNode::OnDragDrop		DontDelete
   ondragend	DOMNode::OnDragEnd		DontDelete
@@ -238,7 +244,19 @@ Value DOMNode::getValueProperty(ExecState *exec, int token) const
   case OnMouseOver:
     return getListener(DOM::EventImpl::MOUSEOVER_EVENT);
   case OnMouseUp:
-    return getListener(DOM::EventImpl::MOUSEUP_EVENT);
+    return getListener(DOM::EventImpl::MOUSEUP_EVENT);      
+  case OnBeforeCut:
+    return getListener(DOM::EventImpl::BEFORECUT_EVENT);
+  case OnCut:
+    return getListener(DOM::EventImpl::CUT_EVENT);
+  case OnBeforeCopy:
+    return getListener(DOM::EventImpl::BEFORECOPY_EVENT);
+  case OnCopy:
+    return getListener(DOM::EventImpl::COPY_EVENT);
+  case OnBeforePaste:
+    return getListener(DOM::EventImpl::BEFOREPASTE_EVENT);
+  case OnPaste:
+    return getListener(DOM::EventImpl::PASTE_EVENT);
   case OnDragEnter:
     return getListener(DOM::EventImpl::DRAGENTER_EVENT);
   case OnDragOver:
@@ -391,6 +409,24 @@ void DOMNode::putValue(ExecState *exec, int token, const Value& value, int /*att
   case OnMouseUp:
     setListener(exec,DOM::EventImpl::MOUSEUP_EVENT,value);
     break;
+  case OnBeforeCut:
+    setListener(exec,DOM::EventImpl::BEFORECUT_EVENT,value);
+    break;
+  case OnCut:
+    setListener(exec,DOM::EventImpl::CUT_EVENT,value);
+    break;
+  case OnBeforeCopy:
+    setListener(exec,DOM::EventImpl::BEFORECOPY_EVENT,value);
+    break;
+  case OnCopy:
+    setListener(exec,DOM::EventImpl::COPY_EVENT,value);
+    break;
+  case OnBeforePaste:
+    setListener(exec,DOM::EventImpl::BEFOREPASTE_EVENT,value);
+    break;
+  case OnPaste:
+    setListener(exec,DOM::EventImpl::PASTE_EVENT,value);
+    break;
   case OnDragEnter:
     setListener(exec,DOM::EventImpl::DRAGENTER_EVENT,value);
     break;
diff --git a/WebCore/khtml/ecma/kjs_dom.h b/WebCore/khtml/ecma/kjs_dom.h
index 56ee05c..0572dde 100644
--- a/WebCore/khtml/ecma/kjs_dom.h
+++ b/WebCore/khtml/ecma/kjs_dom.h
@@ -61,6 +61,7 @@ namespace KJS {
            DispatchEvent, Contains,
            OnAbort, OnBlur, OnChange, OnClick, OnContextMenu, OnDblClick, OnDragDrop, OnError,
            OnDragEnter, OnDragOver, OnDragLeave, OnDrop, OnDragStart, OnDrag, OnDragEnd,
+           OnBeforeCut, OnCut, OnBeforeCopy, OnCopy, OnBeforePaste, OnPaste,
            OnFocus, OnInput, OnKeyDown, OnKeyPress, OnKeyUp, OnLoad, OnMouseDown,
            OnMouseMove, OnMouseOut, OnMouseOver, OnMouseUp, OnMove, OnReset,
            OnResize, OnScroll, OnSearch, OnSelect, OnSubmit, OnUnload,
diff --git a/WebCore/khtml/ecma/kjs_dom.lut.h b/WebCore/khtml/ecma/kjs_dom.lut.h
index 0eb99af..6621342 100644
--- a/WebCore/khtml/ecma/kjs_dom.lut.h
+++ b/WebCore/khtml/ecma/kjs_dom.lut.h
@@ -29,88 +29,99 @@ const struct HashTable DOMNodeProtoTable = { 2, 17, DOMNodeProtoTableEntries, 13
 namespace KJS {
 
 const struct HashEntry DOMNodeTableEntries[] = {
-   { "nodeType", DOMNode::NodeType, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[71] },
-   { "childNodes", DOMNode::ChildNodes, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[67] },
-   { "scrollTop", DOMNode::ScrollTop, DontDelete, 0, 0 },
+   { "ownerDocument", DOMNode::OwnerDocument, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[73] },
+   { 0, 0, 0, 0, 0 },
+   { "scrollHeight", DOMNode::ScrollHeight, DontDelete|ReadOnly, 0, 0 },
+   { "onbeforepaste", DOMNode::OnBeforePaste, DontDelete, 0, &DOMNodeTableEntries[81] },
+   { "oncopy", DOMNode::OnCopy, DontDelete, 0, 0 },
+   { "ondragstart", DOMNode::OnDragStart, DontDelete, 0, 0 },
+   { "onunload", DOMNode::OnUnload, DontDelete, 0, 0 },
+   { "nodeValue", DOMNode::NodeValue, DontDelete, 0, 0 },
+   { 0, 0, 0, 0, 0 },
    { 0, 0, 0, 0, 0 },
    { 0, 0, 0, 0, 0 },
    { "offsetParent", DOMNode::OffsetParent, DontDelete|ReadOnly, 0, 0 },
-   { "ownerDocument", DOMNode::OwnerDocument, DontDelete|ReadOnly, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "localName", DOMNode::LocalName, DontDelete|ReadOnly, 0, 0 },
+   { "onclick", DOMNode::OnClick, DontDelete, 0, &DOMNodeTableEntries[77] },
    { 0, 0, 0, 0, 0 },
+   { "nodeName", DOMNode::NodeName, DontDelete|ReadOnly, 0, 0 },
+   { "ondragdrop", DOMNode::OnDragDrop, DontDelete, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "onsearch", DOMNode::OnSearch, DontDelete, 0, &DOMNodeTableEntries[76] },
+   { "onscroll", DOMNode::OnScroll, DontDelete, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "onmousemove", DOMNode::OnMouseMove, DontDelete, 0, 0 },
-   { "onmousedown", DOMNode::OnMouseDown, DontDelete, 0, 0 },
-   { "attributes", DOMNode::Attributes, DontDelete|ReadOnly, 0, 0 },
-   { "firstChild", DOMNode::FirstChild, DontDelete|ReadOnly, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "onmouseover", DOMNode::OnMouseOver, DontDelete, 0, 0 },
-   { "nextSibling", DOMNode::NextSibling, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[61] },
-   { "parentNode", DOMNode::ParentNode, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[60] },
-   { "onselect", DOMNode::OnSelect, DontDelete, 0, 0 },
-   { "offsetLeft", DOMNode::OffsetLeft, DontDelete|ReadOnly, 0, 0 },
+   { "previousSibling", DOMNode::PreviousSibling, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[79] },
+   { "ondragend", DOMNode::OnDragEnd, DontDelete, 0, 0 },
+   { "ondragover", DOMNode::OnDragOver, DontDelete, 0, &DOMNodeTableEntries[82] },
    { 0, 0, 0, 0, 0 },
-   { "onunload", DOMNode::OnUnload, DontDelete, 0, 0 },
-   { "ondblclick", DOMNode::OnDblClick, DontDelete, 0, 0 },
+   { "oncut", DOMNode::OnCut, DontDelete, 0, &DOMNodeTableEntries[75] },
+   { "onmousedown", DOMNode::OnMouseDown, DontDelete, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "nodeName", DOMNode::NodeName, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[68] },
    { 0, 0, 0, 0, 0 },
+   { "clientWidth", DOMNode::ClientWidth, DontDelete|ReadOnly, 0, 0 },
+   { "onmouseover", DOMNode::OnMouseOver, DontDelete, 0, &DOMNodeTableEntries[83] },
+   { "childNodes", DOMNode::ChildNodes, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[67] },
    { 0, 0, 0, 0, 0 },
-   { "onkeydown", DOMNode::OnKeyDown, DontDelete, 0, &DOMNodeTableEntries[77] },
-   { "nodeValue", DOMNode::NodeValue, DontDelete, 0, 0 },
    { 0, 0, 0, 0, 0 },
    { 0, 0, 0, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "ondrag", DOMNode::OnDrag, DontDelete, 0, 0 },
-   { "onscroll", DOMNode::OnScroll, DontDelete, 0, 0 },
-   { "onabort", DOMNode::OnAbort, DontDelete, 0, &DOMNodeTableEntries[62] },
-   { "onmouseout", DOMNode::OnMouseOut, DontDelete, 0, 0 },
-   { "onresize", DOMNode::OnResize, DontDelete, 0, 0 },
-   { "clientHeight", DOMNode::ClientHeight, DontDelete|ReadOnly, 0, 0 },
-   { "namespaceURI", DOMNode::NamespaceURI, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[72] },
+   { "onpaste", DOMNode::OnPaste, DontDelete, 0, 0 },
+   { "nextSibling", DOMNode::NextSibling, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[68] },
+   { "ondragleave", DOMNode::OnDragLeave, DontDelete, 0, &DOMNodeTableEntries[88] },
+   { "attributes", DOMNode::Attributes, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[71] },
    { 0, 0, 0, 0, 0 },
-   { "onmouseup", DOMNode::OnMouseUp, DontDelete, 0, 0 },
+   { "ondrag", DOMNode::OnDrag, DontDelete, 0, 0 },
+   { "onreset", DOMNode::OnReset, DontDelete, 0, 0 },
+   { "onchange", DOMNode::OnChange, DontDelete, 0, &DOMNodeTableEntries[74] },
    { "parentElement", DOMNode::ParentElement, DontDelete|ReadOnly, 0, 0 },
-   { "previousSibling", DOMNode::PreviousSibling, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[66] },
-   { "ondragend", DOMNode::OnDragEnd, DontDelete, 0, 0 },
+   { "oncontextmenu", DOMNode::OnContextMenu, DontDelete, 0, &DOMNodeTableEntries[89] },
+   { "firstChild", DOMNode::FirstChild, DontDelete|ReadOnly, 0, 0 },
+   { 0, 0, 0, 0, 0 },
+   { "nodeType", DOMNode::NodeType, DontDelete|ReadOnly, 0, 0 },
+   { "onerror", DOMNode::OnError, DontDelete, 0, 0 },
+   { "parentNode", DOMNode::ParentNode, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[66] },
+   { "onkeypress", DOMNode::OnKeyPress, DontDelete, 0, 0 },
+   { "offsetLeft", DOMNode::OffsetLeft, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[86] },
+   { "onkeyup", DOMNode::OnKeyUp, DontDelete, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "onreset", DOMNode::OnReset, DontDelete, 0, &DOMNodeTableEntries[75] },
+   { "ondblclick", DOMNode::OnDblClick, DontDelete, 0, &DOMNodeTableEntries[69] },
    { 0, 0, 0, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "oncontextmenu", DOMNode::OnContextMenu, DontDelete, 0, 0 },
-   { "ondragdrop", DOMNode::OnDragDrop, DontDelete, 0, 0 },
-   { "ondragstart", DOMNode::OnDragStart, DontDelete, 0, 0 },
-   { "prefix", DOMNode::Prefix, DontDelete, 0, &DOMNodeTableEntries[73] },
-   { "onchange", DOMNode::OnChange, DontDelete, 0, &DOMNodeTableEntries[65] },
-   { "scrollHeight", DOMNode::ScrollHeight, DontDelete|ReadOnly, 0, 0 },
+   { "onbeforecut", DOMNode::OnBeforeCut, DontDelete, 0, 0 },
+   { "namespaceURI", DOMNode::NamespaceURI, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[80] },
+   { "prefix", DOMNode::Prefix, DontDelete, 0, &DOMNodeTableEntries[85] },
+   { 0, 0, 0, 0, 0 },
+   { "lastChild", DOMNode::LastChild, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[76] },
    { 0, 0, 0, 0, 0 },
-   { "onblur", DOMNode::OnBlur, DontDelete, 0, &DOMNodeTableEntries[64] },
-   { "ondragover", DOMNode::OnDragOver, DontDelete, 0, &DOMNodeTableEntries[69] },
-   { "lastChild", DOMNode::LastChild, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[63] },
-   { "onclick", DOMNode::OnClick, DontDelete, 0, &DOMNodeTableEntries[74] },
-   { "ondragenter", DOMNode::OnDragEnter, DontDelete, 0, &DOMNodeTableEntries[70] },
-   { "ondragleave", DOMNode::OnDragLeave, DontDelete, 0, 0 },
+   { "onblur", DOMNode::OnBlur, DontDelete, 0, &DOMNodeTableEntries[70] },
+   { 0, 0, 0, 0, 0 },
+   { "localName", DOMNode::LocalName, DontDelete|ReadOnly, 0, 0 },
+   { "onabort", DOMNode::OnAbort, DontDelete, 0, 0 },
+   { "onbeforecopy", DOMNode::OnBeforeCopy, DontDelete, 0, &DOMNodeTableEntries[84] },
+   { "ondragenter", DOMNode::OnDragEnter, DontDelete, 0, &DOMNodeTableEntries[72] },
    { "ondrop", DOMNode::OnDrop, DontDelete, 0, 0 },
-   { "onerror", DOMNode::OnError, DontDelete, 0, 0 },
    { "onfocus", DOMNode::OnFocus, DontDelete, 0, 0 },
    { "oninput", DOMNode::OnInput, DontDelete, 0, 0 },
-   { "onkeypress", DOMNode::OnKeyPress, DontDelete, 0, &DOMNodeTableEntries[78] },
-   { "onkeyup", DOMNode::OnKeyUp, DontDelete, 0, 0 },
+   { "onkeydown", DOMNode::OnKeyDown, DontDelete, 0, &DOMNodeTableEntries[78] },
    { "onload", DOMNode::OnLoad, DontDelete, 0, 0 },
+   { "onmousemove", DOMNode::OnMouseMove, DontDelete, 0, 0 },
+   { "onmouseout", DOMNode::OnMouseOut, DontDelete, 0, 0 },
+   { "onmouseup", DOMNode::OnMouseUp, DontDelete, 0, 0 },
    { "onmove", DOMNode::OnMove, DontDelete, 0, 0 },
+   { "onresize", DOMNode::OnResize, DontDelete, 0, 0 },
+   { "onsearch", DOMNode::OnSearch, DontDelete, 0, 0 },
+   { "onselect", DOMNode::OnSelect, DontDelete, 0, 0 },
    { "onsubmit", DOMNode::OnSubmit, DontDelete, 0, 0 },
    { "offsetTop", DOMNode::OffsetTop, DontDelete|ReadOnly, 0, 0 },
    { "offsetWidth", DOMNode::OffsetWidth, DontDelete|ReadOnly, 0, 0 },
-   { "offsetHeight", DOMNode::OffsetHeight, DontDelete|ReadOnly, 0, 0 },
-   { "clientWidth", DOMNode::ClientWidth, DontDelete|ReadOnly, 0, 0 },
+   { "offsetHeight", DOMNode::OffsetHeight, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[87] },
+   { "clientHeight", DOMNode::ClientHeight, DontDelete|ReadOnly, 0, 0 },
    { "scrollLeft", DOMNode::ScrollLeft, DontDelete, 0, 0 },
+   { "scrollTop", DOMNode::ScrollTop, DontDelete, 0, 0 },
    { "scrollWidth", DOMNode::ScrollWidth, DontDelete|ReadOnly, 0, 0 }
 };
 
-const struct HashTable DOMNodeTable = { 2, 79, DOMNodeTableEntries, 60 };
+const struct HashTable DOMNodeTable = { 2, 90, DOMNodeTableEntries, 66 };
 
 } // namespace
 
diff --git a/WebCore/khtml/ecma/kjs_events.cpp b/WebCore/khtml/ecma/kjs_events.cpp
index cce9171..3b7ba69 100644
--- a/WebCore/khtml/ecma/kjs_events.cpp
+++ b/WebCore/khtml/ecma/kjs_events.cpp
@@ -283,7 +283,7 @@ Value KJS::getEventConstructor(ExecState *exec)
 
 const ClassInfo DOMEvent::info = { "Event", 0, &DOMEventTable, 0 };
 /*
- at begin DOMEventTable 7
+ at begin DOMEventTable 12
   type		DOMEvent::Type		DontDelete|ReadOnly
   target	DOMEvent::Target	DontDelete|ReadOnly
   currentTarget	DOMEvent::CurrentTarget	DontDelete|ReadOnly
@@ -294,6 +294,8 @@ const ClassInfo DOMEvent::info = { "Event", 0, &DOMEventTable, 0 };
   timeStamp	DOMEvent::TimeStamp	DontDelete|ReadOnly
   returnValue   DOMEvent::ReturnValue   DontDelete
   cancelBubble  DOMEvent::CancelBubble  DontDelete
+  dataTransfer	DOMMouseEvent::DataTransfer DontDelete|ReadOnly
+  clipboardData  DOMEvent::ClipboardData  DontDelete|ReadOnly
 @end
 @begin DOMEventProtoTable 3
   stopPropagation 	DOMEvent::StopPropagation	DontDelete|Function 0
@@ -306,13 +308,21 @@ IMPLEMENT_PROTOFUNC(DOMEventProtoFunc)
 IMPLEMENT_PROTOTYPE(DOMEventProto, DOMEventProtoFunc)
 
 DOMEvent::DOMEvent(ExecState *exec, DOM::Event e)
-  : DOMObject(DOMEventProto::self(exec)), event(e) { }
+  : DOMObject(DOMEventProto::self(exec)), event(e), clipboard(0) { }
 
 DOMEvent::~DOMEvent()
 {
   ScriptInterpreter::forgetDOMObject(event.handle());
 }
 
+// pass marks through to JS objects we hold during garbage collection
+void DOMMouseEvent::mark()
+{
+    ObjectImp::mark();
+    if (clipboard && !clipboard->marked())
+        clipboard->mark();
+}
+
 Value DOMEvent::tryGet(ExecState *exec, const Identifier &p) const
 {
 #ifdef KJS_VERBOSE
@@ -343,6 +353,32 @@ Value DOMEvent::getValueProperty(ExecState *exec, int token) const
     return Boolean(event.cancelable());
   case TimeStamp:
     return Number((long unsigned int)event.timeStamp()); // ### long long ?
+  case ClipboardData:
+  {
+    DOM::EventImpl *ei = event.handle();
+    if (ei->isClipboardEvent()) {
+      DOM::ClipboardEventImpl *impl = static_cast<DOM::ClipboardEventImpl *>(event.handle());
+      if (!clipboard) {
+        clipboard = new Clipboard(exec, impl->clipboard());
+      }
+      return Object(clipboard);
+    } else {
+      return Undefined();
+    }
+  }
+  case DataTransfer:
+  {
+    DOM::EventImpl *ei = event.handle();
+    if (ei->isDragEvent()) {
+      DOM::MouseEventImpl *impl = static_cast<DOM::MouseEventImpl *>(event.handle());
+      if (!clipboard) {
+        clipboard = new Clipboard(exec, impl->clipboard());
+      }
+      return Object(clipboard);
+    } else {
+      return Undefined();
+    }
+  }
   default:
     kdWarning() << "Unhandled token in DOMEvent::getValueProperty : " << token << endl;
     return Value();
@@ -542,7 +578,7 @@ Value DOMUIEventProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List
 const ClassInfo DOMMouseEvent::info = { "MouseEvent", &DOMUIEvent::info, &DOMMouseEventTable, 0 };
 
 /*
- at begin DOMMouseEventTable 17
+ at begin DOMMouseEventTable 16
   screenX	DOMMouseEvent::ScreenX	DontDelete|ReadOnly
   screenY	DOMMouseEvent::ScreenY	DontDelete|ReadOnly
   clientX	DOMMouseEvent::ClientX	DontDelete|ReadOnly
@@ -559,7 +595,6 @@ const ClassInfo DOMMouseEvent::info = { "MouseEvent", &DOMUIEvent::info, &DOMMou
   relatedTarget	DOMMouseEvent::RelatedTarget DontDelete|ReadOnly
   fromElement	DOMMouseEvent::FromElement DontDelete|ReadOnly
   toElement	DOMMouseEvent::ToElement	DontDelete|ReadOnly
-  dataTransfer	DOMMouseEvent::DataTransfer DontDelete|ReadOnly
 @end
 @begin DOMMouseEventProtoTable 1
   initMouseEvent	DOMMouseEvent::InitMouseEvent	DontDelete|Function 15
@@ -573,14 +608,6 @@ DOMMouseEvent::~DOMMouseEvent()
 {
 }
 
-// pass marks through to JS objects we hold during garbage collection
-void DOMMouseEvent::mark()
-{
-  ObjectImp::mark();
-  if (clipboard && !clipboard->marked())
-    clipboard->mark();
-}
-
 Value DOMMouseEvent::tryGet(ExecState *exec, const Identifier &p) const
 {
 #ifdef KJS_VERBOSE
@@ -649,22 +676,6 @@ Value DOMMouseEvent::getValueProperty(ExecState *exec, int token) const
     /* fall through */
   case RelatedTarget:
     return getDOMNode(exec,static_cast<DOM::MouseEvent>(event).relatedTarget());
-  case DataTransfer:
-  {
-    DOM::MouseEventImpl *impl = static_cast<DOM::MouseEventImpl *>(event.handle());
-    EventImpl::EventId eventId = impl->id();
-    if (eventId == EventImpl::DRAGENTER_EVENT || eventId == EventImpl::DRAGOVER_EVENT
-        || eventId == EventImpl::DRAGLEAVE_EVENT || eventId == EventImpl::DROP_EVENT 
-        || eventId == EventImpl::DRAGSTART_EVENT || eventId == EventImpl::DRAG_EVENT
-        || eventId == EventImpl::DRAGEND_EVENT) {
-      if (!clipboard) {
-        clipboard = new Clipboard(exec, impl->clipboard());
-      }
-      return Object(clipboard);
-    } else {
-      return Undefined();
-    }
-  }
   default:
     kdWarning() << "Unhandled token in DOMMouseEvent::getValueProperty : " << token << endl;
     return Value();
diff --git a/WebCore/khtml/ecma/kjs_events.h b/WebCore/khtml/ecma/kjs_events.h
index baa7f72..256b8de 100644
--- a/WebCore/khtml/ecma/kjs_events.h
+++ b/WebCore/khtml/ecma/kjs_events.h
@@ -90,10 +90,11 @@ namespace KJS {
     enum { Type, Target, CurrentTarget, EventPhase, Bubbles,
            Cancelable, TimeStamp, StopPropagation, PreventDefault, InitEvent,
 	   // MS IE equivalents
-	   SrcElement, ReturnValue, CancelBubble };
+	   SrcElement, ReturnValue, CancelBubble, ClipboardData, DataTransfer };
     DOM::Event toEvent() const { return event; }
   protected:
     DOM::Event event;
+    mutable Clipboard *clipboard;
   };
 
   Value getDOMEvent(ExecState *exec, DOM::Event e);
@@ -131,7 +132,7 @@ namespace KJS {
 
   class DOMMouseEvent : public DOMUIEvent {
   public:
-    DOMMouseEvent(ExecState *exec, DOM::MouseEvent me) : DOMUIEvent(exec, me), clipboard(0) {}
+    DOMMouseEvent(ExecState *exec, DOM::MouseEvent me) : DOMUIEvent(exec, me) {}
     ~DOMMouseEvent();
     virtual Value tryGet(ExecState *exec,const Identifier &p) const;
     Value getValueProperty(ExecState *, int token) const;
@@ -141,11 +142,9 @@ namespace KJS {
     static const ClassInfo info;
     enum { ScreenX, ScreenY, ClientX, X, ClientY, Y, OffsetX, OffsetY,
            CtrlKey, ShiftKey, AltKey,
-           MetaKey, Button, RelatedTarget, FromElement, ToElement, DataTransfer,
+           MetaKey, Button, RelatedTarget, FromElement, ToElement,
            InitMouseEvent };
     DOM::MouseEvent toMouseEvent() const { return static_cast<DOM::MouseEvent>(event); }
-  protected:
-    mutable Clipboard *clipboard;
   };
 
   class DOMKeyboardEvent : public DOMUIEvent {
diff --git a/WebCore/khtml/ecma/kjs_events.lut.h b/WebCore/khtml/ecma/kjs_events.lut.h
index 829f9f0..e2562ca 100644
--- a/WebCore/khtml/ecma/kjs_events.lut.h
+++ b/WebCore/khtml/ecma/kjs_events.lut.h
@@ -31,21 +31,26 @@ const struct HashTable EventConstructorTable = { 2, 19, EventConstructorTableEnt
 namespace KJS {
 
 const struct HashEntry DOMEventTableEntries[] = {
-   { "currentTarget", DOMEvent::CurrentTarget, DontDelete|ReadOnly, 0, &DOMEventTableEntries[7] },
-   { 0, 0, 0, 0, 0 },
-   { "type", DOMEvent::Type, DontDelete|ReadOnly, 0, 0 },
-   { "target", DOMEvent::Target, DontDelete|ReadOnly, 0, &DOMEventTableEntries[9] },
+   { "timeStamp", DOMEvent::TimeStamp, DontDelete|ReadOnly, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "returnValue", DOMEvent::ReturnValue, DontDelete, 0, &DOMEventTableEntries[11] },
-   { "srcElement", DOMEvent::SrcElement, DontDelete|ReadOnly, 0, 0 },
-   { "eventPhase", DOMEvent::EventPhase, DontDelete|ReadOnly, 0, &DOMEventTableEntries[8] },
+   { "cancelBubble", DOMEvent::CancelBubble, DontDelete, 0, &DOMEventTableEntries[16] },
    { "bubbles", DOMEvent::Bubbles, DontDelete|ReadOnly, 0, 0 },
-   { "cancelable", DOMEvent::Cancelable, DontDelete|ReadOnly, 0, &DOMEventTableEntries[10] },
-   { "timeStamp", DOMEvent::TimeStamp, DontDelete|ReadOnly, 0, 0 },
-   { "cancelBubble", DOMEvent::CancelBubble, DontDelete, 0, 0 }
+   { 0, 0, 0, 0, 0 },
+   { "returnValue", DOMEvent::ReturnValue, DontDelete, 0, 0 },
+   { "type", DOMEvent::Type, DontDelete|ReadOnly, 0, &DOMEventTableEntries[12] },
+   { 0, 0, 0, 0, 0 },
+   { 0, 0, 0, 0, 0 },
+   { 0, 0, 0, 0, 0 },
+   { "srcElement", DOMEvent::SrcElement, DontDelete|ReadOnly, 0, &DOMEventTableEntries[14] },
+   { "target", DOMEvent::Target, DontDelete|ReadOnly, 0, &DOMEventTableEntries[13] },
+   { "currentTarget", DOMEvent::CurrentTarget, DontDelete|ReadOnly, 0, 0 },
+   { "eventPhase", DOMEvent::EventPhase, DontDelete|ReadOnly, 0, &DOMEventTableEntries[15] },
+   { "cancelable", DOMEvent::Cancelable, DontDelete|ReadOnly, 0, 0 },
+   { "dataTransfer", DOMMouseEvent::DataTransfer, DontDelete|ReadOnly, 0, 0 },
+   { "clipboardData", DOMEvent::ClipboardData, DontDelete|ReadOnly, 0, 0 }
 };
 
-const struct HashTable DOMEventTable = { 2, 12, DOMEventTableEntries, 7 };
+const struct HashTable DOMEventTable = { 2, 17, DOMEventTableEntries, 12 };
 
 } // namespace
 
@@ -107,32 +112,32 @@ const struct HashTable DOMUIEventProtoTable = { 2, 1, DOMUIEventProtoTableEntrie
 namespace KJS {
 
 const struct HashEntry DOMMouseEventTableEntries[] = {
-   { 0, 0, 0, 0, 0 },
-   { "x", DOMMouseEvent::X, DontDelete|ReadOnly, 0, 0 },
-   { "y", DOMMouseEvent::Y, DontDelete|ReadOnly, 0, 0 },
-   { "ctrlKey", DOMMouseEvent::CtrlKey, DontDelete|ReadOnly, 0, 0 },
-   { "offsetX", DOMMouseEvent::OffsetX, DontDelete|ReadOnly, 0, 0 },
    { "offsetY", DOMMouseEvent::OffsetY, DontDelete|ReadOnly, 0, &DOMMouseEventTableEntries[20] },
-   { "shiftKey", DOMMouseEvent::ShiftKey, DontDelete|ReadOnly, 0, &DOMMouseEventTableEntries[18] },
    { 0, 0, 0, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "relatedTarget", DOMMouseEvent::RelatedTarget, DontDelete|ReadOnly, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "fromElement", DOMMouseEvent::FromElement, DontDelete|ReadOnly, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "clientX", DOMMouseEvent::ClientX, DontDelete|ReadOnly, 0, 0 },
-   { "screenX", DOMMouseEvent::ScreenX, DontDelete|ReadOnly, 0, &DOMMouseEventTableEntries[17] },
-   { "screenY", DOMMouseEvent::ScreenY, DontDelete|ReadOnly, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "clientY", DOMMouseEvent::ClientY, DontDelete|ReadOnly, 0, 0 },
-   { "altKey", DOMMouseEvent::AltKey, DontDelete|ReadOnly, 0, &DOMMouseEventTableEntries[19] },
-   { "metaKey", DOMMouseEvent::MetaKey, DontDelete|ReadOnly, 0, &DOMMouseEventTableEntries[21] },
+   { 0, 0, 0, 0, 0 },
+   { "clientX", DOMMouseEvent::ClientX, DontDelete|ReadOnly, 0, &DOMMouseEventTableEntries[19] },
+   { "screenX", DOMMouseEvent::ScreenX, DontDelete|ReadOnly, 0, &DOMMouseEventTableEntries[16] },
+   { "screenY", DOMMouseEvent::ScreenY, DontDelete|ReadOnly, 0, &DOMMouseEventTableEntries[18] },
+   { "altKey", DOMMouseEvent::AltKey, DontDelete|ReadOnly, 0, 0 },
+   { 0, 0, 0, 0, 0 },
    { "button", DOMMouseEvent::Button, DontDelete|ReadOnly, 0, 0 },
-   { "toElement", DOMMouseEvent::ToElement, DontDelete|ReadOnly, 0, &DOMMouseEventTableEntries[22] },
-   { "dataTransfer", DOMMouseEvent::DataTransfer, DontDelete|ReadOnly, 0, 0 }
+   { "toElement", DOMMouseEvent::ToElement, DontDelete|ReadOnly, 0, 0 },
+   { "ctrlKey", DOMMouseEvent::CtrlKey, DontDelete|ReadOnly, 0, &DOMMouseEventTableEntries[22] },
+   { "offsetX", DOMMouseEvent::OffsetX, DontDelete|ReadOnly, 0, 0 },
+   { "x", DOMMouseEvent::X, DontDelete|ReadOnly, 0, &DOMMouseEventTableEntries[17] },
+   { "clientY", DOMMouseEvent::ClientY, DontDelete|ReadOnly, 0, &DOMMouseEventTableEntries[21] },
+   { "y", DOMMouseEvent::Y, DontDelete|ReadOnly, 0, 0 },
+   { "shiftKey", DOMMouseEvent::ShiftKey, DontDelete|ReadOnly, 0, 0 },
+   { "metaKey", DOMMouseEvent::MetaKey, DontDelete|ReadOnly, 0, 0 },
+   { "relatedTarget", DOMMouseEvent::RelatedTarget, DontDelete|ReadOnly, 0, 0 },
+   { "fromElement", DOMMouseEvent::FromElement, DontDelete|ReadOnly, 0, 0 }
 };
 
-const struct HashTable DOMMouseEventTable = { 2, 23, DOMMouseEventTableEntries, 17 };
+const struct HashTable DOMMouseEventTable = { 2, 23, DOMMouseEventTableEntries, 16 };
 
 } // namespace
 
diff --git a/WebCore/khtml/html/html_elementimpl.cpp b/WebCore/khtml/html/html_elementimpl.cpp
index fe587cc..496a266 100644
--- a/WebCore/khtml/html/html_elementimpl.cpp
+++ b/WebCore/khtml/html/html_elementimpl.cpp
@@ -447,6 +447,30 @@ void HTMLElementImpl::parseHTMLAttribute(HTMLAttributeImpl *attr)
         setHTMLEventListener(EventImpl::SCROLL_EVENT,
             getDocument()->createHTMLEventListener(attr->value().string()));
         break;
+    case ATTR_ONBEFORECUT:
+        setHTMLEventListener(EventImpl::BEFORECUT_EVENT,
+                             getDocument()->createHTMLEventListener(attr->value().string()));
+        break;
+    case ATTR_ONCUT:
+        setHTMLEventListener(EventImpl::CUT_EVENT,
+                             getDocument()->createHTMLEventListener(attr->value().string()));
+        break;
+    case ATTR_ONBEFORECOPY:
+        setHTMLEventListener(EventImpl::BEFORECOPY_EVENT,
+                             getDocument()->createHTMLEventListener(attr->value().string()));
+        break;
+    case ATTR_ONCOPY:
+        setHTMLEventListener(EventImpl::COPY_EVENT,
+                             getDocument()->createHTMLEventListener(attr->value().string()));
+        break;
+    case ATTR_ONBEFOREPASTE:
+        setHTMLEventListener(EventImpl::BEFOREPASTE_EVENT,
+                             getDocument()->createHTMLEventListener(attr->value().string()));
+        break;
+    case ATTR_ONPASTE:
+        setHTMLEventListener(EventImpl::PASTE_EVENT,
+                             getDocument()->createHTMLEventListener(attr->value().string()));
+        break;        
     case ATTR_ONDRAGENTER:
         setHTMLEventListener(EventImpl::DRAGENTER_EVENT,
                              getDocument()->createHTMLEventListener(attr->value().string()));
diff --git a/WebCore/khtml/misc/htmlattrs.c b/WebCore/khtml/misc/htmlattrs.c
index 7541038..92f01a3 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 = 894, duplicates = 1 */
+/* maximum key range = 1396, 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[] =
     {
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917,  10, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 100, 120,  10,
-      150,   0,  40, 115, 165,   0,   5, 210,   0,  80,
-        0,   0, 125,   0,  20,  35,  60,  50, 110, 215,
-      100,  15,  15, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917, 917, 917, 917, 917,
-      917, 917, 917, 917, 917, 917
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413,    0, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413,   15,  115,   10,
+        45,    0,  130,  120,   10,   15,    0,   20,   15,  170,
+         0,    0,  365,    0,  175,   70,    0,   25,  280,   45,
+        15,   20,    5, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413,
+      1413, 1413, 1413, 1413, 1413, 1413
     };
   register int hval = len;
 
@@ -97,283 +97,353 @@ findAttr (register const char *str, register unsigned int len)
 {
   enum
     {
-      TOTAL_KEYWORDS = 174,
+      TOTAL_KEYWORDS = 180,
       MIN_WORD_LENGTH = 2,
       MAX_WORD_LENGTH = 15,
-      MIN_HASH_VALUE = 23,
-      MAX_HASH_VALUE = 916
+      MIN_HASH_VALUE = 17,
+      MAX_HASH_VALUE = 1412
     };
 
   static const struct attrs wordlist_attr[] =
     {
-      {"rel", ATTR_REL},
-      {"color", ATTR_COLOR},
-      {"cols", ATTR_COLS},
-      {"size", ATTR_SIZE},
-      {"for", ATTR_FOR},
-      {"onerror", ATTR_ONERROR},
-      {"src", ATTR_SRC},
-      {"onscroll", ATTR_ONSCROLL},
-      {"cite", ATTR_CITE},
-      {"noresize", ATTR_NORESIZE},
-      {"onresize", ATTR_ONRESIZE},
-      {"min", ATTR_MIN},
-      {"left", ATTR_LEFT},
-      {"rules", ATTR_RULES},
-      {"onselect", ATTR_ONSELECT},
-      {"style", ATTR_STYLE},
-      {"onreset", ATTR_ONRESET},
-      {"title", ATTR_TITLE},
-      {"loop", ATTR_LOOP},
-      {"rev", ATTR_REV},
-      {"clear", ATTR_CLEAR},
       {"content", ATTR_CONTENT},
-      {"onfocus", ATTR_ONFOCUS},
-      {"id", ATTR_ID},
-      {"face", ATTR_FACE},
+      {"text", ATTR_TEXT},
+      {"cite", ATTR_CITE},
       {"alt", ATTR_ALT},
-      {"code", ATTR_CODE},
-      {"version", ATTR_VERSION},
-      {"dir", ATTR_DIR},
-      {"scope", ATTR_SCOPE},
+      {"title", ATTR_TITLE},
+      {"oncut", ATTR_ONCUT},
       {"action", ATTR_ACTION},
-      {"name", ATTR_NAME},
-      {"class", ATTR_CLASS},
-      {"top", ATTR_TOP},
-      {"scrolling", ATTR_SCROLLING},
-      {"profile", ATTR_PROFILE},
-      {"onblur", ATTR_ONBLUR},
-      {"precision", ATTR_PRECISION},
-      {"object", ATTR_OBJECT},
-      {"oversrc", ATTR_OVERSRC},
-      {"type", ATTR_TYPE},
-      {"results", ATTR_RESULTS},
       {"link", ATTR_LINK},
-      {"defer", ATTR_DEFER},
-      {"enctype", ATTR_ENCTYPE},
-      {"lang", ATTR_LANG},
-      {"align", ATTR_ALIGN},
-      {"coords", ATTR_COORDS},
-      {"text", ATTR_TEXT},
-      {"label", ATTR_LABEL},
-      {"href", ATTR_HREF},
-      {"plain", ATTR_PLAIN},
-      {"nohref", ATTR_NOHREF},
+      {"code", ATTR_CODE},
+      {"id", ATTR_ID},
+      {"alink", ATTR_ALINK},
       {"onclick", ATTR_ONCLICK},
-      {"axis", ATTR_AXIS},
-      {"oninput", ATTR_ONINPUT},
-      {"frame", ATTR_FRAME},
-      {"direction", ATTR_DIRECTION},
-      {"nosave", ATTR_NOSAVE},
+      {"data", ATTR_DATA},
       {"onload", ATTR_ONLOAD},
-      {"selected", ATTR_SELECTED},
-      {"span", ATTR_SPAN},
-      {"value", ATTR_VALUE},
-      {"bgcolor", ATTR_BGCOLOR},
-      {"rows", ATTR_ROWS},
-      {"colspan", ATTR_COLSPAN},
-      {"start", ATTR_START},
-      {"incremental", ATTR_INCREMENTAL},
       {"z-index", ATTR_Z_INDEX},
+      {"size", ATTR_SIZE},
+      {"unknown", ATTR_UNKNOWN},
+      {"cols", ATTR_COLS},
+      {"checked", ATTR_CHECKED},
+      {"onselect", ATTR_ONSELECT},
+      {"onunload", ATTR_ONUNLOAD},
+      {"style", ATTR_STYLE},
+      {"axis", ATTR_AXIS},
+      {"width", ATTR_WIDTH},
+      {"hidden", ATTR_HIDDEN},
+      {"object", ATTR_OBJECT},
+      {"onkeydown", ATTR_ONKEYDOWN},
+      {"noshade", ATTR_NOSHADE},
+      {"selected", ATTR_SELECTED},
+      {"left", ATTR_LEFT},
+      {"lang", ATTR_LANG},
+      {"face", ATTR_FACE},
+      {"height", ATTR_HEIGHT},
+      {"onchange", ATTR_ONCHANGE},
+      {"label", ATTR_LABEL},
+      {"align", ATTR_ALIGN},
+      {"class", ATTR_CLASS},
+      {"min", ATTR_MIN},
+      {"name", ATTR_NAME},
+      {"rel", ATTR_REL},
+      {"challenge", ATTR_CHALLENGE},
+      {"html", ATTR_HTML},
       {"max", ATTR_MAX},
-      {"onmouseout", ATTR_ONMOUSEOUT},
+      {"color", ATTR_COLOR},
+      {"tabindex", ATTR_TABINDEX},
+      {"char", ATTR_CHAR},
+      {"clear", ATTR_CLEAR},
+      {"accesskey", ATTR_ACCESSKEY},
+      {"contenteditable", ATTR_CONTENTEDITABLE},
+      {"method", ATTR_METHOD},
+      {"oncontextmenu", ATTR_ONCONTEXTMENU},
+      {"dir", ATTR_DIR},
+      {"onfocus", ATTR_ONFOCUS},
+      {"classid", ATTR_CLASSID},
+      {"media", ATTR_MEDIA},
+      {"onreset", ATTR_ONRESET},
+      {"datetime", ATTR_DATETIME},
+      {"ondblclick", ATTR_ONDBLCLICK},
+      {"src", ATTR_SRC},
+      {"codebase", ATTR_CODEBASE},
+      {"start", ATTR_START},
+      {"scheme", ATTR_SCHEME},
       {"declare", ATTR_DECLARE},
+      {"longdesc", ATTR_LONGDESC},
+      {"direction", ATTR_DIRECTION},
+      {"standby", ATTR_STANDBY},
+      {"noresize", ATTR_NORESIZE},
+      {"onresize", ATTR_ONRESIZE},
       {"readonly", ATTR_READONLY},
-      {"scheme", ATTR_SCHEME},
-      {"char", ATTR_CHAR},
-      {"ondrop", ATTR_ONDROP},
-      {"onmouseover", ATTR_ONMOUSEOVER},
+      {"charset", ATTR_CHARSET},
+      {"onsearch", ATTR_ONSEARCH},
+      {"rules", ATTR_RULES},
+      {"onscroll", ATTR_ONSCROLL},
+      {"rows", ATTR_ROWS},
+      {"onmouseout", ATTR_ONMOUSEOUT},
+      {"coords", ATTR_COORDS},
+      {"for", ATTR_FOR},
       {"onabort", ATTR_ONABORT},
-      {"onunload", ATTR_ONUNLOAD},
-      {"html", ATTR_HTML},
-      {"accept", ATTR_ACCEPT},
-      {"alink", ATTR_ALINK},
-      {"border", ATTR_BORDER},
-      {"longdesc", ATTR_LONGDESC},
-      {"composite", ATTR_COMPOSITE},
-      {"multiple", ATTR_MULTIPLE},
+      {"target", ATTR_TARGET},
+      {"language", ATTR_LANGUAGE},
+      {"href", ATTR_HREF},
+      {"nohref", ATTR_NOHREF},
+      {"headers", ATTR_HEADERS},
+      {"disabled", ATTR_DISABLED},
       {"vlink", ATTR_VLINK},
-      {"cellborder", ATTR_CELLBORDER},
-      {"valign", ATTR_VALIGN},
-      {"media", ATTR_MEDIA},
-      {"classid", ATTR_CLASSID},
-      {"onsearch", ATTR_ONSEARCH},
+      {"onblur", ATTR_ONBLUR},
+      {"value", ATTR_VALUE},
+      {"maxlength", ATTR_MAXLENGTH},
+      {"defer", ATTR_DEFER},
+      {"ondrag", ATTR_ONDRAG},
+      {"results", ATTR_RESULTS},
+      {"onmousedown", ATTR_ONMOUSEDOWN},
+      {"top", ATTR_TOP},
+      {"nosave", ATTR_NOSAVE},
+      {"loop", ATTR_LOOP},
+      {"type", ATTR_TYPE},
       {"scrolldelay", ATTR_SCROLLDELAY},
-      {"ismap", ATTR_ISMAP},
-      {"onmouseup", ATTR_ONMOUSEUP},
-      {"visibility", ATTR_VISIBILITY},
-      {"bordercolor", ATTR_BORDERCOLOR},
+      {"oncopy", ATTR_ONCOPY},
+      {"enctype", ATTR_ENCTYPE},
       {"onsubmit", ATTR_ONSUBMIT},
-      {"pagey", ATTR_PAGEY},
-      {"target", ATTR_TARGET},
+      {"accept", ATTR_ACCEPT},
+      {"ondragend", ATTR_ONDRAGEND},
+      {"incremental", ATTR_INCREMENTAL},
+      {"oninput", ATTR_ONINPUT},
+      {"autosave", ATTR_AUTOSAVE},
+      {"plain", ATTR_PLAIN},
       {"abbr", ATTR_ABBR},
-      {"onmousemove", ATTR_ONMOUSEMOVE},
-      {"scrollamount", ATTR_SCROLLAMOUNT},
-      {"codetype", ATTR_CODETYPE},
-      {"pluginurl", ATTR_PLUGINURL},
-      {"oncontextmenu", ATTR_ONCONTEXTMENU},
-      {"charoff", ATTR_CHAROFF},
-      {"vspace", ATTR_VSPACE},
-      {"summary", ATTR_SUMMARY},
-      {"ondrag", ATTR_ONDRAG},
-      {"compact", ATTR_COMPACT},
-      {"usemap", ATTR_USEMAP},
-      {"charset", ATTR_CHARSET},
-      {"onchange", ATTR_ONCHANGE},
-      {"challenge", ATTR_CHALLENGE},
-      {"cellspacing", ATTR_CELLSPACING},
+      {"scrolling", ATTR_SCROLLING},
+      {"keytype", ATTR_KEYTYPE},
       {"onkeyup", ATTR_ONKEYUP},
-      {"archive", ATTR_ARCHIVE},
-      {"data", ATTR_DATA},
-      {"prompt", ATTR_PROMPT},
-      {"codebase", ATTR_CODEBASE},
-      {"accesskey", ATTR_ACCESSKEY},
-      {"leftmargin", ATTR_LEFTMARGIN},
+      {"bgcolor", ATTR_BGCOLOR},
+      {"codetype", ATTR_CODETYPE},
+      {"scope", ATTR_SCOPE},
+      {"valign", ATTR_VALIGN},
+      {"span", ATTR_SPAN},
+      {"onpaste", ATTR_ONPASTE},
+      {"rev", ATTR_REV},
       {"shape", ATTR_SHAPE},
-      {"keytype", ATTR_KEYTYPE},
+      {"onbeforecut", ATTR_ONBEFORECUT},
+      {"hreflang", ATTR_HREFLANG},
       {"hspace", ATTR_HSPACE},
+      {"charoff", ATTR_CHAROFF},
+      {"colspan", ATTR_COLSPAN},
+      {"frame", ATTR_FRAME},
+      {"scrollamount", ATTR_SCROLLAMOUNT},
+      {"archive", ATTR_ARCHIVE},
+      {"border", ATTR_BORDER},
       {"pagex", ATTR_PAGEX},
-      {"hreflang", ATTR_HREFLANG},
-      {"truespeed", ATTR_TRUESPEED},
-      {"onkeypress", ATTR_ONKEYPRESS},
-      {"mayscript", ATTR_MAYSCRIPT},
-      {"noshade", ATTR_NOSHADE},
-      {"datetime", ATTR_DATETIME},
-      {"method", ATTR_METHOD},
-      {"autosave", ATTR_AUTOSAVE},
+      {"pagey", ATTR_PAGEY},
+      {"onerror", ATTR_ONERROR},
+      {"background", ATTR_BACKGROUND},
+      {"ondragenter", ATTR_ONDRAGENTER},
+      {"version", ATTR_VERSION},
+      {"cellborder", ATTR_CELLBORDER},
+      {"visibility", ATTR_VISIBILITY},
+      {"compact", ATTR_COMPACT},
+      {"ondrop", ATTR_ONDROP},
       {"wrap", ATTR_WRAP},
       {"nowrap", ATTR_NOWRAP},
-      {"valuetype", ATTR_VALUETYPE},
-      {"hidden", ATTR_HIDDEN},
-      {"ondragenter", ATTR_ONDRAGENTER},
-      {"headers", ATTR_HEADERS},
-      {"unknown", ATTR_UNKNOWN},
-      {"standby", ATTR_STANDBY},
-      {"language", ATTR_LANGUAGE},
       {"autocomplete", ATTR_AUTOCOMPLETE},
-      {"rowspan", ATTR_ROWSPAN},
-      {"topmargin", ATTR_TOPMARGIN},
-      {"ondblclick", ATTR_ONDBLCLICK},
-      {"height", ATTR_HEIGHT},
+      {"multiple", ATTR_MULTIPLE},
       {"behavior", ATTR_BEHAVIOR},
-      {"ondragover", ATTR_ONDRAGOVER},
-      {"tabindex", ATTR_TABINDEX},
-      {"onmousedown", ATTR_ONMOUSEDOWN},
-      {"ondragend", ATTR_ONDRAGEND},
-      {"checked", ATTR_CHECKED},
-      {"frameborder", ATTR_FRAMEBORDER},
-      {"disabled", ATTR_DISABLED},
-      {"contenteditable", ATTR_CONTENTEDITABLE},
+      {"marginwidth", ATTR_MARGINWIDTH},
+      {"ondragstart", ATTR_ONDRAGSTART},
+      {"composite", ATTR_COMPOSITE},
+      {"ismap", ATTR_ISMAP},
+      {"cellspacing", ATTR_CELLSPACING},
+      {"leftmargin", ATTR_LEFTMARGIN},
+      {"usemap", ATTR_USEMAP},
+      {"summary", ATTR_SUMMARY},
+      {"cellpadding", ATTR_CELLPADDING},
+      {"precision", ATTR_PRECISION},
       {"placeholder", ATTR_PLACEHOLDER},
-      {"http-equiv", ATTR_HTTP_EQUIV},
-      {"width", ATTR_WIDTH},
-      {"onkeydown", ATTR_ONKEYDOWN},
+      {"marginheight", ATTR_MARGINHEIGHT},
+      {"onmouseup", ATTR_ONMOUSEUP},
       {"tableborder", ATTR_TABLEBORDER},
       {"ondragleave", ATTR_ONDRAGLEAVE},
-      {"maxlength", ATTR_MAXLENGTH},
-      {"bgproperties", ATTR_BGPROPERTIES},
+      {"rowspan", ATTR_ROWSPAN},
+      {"truespeed", ATTR_TRUESPEED},
+      {"accept-charset", ATTR_ACCEPT_CHARSET},
+      {"http-equiv", ATTR_HTTP_EQUIV},
+      {"profile", ATTR_PROFILE},
+      {"oversrc", ATTR_OVERSRC},
+      {"bordercolor", ATTR_BORDERCOLOR},
+      {"onmousemove", ATTR_ONMOUSEMOVE},
+      {"valuetype", ATTR_VALUETYPE},
+      {"onkeypress", ATTR_ONKEYPRESS},
+      {"onmouseover", ATTR_ONMOUSEOVER},
+      {"vspace", ATTR_VSPACE},
+      {"pluginurl", ATTR_PLUGINURL},
+      {"ondragover", ATTR_ONDRAGOVER},
+      {"onbeforecopy", ATTR_ONBEFORECOPY},
+      {"mayscript", ATTR_MAYSCRIPT},
+      {"topmargin", ATTR_TOPMARGIN},
+      {"onbeforepaste", ATTR_ONBEFOREPASTE},
+      {"frameborder", ATTR_FRAMEBORDER},
       {"pluginpage", ATTR_PLUGINPAGE},
-      {"cellpadding", ATTR_CELLPADDING},
-      {"ondragstart", ATTR_ONDRAGSTART},
+      {"prompt", ATTR_PROMPT},
       {"pluginspage", ATTR_PLUGINSPAGE},
-      {"accept-charset", ATTR_ACCEPT_CHARSET},
-      {"background", ATTR_BACKGROUND},
-      {"marginheight", ATTR_MARGINHEIGHT},
-      {"marginwidth", ATTR_MARGINWIDTH}
+      {"bgproperties", ATTR_BGPROPERTIES}
     };
 
   static const short lookup[] =
     {
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,    0,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,    1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,    2,   -1,   -1,   -1,   -1,    3,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,    4,
-        -1,   -1,   -1,    5,    6,   -1,   -1,   -1,
-        -1,    7,    8,   -1,   -1,   -1, -254, -165,
-        -2,   -1,   -1,   11,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        12,   -1,   -1,   -1,   -1,   -1,   13,   -1,
-        -1,   14,   -1,   15,   -1,   -1,   -1,   -1,
-        -1,   -1,   16,   -1,   -1,   17,   -1,   -1,
-        -1,   18,   -1,   -1,   -1,   19,   -1,   20,
-        -1,   21,   -1,   -1,   -1,   -1,   22,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        23,   -1,   24,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   25,   26,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   27,   28,   -1,   29,
-        30,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        31,   32,   -1,   -1,   33,   34,   -1,   -1,
-        35,   -1,   -1,   -1,   36,   -1,   -1,   37,
-        -1,   38,   39,   -1,   40,   -1,   -1,   41,
-        -1,   -1,   -1,   -1,   -1,   -1,   42,   43,
-        -1,   44,   -1,   45,   46,   47,   -1,   -1,
-        48,   49,   -1,   -1,   -1,   50,   51,   52,
-        -1,   -1,   -1,   -1,   -1,   53,   -1,   54,
-        -1,   -1,   55,   -1,   -1,   56,   -1,   -1,
-        -1,   57,   -1,   58,   -1,   -1,   -1,   -1,
-        59,   -1,   -1,   -1,   -1,   -1,   -1,   60,
-        61,   62,   -1,   -1,   -1,   -1,   -1,   -1,
-        63,   -1,   64,   -1,   -1,   65,   -1,   -1,
-        66,   67,   68,   69,   -1,   70,   -1,   71,
-        -1,   -1,   -1,   -1,   -1,   72,   -1,   -1,
-        73,   -1,   -1,   74,   -1,   75,   -1,   -1,
-        -1,   -1,   76,   77,   78,   79,   -1,   80,
-        -1,   -1,   -1,   81,   82,   -1,   83,   84,
-        -1,   -1,   -1,   85,   -1,   86,   -1,   -1,
-        -1,   -1,   87,   88,   -1,   -1,   -1,   89,
-        -1,   90,   91,   -1,   -1,   92,   -1,   -1,
-        -1,   93,   -1,   -1,   -1,   94,   95,   96,
-        -1,   97,   -1,   -1,   -1,   -1,   -1,   -1,
-        98,   99,   -1,   -1,  100,   -1,  101,  102,
-       103,  104,   -1,   -1,   -1,  105,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,  106,   -1,
-        -1,   -1,  107,  108,   -1,   -1,   -1,  109,
-       110,   -1,   -1,   -1,  111,  112,  113,  114,
-        -1,   -1,   -1,   -1,   -1,   -1,  115,  116,
-        -1,   -1,   -1,   -1,  117,   -1,  118,   -1,
-       119,   -1,   -1,   -1,   -1,   -1,   -1,  120,
-       121,  122,   -1,   -1,   -1,   -1,  123,   -1,
-       124,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,  125,   -1,   -1,   -1,  126,   -1,   -1,
-       127,  128,  129,   -1,   -1,   -1,  130,   -1,
-        -1,  131,  132,   -1,   -1,  133,   -1,  134,
-       135,   -1,  136,   -1,   -1,  137,   -1,  138,
+        -1,    0,   -1,    1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,    2,   -1,   -1,
+        -1,    3,   -1,    4,   -1,   -1,   -1,   -1,
+         5,   -1,   -1,   -1,   -1,   -1,    6,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,    7,   -1,
+        -1,   -1,   -1,    8,   -1,   -1,    9,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   10,   -1,
+        -1,   -1,   -1,   -1,   -1,   11,   -1,   12,
+        -1,   13,   -1,   -1,   -1,   -1,   -1,   14,
+        -1,   -1,   -1,   -1,   -1,   -1,   15,   -1,
+        -1,   16,   -1,   17,   -1,   -1,   18,   19,
+        -1,   -1,   -1,   -1,   20,   -1,   21,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   22,
+        23,   24,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   25,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   26,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   27,   28,   29,   -1,   -1,
+        -1,   -1,   30,   -1,   -1,   -1,   -1,   31,
+        -1,   32,   -1,   33,   -1,   34,   -1,   -1,
+        -1,   -1,   35,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   36,   -1,   -1,   37,   38,   -1,   -1,
+        -1,   39,   40,   -1,   -1,   -1,   -1,   41,
+        -1,   -1,   -1,   42,   -1,   43,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   44,   45,   -1,
+        -1,   -1,   -1,   -1,   46,   -1,   -1,   -1,
+        47,   -1,   -1,   -1,   -1,   -1,   48,   49,
+        -1,   50,   -1,   -1,   -1,   -1,   51,   -1,
+        -1,   -1,   52,   -1,   -1,   -1,   -1,   53,
+        -1,   -1,   54,   -1,   55,   56,   -1,   57,
+        -1,   -1,   58,   -1,   -1,   -1,   -1,   59,
+        -1,   60,   61,   62,   63,   64,   -1,   -1,
+        65, -455, -114,   -2,   -1,   -1,   68,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   69,
+        70,   -1,   71,   -1,   -1,   72,   73,   -1,
+        -1,   -1,   -1,   -1,   74,   -1,   -1,   -1,
+        -1,   -1,   75,   -1,   76,   -1,   -1,   -1,
+        77,   -1,   -1,   -1,   78,   -1,   79,   80,
+        -1,   81,   82,   -1,   -1,   -1,   -1,   -1,
+        83,   -1,   -1,   -1,   -1,   -1,   -1,   84,
+        85,   -1,   -1,   -1,   86,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   87,   88,   -1,   -1,   -1,   -1,
+        -1,   89,   90,   -1,   -1,   -1,   91,   -1,
+        92,   -1,   -1,   93,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        94,   -1,   -1,   -1,   -1,   95,   -1,   96,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   97,   98,   99,   -1,   -1,  100,   -1,
+        -1,  101,   -1,  102,  103,  104,   -1,  105,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+       106,   -1,   -1,   -1,   -1,  107,   -1,   -1,
+       108,   -1,   -1,   -1,   -1,  109,   -1,   -1,
+        -1,   -1,  110,   -1,   -1,   -1,   -1,   -1,
+       111,   -1,  112,  113,   -1,   -1,  114,   -1,
+        -1,  115,  116,   -1,   -1,   -1,   -1,   -1,
+        -1,  117,  118,   -1,   -1,   -1,   -1,   -1,
+        -1,  119,   -1,   -1,  120,  121,   -1,   -1,
+        -1,   -1,  122,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,  123,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,  124,   -1,   -1,   -1,   -1,
+       125,   -1,   -1,   -1,  126,   -1,   -1,   -1,
+       127,   -1,   -1,   -1,   -1,  128,   -1,   -1,
+        -1,   -1,   -1,   -1,  129,   -1,   -1,  130,
+        -1,   -1,   -1,   -1,   -1,  131,   -1,   -1,
+        -1,   -1,   -1,  132,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+       133,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,  134,   -1,   -1,   -1,   -1,   -1,
+        -1,  135,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,  136,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,  137,   -1,  138,   -1,
         -1,   -1,   -1,   -1,  139,  140,   -1,   -1,
-        -1,   -1,  141,   -1,   -1,   -1,   -1,  142,
-       143,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,  144,   -1,   -1,   -1,   -1,  145,   -1,
-        -1,   -1,   -1,   -1,   -1,  146,  147,  148,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,  149,   -1,  150,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,  151,   -1,   -1,  152,   -1,   -1,
-       153,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-       154,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,  155,   -1,  156,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,  157,
-        -1,   -1,   -1,   -1,   -1,  158,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,  159,   -1,
-        -1,   -1,   -1,  160,   -1,   -1,   -1,  161,
-        -1,  162,   -1,   -1,   -1,   -1,  163,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,  164,   -1,   -1,
-       165,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-       166,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -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,  141,   -1,   -1,  142,   -1,   -1,
+        -1,   -1,  143,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,  144,
+       145,   -1,   -1,   -1,   -1,   -1,  146,   -1,
+        -1,   -1,  147,  148,  149,   -1,   -1,   -1,
+       150,   -1,   -1,  151,   -1,  152,  153,   -1,
+       154,   -1,  155,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,  156,  157,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,  158,   -1,   -1,   -1,   -1,  159,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,  160,   -1,  161,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,  162,   -1,   -1,
+        -1,  163,   -1,   -1,   -1,   -1,  164,   -1,
+        -1,  165,  166,  167,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,  168,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,  169,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-        -1,   -1,   -1,   -1,   -1,   -1,   -1,  170,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,  170,   -1,   -1,   -1,
+        -1,   -1,   -1,  171,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,  172,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,  173,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,  174,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,  175,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,  176,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,  177,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,  178,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
@@ -382,13 +452,11 @@ 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,  171,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-       172,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
@@ -398,7 +466,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,   -1,   -1,  173
+        -1,   -1,   -1,   -1,  179
     };
 
   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -528,10 +596,15 @@ static const char * const attrList[] = {
     "NOWRAP",
     "OBJECT",
     "ONABORT",
+    "ONBEFORECOPY",
+    "ONBEFORECUT",
+    "ONBEFOREPASTE",
     "ONBLUR",
     "ONCHANGE",
     "ONCLICK",
     "ONCONTEXTMENU",
+    "ONCOPY",
+    "ONCUT",
     "ONDBLCLICK",
     "ONDRAG",
     "ONDRAGEND",
@@ -552,6 +625,7 @@ static const char * const attrList[] = {
     "ONMOUSEOUT",
     "ONMOUSEOVER",
     "ONMOUSEUP",
+    "ONPASTE",
     "ONRESET",
     "ONRESIZE",
     "ONSCROLL",
diff --git a/WebCore/khtml/misc/htmlattrs.h b/WebCore/khtml/misc/htmlattrs.h
index be7ced3..9500624 100644
--- a/WebCore/khtml/misc/htmlattrs.h
+++ b/WebCore/khtml/misc/htmlattrs.h
@@ -97,91 +97,97 @@ htmlattrs.in by makeattrs, do not edit */
 #define ATTR_NOWRAP 88
 #define ATTR_OBJECT 89
 #define ATTR_ONABORT 90
-#define ATTR_ONBLUR 91
-#define ATTR_ONCHANGE 92
-#define ATTR_ONCLICK 93
-#define ATTR_ONCONTEXTMENU 94
-#define ATTR_ONDBLCLICK 95
-#define ATTR_ONDRAG 96
-#define ATTR_ONDRAGEND 97
-#define ATTR_ONDRAGENTER 98
-#define ATTR_ONDRAGLEAVE 99
-#define ATTR_ONDRAGOVER 100
-#define ATTR_ONDRAGSTART 101
-#define ATTR_ONDROP 102
-#define ATTR_ONERROR 103
-#define ATTR_ONFOCUS 104
-#define ATTR_ONINPUT 105
-#define ATTR_ONKEYDOWN 106
-#define ATTR_ONKEYPRESS 107
-#define ATTR_ONKEYUP 108
-#define ATTR_ONLOAD 109
-#define ATTR_ONMOUSEDOWN 110
-#define ATTR_ONMOUSEMOVE 111
-#define ATTR_ONMOUSEOUT 112
-#define ATTR_ONMOUSEOVER 113
-#define ATTR_ONMOUSEUP 114
-#define ATTR_ONRESET 115
-#define ATTR_ONRESIZE 116
-#define ATTR_ONSCROLL 117
-#define ATTR_ONSEARCH 118
-#define ATTR_ONSELECT 119
-#define ATTR_ONSUBMIT 120
-#define ATTR_ONUNLOAD 121
-#define ATTR_OVERSRC 122
-#define ATTR_PAGEX 123
-#define ATTR_PAGEY 124
-#define ATTR_PLACEHOLDER 125
-#define ATTR_PLAIN 126
-#define ATTR_PLUGINPAGE 127
-#define ATTR_PLUGINSPAGE 128
-#define ATTR_PLUGINURL 129
-#define ATTR_PRECISION 130
-#define ATTR_PROFILE 131
-#define ATTR_PROMPT 132
-#define ATTR_READONLY 133
-#define ATTR_REL 134
-#define ATTR_RESULTS 135
-#define ATTR_REV 136
-#define ATTR_ROWS 137
-#define ATTR_ROWSPAN 138
-#define ATTR_RULES 139
-#define ATTR_SCHEME 140
-#define ATTR_SCOPE 141
-#define ATTR_SCROLLAMOUNT 142
-#define ATTR_SCROLLDELAY 143
-#define ATTR_SCROLLING 144
-#define ATTR_SELECTED 145
-#define ATTR_SHAPE 146
-#define ATTR_SIZE 147
-#define ATTR_SPAN 148
-#define ATTR_SRC 149
-#define ATTR_STANDBY 150
-#define ATTR_START 151
-#define ATTR_STYLE 152
-#define ATTR_SUMMARY 153
-#define ATTR_TABINDEX 154
-#define ATTR_TABLEBORDER 155
-#define ATTR_TARGET 156
-#define ATTR_TEXT 157
-#define ATTR_TITLE 158
-#define ATTR_TOP 159
-#define ATTR_TOPMARGIN 160
-#define ATTR_TRUESPEED 161
-#define ATTR_TYPE 162
-#define ATTR_UNKNOWN 163
-#define ATTR_USEMAP 164
-#define ATTR_VALIGN 165
-#define ATTR_VALUE 166
-#define ATTR_VALUETYPE 167
-#define ATTR_VERSION 168
-#define ATTR_VISIBILITY 169
-#define ATTR_VLINK 170
-#define ATTR_VSPACE 171
-#define ATTR_WIDTH 172
-#define ATTR_WRAP 173
-#define ATTR_Z_INDEX 174
-#define ATTR_LAST_ATTR 174
+#define ATTR_ONBEFORECOPY 91
+#define ATTR_ONBEFORECUT 92
+#define ATTR_ONBEFOREPASTE 93
+#define ATTR_ONBLUR 94
+#define ATTR_ONCHANGE 95
+#define ATTR_ONCLICK 96
+#define ATTR_ONCONTEXTMENU 97
+#define ATTR_ONCOPY 98
+#define ATTR_ONCUT 99
+#define ATTR_ONDBLCLICK 100
+#define ATTR_ONDRAG 101
+#define ATTR_ONDRAGEND 102
+#define ATTR_ONDRAGENTER 103
+#define ATTR_ONDRAGLEAVE 104
+#define ATTR_ONDRAGOVER 105
+#define ATTR_ONDRAGSTART 106
+#define ATTR_ONDROP 107
+#define ATTR_ONERROR 108
+#define ATTR_ONFOCUS 109
+#define ATTR_ONINPUT 110
+#define ATTR_ONKEYDOWN 111
+#define ATTR_ONKEYPRESS 112
+#define ATTR_ONKEYUP 113
+#define ATTR_ONLOAD 114
+#define ATTR_ONMOUSEDOWN 115
+#define ATTR_ONMOUSEMOVE 116
+#define ATTR_ONMOUSEOUT 117
+#define ATTR_ONMOUSEOVER 118
+#define ATTR_ONMOUSEUP 119
+#define ATTR_ONPASTE 120
+#define ATTR_ONRESET 121
+#define ATTR_ONRESIZE 122
+#define ATTR_ONSCROLL 123
+#define ATTR_ONSEARCH 124
+#define ATTR_ONSELECT 125
+#define ATTR_ONSUBMIT 126
+#define ATTR_ONUNLOAD 127
+#define ATTR_OVERSRC 128
+#define ATTR_PAGEX 129
+#define ATTR_PAGEY 130
+#define ATTR_PLACEHOLDER 131
+#define ATTR_PLAIN 132
+#define ATTR_PLUGINPAGE 133
+#define ATTR_PLUGINSPAGE 134
+#define ATTR_PLUGINURL 135
+#define ATTR_PRECISION 136
+#define ATTR_PROFILE 137
+#define ATTR_PROMPT 138
+#define ATTR_READONLY 139
+#define ATTR_REL 140
+#define ATTR_RESULTS 141
+#define ATTR_REV 142
+#define ATTR_ROWS 143
+#define ATTR_ROWSPAN 144
+#define ATTR_RULES 145
+#define ATTR_SCHEME 146
+#define ATTR_SCOPE 147
+#define ATTR_SCROLLAMOUNT 148
+#define ATTR_SCROLLDELAY 149
+#define ATTR_SCROLLING 150
+#define ATTR_SELECTED 151
+#define ATTR_SHAPE 152
+#define ATTR_SIZE 153
+#define ATTR_SPAN 154
+#define ATTR_SRC 155
+#define ATTR_STANDBY 156
+#define ATTR_START 157
+#define ATTR_STYLE 158
+#define ATTR_SUMMARY 159
+#define ATTR_TABINDEX 160
+#define ATTR_TABLEBORDER 161
+#define ATTR_TARGET 162
+#define ATTR_TEXT 163
+#define ATTR_TITLE 164
+#define ATTR_TOP 165
+#define ATTR_TOPMARGIN 166
+#define ATTR_TRUESPEED 167
+#define ATTR_TYPE 168
+#define ATTR_UNKNOWN 169
+#define ATTR_USEMAP 170
+#define ATTR_VALIGN 171
+#define ATTR_VALUE 172
+#define ATTR_VALUETYPE 173
+#define ATTR_VERSION 174
+#define ATTR_VISIBILITY 175
+#define ATTR_VLINK 176
+#define ATTR_VSPACE 177
+#define ATTR_WIDTH 178
+#define ATTR_WRAP 179
+#define ATTR_Z_INDEX 180
+#define ATTR_LAST_ATTR 180
 DOM::DOMString getAttrName(unsigned short id);
 
 #endif
diff --git a/WebCore/khtml/misc/htmlattrs.in b/WebCore/khtml/misc/htmlattrs.in
index b76c8ae..38f6417 100644
--- a/WebCore/khtml/misc/htmlattrs.in
+++ b/WebCore/khtml/misc/htmlattrs.in
@@ -88,10 +88,15 @@ noshade
 nowrap
 object
 onabort
+onbeforecopy
+onbeforecut
+onbeforepaste
 onblur
 onchange
 onclick
 oncontextmenu
+oncopy
+oncut
 ondblclick
 ondrag
 ondragend
@@ -112,6 +117,7 @@ onmousemove
 onmouseout
 onmouseover
 onmouseup
+onpaste
 onreset
 onresize
 onscroll
diff --git a/WebCore/khtml/xml/dom2_eventsimpl.cpp b/WebCore/khtml/xml/dom2_eventsimpl.cpp
index e9d14e2..66b895f 100644
--- a/WebCore/khtml/xml/dom2_eventsimpl.cpp
+++ b/WebCore/khtml/xml/dom2_eventsimpl.cpp
@@ -183,6 +183,18 @@ EventImpl::EventId EventImpl::typeToId(DOMString type)
 	return MOUSEMOVE_EVENT;
     else if (type == "mouseout")
 	return MOUSEOUT_EVENT;
+    else if (type == "onbeforecut")
+	return BEFORECUT_EVENT;
+    else if (type == "oncut")
+	return CUT_EVENT;
+    else if (type == "onbeforecopy")
+	return BEFORECOPY_EVENT;
+    else if (type == "oncopy")
+	return COPY_EVENT;
+    else if (type == "onbeforepaste")
+	return BEFOREPASTE_EVENT;
+    else if (type == "onpaste")
+	return PASTE_EVENT;
     else if (type == "dragenter")
 	return DRAGENTER_EVENT;
     else if (type == "dragover")
@@ -277,6 +289,18 @@ DOMString EventImpl::idToType(EventImpl::EventId id)
 	    return "mousemove";
 	case MOUSEOUT_EVENT:
 	    return "mouseout";
+        case BEFORECUT_EVENT:
+            return "onbeforecut";
+	case CUT_EVENT:
+            return "oncut";
+	case BEFORECOPY_EVENT:
+            return "onbeforecopy";
+	case COPY_EVENT:
+            return "oncopy";
+	case BEFOREPASTE_EVENT:
+            return "onbeforepaste";
+	case PASTE_EVENT:
+            return "onpaste";
 	case DRAGENTER_EVENT:
             return "dragenter";
 	case DRAGOVER_EVENT:
@@ -386,6 +410,16 @@ bool EventImpl::isKeyboardEvent() const
     return false;
 }
 
+bool EventImpl::isDragEvent() const
+{
+    return false;
+}
+
+bool EventImpl::isClipboardEvent() const
+{
+    return false;
+}
+
 // -----------------------------------------------------------------------------
 
 UIEventImpl::UIEventImpl()
@@ -565,6 +599,14 @@ bool MouseEventImpl::isMouseEvent() const
     return true;
 }
 
+bool MouseEventImpl::isDragEvent() const
+{
+    return (m_id == EventImpl::DRAGENTER_EVENT || m_id == EventImpl::DRAGOVER_EVENT
+            || m_id == EventImpl::DRAGLEAVE_EVENT || m_id == EventImpl::DROP_EVENT 
+            || m_id == EventImpl::DRAGSTART_EVENT || m_id == EventImpl::DRAG_EVENT
+            || m_id == EventImpl::DRAGEND_EVENT);
+}
+
 //---------------------------------------------------------------------------------------------
 
 KeyboardEventImpl::KeyboardEventImpl()
@@ -794,6 +836,31 @@ bool MutationEventImpl::isMutationEvent() const
 
 // -----------------------------------------------------------------------------
 
+ClipboardEventImpl::ClipboardEventImpl()
+{
+    m_clipboard = 0;
+}
+
+ClipboardEventImpl::ClipboardEventImpl(EventId _id, bool canBubbleArg, bool cancelableArg, ClipboardImpl *clipboardArg)
+  : EventImpl(_id, canBubbleArg, cancelableArg), m_clipboard(clipboardArg)
+{
+      if (m_clipboard)
+          m_clipboard->ref();
+}
+
+ClipboardEventImpl::~ClipboardEventImpl()
+{
+    if (m_clipboard)
+        m_clipboard->deref();
+}
+
+bool ClipboardEventImpl::isClipboardEvent() const
+{
+    return true;
+}
+
+// -----------------------------------------------------------------------------
+
 RegisteredEventListener::RegisteredEventListener(EventImpl::EventId _id, EventListener *_listener, bool _useCapture)
 {
     id = _id;
diff --git a/WebCore/khtml/xml/dom2_eventsimpl.h b/WebCore/khtml/xml/dom2_eventsimpl.h
index be3fc4a..22880d4 100644
--- a/WebCore/khtml/xml/dom2_eventsimpl.h
+++ b/WebCore/khtml/xml/dom2_eventsimpl.h
@@ -60,6 +60,13 @@ public:
         MOUSEOVER_EVENT,
         MOUSEMOVE_EVENT,
         MOUSEOUT_EVENT,
+        // IE copy/paste events
+        BEFORECUT_EVENT,
+        CUT_EVENT,
+        BEFORECOPY_EVENT,
+        COPY_EVENT,
+        BEFOREPASTE_EVENT,
+        PASTE_EVENT,
         // IE drag and drop events
         DRAGENTER_EVENT,
         DRAGOVER_EVENT,
@@ -135,6 +142,8 @@ public:
     virtual bool isMouseEvent() const;
     virtual bool isMutationEvent() const;
     virtual bool isKeyboardEvent() const;
+    virtual bool isDragEvent() const;   // a subset of mouse events
+    virtual bool isClipboardEvent() const;
 
     bool propagationStopped() const { return m_propagationStopped; }
     bool defaultPrevented() const { return m_defaultPrevented; }
@@ -246,6 +255,7 @@ public:
 			unsigned short buttonArg,
 			const Node &relatedTargetArg);
     virtual bool isMouseEvent() const;
+    virtual bool isDragEvent() const;
 protected:
     long m_screenX;
     long m_screenY;
@@ -358,6 +368,17 @@ protected:
     unsigned short m_attrChange;
 };
 
+class ClipboardEventImpl : public EventImpl {
+public:
+    ClipboardEventImpl();
+    ClipboardEventImpl(EventId _id, bool canBubbleArg, bool cancelableArg, ClipboardImpl *clipboardArg);
+    ~ClipboardEventImpl();
+
+    ClipboardImpl *clipboard() const { return m_clipboard; }
+    virtual bool isClipboardEvent() const;
+protected:
+    ClipboardImpl *m_clipboard;
+};
 
 class RegisteredEventListener {
 public:
diff --git a/WebCore/kwq/KWQClipboard.h b/WebCore/kwq/KWQClipboard.h
index 6a84ca0..7933a70 100644
--- a/WebCore/kwq/KWQClipboard.h
+++ b/WebCore/kwq/KWQClipboard.h
@@ -28,9 +28,18 @@
 #ifndef KWQCLIPBOARD_H_
 #define KWQCLIPBOARD_H_
 
-#import <AppKit/AppKit.h>
 #include "xml/dom2_eventsimpl.h"
 
+#ifdef __OBJC__
+ at class NSImage;
+ at class NSPasteboard;
+#else
+class NSImage;
+class NSPasteboard;
+#endif
+
+typedef unsigned NSDragOperation;
+
 class KWQKHTMLPart;
 
 class KWQClipboard : public DOM::ClipboardImpl
diff --git a/WebCore/kwq/KWQClipboard.mm b/WebCore/kwq/KWQClipboard.mm
index c567511..a9685a6 100644
--- a/WebCore/kwq/KWQClipboard.mm
+++ b/WebCore/kwq/KWQClipboard.mm
@@ -29,6 +29,8 @@
 #import "KWQStringList.h"
 #import "WebCoreGraphicsBridge.h"
 
+#import <AppKit/AppKit.h>
+
 using DOM::DOMString;
 
 KWQClipboard::KWQClipboard(bool forDragging, NSPasteboard *pasteboard, AccessPolicy policy, KWQKHTMLPart *part)
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index f434a0b..9678c8d 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -41,6 +41,7 @@
 #include <JavaScriptCore/runtime.h>
 
 #include "KWQDict.h"
+#include "KWQClipboard.h"
 
 class KHTMLPartPrivate;
 class KWQClipboard;
@@ -232,6 +233,10 @@ public:
     void dragSourceMovedTo(const QPoint &loc);
     void dragSourceEndedAt(const QPoint &loc);
 
+    bool tryCut();
+    bool tryCopy();
+    bool tryPaste();
+
     bool sendContextMenuEvent(NSEvent *);
 
     void clearTimers();
@@ -329,9 +334,10 @@ private:
     static NSView *documentViewForNode(DOM::NodeImpl *);
     
     bool dragHysteresisExceeded(float dragLocationX, float dragLocationY) const;
+    bool dispatchCPPEvent(int eventId, KWQClipboard::AccessPolicy policy);
     bool dispatchDragSrcEvent(int eventId, const QPoint &loc) const;
 
-    NSImage *KWQKHTMLPart::imageFromRect(NSRect rect) const;
+    NSImage *imageFromRect(NSRect rect) const;
 
     void freeClipboard();
 
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 5998336..32892d2 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -70,6 +70,7 @@
 #undef _KWQ_TIMING
 
 using DOM::AtomicString;
+using DOM::ClipboardEventImpl;
 using DOM::DocumentImpl;
 using DOM::DOMString;
 using DOM::ElementImpl;
@@ -2080,6 +2081,61 @@ void KWQKHTMLPart::dragSourceEndedAt(const QPoint &loc)
     _dragSrc = 0;
 }
 
+bool KWQKHTMLPart::dispatchCPPEvent(int eventId, KWQClipboard::AccessPolicy policy)
+{
+    NodeImpl *target = d->m_selection.start().element();
+    if (!target) {
+        target = docImpl()->body();
+    }
+
+    KWQClipboard *clipboard = new KWQClipboard(false, [NSPasteboard generalPasteboard], (KWQClipboard::AccessPolicy)policy);
+    clipboard->ref();
+
+    int exceptioncode = 0;
+    EventImpl *evt = new ClipboardEventImpl(static_cast<EventImpl::EventId>(eventId), true, true, clipboard);
+    evt->ref();
+    target->dispatchEvent(evt, exceptioncode, true);
+    bool noDefaultProcessing = evt->defaultPrevented();
+    evt->deref();
+
+    // invalidate clipboard here for security
+    clipboard->setAccessPolicy(KWQClipboard::Numb);
+    clipboard->deref();
+
+    return !noDefaultProcessing;
+}
+
+// In the next three functions, for now, we send the "before" event to gain some compatibility with WinIE.
+// WinIE uses onbeforecut and onbeforepaste to enables the cut and paste menu items, but we don't yet.  They
+// also send onbeforecopy, apparently for symmetry, but it doesn't affect the menu items.  The return of these
+// routines should not block the sending of non-"before" event.
+
+bool KWQKHTMLPart::tryCut()
+{
+    // Must be done before oncut adds types and data to the pboard,
+    // also done for security, as it erases data from the last copy/paste.
+    [[NSPasteboard generalPasteboard] declareTypes:[NSArray array] owner:nil];
+
+    dispatchCPPEvent(EventImpl::BEFORECUT_EVENT, KWQClipboard::Writable);
+    return !dispatchCPPEvent(EventImpl::CUT_EVENT, KWQClipboard::Writable);
+}
+
+bool KWQKHTMLPart::tryCopy()
+{
+    // Must be done before oncopy adds types and data to the pboard,
+    // also done for security, as it erases data from the last copy/paste.
+    [[NSPasteboard generalPasteboard] declareTypes:[NSArray array] owner:nil];
+
+    dispatchCPPEvent(EventImpl::BEFORECOPY_EVENT, KWQClipboard::Writable);
+    return !dispatchCPPEvent(EventImpl::COPY_EVENT, KWQClipboard::Writable);
+}
+
+bool KWQKHTMLPart::tryPaste()
+{
+    dispatchCPPEvent(EventImpl::BEFOREPASTE_EVENT, KWQClipboard::Readable);
+    return !dispatchCPPEvent(EventImpl::PASTE_EVENT, KWQClipboard::Readable);
+}
+
 void KWQKHTMLPart::khtmlMouseReleaseEvent(MouseReleaseEvent *event)
 {
     NSView *view = mouseDownViewIfStillGood();
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 5aa9b6a..1ab3f45 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -323,6 +323,10 @@ typedef enum {
 - (void)dragSourceMovedTo:(NSPoint)windowLoc;
 - (void)dragSourceEndedAt:(NSPoint)windowLoc operation:(NSDragOperation)operation;
 
+- (BOOL)tryDHTMLCut;
+- (BOOL)tryDHTMLCopy;
+- (BOOL)tryDHTMLPaste;
+
 @end
 
 // The WebCoreBridge protocol contains methods for use by the WebCore side of the bridge.
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index fa972cc..3b2a785 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -1649,4 +1649,19 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
     }
 }
 
+- (BOOL)tryDHTMLCut
+{
+    return _part->tryCut();
+}
+
+- (BOOL)tryDHTMLCopy
+{
+    return _part->tryCopy();
+}
+
+- (BOOL)tryDHTMLPaste
+{
+    return _part->tryPaste();
+}
+
 @end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 536fc94..19fc80f 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,14 @@
+2004-06-13  Trey Matteson  <trey at apple.com>
+
+	Support for DHTML cut/copy/paste.
+
+        Reviewed by NOBODY (OOPS!).
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView copy:]):  Give DHTML first crack at executing the command.
+        (-[WebHTMLView cut:]):  Ditto
+        (-[WebHTMLView paste:]):  Ditto
+
 2004-06-14  Chris Blumenberg  <cblu at apple.com>
 
 	Fixed: <rdar://problem/3674456> make new drag & drop API compatible with DHTML dragging
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 9a1ba81..6cd0efb 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -2460,6 +2460,10 @@ static WebHTMLView *lastHitView = nil;
 
 - (void)copy:(id)sender
 {
+    if ([[self _bridge] tryDHTMLCopy]) {
+        return;     // DHTML did the whole operation
+    }
+
     if (![self _haveSelection]) {
         NSBeep();
         return;
@@ -2468,7 +2472,11 @@ static WebHTMLView *lastHitView = nil;
 }
 
 - (void)cut:(id)sender
-{   
+{
+    if ([[self _bridge] tryDHTMLCut]) {
+        return;     // DHTML did the whole operation
+    }
+
     if (![self _haveSelection]) {
         NSBeep();
         return;
@@ -2488,6 +2496,10 @@ static WebHTMLView *lastHitView = nil;
 
 - (void)paste:(id)sender
 {
+    if ([[self _bridge] tryDHTMLPaste]) {
+        return;     // DHTML did the whole operation
+    }
+
     [self _pasteWithPasteboard:[NSPasteboard generalPasteboard] allowPlainText:YES];
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list