Changeset 106388 in webkit
- Timestamp:
- Jan 31, 2012 1:43:56 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r106387 r106388 1 2012-01-31 Jon Lee <jonlee@apple.com> 2 3 Hidden form elements do not save their state prior to form submission 4 https://bugs.webkit.org/show_bug.cgi?id=77391 5 <rdar://problem/10563108> 6 7 Reviewed by Brady Eidson. 8 9 The test changes the value of the hidden input element via Javascript prior to 10 submitting the form. The form action goes back one page, and we check to see 11 that the hidden input value is what it was set to by Javascript, rather than what 12 it was originally assigned. 13 14 * fast/forms/state-restore-hidden-expected.txt: Added. 15 * fast/forms/state-restore-hidden.html: Added. 16 1 17 2012-01-31 Joshua Bell <jsbell@chromium.org> 2 18 -
trunk/Source/WebCore/ChangeLog
r106387 r106388 1 2012-01-31 Jon Lee <jonlee@apple.com> 2 3 Hidden form elements do not save their state prior to form submission 4 https://bugs.webkit.org/show_bug.cgi?id=77391 5 <rdar://problem/10563108> 6 7 Reviewed by Brady Eidson. 8 9 Test: fast/forms/state-restore-hidden.html 10 11 * html/HiddenInputType.cpp: Teach hidden inputs to save and restore their state. 12 (WebCore::HiddenInputType::saveFormControlState): 13 (WebCore::HiddenInputType::restoreFormControlState): 14 * html/HiddenInputType.h: 15 (HiddenInputType): 16 1 17 2012-01-31 Joshua Bell <jsbell@chromium.org> 2 18 -
trunk/Source/WebCore/html/HiddenInputType.cpp
r99310 r106388 47 47 } 48 48 49 const AtomicString& HiddenInputType::formControlType() const { 49 const AtomicString& HiddenInputType::formControlType() const 50 { 50 51 return InputTypeNames::hidden(); 52 } 53 54 bool HiddenInputType::saveFormControlState(String& result) const 55 { 56 result = element()->value(); 57 return true; 58 } 59 60 void HiddenInputType::restoreFormControlState(const String& string) const 61 { 62 element()->setAttribute(valueAttr, string); 51 63 } 52 64 -
trunk/Source/WebCore/html/HiddenInputType.h
r103400 r106388 43 43 HiddenInputType(HTMLInputElement* element) : InputType(element) { } 44 44 virtual const AtomicString& formControlType() const OVERRIDE; 45 virtual bool saveFormControlState(String&) const OVERRIDE; 46 virtual void restoreFormControlState(const String&) const OVERRIDE; 45 47 virtual bool supportsValidation() const OVERRIDE; 46 48 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) const OVERRIDE;
Note: See TracChangeset
for help on using the changeset viewer.