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

Side by Side 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, 7 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/multicol/scrolling-column-rules-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 3121 matching lines...) Expand 10 before | Expand all | Expand 10 after
3132 frame()->selection()->paintCaret(paintInfo.context, paintOffset, pai ntInfo.rect); 3132 frame()->selection()->paintCaret(paintInfo.context, paintOffset, pai ntInfo.rect);
3133 else 3133 else
3134 frame()->page()->dragCaretController()->paintDragCaret(frame(), pain tInfo.context, paintOffset, paintInfo.rect); 3134 frame()->page()->dragCaretController()->paintDragCaret(frame(), pain tInfo.context, paintOffset, paintInfo.rect);
3135 } 3135 }
3136 } 3136 }
3137 3137
3138 void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs et) 3138 void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs et)
3139 { 3139 {
3140 PaintPhase paintPhase = paintInfo.phase; 3140 PaintPhase paintPhase = paintInfo.phase;
3141 3141
3142 // Adjust our painting position if we're inside a scrolled layer (e.g., an o verflow:auto div).
3143 LayoutPoint scrolledOffset = paintOffset;
3144 if (hasOverflowClip())
3145 scrolledOffset.move(-scrolledContentOffset());
3146
3142 // 1. paint background, borders etc 3147 // 1. paint background, borders etc
3143 if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChil dBlockBackground) && style()->visibility() == VISIBLE) { 3148 if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChil dBlockBackground) && style()->visibility() == VISIBLE) {
3144 if (hasBoxDecorations()) 3149 if (hasBoxDecorations())
3145 paintBoxDecorations(paintInfo, paintOffset); 3150 paintBoxDecorations(paintInfo, paintOffset);
3146 if (hasColumns() && !paintInfo.paintRootBackgroundOnly()) 3151 if (hasColumns() && !paintInfo.paintRootBackgroundOnly())
3147 paintColumnRules(paintInfo, paintOffset); 3152 paintColumnRules(paintInfo, scrolledOffset);
3148 } 3153 }
3149 3154
3150 if (paintPhase == PaintPhaseMask && style()->visibility() == VISIBLE) { 3155 if (paintPhase == PaintPhaseMask && style()->visibility() == VISIBLE) {
3151 paintMask(paintInfo, paintOffset); 3156 paintMask(paintInfo, paintOffset);
3152 return; 3157 return;
3153 } 3158 }
3154 3159
3155 // We're done. We don't bother painting any children. 3160 // We're done. We don't bother painting any children.
3156 if (paintPhase == PaintPhaseBlockBackground || paintInfo.paintRootBackground Only()) 3161 if (paintPhase == PaintPhaseBlockBackground || paintInfo.paintRootBackground Only())
3157 return; 3162 return;
3158 3163
3159 // Adjust our painting position if we're inside a scrolled layer (e.g., an o verflow:auto div).
3160 LayoutPoint scrolledOffset = paintOffset;
3161 if (hasOverflowClip())
3162 scrolledOffset.move(-scrolledContentOffset());
3163
3164 // 2. paint contents 3164 // 2. paint contents
3165 if (paintPhase != PaintPhaseSelfOutline) { 3165 if (paintPhase != PaintPhaseSelfOutline) {
3166 if (hasColumns()) 3166 if (hasColumns())
3167 paintColumnContents(paintInfo, scrolledOffset); 3167 paintColumnContents(paintInfo, scrolledOffset);
3168 else 3168 else
3169 paintContents(paintInfo, scrolledOffset); 3169 paintContents(paintInfo, scrolledOffset);
3170 } 3170 }
3171 3171
3172 // 3. paint selection 3172 // 3. paint selection
3173 // FIXME: Make this work with multi column layouts. For now don't fill gaps . 3173 // FIXME: Make this work with multi column layouts. For now don't fill gaps .
(...skipping 4940 matching lines...) Expand 10 before | Expand all | Expand 10 after
8114 { 8114 {
8115 memoryInstrumentation->addRootObject(gColumnInfoMap, WebCoreMemoryTypes::Ren deringStructures); 8115 memoryInstrumentation->addRootObject(gColumnInfoMap, WebCoreMemoryTypes::Ren deringStructures);
8116 memoryInstrumentation->addRootObject(gPositionedDescendantsMap, WebCoreMemor yTypes::RenderingStructures); 8116 memoryInstrumentation->addRootObject(gPositionedDescendantsMap, WebCoreMemor yTypes::RenderingStructures);
8117 memoryInstrumentation->addRootObject(gPercentHeightDescendantsMap, WebCoreMe moryTypes::RenderingStructures); 8117 memoryInstrumentation->addRootObject(gPercentHeightDescendantsMap, WebCoreMe moryTypes::RenderingStructures);
8118 memoryInstrumentation->addRootObject(gPositionedContainerMap, WebCoreMemoryT ypes::RenderingStructures); 8118 memoryInstrumentation->addRootObject(gPositionedContainerMap, WebCoreMemoryT ypes::RenderingStructures);
8119 memoryInstrumentation->addRootObject(gPercentHeightContainerMap, WebCoreMemo ryTypes::RenderingStructures); 8119 memoryInstrumentation->addRootObject(gPercentHeightContainerMap, WebCoreMemo ryTypes::RenderingStructures);
8120 memoryInstrumentation->addRootObject(gDelayedUpdateScrollInfoSet, WebCoreMem oryTypes::RenderingStructures); 8120 memoryInstrumentation->addRootObject(gDelayedUpdateScrollInfoSet, WebCoreMem oryTypes::RenderingStructures);
8121 } 8121 }
8122 8122
8123 } // namespace WebCore 8123 } // namespace WebCore
OLDNEW
« 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