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

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

Issue 1583083003: Fieldset uses marginLeft for marginRight by mistake (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modify test case's some parts commented by esprehn Created 4 years, 11 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/LayoutTests/fast/forms/fieldset/legend-margin-with-float-expected.txt ('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 /* 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 28 matching lines...) Expand all
39 { 39 {
40 } 40 }
41 41
42 void LayoutFieldset::computePreferredLogicalWidths() 42 void LayoutFieldset::computePreferredLogicalWidths()
43 { 43 {
44 LayoutBlockFlow::computePreferredLogicalWidths(); 44 LayoutBlockFlow::computePreferredLogicalWidths();
45 if (LayoutBox* legend = findInFlowLegend()) { 45 if (LayoutBox* legend = findInFlowLegend()) {
46 int legendMinWidth = legend->minPreferredLogicalWidth(); 46 int legendMinWidth = legend->minPreferredLogicalWidth();
47 47
48 Length legendMarginLeft = legend->style()->marginLeft(); 48 Length legendMarginLeft = legend->style()->marginLeft();
49 Length legendMarginRight = legend->style()->marginLeft(); 49 Length legendMarginRight = legend->style()->marginRight();
50 50
51 if (legendMarginLeft.isFixed()) 51 if (legendMarginLeft.isFixed())
52 legendMinWidth += legendMarginLeft.value(); 52 legendMinWidth += legendMarginLeft.value();
53 53
54 if (legendMarginRight.isFixed()) 54 if (legendMarginRight.isFixed())
55 legendMinWidth += legendMarginRight.value(); 55 legendMinWidth += legendMarginRight.value();
56 56
57 m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, legendMinWi dth + borderAndPaddingWidth()); 57 m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, legendMinWi dth + borderAndPaddingWidth());
58 } 58 }
59 } 59 }
(...skipping 87 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/fieldset/legend-margin-with-float-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698