| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 if (!anchorNode) | 97 if (!anchorNode) |
| 98 return; | 98 return; |
| 99 if (!node.isShadowIncludingInclusiveAncestorOf(anchorNode)) | 99 if (!node.isShadowIncludingInclusiveAncestorOf(anchorNode)) |
| 100 return; | 100 return; |
| 101 m_position.document()->layoutViewItem().clearSelection(); | 101 m_position.document()->layoutViewItem().clearSelection(); |
| 102 clear(); | 102 clear(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 DEFINE_TRACE(DragCaretController) { | 105 DEFINE_TRACE(DragCaretController) { |
| 106 visitor->trace(m_position); | 106 visitor->trace(m_position); |
| 107 visitor->trace(m_caretBase); | |
| 108 SynchronousMutationObserver::trace(visitor); | 107 SynchronousMutationObserver::trace(visitor); |
| 109 } | 108 } |
| 110 | 109 |
| 111 void DragCaretController::paintDragCaret(LocalFrame* frame, | 110 void DragCaretController::paintDragCaret(LocalFrame* frame, |
| 112 GraphicsContext& context, | 111 GraphicsContext& context, |
| 113 const LayoutPoint& paintOffset) const { | 112 const LayoutPoint& paintOffset) const { |
| 114 if (m_position.anchorNode()->document().frame() == frame) { | 113 if (m_position.anchorNode()->document().frame() == frame) { |
| 115 CaretBase::paintCaret(m_position.anchorNode(), context, *m_caretBase, | 114 CaretBase::paintCaret(m_position.anchorNode(), context, *m_caretBase, |
| 116 m_caretLocalRect, paintOffset, | 115 m_caretLocalRect, paintOffset, |
| 117 DisplayItem::kDragCaret); | 116 DisplayItem::kDragCaret); |
| 118 } | 117 } |
| 119 } | 118 } |
| 120 | 119 |
| 121 } // namespace blink | 120 } // namespace blink |
| OLD | NEW |