Index: Source/core/rendering/RenderBlock.cpp |
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp |
index 2b798a95783598f8220e2b6d668c6c679781ec81..fb389e21be0470c305b5d161a57793579fe53c69 100644 |
--- a/Source/core/rendering/RenderBlock.cpp |
+++ b/Source/core/rendering/RenderBlock.cpp |
@@ -3139,12 +3139,17 @@ void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs |
{ |
PaintPhase paintPhase = paintInfo.phase; |
+ // Adjust our painting position if we're inside a scrolled layer (e.g., an overflow:auto div). |
+ LayoutPoint scrolledOffset = paintOffset; |
+ if (hasOverflowClip()) |
+ scrolledOffset.move(-scrolledContentOffset()); |
+ |
// 1. paint background, borders etc |
if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && style()->visibility() == VISIBLE) { |
if (hasBoxDecorations()) |
paintBoxDecorations(paintInfo, paintOffset); |
if (hasColumns() && !paintInfo.paintRootBackgroundOnly()) |
- paintColumnRules(paintInfo, paintOffset); |
+ paintColumnRules(paintInfo, scrolledOffset); |
} |
if (paintPhase == PaintPhaseMask && style()->visibility() == VISIBLE) { |
@@ -3156,11 +3161,6 @@ void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs |
if (paintPhase == PaintPhaseBlockBackground || paintInfo.paintRootBackgroundOnly()) |
return; |
- // Adjust our painting position if we're inside a scrolled layer (e.g., an overflow:auto div). |
- LayoutPoint scrolledOffset = paintOffset; |
- if (hasOverflowClip()) |
- scrolledOffset.move(-scrolledContentOffset()); |
- |
// 2. paint contents |
if (paintPhase != PaintPhaseSelfOutline) { |
if (hasColumns()) |