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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutFieldset.cpp

Issue 1647313003: Continue converting to explicit LayoutUnit constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@explicitContstructors
Patch Set: Add TODO 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
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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 break; 94 break;
95 } 95 }
96 default: 96 default:
97 logicalLeft = logicalWidth() - borderStart() - paddingStart() - marginStartForChild(*legend) - logicalWidthForChild(*legend); 97 logicalLeft = logicalWidth() - borderStart() - paddingStart() - marginStartForChild(*legend) - logicalWidthForChild(*legend);
98 break; 98 break;
99 } 99 }
100 } 100 }
101 101
102 setLogicalLeftForChild(*legend, logicalLeft); 102 setLogicalLeftForChild(*legend, logicalLeft);
103 103
104 LayoutUnit fieldsetBorderBefore = borderBefore(); 104 LayoutUnit fieldsetBorderBefore = LayoutUnit(borderBefore());
105 LayoutUnit legendLogicalHeight = logicalHeightForChild(*legend); 105 LayoutUnit legendLogicalHeight = logicalHeightForChild(*legend);
106 106
107 LayoutUnit legendLogicalTop; 107 LayoutUnit legendLogicalTop;
108 LayoutUnit collapsedLegendExtent; 108 LayoutUnit collapsedLegendExtent;
109 // FIXME: We need to account for the legend's margin before too. 109 // FIXME: We need to account for the legend's margin before too.
110 if (fieldsetBorderBefore > legendLogicalHeight) { 110 if (fieldsetBorderBefore > legendLogicalHeight) {
111 // The <legend> is smaller than the associated fieldset before borde r 111 // The <legend> is smaller than the associated fieldset before borde r
112 // so the latter determines positioning of the <legend>. The sizing depends 112 // so the latter determines positioning of the <legend>. The sizing depends
113 // on the legend's margins as we want to still follow the author's c ues. 113 // on the legend's margins as we want to still follow the author's c ues.
114 // Firefox completely ignores the margins in this case which seems w rong. 114 // Firefox completely ignores the margins in this case which seems w rong.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 { 147 {
148 FieldsetPainter(*this).paintBoxDecorationBackground(paintInfo, paintOffset); 148 FieldsetPainter(*this).paintBoxDecorationBackground(paintInfo, paintOffset);
149 } 149 }
150 150
151 void LayoutFieldset::paintMask(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) const 151 void LayoutFieldset::paintMask(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) const
152 { 152 {
153 FieldsetPainter(*this).paintMask(paintInfo, paintOffset); 153 FieldsetPainter(*this).paintMask(paintInfo, paintOffset);
154 } 154 }
155 155
156 } // namespace blink 156 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698