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

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

Issue 2286843002: Rename DisplayItem::Type enum constants to Chromium style. (Closed)
Patch Set: Rebasing... Created 4 years, 3 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"
(...skipping 20 matching lines...) Expand all
31 31
32 paintColumnRules(paintInfo, paintOffset); 32 paintColumnRules(paintInfo, paintOffset);
33 } 33 }
34 34
35 void MultiColumnSetPainter::paintColumnRules(const PaintInfo& paintInfo, const L ayoutPoint& paintOffset) 35 void MultiColumnSetPainter::paintColumnRules(const PaintInfo& paintInfo, const L ayoutPoint& paintOffset)
36 { 36 {
37 Vector<LayoutRect> columnRuleBounds; 37 Vector<LayoutRect> columnRuleBounds;
38 if (!m_layoutMultiColumnSet.computeColumnRuleBounds(paintOffset, columnRuleB ounds)) 38 if (!m_layoutMultiColumnSet.computeColumnRuleBounds(paintOffset, columnRuleB ounds))
39 return; 39 return;
40 40
41 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.contex t, m_layoutMultiColumnSet, DisplayItem::ColumnRules)) 41 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.contex t, m_layoutMultiColumnSet, DisplayItem::kColumnRules))
42 return; 42 return;
43 43
44 LayoutRect paintRect = m_layoutMultiColumnSet.visualOverflowRect(); 44 LayoutRect paintRect = m_layoutMultiColumnSet.visualOverflowRect();
45 paintRect.moveBy(paintOffset); 45 paintRect.moveBy(paintOffset);
46 LayoutObjectDrawingRecorder drawingRecorder(paintInfo.context, m_layoutMulti ColumnSet, DisplayItem::ColumnRules, paintRect); 46 LayoutObjectDrawingRecorder drawingRecorder(paintInfo.context, m_layoutMulti ColumnSet, DisplayItem::kColumnRules, paintRect);
47 47
48 const ComputedStyle& blockStyle = m_layoutMultiColumnSet.multiColumnBlockFlo w()->styleRef(); 48 const ComputedStyle& blockStyle = m_layoutMultiColumnSet.multiColumnBlockFlo w()->styleRef();
49 EBorderStyle ruleStyle = blockStyle.columnRuleStyle(); 49 EBorderStyle ruleStyle = blockStyle.columnRuleStyle();
50 bool leftToRight = m_layoutMultiColumnSet.style()->isLeftToRightDirection(); 50 bool leftToRight = m_layoutMultiColumnSet.style()->isLeftToRightDirection();
51 BoxSide boxSide = m_layoutMultiColumnSet.isHorizontalWritingMode() 51 BoxSide boxSide = m_layoutMultiColumnSet.isHorizontalWritingMode()
52 ? leftToRight ? BSLeft : BSRight 52 ? leftToRight ? BSLeft : BSRight
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