Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: Source/core/html/FileInputType.cpp

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/ColorInputType.cpp ('k') | Source/core/html/HTMLAnchorElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/html/ColorInputType.cpp ('k') | Source/core/html/HTMLAnchorElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698