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

Side by Side Diff: third_party/WebKit/Source/core/paint/MultiColumnSetPainter.cpp

Issue 2181953004: Changed ComputedStyle's EVisibility to be an enum class and fixed naming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_move_computedstyle_around
Patch Set: Rebase Created 4 years, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/MultiColumnSetPainter.h" 5 #include "core/paint/MultiColumnSetPainter.h"
6 6
7 #include "core/layout/LayoutMultiColumnSet.h" 7 #include "core/layout/LayoutMultiColumnSet.h"
8 #include "core/paint/BlockPainter.h" 8 #include "core/paint/BlockPainter.h"
9 #include "core/paint/BoxPainter.h" 9 #include "core/paint/BoxPainter.h"
10 #include "core/paint/LayoutObjectDrawingRecorder.h" 10 #include "core/paint/LayoutObjectDrawingRecorder.h"
11 #include "core/paint/ObjectPainter.h" 11 #include "core/paint/ObjectPainter.h"
12 #include "core/paint/PaintInfo.h" 12 #include "core/paint/PaintInfo.h"
13 #include "platform/geometry/LayoutPoint.h" 13 #include "platform/geometry/LayoutPoint.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 void MultiColumnSetPainter::paintObject(const PaintInfo& paintInfo, const Layout Point& paintOffset) 17 void MultiColumnSetPainter::paintObject(const PaintInfo& paintInfo, const Layout Point& paintOffset)
18 { 18 {
19 if (m_layoutMultiColumnSet.style()->visibility() != VISIBLE) 19 if (m_layoutMultiColumnSet.style()->visibility() != EVisibility::Visible)
20 return; 20 return;
21 21
22 BlockPainter(m_layoutMultiColumnSet).paintObject(paintInfo, paintOffset); 22 BlockPainter(m_layoutMultiColumnSet).paintObject(paintInfo, paintOffset);
23 23
24 // FIXME: Right now we're only painting in the foreground phase. 24 // FIXME: Right now we're only painting in the foreground phase.
25 // Columns should technically respect phases and allow for background/float/ foreground overlap etc., just like 25 // Columns should technically respect phases and allow for background/float/ foreground overlap etc., just like
26 // LayoutBlocks do. Note this is a pretty minor issue, since the old column implementation clipped columns 26 // LayoutBlocks do. Note this is a pretty minor issue, since the old column implementation clipped columns
27 // anyway, thus making it impossible for them to overlap one another. It's a lso really unlikely that the columns 27 // anyway, thus making it impossible for them to overlap one another. It's a lso really unlikely that the columns
28 // would overlap another block. 28 // would overlap another block.
29 if (!m_layoutMultiColumnSet.flowThread() || (paintInfo.phase != PaintPhaseFo reground && paintInfo.phase != PaintPhaseSelection)) 29 if (!m_layoutMultiColumnSet.flowThread() || (paintInfo.phase != PaintPhaseFo reground && paintInfo.phase != PaintPhaseSelection))
(...skipping 23 matching lines...) Expand all
53 : leftToRight ? BSTop : BSBottom; 53 : leftToRight ? BSTop : BSBottom;
54 const Color& ruleColor = m_layoutMultiColumnSet.resolveColor(blockStyle, CSS PropertyColumnRuleColor); 54 const Color& ruleColor = m_layoutMultiColumnSet.resolveColor(blockStyle, CSS PropertyColumnRuleColor);
55 55
56 for (auto& bound : columnRuleBounds) { 56 for (auto& bound : columnRuleBounds) {
57 IntRect pixelSnappedRuleRect = pixelSnappedIntRect(bound); 57 IntRect pixelSnappedRuleRect = pixelSnappedIntRect(bound);
58 ObjectPainter::drawLineForBoxSide(paintInfo.context, pixelSnappedRuleRec t.x(), pixelSnappedRuleRect.y(), pixelSnappedRuleRect.maxX(), pixelSnappedRuleRe ct.maxY(), boxSide, ruleColor, ruleStyle, 0, 0, true); 58 ObjectPainter::drawLineForBoxSide(paintInfo.context, pixelSnappedRuleRec t.x(), pixelSnappedRuleRect.y(), pixelSnappedRuleRect.maxX(), pixelSnappedRuleRe ct.maxY(), boxSide, ruleColor, ruleStyle, 0, 0, true);
59 } 59 }
60 } 60 }
61 61
62 } // namespace blink 62 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698