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

Issue 23437003: Implement cloneNode for Document (Closed)

Created:
7 years, 3 months ago by arv (Not doing code reviews)
Modified:
7 years, 2 months ago
CC:
blink-reviews, eae+blinkwatch, dglazkov+blink, f(malita), adamk+blink_chromium.org, pdr, Stephen Chennney
Visibility:
Public.

Description

Implement cloneNode for Document When cloning HTMLDocument and SVGDocument we need to ensure that we create a new HTMLDocument and SVGDocument respectively. http://dom.spec.whatwg.org/#dom-node-clonenode BUG=258146 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=159835

Patch Set 1 #

Total comments: 3

Patch Set 2 : Use encoding/setEncoding instead #

Total comments: 2

Patch Set 3 : Use SecurityContext::isolatedCopy instead and domain change test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -13 lines) Patch
M LayoutTests/dom/xhtml/level3/core/nodeisequalnode01-expected.txt View 1 chunk +1 line, -2 lines 0 comments Download
M LayoutTests/dom/xhtml/level3/core/nodeisequalnode21-expected.txt View 1 chunk +1 line, -2 lines 0 comments Download
A LayoutTests/fast/dom/Document/clone-node.html View 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Document/clone-node-expected.txt View 1 chunk +16 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/HTMLDocument/clone-node.html View 1 chunk +25 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/HTMLDocument/clone-node-expected.txt View 1 chunk +17 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/security/document-clone-node-change-domain.html View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
A + LayoutTests/http/tests/security/document-clone-node-change-domain-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/svg/custom/clone-node.html View 1 chunk +19 lines, -0 lines 0 comments Download
A LayoutTests/svg/custom/clone-node-expected.txt View 1 chunk +12 lines, -0 lines 0 comments Download
M Source/core/dom/Document.h View 1 2 3 chunks +4 lines, -1 line 0 comments Download
M Source/core/dom/Document.cpp View 1 2 1 chunk +22 lines, -4 lines 0 comments Download
M Source/core/html/HTMLDocument.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLDocument.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/svg/SVGDocument.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/svg/SVGDocument.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
arv (Not doing code reviews)
Second try. Main difference from first try is that: 1. It used DocumentInit(url()) for the ...
7 years, 3 months ago (2013-08-26 20:48:26 UTC) #1
abarth-chromium
https://codereview.chromium.org/23437003/diff/1/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/23437003/diff/1/Source/core/dom/Document.cpp#newcode3113 Source/core/dom/Document.cpp:3113: setSecurityOrigin(other.securityOrigin()); You should make a copy of the security ...
7 years, 3 months ago (2013-08-26 21:04:54 UTC) #2
abarth-chromium
+jamesr for the interaction with TextResourceDecoder
7 years, 3 months ago (2013-08-26 21:05:22 UTC) #3
jamesr
https://codereview.chromium.org/23437003/diff/1/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/23437003/diff/1/Source/core/dom/Document.cpp#newcode3116 Source/core/dom/Document.cpp:3116: setDecoder(TextResourceDecoder::create(other.suggestedMIMEType(), other.encoding())); On 2013/08/26 21:04:55, abarth wrote: > This ...
7 years, 3 months ago (2013-08-26 21:07:51 UTC) #4
arv (Not doing code reviews)
On 2013/08/26 21:07:51, jamesr wrote: > https://codereview.chromium.org/23437003/diff/1/Source/core/dom/Document.cpp > File Source/core/dom/Document.cpp (right): > > https://codereview.chromium.org/23437003/diff/1/Source/core/dom/Document.cpp#newcode3116 > ...
7 years, 3 months ago (2013-08-26 21:48:29 UTC) #5
arv (Not doing code reviews)
On 2013/08/26 21:04:54, abarth wrote: > https://codereview.chromium.org/23437003/diff/1/Source/core/dom/Document.cpp > File Source/core/dom/Document.cpp (right): > > https://codereview.chromium.org/23437003/diff/1/Source/core/dom/Document.cpp#newcode3113 > ...
7 years, 3 months ago (2013-08-26 21:52:36 UTC) #6
abarth-chromium
On 2013/08/26 21:52:36, arv wrote: > On 2013/08/26 21:04:54, abarth wrote: > > What about ...
7 years, 3 months ago (2013-08-26 22:24:41 UTC) #7
jamesr
On 2013/08/26 21:48:29, arv wrote: > The spec requires that characterSet be cloned. I can't ...
7 years, 3 months ago (2013-08-26 23:18:22 UTC) #8
arv (Not doing code reviews)
On 2013/08/26 23:18:22, jamesr wrote: > On 2013/08/26 21:48:29, arv wrote: > > The spec ...
7 years, 3 months ago (2013-08-27 00:06:15 UTC) #9
arv (Not doing code reviews)
Updated to use encoding/setEncoding. PTAL
7 years, 3 months ago (2013-08-29 19:31:15 UTC) #10
abarth-chromium
LGTM Once comment below about making a copy of the security origin. I looked at ...
7 years, 3 months ago (2013-08-30 06:56:41 UTC) #11
arv (Not doing code reviews)
Re document.domain: Ouch. We have the same bug in document.implementation.createHTMLDocument. > document.domain "chrome.google.com" > doc ...
7 years, 3 months ago (2013-08-30 14:33:45 UTC) #12
arv (Not doing code reviews)
Adam, now that document.domain has been resolved for DOMImplementation create{HTML}Document I applied the same fix ...
7 years, 2 months ago (2013-10-16 16:09:53 UTC) #13
abarth-chromium
lgtm The set of things cloned seems a bit ad-hoc, but as long as it ...
7 years, 2 months ago (2013-10-17 00:59:48 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/arv@chromium.org/23437003/20001
7 years, 2 months ago (2013-10-17 01:26:01 UTC) #15
commit-bot: I haz the power
7 years, 2 months ago (2013-10-17 07:40:53 UTC) #16
Message was sent while issue was closed.
Change committed as 159835

Powered by Google App Engine
This is Rietveld 408576698