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

Unified Diff: third_party/WebKit/Source/core/paint/BlockPainter.cpp

Issue 2665823002: Invalidate caret during paint invalidation (Closed)
Patch Set: NeedsRebaseline Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/BlockPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/BlockPainter.cpp b/third_party/WebKit/Source/core/paint/BlockPainter.cpp
index 067bd04ec12741d3effb1e61a3e8b696866663e1..59aeae5ab703aa848fd6b56ba10e98033758a241 100644
--- a/third_party/WebKit/Source/core/paint/BlockPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/BlockPainter.cpp
@@ -43,7 +43,7 @@ void BlockPainter::paint(const PaintInfo& paintInfo,
// FIXME: reduce the number of such cases.
ContentsClipBehavior contentsClipBehavior = ForceContentsClip;
if (m_layoutBlock.shouldClipOverflow() && !m_layoutBlock.hasControlClip() &&
- !m_layoutBlock.hasCaret())
+ !m_layoutBlock.shouldPaintCarets())
contentsClipBehavior = SkipContentsClipIfPossible;
if (originalPhase == PaintPhaseOutline) {
@@ -246,7 +246,7 @@ void BlockPainter::paintObject(const PaintInfo& paintInfo,
// If the caret's node's layout object's containing block is this block, and
// the paint action is PaintPhaseForeground, then paint the caret.
- if (paintPhase == PaintPhaseForeground && m_layoutBlock.hasCaret())
+ if (paintPhase == PaintPhaseForeground && m_layoutBlock.shouldPaintCarets())
paintCarets(paintInfo, paintOffset);
}
@@ -254,10 +254,10 @@ void BlockPainter::paintCarets(const PaintInfo& paintInfo,
const LayoutPoint& paintOffset) {
LocalFrame* frame = m_layoutBlock.frame();
- if (m_layoutBlock.hasCursorCaret())
+ if (m_layoutBlock.shouldPaintCursorCaret())
frame->selection().paintCaret(paintInfo.context, paintOffset);
- if (m_layoutBlock.hasDragCaret()) {
+ if (m_layoutBlock.shouldPaintDragCaret()) {
frame->page()->dragCaret().paintDragCaret(frame, paintInfo.context,
paintOffset);
}

Powered by Google App Engine
This is Rietveld 408576698