WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
173878
Match newly-clarified spec on textarea defaultValue/value/child text content
https://bugs.webkit.org/show_bug.cgi?id=173878
Summary
Match newly-clarified spec on textarea defaultValue/value/child text content
Domenic Denicola
Reported
2017-06-27 09:21:51 PDT
In
https://github.com/whatwg/html/issues/2752
and
https://github.com/whatwg/html/issues/2750
it was discovered that various aspects of the textarea spec were confusing and did not match browser behavior (which was generally not interoperable). In
https://github.com/whatwg/html/pull/2766
we settled on a reasonable set of semantics that matched most browsers in most aspects and was simple to implement. The main changes are:
> The child text content change steps for textarea elements must, if the element's dirty value flag is false, set the element's raw value to its child text content.
> The defaultValue IDL attribute must, on getting, return the element's child text content. On setting, it must act as the setter for the element's textContent IDL attribute.
These are tested by the tests at
http://w3c-test.org/submissions/6256/html/semantics/forms/the-textarea-element/value-defaultValue-textContent.html
(which will eventually end up at
http://w3c-test.org/html/semantics/forms/the-textarea-element/value-defaultValue-textContent.html
when
https://github.com/w3c/web-platform-tests/pull/6256
is merged). Safari Tech Preview matches most aspects of the new semantics, with the following exceptions: - The defaultValue getter should reflect the child text content, not the textContent (= "descendant text content"). This harmonizes it with what is actually rendered, and with the value property. - The defaultValue setter should act as the textContent setter, i.e. it should wipe out all child nodes in addition to adding a new text node.
Attachments
WIP Patch
(12.53 KB, patch)
2017-08-04 10:21 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(15.59 KB, patch)
2017-08-04 11:26 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(20.11 KB, patch)
2017-08-04 11:29 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2017-08-04 10:21:26 PDT
Created
attachment 317255
[details]
WIP Patch
Chris Dumez
Comment 2
2017-08-04 11:26:19 PDT
Created
attachment 317261
[details]
Patch
Chris Dumez
Comment 3
2017-08-04 11:29:29 PDT
Created
attachment 317262
[details]
Patch
WebKit Commit Bot
Comment 4
2017-08-04 13:49:56 PDT
Comment on
attachment 317262
[details]
Patch Clearing flags on attachment: 317262 Committed
r220290
: <
http://trac.webkit.org/changeset/220290
>
WebKit Commit Bot
Comment 5
2017-08-04 13:49:58 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.
Top of Page
Format For Printing
XML
Clone This Bug