[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:14:28 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 177864ba792fec886ef0a1c29feb4c98fa0dc529
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 13 00:09:43 2002 +0000

            Reviewed by NOBODY (OOPS!).
    
    	Final fix for this bug:
    
    	Radar 3062858 (REGRESSION: failed login at www.usaa.com doesn't return error text)
    
    	We were down to a case where submitting the login form with the return key
    	failed since we did not implement either non-standard keyCode (IE-style) or
    	which (Netscape-style) UI event extension for getting the value of a key
    	press. The form submission code depended on sensing the value of the
    	key press by checking one of these properties.
    
    	Since the "which" property also can be used for mouse events, and fixing
    	this bug could be done by implementing either keyCode or which, I chose
    	to implement keyCode only.
    
            * khtml/dom/dom2_events.cpp: Added keyCode function definition.
            * khtml/dom/dom2_events.h: Added keyCode function declaration.
            * khtml/ecma/kjs_events.cpp:
            (DOMUIEvent::getValueProperty): Added new KeyCode attribute.
            * khtml/ecma/kjs_events.h: New generated file.
            * khtml/ecma/kjs_events.lut.h: Ditto.
            * khtml/xml/dom2_eventsimpl.cpp:
            (KeyEventImpl::KeyEventImpl): Fixed a bug in khtml that prevented the
            m_keyVal field on KeyEventImpl from ever being set correctly.
            I guess I am the first person ever to care about that value. :-)
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3028 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 5be34bc..b2cee94 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,32 @@
+2002-12-12  Ken Kocienda  <kocienda at apple.com>
+
+        Reviewed by NOBODY (OOPS!).
+
+	Final fix for this bug:
+
+	Radar 3062858 (REGRESSION: failed login at www.usaa.com doesn't return error text)
+
+	We were down to a case where submitting the login form with the return key
+	failed since we did not implement either non-standard keyCode (IE-style) or
+	which (Netscape-style) UI event extension for getting the value of a key
+	press. The form submission code depended on sensing the value of the
+	key press by checking one of these properties.
+	
+	Since the "which" property also can be used for mouse events, and fixing
+	this bug could be done by implementing either keyCode or which, I chose
+	to implement keyCode only.
+
+        * khtml/dom/dom2_events.cpp: Added keyCode function definition.
+        * khtml/dom/dom2_events.h: Added keyCode function declaration.
+        * khtml/ecma/kjs_events.cpp:
+        (DOMUIEvent::getValueProperty): Added new KeyCode attribute.
+        * khtml/ecma/kjs_events.h: New generated file.
+        * khtml/ecma/kjs_events.lut.h: Ditto.
+        * khtml/xml/dom2_eventsimpl.cpp: 
+        (KeyEventImpl::KeyEventImpl): Fixed a bug in khtml that prevented the        
+        m_keyVal field on KeyEventImpl from ever being set correctly. 
+        I guess I am the first person ever to care about that value. :-)
+
 === Alexander-36 ===
 
 2002-12-12  Darin Adler  <darin at apple.com>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5be34bc..b2cee94 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,32 @@
+2002-12-12  Ken Kocienda  <kocienda at apple.com>
+
+        Reviewed by NOBODY (OOPS!).
+
+	Final fix for this bug:
+
+	Radar 3062858 (REGRESSION: failed login at www.usaa.com doesn't return error text)
+
+	We were down to a case where submitting the login form with the return key
+	failed since we did not implement either non-standard keyCode (IE-style) or
+	which (Netscape-style) UI event extension for getting the value of a key
+	press. The form submission code depended on sensing the value of the
+	key press by checking one of these properties.
+	
+	Since the "which" property also can be used for mouse events, and fixing
+	this bug could be done by implementing either keyCode or which, I chose
+	to implement keyCode only.
+
+        * khtml/dom/dom2_events.cpp: Added keyCode function definition.
+        * khtml/dom/dom2_events.h: Added keyCode function declaration.
+        * khtml/ecma/kjs_events.cpp:
+        (DOMUIEvent::getValueProperty): Added new KeyCode attribute.
+        * khtml/ecma/kjs_events.h: New generated file.
+        * khtml/ecma/kjs_events.lut.h: Ditto.
+        * khtml/xml/dom2_eventsimpl.cpp: 
+        (KeyEventImpl::KeyEventImpl): Fixed a bug in khtml that prevented the        
+        m_keyVal field on KeyEventImpl from ever being set correctly. 
+        I guess I am the first person ever to care about that value. :-)
+
 === Alexander-36 ===
 
 2002-12-12  Darin Adler  <darin at apple.com>
diff --git a/WebCore/khtml/dom/dom2_events.cpp b/WebCore/khtml/dom/dom2_events.cpp
index 5c71fa8..2043395 100644
--- a/WebCore/khtml/dom/dom2_events.cpp
+++ b/WebCore/khtml/dom/dom2_events.cpp
@@ -255,6 +255,18 @@ long UIEvent::detail() const
     return static_cast<UIEventImpl*>(impl)->detail();
 }
 
