| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 textWidth, | 136 textWidth, |
| 137 style()->fontMetrics().height()); | 137 style()->fontMetrics().height()); |
| 138 | 138 |
| 139 paintInfo.context->setFillColor(resolveColor(CSSPropertyColor)); | 139 paintInfo.context->setFillColor(resolveColor(CSSPropertyColor)); |
| 140 | 140 |
| 141 // Draw the filename | 141 // Draw the filename |
| 142 paintInfo.context->drawBidiText(font, textRunPaintInfo, IntPoint(roundTo
Int(textX), roundToInt(textY))); | 142 paintInfo.context->drawBidiText(font, textRunPaintInfo, IntPoint(roundTo
Int(textX), roundToInt(textY))); |
| 143 } | 143 } |
| 144 | 144 |
| 145 // Paint the children. | 145 // Paint the children. |
| 146 RenderBlock::paintObject(paintInfo, paintOffset); | 146 RenderBlockFlow::paintObject(paintInfo, paintOffset); |
| 147 } | 147 } |
| 148 | 148 |
| 149 void RenderFileUploadControl::computeIntrinsicLogicalWidths(LayoutUnit& minLogic
alWidth, LayoutUnit& maxLogicalWidth) const | 149 void RenderFileUploadControl::computeIntrinsicLogicalWidths(LayoutUnit& minLogic
alWidth, LayoutUnit& maxLogicalWidth) const |
| 150 { | 150 { |
| 151 // Figure out how big the filename space needs to be for a given number of c
haracters | 151 // Figure out how big the filename space needs to be for a given number of c
haracters |
| 152 // (using "0" as the nominal character). | 152 // (using "0" as the nominal character). |
| 153 const UChar character = '0'; | 153 const UChar character = '0'; |
| 154 const String characterAsString = String(&character, 1); | 154 const String characterAsString = String(&character, 1); |
| 155 const Font& font = style()->font(); | 155 const Font& font = style()->font(); |
| 156 // FIXME: Remove the need for this const_cast by making constructTextRun tak
e a const RenderObject*. | 156 // FIXME: Remove the need for this const_cast by making constructTextRun tak
e a const RenderObject*. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 } | 219 } |
| 220 | 220 |
| 221 String RenderFileUploadControl::fileTextValue() const | 221 String RenderFileUploadControl::fileTextValue() const |
| 222 { | 222 { |
| 223 HTMLInputElement* input = toHTMLInputElement(node()); | 223 HTMLInputElement* input = toHTMLInputElement(node()); |
| 224 ASSERT(input->files()); | 224 ASSERT(input->files()); |
| 225 return RenderTheme::theme().fileListNameForWidth(input->locale(), input->fil
es(), style()->font(), maxFilenameWidth()); | 225 return RenderTheme::theme().fileListNameForWidth(input->locale(), input->fil
es(), style()->font(), maxFilenameWidth()); |
| 226 } | 226 } |
| 227 | 227 |
| 228 } // namespace WebCore | 228 } // namespace WebCore |
| OLD | NEW |