| Index: third_party/WebKit/Source/core/page/FocusController.cpp
 | 
| diff --git a/third_party/WebKit/Source/core/page/FocusController.cpp b/third_party/WebKit/Source/core/page/FocusController.cpp
 | 
| index de9da91658722ce16c2e4d1f9ba55da8cf1a3666..079bc6f932f41123f58e1d2cbc9412245dd1aa63 100644
 | 
| --- a/third_party/WebKit/Source/core/page/FocusController.cpp
 | 
| +++ b/third_party/WebKit/Source/core/page/FocusController.cpp
 | 
| @@ -1058,34 +1058,6 @@ static bool relinquishesEditingFocus(const Element& element) {
 | 
|    return element.document().frame() && rootEditableElement(element);
 | 
|  }
 | 
|  
 | 
| -static void clearSelectionIfNeeded(LocalFrame* oldFocusedFrame,
 | 
| -                                   LocalFrame* newFocusedFrame,
 | 
| -                                   Element* newFocusedElement) {
 | 
| -  if (!oldFocusedFrame || !newFocusedFrame)
 | 
| -    return;
 | 
| -
 | 
| -  if (oldFocusedFrame->document() != newFocusedFrame->document())
 | 
| -    return;
 | 
| -
 | 
| -  FrameSelection& selection = oldFocusedFrame->selection();
 | 
| -  if (selection.isNone())
 | 
| -    return;
 | 
| -
 | 
| -  Node* selectionStartNode = selection.selection().start().anchorNode();
 | 
| -  if (selectionStartNode == newFocusedElement ||
 | 
| -      selectionStartNode->isDescendantOf(newFocusedElement))
 | 
| -    return;
 | 
| -
 | 
| -  if (!enclosingTextControl(selectionStartNode))
 | 
| -    return;
 | 
| -
 | 
| -  if (selectionStartNode->isInShadowTree() &&
 | 
| -      selectionStartNode->ownerShadowHost() == newFocusedElement)
 | 
| -    return;
 | 
| -
 | 
| -  selection.clear();
 | 
| -}
 | 
| -
 | 
|  bool FocusController::setFocusedElement(Element* element,
 | 
|                                          Frame* newFocusedFrame) {
 | 
|    return setFocusedElement(
 | 
| @@ -1122,10 +1094,6 @@ bool FocusController::setFocusedElement(Element* element,
 | 
|        newDocument->focusedElement() == element)
 | 
|      return true;
 | 
|  
 | 
| -  if (newFocusedFrame && newFocusedFrame->isLocalFrame())
 | 
| -    clearSelectionIfNeeded(oldFocusedFrame, toLocalFrame(newFocusedFrame),
 | 
| -                           element);
 | 
| -
 | 
|    if (oldDocument && oldDocument != newDocument)
 | 
|      oldDocument->clearFocusedElement();
 | 
|  
 | 
| 
 |