Index: Source/core/layout/LayoutTextControlSingleLine.cpp |
diff --git a/Source/core/layout/LayoutTextControlSingleLine.cpp b/Source/core/layout/LayoutTextControlSingleLine.cpp |
index 078ae4970b16cb533e1df3a03655df4f607d8439..c6e2a51af97bba24f1c5ce1dde15ac5273381815 100644 |
--- a/Source/core/layout/LayoutTextControlSingleLine.cpp |
+++ b/Source/core/layout/LayoutTextControlSingleLine.cpp |
@@ -75,6 +75,9 @@ void LayoutTextControlSingleLine::paint(const PaintInfo& paintInfo, const Layout |
LayoutTextControl::paint(paintInfo, paintOffset); |
if (paintInfo.phase == PaintPhaseBlockBackground && m_shouldDrawCapsLockIndicator) { |
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, *this, paintInfo.phase)) |
+ return; |
+ |
LayoutRect contentsRect = contentBoxRect(); |
// Center in the block progression direction. |
@@ -87,8 +90,7 @@ void LayoutTextControlSingleLine::paint(const PaintInfo& paintInfo, const Layout |
contentsRect.moveBy(paintOffset + location()); |
IntRect snappedRect = pixelSnappedIntRect(contentsRect); |
LayoutObjectDrawingRecorder recorder(*paintInfo.context, *this, paintInfo.phase, snappedRect); |
- if (!recorder.canUseCachedDrawing()) |
- LayoutTheme::theme().painter().paintCapsLockIndicator(this, paintInfo, snappedRect); |
+ LayoutTheme::theme().painter().paintCapsLockIndicator(this, paintInfo, snappedRect); |
} |
} |