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

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

Issue 267713006: node.cloneNode() should clone the value of file upload elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated review comments Created 6 years, 7 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
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | Source/core/html/forms/FileInputType.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 } 902 }
903 903
904 void HTMLInputElement::copyNonAttributePropertiesFromElement(const Element& sour ce) 904 void HTMLInputElement::copyNonAttributePropertiesFromElement(const Element& sour ce)
905 { 905 {
906 const HTMLInputElement& sourceElement = static_cast<const HTMLInputElement&> (source); 906 const HTMLInputElement& sourceElement = static_cast<const HTMLInputElement&> (source);
907 907
908 m_valueIfDirty = sourceElement.m_valueIfDirty; 908 m_valueIfDirty = sourceElement.m_valueIfDirty;
909 setChecked(sourceElement.m_isChecked); 909 setChecked(sourceElement.m_isChecked);
910 m_reflectsCheckedAttribute = sourceElement.m_reflectsCheckedAttribute; 910 m_reflectsCheckedAttribute = sourceElement.m_reflectsCheckedAttribute;
911 m_isIndeterminate = sourceElement.m_isIndeterminate; 911 m_isIndeterminate = sourceElement.m_isIndeterminate;
912 m_inputType->copyNonAttributeProperties(sourceElement);
912 913
913 HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source); 914 HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source);
914 915
915 m_needsToUpdateViewValue = true; 916 m_needsToUpdateViewValue = true;
916 m_inputTypeView->updateView(); 917 m_inputTypeView->updateView();
917 } 918 }
918 919
919 String HTMLInputElement::value() const 920 String HTMLInputElement::value() const
920 { 921 {
921 String value; 922 String value;
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 exceptionState.throwDOMException(IndexSizeError, "The value provided is 0, which is an invalid size."); 1313 exceptionState.throwDOMException(IndexSizeError, "The value provided is 0, which is an invalid size.");
1313 else 1314 else
1314 setSize(size); 1315 setSize(size);
1315 } 1316 }
1316 1317
1317 KURL HTMLInputElement::src() const 1318 KURL HTMLInputElement::src() const
1318 { 1319 {
1319 return document().completeURL(fastGetAttribute(srcAttr)); 1320 return document().completeURL(fastGetAttribute(srcAttr));
1320 } 1321 }
1321 1322
1322 FileList* HTMLInputElement::files() 1323 FileList* HTMLInputElement::files() const
1323 { 1324 {
1324 return m_inputType->files(); 1325 return m_inputType->files();
1325 } 1326 }
1326 1327
1327 void HTMLInputElement::setFiles(PassRefPtrWillBeRawPtr<FileList> files) 1328 void HTMLInputElement::setFiles(PassRefPtrWillBeRawPtr<FileList> files)
1328 { 1329 {
1329 m_inputType->setFiles(files); 1330 m_inputType->setFiles(files);
1330 } 1331 }
1331 1332
1332 bool HTMLInputElement::receiveDroppedFiles(const DragData* dragData) 1333 bool HTMLInputElement::receiveDroppedFiles(const DragData* dragData)
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 } 1877 }
1877 1878
1878 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 1879 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
1879 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() 1880 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer()
1880 { 1881 {
1881 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); 1882 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer());
1882 } 1883 }
1883 #endif 1884 #endif
1884 1885
1885 } // namespace 1886 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | Source/core/html/forms/FileInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698