| 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.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
| 8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 2168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2179 // When focusing an editable element in an iframe, don't reset the selec
tion if it already contains a selection. | 2179 // When focusing an editable element in an iframe, don't reset the selec
tion if it already contains a selection. |
| 2180 if (this == frame->selection().rootEditableElement()) | 2180 if (this == frame->selection().rootEditableElement()) |
| 2181 return; | 2181 return; |
| 2182 | 2182 |
| 2183 // FIXME: We should restore the previous selection if there is one. | 2183 // FIXME: We should restore the previous selection if there is one. |
| 2184 VisibleSelection newSelection = VisibleSelection(firstPositionInOrBefore
Node(this), DOWNSTREAM); | 2184 VisibleSelection newSelection = VisibleSelection(firstPositionInOrBefore
Node(this), DOWNSTREAM); |
| 2185 // Passing DoNotSetFocus as this function is called after FocusControlle
r::setFocusedElement() | 2185 // Passing DoNotSetFocus as this function is called after FocusControlle
r::setFocusedElement() |
| 2186 // and we don't want to change the focus to a new Element. | 2186 // and we don't want to change the focus to a new Element. |
| 2187 frame->selection().setSelection(newSelection, FrameSelection::CloseTypi
ng | FrameSelection::ClearTypingStyle | FrameSelection::DoNotSetFocus); | 2187 frame->selection().setSelection(newSelection, FrameSelection::CloseTypi
ng | FrameSelection::ClearTypingStyle | FrameSelection::DoNotSetFocus); |
| 2188 frame->selection().revealSelection(); | 2188 frame->selection().revealSelection(); |
| 2189 } else if (renderer() && !renderer()->isRenderPart()) | 2189 } else if (renderer() && !renderer()->isLayoutPart()) |
| 2190 renderer()->scrollRectToVisible(boundingBox()); | 2190 renderer()->scrollRectToVisible(boundingBox()); |
| 2191 } | 2191 } |
| 2192 | 2192 |
| 2193 void Element::blur() | 2193 void Element::blur() |
| 2194 { | 2194 { |
| 2195 cancelFocusAppearanceUpdate(); | 2195 cancelFocusAppearanceUpdate(); |
| 2196 if (treeScope().adjustedFocusedElement() == this) { | 2196 if (treeScope().adjustedFocusedElement() == this) { |
| 2197 Document& doc = document(); | 2197 Document& doc = document(); |
| 2198 if (doc.page()) | 2198 if (doc.page()) |
| 2199 doc.page()->focusController().setFocusedElement(0, doc.frame()); | 2199 doc.page()->focusController().setFocusedElement(0, doc.frame()); |
| (...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3370 { | 3370 { |
| 3371 #if ENABLE(OILPAN) | 3371 #if ENABLE(OILPAN) |
| 3372 if (hasRareData()) | 3372 if (hasRareData()) |
| 3373 visitor->trace(elementRareData()); | 3373 visitor->trace(elementRareData()); |
| 3374 visitor->trace(m_elementData); | 3374 visitor->trace(m_elementData); |
| 3375 #endif | 3375 #endif |
| 3376 ContainerNode::trace(visitor); | 3376 ContainerNode::trace(visitor); |
| 3377 } | 3377 } |
| 3378 | 3378 |
| 3379 } // namespace blink | 3379 } // namespace blink |
| OLD | NEW |