[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:52:15 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit c647506ca077dd14cd89cdbe1e1af14ca028f93b
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Aug 18 21:12:41 2003 +0000
WebCore:
Reviewed by Maciej.
- fixed 3299893 -- oncontextmenu support
* kwq/WebCoreBridge.h: Added sendContextMenuEvent: method.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge sendContextMenuEvent:]): Added.
Calls sendContextMenuEvent on the part.
* kwq/KWQKHTMLPart.h: Added sendContextMenuEvent member function.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::sendContextMenuEvent): Added. Sets up
a suitable mouse event and calls dispatchMouseEvent for CONTEXTMENU_EVENT.
* khtml/ecma/kjs_dom.cpp: Added oncontextmenu to DOMNode's list of properties.
(DOMNode::getValueProperty): Added case for OnContextMenu.
(DOMNode::putValue): Added case for OnContextMenu.
* khtml/ecma/kjs_dom.h: Added constant for OnContextMenu.
* khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseAttribute):
Added case for ATTR_ONCONTEXTMENU.
* khtml/misc/htmlattrs.in: Added oncontextmenu.
* khtml/xml/dom2_eventsimpl.cpp:
(EventImpl::typeToId): Added case for CONTEXTMENU_EVENT.
(EventImpl::idToType): Added case for CONTEXTMENU_EVENT.
* khtml/xml/dom2_eventsimpl.h: Added CONTEXTMENU_EVENT.
* khtml/ecma/kjs_dom.lut.h: Regenerated.
* khtml/misc/htmlattrs.c: Regenerated.
* khtml/misc/htmlattrs.h: Regenerated.
WebKit:
Reviewed by Maciej.
- fixed 3299893 -- oncontextmenu support
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView menuForEvent:]): Call sendContextMenuEvent: on the bridge, and
don't show a menu if the event is handled over in WebCore.
(-[WebHTMLView mouseDown:]): Don't send a mouse down event in the case where we
already sent a context menu event and decided not to put up a real context menu.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 800cf53..d58e9a2 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -2,6 +2,36 @@
Reviewed by Maciej.
+ - fixed 3299893 -- oncontextmenu support
+
+ * kwq/WebCoreBridge.h: Added sendContextMenuEvent: method.
+ * kwq/WebCoreBridge.mm: (-[WebCoreBridge sendContextMenuEvent:]): Added.
+ Calls sendContextMenuEvent on the part.
+
+ * kwq/KWQKHTMLPart.h: Added sendContextMenuEvent member function.
+ * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::sendContextMenuEvent): Added. Sets up
+ a suitable mouse event and calls dispatchMouseEvent for CONTEXTMENU_EVENT.
+
+ * khtml/ecma/kjs_dom.cpp: Added oncontextmenu to DOMNode's list of properties.
+ (DOMNode::getValueProperty): Added case for OnContextMenu.
+ (DOMNode::putValue): Added case for OnContextMenu.
+ * khtml/ecma/kjs_dom.h: Added constant for OnContextMenu.
+ * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseAttribute):
+ Added case for ATTR_ONCONTEXTMENU.
+ * khtml/misc/htmlattrs.in: Added oncontextmenu.
+ * khtml/xml/dom2_eventsimpl.cpp:
+ (EventImpl::typeToId): Added case for CONTEXTMENU_EVENT.
+ (EventImpl::idToType): Added case for CONTEXTMENU_EVENT.
+ * khtml/xml/dom2_eventsimpl.h: Added CONTEXTMENU_EVENT.
+
+ * khtml/ecma/kjs_dom.lut.h: Regenerated.
+ * khtml/misc/htmlattrs.c: Regenerated.
+ * khtml/misc/htmlattrs.h: Regenerated.
+
+2003-08-18 Darin Adler <darin at apple.com>
+
+ Reviewed by Maciej.
+
- fixed 3381295 -- regular expression matches for text with UTF-16 surrogates will give incorrect results
* kwq/KWQRegExp.mm: (QRegExp::match): Removed local copy of convertCharacterOffsetsToUTF8ByteOffsets
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 800cf53..d58e9a2 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -2,6 +2,36 @@
Reviewed by Maciej.
+ - fixed 3299893 -- oncontextmenu support
+
+ * kwq/WebCoreBridge.h: Added sendContextMenuEvent: method.
+ * kwq/WebCoreBridge.mm: (-[WebCoreBridge sendContextMenuEvent:]): Added.
+ Calls sendContextMenuEvent on the part.
+
+ * kwq/KWQKHTMLPart.h: Added sendContextMenuEvent member function.
+ * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::sendContextMenuEvent): Added. Sets up
+ a suitable mouse event and calls dispatchMouseEvent for CONTEXTMENU_EVENT.
+
+ * khtml/ecma/kjs_dom.cpp: Added oncontextmenu to DOMNode's list of properties.
+ (DOMNode::getValueProperty): Added case for OnContextMenu.
+ (DOMNode::putValue): Added case for OnContextMenu.
+ * khtml/ecma/kjs_dom.h: Added constant for OnContextMenu.
+ * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseAttribute):
+ Added case for ATTR_ONCONTEXTMENU.
+ * khtml/misc/htmlattrs.in: Added oncontextmenu.
+ * khtml/xml/dom2_eventsimpl.cpp:
+ (EventImpl::typeToId): Added case for CONTEXTMENU_EVENT.
+ (EventImpl::idToType): Added case for CONTEXTMENU_EVENT.
+ * khtml/xml/dom2_eventsimpl.h: Added CONTEXTMENU_EVENT.
+
+ * khtml/ecma/kjs_dom.lut.h: Regenerated.
+ * khtml/misc/htmlattrs.c: Regenerated.
+ * khtml/misc/htmlattrs.h: Regenerated.
+
+2003-08-18 Darin Adler <darin at apple.com>
+
+ Reviewed by Maciej.
+
- fixed 3381295 -- regular expression matches for text with UTF-16 surrogates will give incorrect results
* kwq/KWQRegExp.mm: (QRegExp::match): Removed local copy of convertCharacterOffsetsToUTF8ByteOffsets
diff --git a/WebCore/khtml/ecma/kjs_dom.cpp b/WebCore/khtml/ecma/kjs_dom.cpp
index f1e2c39..7c41446 100644
--- a/WebCore/khtml/ecma/kjs_dom.cpp
+++ b/WebCore/khtml/ecma/kjs_dom.cpp
@@ -105,6 +105,7 @@ bool DOMNode::toBoolean(ExecState *) const
onblur DOMNode::OnBlur DontDelete
onchange DOMNode::OnChange DontDelete
onclick DOMNode::OnClick DontDelete
+ oncontextmenu DOMNode::OnContextMenu DontDelete
ondblclick DOMNode::OnDblClick DontDelete
ondragdrop DOMNode::OnDragDrop DontDelete
onerror DOMNode::OnError DontDelete
@@ -187,6 +188,8 @@ Value DOMNode::getValueProperty(ExecState *exec, int token) const
return getListener(DOM::EventImpl::CHANGE_EVENT);
case OnClick:
return getListener(DOM::EventImpl::KHTML_CLICK_EVENT);
+ case OnContextMenu:
+ return getListener(DOM::EventImpl::CONTEXTMENU_EVENT);
case OnDblClick:
return getListener(DOM::EventImpl::KHTML_DBLCLICK_EVENT);
case OnDragDrop:
@@ -300,6 +303,9 @@ void DOMNode::putValue(ExecState *exec, int token, const Value& value, int /*att
case OnClick:
setListener(exec,DOM::EventImpl::KHTML_CLICK_EVENT,value);
break;
+ case OnContextMenu:
+ setListener(exec,DOM::EventImpl::CONTEXTMENU_EVENT,value);
+ break;
case OnDblClick:
setListener(exec,DOM::EventImpl::KHTML_DBLCLICK_EVENT,value);
break;
diff --git a/WebCore/khtml/ecma/kjs_dom.h b/WebCore/khtml/ecma/kjs_dom.h
index f44217f..b41a563 100644
--- a/WebCore/khtml/ecma/kjs_dom.h
+++ b/WebCore/khtml/ecma/kjs_dom.h
@@ -59,7 +59,7 @@ namespace KJS {
ReplaceChild, RemoveChild, AppendChild, HasAttributes, HasChildNodes,
CloneNode, Normalize, IsSupported, AddEventListener, RemoveEventListener,
DispatchEvent, Contains,
- OnAbort, OnBlur, OnChange, OnClick, OnDblClick, OnDragDrop, OnError,
+ OnAbort, OnBlur, OnChange, OnClick, OnContextMenu, OnDblClick, OnDragDrop, OnError,
OnFocus, OnKeyDown, OnKeyPress, OnKeyUp, OnLoad, OnMouseDown,
OnMouseMove, OnMouseOut, OnMouseOver, OnMouseUp, OnMove, OnReset,
OnResize, OnSelect, OnSubmit, OnUnload,
diff --git a/WebCore/khtml/ecma/kjs_dom.lut.h b/WebCore/khtml/ecma/kjs_dom.lut.h
index 4b68329..df39da1 100644
--- a/WebCore/khtml/ecma/kjs_dom.lut.h
+++ b/WebCore/khtml/ecma/kjs_dom.lut.h
@@ -29,11 +29,11 @@ namespace KJS {
const struct HashEntry DOMNodeTableEntries[] = {
{ "ondblclick", DOMNode::OnDblClick, DontDelete, 0, &DOMNodeTableEntries[58] },
- { "onsubmit", DOMNode::OnSubmit, DontDelete, 0, 0 },
+ { "oncontextmenu", DOMNode::OnContextMenu, DontDelete, 0, &DOMNodeTableEntries[62] },
{ 0, 0, 0, 0, 0 },
{ "onmousemove", DOMNode::OnMouseMove, DontDelete, 0, 0 },
{ "nextSibling", DOMNode::NextSibling, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[59] },
- { "onerror", DOMNode::OnError, DontDelete, 0, &DOMNodeTableEntries[65] },
+ { "onerror", DOMNode::OnError, DontDelete, 0, &DOMNodeTableEntries[66] },
{ 0, 0, 0, 0, 0 },
{ "onkeypress", DOMNode::OnKeyPress, DontDelete, 0, 0 },
{ "onmouseover", DOMNode::OnMouseOver, DontDelete, 0, 0 },
@@ -55,7 +55,7 @@ const struct HashEntry DOMNodeTableEntries[] = {
{ "onclick", DOMNode::OnClick, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
{ "namespaceURI", DOMNode::NamespaceURI, DontDelete|ReadOnly, 0, 0 },
- { "ondragdrop", DOMNode::OnDragDrop, DontDelete, 0, &DOMNodeTableEntries[66] },
+ { "ondragdrop", DOMNode::OnDragDrop, DontDelete, 0, &DOMNodeTableEntries[67] },
{ "localName", DOMNode::LocalName, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
{ "clientHeight", DOMNode::ClientHeight, DontDelete|ReadOnly, 0, 0 },
@@ -74,12 +74,12 @@ const struct HashEntry DOMNodeTableEntries[] = {
{ 0, 0, 0, 0, 0 },
{ "parentElement", DOMNode::ParentElement, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "firstChild", DOMNode::FirstChild, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[67] },
+ { "firstChild", DOMNode::FirstChild, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[68] },
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
{ "prefix", DOMNode::Prefix, DontDelete, 0, 0 },
{ "parentNode", DOMNode::ParentNode, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[55] },
- { "nodeValue", DOMNode::NodeValue, DontDelete, 0, &DOMNodeTableEntries[64] },
+ { "nodeValue", DOMNode::NodeValue, DontDelete, 0, &DOMNodeTableEntries[65] },
{ "offsetLeft", DOMNode::OffsetLeft, DontDelete|ReadOnly, 0, 0 },
{ "onblur", DOMNode::OnBlur, DontDelete, 0, &DOMNodeTableEntries[61] },
{ "onresize", DOMNode::OnResize, DontDelete, 0, 0 },
@@ -87,9 +87,10 @@ const struct HashEntry DOMNodeTableEntries[] = {
{ "onchange", DOMNode::OnChange, DontDelete, 0, 0 },
{ "onfocus", DOMNode::OnFocus, DontDelete, 0, 0 },
{ "onkeydown", DOMNode::OnKeyDown, DontDelete, 0, &DOMNodeTableEntries[60] },
- { "onmousedown", DOMNode::OnMouseDown, DontDelete, 0, &DOMNodeTableEntries[62] },
- { "onmove", DOMNode::OnMove, DontDelete, 0, &DOMNodeTableEntries[63] },
+ { "onmousedown", DOMNode::OnMouseDown, DontDelete, 0, &DOMNodeTableEntries[63] },
+ { "onmove", DOMNode::OnMove, DontDelete, 0, &DOMNodeTableEntries[64] },
{ "onreset", DOMNode::OnReset, DontDelete, 0, 0 },
+ { "onsubmit", DOMNode::OnSubmit, DontDelete, 0, 0 },
{ "offsetWidth", DOMNode::OffsetWidth, DontDelete|ReadOnly, 0, 0 },
{ "offsetParent", DOMNode::OffsetParent, DontDelete|ReadOnly, 0, 0 },
{ "clientWidth", DOMNode::ClientWidth, DontDelete|ReadOnly, 0, 0 },
@@ -98,7 +99,7 @@ const struct HashEntry DOMNodeTableEntries[] = {
{ "scrollHeight", DOMNode::ScrollHeight, DontDelete|ReadOnly, 0, 0 }
};
-const struct HashTable DOMNodeTable = { 2, 68, DOMNodeTableEntries, 55 };
+const struct HashTable DOMNodeTable = { 2, 69, DOMNodeTableEntries, 55 };
}; // namespace
diff --git a/WebCore/khtml/html/html_elementimpl.cpp b/WebCore/khtml/html/html_elementimpl.cpp
index af4ef92..0628e63 100644
--- a/WebCore/khtml/html/html_elementimpl.cpp
+++ b/WebCore/khtml/html/html_elementimpl.cpp
@@ -155,6 +155,10 @@ void HTMLElementImpl::parseAttribute(AttributeImpl *attr)
setHTMLEventListener(EventImpl::KHTML_CLICK_EVENT,
getDocument()->createHTMLEventListener(attr->value().string()));
break;
+ case ATTR_ONCONTEXTMENU:
+ setHTMLEventListener(EventImpl::CONTEXTMENU_EVENT,
+ getDocument()->createHTMLEventListener(attr->value().string()));
+ break;
case ATTR_ONDBLCLICK:
setHTMLEventListener(EventImpl::KHTML_DBLCLICK_EVENT,
getDocument()->createHTMLEventListener(attr->value().string()));
diff --git a/WebCore/khtml/misc/htmlattrs.c b/WebCore/khtml/misc/htmlattrs.c
index c01a115..862ce32 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 = 898, duplicates = 1 */
+/* maximum key range = 914, 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[] =
{
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 0, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 20, 35, 0,
- 195, 0, 35, 40, 95, 15, 5, 55, 0, 70,
- 0, 0, 45, 0, 185, 20, 15, 65, 80, 40,
- 10, 140, 45, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922, 922, 922, 922, 922,
- 922, 922, 922, 922, 922, 922
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 0, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 35, 25, 0,
+ 75, 0, 45, 90, 135, 55, 0, 305, 0, 185,
+ 0, 0, 50, 5, 115, 5, 15, 15, 40, 35,
+ 70, 55, 5, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923, 923, 923, 923, 923,
+ 923, 923, 923, 923, 923, 923
};
register int hval = len;
@@ -95,240 +95,240 @@ findAttr (register const char *str, register unsigned int len)
{
enum
{
- TOTAL_KEYWORDS = 144,
+ TOTAL_KEYWORDS = 145,
MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 14,
- MIN_HASH_VALUE = 24,
- MAX_HASH_VALUE = 921
+ MIN_HASH_VALUE = 9,
+ MAX_HASH_VALUE = 922
};
static const struct attrs wordlist_attr[] =
{
{"cols", ATTR_COLS},
- {"cite", ATTR_CITE},
+ {"onselect", ATTR_ONSELECT},
{"content", ATTR_CONTENT},
+ {"object", ATTR_OBJECT},
+ {"class", ATTR_CLASS},
{"alt", ATTR_ALT},
- {"onselect", ATTR_ONSELECT},
- {"text", ATTR_TEXT},
- {"title", ATTR_TITLE},
+ {"scope", ATTR_SCOPE},
{"left", ATTR_LEFT},
- {"action", ATTR_ACTION},
- {"face", ATTR_FACE},
{"label", ATTR_LABEL},
- {"object", ATTR_OBJECT},
{"top", ATTR_TOP},
- {"lang", ATTR_LANG},
- {"class", ATTR_CLASS},
- {"axis", ATTR_AXIS},
- {"scope", ATTR_SCOPE},
- {"link", ATTR_LINK},
- {"onclick", ATTR_ONCLICK},
- {"align", ATTR_ALIGN},
{"size", ATTR_SIZE},
- {"plain", ATTR_PLAIN},
- {"accept", ATTR_ACCEPT},
- {"span", ATTR_SPAN},
- {"colspan", ATTR_COLSPAN},
- {"name", ATTR_NAME},
- {"alink", ATTR_ALINK},
- {"pagex", ATTR_PAGEX},
- {"nosave", ATTR_NOSAVE},
{"onfocus", ATTR_ONFOCUS},
- {"cellspacing", ATTR_CELLSPACING},
- {"vlink", ATTR_VLINK},
- {"compact", ATTR_COMPACT},
- {"valign", ATTR_VALIGN},
- {"onchange", ATTR_ONCHANGE},
- {"challenge", ATTR_CHALLENGE},
- {"unknown", ATTR_UNKNOWN},
- {"value", ATTR_VALUE},
- {"vspace", ATTR_VSPACE},
- {"ismap", ATTR_ISMAP},
+ {"cite", ATTR_CITE},
+ {"code", ATTR_CODE},
{"style", ATTR_STYLE},
- {"html", ATTR_HTML},
- {"shape", ATTR_SHAPE},
- {"hspace", ATTR_HSPACE},
+ {"face", ATTR_FACE},
+ {"nosave", ATTR_NOSAVE},
+ {"title", ATTR_TITLE},
+ {"span", ATTR_SPAN},
+ {"value", ATTR_VALUE},
+ {"colspan", ATTR_COLSPAN},
+ {"selected", ATTR_SELECTED},
+ {"text", ATTR_TEXT},
+ {"accept", ATTR_ACCEPT},
+ {"action", ATTR_ACTION},
+ {"onload", ATTR_ONLOAD},
{"rel", ATTR_REL},
{"color", ATTR_COLOR},
- {"scheme", ATTR_SCHEME},
- {"language", ATTR_LANGUAGE},
- {"code", ATTR_CODE},
+ {"src", ATTR_SRC},
{"type", ATTR_TYPE},
{"enctype", ATTR_ENCTYPE},
- {"src", ATTR_SRC},
- {"clear", ATTR_CLEAR},
+ {"lang", ATTR_LANG},
{"id", ATTR_ID},
- {"multiple", ATTR_MULTIPLE},
- {"onload", ATTR_ONLOAD},
- {"for", ATTR_FOR},
- {"usemap", ATTR_USEMAP},
+ {"onunload", ATTR_ONUNLOAD},
+ {"vspace", ATTR_VSPACE},
+ {"rules", ATTR_RULES},
{"onreset", ATTR_ONRESET},
- {"onsubmit", ATTR_ONSUBMIT},
- {"selected", ATTR_SELECTED},
- {"autocomplete", ATTR_AUTOCOMPLETE},
- {"onmouseout", ATTR_ONMOUSEOUT},
+ {"plain", ATTR_PLAIN},
+ {"codebase", ATTR_CODEBASE},
+ {"clear", ATTR_CLEAR},
+ {"rev", ATTR_REV},
{"rows", ATTR_ROWS},
- {"pagey", ATTR_PAGEY},
+ {"onblur", ATTR_ONBLUR},
+ {"for", ATTR_FOR},
{"data", ATTR_DATA},
- {"maxlength", ATTR_MAXLENGTH},
- {"start", ATTR_START},
- {"onabort", ATTR_ONABORT},
+ {"axis", ATTR_AXIS},
{"longdesc", ATTR_LONGDESC},
- {"accesskey", ATTR_ACCESSKEY},
- {"height", ATTR_HEIGHT},
- {"bgcolor", ATTR_BGCOLOR},
- {"rev", ATTR_REV},
- {"scrolling", ATTR_SCROLLING},
- {"z-index", ATTR_Z_INDEX},
+ {"classid", ATTR_CLASSID},
+ {"align", ATTR_ALIGN},
{"noresize", ATTR_NORESIZE},
{"onresize", ATTR_ONRESIZE},
- {"onmouseup", ATTR_ONMOUSEUP},
- {"rules", ATTR_RULES},
- {"classid", ATTR_CLASSID},
- {"codebase", ATTR_CODEBASE},
+ {"start", ATTR_START},
+ {"onabort", ATTR_ONABORT},
+ {"coords", ATTR_COORDS},
+ {"codetype", ATTR_CODETYPE},
{"abbr", ATTR_ABBR},
- {"pluginpage", ATTR_PLUGINPAGE},
- {"target", ATTR_TARGET},
- {"profile", ATTR_PROFILE},
- {"onunload", ATTR_ONUNLOAD},
- {"onblur", ATTR_ONBLUR},
+ {"z-index", ATTR_Z_INDEX},
+ {"standby", ATTR_STANDBY},
+ {"valuetype", ATTR_VALUETYPE},
+ {"version", ATTR_VERSION},
+ {"name", ATTR_NAME},
+ {"valign", ATTR_VALIGN},
+ {"shape", ATTR_SHAPE},
+ {"hspace", ATTR_HSPACE},
+ {"declare", ATTR_DECLARE},
+ {"pagey", ATTR_PAGEY},
+ {"bgcolor", ATTR_BGCOLOR},
{"wrap", ATTR_WRAP},
+ {"defer", ATTR_DEFER},
{"nowrap", ATTR_NOWRAP},
+ {"onmouseout", ATTR_ONMOUSEOUT},
+ {"cellspacing", ATTR_CELLSPACING},
+ {"rowspan", ATTR_ROWSPAN},
+ {"dir", ATTR_DIR},
+ {"pagex", ATTR_PAGEX},
+ {"noshade", ATTR_NOSHADE},
+ {"onchange", ATTR_ONCHANGE},
+ {"challenge", ATTR_CHALLENGE},
+ {"profile", ATTR_PROFILE},
+ {"language", ATTR_LANGUAGE},
+ {"scrolling", ATTR_SCROLLING},
+ {"target", ATTR_TARGET},
+ {"disabled", ATTR_DISABLED},
+ {"onmouseup", ATTR_ONMOUSEUP},
+ {"oversrc", ATTR_OVERSRC},
{"tabindex", ATTR_TABINDEX},
- {"pluginspage", ATTR_PLUGINSPAGE},
+ {"readonly", ATTR_READONLY},
{"char", ATTR_CHAR},
- {"media", ATTR_MEDIA},
- {"version", ATTR_VERSION},
- {"ondblclick", ATTR_ONDBLCLICK},
- {"onkeyup", ATTR_ONKEYUP},
- {"frame", ATTR_FRAME},
- {"onmousemove", ATTR_ONMOUSEMOVE},
- {"rowspan", ATTR_ROWSPAN},
+ {"compact", ATTR_COMPACT},
+ {"usemap", ATTR_USEMAP},
{"href", ATTR_HREF},
{"nohref", ATTR_NOHREF},
- {"noshade", ATTR_NOSHADE},
- {"datetime", ATTR_DATETIME},
- {"http-equiv", ATTR_HTTP_EQUIV},
+ {"onsubmit", ATTR_ONSUBMIT},
{"charset", ATTR_CHARSET},
- {"checked", ATTR_CHECKED},
- {"visibility", ATTR_VISIBILITY},
+ {"oncontextmenu", ATTR_ONCONTEXTMENU},
{"width", ATTR_WIDTH},
- {"prompt", ATTR_PROMPT},
- {"valuetype", ATTR_VALUETYPE},
- {"charoff", ATTR_CHAROFF},
- {"method", ATTR_METHOD},
- {"hreflang", ATTR_HREFLANG},
- {"leftmargin", ATTR_LEFTMARGIN},
- {"dir", ATTR_DIR},
- {"topmargin", ATTR_TOPMARGIN},
{"onmousedown", ATTR_ONMOUSEDOWN},
- {"archive", ATTR_ARCHIVE},
- {"codetype", ATTR_CODETYPE},
- {"coords", ATTR_COORDS},
- {"declare", ATTR_DECLARE},
- {"defer", ATTR_DEFER},
+ {"autocomplete", ATTR_AUTOCOMPLETE},
+ {"multiple", ATTR_MULTIPLE},
+ {"scheme", ATTR_SCHEME},
+ {"ismap", ATTR_ISMAP},
+ {"border", ATTR_BORDER},
+ {"html", ATTR_HTML},
+ {"http-equiv", ATTR_HTTP_EQUIV},
+ {"hidden", ATTR_HIDDEN},
{"pluginurl", ATTR_PLUGINURL},
- {"accept-charset", ATTR_ACCEPT_CHARSET},
+ {"onerror", ATTR_ONERROR},
+ {"media", ATTR_MEDIA},
+ {"unknown", ATTR_UNKNOWN},
+ {"link", ATTR_LINK},
+ {"onclick", ATTR_ONCLICK},
+ {"visibility", ATTR_VISIBILITY},
{"onmouseover", ATTR_ONMOUSEOVER},
- {"standby", ATTR_STANDBY},
+ {"headers", ATTR_HEADERS},
+ {"charoff", ATTR_CHAROFF},
+ {"frame", ATTR_FRAME},
+ {"archive", ATTR_ARCHIVE},
+ {"datetime", ATTR_DATETIME},
+ {"cellpadding", ATTR_CELLPADDING},
+ {"pluginpage", ATTR_PLUGINPAGE},
+ {"alink", ATTR_ALINK},
+ {"pluginspage", ATTR_PLUGINSPAGE},
+ {"vlink", ATTR_VLINK},
+ {"accesskey", ATTR_ACCESSKEY},
+ {"method", ATTR_METHOD},
+ {"accept-charset", ATTR_ACCEPT_CHARSET},
+ {"prompt", ATTR_PROMPT},
+ {"hreflang", ATTR_HREFLANG},
+ {"onkeyup", ATTR_ONKEYUP},
+ {"height", ATTR_HEIGHT},
+ {"onmousemove", ATTR_ONMOUSEMOVE},
+ {"bordercolor", ATTR_BORDERCOLOR},
+ {"ondblclick", ATTR_ONDBLCLICK},
{"onkeydown", ATTR_ONKEYDOWN},
+ {"checked", ATTR_CHECKED},
+ {"bgproperties", ATTR_BGPROPERTIES},
+ {"maxlength", ATTR_MAXLENGTH},
{"onkeypress", ATTR_ONKEYPRESS},
- {"oversrc", ATTR_OVERSRC},
- {"disabled", ATTR_DISABLED},
- {"hidden", ATTR_HIDDEN},
- {"cellpadding", ATTR_CELLPADDING},
- {"headers", ATTR_HEADERS},
- {"readonly", ATTR_READONLY},
- {"onerror", ATTR_ONERROR},
+ {"leftmargin", ATTR_LEFTMARGIN},
+ {"topmargin", ATTR_TOPMARGIN},
{"summary", ATTR_SUMMARY},
- {"bgproperties", ATTR_BGPROPERTIES},
- {"marginheight", ATTR_MARGINHEIGHT},
{"background", ATTR_BACKGROUND},
- {"border", ATTR_BORDER},
+ {"frameborder", ATTR_FRAMEBORDER},
{"marginwidth", ATTR_MARGINWIDTH},
- {"bordercolor", ATTR_BORDERCOLOR},
- {"frameborder", ATTR_FRAMEBORDER}
+ {"marginheight", ATTR_MARGINHEIGHT}
};
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, -1,
- 0, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 1, -1, -1, 2, 3, -1,
- -1, -1, -1, 4, 5, -1, -1, -1,
- -1, -1, 6, -1, -1, -1, 7, -1,
- 8, -1, -1, 9, 10, 11, -1, 12,
- 13, 14, -1, -1, -1, 15, 16, -1,
- -1, -1, 17, -1, -1, 18, -1, -1,
- 19, -1, -1, -1, 20, 21, 22, -1,
- -1, 23, -1, -1, 24, -1, 25, 26,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- 27, -1, -1, -1, -1, -1, 28, 29,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 30,
- -1, -1, -1, 31, -1, 32, -1, -1,
- -1, 33, -1, 34, 35, -1, -1, 36,
- -1, -1, 37, 38, -1, -1, -1, 39,
- -1, -1, -1, -1, 40, -1, -1, -1,
- 41, 42, 43, -1, 44, -1, 45, 46,
- -1, 47, -1, -1, -1, -1, -1, 48,
- -1, -1, -1, -1, 49, -1, -1, 50,
- 51, -1, 52, -1, 53, -1, -1, -1,
- -1, -1, 54, -1, -1, 55, -1, 56,
- -1, -1, 57, 58, 59, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 60, -1,
- -1, -1, 61, -1, -1, 62, -1, -1,
- -1, 63, 64, -1, -1, -1, 65, -1,
- -1, -1, -1, 66, 67, -1, 68, 69,
- 70, -1, 71, 72, 73, 74, -1, -1,
- 75, -427, 78, 79, -1, 80, 81, 82,
- 83, 84, -68, -2, -1, -1, -1, 85,
- 86, -1, -1, 87, -1, -1, 88, -1,
- 89, -1, 90, -1, -1, 91, -1, -1,
- 92, 93, -1, 94, -1, -1, 95, -1,
- 96, -1, -1, 97, 98, 99, -1, 100,
- -1, 101, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 102, 103, -1, 104, -1, 105, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- 106, -1, -1, -1, -1, -1, -1, -1,
- 107, -1, -1, -1, -1, 108, 109, -1,
- -1, -1, -1, -1, -1, -1, 110, -1,
- -1, 111, -1, -1, -1, 112, -1, 113,
+ -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, -1, -1, 2, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3, -1,
+ -1, -1, 4, -1, -1, 5, -1, -1,
+ -1, -1, -1, -1, 6, -1, -1, -1,
+ 7, 8, -1, -1, 9, 10, -1, -1,
+ 11, -1, 12, -1, -1, -1, -1, 13,
+ 14, -1, -1, -1, 15, -1, 16, -1,
+ -1, -1, 17, -1, -1, -1, 18, 19,
+ -1, 20, -1, -1, -1, -1, -1, 21,
+ 22, -1, 23, -1, -1, -1, -1, 24,
+ -1, -1, -1, -1, 25, -1, 26, -1,
+ 27, -1, -1, 28, 29, -1, -1, 30,
+ -1, 31, -1, -1, 32, 33, -1, -1,
+ 34, -1, -1, -1, 35, -1, 36, -1,
+ -1, 37, -1, -1, 38, -1, -1, -1,
+ -1, -1, -1, 39, -1, -1, 40, 41,
+ -1, 42, -1, 43, 44, -1, -1, -1,
+ -1, 45, -1, -1, -1, -1, -1, -1,
+ -1, -1, 46, -1, -1, -1, 47, -1,
+ -1, 48, -1, -1, -337, -1, 51, -96,
+ -2, -1, -1, -1, -1, 52, -1, -1,
+ -1, 53, -1, 54, 55, -1, -1, -1,
+ -1, -1, -1, -1, 56, -1, -1, -1,
+ -1, 57, -1, 58, -1, -1, 59, -1,
+ 60, -1, 61, -1, -1, -1, 62, 63,
+ 64, -1, -1, 65, -1, 66, -1, 67,
+ 68, 69, -1, -1, -1, 70, 71, 72,
+ 73, -1, 74, -1, -1, -1, -1, -1,
+ -1, 75, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 76, 77, -1, -1,
+ 78, 79, 80, -1, 81, -1, 82, 83,
+ -1, -1, 84, 85, -1, -1, -1, -1,
+ 86, 87, -1, -1, 88, -1, -1, -1,
+ 89, -1, -1, 90, -1, 91, -1, -1,
+ -1, -1, -1, -1, 92, -1, -1, -1,
+ 93, 94, -1, -1, -1, -1, -1, -1,
+ 95, -1, -1, -1, -1, -1, 96, 97,
+ 98, -1, -1, 99, -1, -1, -1, 100,
+ 101, -1, -1, 102, 103, -1, -1, -1,
+ -1, -1, 104, -1, -1, 105, -1, -1,
+ 106, -1, -1, 107, -1, -1, -1, -1,
+ -1, -1, 108, -1, 109, -1, -1, 110,
+ -1, -1, 111, 112, 113, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 114, -1,
- -1, -1, -1, -1, -1, -1, 115, 116,
- -1, 117, 118, 119, -1, -1, 120, 121,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 122, -1, -1, -1,
- 123, -1, -1, -1, -1, 124, -1, 125,
- 126, -1, -1, -1, -1, -1, -1, 127,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 115, -1, 116, 117, -1, -1, 118,
+ -1, -1, -1, 119, -1, -1, -1, -1,
+ 120, 121, -1, -1, -1, 122, -1, -1,
+ -1, -1, -1, -1, -1, -1, 123, -1,
+ 124, -1, -1, 125, -1, 126, -1, -1,
+ -1, -1, -1, -1, 127, -1, -1, -1,
+ 128, -1, -1, -1, 129, -1, -1, -1,
+ -1, 130, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ 131, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 132, -1,
+ -1, -1, -1, -1, -1, -1, -1, 133,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 128, -1, 129, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- 130, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 131, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, 132, 133, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 134, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, 136, -1, -1, -1, -1,
+ -1, 137, -1, -1, -1, -1, 138, -1,
+ -1, -1, 139, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -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, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, 136, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 137, -1, -1,
- -1, -1, 138, -1, -1, 139, 140, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 140, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
@@ -336,13 +336,14 @@ 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, 141, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -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, -1,
-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,
@@ -351,8 +352,8 @@ 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, 142, -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, -1,
@@ -367,7 +368,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, 143
+ -1, -1, 144
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -488,6 +489,7 @@ static const char * const attrList[] = {
"ONBLUR",
"ONCHANGE",
"ONCLICK",
+ "ONCONTEXTMENU",
"ONDBLCLICK",
"ONERROR",
"ONFOCUS",
diff --git a/WebCore/khtml/misc/htmlattrs.h b/WebCore/khtml/misc/htmlattrs.h
index fa31dae..770206f 100644
--- a/WebCore/khtml/misc/htmlattrs.h
+++ b/WebCore/khtml/misc/htmlattrs.h
@@ -89,70 +89,71 @@ using namespace DOM;
#define ATTR_ONBLUR 79
#define ATTR_ONCHANGE 80
#define ATTR_ONCLICK 81
-#define ATTR_ONDBLCLICK 82
-#define ATTR_ONERROR 83
-#define ATTR_ONFOCUS 84
-#define ATTR_ONKEYDOWN 85
-#define ATTR_ONKEYPRESS 86
-#define ATTR_ONKEYUP 87
-#define ATTR_ONLOAD 88
-#define ATTR_ONMOUSEDOWN 89
-#define ATTR_ONMOUSEMOVE 90
-#define ATTR_ONMOUSEOUT 91
-#define ATTR_ONMOUSEOVER 92
-#define ATTR_ONMOUSEUP 93
-#define ATTR_ONRESET 94
-#define ATTR_ONRESIZE 95
-#define ATTR_ONSELECT 96
-#define ATTR_ONSUBMIT 97
-#define ATTR_ONUNLOAD 98
-#define ATTR_OVERSRC 99
-#define ATTR_PAGEX 100
-#define ATTR_PAGEY 101
-#define ATTR_PLAIN 102
-#define ATTR_PLUGINPAGE 103
-#define ATTR_PLUGINSPAGE 104
-#define ATTR_PLUGINURL 105
-#define ATTR_PROFILE 106
-#define ATTR_PROMPT 107
-#define ATTR_READONLY 108
-#define ATTR_REL 109
-#define ATTR_REV 110
-#define ATTR_ROWS 111
-#define ATTR_ROWSPAN 112
-#define ATTR_RULES 113
-#define ATTR_SCHEME 114
-#define ATTR_SCOPE 115
-#define ATTR_SCROLLING 116
-#define ATTR_SELECTED 117
-#define ATTR_SHAPE 118
-#define ATTR_SIZE 119
-#define ATTR_SPAN 120
-#define ATTR_SRC 121
-#define ATTR_STANDBY 122
-#define ATTR_START 123
-#define ATTR_STYLE 124
-#define ATTR_SUMMARY 125
-#define ATTR_TABINDEX 126
-#define ATTR_TARGET 127
-#define ATTR_TEXT 128
-#define ATTR_TITLE 129
-#define ATTR_TOP 130
-#define ATTR_TOPMARGIN 131
-#define ATTR_TYPE 132
-#define ATTR_UNKNOWN 133
-#define ATTR_USEMAP 134
-#define ATTR_VALIGN 135
-#define ATTR_VALUE 136
-#define ATTR_VALUETYPE 137
-#define ATTR_VERSION 138
-#define ATTR_VISIBILITY 139
-#define ATTR_VLINK 140
-#define ATTR_VSPACE 141
-#define ATTR_WIDTH 142
-#define ATTR_WRAP 143
-#define ATTR_Z_INDEX 144
-#define ATTR_LAST_ATTR 144
+#define ATTR_ONCONTEXTMENU 82
+#define ATTR_ONDBLCLICK 83
+#define ATTR_ONERROR 84
+#define ATTR_ONFOCUS 85
+#define ATTR_ONKEYDOWN 86
+#define ATTR_ONKEYPRESS 87
+#define ATTR_ONKEYUP 88
+#define ATTR_ONLOAD 89
+#define ATTR_ONMOUSEDOWN 90
+#define ATTR_ONMOUSEMOVE 91
+#define ATTR_ONMOUSEOUT 92
+#define ATTR_ONMOUSEOVER 93
+#define ATTR_ONMOUSEUP 94
+#define ATTR_ONRESET 95
+#define ATTR_ONRESIZE 96
+#define ATTR_ONSELECT 97
+#define ATTR_ONSUBMIT 98
+#define ATTR_ONUNLOAD 99
+#define ATTR_OVERSRC 100
+#define ATTR_PAGEX 101
+#define ATTR_PAGEY 102
+#define ATTR_PLAIN 103
+#define ATTR_PLUGINPAGE 104
+#define ATTR_PLUGINSPAGE 105
+#define ATTR_PLUGINURL 106
+#define ATTR_PROFILE 107
+#define ATTR_PROMPT 108
+#define ATTR_READONLY 109
+#define ATTR_REL 110
+#define ATTR_REV 111
+#define ATTR_ROWS 112
+#define ATTR_ROWSPAN 113
+#define ATTR_RULES 114
+#define ATTR_SCHEME 115
+#define ATTR_SCOPE 116
+#define ATTR_SCROLLING 117
+#define ATTR_SELECTED 118
+#define ATTR_SHAPE 119
+#define ATTR_SIZE 120
+#define ATTR_SPAN 121
+#define ATTR_SRC 122
+#define ATTR_STANDBY 123
+#define ATTR_START 124
+#define ATTR_STYLE 125
+#define ATTR_SUMMARY 126
+#define ATTR_TABINDEX 127
+#define ATTR_TARGET 128
+#define ATTR_TEXT 129
+#define ATTR_TITLE 130
+#define ATTR_TOP 131
+#define ATTR_TOPMARGIN 132
+#define ATTR_TYPE 133
+#define ATTR_UNKNOWN 134
+#define ATTR_USEMAP 135
+#define ATTR_VALIGN 136
+#define ATTR_VALUE 137
+#define ATTR_VALUETYPE 138
+#define ATTR_VERSION 139
+#define ATTR_VISIBILITY 140
+#define ATTR_VLINK 141
+#define ATTR_VSPACE 142
+#define ATTR_WIDTH 143
+#define ATTR_WRAP 144
+#define ATTR_Z_INDEX 145
+#define ATTR_LAST_ATTR 145
DOMString getAttrName(unsigned short id);
#endif
diff --git a/WebCore/khtml/misc/htmlattrs.in b/WebCore/khtml/misc/htmlattrs.in
index 6068df7..2238a0e 100644
--- a/WebCore/khtml/misc/htmlattrs.in
+++ b/WebCore/khtml/misc/htmlattrs.in
@@ -79,6 +79,7 @@ onabort
onblur
onchange
onclick
+oncontextmenu
ondblclick
onerror
onfocus
diff --git a/WebCore/khtml/xml/dom2_eventsimpl.cpp b/WebCore/khtml/xml/dom2_eventsimpl.cpp
index 779f169..abe7f14 100644
--- a/WebCore/khtml/xml/dom2_eventsimpl.cpp
+++ b/WebCore/khtml/xml/dom2_eventsimpl.cpp
@@ -219,6 +219,8 @@ EventImpl::EventId EventImpl::typeToId(DOMString type)
return RESIZE_EVENT;
else if (type == "scroll")
return SCROLL_EVENT;
+ else if (type == "contextmenu")
+ return CONTEXTMENU_EVENT;
// ignore: KHTML_DBLCLICK_EVENT
// ignore: KHTML_CLICK_EVENT
return UNKNOWN_EVENT;
@@ -283,6 +285,8 @@ DOMString EventImpl::idToType(EventImpl::EventId id)
return "resize";
case SCROLL_EVENT:
return "scroll";
+ case CONTEXTMENU_EVENT:
+ return "contextmenu";
// khtml extensions
case KHTML_DBLCLICK_EVENT:
return "dblclick";
diff --git a/WebCore/khtml/xml/dom2_eventsimpl.h b/WebCore/khtml/xml/dom2_eventsimpl.h
index 3b30413..e5f3069 100644
--- a/WebCore/khtml/xml/dom2_eventsimpl.h
+++ b/WebCore/khtml/xml/dom2_eventsimpl.h
@@ -77,6 +77,7 @@ public:
BLUR_EVENT,
RESIZE_EVENT,
SCROLL_EVENT,
+ CONTEXTMENU_EVENT,
// khtml events (not part of DOM)
KHTML_DBLCLICK_EVENT, // for html ondblclick
KHTML_CLICK_EVENT, // for html onclick
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index 0313b1e..b4fe63c 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -187,6 +187,8 @@ public:
bool keyEvent(NSEvent *);
bool lastEventIsMouseUp();
+ bool sendContextMenuEvent(NSEvent *);
+
void clearTimers();
static void clearTimers(KHTMLView *);
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index cd8fc8c..8959432 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -1843,6 +1843,40 @@ void KWQKHTMLPart::mouseMoved(NSEvent *event)
_currentEvent = oldCurrentEvent;
}
+bool KWQKHTMLPart::sendContextMenuEvent(NSEvent *event)
+{
+ DocumentImpl *doc = d->m_doc;
+ KHTMLView *v = d->m_view;
+ if (!doc || !v) {
+ return false;
+ }
+
+ NSEvent *oldCurrentEvent = _currentEvent;
+ _currentEvent = [event retain];
+
+ QMouseEvent qev(QEvent::MouseButtonPress, QPoint([event locationInWindow]),
+ buttonForCurrentEvent(), stateForCurrentEvent(), [event clickCount]);
+
+ int xm, ym;
+ v->viewportToContents(qev.x(), qev.y(), xm, ym);
+
+ NodeImpl::MouseEvent mev(qev.stateAfter(), NodeImpl::MousePress);
+ doc->prepareMouseEvent(false, xm, ym, &mev);
+
+ // Sending an event can result in the destruction of the view and part.
+ // We ref so that happens after we return from the KHTMLView function.
+ v->ref();
+ bool swallowEvent = v->dispatchMouseEvent(EventImpl::CONTEXTMENU_EVENT,
+ mev.innerNode.handle(), true, 0, &qev, true, NodeImpl::MousePress);
+ v->deref();
+
+ ASSERT(_currentEvent == event);
+ [event release];
+ _currentEvent = oldCurrentEvent;
+
+ return swallowEvent;
+}
+
struct ListItemInfo {
unsigned start;
unsigned end;
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 15636a4..a19b359 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -161,6 +161,8 @@ enum FrameBorderStyle {
- (void)mouseMoved:(NSEvent *)event;
- (void)mouseDragged:(NSEvent *)event;
+- (BOOL)sendContextMenuEvent:(NSEvent *)event; // return YES if event is eaten by WebCore
+
- (NSView *)nextKeyView;
- (NSView *)previousKeyView;
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index f6d7033..7a1c0ac 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -528,6 +528,11 @@ static BOOL nowPrinting(WebCoreBridge *self)
_part->mouseMoved(event);
}
+- (BOOL)sendContextMenuEvent:(NSEvent *)event
+{
+ return _part->sendContextMenuEvent(event);
+}
+
- (id <WebDOMElement>)elementForView:(NSView *)view
{
// FIXME: implemetented currently for only a subset of the KWQ widgets
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 9d2760d..304c4b4 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,15 @@
+2003-08-18 Darin Adler <darin at apple.com>
+
+ Reviewed by Maciej.
+
+ - fixed 3299893 -- oncontextmenu support
+
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView menuForEvent:]): Call sendContextMenuEvent: on the bridge, and
+ don't show a menu if the event is handled over in WebCore.
+ (-[WebHTMLView mouseDown:]): Don't send a mouse down event in the case where we
+ already sent a context menu event and decided not to put up a real context menu.
+
2003-08-18 Richard Williamson <rjw at apple.com>
Fix build problem from last checkin.
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index c5efa22..0857653 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -380,11 +380,13 @@
[self layoutToPageWidth:0.0];
}
-- (NSMenu *)menuForEvent:(NSEvent *)theEvent
-{
- NSPoint point = [self convertPoint:[theEvent locationInWindow] fromView:nil];
+- (NSMenu *)menuForEvent:(NSEvent *)event
+{
+ if ([[self _bridge] sendContextMenuEvent:event]) {
+ return nil;
+ }
+ NSPoint point = [self convertPoint:[event locationInWindow] fromView:nil];
NSDictionary *element = [self _elementAtPoint:point];
-
return [[self _webView] _menuForElement:element];
}
@@ -691,6 +693,12 @@
- (void)mouseDown:(NSEvent *)event
{
+ // If the web page handles the context menu event and menuForEvent: returns nil, we'll get control click events here.
+ // We don't want to pass them along to KHTML a second time.
+ if ([event modifierFlags] & NSControlKeyMask) {
+ return;
+ }
+
_private->ignoringMouseDraggedEvents = NO;
// Record the mouse down position so we can determine drag hysteresis.
@@ -700,7 +708,7 @@
// Don't do any mouseover while the mouse is down.
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(_updateMouseoverWithFakeEvent) object:nil];
- // Let khtml get a chance to deal with the event.
+ // Let KHTML get a chance to deal with the event.
[[self _bridge] mouseDown:event];
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list