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

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

Issue 507533002: Fix to keep the selection of the text field in input element after setSelectionRange is called by d… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 e347a6174fa54d86ecb0948710c0d0a3689cebd2..951d49edbf2308d466efb0e7ba1cc567a9445034 100644
--- a/Source/core/editing/FrameSelection.cpp
+++ b/Source/core/editing/FrameSelection.cpp
@@ -296,6 +296,7 @@ void FrameSelection::setSelection(const VisibleSelection& newSelection, SetSelec
notifyAccessibilityForSelectionChange();
notifyCompositorForSelectionChange();
+ notifyEventHandlerForSelectionChange();
m_frame->domWindow()->enqueueDocumentEvent(Event::create(EventTypeNames::selectionchange));
}
@@ -1455,6 +1456,11 @@ void FrameSelection::notifyCompositorForSelectionChange()
scheduleVisualUpdate();
}
+void FrameSelection::notifyEventHandlerForSelectionChange()
+{
+ m_frame->eventHandler().notifySelectionChanged();
+}
+
void FrameSelection::focusedOrActiveStateChanged()
{
bool activeAndFocused = isFocusedAndActive();

Powered by Google App Engine
This is Rietveld 408576698