| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. |
| 8 * All rights reserved. | 8 * All rights reserved. |
| 9 * (C) 2007 Eric Seidel (eric@webkit.org) | 9 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 10 * | 10 * |
| (...skipping 2675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2686 SelectionBehaviorOnFocus selectionBehavior) { | 2686 SelectionBehaviorOnFocus selectionBehavior) { |
| 2687 if (selectionBehavior == SelectionBehaviorOnFocus::None) | 2687 if (selectionBehavior == SelectionBehaviorOnFocus::None) |
| 2688 return; | 2688 return; |
| 2689 if (isRootEditableElement(*this)) { | 2689 if (isRootEditableElement(*this)) { |
| 2690 LocalFrame* frame = document().frame(); | 2690 LocalFrame* frame = document().frame(); |
| 2691 if (!frame) | 2691 if (!frame) |
| 2692 return; | 2692 return; |
| 2693 | 2693 |
| 2694 // When focusing an editable element in an iframe, don't reset the selection | 2694 // When focusing an editable element in an iframe, don't reset the selection |
| 2695 // if it already contains a selection. | 2695 // if it already contains a selection. |
| 2696 if (this == frame->selection().rootEditableElement()) | 2696 if (this == |
| 2697 frame->selection() |
| 2698 .computeVisibleSelectionInDOMTreeDeprecated() |
| 2699 .rootEditableElement()) |
| 2697 return; | 2700 return; |
| 2698 | 2701 |
| 2699 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 2702 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 2700 // needs to be audited. See http://crbug.com/590369 for more details. | 2703 // needs to be audited. See http://crbug.com/590369 for more details. |
| 2701 document().updateStyleAndLayoutIgnorePendingStylesheets(); | 2704 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 2702 | 2705 |
| 2703 // FIXME: We should restore the previous selection if there is one. | 2706 // FIXME: We should restore the previous selection if there is one. |
| 2704 // Passing DoNotSetFocus as this function is called after | 2707 // Passing DoNotSetFocus as this function is called after |
| 2705 // FocusController::setFocusedElement() and we don't want to change the | 2708 // FocusController::setFocusedElement() and we don't want to change the |
| 2706 // focus to a new Element. | 2709 // focus to a new Element. |
| (...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4139 } | 4142 } |
| 4140 | 4143 |
| 4141 DEFINE_TRACE_WRAPPERS(Element) { | 4144 DEFINE_TRACE_WRAPPERS(Element) { |
| 4142 if (hasRareData()) { | 4145 if (hasRareData()) { |
| 4143 visitor->traceWrappers(elementRareData()); | 4146 visitor->traceWrappers(elementRareData()); |
| 4144 } | 4147 } |
| 4145 ContainerNode::traceWrappers(visitor); | 4148 ContainerNode::traceWrappers(visitor); |
| 4146 } | 4149 } |
| 4147 | 4150 |
| 4148 } // namespace blink | 4151 } // namespace blink |
| OLD | NEW |