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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 PositionWithAffinity RenderFileUploadControl::positionForPoint(const LayoutPoint
&) | 199 PositionWithAffinity RenderFileUploadControl::positionForPoint(const LayoutPoint
&) |
200 { | 200 { |
201 return PositionWithAffinity(); | 201 return PositionWithAffinity(); |
202 } | 202 } |
203 | 203 |
204 HTMLInputElement* RenderFileUploadControl::uploadButton() const | 204 HTMLInputElement* RenderFileUploadControl::uploadButton() const |
205 { | 205 { |
206 // FIXME: This should be on HTMLInputElement as an API like innerButtonEleme
nt(). | 206 // FIXME: This should be on HTMLInputElement as an API like innerButtonEleme
nt(). |
207 HTMLInputElement* input = toHTMLInputElement(node()); | 207 HTMLInputElement* input = toHTMLInputElement(node()); |
208 Node* buttonNode = input->userAgentShadowRoot()->firstChild(); | 208 Node* buttonNode = input->userAgentShadowRoot()->firstChild(); |
209 return buttonNode && buttonNode->isHTMLElement() && buttonNode->hasTagName(i
nputTag) ? toHTMLInputElement(buttonNode) : 0; | 209 return isHTMLInputElement(buttonNode) ? toHTMLInputElement(buttonNode) : 0; |
210 } | 210 } |
211 | 211 |
212 String RenderFileUploadControl::buttonValue() | 212 String RenderFileUploadControl::buttonValue() |
213 { | 213 { |
214 if (HTMLInputElement* button = uploadButton()) | 214 if (HTMLInputElement* button = uploadButton()) |
215 return button->value(); | 215 return button->value(); |
216 | 216 |
217 return String(); | 217 return String(); |
218 } | 218 } |
219 | 219 |
220 String RenderFileUploadControl::fileTextValue() const | 220 String RenderFileUploadControl::fileTextValue() const |
221 { | 221 { |
222 HTMLInputElement* input = toHTMLInputElement(node()); | 222 HTMLInputElement* input = toHTMLInputElement(node()); |
223 ASSERT(input->files()); | 223 ASSERT(input->files()); |
224 return RenderTheme::theme().fileListNameForWidth(input->locale(), input->fil
es(), style()->font(), maxFilenameWidth()); | 224 return RenderTheme::theme().fileListNameForWidth(input->locale(), input->fil
es(), style()->font(), maxFilenameWidth()); |
225 } | 225 } |
226 | 226 |
227 } // namespace WebCore | 227 } // namespace WebCore |
OLD | NEW |