RESOLVED FIXED 60948
tooLong validity should not be true for a value set by a script
https://bugs.webkit.org/show_bug.cgi?id=60948
Summary tooLong validity should not be true for a value set by a script
Kent Tamura
Reported 2011-05-17 01:14:19 PDT
The specification was updated a few days ago. See the URL.
Attachments
Patch (14.66 KB, patch)
2011-05-17 01:31 PDT, Kent Tamura
no flags
Kent Tamura
Comment 1 2011-05-17 01:31:23 PDT
Hajime Morrita
Comment 2 2011-05-17 03:24:10 PDT
Comment on attachment 93747 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=93747&action=review > Source/WebCore/html/HTMLInputElement.cpp:935 > + m_wasModifiedByUser = sendChangeEvent; Are there any possibility to overwrite? existing "true" value? For example, Is it possible to make this false by script after some user action that made this true. > Source/WebCore/html/HTMLTextAreaElement.h:113 > + bool m_wasModifiedByUser; should be mutable? or updateValue() should not be const? const_cast<> inside updateValue() apparently indicates something wrong.
Kent Tamura
Comment 3 2011-05-17 03:39:51 PDT
Comment on attachment 93747 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=93747&action=review >> Source/WebCore/html/HTMLInputElement.cpp:935 >> + m_wasModifiedByUser = sendChangeEvent; > > Are there any possibility to overwrite? existing "true" value? > For example, Is it possible to make this false by script after some user action that made this true. Yes, it's possible and it's an expected behavior. If the <input> has user-edited value (m_wasModifedByUser=true) and a script calls setValue("foobar"), m_wasModifedByUser should be cleared. >> Source/WebCore/html/HTMLTextAreaElement.h:113 >> + bool m_wasModifiedByUser; > > should be mutable? or updateValue() should not be const? > const_cast<> inside updateValue() apparently indicates something wrong. We should remove 'const' from updateValue().
Hajime Morrita
Comment 4 2011-05-17 04:17:55 PDT
(In reply to comment #3) > (From update of attachment 93747 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=93747&action=review > > >> Source/WebCore/html/HTMLInputElement.cpp:935 > >> + m_wasModifiedByUser = sendChangeEvent; > > > > Are there any possibility to overwrite? existing "true" value? > > For example, Is it possible to make this false by script after some user action that made this true. > > Yes, it's possible and it's an expected behavior. I see. The expectation is different from what I thought. But it's reasonable.
Kent Tamura
Comment 5 2011-05-18 21:38:44 PDT
Comment on attachment 93747 [details] Patch Thank you for r+!
WebKit Commit Bot
Comment 6 2011-05-19 02:48:51 PDT
The commit-queue encountered the following flaky tests while processing attachment 93747 [details]: java/lc3/JavaObject/JavaObjectToByte-006.html bug 60333 (author: ap@webkit.org) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 7 2011-05-19 02:50:20 PDT
Comment on attachment 93747 [details] Patch Clearing flags on attachment: 93747 Committed r86832: <http://trac.webkit.org/changeset/86832>
WebKit Commit Bot
Comment 8 2011-05-19 02:50:26 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.