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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 RenderFileUploadControl::RenderFileUploadControl(HTMLInputElement* input) | 53 RenderFileUploadControl::RenderFileUploadControl(HTMLInputElement* input) |
54 : RenderBlock(input) | 54 : RenderBlock(input) |
55 , m_canReceiveDroppedFiles(input->canReceiveDroppedFiles()) | 55 , m_canReceiveDroppedFiles(input->canReceiveDroppedFiles()) |
56 { | 56 { |
57 } | 57 } |
58 | 58 |
59 RenderFileUploadControl::~RenderFileUploadControl() | 59 RenderFileUploadControl::~RenderFileUploadControl() |
60 { | 60 { |
61 } | 61 } |
62 | 62 |
| 63 bool RenderFileUploadControl::canBeReplacedWithInlineRunIn() const |
| 64 { |
| 65 return false; |
| 66 } |
| 67 |
63 void RenderFileUploadControl::updateFromElement() | 68 void RenderFileUploadControl::updateFromElement() |
64 { | 69 { |
65 HTMLInputElement* input = static_cast<HTMLInputElement*>(node()); | 70 HTMLInputElement* input = static_cast<HTMLInputElement*>(node()); |
66 ASSERT(input->isFileUpload()); | 71 ASSERT(input->isFileUpload()); |
67 | 72 |
68 if (HTMLInputElement* button = uploadButton()) { | 73 if (HTMLInputElement* button = uploadButton()) { |
69 bool newDisabled = !theme()->isEnabled(this); | 74 bool newDisabled = !theme()->isEnabled(this); |
70 // We should avoid to call HTMLFormControlElement::setDisabled() as | 75 // We should avoid to call HTMLFormControlElement::setDisabled() as |
71 // possible because setAttribute() in setDisabled() can cause style | 76 // possible because setAttribute() in setDisabled() can cause style |
72 // recalculation, and HTMLFormControlElement::recalcStyle() calls | 77 // recalculation, and HTMLFormControlElement::recalcStyle() calls |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 } | 243 } |
239 | 244 |
240 String RenderFileUploadControl::fileTextValue() const | 245 String RenderFileUploadControl::fileTextValue() const |
241 { | 246 { |
242 HTMLInputElement* input = static_cast<HTMLInputElement*>(node()); | 247 HTMLInputElement* input = static_cast<HTMLInputElement*>(node()); |
243 ASSERT(input->files()); | 248 ASSERT(input->files()); |
244 return theme()->fileListNameForWidth(input->files(), style()->font(), maxFil
enameWidth(), input->multiple()); | 249 return theme()->fileListNameForWidth(input->files(), style()->font(), maxFil
enameWidth(), input->multiple()); |
245 } | 250 } |
246 | 251 |
247 } // namespace WebCore | 252 } // namespace WebCore |
OLD | NEW |