| 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;
|
| }
|
|
|