Index: Source/core/layout/LayoutFileUploadControl.cpp |
diff --git a/Source/core/layout/LayoutFileUploadControl.cpp b/Source/core/layout/LayoutFileUploadControl.cpp |
index 404fe6364dda3e9895bd9ad2d81c7ccedba1c90e..a40ba4074f7584d99bbe2ff25094184f07b407a0 100644 |
--- a/Source/core/layout/LayoutFileUploadControl.cpp |
+++ b/Source/core/layout/LayoutFileUploadControl.cpp |
@@ -101,7 +101,7 @@ void LayoutFileUploadControl::computeIntrinsicLogicalWidths(LayoutUnit& minLogic |
const String label = toHTMLInputElement(node())->locale().queryString(WebLocalizedString::FileButtonNoFileSelectedLabel); |
float defaultLabelWidth = font.width(constructTextRun(renderer, font, label, styleRef(), TextRun::AllowTrailingExpansion)); |
if (HTMLInputElement* button = uploadButton()) { |
- if (LayoutObject* buttonRenderer = button->renderer()) |
+ if (LayoutObject* buttonRenderer = button->layoutObject()) |
defaultLabelWidth += buttonRenderer->maxPreferredLogicalWidth() + afterButtonSpacing; |
} |
maxLogicalWidth = static_cast<int>(ceilf(std::max(minDefaultLabelWidth, defaultLabelWidth))); |