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

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

Issue 2271883002: Fix paint invalidation and painting for composited-scrolling input elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 updateAppearance(); 204 updateAppearance();
205 } 205 }
206 206
207 void FrameCaret::paintCaret(GraphicsContext& context, const LayoutPoint& paintOf fset) 207 void FrameCaret::paintCaret(GraphicsContext& context, const LayoutPoint& paintOf fset)
208 { 208 {
209 if (!(isActive() && m_shouldPaintCaret)) 209 if (!(isActive() && m_shouldPaintCaret))
210 return; 210 return;
211 211
212 updateCaretRect(caretPosition()); 212 updateCaretRect(caretPosition());
213 CaretBase::paintCaret(caretPosition().position().anchorNode(), context, pain tOffset); 213 CaretBase::paintCaret(caretPosition().position().anchorNode(), context, pain tOffset, DisplayItem::Caret);
214 } 214 }
215 215
216 void FrameCaret::dataWillChange(const CharacterData& node) 216 void FrameCaret::dataWillChange(const CharacterData& node)
217 { 217 {
218 if (node == m_previousCaretNode) { 218 if (node == m_previousCaretNode) {
219 // This invalidation is eager, and intentionally uses stale state. 219 // This invalidation is eager, and intentionally uses stale state.
220 DisableCompositingQueryAsserts disabler; 220 DisableCompositingQueryAsserts disabler;
221 invalidateLocalCaretRect(m_previousCaretNode.get(), m_previousCaretRect) ; 221 invalidateLocalCaretRect(m_previousCaretNode.get(), m_previousCaretRect) ;
222 } 222 }
223 } 223 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 void FrameCaret::caretBlinkTimerFired(TimerBase*) 262 void FrameCaret::caretBlinkTimerFired(TimerBase*)
263 { 263 {
264 DCHECK(caretIsVisible()); 264 DCHECK(caretIsVisible());
265 if (isCaretBlinkingSuspended() && m_shouldPaintCaret) 265 if (isCaretBlinkingSuspended() && m_shouldPaintCaret)
266 return; 266 return;
267 m_shouldPaintCaret = !m_shouldPaintCaret; 267 m_shouldPaintCaret = !m_shouldPaintCaret;
268 setCaretRectNeedsUpdate(); 268 setCaretRectNeedsUpdate();
269 } 269 }
270 270
271 } // nemaspace blink 271 } // nemaspace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698