Title: [105605] trunk
Revision
105605
Author
[email protected]
Date
2012-01-23 02:41:29 -0800 (Mon, 23 Jan 2012)

Log Message

WebKit fails IETC composition event types
https://bugs.webkit.org/show_bug.cgi?id=76690

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (105604 => 105605)


--- trunk/LayoutTests/ChangeLog	2012-01-23 10:21:03 UTC (rev 105604)
+++ trunk/LayoutTests/ChangeLog	2012-01-23 10:41:29 UTC (rev 105605)
@@ -1,3 +1,12 @@
+2012-01-19  Kenichi Ishibashi  <[email protected]>
+
+        WebKit fails IETC composition event types
+        https://bugs.webkit.org/show_bug.cgi?id=76690
+
+        Reviewed by Ryosuke Niwa.
+
+        * platform/chromium/fast/events/ime-composition-events-001-expected.txt: Updated.
+
 2012-01-23  Andrey Kosyakov  <[email protected]>
 
         Unreviewed follow-up to r105596, added missing test resources.

Modified: trunk/LayoutTests/platform/chromium/fast/events/ime-composition-events-001-expected.txt (105604 => 105605)


--- trunk/LayoutTests/platform/chromium/fast/events/ime-composition-events-001-expected.txt	2012-01-23 10:21:03 UTC (rev 105604)
+++ trunk/LayoutTests/platform/chromium/fast/events/ime-composition-events-001-expected.txt	2012-01-23 10:41:29 UTC (rev 105605)
@@ -4,15 +4,18 @@
 
 
 SUCCESS: INPUT - compositionstart - "1"
+SUCCESS: INPUT - compositionupdate - "1"
 SUCCESS: INPUT - compositionupdate - "2"
 SUCCESS: INPUT - compositionupdate - "3"
 SUCCESS: INPUT - compositionend - "4"
 SUCCESS: INPUT - textInput - "4"
 SUCCESS: INPUT - compositionstart - "5"
+SUCCESS: INPUT - compositionupdate - "5"
 SUCCESS: INPUT - compositionupdate - "6"
 SUCCESS: INPUT - compositionupdate - "7"
 SUCCESS: INPUT - compositionend - ""
 SUCCESS: INPUT - textInput - "8"
 SUCCESS: INPUT - compositionstart - "9"
+SUCCESS: INPUT - compositionupdate - "9"
 SUCCESS: INPUT - compositionend - "9"
 SUCCESS: INPUT - textInput - "9"

Modified: trunk/Source/WebCore/ChangeLog (105604 => 105605)


--- trunk/Source/WebCore/ChangeLog	2012-01-23 10:21:03 UTC (rev 105604)
+++ trunk/Source/WebCore/ChangeLog	2012-01-23 10:41:29 UTC (rev 105605)
@@ -1,3 +1,24 @@
+2012-01-19  Kenichi Ishibashi  <[email protected]>
+
+        WebKit fails IETC composition event types
+        https://bugs.webkit.org/show_bug.cgi?id=76690
+
+        Reviewed by Ryosuke Niwa.
+
+        Dispatches at least one compositionupdate event.
+        The spec(*) says that a composition session includes one or more
+        compositionupdate event(s).
+        Other major browsers (Firefox and IE) don't populate the data attribute
+        of the compositionstart event, but we set the given text in the data
+        attribute to minimize the effect of this change.
+
+        (*) http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-compositionevents
+
+        Updated existing test: fast/fast/events/ime-composition-events-001.html.
+
+        * editing/Editor.cpp:
+        (WebCore::Editor::setComposition):
+
 2012-01-22  Mario Sanchez Prada  <[email protected]>
 
         [GTK] Refactor GTK's accessibilitity code to be more modular

Modified: trunk/Source/WebCore/editing/Editor.cpp (105604 => 105605)


--- trunk/Source/WebCore/editing/Editor.cpp	2012-01-23 10:21:03 UTC (rev 105604)
+++ trunk/Source/WebCore/editing/Editor.cpp	2012-01-23 10:41:29 UTC (rev 105605)
@@ -1457,8 +1457,11 @@
         // We check the composition status and choose an appropriate composition event since this
         // function is used for three purposes:
         // 1. Starting a new composition.
-        //    Send a compositionstart event when this function creates a new composition node, i.e.
+        //    Send a compositionstart and a compositionupdate event when this function creates
+        //    a new composition node, i.e.
         //    m_compositionNode == 0 && !text.isEmpty().
+        //    Sending a compositionupdate event at this time ensures that at least one
+        //    compositionupdate event is dispatched.
         // 2. Updating the existing composition node.
         //    Send a compositionupdate event when this function updates the existing composition
         //    node, i.e. m_compositionNode != 0 && !text.isEmpty().
@@ -1469,8 +1472,10 @@
         if (!m_compositionNode) {
             // We should send a compositionstart event only when the given text is not empty because this
             // function doesn't create a composition node when the text is empty.
-            if (!text.isEmpty())
-                event = CompositionEvent::create(eventNames().compositionstartEvent, m_frame->domWindow(), text);
+            if (!text.isEmpty()) {
+                target->dispatchEvent(CompositionEvent::create(eventNames().compositionstartEvent, m_frame->domWindow(), text));
+                event = CompositionEvent::create(eventNames().compositionupdateEvent, m_frame->domWindow(), text);
+            }
         } else {
             if (!text.isEmpty())
                 event = CompositionEvent::create(eventNames().compositionupdateEvent, m_frame->domWindow(), text);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to