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

Issue 17583003: Set Attr.ownerDocument in Element#setAttributeNode() (Closed)

Created:
7 years, 6 months ago by Hajime Morrita
Modified:
7 years, 6 months ago
Reviewers:
tkent, esprehn
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, adamk+blink_chromium.org
Visibility:
Public.

Description

Set Attr.ownerDocument in Element#setAttributeNode() Attr objects can move across documents by setAttributeNode(). So It needs to reset ownerDocument through TreeScopeAdoptr::adoptIfNeeded(). BUG=248950 TEST=set-attribute-node-from-iframe.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=152938

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed the point. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -3 lines) Patch
A LayoutTests/fast/dom/Attr/set-attribute-node-from-iframe.html View 1 1 chunk +23 lines, -0 lines 0 comments Download
A + LayoutTests/fast/dom/Attr/set-attribute-node-from-iframe-expected.txt View 1 1 chunk +4 lines, -3 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Hajime Morrita
Could you review this one-line fix? This is caught by the fuzzer.
7 years, 6 months ago (2013-06-24 02:59:53 UTC) #1
tkent
lgtm https://codereview.chromium.org/17583003/diff/1/LayoutTests/fast/dom/Attr/set-attribute-node-from-iframe.html File LayoutTests/fast/dom/Attr/set-attribute-node-from-iframe.html (right): https://codereview.chromium.org/17583003/diff/1/LayoutTests/fast/dom/Attr/set-attribute-node-from-iframe.html#newcode10 LayoutTests/fast/dom/Attr/set-attribute-node-from-iframe.html:10: description("ownerNode of Attr should be set on setAttributeNode"); ...
7 years, 6 months ago (2013-06-24 05:06:37 UTC) #2
Hajime Morrita
Kent-san, thanks for reviewing! https://codereview.chromium.org/17583003/diff/1/Source/core/dom/Element.cpp File Source/core/dom/Element.cpp (right): https://codereview.chromium.org/17583003/diff/1/Source/core/dom/Element.cpp#newcode1812 Source/core/dom/Element.cpp:1812: treeScope()->adoptIfNeeded(attrNode); On 2013/06/24 05:06:37, tkent ...
7 years, 6 months ago (2013-06-24 05:24:09 UTC) #3
tkent
https://codereview.chromium.org/17583003/diff/1/Source/core/dom/Element.cpp File Source/core/dom/Element.cpp (right): https://codereview.chromium.org/17583003/diff/1/Source/core/dom/Element.cpp#newcode1812 Source/core/dom/Element.cpp:1812: treeScope()->adoptIfNeeded(attrNode); On 2013/06/24 05:24:09, morrita1 wrote: > On 2013/06/24 ...
7 years, 6 months ago (2013-06-24 05:26:30 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/morrita@chromium.org/17583003/5002
7 years, 6 months ago (2013-06-24 05:26:36 UTC) #5
commit-bot: I haz the power
7 years, 6 months ago (2013-06-24 06:50:04 UTC) #6
Message was sent while issue was closed.
Change committed as 152938

Powered by Google App Engine
This is Rietveld 408576698