Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Issue 2529803002: [Editing] Let InputMethodController::hasComposition check Range::isConnected(). (Closed)

Created:
4 years ago by yoichio
Modified:
4 years ago
CC:
blink-reviews, chromium-reviews, kinuko+watch
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Editing] Let InputMethodController::hasComposition check Range::connected(). InputMethodConroller(abbr as IMC) has members of |bool m_hasComposition| and |Range m_compositionRange| and a function hasComposition(), which returns m_hasComposition; Usually they sync, or m_hasComposition == (m_compositionRange.connected()); However, it brakes when m_compositionRange crosses over node which will be removed. In the situation, m_hasComposition is true but m_compositionRange.connected() returns false. If we call IMC::finishCompositionText under the condition, calling composingText, which creates text from range, causes crash because the range is not connected. This CL change hasCompostion to check also m_compositionRange. This CL also insert DCHECK(hasComposition()) before where m_compositionRange is used. Attached test checks the crash but also confirms IMC::textInputType while changing focus. BUG=666659, 664317 Committed: https://crrev.com/7a4e741d1b8d72ac687163baa1feb0c651797495 Cr-Commit-Position: refs/heads/master@{#434467}

Patch Set 1 : update #

Total comments: 13

Patch Set 2 : Move to InputMethodConrollerTest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -1 line) Patch
M third_party/WebKit/Source/core/editing/InputMethodController.cpp View 1 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp View 1 1 chunk +21 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (16 generated)
yoichio
4 years ago (2016-11-24 08:57:29 UTC) #8
Changwan Ryu
https://codereview.chromium.org/2529803002/diff/20001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2529803002/diff/20001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode319 third_party/WebKit/Source/core/editing/InputMethodController.cpp:319: return false; This is probably not needed. https://codereview.chromium.org/2529803002/diff/20001/third_party/WebKit/Source/web/tests/WebViewTest.cpp File ...
4 years ago (2016-11-24 09:15:00 UTC) #9
Changwan Ryu
https://codereview.chromium.org/2529803002/diff/20001/third_party/WebKit/Source/web/tests/WebViewTest.cpp File third_party/WebKit/Source/web/tests/WebViewTest.cpp (right): https://codereview.chromium.org/2529803002/diff/20001/third_party/WebKit/Source/web/tests/WebViewTest.cpp#newcode4367 third_party/WebKit/Source/web/tests/WebViewTest.cpp:4367: "data:text/html, <input id='a' /><br><input type='te' id='b' />"); typo: te ...
4 years ago (2016-11-24 09:23:51 UTC) #10
Changwan Ryu
https://codereview.chromium.org/2529803002/diff/20001/third_party/WebKit/Source/web/tests/WebViewTest.cpp File third_party/WebKit/Source/web/tests/WebViewTest.cpp (right): https://codereview.chromium.org/2529803002/diff/20001/third_party/WebKit/Source/web/tests/WebViewTest.cpp#newcode4365 third_party/WebKit/Source/web/tests/WebViewTest.cpp:4365: TEST_P(WebViewTest, CompositionIsRemovedOnDeletingElement) { Hmm... Could you also rename this ...
4 years ago (2016-11-24 09:34:38 UTC) #11
yosin_UTC9
https://codereview.chromium.org/2529803002/diff/20001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2529803002/diff/20001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode319 third_party/WebKit/Source/core/editing/InputMethodController.cpp:319: return false; On 2016/11/24 at 09:15:00, Changwan Ryu wrote: ...
4 years ago (2016-11-25 01:28:23 UTC) #12
yoichio
O.K. Fixed textInputType too. https://codereview.chromium.org/2529803002/diff/20001/third_party/WebKit/Source/core/editing/InputMethodController.cpp File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2529803002/diff/20001/third_party/WebKit/Source/core/editing/InputMethodController.cpp#newcode319 third_party/WebKit/Source/core/editing/InputMethodController.cpp:319: return false; On 2016/11/25 01:28:22, ...
4 years ago (2016-11-25 09:19:41 UTC) #18
yosin_UTC9
lgtm
4 years ago (2016-11-25 09:26:28 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2529803002/40001
4 years ago (2016-11-25 09:26:40 UTC) #21
commit-bot: I haz the power
Committed patchset #2 (id:40001)
4 years ago (2016-11-25 09:30:34 UTC) #24
commit-bot: I haz the power
4 years ago (2016-11-25 09:34:26 UTC) #26
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/7a4e741d1b8d72ac687163baa1feb0c651797495
Cr-Commit-Position: refs/heads/master@{#434467}

Powered by Google App Engine
This is Rietveld 408576698