| 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 4d086f372e015b5450ccdaa9ed79907b89e29673..8e049b59272fc20c076f8fb394bce6f2c8278680 100644
|
| --- a/third_party/WebKit/Source/core/paint/BlockPainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/BlockPainter.cpp
|
| @@ -21,7 +21,6 @@
|
| #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"
|
|
|
| @@ -194,8 +193,12 @@
|
|
|
| // 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.hasCaret() && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_layoutBlock, DisplayItem::Caret)) {
|
| + LayoutRect bounds = m_layoutBlock.visualOverflowRect();
|
| + bounds.moveBy(paintOffset);
|
| + LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutBlock, DisplayItem::Caret, bounds);
|
| paintCarets(paintInfo, paintOffset);
|
| + }
|
| }
|
|
|
| void BlockPainter::paintCarets(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
|
|
|