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

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

Issue 1656743002: Removing more implicit LayoutUnit construction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix additional test Created 4 years, 10 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 | « third_party/WebKit/Source/core/paint/BoxBorderPainter.cpp ('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 // 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/FieldsetPainter.h" 5 #include "core/paint/FieldsetPainter.h"
6 6
7 #include "core/layout/LayoutFieldset.h" 7 #include "core/layout/LayoutFieldset.h"
8 #include "core/paint/BoxDecorationData.h" 8 #include "core/paint/BoxDecorationData.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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 if (!legend) 77 if (!legend)
78 return BoxPainter(m_layoutFieldset).paintMask(paintInfo, paintOffset); 78 return BoxPainter(m_layoutFieldset).paintMask(paintInfo, paintOffset);
79 79
80 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.contex t, m_layoutFieldset, paintInfo.phase, paintOffset)) 80 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.contex t, m_layoutFieldset, paintInfo.phase, paintOffset))
81 return; 81 return;
82 82
83 // FIXME: We need to work with "rl" and "bt" block flow directions. In thos e 83 // FIXME: We need to work with "rl" and "bt" block flow directions. In thos e
84 // cases the legend is embedded in the right and bottom borders respectively . 84 // cases the legend is embedded in the right and bottom borders respectively .
85 // https://bugs.webkit.org/show_bug.cgi?id=47236 85 // https://bugs.webkit.org/show_bug.cgi?id=47236
86 if (m_layoutFieldset.style()->isHorizontalWritingMode()) { 86 if (m_layoutFieldset.style()->isHorizontalWritingMode()) {
87 LayoutUnit yOff = (legend->location().y() > 0) ? LayoutUnit() : (legend- >size().height() - m_layoutFieldset.borderTop()) / 2; 87 LayoutUnit yOff = (legend->location().y() > LayoutUnit()) ? LayoutUnit() : (legend->size().height() - m_layoutFieldset.borderTop()) / 2;
88 paintRect.expand(0, -yOff); 88 paintRect.expand(LayoutUnit(), -yOff);
89 paintRect.move(0, yOff); 89 paintRect.move(LayoutUnit(), yOff);
90 } else { 90 } else {
91 LayoutUnit xOff = (legend->location().x() > 0) ? LayoutUnit() : (legend- >size().width() - m_layoutFieldset.borderLeft()) / 2; 91 LayoutUnit xOff = (legend->location().x() > LayoutUnit()) ? LayoutUnit() : (legend->size().width() - m_layoutFieldset.borderLeft()) / 2;
92 paintRect.expand(-xOff, 0); 92 paintRect.expand(-xOff, LayoutUnit());
93 paintRect.move(xOff, 0); 93 paintRect.move(xOff, LayoutUnit());
94 } 94 }
95 95
96 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutFieldset, pa intInfo.phase, paintRect, paintOffset); 96 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutFieldset, pa intInfo.phase, paintRect, paintOffset);
97 BoxPainter(m_layoutFieldset).paintMaskImages(paintInfo, paintRect); 97 BoxPainter(m_layoutFieldset).paintMaskImages(paintInfo, paintRect);
98 } 98 }
99 99
100 } // namespace blink 100 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxBorderPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698