commit | 97ec98f99d7fd9bfb31ee293e2cb9215e23d3e5e | [log] [tgz] |
---|---|---|
author | tkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Wed Sep 07 05:33:50 2011 +0000 |
committer | tkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Wed Sep 07 05:33:50 2011 +0000 |
tree | 452bcd04e09e318b1c058913d4a471dfcd6b641e | |
parent | 8ba899a6fca2104770cd78cab71838c751b89231 [diff] |
REGRESSION (Safari 5.1 - ToT): File input retains its file icon when the value is reset https://bugs.webkit.org/show_bug.cgi?id=67567 Reviewed by Dimitri Glazkov. Source/WebCore: - Introduce InputType::setValue(), which is called by HTMLInputElement::setValue(). - Clear m_icon in FileInputType::setValue(). Tests: fast/forms/file/file-reset-in-change-expected.html fast/forms/file/file-reset-in-change.html * html/BaseButtonInputType.cpp: (WebCore::BaseButtonInputType::setValue): Implemenation for the "default" mode. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default * html/BaseButtonInputType.h: * html/BaseCheckableInputType.cpp: (WebCore::BaseCheckableInputType::setValue): Implemenation for the "default/on" mode. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default-on * html/BaseCheckableInputType.h: * html/FileInputType.cpp: (WebCore::FileInputType::setValue): Implemenation for the "filename" mode, and clearing m_icon. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-filename * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): Move some code to InputType::setValue(). (WebCore::HTMLInputElement::setValueInternal): A helper for InputType::setValue(). * html/HTMLInputElement.h: * html/HiddenInputType.cpp: (WebCore::HiddenInputType::setValue): Implementation for the "default" mode. * html/HiddenInputType.h: * html/InputType.cpp: (WebCore::InputType::setValue): Implementation for the "value" mode. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-value * html/InputType.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::setValue): In addition to the "value" mode processing, updates placeholder visibililty. * html/TextFieldInputType.h: LayoutTests: * fast/forms/file/file-reset-in-change-expected.html: Added. * fast/forms/file/file-reset-in-change.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94639 268f45cc-cd09-0410-ab3c-d52691b4dbfc