| Index: third_party/WebKit/Source/core/input/MouseEventManager.cpp
|
| diff --git a/third_party/WebKit/Source/core/input/MouseEventManager.cpp b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
|
| index 85f6eaecd3145df12c4a08e0afed61da5a5e9eff..d6af4c624f760dfddd6bdcde4c30b852e694082c 100644
|
| --- a/third_party/WebKit/Source/core/input/MouseEventManager.cpp
|
| +++ b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
|
| @@ -431,12 +431,11 @@ WebInputEventResult MouseEventManager::handleMouseFocus(
|
| m_frame->selection()
|
| .computeVisibleSelectionInDOMTreeDeprecated()
|
| .isRange()) {
|
| - // TODO(yosin) We should not create |Range| object for calling
|
| - // |isNodeFullyContained()|.
|
| - if (createRange(m_frame->selection()
|
| - .computeVisibleSelectionInDOMTreeDeprecated()
|
| - .toNormalizedEphemeralRange())
|
| - ->isNodeFullyContained(*element) &&
|
| + const EphemeralRange& range =
|
| + m_frame->selection()
|
| + .computeVisibleSelectionInDOMTreeDeprecated()
|
| + .toNormalizedEphemeralRange();
|
| + if (isNodeFullyContained(range, *element) &&
|
| element->isDescendantOf(m_frame->document()->focusedElement()))
|
| return WebInputEventResult::NotHandled;
|
| }
|
|
|