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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 RenderFileUploadControl::RenderFileUploadControl(HTMLInputElement* input) | 48 RenderFileUploadControl::RenderFileUploadControl(HTMLInputElement* input) |
49 : RenderBlockFlow(input) | 49 : RenderBlockFlow(input) |
50 , m_canReceiveDroppedFiles(input->canReceiveDroppedFiles()) | 50 , m_canReceiveDroppedFiles(input->canReceiveDroppedFiles()) |
51 { | 51 { |
52 } | 52 } |
53 | 53 |
54 RenderFileUploadControl::~RenderFileUploadControl() | 54 RenderFileUploadControl::~RenderFileUploadControl() |
55 { | 55 { |
56 } | 56 } |
57 | 57 |
58 bool RenderFileUploadControl::canBeReplacedWithInlineRunIn() const | |
59 { | |
60 return false; | |
61 } | |
62 | |
63 void RenderFileUploadControl::updateFromElement() | 58 void RenderFileUploadControl::updateFromElement() |
64 { | 59 { |
65 HTMLInputElement* input = toHTMLInputElement(node()); | 60 HTMLInputElement* input = toHTMLInputElement(node()); |
66 ASSERT(input->isFileUpload()); | 61 ASSERT(input->isFileUpload()); |
67 | 62 |
68 if (HTMLInputElement* button = uploadButton()) { | 63 if (HTMLInputElement* button = uploadButton()) { |
69 bool newCanReceiveDroppedFilesState = input->canReceiveDroppedFiles(); | 64 bool newCanReceiveDroppedFilesState = input->canReceiveDroppedFiles(); |
70 if (m_canReceiveDroppedFiles != newCanReceiveDroppedFilesState) { | 65 if (m_canReceiveDroppedFiles != newCanReceiveDroppedFilesState) { |
71 m_canReceiveDroppedFiles = newCanReceiveDroppedFilesState; | 66 m_canReceiveDroppedFiles = newCanReceiveDroppedFilesState; |
72 button->setActive(newCanReceiveDroppedFilesState); | 67 button->setActive(newCanReceiveDroppedFilesState); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 } | 219 } |
225 | 220 |
226 String RenderFileUploadControl::fileTextValue() const | 221 String RenderFileUploadControl::fileTextValue() const |
227 { | 222 { |
228 HTMLInputElement* input = toHTMLInputElement(node()); | 223 HTMLInputElement* input = toHTMLInputElement(node()); |
229 ASSERT(input->files()); | 224 ASSERT(input->files()); |
230 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()); |
231 } | 226 } |
232 | 227 |
233 } // namespace WebCore | 228 } // namespace WebCore |
OLD | NEW |