| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 if (legendMarginLeft.isFixed()) | 55 if (legendMarginLeft.isFixed()) |
| 56 legendMinWidth += legendMarginLeft.value(); | 56 legendMinWidth += legendMarginLeft.value(); |
| 57 | 57 |
| 58 if (legendMarginRight.isFixed()) | 58 if (legendMarginRight.isFixed()) |
| 59 legendMinWidth += legendMarginRight.value(); | 59 legendMinWidth += legendMarginRight.value(); |
| 60 | 60 |
| 61 m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, legendMinWi
dth + borderAndPaddingWidth()); | 61 m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, legendMinWi
dth + borderAndPaddingWidth()); |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 | 64 |
| 65 RenderObject* RenderFieldset::layoutSpecialExcludedChild(bool relayoutChildren,
SubtreeLayoutScope&) | 65 LayoutObject* RenderFieldset::layoutSpecialExcludedChild(bool relayoutChildren,
SubtreeLayoutScope&) |
| 66 { | 66 { |
| 67 RenderBox* legend = findLegend(); | 67 RenderBox* legend = findLegend(); |
| 68 if (legend) { | 68 if (legend) { |
| 69 if (relayoutChildren) | 69 if (relayoutChildren) |
| 70 legend->setNeedsLayoutAndFullPaintInvalidation(); | 70 legend->setNeedsLayoutAndFullPaintInvalidation(); |
| 71 legend->layoutIfNeeded(); | 71 legend->layoutIfNeeded(); |
| 72 | 72 |
| 73 LayoutUnit logicalLeft; | 73 LayoutUnit logicalLeft; |
| 74 if (style()->isLeftToRightDirection()) { | 74 if (style()->isLeftToRightDirection()) { |
| 75 switch (legend->style()->textAlign()) { | 75 switch (legend->style()->textAlign()) { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 } | 121 } |
| 122 | 122 |
| 123 setLogicalTopForChild(*legend, legendLogicalTop); | 123 setLogicalTopForChild(*legend, legendLogicalTop); |
| 124 setLogicalHeight(paddingBefore() + collapsedLegendExtent); | 124 setLogicalHeight(paddingBefore() + collapsedLegendExtent); |
| 125 } | 125 } |
| 126 return legend; | 126 return legend; |
| 127 } | 127 } |
| 128 | 128 |
| 129 RenderBox* RenderFieldset::findLegend(FindLegendOption option) const | 129 RenderBox* RenderFieldset::findLegend(FindLegendOption option) const |
| 130 { | 130 { |
| 131 for (RenderObject* legend = firstChild(); legend; legend = legend->nextSibli
ng()) { | 131 for (LayoutObject* legend = firstChild(); legend; legend = legend->nextSibli
ng()) { |
| 132 if (option == IgnoreFloatingOrOutOfFlow && legend->isFloatingOrOutOfFlow
Positioned()) | 132 if (option == IgnoreFloatingOrOutOfFlow && legend->isFloatingOrOutOfFlow
Positioned()) |
| 133 continue; | 133 continue; |
| 134 | 134 |
| 135 if (isHTMLLegendElement(legend->node())) | 135 if (isHTMLLegendElement(legend->node())) |
| 136 return toRenderBox(legend); | 136 return toRenderBox(legend); |
| 137 } | 137 } |
| 138 return 0; | 138 return 0; |
| 139 } | 139 } |
| 140 | 140 |
| 141 void RenderFieldset::paintBoxDecorationBackground(const PaintInfo& paintInfo, co
nst LayoutPoint& paintOffset) | 141 void RenderFieldset::paintBoxDecorationBackground(const PaintInfo& paintInfo, co
nst LayoutPoint& paintOffset) |
| 142 { | 142 { |
| 143 FieldsetPainter(*this).paintBoxDecorationBackground(paintInfo, paintOffset); | 143 FieldsetPainter(*this).paintBoxDecorationBackground(paintInfo, paintOffset); |
| 144 } | 144 } |
| 145 | 145 |
| 146 void RenderFieldset::paintMask(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) | 146 void RenderFieldset::paintMask(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) |
| 147 { | 147 { |
| 148 FieldsetPainter(*this).paintMask(paintInfo, paintOffset); | 148 FieldsetPainter(*this).paintMask(paintInfo, paintOffset); |
| 149 } | 149 } |
| 150 | 150 |
| 151 } // namespace blink | 151 } // namespace blink |
| OLD | NEW |