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

Unified Diff: third_party/WebKit/Source/core/editing/SelectionEditor.cpp

Issue 1479923002: Enumerate the return value of dispatchEvent so it is clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_passive_uma_add
Patch Set: Rebase Created 5 years 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: third_party/WebKit/Source/core/editing/SelectionEditor.cpp
diff --git a/third_party/WebKit/Source/core/editing/SelectionEditor.cpp b/third_party/WebKit/Source/core/editing/SelectionEditor.cpp
index 746562310b9739df6d37aa3efd23cc6c6f82c547..c6a7082261ca7675691ce7eca7eafcf70de3e1a7 100644
--- a/third_party/WebKit/Source/core/editing/SelectionEditor.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionEditor.cpp
@@ -633,7 +633,7 @@ bool SelectionEditor::modify(EAlteration alter, SelectionDirection direction, Te
trialFrameSelection->setSelection(m_selection);
trialFrameSelection->modify(alter, direction, granularity, NotUserTriggered);
- if (trialFrameSelection->selection().isRange() && m_selection.isCaret() && !dispatchSelectStart())
+ if (trialFrameSelection->selection().isRange() && m_selection.isCaret() && dispatchSelectStart() != WebInputEventResult::NotHandled)
return false;
}
@@ -901,11 +901,11 @@ PassRefPtrWillBeRawPtr<Range> SelectionEditor::firstRange() const
return firstRangeOf(m_selection);
}
-bool SelectionEditor::dispatchSelectStart()
+WebInputEventResult SelectionEditor::dispatchSelectStart()
{
Node* selectStartTarget = m_selection.extent().computeContainerNode();
if (!selectStartTarget)
- return true;
+ return WebInputEventResult::NotHandled;
return selectStartTarget->dispatchEvent(Event::createCancelableBubble(EventTypeNames::selectstart));
}

Powered by Google App Engine
This is Rietveld 408576698