| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 DCHECK(!m_frame->document()->needsLayoutTreeUpdate()); | 189 DCHECK(!m_frame->document()->needsLayoutTreeUpdate()); |
| 190 DocumentLifecycle::DisallowTransitionScope disallowTransition(m_frame->docum
ent()->lifecycle()); | 190 DocumentLifecycle::DisallowTransitionScope disallowTransition(m_frame->docum
ent()->lifecycle()); |
| 191 | 191 |
| 192 if (!isActive()) { | 192 if (!isActive()) { |
| 193 clearCaretRect(); | 193 clearCaretRect(); |
| 194 } else { | 194 } else { |
| 195 if (enclosingTextFormControl(caretPosition().position())) { | 195 if (enclosingTextFormControl(caretPosition().position())) { |
| 196 if (isVisuallyEquivalentCandidate(caretPosition().position())) | 196 if (isVisuallyEquivalentCandidate(caretPosition().position())) |
| 197 updateCaretRect(caretPosition()); | 197 updateCaretRect(caretPosition()); |
| 198 else | 198 else |
| 199 updateCaretRect(createVisiblePositionDeprecated(caretPosition())
); | 199 updateCaretRect(createVisiblePosition(caretPosition())); |
| 200 } else { | 200 } else { |
| 201 updateCaretRect(createVisiblePositionDeprecated(caretPosition())); | 201 updateCaretRect(createVisiblePosition(caretPosition())); |
| 202 } | 202 } |
| 203 } | 203 } |
| 204 return absoluteBoundsForLocalRect(caretPosition().position().anchorNode(), l
ocalCaretRectWithoutUpdate()); | 204 return absoluteBoundsForLocalRect(caretPosition().position().anchorNode(), l
ocalCaretRectWithoutUpdate()); |
| 205 } | 205 } |
| 206 | 206 |
| 207 void FrameCaret::setShouldShowBlockCursor(bool shouldShowBlockCursor) | 207 void FrameCaret::setShouldShowBlockCursor(bool shouldShowBlockCursor) |
| 208 { | 208 { |
| 209 m_shouldShowBlockCursor = shouldShowBlockCursor; | 209 m_shouldShowBlockCursor = shouldShowBlockCursor; |
| 210 | 210 |
| 211 m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 211 m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 void FrameCaret::caretBlinkTimerFired(TimerBase*) | 274 void FrameCaret::caretBlinkTimerFired(TimerBase*) |
| 275 { | 275 { |
| 276 DCHECK_EQ(m_caretVisibility, CaretVisibility::Visible); | 276 DCHECK_EQ(m_caretVisibility, CaretVisibility::Visible); |
| 277 if (isCaretBlinkingSuspended() && m_shouldPaintCaret) | 277 if (isCaretBlinkingSuspended() && m_shouldPaintCaret) |
| 278 return; | 278 return; |
| 279 m_shouldPaintCaret = !m_shouldPaintCaret; | 279 m_shouldPaintCaret = !m_shouldPaintCaret; |
| 280 setCaretRectNeedsUpdate(); | 280 setCaretRectNeedsUpdate(); |
| 281 } | 281 } |
| 282 | 282 |
| 283 } // nemaspace blink | 283 } // nemaspace blink |
| OLD | NEW |