Changeset 118993 in webkit
- Timestamp:
- May 30, 2012 4:10:40 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r118991 r118993 1 2012-05-30 Nico Weber <thakis@chromium.org> 2 3 Make the files attribute of HTMLInputElement writable 4 https://bugs.webkit.org/show_bug.cgi?id=87154 5 6 Reviewed by Adam Barth. 7 8 whatwg thread: 9 http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-May/036140.html 10 11 * bindings/objc/PublicDOMInterfaces.h: 12 Remove readonly on files property. 13 * html/FileInputType.cpp: 14 (FileInputType): 15 Add a NULL check to setFiles(). 16 * html/FileInputType.h: 17 (FileInputType): 18 Let setFiles() overwrite the base class's method. 19 * html/HTMLInputElement.cpp: 20 (WebCore::HTMLInputElement::setFiles): 21 Add setFiles() implementation, delegate to input type. 22 * html/HTMLInputElement.h: 23 (HTMLInputElement): 24 * html/HTMLInputElement.idl: 25 * html/InputType.cpp: 26 (WebCore::InputType::setFiles): 27 setFiles() does nothing by default. 28 * html/InputType.h: 29 (InputType): 30 Add a virtual setFiles() method. 31 1 32 2012-05-30 Joe Mason <jmason@rim.com> 2 33 -
trunk/Source/WebCore/bindings/objc/PublicDOMInterfaces.h
r111569 r118993 623 623 @property BOOL multiple AVAILABLE_IN_WEBKIT_VERSION_4_0; 624 624 @property(readonly) BOOL willValidate AVAILABLE_IN_WEBKIT_VERSION_4_0; 625 @property(re adonly, retain) DOMFileList *files AVAILABLE_IN_WEBKIT_VERSION_4_0;625 @property(retain) DOMFileList *files AVAILABLE_IN_WEBKIT_VERSION_4_0; 626 626 - (void)select; 627 627 - (void)click; -
trunk/Source/WebCore/html/FileInputType.cpp
r117995 r118993 321 321 void FileInputType::setFiles(PassRefPtr<FileList> files) 322 322 { 323 if (!files) 324 return; 325 323 326 RefPtr<HTMLInputElement> input = element(); 324 327 -
trunk/Source/WebCore/html/FileInputType.h
r117995 r118993 59 59 virtual bool canChangeFromAnotherType() const OVERRIDE; 60 60 virtual FileList* files() OVERRIDE; 61 virtual void setFiles(PassRefPtr<FileList>) OVERRIDE; 61 62 virtual bool canSetValue(const String&) OVERRIDE; 62 63 virtual bool getTypeSpecificValue(String&) OVERRIDE; // Checked first, before internal storage or the value attribute. … … 75 76 virtual void updateRendering(PassRefPtr<Icon>) OVERRIDE; 76 77 77 void setFiles(PassRefPtr<FileList>);78 78 PassRefPtr<FileList> createFileList(const Vector<FileChooserFileInfo>& files) const; 79 79 #if ENABLE(DIRECTORY_UPLOAD) -
trunk/Source/WebCore/html/HTMLInputElement.cpp
r118963 r118993 1221 1221 } 1222 1222 1223 void HTMLInputElement::setFiles(PassRefPtr<FileList> files) 1224 { 1225 m_inputType->setFiles(files); 1226 } 1227 1223 1228 void HTMLInputElement::receiveDroppedFiles(const Vector<String>& filenames) 1224 1229 { -
trunk/Source/WebCore/html/HTMLInputElement.h
r118963 r118993 212 212 213 213 FileList* files(); 214 void setFiles(PassRefPtr<FileList>); 214 215 void receiveDroppedFiles(const Vector<String>&); 215 216 Icon* icon() const; -
trunk/Source/WebCore/html/HTMLInputElement.idl
r116592 r118993 32 32 attribute [Reflect] boolean disabled; 33 33 readonly attribute HTMLFormElement form; 34 readonlyattribute FileList files;34 attribute FileList files; 35 35 attribute [Reflect, URL] DOMString formAction; 36 36 attribute [TreatNullAs=NullString] DOMString formEnctype; -
trunk/Source/WebCore/html/InputType.cpp
r118677 r118993 42 42 #include "ExceptionCode.h" 43 43 #include "FileInputType.h" 44 #include "FileList.h" 44 45 #include "FormDataList.h" 45 46 #include "HTMLFormElement.h" … … 578 579 } 579 580 581 void InputType::setFiles(PassRefPtr<FileList>) 582 { 583 } 584 580 585 bool InputType::getTypeSpecificValue(String&) 581 586 { -
trunk/Source/WebCore/html/InputType.h
r118677 r118993 230 230 virtual bool shouldRespectAlignAttribute(); 231 231 virtual FileList* files(); 232 virtual void setFiles(PassRefPtr<FileList>); 232 233 virtual void receiveDroppedFiles(const Vector<String>&); 233 234 virtual Icon* icon() const;
Note: See TracChangeset
for help on using the changeset viewer.