Changeset 91566 in webkit
- Timestamp:
- Jul 22, 2011, 6:40:59 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r91564 r91566 1 2011-07-22 Kentaro Hara <haraken@google.com> 2 3 REGRESSION(r89535): Form reset does not repaint a file upload control. 4 https://bugs.webkit.org/show_bug.cgi?id=65008 5 6 Reviewed by Kent Tamura. 7 8 This patch fixes the code so that the file upload control is repainted 9 in updateFromElement() if no files are selected. The added test checks 10 if the label next to the file chooser button becomes "No file chosen" 11 when we press the reset button. 12 13 * fast/forms/file-input-reset-expected.html: Added. 14 * fast/forms/file-input-reset.html: Added. 15 1 16 2011-07-22 John Knottenbelt <jknotten@chromium.org> 2 17 -
trunk/Source/WebCore/ChangeLog
r91565 r91566 1 2011-07-22 Kentaro Hara <haraken@google.com> 2 3 REGRESSION(r89535): Form reset does not repaint a file upload control. 4 https://bugs.webkit.org/show_bug.cgi?id=65008 5 6 Reviewed by Kent Tamura. 7 8 This patch fixes the code so that the file upload control is repainted 9 in updateFromElement() if no files are selected. 10 11 Tests: fast/forms/file-input-reset.html 12 13 * rendering/RenderFileUploadControl.cpp: 14 (WebCore::RenderFileUploadControl::updateFromElement): Calls repaint() if no files are selected. 15 1 16 2011-07-22 Ilya Tikhonovsky <loislo@chromium.org> 2 17 -
trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp
r90250 r91566 61 61 void RenderFileUploadControl::updateFromElement() 62 62 { 63 HTMLInputElement* input = static_cast<HTMLInputElement*>(node()); 64 ASSERT(input->isFileUpload()); 65 63 66 if (HTMLInputElement* button = uploadButton()) 64 67 button->setDisabled(!theme()->isEnabled(this)); 68 69 // This only supports clearing out the files, but that's OK because for 70 // security reasons that's the only change the DOM is allowed to make. 71 FileList* files = input->files(); 72 ASSERT(files); 73 if (files && files->isEmpty()) 74 repaint(); 65 75 } 66 76
Note:
See TracChangeset
for help on using the changeset viewer.