Bug 153504 - Settings a reflected DOMString attribute to null should set it to the "null" string rather than the empty string
Summary: Settings a reflected DOMString attribute to null should set it to the "null" ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar, WebExposed
Depends on: 153519
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-26 13:00 PST by Chris Dumez
Modified: 2016-01-27 15:42 PST (History)
3 users (show)

See Also:


Attachments
WIP Patch (86.56 KB, patch)
2016-01-26 15:48 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (91.59 KB, patch)
2016-01-26 19:11 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (93.73 KB, patch)
2016-01-27 10:37 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (93.89 KB, patch)
2016-01-27 14:18 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (94.03 KB, patch)
2016-01-27 14:23 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (94.03 KB, patch)
2016-01-27 14:44 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (92.03 KB, patch)
2016-01-27 14:46 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-01-26 13:00:48 PST
Settings a reflected DOMString attribute to null should set it to the "null" string rather than the empty string:
- https://html.spec.whatwg.org/#reflecting-content-attributes-in-idl-attributes
- http://heycam.github.io/webidl/#es-DOMString
- http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tostring

Firefox and Chrome match the specification here.

This is causing a lot of W3C HTML reflection tests to fail on WebKit, e.g.:
http://w3c-test.org/html/dom/reflection-text.html
Comment 1 Radar WebKit Bug Importer 2016-01-26 13:02:12 PST
<rdar://problem/24353072>
Comment 2 Chris Dumez 2016-01-26 15:48:30 PST
Created attachment 269939 [details]
WIP Patch
Comment 3 Chris Dumez 2016-01-26 19:11:31 PST
Created attachment 269974 [details]
Patch
Comment 4 Chris Dumez 2016-01-27 10:37:23 PST
Created attachment 270006 [details]
Patch
Comment 5 Ryosuke Niwa 2016-01-27 11:06:28 PST
Comment on attachment 270006 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=270006&action=review

> LayoutTests/fast/shadow-dom/HTMLSlotElement-interface.html:105
>      slotElement.name = null;

This should be slotElement.removeAttribute('name') instead.

> LayoutTests/fast/shadow-dom/NonDocumentTypeChildNode-interface-assignedSlot.html:80
>      slot.name = null;

Ditto.
Comment 6 Chris Dumez 2016-01-27 14:18:47 PST
Created attachment 270038 [details]
Patch
Comment 7 WebKit Commit Bot 2016-01-27 14:20:39 PST
Comment on attachment 270038 [details]
Patch

Rejecting attachment 270038 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 270038, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
atching file LayoutTests/fast/shadow-dom/NonDocumentTypeChildNode-interface-assignedSlot.html
Hunk #1 succeeded at 82 with fuzz 2 (offset 5 lines).
patching file LayoutTests/fast/shadow-dom/shadow-layout-after-slot-changes.html
patching file LayoutTests/svg/dom/svg-element-attribute-js-null-expected.txt
patching file LayoutTests/svg/dom/svg-element-attribute-js-null.xhtml

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Full output: http://webkit-queues.webkit.org/results/747095
Comment 8 Chris Dumez 2016-01-27 14:23:46 PST
Created attachment 270039 [details]
Patch
Comment 9 Chris Dumez 2016-01-27 14:44:26 PST
Created attachment 270045 [details]
Patch
Comment 10 Chris Dumez 2016-01-27 14:46:54 PST
Created attachment 270046 [details]
Patch
Comment 11 Chris Dumez 2016-01-27 15:42:53 PST
Comment on attachment 270046 [details]
Patch

Clearing flags on attachment: 270046

Committed r195700: <http://trac.webkit.org/changeset/195700>
Comment 12 Chris Dumez 2016-01-27 15:42:59 PST
All reviewed patches have been landed.  Closing bug.