| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |