Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1682)

Unified Diff: Source/core/rendering/RenderBlock.cpp

Issue 14238038: Need to take an element's scroll offset into account when painting its column rules. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/multicol/scrolling-column-rules-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « LayoutTests/fast/multicol/scrolling-column-rules-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698