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

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

Issue 1049233003: Keep the selection of the text field when changed by JS. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 4fd0cea2362ac909447b0962c26762f0afbc6751..409872d29035114f0dc96234b178d751e3814d75 100644
--- a/Source/core/editing/FrameSelection.cpp
+++ b/Source/core/editing/FrameSelection.cpp
@@ -299,6 +299,7 @@ void FrameSelection::setSelection(const VisibleSelection& newSelection, SetSelec
notifyAccessibilityForSelectionChange();
notifyCompositorForSelectionChange();
+ notifyEventHandlerForSelectionChange();
m_frame->localDOMWindow()->enqueueDocumentEvent(Event::create(EventTypeNames::selectionchange));
}
@@ -1460,6 +1461,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