Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Issue 303163002: Node.textContent setter should treat undefined the same way as null (Closed)

Created:
6 years, 6 months ago by Inactive
Modified:
6 years, 6 months ago
CC:
blink-reviews, arv+blink, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, watchdog-blink-watchlist_google.com, rwlbuis
Visibility:
Public.

Description

Node.textContent setter should treat undefined the same way as null Node.textContent setter should treat undefined the same way as null. Previously, undefined would get stringified to "undefined" in the setter, instead of being treated as "". This is inconsistent with what happens when assigning null and with the DOM specification: http://dom.spec.whatwg.org/#dom-node-textcontent Since the textContent attribute is nullable, both null and undefined input should be treated as null as per the Web IDL specification: http://heycam.github.io/webidl/#es-nullable-type The new behavior is consistent with Firefox 29. However, IE11 returns "undefined" in this case. R=arv@chromium.org, tkent@chromium.org BUG=378454 TEST=fast/dom/Node/textContent-set-undefined.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175103

Patch Set 1 #

Total comments: 3

Patch Set 2 : Add spec url to test case #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -1 line) Patch
A LayoutTests/fast/dom/Node/textContent-set-undefined.html View 1 1 chunk +23 lines, -0 lines 0 comments Download
M Source/core/dom/Node.idl View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Inactive
6 years, 6 months ago (2014-05-29 16:04:09 UTC) #1
arv (Not doing code reviews)
Previously, textContent would return "undefined" after getting assigned undefined, instead of returning an empty string ...
6 years, 6 months ago (2014-05-29 16:12:13 UTC) #2
arv (Not doing code reviews)
LGTM https://codereview.chromium.org/303163002/diff/1/LayoutTests/fast/dom/Node/textContent-set-undefined.html File LayoutTests/fast/dom/Node/textContent-set-undefined.html (right): https://codereview.chromium.org/303163002/diff/1/LayoutTests/fast/dom/Node/textContent-set-undefined.html#newcode2 LayoutTests/fast/dom/Node/textContent-set-undefined.html:2: <html> Maybe add a link[rel=help] like you used ...
6 years, 6 months ago (2014-05-29 16:14:50 UTC) #3
Inactive
On 2014/05/29 16:12:13, arv wrote: > Previously, textContent would return "undefined" after getting assigned > ...
6 years, 6 months ago (2014-05-29 16:54:01 UTC) #4
Inactive
https://codereview.chromium.org/303163002/diff/1/LayoutTests/fast/dom/Node/textContent-set-undefined.html File LayoutTests/fast/dom/Node/textContent-set-undefined.html (right): https://codereview.chromium.org/303163002/diff/1/LayoutTests/fast/dom/Node/textContent-set-undefined.html#newcode2 LayoutTests/fast/dom/Node/textContent-set-undefined.html:2: <html> On 2014/05/29 16:14:51, arv wrote: > Maybe add ...
6 years, 6 months ago (2014-05-29 16:54:13 UTC) #5
tkent
lgtm
6 years, 6 months ago (2014-05-30 00:47:49 UTC) #6
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 6 months ago (2014-05-30 01:30:46 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/303163002/20001
6 years, 6 months ago (2014-05-30 01:32:16 UTC) #8
commit-bot: I haz the power
6 years, 6 months ago (2014-05-30 04:17:15 UTC) #9
Message was sent while issue was closed.
Change committed as 175103

Powered by Google App Engine
This is Rietveld 408576698