[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 08:37:46 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 6cd24491326161cce132f7910efb4754107e0adc
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Apr 29 16:20:36 2004 +0000

            Reviewed by Ken.
    
            - fixed <rdar://problem/3636566>: "space bar on a form button hits default button instead (autorestore.apple.com)"
    
            * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::defaultEventHandler):
            Remove special handling for space, falling back to default AppKit behavior. Change enter handling to
            click the form element itself in the case of elements other than text input ones.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6517 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 7dc4eb0..bb5a2ad 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -2,6 +2,16 @@
 
         Reviewed by Ken.
 
+        - fixed <rdar://problem/3636566>: "space bar on a form button hits default button instead (autorestore.apple.com)"
+
+        * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::defaultEventHandler):
+        Remove special handling for space, falling back to default AppKit behavior. Change enter handling to
+        click the form element itself in the case of elements other than text input ones.
+
+2004-04-29  Darin Adler  <darin at apple.com>
+
+        Reviewed by Ken.
+
         - fixed <rdar://problem/3636673>: "unrepro nil-deref crash in KHTMLPart::frameDetached() (espn.com)"
 
         * kwq/KWQKHTMLPart.mm: (KHTMLPart::frameDetached): Check for nil.
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index 5cc2f2a..45c95d5 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -1882,49 +1882,39 @@ void HTMLInputElementImpl::defaultEventHandler(EventImpl *evt)
 #if APPLE_CHANGES
     // Use key press event here since sending simulated mouse events
     // on key down blocks the proper sending of the key press event.
-    if (evt->id() == EventImpl::KEYPRESS_EVENT) {
-    
-        if (!m_form || !m_render || !evt->isKeyboardEvent())
-            return;
-        
+    if (evt->id() == EventImpl::KEYPRESS_EVENT && evt->isKeyboardEvent()) {
         DOMString key = static_cast<KeyboardEventImpl *>(evt)->keyIdentifier();
-        
         switch (m_type) {
+            case BUTTON:
+            case CHECKBOX:
+            case FILE:
             case IMAGE:
+            case RADIO:
             case RESET:
             case SUBMIT:
-                // simulate mouse click for spacebar and enter
+                // Simulate mouse click for enter or spacebar for these types of elements.
+                // The AppKit already does this for spacebar for some, but not all, of them.
                 if (key == "U+000020" || key == "Enter") {
-                    m_form->submitClick();
-                    evt->setDefaultHandled();
-                }
-                break;
-            case CHECKBOX:
-            case RADIO:
-                // for enter, find the first successful image or submit element 
-                // send it a simulated mouse click
-                if (key == "Enter") {
-                    m_form->submitClick();
+                    click();
                     evt->setDefaultHandled();
                 }
                 break;
-            case TEXT:
+            case HIDDEN:
+            case ISINDEX:
+            case PASSWORD:
+            case RANGE:
             case SEARCH:
-            case PASSWORD: {
-                // For enter, find the first successful image or submit element 
-                // send it a simulated mouse click.
-                if (key == "Enter") {
+            case TEXT:
+                // Simulate mouse click on the default form button for enter for these types of elements.
+                if (key == "Enter" && m_form) {
                     m_form->submitClick();
                     evt->setDefaultHandled();
                 }
                 break;
-            }
-            default:
-                // not handled for the other widgets
-                break;
         }
     }
 #endif
+
     HTMLGenericFormElementImpl::defaultEventHandler(evt);
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list