Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: third_party/WebKit/Source/core/editing/FrameCaret.cpp

Issue 2292353003: Cherry-pick r415013 to M53. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 updateAppearance(); 202 updateAppearance();
203 } 203 }
204 204
205 void FrameCaret::paintCaret(GraphicsContext& context, const LayoutPoint& paintOf fset) 205 void FrameCaret::paintCaret(GraphicsContext& context, const LayoutPoint& paintOf fset)
206 { 206 {
207 if (!(isActive() && m_shouldPaintCaret)) 207 if (!(isActive() && m_shouldPaintCaret))
208 return; 208 return;
209 209
210 updateCaretRect(m_caretPosition); 210 updateCaretRect(m_caretPosition);
211 CaretBase::paintCaret(m_caretPosition.position().anchorNode(), context, pain tOffset); 211 CaretBase::paintCaret(m_caretPosition.position().anchorNode(), context, pain tOffset, DisplayItem::Caret);
212 } 212 }
213 213
214 void FrameCaret::dataWillChange(const CharacterData& node) 214 void FrameCaret::dataWillChange(const CharacterData& node)
215 { 215 {
216 if (node == m_previousCaretNode) { 216 if (node == m_previousCaretNode) {
217 // This invalidation is eager, and intentionally uses stale state. 217 // This invalidation is eager, and intentionally uses stale state.
218 DisableCompositingQueryAsserts disabler; 218 DisableCompositingQueryAsserts disabler;
219 invalidateLocalCaretRect(m_previousCaretNode.get(), m_previousCaretRect) ; 219 invalidateLocalCaretRect(m_previousCaretNode.get(), m_previousCaretRect) ;
220 } 220 }
221 } 221 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 void FrameCaret::caretBlinkTimerFired(Timer<FrameCaret>*) 261 void FrameCaret::caretBlinkTimerFired(Timer<FrameCaret>*)
262 { 262 {
263 DCHECK(caretIsVisible()); 263 DCHECK(caretIsVisible());
264 if (isCaretBlinkingSuspended() && m_shouldPaintCaret) 264 if (isCaretBlinkingSuspended() && m_shouldPaintCaret)
265 return; 265 return;
266 m_shouldPaintCaret = !m_shouldPaintCaret; 266 m_shouldPaintCaret = !m_shouldPaintCaret;
267 setCaretRectNeedsUpdate(); 267 setCaretRectNeedsUpdate();
268 } 268 }
269 269
270 } // nemaspace blink 270 } // nemaspace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698