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

Issue 779173002: Be more strict about multiple documentElements (Closed)

Created:
6 years ago by rwlbuis
Modified:
6 years ago
Reviewers:
esprehn
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, sof
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Be more strict about multiple documentElements We used to allow (mistakenly) multiple documentElements when appending a DocumentFragment to a document, as docfragment-multiple-document-elements.html shows. This patch detects that case by making canReplaceChild also handle appending/inserting. To make this more clear the method is now called canAcceptChild. Finally fix the FIXME by making canAcceptChild throw more specific exception messages than before. BUG=434111 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=186625

Patch Set 1 #

Patch Set 2 : Fix tests #

Total comments: 1

Patch Set 3 : Do the c -> child rename #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -20 lines) Patch
M LayoutTests/fast/dom/Document/replace-child-expected.txt View 1 3 chunks +3 lines, -3 lines 0 comments Download
A LayoutTests/fast/dom/docfragment-multiple-document-elements.html View 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/docfragment-multiple-document-elements-expected.txt View 1 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/fast/inspector-support/uncaught-dom3-exception-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/ContainerNode.cpp View 1 chunk +4 lines, -7 lines 0 comments Download
M Source/core/dom/Document.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Document.cpp View 1 2 5 chunks +16 lines, -8 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
rwlbuis
PTAL
6 years ago (2014-12-05 19:15:20 UTC) #2
esprehn
lgtm, you're awesome. https://codereview.chromium.org/779173002/diff/20001/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/779173002/diff/20001/Source/core/dom/Document.cpp#newcode3266 Source/core/dom/Document.cpp:3266: if (oldChild && *oldChild == c) ...
6 years ago (2014-12-05 19:18:25 UTC) #3
esprehn
This is how I feel about this patch: http://i.imgur.com/7uqtsA1.gif
6 years ago (2014-12-05 19:26:17 UTC) #4
rwlbuis
On 2014/12/05 19:18:25, esprehn wrote: > lgtm, you're awesome. > > https://codereview.chromium.org/779173002/diff/20001/Source/core/dom/Document.cpp > File Source/core/dom/Document.cpp ...
6 years ago (2014-12-05 19:41:09 UTC) #5
rwlbuis
On 2014/12/05 19:26:17, esprehn wrote: > This is how I feel about this patch: http://i.imgur.com/7uqtsA1.gif ...
6 years ago (2014-12-05 19:41:24 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/779173002/40001
6 years ago (2014-12-05 20:53:27 UTC) #8
commit-bot: I haz the power
6 years ago (2014-12-05 22:21:17 UTC) #9
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=186625

Powered by Google App Engine
This is Rietveld 408576698