OLD | NEW |
---|---|
1 /* | 1 /* |
2 * This file is part of the render object implementation for KHTML. | 2 * This file is part of the render object implementation for KHTML. |
3 * | 3 * |
4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
5 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 5 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
6 * Copyright (C) 2003 Apple Computer, Inc. | 6 * Copyright (C) 2003 Apple Computer, Inc. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
221 LayoutUnit scrollbarWidth = instrinsicScrollbarLogicalWidth(); | 221 LayoutUnit scrollbarWidth = instrinsicScrollbarLogicalWidth(); |
222 maxLogicalWidth += scrollbarWidth; | 222 maxLogicalWidth += scrollbarWidth; |
223 minLogicalWidth += scrollbarWidth; | 223 minLogicalWidth += scrollbarWidth; |
224 } | 224 } |
225 | 225 |
226 void RenderDeprecatedFlexibleBox::computePreferredLogicalWidths() | 226 void RenderDeprecatedFlexibleBox::computePreferredLogicalWidths() |
227 { | 227 { |
228 ASSERT(preferredLogicalWidthsDirty()); | 228 ASSERT(preferredLogicalWidthsDirty()); |
229 | 229 |
230 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0; | 230 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0; |
231 if (style()->width().isFixed() && style()->width().value() > 0) | 231 RenderStyle* styleToUse = style(); |
tkent
2014/04/16 14:11:24
I prefer
RenderStyle& style = *this->style();
harpreet.sk
2014/04/16 14:26:52
RenderStyle* styleToUse = style();
is already bein
tkent
2014/04/17 02:12:01
ok, consistency is important.
| |
232 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentB oxLogicalWidthForBoxSizing(style()->width().value()); | 232 |
233 if (styleToUse->width().isFixed() && styleToUse->width().value() > 0) | |
234 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentB oxLogicalWidthForBoxSizing(styleToUse->width().value()); | |
233 else | 235 else |
234 computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferred LogicalWidth); | 236 computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferred LogicalWidth); |
235 | 237 |
236 if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) { | 238 if (styleToUse->minWidth().isFixed() && styleToUse->minWidth().value() > 0) { |
237 m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustConte ntBoxLogicalWidthForBoxSizing(style()->minWidth().value())); | 239 m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustConte ntBoxLogicalWidthForBoxSizing(styleToUse->minWidth().value())); |
238 m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustConte ntBoxLogicalWidthForBoxSizing(style()->minWidth().value())); | 240 m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustConte ntBoxLogicalWidthForBoxSizing(styleToUse->minWidth().value())); |
239 } | 241 } |
240 | 242 |
241 if (style()->maxWidth().isFixed()) { | 243 if (styleToUse->maxWidth().isFixed()) { |
242 m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustConte ntBoxLogicalWidthForBoxSizing(style()->maxWidth().value())); | 244 m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustConte ntBoxLogicalWidthForBoxSizing(styleToUse->maxWidth().value())); |
243 m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustConte ntBoxLogicalWidthForBoxSizing(style()->maxWidth().value())); | 245 m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustConte ntBoxLogicalWidthForBoxSizing(styleToUse->maxWidth().value())); |
244 } | 246 } |
245 | 247 |
246 LayoutUnit borderAndPadding = borderAndPaddingLogicalWidth(); | 248 LayoutUnit borderAndPadding = borderAndPaddingLogicalWidth(); |
247 m_minPreferredLogicalWidth += borderAndPadding; | 249 m_minPreferredLogicalWidth += borderAndPadding; |
248 m_maxPreferredLogicalWidth += borderAndPadding; | 250 m_maxPreferredLogicalWidth += borderAndPadding; |
249 | 251 |
250 clearPreferredLogicalWidthsDirty(); | 252 clearPreferredLogicalWidthsDirty(); |
251 } | 253 } |
252 | 254 |
253 void RenderDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren) | 255 void RenderDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren) |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1076 if (isPseudoElement()) | 1078 if (isPseudoElement()) |
1077 return "RenderDeprecatedFlexibleBox (generated)"; | 1079 return "RenderDeprecatedFlexibleBox (generated)"; |
1078 if (isAnonymous()) | 1080 if (isAnonymous()) |
1079 return "RenderDeprecatedFlexibleBox (generated)"; | 1081 return "RenderDeprecatedFlexibleBox (generated)"; |
1080 if (isRelPositioned()) | 1082 if (isRelPositioned()) |
1081 return "RenderDeprecatedFlexibleBox (relative positioned)"; | 1083 return "RenderDeprecatedFlexibleBox (relative positioned)"; |
1082 return "RenderDeprecatedFlexibleBox"; | 1084 return "RenderDeprecatedFlexibleBox"; |
1083 } | 1085 } |
1084 | 1086 |
1085 } // namespace WebCore | 1087 } // namespace WebCore |
OLD | NEW |