Index: Source/core/rendering/RenderBlockFlow.cpp |
diff --git a/Source/core/rendering/RenderBlockFlow.cpp b/Source/core/rendering/RenderBlockFlow.cpp |
index 15d3dca9a0d487f394154c58e308a2f7a3da6050..cd17a26354df7b8a94892a361b230c5cc1f6802b 100644 |
--- a/Source/core/rendering/RenderBlockFlow.cpp |
+++ b/Source/core/rendering/RenderBlockFlow.cpp |
@@ -2824,8 +2824,9 @@ LayoutRect RenderBlockFlow::blockSelectionGap(const RenderBlock* rootBlock, cons |
LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, LayoutRect(logicalLeft, logicalTop, logicalWidth, logicalHeight)); |
if (paintInfo) { |
IntRect selectionGapRect = alignSelectionRectToDevicePixels(gapRect); |
- RenderDrawingRecorder recorder(paintInfo->context, this, paintInfo->phase, selectionGapRect); |
- paintInfo->context->fillRect(selectionGapRect, selectionBackgroundColor()); |
+ RenderDrawingRecorder recorder(paintInfo->context, *this, paintInfo->phase, selectionGapRect); |
+ if (!recorder.canUseCachedDrawing()) |
+ paintInfo->context->fillRect(selectionGapRect, selectionBackgroundColor()); |
} |
return gapRect; |
} |
@@ -2907,8 +2908,9 @@ LayoutRect RenderBlockFlow::logicalLeftSelectionGap(const RenderBlock* rootBlock |
LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalWidth, logicalHeight)); |
if (paintInfo) { |
IntRect selectionGapRect = alignSelectionRectToDevicePixels(gapRect); |
- RenderDrawingRecorder recorder(paintInfo->context, this, paintInfo->phase, selectionGapRect); |
- paintInfo->context->fillRect(selectionGapRect, selObj->selectionBackgroundColor()); |
+ RenderDrawingRecorder recorder(paintInfo->context, *this, paintInfo->phase, selectionGapRect); |
+ if (!recorder.canUseCachedDrawing()) |
+ paintInfo->context->fillRect(selectionGapRect, selObj->selectionBackgroundColor()); |
} |
return gapRect; |
} |
@@ -2926,8 +2928,9 @@ LayoutRect RenderBlockFlow::logicalRightSelectionGap(const RenderBlock* rootBloc |
LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalWidth, logicalHeight)); |
if (paintInfo) { |
IntRect selectionGapRect = alignSelectionRectToDevicePixels(gapRect); |
- RenderDrawingRecorder recorder(paintInfo->context, this, paintInfo->phase, selectionGapRect); |
- paintInfo->context->fillRect(selectionGapRect, selObj->selectionBackgroundColor()); |
+ RenderDrawingRecorder recorder(paintInfo->context, *this, paintInfo->phase, selectionGapRect); |
+ if (!recorder.canUseCachedDrawing()) |
+ paintInfo->context->fillRect(selectionGapRect, selObj->selectionBackgroundColor()); |
} |
return gapRect; |
} |