Changeset 75000 in webkit
- Timestamp:
- Jan 4, 2011 1:27:04 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 16 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r74995 r75000 1 2011-01-04 Zhe Su <suzhe@chromium.org> 2 3 Reviewed by Kenneth Russell. 4 5 1. Remove entry for editing/input/ime-composition-clearpreedit.html test. 6 2. Improve fast/events/ime-composition-events-001.html to cover more 7 cases. And fix test expectations of chromium port. 8 https://bugs.webkit.org/show_bug.cgi?id=51693 9 10 * fast/events/ime-composition-events-001-expected.txt: 11 * fast/events/ime-composition-events-001.html: 12 * platform/chromium-mac/fast/events/ime-composition-events-001-expected.txt: Removed. 13 * platform/chromium-win/fast/events/ime-composition-events-001-expected.txt: Removed. 14 * platform/chromium/fast/events/ime-composition-events-001-expected.txt: Added. 15 * platform/chromium/test_expectations.txt: 16 * platform/qt/fast/events/ime-composition-events-001-expected.txt: Added. 17 1 18 2010-12-31 Antti Koivisto <antti@apple.com> 2 19 -
trunk/LayoutTests/fast/events/ime-composition-events-001-expected.txt
r50968 r75000 13 13 SUCCESS: INPUT - compositionupdate - "7" 14 14 SUCCESS: INPUT - compositionend - "" 15 SUCCESS: INPUT - textInput - "8" 16 SUCCESS: INPUT - compositionstart - "9" 17 SUCCESS: INPUT - compositionend - "9" 18 SUCCESS: INPUT - textInput - "9" -
trunk/LayoutTests/fast/events/ime-composition-events-001.html
r50968 r75000 48 48 textInputController.setMarkedText('7', 0, 1); 49 49 textInputController.setMarkedText('', 0, 0); 50 51 // Case 3: Insert a text without composition. 52 textInputController.insertText('8'); 53 54 // Case 4: Compose a text and commit it by removing the mark. 55 // Only Mac and Chromium ports support unmarkText. 56 if (textInputController.unmarkText) { 57 textInputController.setMarkedText('9', 0, 1); 58 textInputController.unmarkText(); 59 } 50 60 } 51 61 </script> -
trunk/LayoutTests/platform/chromium/fast/events/ime-composition-events-001-expected.txt
r74999 r75000 13 13 SUCCESS: INPUT - compositionupdate - "7" 14 14 SUCCESS: INPUT - compositionend - "" 15 SUCCESS: INPUT - textInput - "8" 16 SUCCESS: INPUT - compositionstart - "9" 17 SUCCESS: INPUT - compositionend - "9" 18 SUCCESS: INPUT - textInput - "9" -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r74939 r75000 3044 3044 BUGWK51536 : fast/css/box-shadow.html = FAIL TIMEOUT 3045 3045 3046 BUGCR67960 : editing/input/ime-composition-clearpreedit.html = TEXT3047 3048 3046 // WebKit roll 74667:74679 3049 3047 BUGCR68067 LINUX DEBUG : fast/canvas/webgl/tex-image-with-format-and-type.html = TEXT PASS -
trunk/LayoutTests/platform/qt/fast/events/ime-composition-events-001-expected.txt
r74999 r75000 13 13 SUCCESS: INPUT - compositionupdate - "7" 14 14 SUCCESS: INPUT - compositionend - "" 15 SUCCESS: INPUT - textInput - "8" -
trunk/Tools/ChangeLog
r74974 r75000 1 2011-01-04 Zhe Su <suzhe@chromium.org> 2 3 Reviewed by Kenneth Russell. 4 5 Fix insertText, setMarkedText and unmarkText methods of 6 TextInputController to call corresponding methods of WebKit::WebView 7 rather than WebKit::WebFrame. This change matches the behavior of 8 chromium browser. 9 insertText corresponds to WebView::confirmComposition(text) 10 setMarkedText corresponds to WebView::setComposition(...) 11 unmarkText corresponds to WebView::confirmComposition() 12 https://bugs.webkit.org/show_bug.cgi?id=51693 13 14 * DumpRenderTree/chromium/TextInputController.cpp: 15 (TextInputController::insertText): 16 (TextInputController::setMarkedText): 17 (TextInputController::unmarkText): 18 1 19 2011-01-04 Dihan Wickremasuriya <dihan.wickremasuriya@nokia.com> 2 20 -
trunk/Tools/DumpRenderTree/chromium/TextInputController.cpp
r70786 r75000 80 80 result->setNull(); 81 81 82 WebFrame* mainFrame = getMainFrame();83 if (!mainFrame)84 return;85 82 if (arguments.size() < 1 || !arguments[0].isString()) 86 83 return; 87 84 88 if (mainFrame->hasMarkedText()) { 89 mainFrame->unmarkText(); 90 mainFrame->replaceSelection(WebString()); 91 } 92 mainFrame->insertText(WebString::fromUTF8(arguments[0].toString())); 85 testShell->webView()->confirmComposition(WebString::fromUTF8(arguments[0].toString())); 93 86 } 94 87 … … 109 102 result->setNull(); 110 103 111 WebFrame* mainFrame = getMainFrame();112 if (!mainFrame)113 return;114 115 104 if (arguments.size() >= 3 && arguments[0].isString() 116 105 && arguments[1].isNumber() && arguments[2].isNumber()) { 117 mainFrame->setMarkedText(WebString::fromUTF8(arguments[0].toString()), 118 arguments[1].toInt32(), 119 arguments[2].toInt32()); 106 WebVector<WebCompositionUnderline> underlines; 107 testShell->webView()->setComposition(WebString::fromUTF8(arguments[0].toString()), 108 underlines, 109 arguments[1].toInt32(), 110 arguments[1].toInt32() + arguments[2].toInt32()); 120 111 } 121 112 } … … 125 116 result->setNull(); 126 117 127 WebFrame* mainFrame = getMainFrame(); 128 if (!mainFrame) 129 return; 130 131 mainFrame->unmarkText(); 118 testShell->webView()->confirmComposition(); 132 119 } 133 120 -
trunk/WebKit/chromium/ChangeLog
r74899 r75000 1 2011-01-04 Zhe Su <suzhe@chromium.org> 2 3 Reviewed by Kenneth Russell. 4 5 Changes: 6 1. Add WebKit::WebWidget::confirmComposition(const WebString& text) 7 This new method corresponds to Editor::confirmComposition(text) and 8 Editor::insertText(text). It'll be used by both DumpRenderTree's 9 TextInputController and chromium browser. 10 2. Fix WebFrameImpl::insertText 11 It should call Editor::confirmComposition(text) rather than 12 Editor::insertText(text) if there is an ongoing composition. 13 It matches the behavior of WebKit Mac port. 14 3. Fix WebFrameImpl::setMarkedText 15 Editor::confirmComposition(text) shouldn't be called in this 16 method, which incorrectly inserts the text. 17 18 https://bugs.webkit.org/show_bug.cgi?id=51693 19 20 * public/WebWidget.h: 21 * src/WebFrameImpl.cpp: 22 (WebKit::WebFrameImpl::insertText): 23 (WebKit::WebFrameImpl::setMarkedText): 24 * src/WebPopupMenuImpl.cpp: 25 (WebKit::WebPopupMenuImpl::confirmComposition): 26 * src/WebPopupMenuImpl.h: 27 * src/WebViewImpl.cpp: 28 (WebKit::WebViewImpl::confirmComposition): 29 * src/WebViewImpl.h: 30 * tests/PopupMenuTest.cpp: 31 (WebKit::TestWebWidget::confirmComposition): 32 1 33 2011-01-03 Daniel Bates <dbates@rim.com> 2 34 -
trunk/WebKit/chromium/public/WebWidget.h
r67244 r75000 104 104 105 105 // Called to inform the WebWidget to confirm an ongoing composition. 106 // This method is same as confirmComposition(WebString()); 106 107 // Returns true if there is an ongoing composition. 107 108 virtual bool confirmComposition() = 0; 109 110 // Called to inform the WebWidget to confirm an ongoing composition with a 111 // new composition text. If the text is empty then the current composition 112 // text is confirmed. If there is no ongoing composition, then deletes the 113 // current selection and inserts the text. This method has no effect if 114 // there is no ongoing composition and the text is empty. 115 // Returns true if there is an ongoing composition or the text is inserted. 116 virtual bool confirmComposition(const WebString& text) = 0; 108 117 109 118 // Returns the current text input type of this WebWidget. -
trunk/WebKit/chromium/src/WebFrameImpl.cpp
r74969 r75000 1075 1075 void WebFrameImpl::insertText(const WebString& text) 1076 1076 { 1077 frame()->editor()->insertText(text, 0); 1077 Editor* editor = frame()->editor(); 1078 1079 if (editor->hasComposition()) 1080 editor->confirmComposition(text); 1081 else 1082 editor->insertText(text, 0); 1078 1083 } 1079 1084 … … 1082 1087 { 1083 1088 Editor* editor = frame()->editor(); 1084 1085 editor->confirmComposition(text);1086 1089 1087 1090 Vector<CompositionUnderline> decorations; -
trunk/WebKit/chromium/src/WebPopupMenuImpl.cpp
r67244 r75000 254 254 } 255 255 256 bool WebPopupMenuImpl::confirmComposition(const WebString& text) 257 { 258 return false; 259 } 260 256 261 WebTextInputType WebPopupMenuImpl::textInputType() 257 262 { -
trunk/WebKit/chromium/src/WebPopupMenuImpl.h
r67244 r75000 74 74 int selectionStart, int selectionEnd); 75 75 virtual bool confirmComposition(); 76 virtual bool confirmComposition(const WebString& text); 76 77 virtual WebTextInputType textInputType(); 77 78 virtual WebRect caretOrSelectionBounds(); -
trunk/WebKit/chromium/src/WebViewImpl.cpp
r74868 r75000 1304 1304 bool WebViewImpl::confirmComposition() 1305 1305 { 1306 return confirmComposition(WebString()); 1307 } 1308 1309 bool WebViewImpl::confirmComposition(const WebString& text) 1310 { 1306 1311 Frame* focused = focusedWebCoreFrame(); 1307 1312 if (!focused || !m_imeAcceptEvents) 1308 1313 return false; 1309 1314 Editor* editor = focused->editor(); 1310 if (!editor || !editor->hasComposition())1315 if (!editor || (!editor->hasComposition() && !text.length())) 1311 1316 return false; 1312 1317 … … 1322 1327 } 1323 1328 1324 editor->confirmComposition(); 1329 if (editor->hasComposition()) { 1330 if (text.length()) 1331 editor->confirmComposition(String(text)); 1332 else 1333 editor->confirmComposition(); 1334 } else 1335 editor->insertText(String(text), 0); 1336 1325 1337 return true; 1326 1338 } -
trunk/WebKit/chromium/src/WebViewImpl.h
r74568 r75000 106 106 int selectionEnd); 107 107 virtual bool confirmComposition(); 108 virtual bool confirmComposition(const WebString& text); 108 109 virtual WebTextInputType textInputType(); 109 110 virtual WebRect caretOrSelectionBounds(); -
trunk/WebKit/chromium/tests/PopupMenuTest.cpp
r71631 r75000 140 140 int selectionEnd) { return true; } 141 141 virtual bool confirmComposition() { return true; } 142 virtual bool confirmComposition(const WebString& text) { return true; } 142 143 virtual WebTextInputType textInputType() { return WebKit::WebTextInputTypeNone; } 143 144 virtual WebRect caretOrSelectionBounds() { return WebRect(); } -
trunk/WebKit/qt/Api/qwebpage.cpp
r74941 r75000 1097 1097 // Commit regardless of whether commitString is empty, to get rid of selection. 1098 1098 editor->confirmComposition(ev->commitString()); 1099 } else if (!ev->commitString().isEmpty()) 1100 editor->confirmComposition(ev->commitString()); 1101 else if (!hasSelection && !ev->preeditString().isEmpty()) 1099 } else if (!ev->commitString().isEmpty()) { 1100 if (editor->hasComposition()) 1101 editor->confirmComposition(ev->commitString()); 1102 else 1103 editor->insertText(ev->commitString(), 0); 1104 } else if (!hasSelection && !ev->preeditString().isEmpty()) 1102 1105 editor->setComposition(ev->preeditString(), underlines, 0, 0); 1103 1106 else if (ev->preeditString().isEmpty() && editor->hasComposition()) -
trunk/WebKit/qt/ChangeLog
r74941 r75000 1 2011-01-04 Zhe Su <suzhe@chromium.org> 2 3 Reviewed by Kenneth Russell. 4 5 Fix test LayoutTests/fast/events/ime-composition-events-001.html. 6 7 https://bugs.webkit.org/show_bug.cgi?id=51693 8 9 * Api/qwebpage.cpp: 10 (QWebPagePrivate::inputMethodEvent): Calls editor->insertText() to 11 insert the commit string when no composition text is available. 12 1 13 2011-01-03 Yi Shen <yi.4.shen@nokia.com> 2 14
Note: See TracChangeset
for help on using the changeset viewer.