| Index: Source/core/rendering/RenderFileUploadControl.cpp
|
| diff --git a/Source/core/rendering/RenderFileUploadControl.cpp b/Source/core/rendering/RenderFileUploadControl.cpp
|
| index 437ced3d7d14b6ff4883bb7175a4fa0b7c732a42..4ef6872ff49fcef48e07980f698b6c97f49fbcb7 100644
|
| --- a/Source/core/rendering/RenderFileUploadControl.cpp
|
| +++ b/Source/core/rendering/RenderFileUploadControl.cpp
|
| @@ -131,11 +131,12 @@ void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, const LayoutPoin
|
| LayoutUnit buttonWidth = nodeWidth(button);
|
| LayoutUnit buttonAndIconWidth = buttonWidth + afterButtonSpacing
|
| + (input->icon() ? iconWidth + iconFilenameSpacing : 0);
|
| + float textWidth = font.width(textRun);
|
| LayoutUnit textX;
|
| if (style()->isLeftToRightDirection())
|
| textX = contentLeft + buttonAndIconWidth;
|
| else
|
| - textX = contentLeft + contentWidth() - buttonAndIconWidth - font.width(textRun);
|
| + textX = contentLeft + contentWidth() - buttonAndIconWidth - textWidth;
|
|
|
| LayoutUnit textY = 0;
|
| // We want to match the button's baseline
|
| @@ -144,11 +145,13 @@ void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, const LayoutPoin
|
| textY = paintOffset.y() + borderTop() + paddingTop() + buttonRenderer->baselinePosition(AlphabeticBaseline, true, HorizontalLine, PositionOnContainingLine);
|
| else
|
| textY = baselinePosition(AlphabeticBaseline, true, HorizontalLine, PositionOnContainingLine);
|
| + FloatRect textRect(textX, textY - style()->fontMetrics().ascent(),
|
| + textWidth, style()->fontMetrics().height());
|
|
|
| paintInfo.context->setFillColor(style()->visitedDependentColor(CSSPropertyColor), style()->colorSpace());
|
|
|
| // Draw the filename
|
| - paintInfo.context->drawBidiText(font, textRun, IntPoint(roundToInt(textX), roundToInt(textY)));
|
| + paintInfo.context->drawBidiText(font, textRun, IntPoint(roundToInt(textX), roundToInt(textY)), textRect);
|
|
|
| if (input->icon()) {
|
| // Determine where the icon should be placed
|
|
|