[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.0/kdelibs/khtml/ecma
From:       Maks Orlovich <maksim () kde ! org>
Date:       2008-03-14 18:51:55
Message-ID: 1205520715.422590.27660.nullmailer () svn ! kde ! org
[Download RAW message or body]

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,


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic