[Webkit-unassigned] [Bug 33911] HTMLInputElement::valueAsDate setter support for type=date.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 20 18:22:13 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=33911





--- Comment #3 from TAMURA, Kent <tkent at chromium.org>  2010-01-20 18:22:13 PST ---
Thank you for reviewing.

(In reply to comment #2)
> (From update of attachment 47046 [details])
> > +    if (beforeGregorianStartDate(m_year, m_month, m_monthDay))
> > +        return false;
> 
> It seems bad that in this case the function returns false, but has already had
> a side effect and changed the state of the ISODateTime object. Ideally
> functions would either succeed or leave the object untouched. In this patch
> there seems no problem with the behavior, but it is surprising to me.

Yeah, I understand it is not good in general.
ISODateTime has some such fail-but-update code in parse*() methods too. I
thought this behavior was acceptable because I had no idea of scenario to use 1
ISODateTime instance for multiple purpose, and we need complicated code to
avoid such update in some cases.

I'll commit this change as is, and will add comments to ISODateTime.h in the
next patch.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list