Changeset 152668 in webkit
- Timestamp:
- Jul 15, 2013 4:28:50 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r152653 r152668 1 2013-07-15 Ryosuke Niwa <rniwa@webkit.org> 2 3 compositionstart event should contain the text to be replaced 4 https://bugs.webkit.org/show_bug.cgi?id=118684 5 6 Reviewed by Alexey Proskuryakov. 7 8 Add a test case. 9 10 * fast/events/ime-composition-events-001-expected.txt: 11 * fast/events/ime-composition-events-001.html: 12 1 13 2013-07-15 Antoine Quint <graouts@apple.com> 2 14 -
trunk/LayoutTests/fast/events/ime-composition-events-001-expected.txt
r105609 r152668 4 4 5 5 6 SUCCESS: INPUT - compositionstart - " 1"6 SUCCESS: INPUT - compositionstart - "" 7 7 SUCCESS: INPUT - compositionupdate - "1" 8 8 SUCCESS: INPUT - compositionupdate - "2" … … 10 10 SUCCESS: INPUT - compositionend - "4" 11 11 SUCCESS: INPUT - textInput - "4" 12 SUCCESS: INPUT - compositionstart - " 5"12 SUCCESS: INPUT - compositionstart - "" 13 13 SUCCESS: INPUT - compositionupdate - "5" 14 14 SUCCESS: INPUT - compositionupdate - "6" … … 16 16 SUCCESS: INPUT - compositionend - "" 17 17 SUCCESS: INPUT - textInput - "8" 18 SUCCESS: INPUT - compositionstart - " 9"18 SUCCESS: INPUT - compositionstart - "" 19 19 SUCCESS: INPUT - compositionupdate - "9" 20 20 SUCCESS: INPUT - compositionend - "9" 21 21 SUCCESS: INPUT - textInput - "9" 22 SUCCESS: INPUT - compositionstart - "have" 23 SUCCESS: INPUT - compositionupdate - "lost" 24 SUCCESS: INPUT - compositionend - "made" 25 SUCCESS: INPUT - textInput - "made" 26 SUCCESS: I made a pen -
trunk/LayoutTests/fast/events/ime-composition-events-001.html
r120792 r152668 58 58 textInputController.unmarkText(); 59 59 } 60 61 // Case 5: Compose a text on selection and commit it. 62 test.value = 'I have a pen'; 63 test.selectionStart = 2; 64 test.selectionEnd = 6; 65 textInputController.setMarkedText('lost', 0, 1); 66 textInputController.insertText('made'); 67 if (test.value == 'I made a pen') 68 log('SUCCESS: ' + test.value); 69 else 70 log('FAILURE: ' + test.value + ' is not "I made a pen".'); 60 71 } 61 72 </script> -
trunk/Source/WebCore/ChangeLog
r152667 r152668 1 2013-07-15 Ryosuke Niwa <rniwa@webkit.org> 2 3 compositionstart event should contain the text to be replaced 4 https://bugs.webkit.org/show_bug.cgi?id=118684 5 6 Reviewed by Alexey Proskuryakov. 7 8 Merge https://chromium.googlesource.com/chromium/blink/+/9e04f728a95ad7d4783b1d31c3cdc1412dd6cc4d. 9 10 DOM3 level 3 specifies compositionstart event's data to be the text to be replaced. 11 http://www.w3.org/TR/DOM-Level-3-Events/#event-type-compositionstart 12 13 According to the author of the Blink change, IE10 on Windows and Firefox22 on Linux confirms 14 to the specified behavior. 15 16 Test: fast/events/ime-composition-events-001.html 17 18 * editing/Editor.cpp: 19 (WebCore::Editor::setComposition): 20 1 21 2013-07-15 Ryosuke Niwa <rniwa@webkit.org> 2 22 -
trunk/Source/WebCore/editing/Editor.cpp
r152203 r152668 1542 1542 // function doesn't create a composition node when the text is empty. 1543 1543 if (!text.isEmpty()) { 1544 target->dispatchEvent(CompositionEvent::create(eventNames().compositionstartEvent, m_frame->document()->domWindow(), text));1544 target->dispatchEvent(CompositionEvent::create(eventNames().compositionstartEvent, m_frame->document()->domWindow(), selectedText())); 1545 1545 event = CompositionEvent::create(eventNames().compositionupdateEvent, m_frame->document()->domWindow(), text); 1546 1546 }
Note: See TracChangeset
for help on using the changeset viewer.