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

Issue 132923003: Make sure the rootNode of a LiveNodeListBase is always a ContainerNode (Closed)

Created:
6 years, 11 months ago by Inactive
Modified:
6 years, 11 months ago
CC:
blink-reviews, dglazkov+blink, sof, eae+blinkwatch, adamk+blink_chromium.org
Visibility:
Public.

Description

Make sure the rootNode of a LiveNodeListBase is always a ContainerNode Make sure the rootNode of a LiveNodeListBase is always a ContainerNode. This simplifies the logic inside LiveNodeListBase. It also gets rid of ContainerNode checks in HTMLCollection / LiveNodeList's traverseForwardToOffset() which are hot in Dromaeo's dom-traverse.html. This improves the following test's score by ~3%: - Bindings/node-list-access.html The only exception was when Node.childNodes is called on a non-ContainerNode. We now handle this special case separately by introducing an EmptyNodeList class which inherits from NodeList instead of LiveNodeListBase. This CL also moves the getElementsBy*() methods from Node to ContainerNode as they only make sense for ContainerNodes. They are actually exposed to JS on Element, not Node. This patch is based on WebKit r158536 by <antti@apple.com>;. R=eseidel, esprehn, abarth Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165598

Patch Set 1 #

Patch Set 2 : Simplify NodeRareData.h #

Patch Set 3 : Slightly clearer cast #

Total comments: 6

Patch Set 4 : Take feedback into consideration #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -169 lines) Patch
M Source/core/core.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/dom/ChildNodeList.h View 1 2 3 4 2 chunks +5 lines, -2 lines 0 comments Download
M Source/core/dom/ChildNodeList.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/ClassNodeList.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/dom/ClassNodeList.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/ContainerNode.h View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/dom/ContainerNode.cpp View 1 2 3 4 6 chunks +49 lines, -2 lines 0 comments Download
A + Source/core/dom/EmptyNodeList.h View 1 2 3 4 2 chunks +22 lines, -16 lines 0 comments Download
A + Source/core/dom/EmptyNodeList.cpp View 1 2 3 2 chunks +9 lines, -7 lines 0 comments Download
M Source/core/dom/LiveNodeList.h View 1 2 3 4 6 chunks +6 lines, -6 lines 0 comments Download
M Source/core/dom/LiveNodeList.cpp View 1 2 3 4 1 chunk +1 line, -9 lines 0 comments Download
M Source/core/dom/NameNodeList.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/dom/NameNodeList.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Node.h View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/dom/Node.cpp View 5 chunks +3 lines, -46 lines 0 comments Download
M Source/core/dom/NodeList.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/dom/NodeList.cpp View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M Source/core/dom/NodeRareData.h View 1 2 3 7 chunks +27 lines, -10 lines 0 comments Download
M Source/core/dom/TagNodeList.h View 1 2 3 4 4 chunks +5 lines, -5 lines 0 comments Download
M Source/core/dom/TagNodeList.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLAllCollection.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLAllCollection.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLCollection.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLCollection.cpp View 1 2 3 4 8 chunks +11 lines, -23 lines 0 comments Download
M Source/core/html/HTMLFormControlsCollection.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLFormControlsCollection.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLNameCollection.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLNameCollection.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLOptionsCollection.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLOptionsCollection.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLTableRowsCollection.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLTableRowsCollection.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/LabelsNodeList.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/html/LabelsNodeList.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/RadioNodeList.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/html/RadioNodeList.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/web/WebNode.cpp View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 14 (0 generated)
Inactive
6 years, 11 months ago (2014-01-17 04:22:56 UTC) #1
esprehn
https://codereview.chromium.org/132923003/diff/90001/Source/core/dom/ChildNodeList.h File Source/core/dom/ChildNodeList.h (right): https://codereview.chromium.org/132923003/diff/90001/Source/core/dom/ChildNodeList.h#newcode47 Source/core/dom/ChildNodeList.h:47: class EmptyNodeList FINAL : public NodeList { Please put ...
6 years, 11 months ago (2014-01-17 07:06:19 UTC) #2
Inactive
https://codereview.chromium.org/132923003/diff/90001/Source/core/dom/ChildNodeList.h File Source/core/dom/ChildNodeList.h (right): https://codereview.chromium.org/132923003/diff/90001/Source/core/dom/ChildNodeList.h#newcode47 Source/core/dom/ChildNodeList.h:47: class EmptyNodeList FINAL : public NodeList { On 2014/01/17 ...
6 years, 11 months ago (2014-01-17 15:00:48 UTC) #3
Inactive
I rebased the patch now that my patch using const refs in LiveNodeListBase has landed. ...
6 years, 11 months ago (2014-01-22 03:37:50 UTC) #4
esprehn
rslgtm
6 years, 11 months ago (2014-01-22 04:16:47 UTC) #5
Inactive
On 2014/01/22 04:16:47, esprehn wrote: > rslgtm Thanks. Adam, Eric, I still need someone to ...
6 years, 11 months ago (2014-01-22 14:02:59 UTC) #6
adamk
lgtm for Source/web/
6 years, 11 months ago (2014-01-22 16:56:10 UTC) #7
Inactive
On 2014/01/22 16:56:10, adamk wrote: > lgtm for Source/web/ Thanks
6 years, 11 months ago (2014-01-22 16:57:57 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/132923003/260001
6 years, 11 months ago (2014-01-22 16:58:16 UTC) #9
commit-bot: I haz the power
Retried try job too often on linux_blink for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink&number=8681
6 years, 11 months ago (2014-01-22 20:27:16 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/132923003/260001
6 years, 11 months ago (2014-01-22 20:29:52 UTC) #11
commit-bot: I haz the power
Retried try job too often on linux_blink for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink&number=8759
6 years, 11 months ago (2014-01-23 00:22:08 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/132923003/260001
6 years, 11 months ago (2014-01-23 01:02:00 UTC) #13
commit-bot: I haz the power
6 years, 11 months ago (2014-01-23 03:01:13 UTC) #14
Message was sent while issue was closed.
Change committed as 165598

Powered by Google App Engine
This is Rietveld 408576698