Patch for HTMLInputElementImpl::reset()

David Hyatt hyatt at apple.com
Mon Oct 25 01:13:11 CEST 2004


Our current code for that method looks like this....

void HTMLInputElementImpl::reset()
{
  if (storesValueSeparateFromAttribute())
        setValue(DOMString());
  ...
}

dave


David Faure wrote:

>In WebCore 146.1, html_formimpl.cpp says:
>
>void HTMLInputElementImpl::reset()
>{
>    setValue(DOMString());
>   [...]
>}
>
>This breaks regression/tests/mozilla/dom/dom-html/hfor009.html which says
><form name="Bands">
><input name="John" type="text" value="John">
></form>
><script>
>document.Bands.John.value="Johnny";
>document.Bands.reset();
></script>
>
>document.Bands.John.value is then expected to be "John" again,
>but the above code sets it to empty.
>
>This fixes it:
>    setValue(getAttribute(ATTR_VALUE));
>
>Is this fixed already in WebCore? Can I have any patch related to html_formimpl.cpp
>between WebCore-146 and now? - or an updated tarball altogether? Thanks.
>
>  
>



More information about the Khtml-devel mailing list