Index: Source/core/rendering/RenderFileUploadControl.cpp |
diff --git a/Source/core/rendering/RenderFileUploadControl.cpp b/Source/core/rendering/RenderFileUploadControl.cpp |
index de9bfba1d8dddbb3d284571ebb896e37adb7a592..9d3ae472adf710c5b218e29e9f247dac853ef0d0 100644 |
--- a/Source/core/rendering/RenderFileUploadControl.cpp |
+++ b/Source/core/rendering/RenderFileUploadControl.cpp |
@@ -173,20 +173,21 @@ void RenderFileUploadControl::computePreferredLogicalWidths() |
m_minPreferredLogicalWidth = 0; |
m_maxPreferredLogicalWidth = 0; |
+ RenderStyle* styleToUse = style(); |
- if (style()->width().isFixed() && style()->width().value() > 0) |
- m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style()->width().value()); |
+ 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())); |
} |
int toAdd = borderAndPaddingWidth(); |