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

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

Issue 2745793002: Fix caret paint invalidation issues (Closed)
Patch Set: Created 3 years, 9 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 void FrameSelection::layoutBlockWillBeDestroyed(const LayoutBlock& block) { 476 void FrameSelection::layoutBlockWillBeDestroyed(const LayoutBlock& block) {
477 m_frameCaret->layoutBlockWillBeDestroyed(block); 477 m_frameCaret->layoutBlockWillBeDestroyed(block);
478 } 478 }
479 479
480 void FrameSelection::updateStyleAndLayoutIfNeeded() { 480 void FrameSelection::updateStyleAndLayoutIfNeeded() {
481 m_frameCaret->updateStyleAndLayoutIfNeeded(); 481 m_frameCaret->updateStyleAndLayoutIfNeeded();
482 } 482 }
483 483
484 void FrameSelection::invalidatePaintIfNeeded( 484 void FrameSelection::invalidatePaintIfNeeded(
485 const LayoutBlock& block, 485 const LayoutBlock& block,
486 const PaintInvalidatorContext& context, 486 const PaintInvalidatorContext& context) {
487 PaintInvalidationReason reason) { 487 m_frameCaret->invalidatePaintIfNeeded(block, context);
488 m_frameCaret->invalidatePaintIfNeeded(block, context, reason);
489 } 488 }
490 489
491 bool FrameSelection::shouldPaintCaret(const LayoutBlock& block) const { 490 bool FrameSelection::shouldPaintCaret(const LayoutBlock& block) const {
492 DCHECK_GE(document().lifecycle().state(), DocumentLifecycle::LayoutClean); 491 DCHECK_GE(document().lifecycle().state(), DocumentLifecycle::LayoutClean);
493 bool result = m_frameCaret->shouldPaintCaret(block); 492 bool result = m_frameCaret->shouldPaintCaret(block);
494 DCHECK(!result || 493 DCHECK(!result ||
495 (computeVisibleSelectionInDOMTreeDeprecated().isCaret() && 494 (computeVisibleSelectionInDOMTreeDeprecated().isCaret() &&
496 computeVisibleSelectionInDOMTree().hasEditableStyle())); 495 computeVisibleSelectionInDOMTree().hasEditableStyle()));
497 return result; 496 return result;
498 } 497 }
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 } 1199 }
1201 1200
1202 void showTree(const blink::FrameSelection* sel) { 1201 void showTree(const blink::FrameSelection* sel) {
1203 if (sel) 1202 if (sel)
1204 sel->showTreeForThis(); 1203 sel->showTreeForThis();
1205 else 1204 else
1206 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; 1205 LOG(INFO) << "Cannot showTree for <null> FrameSelection.";
1207 } 1206 }
1208 1207
1209 #endif 1208 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698