OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 if (RenderButton* buttonRenderer = toRenderButton(button->renderer())) | 142 if (RenderButton* buttonRenderer = toRenderButton(button->renderer())) |
143 textY = paintOffset.y() + borderTop() + paddingTop() + buttonRendere
r->baselinePosition(AlphabeticBaseline, true, HorizontalLine, PositionOnContaini
ngLine); | 143 textY = paintOffset.y() + borderTop() + paddingTop() + buttonRendere
r->baselinePosition(AlphabeticBaseline, true, HorizontalLine, PositionOnContaini
ngLine); |
144 else | 144 else |
145 textY = baselinePosition(AlphabeticBaseline, true, HorizontalLine, P
ositionOnContainingLine); | 145 textY = baselinePosition(AlphabeticBaseline, true, HorizontalLine, P
ositionOnContainingLine); |
146 TextRunPaintInfo textRunPaintInfo(textRun); | 146 TextRunPaintInfo textRunPaintInfo(textRun); |
147 textRunPaintInfo.bounds = FloatRect(textX, | 147 textRunPaintInfo.bounds = FloatRect(textX, |
148 textY - style()->fontMetrics().ascen
t(), | 148 textY - style()->fontMetrics().ascen
t(), |
149 textWidth, | 149 textWidth, |
150 style()->fontMetrics().height()); | 150 style()->fontMetrics().height()); |
151 | 151 |
152 paintInfo.context->setFillColor(style()->visitedDependentColor(CSSProper
tyColor)); | 152 paintInfo.context->setFillColor(resolveColor(CSSPropertyColor)); |
153 | 153 |
154 // Draw the filename | 154 // Draw the filename |
155 paintInfo.context->drawBidiText(font, textRunPaintInfo, IntPoint(roundTo
Int(textX), roundToInt(textY))); | 155 paintInfo.context->drawBidiText(font, textRunPaintInfo, IntPoint(roundTo
Int(textX), roundToInt(textY))); |
156 | 156 |
157 if (input->icon()) { | 157 if (input->icon()) { |
158 // Determine where the icon should be placed | 158 // Determine where the icon should be placed |
159 LayoutUnit iconY = paintOffset.y() + borderTop() + paddingTop() + (c
ontentHeight() - iconHeight) / 2; | 159 LayoutUnit iconY = paintOffset.y() + borderTop() + paddingTop() + (c
ontentHeight() - iconHeight) / 2; |
160 LayoutUnit iconX; | 160 LayoutUnit iconX; |
161 if (style()->isLeftToRightDirection()) | 161 if (style()->isLeftToRightDirection()) |
162 iconX = contentLeft + buttonWidth + afterButtonSpacing; | 162 iconX = contentLeft + buttonWidth + afterButtonSpacing; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 } | 247 } |
248 | 248 |
249 String RenderFileUploadControl::fileTextValue() const | 249 String RenderFileUploadControl::fileTextValue() const |
250 { | 250 { |
251 HTMLInputElement* input = toHTMLInputElement(node()); | 251 HTMLInputElement* input = toHTMLInputElement(node()); |
252 ASSERT(input->files()); | 252 ASSERT(input->files()); |
253 return theme()->fileListNameForWidth(input->files(), style()->font(), maxFil
enameWidth(), input->multiple()); | 253 return theme()->fileListNameForWidth(input->files(), style()->font(), maxFil
enameWidth(), input->multiple()); |
254 } | 254 } |
255 | 255 |
256 } // namespace WebCore | 256 } // namespace WebCore |
OLD | NEW |