Chromium Code Reviews| Index: Source/core/rendering/RenderDeprecatedFlexibleBox.cpp |
| diff --git a/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp b/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp |
| index 1b9e8a500c0965f149b4fe9bdba7ad0692b39878..dabbbf6fef7f999bca779d40b5848542ef130536 100644 |
| --- a/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp |
| +++ b/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp |
| @@ -228,19 +228,21 @@ void RenderDeprecatedFlexibleBox::computePreferredLogicalWidths() |
| ASSERT(preferredLogicalWidthsDirty()); |
| m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0; |
| - if (style()->width().isFixed() && style()->width().value() > 0) |
| - m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style()->width().value()); |
| + 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.
|
| + |
| + if (styleToUse->width().isFixed() && styleToUse->width().value() > 0) |
| + m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(styleToUse->width().value()); |
| else |
| computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth); |
| - if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) { |
| - m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value())); |
| - m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value())); |
| + if (styleToUse->minWidth().isFixed() && styleToUse->minWidth().value() > 0) { |
| + m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->minWidth().value())); |
| + m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->minWidth().value())); |
| } |
| - if (style()->maxWidth().isFixed()) { |
| - m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value())); |
| - m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value())); |
| + if (styleToUse->maxWidth().isFixed()) { |
| + m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->maxWidth().value())); |
| + m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->maxWidth().value())); |
| } |
| LayoutUnit borderAndPadding = borderAndPaddingLogicalWidth(); |