From kde-commits Fri Mar 14 18:51:55 2008 From: Maks Orlovich Date: Fri, 14 Mar 2008 18:51:55 +0000 To: kde-commits Subject: branches/KDE/4.0/kdelibs/khtml/ecma Message-Id: <1205520715.422590.27660.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=120552072627100 SVN commit 785691 by orlovich: Handle non-standard, but widely supported click() on button. (Noticed while making a testcase) M +5 -1 kjs_html.cpp M +1 -1 kjs_html.h --- branches/KDE/4.0/kdelibs/khtml/ecma/kjs_html.cpp #785690:785691 @@ -874,9 +874,10 @@ type KJS::HTMLElement::ButtonType DontDelete|ReadOnly value KJS::HTMLElement::ButtonValue DontDelete @end -@begin HTMLButtonElementProtoTable 2 +@begin HTMLButtonElementProtoTable 3 blur KJS::HTMLElement::ButtonBlur DontDelete|Function 0 focus KJS::HTMLElement::ButtonFocus DontDelete|Function 0 + click KJS::HTMLElement::ButtonClick DontDelete|Function 0 @end @begin HTMLLabelElementTable 3 form KJS::HTMLElement::LabelForm DontDelete|ReadOnly @@ -2189,6 +2190,9 @@ else if (id == KJS::HTMLElement::ButtonFocus) { button.focus(); return jsUndefined(); + } else if (id == KJS::HTMLElement::ButtonClick) { + button.click(); + return jsUndefined(); } } break; --- branches/KDE/4.0/kdelibs/khtml/ecma/kjs_html.h #785690:785691 @@ -106,7 +106,7 @@ TextAreaCols, TextAreaDisabled, TextAreaForm, TextAreaType, TextAreaTabIndex, TextAreaReadOnly, TextAreaRows, TextAreaValue, TextAreaBlur, TextAreaFocus, TextAreaSelectionStart, TextAreaSelectionEnd, TextAreaSetSelectionRange, - TextAreaTextLength, ButtonBlur, ButtonFocus, ButtonForm, ButtonTabIndex, ButtonName, + TextAreaTextLength, ButtonBlur, ButtonFocus, ButtonClick, ButtonForm, ButtonTabIndex, ButtonName, ButtonDisabled, ButtonAccessKey, ButtonType, ButtonValue, LabelHtmlFor, LabelForm, LabelAccessKey, FieldSetForm, LegendForm, LegendAccessKey, LegendAlign, UListType, UListCompact, OListStart, OListCompact,