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

Unified Diff: third_party/WebKit/Source/core/paint/BlockPainter.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, 4 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 8e049b59272fc20c076f8fb394bce6f2c8278680..463dbfc092d7c0f3c63dfa793408d277a2618b86 100644
--- a/third_party/WebKit/Source/core/paint/BlockPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/BlockPainter.cpp
@@ -21,6 +21,7 @@
#include "core/paint/PaintLayer.h"
#include "core/paint/ScrollRecorder.h"
#include "core/paint/ScrollableAreaPainter.h"
+#include "platform/graphics/GraphicsLayer.h"
#include "platform/graphics/paint/ClipRecorder.h"
#include "wtf/Optional.h"
@@ -193,10 +194,13 @@ void BlockPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& pa
// 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() && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_layoutBlock, DisplayItem::Caret)) {
+ const DisplayItemClient& displayItemClient = m_layoutBlock.usesCompositedScrolling() ? static_cast<const DisplayItemClient&>(*m_layoutBlock.layer()->graphicsLayerBackingForScrolling())
pdr. 2016/08/25 22:07:11 Nit: are these static cats needed?
chrishtr 2016/08/26 16:02:25 In fact, I had forgotten to remove this code now t
+ : m_layoutBlock;
+ if (paintPhase == PaintPhaseForeground && m_layoutBlock.hasCaret() && !DrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, displayItemClient, DisplayItem::Caret)) {
LayoutRect bounds = m_layoutBlock.visualOverflowRect();
bounds.moveBy(paintOffset);
- LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutBlock, DisplayItem::Caret, bounds);
+
+ DrawingRecorder drawingRecorder(paintInfo.context, displayItemClient, DisplayItem::Caret, FloatRect(bounds));
paintCarets(paintInfo, paintOffset);
}
}

Powered by Google App Engine
This is Rietveld 408576698