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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 LayoutUnit legendLogicalTop; 110 LayoutUnit legendLogicalTop;
111 LayoutUnit collapsedLegendExtent; 111 LayoutUnit collapsedLegendExtent;
112 // FIXME: We need to account for the legend's margin before too. 112 // FIXME: We need to account for the legend's margin before too.
113 if (fieldsetBorderBefore > legendLogicalHeight) { 113 if (fieldsetBorderBefore > legendLogicalHeight) {
114 // The <legend> is smaller than the associated fieldset before border 114 // The <legend> is smaller than the associated fieldset before border
115 // so the latter determines positioning of the <legend>. The sizing 115 // so the latter determines positioning of the <legend>. The sizing
116 // depends 116 // depends
117 // on the legend's margins as we want to still follow the author's cues. 117 // on the legend's margins as we want to still follow the author's cues.
118 // Firefox completely ignores the margins in this case which seems wrong. 118 // Firefox completely ignores the margins in this case which seems wrong.
119 legendLogicalTop = (fieldsetBorderBefore - legendLogicalHeight) / 2; 119 legendLogicalTop = (fieldsetBorderBefore - legendLogicalHeight) / 2;
120 collapsedLegendExtent = max<LayoutUnit>( 120 collapsedLegendExtent =
121 fieldsetBorderBefore, legendLogicalTop + legendLogicalHeight + 121 max<LayoutUnit>(fieldsetBorderBefore,
122 marginAfterForChild(*legend)); 122 legendLogicalTop + legendLogicalHeight +
123 marginAfterForChild(*legend));
123 } else { 124 } else {
124 collapsedLegendExtent = 125 collapsedLegendExtent =
125 legendLogicalHeight + marginAfterForChild(*legend); 126 legendLogicalHeight + marginAfterForChild(*legend);
126 } 127 }
127 128
128 setLogicalTopForChild(*legend, legendLogicalTop); 129 setLogicalTopForChild(*legend, legendLogicalTop);
129 setLogicalHeight(paddingBefore() + collapsedLegendExtent); 130 setLogicalHeight(paddingBefore() + collapsedLegendExtent);
130 131
131 if (legend->frameRect() != oldLegendFrameRect) { 132 if (legend->frameRect() != oldLegendFrameRect) {
132 // We need to invalidate the fieldset border if the legend's frame 133 // We need to invalidate the fieldset border if the legend's frame
(...skipping 21 matching lines...) Expand all
154 const LayoutPoint& paintOffset) const { 155 const LayoutPoint& paintOffset) const {
155 FieldsetPainter(*this).paintBoxDecorationBackground(paintInfo, paintOffset); 156 FieldsetPainter(*this).paintBoxDecorationBackground(paintInfo, paintOffset);
156 } 157 }
157 158
158 void LayoutFieldset::paintMask(const PaintInfo& paintInfo, 159 void LayoutFieldset::paintMask(const PaintInfo& paintInfo,
159 const LayoutPoint& paintOffset) const { 160 const LayoutPoint& paintOffset) const {
160 FieldsetPainter(*this).paintMask(paintInfo, paintOffset); 161 FieldsetPainter(*this).paintMask(paintInfo, paintOffset);
161 } 162 }
162 163
163 } // namespace blink 164 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698