Index: Source/core/paint/InlinePainter.cpp |
diff --git a/Source/core/paint/InlinePainter.cpp b/Source/core/paint/InlinePainter.cpp |
index d8708834faad5f7bcb49ed0a10d38556b6e63374..393cb9b7e050289fb0b4f3a176830cfa59a90f75 100644 |
--- a/Source/core/paint/InlinePainter.cpp |
+++ b/Source/core/paint/InlinePainter.cpp |
@@ -6,10 +6,12 @@ |
#include "core/paint/InlinePainter.h" |
#include "core/paint/BoxPainter.h" |
+#include "core/paint/DrawingRecorder.h" |
#include "core/paint/LineBoxListPainter.h" |
#include "core/paint/ObjectPainter.h" |
#include "core/rendering/GraphicsContextAnnotator.h" |
#include "core/rendering/PaintInfo.h" |
+#include "core/rendering/RenderBlock.h" |
#include "core/rendering/RenderInline.h" |
#include "core/rendering/RenderTheme.h" |
#include "core/rendering/RootInlineBox.h" |
@@ -29,6 +31,15 @@ void InlinePainter::paintOutline(PaintInfo& paintInfo, const LayoutPoint& paintO |
if (!styleToUse->hasOutline()) |
return; |
+ LayoutRect bounds; |
+ if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { |
+ // FIXME: Use tighter bounds. |
+ RenderBlock* cb = m_renderInline.containingBlock(); |
+ bounds = cb->visualOverflowRect(); |
+ bounds.moveBy(paintOffset); |
+ } |
+ DrawingRecorder recorder(paintInfo.context, &m_renderInline, paintInfo.phase, bounds); |
+ |
if (styleToUse->outlineStyleIsAuto()) { |
if (RenderTheme::theme().shouldDrawDefaultFocusRing(&m_renderInline)) { |
// Only paint the focus ring by hand if the theme isn't able to draw the focus ring. |