[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:30:22 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit b4ffe607bfab4bb9b96e4ee546e1c71f9b4ef034
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Mar 23 02:40:03 2004 +0000
Wire up NSSearchField to WebCore. Add support for placeholder strings, autosaving of recent items, the ability to show/hide
the magnifying glass search button, the ability to specify the maximum number of results, the ability to specify an incremental
search or not, etc. Added a DOM event that fires when the search field indicates that search results should be updated.
Reviewed by darin
* khtml/ecma/kjs_dom.cpp:
(DOMNode::getValueProperty):
(DOMNode::putValue):
* khtml/ecma/kjs_dom.h:
(KJS::DOMNode::):
* khtml/ecma/kjs_dom.lut.h:
(KJS::):
* khtml/ecma/kjs_window.cpp:
(Window::get):
(Window::put):
* khtml/ecma/kjs_window.h:
(KJS::Window::):
* khtml/ecma/kjs_window.lut.h:
(KJS::):
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::parseHTMLAttribute):
* khtml/html/html_formimpl.h:
(DOM::HTMLInputElementImpl::maxResults):
* khtml/misc/htmlattrs.c:
(hash_attr):
(findAttr):
* khtml/misc/htmlattrs.h:
* khtml/misc/htmlattrs.in:
* khtml/rendering/render_form.cpp:
(RenderLineEdit::RenderLineEdit):
(RenderLineEdit::slotPerformSearch):
(RenderLineEdit::updateFromElement):
* khtml/rendering/render_form.h:
* khtml/xml/dom2_eventsimpl.cpp:
(EventImpl::typeToId):
(EventImpl::idToType):
* khtml/xml/dom2_eventsimpl.h:
(DOM::EventImpl::):
* kwq/KWQLineEdit.h:
(QLineEdit::performSearch):
(QLineEdit::type):
* kwq/KWQLineEdit.mm:
(QLineEdit::QLineEdit):
(QLineEdit::setLiveSearch):
(QLineEdit::setAutoSaveName):
(QLineEdit::setMaxResults):
(QLineEdit::setPlaceholderString):
* kwq/KWQSlot.mm:
(KWQSlot::KWQSlot):
(KWQSlot::call):
* kwq/KWQTextField.mm:
(-[KWQTextFieldController initWithTextField:QLineEdit:]):
(-[KWQTextFieldController invalidate]):
(-[KWQTextFieldController action:]):
(-[KWQTextFieldController controlTextDidBeginEditing:]):
(-[KWQTextFieldController controlTextDidEndEditing:]):
(-[KWQTextFieldController controlTextDidChange:]):
(-[KWQTextFieldController control:textShouldBeginEditing:]):
(-[KWQTextFieldController control:textShouldEndEditing:]):
(-[KWQTextFieldController control:didFailToFormatString:errorDescription:]):
(-[KWQTextFieldController control:didFailToValidatePartialString:errorDescription:]):
(-[KWQTextFieldController control:isValidObject:]):
(-[KWQTextFieldController control:textView:doCommandBySelector:]):
(-[KWQTextFieldController textChanged]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6244 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 8b7b4b7..31aa356 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,73 @@
2004-03-22 David Hyatt <hyatt at apple.com>
+ Wire up NSSearchField to WebCore. Add support for placeholder strings, autosaving of recent items, the ability to show/hide
+ the magnifying glass search button, the ability to specify the maximum number of results, the ability to specify an incremental
+ search or not, etc. Added a DOM event that fires when the search field indicates that search results should be updated.
+
+ Reviewed by darin
+
+ * khtml/ecma/kjs_dom.cpp:
+ (DOMNode::getValueProperty):
+ (DOMNode::putValue):
+ * khtml/ecma/kjs_dom.h:
+ (KJS::DOMNode::):
+ * khtml/ecma/kjs_dom.lut.h:
+ (KJS::):
+ * khtml/ecma/kjs_window.cpp:
+ (Window::get):
+ (Window::put):
+ * khtml/ecma/kjs_window.h:
+ (KJS::Window::):
+ * khtml/ecma/kjs_window.lut.h:
+ (KJS::):
+ * khtml/html/html_formimpl.cpp:
+ (HTMLInputElementImpl::parseHTMLAttribute):
+ * khtml/html/html_formimpl.h:
+ (DOM::HTMLInputElementImpl::maxResults):
+ * khtml/misc/htmlattrs.c:
+ (hash_attr):
+ (findAttr):
+ * khtml/misc/htmlattrs.h:
+ * khtml/misc/htmlattrs.in:
+ * khtml/rendering/render_form.cpp:
+ (RenderLineEdit::RenderLineEdit):
+ (RenderLineEdit::slotPerformSearch):
+ (RenderLineEdit::updateFromElement):
+ * khtml/rendering/render_form.h:
+ * khtml/xml/dom2_eventsimpl.cpp:
+ (EventImpl::typeToId):
+ (EventImpl::idToType):
+ * khtml/xml/dom2_eventsimpl.h:
+ (DOM::EventImpl::):
+ * kwq/KWQLineEdit.h:
+ (QLineEdit::performSearch):
+ (QLineEdit::type):
+ * kwq/KWQLineEdit.mm:
+ (QLineEdit::QLineEdit):
+ (QLineEdit::setLiveSearch):
+ (QLineEdit::setAutoSaveName):
+ (QLineEdit::setMaxResults):
+ (QLineEdit::setPlaceholderString):
+ * kwq/KWQSlot.mm:
+ (KWQSlot::KWQSlot):
+ (KWQSlot::call):
+ * kwq/KWQTextField.mm:
+ (-[KWQTextFieldController initWithTextField:QLineEdit:]):
+ (-[KWQTextFieldController invalidate]):
+ (-[KWQTextFieldController action:]):
+ (-[KWQTextFieldController controlTextDidBeginEditing:]):
+ (-[KWQTextFieldController controlTextDidEndEditing:]):
+ (-[KWQTextFieldController controlTextDidChange:]):
+ (-[KWQTextFieldController control:textShouldBeginEditing:]):
+ (-[KWQTextFieldController control:textShouldEndEditing:]):
+ (-[KWQTextFieldController control:didFailToFormatString:errorDescription:]):
+ (-[KWQTextFieldController control:didFailToValidatePartialString:errorDescription:]):
+ (-[KWQTextFieldController control:isValidObject:]):
+ (-[KWQTextFieldController control:textView:doCommandBySelector:]):
+ (-[KWQTextFieldController textChanged]):
+
+2004-03-22 David Hyatt <hyatt at apple.com>
+
Factoring of form control code to enable sharing between three types of text fields: normal, password, and
the new search field. Also made search field creatable using <input type="search">. There are still many
bugs with the field, but you can at least type in it and submit it with a form.
diff --git a/WebCore/khtml/ecma/kjs_dom.cpp b/WebCore/khtml/ecma/kjs_dom.cpp
index 71b9ea6..bc9b700 100644
--- a/WebCore/khtml/ecma/kjs_dom.cpp
+++ b/WebCore/khtml/ecma/kjs_dom.cpp
@@ -93,7 +93,7 @@ bool DOMNode::toBoolean(ExecState *) const
}
/* Source for DOMNodeTable. Use "make hashtables" to regenerate.
- at begin DOMNodeTable 55
+ at begin DOMNodeTable 56
nodeName DOMNode::NodeName DontDelete|ReadOnly
nodeValue DOMNode::NodeValue DontDelete
nodeType DOMNode::NodeType DontDelete|ReadOnly
@@ -132,6 +132,7 @@ bool DOMNode::toBoolean(ExecState *) const
onmove DOMNode::OnMove DontDelete
onreset DOMNode::OnReset DontDelete
onresize DOMNode::OnResize DontDelete
+ onsearch DOMNode::OnSearch DontDelete
onselect DOMNode::OnSelect DontDelete
onsubmit DOMNode::OnSubmit DontDelete
onunload DOMNode::OnUnload DontDelete
@@ -232,6 +233,10 @@ Value DOMNode::getValueProperty(ExecState *exec, int token) const
return getListener(DOM::EventImpl::RESET_EVENT);
case OnResize:
return getListener(DOM::EventImpl::RESIZE_EVENT);
+#if APPLE_CHANGES
+ case OnSearch:
+ return getListener(DOM::EventImpl::SEARCH_EVENT);
+#endif
case OnSelect:
return getListener(DOM::EventImpl::SELECT_EVENT);
case OnSubmit:
@@ -364,6 +369,11 @@ void DOMNode::putValue(ExecState *exec, int token, const Value& value, int /*att
case OnResize:
setListener(exec,DOM::EventImpl::RESIZE_EVENT,value);
break;
+#if APPLE_CHANGES
+ case OnSearch:
+ setListener(exec,DOM::EventImpl::SEARCH_EVENT,value);
+ break;
+#endif
case OnSelect:
setListener(exec,DOM::EventImpl::SELECT_EVENT,value);
break;
diff --git a/WebCore/khtml/ecma/kjs_dom.h b/WebCore/khtml/ecma/kjs_dom.h
index 70edc26..b5d6c6a 100644
--- a/WebCore/khtml/ecma/kjs_dom.h
+++ b/WebCore/khtml/ecma/kjs_dom.h
@@ -62,7 +62,7 @@ namespace KJS {
OnAbort, OnBlur, OnChange, OnClick, OnContextMenu, OnDblClick, OnDragDrop, OnError,
OnFocus, OnKeyDown, OnKeyPress, OnKeyUp, OnLoad, OnMouseDown,
OnMouseMove, OnMouseOut, OnMouseOver, OnMouseUp, OnMove, OnReset,
- OnResize, OnSelect, OnSubmit, OnUnload,
+ OnResize, OnSearch, OnSelect, OnSubmit, OnUnload,
OffsetLeft, OffsetTop, OffsetWidth, OffsetHeight, OffsetParent,
ClientWidth, ClientHeight, ScrollLeft, ScrollTop, ScrollWidth, ScrollHeight };
diff --git a/WebCore/khtml/ecma/kjs_dom.lut.h b/WebCore/khtml/ecma/kjs_dom.lut.h
index 740b3d2..2c75e9f 100644
--- a/WebCore/khtml/ecma/kjs_dom.lut.h
+++ b/WebCore/khtml/ecma/kjs_dom.lut.h
@@ -29,78 +29,85 @@ const struct HashTable DOMNodeProtoTable = { 2, 17, DOMNodeProtoTableEntries, 13
namespace KJS {
const struct HashEntry DOMNodeTableEntries[] = {
- { "ondblclick", DOMNode::OnDblClick, DontDelete, 0, &DOMNodeTableEntries[58] },
- { "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[66] },
- { 0, 0, 0, 0, 0 },
- { "onkeypress", DOMNode::OnKeyPress, DontDelete, 0, 0 },
- { "onmouseover", DOMNode::OnMouseOver, DontDelete, 0, 0 },
- { "onkeyup", DOMNode::OnKeyUp, DontDelete, 0, 0 },
- { "previousSibling", DOMNode::PreviousSibling, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[56] },
- { "ownerDocument", DOMNode::OwnerDocument, DontDelete|ReadOnly, 0, 0 },
- { "scrollWidth", DOMNode::ScrollWidth, DontDelete|ReadOnly, 0, 0 },
- { "onmouseup", DOMNode::OnMouseUp, DontDelete, 0, 0 },
- { 0, 0, 0, 0, 0 },
{ "nodeType", DOMNode::NodeType, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0 },
- { "onmouseout", DOMNode::OnMouseOut, DontDelete, 0, 0 },
{ "offsetTop", DOMNode::OffsetTop, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
+ { "namespaceURI", DOMNode::NamespaceURI, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "onclick", DOMNode::OnClick, DontDelete, 0, 0 },
+ { "ondragdrop", DOMNode::OnDragDrop, DontDelete, 0, &DOMNodeTableEntries[72] },
{ 0, 0, 0, 0, 0 },
- { "namespaceURI", DOMNode::NamespaceURI, DontDelete|ReadOnly, 0, 0 },
- { "ondragdrop", DOMNode::OnDragDrop, DontDelete, 0, &DOMNodeTableEntries[67] },
+ { "scrollTop", DOMNode::ScrollTop, DontDelete, 0, 0 },
+ { "onclick", DOMNode::OnClick, DontDelete, 0, &DOMNodeTableEntries[67] },
{ "localName", DOMNode::LocalName, DontDelete|ReadOnly, 0, 0 },
- { 0, 0, 0, 0, 0 },
- { "clientHeight", DOMNode::ClientHeight, DontDelete|ReadOnly, 0, 0 },
{ "childNodes", DOMNode::ChildNodes, DontDelete|ReadOnly, 0, 0 },
- { "onload", DOMNode::OnLoad, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0 },
- { "onselect", DOMNode::OnSelect, DontDelete, 0, 0 },
- { "nodeName", DOMNode::NodeName, DontDelete|ReadOnly, 0, 0 },
{ "offsetHeight", DOMNode::OffsetHeight, DontDelete|ReadOnly, 0, 0 },
- { "onunload", DOMNode::OnUnload, DontDelete, 0, 0 },
- { "lastChild", DOMNode::LastChild, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "onabort", DOMNode::OnAbort, DontDelete, 0, 0 },
+ { 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
{ "parentElement", DOMNode::ParentElement, DontDelete|ReadOnly, 0, 0 },
+ { "onload", DOMNode::OnLoad, DontDelete, 0, &DOMNodeTableEntries[68] },
{ 0, 0, 0, 0, 0 },
- { "firstChild", DOMNode::FirstChild, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[68] },
+ { "nodeName", DOMNode::NodeName, DontDelete|ReadOnly, 0, 0 },
+ { "lastChild", DOMNode::LastChild, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[69] },
{ 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[65] },
- { "offsetLeft", DOMNode::OffsetLeft, DontDelete|ReadOnly, 0, 0 },
- { "onblur", DOMNode::OnBlur, DontDelete, 0, &DOMNodeTableEntries[61] },
- { "onresize", DOMNode::OnResize, DontDelete, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { "firstChild", DOMNode::FirstChild, DontDelete|ReadOnly, 0, 0 },
+ { "onabort", DOMNode::OnAbort, DontDelete, 0, 0 },
+ { 0, 0, 0, 0, 0 },
{ "attributes", DOMNode::Attributes, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[57] },
- { "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[63] },
- { "onmove", DOMNode::OnMove, DontDelete, 0, &DOMNodeTableEntries[64] },
+ { "parentNode", DOMNode::ParentNode, DontDelete|ReadOnly, 0, 0 },
+ { "offsetParent", DOMNode::OffsetParent, DontDelete|ReadOnly, 0, 0 },
+ { "offsetLeft", DOMNode::OffsetLeft, DontDelete|ReadOnly, 0, 0 },
+ { "nodeValue", DOMNode::NodeValue, DontDelete, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { "previousSibling", DOMNode::PreviousSibling, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[58] },
+ { "prefix", DOMNode::Prefix, DontDelete, 0, &DOMNodeTableEntries[60] },
+ { "nextSibling", DOMNode::NextSibling, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[66] },
{ "onreset", DOMNode::OnReset, DontDelete, 0, 0 },
{ "onsubmit", DOMNode::OnSubmit, DontDelete, 0, 0 },
+ { "ownerDocument", DOMNode::OwnerDocument, DontDelete|ReadOnly, 0, &DOMNodeTableEntries[56] },
+ { "onkeypress", DOMNode::OnKeyPress, DontDelete, 0, 0 },
+ { "onmove", DOMNode::OnMove, DontDelete, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { "onerror", DOMNode::OnError, DontDelete, 0, &DOMNodeTableEntries[74] },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { "onchange", DOMNode::OnChange, DontDelete, 0, &DOMNodeTableEntries[61] },
+ { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { "onmouseout", DOMNode::OnMouseOut, DontDelete, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { "onblur", DOMNode::OnBlur, DontDelete, 0, &DOMNodeTableEntries[64] },
+ { "oncontextmenu", DOMNode::OnContextMenu, DontDelete, 0, &DOMNodeTableEntries[71] },
+ { "ondblclick", DOMNode::OnDblClick, DontDelete, 0, &DOMNodeTableEntries[59] },
+ { "onfocus", DOMNode::OnFocus, DontDelete, 0, &DOMNodeTableEntries[63] },
+ { "onkeydown", DOMNode::OnKeyDown, DontDelete, 0, &DOMNodeTableEntries[62] },
+ { "onkeyup", DOMNode::OnKeyUp, DontDelete, 0, &DOMNodeTableEntries[65] },
+ { "onmousedown", DOMNode::OnMouseDown, DontDelete, 0, 0 },
+ { "onmousemove", DOMNode::OnMouseMove, DontDelete, 0, 0 },
+ { "onmouseover", DOMNode::OnMouseOver, DontDelete, 0, &DOMNodeTableEntries[73] },
+ { "onmouseup", DOMNode::OnMouseUp, DontDelete, 0, 0 },
+ { "onresize", DOMNode::OnResize, DontDelete, 0, &DOMNodeTableEntries[70] },
+ { "onsearch", DOMNode::OnSearch, DontDelete, 0, 0 },
+ { "onselect", DOMNode::OnSelect, DontDelete, 0, 0 },
+ { "onunload", DOMNode::OnUnload, DontDelete, 0, &DOMNodeTableEntries[75] },
{ "offsetWidth", DOMNode::OffsetWidth, DontDelete|ReadOnly, 0, 0 },
- { "offsetParent", DOMNode::OffsetParent, DontDelete|ReadOnly, 0, 0 },
{ "clientWidth", DOMNode::ClientWidth, DontDelete|ReadOnly, 0, 0 },
+ { "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 },
{ "scrollHeight", DOMNode::ScrollHeight, DontDelete|ReadOnly, 0, 0 }
};
-const struct HashTable DOMNodeTable = { 2, 69, DOMNodeTableEntries, 55 };
+const struct HashTable DOMNodeTable = { 2, 76, DOMNodeTableEntries, 56 };
} // namespace
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index b06bc3c..9880ab2 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -177,7 +177,7 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
const ClassInfo Window::info = { "Window", 0, &WindowTable, 0 };
/*
- at begin WindowTable 90
+ at begin WindowTable 91
closed Window::Closed DontDelete|ReadOnly
crypto Window::Crypto DontDelete|ReadOnly
defaultStatus Window::DefaultStatus DontDelete
@@ -269,6 +269,7 @@ const ClassInfo Window::info = { "Window", 0, &WindowTable, 0 };
onmove Window::Onmove DontDelete
onreset Window::Onreset DontDelete
onresize Window::Onresize DontDelete
+ onsearch Window::Onsearch DontDelete
onselect Window::Onselect DontDelete
onsubmit Window::Onsubmit DontDelete
onunload Window::Onunload DontDelete
@@ -680,6 +681,13 @@ Value Window::get(ExecState *exec, const Identifier &p) const
return getListener(exec,DOM::EventImpl::RESIZE_EVENT);
else
return Undefined();
+#if APPLE_CHANGES
+ case Onsearch:
+ if (isSafeScript(exec))
+ return getListener(exec,DOM::EventImpl::SEARCH_EVENT);
+ else
+ return Undefined();
+#endif
case Onselect:
if (isSafeScript(exec))
return getListener(exec,DOM::EventImpl::SELECT_EVENT);
@@ -879,6 +887,12 @@ void Window::put(ExecState* exec, const Identifier &propertyName, const Value &v
if (isSafeScript(exec))
setListener(exec,DOM::EventImpl::RESIZE_EVENT,value);
return;
+#if APPLE_CHANGES
+ case Onsearch:
+ if (isSafeScript(exec))
+ setListener(exec,DOM::EventImpl::SEARCH_EVENT,value);
+ return;
+#endif
case Onselect:
if (isSafeScript(exec))
setListener(exec,DOM::EventImpl::SELECT_EVENT,value);
diff --git a/WebCore/khtml/ecma/kjs_window.h b/WebCore/khtml/ecma/kjs_window.h
index 28195af..016461a 100644
--- a/WebCore/khtml/ecma/kjs_window.h
+++ b/WebCore/khtml/ecma/kjs_window.h
@@ -123,7 +123,7 @@ namespace KJS {
ReleaseEvents, AddEventListener, RemoveEventListener, XMLHttpRequest, XMLSerializer,
Onabort, Onblur, Onchange, Onclick, Ondblclick, Ondragdrop, Onerror,
Onfocus, Onkeydown, Onkeypress, Onkeyup, Onload, Onmousedown, Onmousemove,
- Onmouseout, Onmouseover, Onmouseup, Onmove, Onreset, Onresize,
+ Onmouseout, Onmouseover, Onmouseup, Onmove, Onreset, Onresize, Onsearch,
Onselect, Onsubmit, Onunload };
protected:
Value getListener(ExecState *exec, int eventId) const;
diff --git a/WebCore/khtml/ecma/kjs_window.lut.h b/WebCore/khtml/ecma/kjs_window.lut.h
index 6a41e1c..efdb1da 100644
--- a/WebCore/khtml/ecma/kjs_window.lut.h
+++ b/WebCore/khtml/ecma/kjs_window.lut.h
@@ -22,127 +22,130 @@ const struct HashTable ScreenTable = { 2, 10, ScreenTableEntries, 7 };
namespace KJS {
const struct HashEntry WindowTableEntries[] = {
- { "onkeydown", Window::Onkeydown, DontDelete, 0, 0 },
+ { "event", Window::Event, DontDelete, 0, &WindowTableEntries[94] },
+ { "frames", Window::Frames, DontDelete|ReadOnly, 0, &WindowTableEntries[95] },
+ { "onmouseup", Window::Onmouseup, DontDelete, 0, 0 },
+ { "NodeFilter", Window::NodeFilter, DontDelete, 0, &WindowTableEntries[99] },
+ { "CSSRule", Window::CSSRule, DontDelete, 0, &WindowTableEntries[107] },
+ { "length", Window::Length, DontDelete|ReadOnly, 0, 0 },
+ { 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "clearTimeout", Window::ClearTimeout, DontDelete|Function, 1, 0 },
- { "Option", Window::Option, DontDelete|ReadOnly, 0, 0 },
- { "closed", Window::Closed, DontDelete|ReadOnly, 0, &WindowTableEntries[95] },
{ 0, 0, 0, 0, 0 },
- { "event", Window::Event, DontDelete, 0, &WindowTableEntries[104] },
- { "personalbar", Window::Personalbar, DontDelete|ReadOnly, 0, &WindowTableEntries[111] },
- { "frames", Window::Frames, DontDelete|ReadOnly, 0, &WindowTableEntries[92] },
- { "screenY", Window::ScreenY, DontDelete|ReadOnly, 0, 0 },
- { "screen", Window::_Screen, DontDelete|ReadOnly, 0, 0 },
- { "CSSRule", Window::CSSRule, DontDelete, 0, 0 },
- { "length", Window::Length, DontDelete|ReadOnly, 0, 0 },
- { "onmouseup", Window::Onmouseup, DontDelete, 0, 0 },
- { "NodeFilter", Window::NodeFilter, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "releaseEvents", Window::ReleaseEvents, DontDelete|Function, 0, 0 },
- { "print", Window::Print, DontDelete|Function, 2, 0 },
{ 0, 0, 0, 0, 0 },
- { "opener", Window::Opener, DontDelete|ReadOnly, 0, &WindowTableEntries[108] },
+ { "print", Window::Print, DontDelete|Function, 2, &WindowTableEntries[106] },
+ { "opener", Window::Opener, DontDelete|ReadOnly, 0, 0 },
{ "parent", Window::Parent, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
+ { "scrollX", Window::ScrollX, DontDelete|ReadOnly, 0, &WindowTableEntries[114] },
+ { "scrollY", Window::ScrollY, DontDelete|ReadOnly, 0, &WindowTableEntries[108] },
+ { "XMLSerializer", Window::XMLSerializer, DontDelete|ReadOnly, 0, 0 },
+ { "scroll", Window::Scroll, DontDelete|Function, 2, 0 },
{ 0, 0, 0, 0, 0 },
- { "scrollX", Window::ScrollX, DontDelete|ReadOnly, 0, 0 },
- { "scrollY", Window::ScrollY, DontDelete|ReadOnly, 0, 0 },
- { "scroll", Window::Scroll, DontDelete|Function, 2, &WindowTableEntries[107] },
- { "removeEventListener", Window::RemoveEventListener, DontDelete|Function, 3, 0 },
- { "onkeypress", Window::Onkeypress, DontDelete, 0, 0 },
+ { "defaultStatus", Window::DefaultStatus, DontDelete, 0, &WindowTableEntries[104] },
{ "onblur", Window::Onblur, DontDelete, 0, 0 },
- { "addEventListener", Window::AddEventListener, DontDelete|Function, 3, 0 },
- { "Node", Window::Node, DontDelete, 0, &WindowTableEntries[100] },
- { "XMLSerializer", Window::XMLSerializer, DontDelete|ReadOnly, 0, 0 },
- { "scrollBy", Window::ScrollBy, DontDelete|Function, 2, 0 },
- { "Image", Window::Image, DontDelete|ReadOnly, 0, 0 },
- { "window", Window::_Window, DontDelete|ReadOnly, 0, 0 },
- { "defaultStatus", Window::DefaultStatus, DontDelete, 0, &WindowTableEntries[96] },
+ { "confirm", Window::Confirm, DontDelete|Function, 1, 0 },
+ { "scrollBy", Window::ScrollBy, DontDelete|Function, 2, &WindowTableEntries[119] },
{ "pageXOffset", Window::PageXOffset, DontDelete|ReadOnly, 0, 0 },
- { "pageYOffset", Window::PageYOffset, DontDelete|ReadOnly, 0, &WindowTableEntries[106] },
- { "onmouseout", Window::Onmouseout, DontDelete, 0, 0 },
- { 0, 0, 0, 0, 0 },
- { "scrollTo", Window::ScrollTo, DontDelete|Function, 2, 0 },
- { 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0 },
- { "crypto", Window::Crypto, DontDelete|ReadOnly, 0, &WindowTableEntries[90] },
- { "prompt", Window::Prompt, DontDelete|Function, 2, &WindowTableEntries[112] },
- { "screenLeft", Window::ScreenLeft, DontDelete|ReadOnly, 0, &WindowTableEntries[110] },
+ { "pageYOffset", Window::PageYOffset, DontDelete|ReadOnly, 0, 0 },
+ { "Node", Window::Node, DontDelete, 0, &WindowTableEntries[97] },
+ { "window", Window::_Window, DontDelete|ReadOnly, 0, 0 },
+ { "Image", Window::Image, DontDelete|ReadOnly, 0, 0 },
+ { "onabort", Window::Onabort, DontDelete, 0, 0 },
+ { "onmousemove", Window::Onmousemove, DontDelete, 0, 0 },
+ { "scrollTo", Window::ScrollTo, DontDelete|Function, 2, &WindowTableEntries[117] },
+ { "onsearch", Window::Onsearch, DontDelete, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { "screenLeft", Window::ScreenLeft, DontDelete|ReadOnly, 0, &WindowTableEntries[98] },
+ { "onmouseover", Window::Onmouseover, DontDelete, 0, 0 },
+ { "crypto", Window::Crypto, DontDelete|ReadOnly, 0, 0 },
+ { "screenTop", Window::ScreenTop, DontDelete|ReadOnly, 0, &WindowTableEntries[100] },
+ { "Range", Window::Range, DontDelete, 0, &WindowTableEntries[91] },
{ "status", Window::Status, DontDelete, 0, 0 },
- { "location", Window::_Location, DontDelete, 0, &WindowTableEntries[94] },
- { "onmouseover", Window::Onmouseover, DontDelete, 0, &WindowTableEntries[115] },
- { 0, 0, 0, 0, 0 },
+ { "onreset", Window::Onreset, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
{ "onselect", Window::Onselect, DontDelete, 0, 0 },
- { "XMLHttpRequest", Window::XMLHttpRequest, DontDelete|ReadOnly, 0, 0 },
- { "document", Window::Document, DontDelete|ReadOnly, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { "document", Window::Document, DontDelete|ReadOnly, 0, &WindowTableEntries[110] },
{ "onunload", Window::Onunload, DontDelete, 0, 0 },
- { "ondblclick", Window::Ondblclick, DontDelete, 0, &WindowTableEntries[109] },
{ 0, 0, 0, 0, 0 },
+ { "onerror", Window::Onerror, DontDelete, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { "innerHeight", Window::InnerHeight, DontDelete|ReadOnly, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { "innerWidth", Window::InnerWidth, DontDelete|ReadOnly, 0, &WindowTableEntries[115] },
+ { "defaultstatus", Window::DefaultStatus, DontDelete, 0, 0 },
{ "name", Window::Name, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "onkeyup", Window::Onkeyup, DontDelete, 0, 0 },
+ { "offscreenBuffering", Window::OffscreenBuffering, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "innerHeight", Window::InnerHeight, DontDelete|ReadOnly, 0, 0 },
- { "innerWidth", Window::InnerWidth, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
+ { "history", Window::_History, DontDelete|ReadOnly, 0, 0 },
{ "Event", Window::EventCtor, DontDelete, 0, 0 },
+ { "onresize", Window::Onresize, DontDelete, 0, 0 },
+ { "navigator", Window::_Navigator, DontDelete|ReadOnly, 0, 0 },
+ { "self", Window::Self, DontDelete|ReadOnly, 0, &WindowTableEntries[120] },
{ 0, 0, 0, 0, 0 },
- { "history", Window::_History, DontDelete|ReadOnly, 0, &WindowTableEntries[98] },
- { "defaultstatus", Window::DefaultStatus, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "top", Window::Top, DontDelete|ReadOnly, 0, &WindowTableEntries[116] },
{ 0, 0, 0, 0, 0 },
- { "navigator", Window::_Navigator, DontDelete|ReadOnly, 0, &WindowTableEntries[117] },
+ { "top", Window::Top, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
+ { "clientInformation", Window::ClientInformation, DontDelete|ReadOnly, 0, &WindowTableEntries[93] },
{ 0, 0, 0, 0, 0 },
- { "open", Window::Open, DontDelete|Function, 3, 0 },
- { "offscreenBuffering", Window::OffscreenBuffering, DontDelete|ReadOnly, 0, 0 },
+ { "outerWidth", Window::OuterWidth, DontDelete|ReadOnly, 0, &WindowTableEntries[102] },
+ { "getSelection", Window::GetSelection, DontDelete|Function, 0, &WindowTableEntries[111] },
{ 0, 0, 0, 0, 0 },
{ "blur", Window::Blur, DontDelete|Function, 0, 0 },
+ { "setTimeout", Window::SetTimeout, DontDelete|Function, 2, 0 },
+ { "DOMException", Window::DOMException, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
+ { "setInterval", Window::SetInterval, DontDelete|Function, 2, 0 },
+ { "scrollbars", Window::Scrollbars, DontDelete|ReadOnly, 0, 0 },
+ { "clearTimeout", Window::ClearTimeout, DontDelete|Function, 1, &WindowTableEntries[103] },
+ { "moveBy", Window::MoveBy, DontDelete|Function, 2, &WindowTableEntries[113] },
+ { "alert", Window::Alert, DontDelete|Function, 1, 0 },
+ { "clearInterval", Window::ClearInterval, DontDelete|Function, 1, 0 },
{ 0, 0, 0, 0, 0 },
- { "outerHeight", Window::OuterHeight, DontDelete|ReadOnly, 0, 0 },
- { "outerWidth", Window::OuterWidth, DontDelete|ReadOnly, 0, 0 },
- { "ondragdrop", Window::Ondragdrop, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "getSelection", Window::GetSelection, DontDelete|Function, 0, &WindowTableEntries[102] },
- { "setTimeout", Window::SetTimeout, DontDelete|Function, 2, 0 },
- { "moveBy", Window::MoveBy, DontDelete|Function, 2, &WindowTableEntries[99] },
- { "DOMException", Window::DOMException, DontDelete, 0, &WindowTableEntries[91] },
- { 0, 0, 0, 0, 0 },
- { "scrollbars", Window::Scrollbars, DontDelete|ReadOnly, 0, &WindowTableEntries[103] },
- { "Range", Window::Range, DontDelete, 0, &WindowTableEntries[97] },
- { "clientInformation", Window::ClientInformation, DontDelete|ReadOnly, 0, 0 },
- { "konqueror", Window::_Konqueror, DontDelete|ReadOnly, 0, &WindowTableEntries[93] },
- { "screenX", Window::ScreenX, DontDelete|ReadOnly, 0, 0 },
- { "screenTop", Window::ScreenTop, DontDelete|ReadOnly, 0, 0 },
- { "moveTo", Window::MoveTo, DontDelete|Function, 2, &WindowTableEntries[101] },
- { "resizeBy", Window::ResizeBy, DontDelete|Function, 2, &WindowTableEntries[105] },
- { "resizeTo", Window::ResizeTo, DontDelete|Function, 2, &WindowTableEntries[113] },
- { "self", Window::Self, DontDelete|ReadOnly, 0, 0 },
- { "alert", Window::Alert, DontDelete|Function, 1, 0 },
- { "confirm", Window::Confirm, DontDelete|Function, 1, &WindowTableEntries[114] },
+ { "personalbar", Window::Personalbar, DontDelete|ReadOnly, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { "Option", Window::Option, DontDelete|ReadOnly, 0, 0 },
+ { "closed", Window::Closed, DontDelete|ReadOnly, 0, &WindowTableEntries[92] },
{ "focus", Window::Focus, DontDelete|Function, 0, 0 },
+ { 0, 0, 0, 0, 0 },
+ { "location", Window::_Location, DontDelete, 0, 0 },
+ { "konqueror", Window::_Konqueror, DontDelete|ReadOnly, 0, &WindowTableEntries[96] },
+ { "outerHeight", Window::OuterHeight, DontDelete|ReadOnly, 0, 0 },
+ { "screenX", Window::ScreenX, DontDelete|ReadOnly, 0, &WindowTableEntries[116] },
+ { "screenY", Window::ScreenY, DontDelete|ReadOnly, 0, &WindowTableEntries[105] },
+ { "moveTo", Window::MoveTo, DontDelete|Function, 2, 0 },
+ { "resizeBy", Window::ResizeBy, DontDelete|Function, 2, &WindowTableEntries[118] },
+ { "resizeTo", Window::ResizeTo, DontDelete|Function, 2, 0 },
+ { "screen", Window::_Screen, DontDelete|ReadOnly, 0, 0 },
+ { "XMLHttpRequest", Window::XMLHttpRequest, DontDelete|ReadOnly, 0, &WindowTableEntries[101] },
+ { "prompt", Window::Prompt, DontDelete|Function, 2, &WindowTableEntries[112] },
+ { "open", Window::Open, DontDelete|Function, 3, 0 },
{ "close", Window::Close, DontDelete|Function, 0, 0 },
- { "setInterval", Window::SetInterval, DontDelete|Function, 2, 0 },
- { "clearInterval", Window::ClearInterval, DontDelete|Function, 1, 0 },
{ "captureEvents", Window::CaptureEvents, DontDelete|Function, 0, 0 },
- { "onabort", Window::Onabort, DontDelete, 0, 0 },
+ { "releaseEvents", Window::ReleaseEvents, DontDelete|Function, 0, 0 },
+ { "addEventListener", Window::AddEventListener, DontDelete|Function, 3, &WindowTableEntries[109] },
+ { "removeEventListener", Window::RemoveEventListener, DontDelete|Function, 3, 0 },
{ "onchange", Window::Onchange, DontDelete, 0, 0 },
{ "onclick", Window::Onclick, DontDelete, 0, 0 },
- { "onerror", Window::Onerror, DontDelete, 0, 0 },
+ { "ondblclick", Window::Ondblclick, DontDelete, 0, 0 },
+ { "ondragdrop", Window::Ondragdrop, DontDelete, 0, 0 },
{ "onfocus", Window::Onfocus, DontDelete, 0, 0 },
+ { "onkeydown", Window::Onkeydown, DontDelete, 0, 0 },
+ { "onkeypress", Window::Onkeypress, DontDelete, 0, 0 },
+ { "onkeyup", Window::Onkeyup, DontDelete, 0, 0 },
{ "onload", Window::Onload, DontDelete, 0, 0 },
{ "onmousedown", Window::Onmousedown, DontDelete, 0, 0 },
- { "onmousemove", Window::Onmousemove, DontDelete, 0, 0 },
+ { "onmouseout", Window::Onmouseout, DontDelete, 0, 0 },
{ "onmove", Window::Onmove, DontDelete, 0, 0 },
- { "onreset", Window::Onreset, DontDelete, 0, 0 },
- { "onresize", Window::Onresize, DontDelete, 0, 0 },
{ "onsubmit", Window::Onsubmit, DontDelete, 0, 0 }
};
-const struct HashTable WindowTable = { 2, 118, WindowTableEntries, 90 };
+const struct HashTable WindowTable = { 2, 121, WindowTableEntries, 91 };
} // namespace
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index 1840e20..d6da4b4 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -1448,6 +1448,22 @@ void HTMLInputElementImpl::parseHTMLAttribute(HTMLAttributeImpl *attr)
setHTMLEventListener(EventImpl::CHANGE_EVENT,
getDocument()->createHTMLEventListener(attr->value().string()));
break;
+#if APPLE_CHANGES
+ // Search field attributes all just cause updateFromElement to be called through style
+ // recalcing.
+ case ATTR_ONSEARCH:
+ setHTMLEventListener(EventImpl::SEARCH_EVENT,
+ getDocument()->createHTMLEventListener(attr->value().string()));
+ break;
+ case ATTR_RESULTS:
+ m_maxResults = !attr->isNull() ? attr->value().toInt() : 0;
+ /* Fall through */
+ case ATTR_AUTOSAVE:
+ case ATTR_INCREMENTAL:
+ case ATTR_PLACEHOLDER:
+ setChanged();
+ break;
+#endif
default:
HTMLGenericFormElementImpl::parseHTMLAttribute(attr);
}
diff --git a/WebCore/khtml/html/html_formimpl.h b/WebCore/khtml/html/html_formimpl.h
index 348ecad..407606d 100644
--- a/WebCore/khtml/html/html_formimpl.h
+++ b/WebCore/khtml/html/html_formimpl.h
@@ -337,6 +337,10 @@ public:
virtual bool isSubresourceURLAttribute(AttributeImpl *attr) const;
+#if APPLE_CHANGES
+ long maxResults() const { return m_maxResults; }
+#endif
+
protected:
DOMString m_value;
@@ -345,6 +349,10 @@ protected:
short m_size;
short yPos;
+#if APPLE_CHANGES
+ short m_maxResults;
+#endif
+
typeEnum m_type : 4;
bool m_checked : 1;
bool m_defaultChecked : 1;
diff --git a/WebCore/khtml/misc/htmlattrs.c b/WebCore/khtml/misc/htmlattrs.c
index 4e386ed..54b2de1 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 = 834, duplicates = 1 */
+/* maximum key range = 809, 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[] =
{
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 0, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 50, 165, 10,
- 50, 0, 105, 80, 170, 0, 0, 135, 0, 175,
- 0, 0, 0, 0, 25, 5, 0, 90, 160, 275,
- 65, 25, 0, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 0, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 25, 260, 10,
+ 35, 0, 120, 50, 105, 0, 0, 175, 0, 215,
+ 0, 0, 0, 5, 20, 80, 0, 140, 150, 10,
+ 30, 40, 0, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812
};
register int hval = len;
@@ -97,11 +97,11 @@ findAttr (register const char *str, register unsigned int len)
{
enum
{
- TOTAL_KEYWORDS = 156,
+ TOTAL_KEYWORDS = 161,
MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 15,
MIN_HASH_VALUE = 3,
- MAX_HASH_VALUE = 836
+ MAX_HASH_VALUE = 811
};
static const struct attrs wordlist_attr[] =
@@ -109,247 +109,247 @@ findAttr (register const char *str, register unsigned int len)
{"top", ATTR_TOP},
{"loop", ATTR_LOOP},
{"title", ATTR_TITLE},
- {"size", ATTR_SIZE},
{"cite", ATTR_CITE},
{"content", ATTR_CONTENT},
- {"cols", ATTR_COLS},
- {"scope", ATTR_SCOPE},
- {"onselect", ATTR_ONSELECT},
{"rel", ATTR_REL},
- {"type", ATTR_TYPE},
- {"style", ATTR_STYLE},
- {"onreset", ATTR_ONRESET},
- {"noresize", ATTR_NORESIZE},
- {"onresize", ATTR_ONRESIZE},
- {"color", ATTR_COLOR},
- {"enctype", ATTR_ENCTYPE},
- {"src", ATTR_SRC},
- {"id", ATTR_ID},
{"alt", ATTR_ALT},
{"plain", ATTR_PLAIN},
- {"span", ATTR_SPAN},
- {"code", ATTR_CODE},
- {"action", ATTR_ACTION},
{"text", ATTR_TEXT},
- {"colspan", ATTR_COLSPAN},
- {"selected", ATTR_SELECTED},
- {"class", ATTR_CLASS},
+ {"color", ATTR_COLOR},
+ {"id", ATTR_ID},
+ {"action", ATTR_ACTION},
+ {"type", ATTR_TYPE},
+ {"code", ATTR_CODE},
{"accept", ATTR_ACCEPT},
+ {"enctype", ATTR_ENCTYPE},
{"dir", ATTR_DIR},
- {"onerror", ATTR_ONERROR},
- {"start", ATTR_START},
+ {"wrap", ATTR_WRAP},
{"clear", ATTR_CLEAR},
- {"codetype", ATTR_CODETYPE},
- {"direction", ATTR_DIRECTION},
- {"coords", ATTR_COORDS},
+ {"nowrap", ATTR_NOWRAP},
{"onload", ATTR_ONLOAD},
- {"left", ATTR_LEFT},
+ {"onerror", ATTR_ONERROR},
{"z-index", ATTR_Z_INDEX},
- {"axis", ATTR_AXIS},
- {"rules", ATTR_RULES},
- {"classid", ATTR_CLASSID},
- {"scrolling", ATTR_SCROLLING},
- {"for", ATTR_FOR},
+ {"direction", ATTR_DIRECTION},
{"lang", ATTR_LANG},
{"align", ATTR_ALIGN},
- {"profile", ATTR_PROFILE},
- {"link", ATTR_LINK},
- {"declare", ATTR_DECLARE},
- {"longdesc", ATTR_LONGDESC},
+ {"size", ATTR_SIZE},
{"data", ATTR_DATA},
- {"readonly", ATTR_READONLY},
- {"pagey", ATTR_PAGEY},
+ {"codetype", ATTR_CODETYPE},
+ {"cols", ATTR_COLS},
+ {"scope", ATTR_SCOPE},
+ {"declare", ATTR_DECLARE},
+ {"onselect", ATTR_ONSELECT},
{"target", ATTR_TARGET},
- {"onclick", ATTR_ONCLICK},
- {"cellspacing", ATTR_CELLSPACING},
+ {"onreset", ATTR_ONRESET},
+ {"noresize", ATTR_NORESIZE},
+ {"onresize", ATTR_ONRESIZE},
+ {"span", ATTR_SPAN},
+ {"pagex", ATTR_PAGEX},
+ {"src", ATTR_SRC},
+ {"rows", ATTR_ROWS},
+ {"pagey", ATTR_PAGEY},
+ {"colspan", ATTR_COLSPAN},
+ {"left", ATTR_LEFT},
+ {"style", ATTR_STYLE},
+ {"readonly", ATTR_READONLY},
+ {"start", ATTR_START},
+ {"selected", ATTR_SELECTED},
+ {"axis", ATTR_AXIS},
+ {"rowspan", ATTR_ROWSPAN},
+ {"for", ATTR_FOR},
+ {"profile", ATTR_PROFILE},
+ {"coords", ATTR_COORDS},
+ {"width", ATTR_WIDTH},
{"face", ATTR_FACE},
- {"scrolldelay", ATTR_SCROLLDELAY},
- {"truespeed", ATTR_TRUESPEED},
- {"object", ATTR_OBJECT},
- {"defer", ATTR_DEFER},
+ {"char", ATTR_CHAR},
+ {"cellpadding", ATTR_CELLPADDING},
+ {"scrolling", ATTR_SCROLLING},
{"rev", ATTR_REV},
+ {"link", ATTR_LINK},
+ {"defer", ATTR_DEFER},
+ {"hidden", ATTR_HIDDEN},
+ {"longdesc", ATTR_LONGDESC},
+ {"cellspacing", ATTR_CELLSPACING},
+ {"onchange", ATTR_ONCHANGE},
+ {"challenge", ATTR_CHALLENGE},
+ {"class", ATTR_CLASS},
+ {"onclick", ATTR_ONCLICK},
{"alink", ATTR_ALINK},
- {"keytype", ATTR_KEYTYPE},
- {"version", ATTR_VERSION},
+ {"placeholder", ATTR_PLACEHOLDER},
{"onunload", ATTR_ONUNLOAD},
- {"pagex", ATTR_PAGEX},
- {"onkeypress", ATTR_ONKEYPRESS},
- {"prompt", ATTR_PROMPT},
- {"onfocus", ATTR_ONFOCUS},
- {"label", ATTR_LABEL},
- {"nosave", ATTR_NOSAVE},
- {"name", ATTR_NAME},
{"shape", ATTR_SHAPE},
- {"vspace", ATTR_VSPACE},
- {"oversrc", ATTR_OVERSRC},
- {"ismap", ATTR_ISMAP},
+ {"scrolldelay", ATTR_SCROLLDELAY},
{"hspace", ATTR_HSPACE},
- {"onabort", ATTR_ONABORT},
- {"accesskey", ATTR_ACCESSKEY},
- {"cellpadding", ATTR_CELLPADDING},
- {"compact", ATTR_COMPACT},
- {"onkeyup", ATTR_ONKEYUP},
- {"char", ATTR_CHAR},
- {"charset", ATTR_CHARSET},
- {"border", ATTR_BORDER},
- {"multiple", ATTR_MULTIPLE},
- {"hidden", ATTR_HIDDEN},
- {"media", ATTR_MEDIA},
- {"noshade", ATTR_NOSHADE},
- {"datetime", ATTR_DATETIME},
- {"cellborder", ATTR_CELLBORDER},
- {"onblur", ATTR_ONBLUR},
- {"bgcolor", ATTR_BGCOLOR},
- {"codebase", ATTR_CODEBASE},
- {"contenteditable", ATTR_CONTENTEDITABLE},
- {"pluginurl", ATTR_PLUGINURL},
{"valign", ATTR_VALIGN},
- {"mayscript", ATTR_MAYSCRIPT},
- {"vlink", ATTR_VLINK},
- {"standby", ATTR_STANDBY},
+ {"classid", ATTR_CLASSID},
+ {"prompt", ATTR_PROMPT},
+ {"name", ATTR_NAME},
+ {"rules", ATTR_RULES},
+ {"charset", ATTR_CHARSET},
+ {"onsearch", ATTR_ONSEARCH},
{"href", ATTR_HREF},
- {"value", ATTR_VALUE},
{"nohref", ATTR_NOHREF},
+ {"noshade", ATTR_NOSHADE},
+ {"version", ATTR_VERSION},
+ {"nosave", ATTR_NOSAVE},
+ {"keytype", ATTR_KEYTYPE},
+ {"height", ATTR_HEIGHT},
+ {"compact", ATTR_COMPACT},
+ {"onkeydown", ATTR_ONKEYDOWN},
+ {"vspace", ATTR_VSPACE},
{"headers", ATTR_HEADERS},
- {"rows", ATTR_ROWS},
{"pluginpage", ATTR_PLUGINPAGE},
- {"bordercolor", ATTR_BORDERCOLOR},
- {"bgproperties", ATTR_BGPROPERTIES},
+ {"object", ATTR_OBJECT},
+ {"media", ATTR_MEDIA},
+ {"incremental", ATTR_INCREMENTAL},
+ {"datetime", ATTR_DATETIME},
+ {"truespeed", ATTR_TRUESPEED},
+ {"oversrc", ATTR_OVERSRC},
+ {"label", ATTR_LABEL},
+ {"language", ATTR_LANGUAGE},
+ {"accept-charset", ATTR_ACCEPT_CHARSET},
+ {"onabort", ATTR_ONABORT},
+ {"archive", ATTR_ARCHIVE},
+ {"topmargin", ATTR_TOPMARGIN},
+ {"value", ATTR_VALUE},
+ {"html", ATTR_HTML},
+ {"ismap", ATTR_ISMAP},
+ {"results", ATTR_RESULTS},
+ {"hreflang", ATTR_HREFLANG},
+ {"vlink", ATTR_VLINK},
+ {"unknown", ATTR_UNKNOWN},
+ {"border", ATTR_BORDER},
+ {"checked", ATTR_CHECKED},
+ {"contenteditable", ATTR_CONTENTEDITABLE},
+ {"bgcolor", ATTR_BGCOLOR},
+ {"cellborder", ATTR_CELLBORDER},
{"pluginspage", ATTR_PLUGINSPAGE},
- {"onchange", ATTR_ONCHANGE},
- {"challenge", ATTR_CHALLENGE},
- {"usemap", ATTR_USEMAP},
- {"disabled", ATTR_DISABLED},
+ {"onfocus", ATTR_ONFOCUS},
+ {"tabindex", ATTR_TABINDEX},
+ {"pluginurl", ATTR_PLUGINURL},
+ {"method", ATTR_METHOD},
+ {"onkeyup", ATTR_ONKEYUP},
+ {"multiple", ATTR_MULTIPLE},
{"valuetype", ATTR_VALUETYPE},
+ {"bordercolor", ATTR_BORDERCOLOR},
+ {"frame", ATTR_FRAME},
+ {"mayscript", ATTR_MAYSCRIPT},
{"autocomplete", ATTR_AUTOCOMPLETE},
- {"tabindex", ATTR_TABINDEX},
- {"topmargin", ATTR_TOPMARGIN},
- {"accept-charset", ATTR_ACCEPT_CHARSET},
- {"html", ATTR_HTML},
+ {"onkeypress", ATTR_ONKEYPRESS},
+ {"charoff", ATTR_CHAROFF},
{"oncontextmenu", ATTR_ONCONTEXTMENU},
- {"wrap", ATTR_WRAP},
- {"nowrap", ATTR_NOWRAP},
- {"language", ATTR_LANGUAGE},
- {"frame", ATTR_FRAME},
- {"rowspan", ATTR_ROWSPAN},
- {"visibility", ATTR_VISIBILITY},
+ {"http-equiv", ATTR_HTTP_EQUIV},
{"scheme", ATTR_SCHEME},
+ {"codebase", ATTR_CODEBASE},
+ {"onblur", ATTR_ONBLUR},
+ {"autosave", ATTR_AUTOSAVE},
+ {"accesskey", ATTR_ACCESSKEY},
+ {"maxlength", ATTR_MAXLENGTH},
+ {"leftmargin", ATTR_LEFTMARGIN},
+ {"bgproperties", ATTR_BGPROPERTIES},
+ {"disabled", ATTR_DISABLED},
+ {"standby", ATTR_STANDBY},
+ {"usemap", ATTR_USEMAP},
+ {"marginwidth", ATTR_MARGINWIDTH},
+ {"onmousedown", ATTR_ONMOUSEDOWN},
+ {"ondblclick", ATTR_ONDBLCLICK},
{"scrollamount", ATTR_SCROLLAMOUNT},
+ {"visibility", ATTR_VISIBILITY},
+ {"behavior", ATTR_BEHAVIOR},
+ {"abbr", ATTR_ABBR},
+ {"marginheight", ATTR_MARGINHEIGHT},
{"onmouseup", ATTR_ONMOUSEUP},
{"onmouseout", ATTR_ONMOUSEOUT},
- {"ondblclick", ATTR_ONDBLCLICK},
- {"checked", ATTR_CHECKED},
- {"method", ATTR_METHOD},
- {"abbr", ATTR_ABBR},
- {"archive", ATTR_ARCHIVE},
- {"height", ATTR_HEIGHT},
- {"http-equiv", ATTR_HTTP_EQUIV},
- {"hreflang", ATTR_HREFLANG},
- {"onsubmit", ATTR_ONSUBMIT},
- {"leftmargin", ATTR_LEFTMARGIN},
{"onmouseover", ATTR_ONMOUSEOVER},
- {"charoff", ATTR_CHAROFF},
{"tableborder", ATTR_TABLEBORDER},
- {"onkeydown", ATTR_ONKEYDOWN},
- {"width", ATTR_WIDTH},
- {"unknown", ATTR_UNKNOWN},
- {"maxlength", ATTR_MAXLENGTH},
- {"summary", ATTR_SUMMARY},
- {"behavior", ATTR_BEHAVIOR},
- {"onmousedown", ATTR_ONMOUSEDOWN},
+ {"onsubmit", ATTR_ONSUBMIT},
{"background", ATTR_BACKGROUND},
- {"onmousemove", ATTR_ONMOUSEMOVE},
{"frameborder", ATTR_FRAMEBORDER},
- {"marginheight", ATTR_MARGINHEIGHT},
- {"marginwidth", ATTR_MARGINWIDTH}
+ {"summary", ATTR_SUMMARY},
+ {"onmousemove", ATTR_ONMOUSEMOVE}
};
static const short lookup[] =
{
-1, -1, -1, 0, 1, 2, -1, -1,
- -1, 3, -1, -1, -1, -1, 4, -1,
- -1, 5, -1, 6, 7, -1, -1, 8,
- -1, -1, -1, -1, 9, 10, -1, -1,
- -1, -1, -1, 11, -1, 12, -201, -1,
- 15, -1, 16, 17, -143, -2, -1, -1,
- -1, -1, -1, -1, 18, 19, -1, 20,
- -1, -1, -1, 21, -1, -1, -1, -1,
- 22, -1, 23, -1, -1, 24, -1, -1,
- 25, 26, -1, 27, 28, -1, 29, -1,
- -1, -1, 30, -1, -1, 31, -1, -1,
- -1, -1, 32, -1, -1, 33, 34, -1,
- 35, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 36, -1, -1, 37, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 38, -1, 39, 40, -1, 41,
- -1, 42, -1, -1, -1, 43, 44, 45,
- -1, 46, -1, 47, -1, -1, 48, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 49, 50, -1, -1, -1, 51, -1,
- 52, 53, 54, -1, -1, -1, 55, -1,
- -1, 56, -1, -1, -1, -1, -1, -1,
- 57, -1, -1, 58, -1, 59, -1, -1,
- -1, 60, -1, -1, 61, -1, 62, -1,
- 63, -1, -1, -1, -1, 64, 65, -1,
- 66, -1, -1, -1, -1, 67, 68, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 69, -1, -1, 70, 71, -1, -1,
- -1, -1, -1, -1, -1, 72, 73, 74,
- 75, -1, -1, 76, -1, -1, -1, -1,
- -1, 77, -1, -1, -1, -1, -1, 78,
- -1, 79, -1, 80, 81, -1, -1, -1,
- -1, 82, -1, 83, -1, -1, -1, -1,
- -1, -1, -1, 84, -1, -1, -1, 85,
- -1, 86, -1, -1, 87, -1, -1, -1,
- 88, -1, 89, 90, -1, 91, 92, 93,
- 94, -1, 95, -1, -1, -1, 96, -1,
- 97, -1, -1, 98, 99, -1, 100, -1,
- 101, 102, 103, 104, -1, 105, 106, 107,
- 108, -1, -1, -1, 109, -1, 110, 111,
- -1, -1, -1, -1, -1, -1, 112, -1,
- 113, -1, -1, -1, -1, -1, 114, -1,
- -1, 115, 116, 117, -1, -1, -1, -1,
- 118, -1, -1, -1, -1, 119, -1, -1,
- -1, 120, 121, -1, 122, -1, 123, -1,
- 124, -1, 125, -1, -1, 126, 127, 128,
- -1, 129, 130, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 131, -1, 132, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 133, -1, -1, -1, -1, -1, -1,
- -1, 134, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 135, -1,
- -1, -1, 136, -1, -1, -1, 137, -1,
- -1, -1, -1, -1, -1, -1, 138, -1,
- -1, -1, -1, 139, -1, 140, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3, -1,
+ -1, 4, -1, -1, -1, -1, -1, 5,
+ -1, -1, -1, -1, 6, -1, 7, -1,
+ -1, -1, 8, 9, -1, 10, -1, -1,
+ -1, 11, -1, -1, 12, -1, -1, -1,
+ -1, 13, -1, 14, -1, -1, -1, -1,
+ -1, 15, 16, 17, 18, 19, -1, -1,
+ -1, -1, 20, 21, -1, -1, -1, -1,
+ 22, -1, 23, -1, -1, -1, -1, 24,
+ 25, -1, -1, -1, 26, -1, -1, -1,
+ -1, 27, -1, -1, -1, 28, 29, 30,
+ -1, 31, 32, -1, -1, 33, -1, -1,
+ -1, -1, -1, 34, -273, 37, 38, -126,
+ -2, 39, 40, -1, -1, -1, -1, -1,
+ 41, -1, 42, -1, 43, 44, -1, -1,
+ 45, -1, 46, -1, -1, 47, -1, -1,
+ -1, -1, -1, 48, -1, -1, 49, 50,
+ -1, -1, -1, 51, -1, -1, -1, 52,
+ -1, -1, -1, 53, -1, -1, -1, 54,
+ -1, -1, -1, -1, 55, -1, 56, -1,
+ -1, 57, -1, -1, -1, 58, -1, -1,
+ -1, -1, -1, 59, 60, 61, -1, 62,
+ -1, -1, 63, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 64, 65,
+ 66, -1, 67, -1, -1, 68, 69, -1,
+ 70, -1, -1, -1, -1, -1, -1, 71,
+ -1, -1, -1, -1, -1, 72, -1, -1,
+ -1, -1, 73, -1, -1, -1, -1, 74,
+ -1, -1, -1, -1, -1, 75, -1, -1,
+ -1, 76, -1, -1, 77, 78, -1, 79,
+ 80, 81, -1, 82, 83, -1, -1, -1,
+ -1, 84, -1, -1, -1, 85, 86, -1,
+ -1, -1, 87, 88, -1, 89, -1, 90,
+ 91, -1, -1, 92, 93, -1, -1, -1,
+ 94, 95, -1, 96, 97, -1, -1, 98,
+ -1, -1, 99, -1, -1, -1, -1, -1,
+ -1, -1, 100, 101, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ 102, -1, -1, -1, -1, 103, -1, 104,
+ 105, -1, -1, -1, 106, 107, -1, 108,
+ 109, -1, 110, -1, 111, -1, -1, -1,
+ -1, -1, -1, -1, -1, 112, 113, -1,
+ -1, 114, -1, 115, -1, -1, -1, -1,
+ -1, -1, -1, 116, 117, 118, 119, 120,
+ -1, 121, 122, 123, 124, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 141, -1, -1, -1, -1, -1,
- 142, -1, -1, -1, -1, -1, -1, -1,
+ 125, -1, -1, -1, -1, -1, -1, -1,
+ -1, 126, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 127,
+ -1, -1, 128, -1, -1, 129, -1, 130,
+ 131, -1, 132, -1, -1, -1, -1, -1,
+ 133, -1, 134, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, 136, 137, -1, -1,
+ -1, -1, 138, -1, -1, -1, -1, -1,
+ 139, -1, 140, 141, -1, -1, -1, 142,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 143, -1, -1, 144, -1,
- -1, -1, -1, -1, 145, -1, -1, -1,
- -1, -1, -1, 146, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 143, -1, -1, -1, -1, 144,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 145, -1, -1, -1, -1,
+ -1, -1, -1, -1, 146, -1, 147, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 147, -1, -1,
- 148, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 149, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 148, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 150, -1,
- -1, -1, -1, -1, -1, -1, -1, 151,
- 152, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 153,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ 149, 150, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 151, -1,
+ 152, 153, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ 154, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 155,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
@@ -358,10 +358,12 @@ findAttr (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 156,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 157, 158, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 154, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 159, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
@@ -370,7 +372,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, 155
+ -1, -1, -1, 160
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -420,6 +422,7 @@ static const char * const attrList[] = {
"ALT",
"ARCHIVE",
"AUTOCOMPLETE",
+ "AUTOSAVE",
"AXIS",
"BACKGROUND",
"BEHAVIOR",
@@ -470,6 +473,7 @@ static const char * const attrList[] = {
"HTML",
"HTTP-EQUIV",
"ID",
+ "INCREMENTAL",
"ISMAP",
"KEYTYPE",
"LABEL",
@@ -513,12 +517,14 @@ static const char * const attrList[] = {
"ONMOUSEUP",
"ONRESET",
"ONRESIZE",
+ "ONSEARCH",
"ONSELECT",
"ONSUBMIT",
"ONUNLOAD",
"OVERSRC",
"PAGEX",
"PAGEY",
+ "PLACEHOLDER",
"PLAIN",
"PLUGINPAGE",
"PLUGINSPAGE",
@@ -527,6 +533,7 @@ static const char * const attrList[] = {
"PROMPT",
"READONLY",
"REL",
+ "RESULTS",
"REV",
"ROWS",
"ROWSPAN",
diff --git a/WebCore/khtml/misc/htmlattrs.h b/WebCore/khtml/misc/htmlattrs.h
index c6abbbf..040655a 100644
--- a/WebCore/khtml/misc/htmlattrs.h
+++ b/WebCore/khtml/misc/htmlattrs.h
@@ -17,153 +17,158 @@ htmlattrs.in by makeattrs, do not edit */
#define ATTR_ALT 8
#define ATTR_ARCHIVE 9
#define ATTR_AUTOCOMPLETE 10
-#define ATTR_AXIS 11
-#define ATTR_BACKGROUND 12
-#define ATTR_BEHAVIOR 13
-#define ATTR_BGCOLOR 14
-#define ATTR_BGPROPERTIES 15
-#define ATTR_BORDER 16
-#define ATTR_BORDERCOLOR 17
-#define ATTR_CELLPADDING 18
-#define ATTR_CELLSPACING 19
-#define ATTR_CHAR 20
-#define ATTR_CHALLENGE 21
-#define ATTR_CHAROFF 22
-#define ATTR_CHARSET 23
-#define ATTR_CHECKED 24
-#define ATTR_CELLBORDER 25
-#define ATTR_CITE 26
-#define ATTR_CLASS 27
-#define ATTR_CLASSID 28
-#define ATTR_CLEAR 29
-#define ATTR_CODE 30
-#define ATTR_CODEBASE 31
-#define ATTR_CODETYPE 32
-#define ATTR_COLOR 33
-#define ATTR_COLS 34
-#define ATTR_COLSPAN 35
-#define ATTR_COMPACT 36
-#define ATTR_CONTENT 37
-#define ATTR_CONTENTEDITABLE 38
-#define ATTR_COORDS 39
-#define ATTR_DATA 40
-#define ATTR_DATETIME 41
-#define ATTR_DECLARE 42
-#define ATTR_DEFER 43
-#define ATTR_DIR 44
-#define ATTR_DIRECTION 45
-#define ATTR_DISABLED 46
-#define ATTR_ENCTYPE 47
-#define ATTR_FACE 48
-#define ATTR_FOR 49
-#define ATTR_FRAME 50
-#define ATTR_FRAMEBORDER 51
-#define ATTR_HEADERS 52
-#define ATTR_HEIGHT 53
-#define ATTR_HIDDEN 54
-#define ATTR_HREF 55
-#define ATTR_HREFLANG 56
-#define ATTR_HSPACE 57
-#define ATTR_HTML 58
-#define ATTR_HTTP_EQUIV 59
-#define ATTR_ID 60
-#define ATTR_ISMAP 61
-#define ATTR_KEYTYPE 62
-#define ATTR_LABEL 63
-#define ATTR_LANG 64
-#define ATTR_LANGUAGE 65
-#define ATTR_LEFT 66
-#define ATTR_LEFTMARGIN 67
-#define ATTR_LINK 68
-#define ATTR_LONGDESC 69
-#define ATTR_LOOP 70
-#define ATTR_MARGINHEIGHT 71
-#define ATTR_MARGINWIDTH 72
-#define ATTR_MAXLENGTH 73
-#define ATTR_MAYSCRIPT 74
-#define ATTR_MEDIA 75
-#define ATTR_METHOD 76
-#define ATTR_MULTIPLE 77
-#define ATTR_NAME 78
-#define ATTR_NOHREF 79
-#define ATTR_NORESIZE 80
-#define ATTR_NOSAVE 81
-#define ATTR_NOSHADE 82
-#define ATTR_NOWRAP 83
-#define ATTR_OBJECT 84
-#define ATTR_ONABORT 85
-#define ATTR_ONBLUR 86
-#define ATTR_ONCHANGE 87
-#define ATTR_ONCLICK 88
-#define ATTR_ONCONTEXTMENU 89
-#define ATTR_ONDBLCLICK 90
-#define ATTR_ONERROR 91
-#define ATTR_ONFOCUS 92
-#define ATTR_ONKEYDOWN 93
-#define ATTR_ONKEYPRESS 94
-#define ATTR_ONKEYUP 95
-#define ATTR_ONLOAD 96
-#define ATTR_ONMOUSEDOWN 97
-#define ATTR_ONMOUSEMOVE 98
-#define ATTR_ONMOUSEOUT 99
-#define ATTR_ONMOUSEOVER 100
-#define ATTR_ONMOUSEUP 101
-#define ATTR_ONRESET 102
-#define ATTR_ONRESIZE 103
-#define ATTR_ONSELECT 104
-#define ATTR_ONSUBMIT 105
-#define ATTR_ONUNLOAD 106
-#define ATTR_OVERSRC 107
-#define ATTR_PAGEX 108
-#define ATTR_PAGEY 109
-#define ATTR_PLAIN 110
-#define ATTR_PLUGINPAGE 111
-#define ATTR_PLUGINSPAGE 112
-#define ATTR_PLUGINURL 113
-#define ATTR_PROFILE 114
-#define ATTR_PROMPT 115
-#define ATTR_READONLY 116
-#define ATTR_REL 117
-#define ATTR_REV 118
-#define ATTR_ROWS 119
-#define ATTR_ROWSPAN 120
-#define ATTR_RULES 121
-#define ATTR_SCHEME 122
-#define ATTR_SCOPE 123
-#define ATTR_SCROLLAMOUNT 124
-#define ATTR_SCROLLDELAY 125
-#define ATTR_SCROLLING 126
-#define ATTR_SELECTED 127
-#define ATTR_SHAPE 128
-#define ATTR_SIZE 129
-#define ATTR_SPAN 130
-#define ATTR_SRC 131
-#define ATTR_STANDBY 132
-#define ATTR_START 133
-#define ATTR_STYLE 134
-#define ATTR_SUMMARY 135
-#define ATTR_TABINDEX 136
-#define ATTR_TABLEBORDER 137
-#define ATTR_TARGET 138
-#define ATTR_TEXT 139
-#define ATTR_TITLE 140
-#define ATTR_TOP 141
-#define ATTR_TOPMARGIN 142
-#define ATTR_TRUESPEED 143
-#define ATTR_TYPE 144
-#define ATTR_UNKNOWN 145
-#define ATTR_USEMAP 146
-#define ATTR_VALIGN 147
-#define ATTR_VALUE 148
-#define ATTR_VALUETYPE 149
-#define ATTR_VERSION 150
-#define ATTR_VISIBILITY 151
-#define ATTR_VLINK 152
-#define ATTR_VSPACE 153
-#define ATTR_WIDTH 154
-#define ATTR_WRAP 155
-#define ATTR_Z_INDEX 156
-#define ATTR_LAST_ATTR 156
+#define ATTR_AUTOSAVE 11
+#define ATTR_AXIS 12
+#define ATTR_BACKGROUND 13
+#define ATTR_BEHAVIOR 14
+#define ATTR_BGCOLOR 15
+#define ATTR_BGPROPERTIES 16
+#define ATTR_BORDER 17
+#define ATTR_BORDERCOLOR 18
+#define ATTR_CELLPADDING 19
+#define ATTR_CELLSPACING 20
+#define ATTR_CHAR 21
+#define ATTR_CHALLENGE 22
+#define ATTR_CHAROFF 23
+#define ATTR_CHARSET 24
+#define ATTR_CHECKED 25
+#define ATTR_CELLBORDER 26
+#define ATTR_CITE 27
+#define ATTR_CLASS 28
+#define ATTR_CLASSID 29
+#define ATTR_CLEAR 30
+#define ATTR_CODE 31
+#define ATTR_CODEBASE 32
+#define ATTR_CODETYPE 33
+#define ATTR_COLOR 34
+#define ATTR_COLS 35
+#define ATTR_COLSPAN 36
+#define ATTR_COMPACT 37
+#define ATTR_CONTENT 38
+#define ATTR_CONTENTEDITABLE 39
+#define ATTR_COORDS 40
+#define ATTR_DATA 41
+#define ATTR_DATETIME 42
+#define ATTR_DECLARE 43
+#define ATTR_DEFER 44
+#define ATTR_DIR 45
+#define ATTR_DIRECTION 46
+#define ATTR_DISABLED 47
+#define ATTR_ENCTYPE 48
+#define ATTR_FACE 49
+#define ATTR_FOR 50
+#define ATTR_FRAME 51
+#define ATTR_FRAMEBORDER 52
+#define ATTR_HEADERS 53
+#define ATTR_HEIGHT 54
+#define ATTR_HIDDEN 55
+#define ATTR_HREF 56
+#define ATTR_HREFLANG 57
+#define ATTR_HSPACE 58
+#define ATTR_HTML 59
+#define ATTR_HTTP_EQUIV 60
+#define ATTR_ID 61
+#define ATTR_INCREMENTAL 62
+#define ATTR_ISMAP 63
+#define ATTR_KEYTYPE 64
+#define ATTR_LABEL 65
+#define ATTR_LANG 66
+#define ATTR_LANGUAGE 67
+#define ATTR_LEFT 68
+#define ATTR_LEFTMARGIN 69
+#define ATTR_LINK 70
+#define ATTR_LONGDESC 71
+#define ATTR_LOOP 72
+#define ATTR_MARGINHEIGHT 73
+#define ATTR_MARGINWIDTH 74
+#define ATTR_MAXLENGTH 75
+#define ATTR_MAYSCRIPT 76
+#define ATTR_MEDIA 77
+#define ATTR_METHOD 78
+#define ATTR_MULTIPLE 79
+#define ATTR_NAME 80
+#define ATTR_NOHREF 81
+#define ATTR_NORESIZE 82
+#define ATTR_NOSAVE 83
+#define ATTR_NOSHADE 84
+#define ATTR_NOWRAP 85
+#define ATTR_OBJECT 86
+#define ATTR_ONABORT 87
+#define ATTR_ONBLUR 88
+#define ATTR_ONCHANGE 89
+#define ATTR_ONCLICK 90
+#define ATTR_ONCONTEXTMENU 91
+#define ATTR_ONDBLCLICK 92
+#define ATTR_ONERROR 93
+#define ATTR_ONFOCUS 94
+#define ATTR_ONKEYDOWN 95
+#define ATTR_ONKEYPRESS 96
+#define ATTR_ONKEYUP 97
+#define ATTR_ONLOAD 98
+#define ATTR_ONMOUSEDOWN 99
+#define ATTR_ONMOUSEMOVE 100
+#define ATTR_ONMOUSEOUT 101
+#define ATTR_ONMOUSEOVER 102
+#define ATTR_ONMOUSEUP 103
+#define ATTR_ONRESET 104
+#define ATTR_ONRESIZE 105
+#define ATTR_ONSEARCH 106
+#define ATTR_ONSELECT 107
+#define ATTR_ONSUBMIT 108
+#define ATTR_ONUNLOAD 109
+#define ATTR_OVERSRC 110
+#define ATTR_PAGEX 111
+#define ATTR_PAGEY 112
+#define ATTR_PLACEHOLDER 113
+#define ATTR_PLAIN 114
+#define ATTR_PLUGINPAGE 115
+#define ATTR_PLUGINSPAGE 116
+#define ATTR_PLUGINURL 117
+#define ATTR_PROFILE 118
+#define ATTR_PROMPT 119
+#define ATTR_READONLY 120
+#define ATTR_REL 121
+#define ATTR_RESULTS 122
+#define ATTR_REV 123
+#define ATTR_ROWS 124
+#define ATTR_ROWSPAN 125
+#define ATTR_RULES 126
+#define ATTR_SCHEME 127
+#define ATTR_SCOPE 128
+#define ATTR_SCROLLAMOUNT 129
+#define ATTR_SCROLLDELAY 130
+#define ATTR_SCROLLING 131
+#define ATTR_SELECTED 132
+#define ATTR_SHAPE 133
+#define ATTR_SIZE 134
+#define ATTR_SPAN 135
+#define ATTR_SRC 136
+#define ATTR_STANDBY 137
+#define ATTR_START 138
+#define ATTR_STYLE 139
+#define ATTR_SUMMARY 140
+#define ATTR_TABINDEX 141
+#define ATTR_TABLEBORDER 142
+#define ATTR_TARGET 143
+#define ATTR_TEXT 144
+#define ATTR_TITLE 145
+#define ATTR_TOP 146
+#define ATTR_TOPMARGIN 147
+#define ATTR_TRUESPEED 148
+#define ATTR_TYPE 149
+#define ATTR_UNKNOWN 150
+#define ATTR_USEMAP 151
+#define ATTR_VALIGN 152
+#define ATTR_VALUE 153
+#define ATTR_VALUETYPE 154
+#define ATTR_VERSION 155
+#define ATTR_VISIBILITY 156
+#define ATTR_VLINK 157
+#define ATTR_VSPACE 158
+#define ATTR_WIDTH 159
+#define ATTR_WRAP 160
+#define ATTR_Z_INDEX 161
+#define ATTR_LAST_ATTR 161
DOM::DOMString getAttrName(unsigned short id);
#endif
diff --git a/WebCore/khtml/misc/htmlattrs.in b/WebCore/khtml/misc/htmlattrs.in
index 24c2063..a44ed92 100644
--- a/WebCore/khtml/misc/htmlattrs.in
+++ b/WebCore/khtml/misc/htmlattrs.in
@@ -8,6 +8,7 @@ alink
alt
archive
autocomplete
+autosave
axis
background
behavior
@@ -58,6 +59,7 @@ hspace
html
http-equiv
id
+incremental
ismap
keytype
label
@@ -101,12 +103,14 @@ onmouseover
onmouseup
onreset
onresize
+onsearch
onselect
onsubmit
onunload
oversrc
pagex
pagey
+placeholder
plain
pluginpage
pluginspage
@@ -115,6 +119,7 @@ profile
prompt
readonly
rel
+results
rev
rows
rowspan
diff --git a/WebCore/khtml/rendering/render_form.cpp b/WebCore/khtml/rendering/render_form.cpp
index 1c659ee..4c38619 100644
--- a/WebCore/khtml/rendering/render_form.cpp
+++ b/WebCore/khtml/rendering/render_form.cpp
@@ -553,6 +553,10 @@ RenderLineEdit::RenderLineEdit(HTMLInputElementImpl *element)
connect(edit,SIGNAL(textChanged(const QString &)),this,SLOT(slotTextChanged(const QString &)));
connect(edit,SIGNAL(clicked()),this,SLOT(slotClicked()));
+#if APPLE_CHANGES
+ connect(edit,SIGNAL(performSearch()), this, SLOT(slotPerformSearch()));
+#endif
+
#if !APPLE_CHANGES
if(element->inputType() == HTMLInputElementImpl::PASSWORD)
edit->setEchoMode( QLineEdit::Password );
@@ -588,6 +592,14 @@ void RenderLineEdit::slotReturnPressed()
fe->submitClick();
}
+#if APPLE_CHANGES
+void RenderLineEdit::slotPerformSearch()
+{
+ // Fire the "search" DOM event.
+ element()->dispatchHTMLEvent(EventImpl::SEARCH_EVENT, true, false);
+}
+#endif
+
void RenderLineEdit::handleFocusOut()
{
if ( widget() && widget()->edited() ) {
@@ -668,6 +680,16 @@ void RenderLineEdit::updateFromElement()
}
w->setReadOnly(element()->readOnly());
+#if APPLE_CHANGES
+ // Handle updating the search attributes.
+ if (w->type() == QLineEdit::Search) {
+ w->setLiveSearch(!element()->getAttribute(ATTR_INCREMENTAL).isNull());
+ w->setAutoSaveName(element()->getAttribute(ATTR_AUTOSAVE).string());
+ w->setMaxResults(element()->maxResults());
+ w->setPlaceholderString(element()->getAttribute(ATTR_PLACEHOLDER).string());
+ }
+#endif
+
RenderFormElement::updateFromElement();
}
diff --git a/WebCore/khtml/rendering/render_form.h b/WebCore/khtml/rendering/render_form.h
index ec13dd0..cc600b9 100644
--- a/WebCore/khtml/rendering/render_form.h
+++ b/WebCore/khtml/rendering/render_form.h
@@ -263,6 +263,9 @@ public:
public slots:
void slotReturnPressed();
void slotTextChanged(const QString &string);
+#if APPLE_CHANGES
+ void slotPerformSearch();
+#endif
protected:
virtual void handleFocusOut();
diff --git a/WebCore/khtml/xml/dom2_eventsimpl.cpp b/WebCore/khtml/xml/dom2_eventsimpl.cpp
index eb8177c..eb0f08d 100644
--- a/WebCore/khtml/xml/dom2_eventsimpl.cpp
+++ b/WebCore/khtml/xml/dom2_eventsimpl.cpp
@@ -227,6 +227,10 @@ EventImpl::EventId EventImpl::typeToId(DOMString type)
return KEYDOWN_EVENT;
else if (type == "keyup")
return KEYUP_EVENT;
+#if APPLE_CHANGES
+ else if (type == "search")
+ return SEARCH_EVENT;
+#endif
else if (type == "textInput")
return TEXTINPUT_EVENT;
else if (type == "readystatechange")
@@ -305,6 +309,10 @@ DOMString EventImpl::idToType(EventImpl::EventId id)
return "keypress";
case TEXTINPUT_EVENT:
return "textInput";
+#if APPLE_CHANGES
+ case SEARCH_EVENT:
+ return "search";
+#endif
// 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 c6407be..9ff14d1 100644
--- a/WebCore/khtml/xml/dom2_eventsimpl.h
+++ b/WebCore/khtml/xml/dom2_eventsimpl.h
@@ -79,6 +79,9 @@ public:
RESIZE_EVENT,
SCROLL_EVENT,
CONTEXTMENU_EVENT,
+#if APPLE_CHANGES
+ SEARCH_EVENT,
+#endif
// Keyboard events
KEYDOWN_EVENT,
KEYUP_EVENT,
diff --git a/WebCore/kwq/KWQLineEdit.h b/WebCore/kwq/KWQLineEdit.h
index a856ddc..fbbea62 100644
--- a/WebCore/kwq/KWQLineEdit.h
+++ b/WebCore/kwq/KWQLineEdit.h
@@ -69,17 +69,24 @@ public:
void returnPressed() { m_returnPressed.call(); }
void textChanged() { m_textChanged.call(text()); }
+ void performSearch() { m_performSearch.call(); }
void clicked();
virtual bool checksDescendantsForFocus() const;
+ Type type() const { return m_type; }
+
void setLiveSearch(bool liveSearch);
+ void setAutoSaveName(const QString& name);
+ void setMaxResults(int maxResults);
+ void setPlaceholderString(const QString& placeholder);
private:
KWQSignal m_returnPressed;
KWQSignal m_textChanged;
KWQSignal m_clicked;
+ KWQSignal m_performSearch;
Type m_type;
KWQTextFieldController *m_controller;
};
diff --git a/WebCore/kwq/KWQLineEdit.mm b/WebCore/kwq/KWQLineEdit.mm
index 37fe01a..f8263a4 100644
--- a/WebCore/kwq/KWQLineEdit.mm
+++ b/WebCore/kwq/KWQLineEdit.mm
@@ -35,7 +35,9 @@
QLineEdit::QLineEdit(Type type)
: m_returnPressed(this, SIGNAL(returnPressed()))
, m_textChanged(this, SIGNAL(textChanged(const QString &)))
- , m_clicked(this, SIGNAL(clicked())), m_type(type)
+ , m_clicked(this, SIGNAL(clicked()))
+ , m_performSearch(this, SIGNAL(performSearch()))
+ , m_type(type)
{
id view = nil;
@@ -261,5 +263,42 @@ void QLineEdit::setLiveSearch(bool liveSearch)
return;
NSSearchField *searchField = (NSSearchField *)getView();
- [[searchField cell] setSendsWholeSearchString: !liveSearch];
+ [[searchField cell] setSendsWholeSearchString:!liveSearch];
}
+
+void QLineEdit::setAutoSaveName(const QString& name)
+{
+ if (m_type != Search)
+ return;
+
+ QString autosave;
+ if (!name.isEmpty())
+ autosave = "com.apple.WebKit.searchField:" + name;
+
+ NSSearchField *searchField = (NSSearchField *)getView();
+ [searchField setRecentsAutosaveName:autosave.getNSString()];
+}
+
+void QLineEdit::setMaxResults(int maxResults)
+{
+ if (m_type != Search)
+ return;
+
+ NSSearchField *searchField = (NSSearchField *)getView();
+ if (!maxResults)
+ [[searchField cell] setSearchButtonCell:nil];
+ else
+ [[searchField cell] resetSearchButtonCell];
+
+ [[searchField cell] setMaximumRecents:maxResults];
+}
+
+void QLineEdit::setPlaceholderString(const QString& placeholder)
+{
+ if (m_type != Search)
+ return;
+
+ NSSearchField *searchField = (NSSearchField *)getView();
+ [[searchField cell] setPlaceholderString:placeholder.getNSString()];
+}
+
diff --git a/WebCore/kwq/KWQSlot.mm b/WebCore/kwq/KWQSlot.mm
index 0f9cbe5..adf794d 100644
--- a/WebCore/kwq/KWQSlot.mm
+++ b/WebCore/kwq/KWQSlot.mm
@@ -62,6 +62,7 @@ enum FunctionNumber {
slotLoaderRequestStarted,
slotParentCompleted,
slotParentDestroyed,
+ slotPerformSearch,
slotRedirect,
slotReturnPressed,
slotSelected,
@@ -99,6 +100,7 @@ KWQSlot::KWQSlot(QObject *object, const char *member)
CASE(slotLoaderRequestDone, (khtml::DocLoader *, khtml::CachedObject *), KHTMLPart)
CASE(slotLoaderRequestStarted, (khtml::DocLoader *, khtml::CachedObject *), KHTMLPart)
CASE(slotParentCompleted, (), KHTMLPart)
+ CASE(slotPerformSearch, (), RenderLineEdit)
CASE(slotRedirect, (), KHTMLPart)
CASE(slotReturnPressed, (), RenderLineEdit)
CASE(slotSelected, (int), RenderSelect)
@@ -182,6 +184,7 @@ void KWQSlot::call() const
CASE(slotFinishedParsing, KHTMLPart, slotFinishedParsing)
CASE(slotParentCompleted, KHTMLPart, slotParentCompleted)
CASE(slotParentDestroyed, WindowQObject, parentDestroyed)
+ CASE(slotPerformSearch, RenderLineEdit, slotPerformSearch)
CASE(slotRedirect, KHTMLPart, slotRedirect)
CASE(slotReturnPressed, RenderLineEdit, slotReturnPressed)
CASE(slotSelectionChanged, RenderSelect, slotSelectionChanged)
diff --git a/WebCore/kwq/KWQTextField.mm b/WebCore/kwq/KWQTextField.mm
index b9d51af..ee11989 100644
--- a/WebCore/kwq/KWQTextField.mm
+++ b/WebCore/kwq/KWQTextField.mm
@@ -88,22 +88,26 @@
[[field cell] setScrollable:YES];
[field setFormatter:formatter];
[field setDelegate:self];
- [field setTarget:self];
- [field setAction:@selector(action:)];
+
+ if (widget->type() == QLineEdit::Search) {
+ [field setTarget:self];
+ [field setAction:@selector(action:)];
+ }
return self;
}
--(void)invalidate
+- (void)invalidate
{
widget = NULL;
}
-- (void)action:sender
+- (void)action:(id)sender
{
if (!widget)
return;
- widget->returnPressed();
+ widget->textChanged();
+ widget->performSearch();
}
- (void)dealloc
@@ -141,7 +145,7 @@
edited = ed;
}
--(void)controlTextDidBeginEditing:(NSNotification *)notification
+- (void)controlTextDidBeginEditing:(NSNotification *)notification
{
if (!widget)
return;
@@ -150,7 +154,7 @@
[bridge controlTextDidBeginEditing:notification];
}
--(void)controlTextDidEndEditing:(NSNotification *)notification
+- (void)controlTextDidEndEditing:(NSNotification *)notification
{
if (!widget)
return;
@@ -159,9 +163,13 @@
[bridge controlTextDidEndEditing:notification];
[self setHasFocus:NO];
+
+ if ([[[notification userInfo] objectForKey:@"NSTextMovement"] intValue] == NSReturnTextMovement) {
+ widget->returnPressed();
+ }
}
--(void)controlTextDidChange:(NSNotification *)notification
+- (void)controlTextDidChange:(NSNotification *)notification
{
if (!widget)
return;
@@ -176,7 +184,7 @@
widget->textChanged();
}
--(BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)fieldEditor
+- (BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)fieldEditor
{
if (!widget)
return NO;
@@ -198,7 +206,7 @@
return [bridge control:control textShouldBeginEditing:fieldEditor];
}
--(BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
+- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
{
if (!widget)
return NO;
@@ -207,7 +215,7 @@
return [bridge control:control textShouldEndEditing:fieldEditor];
}
--(BOOL)control:(NSControl *)control didFailToFormatString:(NSString *)string errorDescription:(NSString *)error
+- (BOOL)control:(NSControl *)control didFailToFormatString:(NSString *)string errorDescription:(NSString *)error
{
if (!widget)
return NO;
@@ -216,7 +224,7 @@
return [bridge control:control didFailToFormatString:string errorDescription:error];
}
--(void)control:(NSControl *)control didFailToValidatePartialString:(NSString *)string errorDescription:(NSString *)error
+- (void)control:(NSControl *)control didFailToValidatePartialString:(NSString *)string errorDescription:(NSString *)error
{
if (!widget)
return;
@@ -225,7 +233,7 @@
[bridge control:control didFailToValidatePartialString:string errorDescription:error];
}
--(BOOL)control:(NSControl *)control isValidObject:(id)obj
+- (BOOL)control:(NSControl *)control isValidObject:(id)obj
{
if (!widget)
return NO;
@@ -234,7 +242,7 @@
return [bridge control:control isValidObject:obj];
}
--(BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector
+- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector
{
if (!widget)
return NO;
@@ -243,7 +251,7 @@
return [bridge control:control textView:textView doCommandBySelector:commandSelector];
}
--(void)textChanged
+- (void)textChanged
{
if (widget)
widget->textChanged();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list