| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 } | 249 } |
| 250 | 250 |
| 251 bool FileInputType::isFileUpload() const | 251 bool FileInputType::isFileUpload() const |
| 252 { | 252 { |
| 253 return true; | 253 return true; |
| 254 } | 254 } |
| 255 | 255 |
| 256 void FileInputType::createShadowSubtree() | 256 void FileInputType::createShadowSubtree() |
| 257 { | 257 { |
| 258 ASSERT(element()->shadow()); | 258 ASSERT(element()->shadow()); |
| 259 RefPtr<HTMLInputElement> button = HTMLInputElement::create(inputTag, &elemen
t()->document(), 0, false); | 259 RefPtr<HTMLInputElement> button = HTMLInputElement::create(inputTag, element
()->document(), 0, false); |
| 260 button->setType(InputTypeNames::button()); | 260 button->setType(InputTypeNames::button()); |
| 261 button->setAttribute(valueAttr, element()->multiple() ? fileButtonChooseMult
ipleFilesLabel() : fileButtonChooseFileLabel()); | 261 button->setAttribute(valueAttr, element()->multiple() ? fileButtonChooseMult
ipleFilesLabel() : fileButtonChooseFileLabel()); |
| 262 button->setPart(AtomicString("-webkit-file-upload-button", AtomicString::Con
structFromLiteral)); | 262 button->setPart(AtomicString("-webkit-file-upload-button", AtomicString::Con
structFromLiteral)); |
| 263 element()->userAgentShadowRoot()->appendChild(button.release()); | 263 element()->userAgentShadowRoot()->appendChild(button.release()); |
| 264 } | 264 } |
| 265 | 265 |
| 266 void FileInputType::disabledAttributeChanged() | 266 void FileInputType::disabledAttributeChanged() |
| 267 { | 267 { |
| 268 ASSERT(element()->shadow()); | 268 ASSERT(element()->shadow()); |
| 269 if (Element* button = toElement(element()->userAgentShadowRoot()->firstChild
())) | 269 if (Element* button = toElement(element()->userAgentShadowRoot()->firstChild
())) |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 StringBuilder names; | 383 StringBuilder names; |
| 384 for (size_t i = 0; i < listSize; ++i) { | 384 for (size_t i = 0; i < listSize; ++i) { |
| 385 names.append(fileList->item(i)->name()); | 385 names.append(fileList->item(i)->name()); |
| 386 if (i != listSize - 1) | 386 if (i != listSize - 1) |
| 387 names.append('\n'); | 387 names.append('\n'); |
| 388 } | 388 } |
| 389 return names.toString(); | 389 return names.toString(); |
| 390 } | 390 } |
| 391 | 391 |
| 392 } // namespace WebCore | 392 } // namespace WebCore |
| OLD | NEW |