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