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

Unified Diff: Source/core/input/EventHandler.cpp

Issue 1311623004: Make EventHandler to use VisibleSelection::toNormalizedEphemeralRange() instead of toNormalizedRange (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-25T17:22:50 Created 5 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
« no previous file with comments | « no previous file | Source/core/input/EventHandlerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/input/EventHandler.cpp
diff --git a/Source/core/input/EventHandler.cpp b/Source/core/input/EventHandler.cpp
index 9576c8bff491641bea1524683fdc2493de98e9e8..60e58ac5ac5c693a8064983140c6714258a5b766 100644
--- a/Source/core/input/EventHandler.cpp
+++ b/Source/core/input/EventHandler.cpp
@@ -1654,7 +1654,9 @@ bool EventHandler::handleMouseFocus(const MouseEventWithHitTestResults& targeted
// mouseup will set a selection inside it, which will call
// FrameSelection::setFocusedNodeIfNeeded.
if (element && m_frame->selection().isRange()) {
- if (m_frame->selection().toNormalizedRange()->isNodeFullyContained(*element)
+ // TODO(yosin) We should not create |Range| object for calling
+ // |isNodeFullyContained()|.
+ if (createRange(m_frame->selection().selection().toNormalizedEphemeralRange())->isNodeFullyContained(*element)
&& element->isDescendantOf(m_frame->document()->focusedElement()))
return false;
}
« no previous file with comments | « no previous file | Source/core/input/EventHandlerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698