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

Issue 251633002: Add support for DocumentFragment.getElementById() (Closed)

Created:
6 years, 8 months ago by Inactive
Modified:
6 years, 7 months ago
CC:
blink-reviews, ed+blinkwatch_opera.com, chrishtr, krit, arv+blink, webcomponents-bugzilla_chromium.org, sof, eae+blinkwatch, fs, kouhei+svg_chromium.org, dglazkov+blink, pdr., f(malita), adamk+blink_chromium.org, gyuyoung.kim_webkit.org, Stephen Chennney, ojan, watchdog-blink-watchlist_google.com, rwlbuis, esprehn, abarth-chromium
Visibility:
Public.

Description

Add support for DocumentFragment.getElementById() Add support for DocumentFragment.getElementById() as specified in the DOM specification: http://dom.spec.whatwg.org/#interface-nonelementparentnode The patch moves the SVGSVGElement::getElementById() implementation up to ContainerNode so that it can be shared with DocumentFragment. Firefox 28 already supports it, IE11 does not. R=arv@chromium.org, abarth@chromium.org BUG=366927 TEST=fast/dom/DocumentFragment/get-element-by-id.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=172796

Patch Set 1 #

Patch Set 2 : Add comment #

Total comments: 5

Patch Set 3 : Use isInTreeScope() instead of isInDocument() #

Total comments: 6

Patch Set 4 : Add duplicate id tests #

Total comments: 3

