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

Unified Diff: Source/core/editing/InputMethodController.cpp

Issue 23848007: Fixing the bounds check in cancelCompositionIfSelectionIsInvalid. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding two more test cases Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/InputMethodController.cpp
diff --git a/Source/core/editing/InputMethodController.cpp b/Source/core/editing/InputMethodController.cpp
index 7b1fa80b28759bae3ca152129728f25dd6e89f73..ed5347958eb65fbccc3e6876f30e1c5973ffb8e9 100644
--- a/Source/core/editing/InputMethodController.cpp
+++ b/Source/core/editing/InputMethodController.cpp
@@ -172,8 +172,8 @@ void InputMethodController::cancelCompositionIfSelectionIsInvalid()
Position end = m_frame->selection().end();
if (start.containerNode() == m_compositionNode
&& end.containerNode() == m_compositionNode
- && static_cast<unsigned>(start.computeOffsetInContainerNode()) > m_compositionStart
- && static_cast<unsigned>(end.computeOffsetInContainerNode()) < m_compositionEnd)
+ && static_cast<unsigned>(start.computeOffsetInContainerNode()) >= m_compositionStart
+ && static_cast<unsigned>(end.computeOffsetInContainerNode()) <= m_compositionEnd)
return;
cancelComposition();
« no previous file with comments | « no previous file | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698