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

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

Issue 1325563002: Avoid style clobbering in setCompositionFromExistingText. (2nd land) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Release Range on document detach and remove selectionStart/End Created 5 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
Index: Source/core/editing/FrameSelection.cpp
diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp
index 3d8b889617d08372303dd62224d25a45c39cb286..1944215af57c1969e12890c847aa1db6bea2c2e7 100644
--- a/Source/core/editing/FrameSelection.cpp
+++ b/Source/core/editing/FrameSelection.cpp
@@ -314,8 +314,10 @@ void FrameSelection::setSelection(const VisibleSelection& newSelection, SetSelec
// boundary, selection for the DOM tree is shrunk while that for the
// composed tree is not. Additionally, this case occurs in some edge cases.
// See also: editing/pasteboard/4076267-3.html
- if (VisibleSelection::InDOMTree::equalSelections(oldSelection, m_selection))
+ if (VisibleSelection::InDOMTree::equalSelections(oldSelection, m_selection)) {
+ m_frame->inputMethodController().cancelCompositionIfSelectionIsInvalid();
return;
+ }
m_frame->editor().respondToChangedSelection(oldSelection, options);
if (userTriggered == UserTriggered) {
ScrollAlignment alignment;
« no previous file with comments | « Source/core/editing/CompositionUnderlineRangeFilterTest.cpp ('k') | Source/core/editing/InputMethodController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698