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

Side by Side Diff: third_party/WebKit/Source/core/paint/BlockPaintInvalidator.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
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/BlockPaintInvalidator.h" 5 #include "core/paint/BlockPaintInvalidator.h"
6 6
7 #include "core/editing/DragCaret.h" 7 #include "core/editing/DragCaret.h"
8 #include "core/editing/FrameSelection.h" 8 #include "core/editing/FrameSelection.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/layout/LayoutBlock.h" 10 #include "core/layout/LayoutBlock.h"
11 #include "core/page/Page.h" 11 #include "core/page/Page.h"
12 #include "core/paint/BoxPaintInvalidator.h" 12 #include "core/paint/BoxPaintInvalidator.h"
13 #include "core/paint/ObjectPaintInvalidator.h" 13 #include "core/paint/ObjectPaintInvalidator.h"
14 #include "core/paint/PaintInvalidator.h" 14 #include "core/paint/PaintInvalidator.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 void BlockPaintInvalidator::clearPreviousVisualRects() { 18 void BlockPaintInvalidator::clearPreviousVisualRects() {
19 m_block.frame()->selection().clearPreviousCaretVisualRect(m_block); 19 m_block.frame()->selection().clearPreviousCaretVisualRect(m_block);
20 m_block.frame()->page()->dragCaret().clearPreviousVisualRect(m_block); 20 m_block.frame()->page()->dragCaret().clearPreviousVisualRect(m_block);
21 } 21 }
22 22
23 PaintInvalidationReason BlockPaintInvalidator::invalidatePaintIfNeeded( 23 PaintInvalidationReason BlockPaintInvalidator::invalidatePaintIfNeeded(
24 const PaintInvalidatorContext& context) { 24 const PaintInvalidatorContext& context) {
25 PaintInvalidationReason reason = 25 PaintInvalidationReason reason =
26 BoxPaintInvalidator(m_block, context).invalidatePaintIfNeeded(); 26 BoxPaintInvalidator(m_block, context).invalidatePaintIfNeeded();
27 27
28 m_block.frame()->selection().invalidatePaintIfNeeded(m_block, context, 28 m_block.frame()->selection().invalidatePaintIfNeeded(m_block, context);
29 reason); 29 m_block.frame()->page()->dragCaret().invalidatePaintIfNeeded(m_block,
30 m_block.frame()->page()->dragCaret().invalidatePaintIfNeeded(m_block, context, 30 context);
31 reason);
32 31
33 return reason; 32 return reason;
34 } 33 }
35 } 34
35 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698