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

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

Issue 2001083002: Explicit management of FrameSelection availability (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-06-08T18:08:39 Created 4 years, 6 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 if (node != m_previousCaretNode) 225 if (node != m_previousCaretNode)
226 return; 226 return;
227 // Hits in ManualTests/caret-paint-after-last-text-is-removed.html 227 // Hits in ManualTests/caret-paint-after-last-text-is-removed.html
228 DisableCompositingQueryAsserts disabler; 228 DisableCompositingQueryAsserts disabler;
229 invalidateLocalCaretRect(m_previousCaretNode.get(), m_previousCaretRect); 229 invalidateLocalCaretRect(m_previousCaretNode.get(), m_previousCaretRect);
230 m_previousCaretNode = nullptr; 230 m_previousCaretNode = nullptr;
231 m_previousCaretRect = LayoutRect(); 231 m_previousCaretRect = LayoutRect();
232 m_previousCaretVisibility = CaretVisibility::Hidden; 232 m_previousCaretVisibility = CaretVisibility::Hidden;
233 } 233 }
234 234
235 void FrameCaret::prepareForDestruction() 235 void FrameCaret::documentDetached()
236 { 236 {
237 m_caretPosition = PositionWithAffinity(); 237 m_caretPosition = PositionWithAffinity();
238 m_caretBlinkTimer.stop(); 238 m_caretBlinkTimer.stop();
239 m_previousCaretNode.clear(); 239 m_previousCaretNode.clear();
240 } 240 }
241 241
242 bool FrameCaret::shouldBlinkCaret() const 242 bool FrameCaret::shouldBlinkCaret() const
243 { 243 {
244 if (!caretIsVisible() || !isActive()) 244 if (!caretIsVisible() || !isActive())
245 return false; 245 return false;
(...skipping 15 matching lines...) Expand all
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
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameCaret.h ('k') | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698