| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 if (!hasCaret() || !node.inActiveDocument()) | 102 if (!hasCaret() || !node.inActiveDocument()) |
| 103 return; | 103 return; |
| 104 | 104 |
| 105 if (!removingNodeRemovesPosition(node, m_position.deepEquivalent())) | 105 if (!removingNodeRemovesPosition(node, m_position.deepEquivalent())) |
| 106 return; | 106 return; |
| 107 | 107 |
| 108 m_position.deepEquivalent().document()->renderView()->clearSelection(); | 108 m_position.deepEquivalent().document()->renderView()->clearSelection(); |
| 109 clear(); | 109 clear(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 void DragCaretController::trace(Visitor* visitor) | |
| 113 { | |
| 114 visitor->trace(m_position); | |
| 115 } | |
| 116 | |
| 117 void CaretBase::clearCaretRect() | 112 void CaretBase::clearCaretRect() |
| 118 { | 113 { |
| 119 m_caretLocalRect = LayoutRect(); | 114 m_caretLocalRect = LayoutRect(); |
| 120 } | 115 } |
| 121 | 116 |
| 122 static inline bool caretRendersInsideNode(Node* node) | 117 static inline bool caretRendersInsideNode(Node* node) |
| 123 { | 118 { |
| 124 return node && !isRenderedTableElement(node) && !editingIgnoresContent(node)
; | 119 return node && !isRenderedTableElement(node) && !editingIgnoresContent(node)
; |
| 125 } | 120 } |
| 126 | 121 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 context->fillRect(caret, caretColor); | 249 context->fillRect(caret, caretColor); |
| 255 } | 250 } |
| 256 | 251 |
| 257 void DragCaretController::paintDragCaret(LocalFrame* frame, GraphicsContext* p,
const LayoutPoint& paintOffset, const LayoutRect& clipRect) const | 252 void DragCaretController::paintDragCaret(LocalFrame* frame, GraphicsContext* p,
const LayoutPoint& paintOffset, const LayoutRect& clipRect) const |
| 258 { | 253 { |
| 259 if (m_position.deepEquivalent().deprecatedNode()->document().frame() == fram
e) | 254 if (m_position.deepEquivalent().deprecatedNode()->document().frame() == fram
e) |
| 260 paintCaret(m_position.deepEquivalent().deprecatedNode(), p, paintOffset,
clipRect); | 255 paintCaret(m_position.deepEquivalent().deprecatedNode(), p, paintOffset,
clipRect); |
| 261 } | 256 } |
| 262 | 257 |
| 263 } | 258 } |
| OLD | NEW |