Patch Set 5 : Fix createElement() calls #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -19 lines) Patch
A LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html View 1 2 3 4 1 chunk +40 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/DocumentFragment/get-element-by-id-expected.txt View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
M Source/core/dom/ContainerNode.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/ContainerNode.cpp View 1 2 3 1 chunk +20 lines, -0 lines 0 comments Download
M Source/core/dom/Document.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/DocumentFragment.idl View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/dom/shadow/ShadowRoot.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/svg/SVGSVGElement.h View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/svg/SVGSVGElement.cpp View 1 2 3 1 chunk +0 lines, -17 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
Inactive
6 years, 8 months ago (2014-04-25 00:18:25 UTC) #1
tkent
Would you post intent-to-implement-and-ship email to blink-dev please? This is just one function addition, but ...
6 years, 8 months ago (2014-04-25 05:14:20 UTC) #2
Inactive
On 2014/04/25 05:14:20, tkent wrote: > Would you post intent-to-implement-and-ship email to blink-dev please? > ...
6 years, 7 months ago (2014-04-25 13:33:39 UTC) #3
arv (Not doing code reviews)
https://codereview.chromium.org/251633002/diff/20001/Source/core/dom/ContainerNode.cpp File Source/core/dom/ContainerNode.cpp (right): https://codereview.chromium.org/251633002/diff/20001/Source/core/dom/ContainerNode.cpp#newcode1167 Source/core/dom/ContainerNode.cpp:1167: if (inDocument()) { I don't think this is required. ...
6 years, 7 months ago (2014-04-25 13:36:18 UTC) #4
Inactive
https://codereview.chromium.org/251633002/diff/20001/Source/core/dom/ContainerNode.cpp File Source/core/dom/ContainerNode.cpp (right): https://codereview.chromium.org/251633002/diff/20001/Source/core/dom/ContainerNode.cpp#newcode1167 Source/core/dom/ContainerNode.cpp:1167: if (inDocument()) { On 2014/04/25 13:36:19, arv wrote: > ...
6 years, 7 months ago (2014-04-25 14:41:19 UTC) #5
arv (Not doing code reviews)
https://codereview.chromium.org/251633002/diff/20001/Source/core/dom/ContainerNode.cpp File Source/core/dom/ContainerNode.cpp (right): https://codereview.chromium.org/251633002/diff/20001/Source/core/dom/ContainerNode.cpp#newcode1171 Source/core/dom/ContainerNode.cpp:1171: if (!element) On 2014/04/25 14:41:20, Chris Dumez wrote: > ...
6 years, 7 months ago (2014-04-25 15:04:03 UTC) #6
Inactive
https://codereview.chromium.org/251633002/diff/20001/Source/core/dom/ContainerNode.cpp File Source/core/dom/ContainerNode.cpp (right): https://codereview.chromium.org/251633002/diff/20001/Source/core/dom/ContainerNode.cpp#newcode1167 Source/core/dom/ContainerNode.cpp:1167: if (inDocument()) { On 2014/04/25 14:41:20, Chris Dumez wrote: ...
6 years, 7 months ago (2014-04-25 15:13:40 UTC) #7
Inactive
I updated the patch to use isInTreeScope() instead of isInDocument() so that we can leverage ...
6 years, 7 months ago (2014-04-25 15:25:34 UTC) #8
arv (Not doing code reviews)
https://codereview.chromium.org/251633002/diff/40001/Source/core/dom/ContainerNode.cpp File Source/core/dom/ContainerNode.cpp (right): https://codereview.chromium.org/251633002/diff/40001/Source/core/dom/ContainerNode.cpp#newcode1173 Source/core/dom/ContainerNode.cpp:1173: if (element->isDescendantOf(this)) Can this ever be false?
6 years, 7 months ago (2014-04-25 15:28:58 UTC) #9
Inactive
https://codereview.chromium.org/251633002/diff/40001/Source/core/dom/ContainerNode.cpp File Source/core/dom/ContainerNode.cpp (right): https://codereview.chromium.org/251633002/diff/40001/Source/core/dom/ContainerNode.cpp#newcode1173 Source/core/dom/ContainerNode.cpp:1173: if (element->isDescendantOf(this)) On 2014/04/25 15:28:59, arv wrote: > Can ...
6 years, 7 months ago (2014-04-25 15:31:30 UTC) #10
arv (Not doing code reviews)
LGTM https://codereview.chromium.org/251633002/diff/40001/Source/core/dom/ContainerNode.cpp File Source/core/dom/ContainerNode.cpp (right): https://codereview.chromium.org/251633002/diff/40001/Source/core/dom/ContainerNode.cpp#newcode1173 Source/core/dom/ContainerNode.cpp:1173: if (element->isDescendantOf(this)) On 2014/04/25 15:31:30, Chris Dumez wrote: ...
6 years, 7 months ago (2014-04-25 15:37:41 UTC) #11
Inactive
The intent to implement and ship received enough support: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/D5ZG_JARr68 Could an API OWNER please ...
6 years, 7 months ago (2014-04-28 18:17:56 UTC) #12
abarth-chromium
LGTM https://codereview.chromium.org/251633002/diff/40001/LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html File LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html (right): https://codereview.chromium.org/251633002/diff/40001/LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html#newcode23 LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html:23: shouldBeNull("fragment.getElementById('doesNotExist')"); Does this test all the paths through ...
6 years, 7 months ago (2014-04-28 18:25:25 UTC) #13
Inactive
https://codereview.chromium.org/251633002/diff/40001/LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html File LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html (right): https://codereview.chromium.org/251633002/diff/40001/LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html#newcode23 LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html:23: shouldBeNull("fragment.getElementById('doesNotExist')"); On 2014/04/28 18:25:25, abarth wrote: > Does this ...
6 years, 7 months ago (2014-04-28 18:31:48 UTC) #14
Inactive
https://codereview.chromium.org/251633002/diff/40001/LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html File LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html (right): https://codereview.chromium.org/251633002/diff/40001/LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html#newcode23 LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html:23: shouldBeNull("fragment.getElementById('doesNotExist')"); On 2014/04/28 18:25:25, abarth wrote: > Does this ...
6 years, 7 months ago (2014-04-28 18:42:01 UTC) #15
arv (Not doing code reviews)
https://codereview.chromium.org/251633002/diff/60001/LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html File LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html (right): https://codereview.chromium.org/251633002/diff/60001/LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html#newcode20 LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html:20: var span = document.createElement("span", ""); Why the second argument?
6 years, 7 months ago (2014-04-28 18:44:27 UTC) #16
Inactive
https://codereview.chromium.org/251633002/diff/60001/LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html File LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html (right): https://codereview.chromium.org/251633002/diff/60001/LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html#newcode20 LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html:20: var span = document.createElement("span", ""); On 2014/04/28 18:44:27, arv ...
6 years, 7 months ago (2014-04-28 18:46:17 UTC) #17
Inactive
https://codereview.chromium.org/251633002/diff/60001/LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html File LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html (right): https://codereview.chromium.org/251633002/diff/60001/LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html#newcode20 LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html:20: var span = document.createElement("span", ""); On 2014/04/28 18:46:17, Chris ...
6 years, 7 months ago (2014-04-28 18:50:47 UTC) #18
arv (Not doing code reviews)
Still LGTM
6 years, 7 months ago (2014-04-28 19:03:54 UTC) #19
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 7 months ago (2014-04-28 19:24:46 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/251633002/80001
6 years, 7 months ago (2014-04-28 19:25:36 UTC) #21
commit-bot: I haz the power
6 years, 7 months ago (2014-04-28 20:00:23 UTC) #22
Message was sent while issue was closed.
Change committed as 172796

Powered by Google App Engine
This is Rietveld 408576698