+int UIEvent::keyCode() const
+{
+    if (!impl)
+	throw DOMException(DOMException::INVALID_STATE_ERR);
+    
+    KeyEventImpl *keyEvent = dynamic_cast<KeyEventImpl*>(impl);
+    if (keyEvent)
+        return keyEvent->keyVal();
+    else
+        return 0;
+}
+
 void UIEvent::initUIEvent(const DOMString &typeArg,
                                  bool canBubbleArg,
                                  bool cancelableArg,
diff --git a/WebCore/khtml/dom/dom2_events.h b/WebCore/khtml/dom/dom2_events.h
index c523d6b..970bf94 100644
--- a/WebCore/khtml/dom/dom2_events.h
+++ b/WebCore/khtml/dom/dom2_events.h
@@ -321,6 +321,11 @@ public:
      */
     long detail() const;
 
+    /**
+     * Non-standard extension to support IE-style keyCode event property.
+     *
+     */
+    int keyCode() const;
 
     /**
      * The initUIEvent method is used to initialize the value of a UIEvent
diff --git a/WebCore/khtml/ecma/kjs_events.cpp b/WebCore/khtml/ecma/kjs_events.cpp
index 92454b8..2c7f995 100644
--- a/WebCore/khtml/ecma/kjs_events.cpp
+++ b/WebCore/khtml/ecma/kjs_events.cpp
@@ -339,9 +339,10 @@ Value KJS::getEventExceptionConstructor(ExecState *exec)
 
 const ClassInfo DOMUIEvent::info = { "UIEvent", &DOMEvent::info, &DOMUIEventTable, 0 };
 /*
- at begin DOMUIEventTable 2
+ at begin DOMUIEventTable 3
   view		DOMUIEvent::View	DontDelete|ReadOnly
   detail	DOMUIEvent::Detail	DontDelete|ReadOnly
+  keyCode	DOMUIEvent::KeyCode	DontDelete|ReadOnly
 @end
 @begin DOMUIEventProtoTable 1
   initUIEvent	DOMUIEvent::InitUIEvent	DontDelete|Function 5
@@ -367,6 +368,8 @@ Value DOMUIEvent::getValueProperty(ExecState *exec, int token) const
     return getDOMAbstractView(exec,static_cast<DOM::UIEvent>(event).view());
   case Detail:
     return Number(static_cast<DOM::UIEvent>(event).detail());
+  case KeyCode:
+    return Number(static_cast<DOM::UIEvent>(event).keyCode());
   default:
     kdWarning() << "Unhandled token in DOMUIEvent::getValueProperty : " << token << endl;
     return Value();
diff --git a/WebCore/khtml/ecma/kjs_events.h b/WebCore/khtml/ecma/kjs_events.h
index ce1fbd4..ed02cb0 100644
--- a/WebCore/khtml/ecma/kjs_events.h
+++ b/WebCore/khtml/ecma/kjs_events.h
@@ -107,7 +107,7 @@ namespace KJS {
     // no put - all read-only
     virtual const ClassInfo* classInfo() const { return &info; }
     static const ClassInfo info;
-    enum { View, Detail, InitUIEvent };
+    enum { View, Detail, KeyCode, InitUIEvent };
     DOM::UIEvent toUIEvent() const { return static_cast<DOM::UIEvent>(event); }
   };
 
diff --git a/WebCore/khtml/ecma/kjs_events.lut.h b/WebCore/khtml/ecma/kjs_events.lut.h
index 0038fff..cd97e19 100644
--- a/WebCore/khtml/ecma/kjs_events.lut.h
+++ b/WebCore/khtml/ecma/kjs_events.lut.h
@@ -76,12 +76,13 @@ const struct HashTable EventExceptionConstructorTable = { 2, 1, EventExceptionCo
 namespace KJS {
 
 const struct HashEntry DOMUIEventTableEntries[] = {
+   { "detail", DOMUIEvent::Detail, DontDelete|ReadOnly, 0, &DOMUIEventTableEntries[3] },
    { 0, 0, 0, 0, 0 },
-   { "view", DOMUIEvent::View, DontDelete|ReadOnly, 0, &DOMUIEventTableEntries[2] },
-   { "detail", DOMUIEvent::Detail, DontDelete|ReadOnly, 0, 0 }
+   { "view", DOMUIEvent::View, DontDelete|ReadOnly, 0, 0 },
+   { "keyCode", DOMUIEvent::KeyCode, DontDelete|ReadOnly, 0, 0 }
 };
 
-const struct HashTable DOMUIEventTable = { 2, 3, DOMUIEventTableEntries, 2 };
+const struct HashTable DOMUIEventTable = { 2, 4, DOMUIEventTableEntries, 3 };
 
 }; // namespace
 
diff --git a/WebCore/khtml/xml/dom2_eventsimpl.cpp b/WebCore/khtml/xml/dom2_eventsimpl.cpp
index 1226a42..96b61f1 100644
--- a/WebCore/khtml/xml/dom2_eventsimpl.cpp
+++ b/WebCore/khtml/xml/dom2_eventsimpl.cpp
@@ -500,6 +500,7 @@ void MouseEventImpl::initMouseEvent(const DOMString &typeArg,
 
 //---------------------------------------------------------------------------------------------
 
+
 KeyEventImpl::KeyEventImpl()
 {
   qKeyEvent = 0;
@@ -674,7 +675,7 @@ KeyEventImpl::KeyEventImpl(QKeyEvent *key, AbstractViewImpl *view)
 
   // m_keyVal should contain the unicode value
   // of the pressed key if available.
-  if (m_virtKeyVal != DOM_VK_UNDEFINED && !key->text().isNull())
+  if (m_virtKeyVal == DOM_VK_UNDEFINED && !key->text().isNull())
       m_keyVal = key->text().unicode()[0];
 
   //  m_numPad = ???

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list