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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 clear(); | 113 clear(); |
114 } | 114 } |
115 | 115 |
116 void CaretBase::clearCaretRect() | 116 void CaretBase::clearCaretRect() |
117 { | 117 { |
118 m_caretLocalRect = LayoutRect(); | 118 m_caretLocalRect = LayoutRect(); |
119 } | 119 } |
120 | 120 |
121 static inline bool caretRendersInsideNode(Node* node) | 121 static inline bool caretRendersInsideNode(Node* node) |
122 { | 122 { |
123 return node && !isTableElement(node) && !editingIgnoresContent(node); | 123 return node && !isRenderedTable(node) && !editingIgnoresContent(node); |
124 } | 124 } |
125 | 125 |
126 RenderObject* CaretBase::caretRenderer(Node* node) | 126 RenderObject* CaretBase::caretRenderer(Node* node) |
127 { | 127 { |
128 if (!node) | 128 if (!node) |
129 return 0; | 129 return 0; |
130 | 130 |
131 RenderObject* renderer = node->renderer(); | 131 RenderObject* renderer = node->renderer(); |
132 if (!renderer) | 132 if (!renderer) |
133 return 0; | 133 return 0; |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 context->fillRect(caret, caretColor); | 269 context->fillRect(caret, caretColor); |
270 } | 270 } |
271 | 271 |
272 void DragCaretController::paintDragCaret(Frame* frame, GraphicsContext* p, const
LayoutPoint& paintOffset, const LayoutRect& clipRect) const | 272 void DragCaretController::paintDragCaret(Frame* frame, GraphicsContext* p, const
LayoutPoint& paintOffset, const LayoutRect& clipRect) const |
273 { | 273 { |
274 if (m_position.deepEquivalent().deprecatedNode()->document().frame() == fram
e) | 274 if (m_position.deepEquivalent().deprecatedNode()->document().frame() == fram
e) |
275 paintCaret(m_position.deepEquivalent().deprecatedNode(), p, paintOffset,
clipRect); | 275 paintCaret(m_position.deepEquivalent().deprecatedNode(), p, paintOffset,
clipRect); |
276 } | 276 } |
277 | 277 |
278 } | 278 } |
OLD | NEW |