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

Issue 307243004: Avoid calling slower Node::firstChild() / Node::lastChild() when possible (Closed)

Created:
6 years, 6 months ago by Inactive
Modified:
6 years, 6 months ago
Reviewers:
esprehn, eseidel
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Visibility:
Public.

Description

Avoid calling slower Node::firstChild() / Node::lastChild() when possible Avoid calling slower Node::firstChild() / Node::lastChild() when possible by using tighter typing. This way, we end up using ContainerNode::firstChild() / ContainerNode::lastChild(), bypassing a useless isContainerNode() check. R=eseidel@chromium.org, esprehn@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175524

Patch Set 1 #

Total comments: 7

Patch Set 2 : Address review comments #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -25 lines) Patch
M Source/core/dom/ContainerNode.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Node.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/NodeTraversal.cpp View 1 3 chunks +6 lines, -6 lines 0 comments Download
M Source/core/dom/Range.cpp View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/editing/ApplyStyleCommand.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/editing/ApplyStyleCommand.cpp View 5 chunks +6 lines, -6 lines 0 comments Download
M Source/core/editing/CompositeEditCommand.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/editing/CompositeEditCommand.cpp View 4 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Inactive
6 years, 6 months ago (2014-06-02 18:57:11 UTC) #1
esprehn
This contains an unsafe cast. https://codereview.chromium.org/307243004/diff/1/Source/core/dom/NodeTraversal.cpp File Source/core/dom/NodeTraversal.cpp (right): https://codereview.chromium.org/307243004/diff/1/Source/core/dom/NodeTraversal.cpp#newcode113 Source/core/dom/NodeTraversal.cpp:113: while (previous->lastChild()) This is ...
6 years, 6 months ago (2014-06-02 19:03:37 UTC) #2
Inactive
https://codereview.chromium.org/307243004/diff/1/Source/core/dom/Range.cpp File Source/core/dom/Range.cpp (right): https://codereview.chromium.org/307243004/diff/1/Source/core/dom/Range.cpp#newcode738 Source/core/dom/Range.cpp:738: Node* n = toContainerNode(container)->firstChild(); On 2014/06/02 19:03:37, esprehn wrote: ...
6 years, 6 months ago (2014-06-02 20:36:17 UTC) #3
Inactive
https://codereview.chromium.org/307243004/diff/1/Source/core/dom/NodeTraversal.cpp File Source/core/dom/NodeTraversal.cpp (right): https://codereview.chromium.org/307243004/diff/1/Source/core/dom/NodeTraversal.cpp#newcode113 Source/core/dom/NodeTraversal.cpp:113: while (previous->lastChild()) On 2014/06/02 19:03:37, esprehn wrote: > This ...
6 years, 6 months ago (2014-06-02 20:46:24 UTC) #4
esprehn
lgtm
6 years, 6 months ago (2014-06-05 01:12:08 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/307243004/20001
6 years, 6 months ago (2014-06-05 01:13:19 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-05 01:13:26 UTC) #7
commit-bot: I haz the power
Failed to apply patch for Source/core/dom/Node.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 6 months ago (2014-06-05 01:13:27 UTC) #8
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 6 months ago (2014-06-05 01:58:49 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/307243004/40001
6 years, 6 months ago (2014-06-05 01:59:54 UTC) #10
commit-bot: I haz the power
6 years, 6 months ago (2014-06-05 03:06:21 UTC) #11
Message was sent while issue was closed.
Change committed as 175524

Powered by Google App Engine
This is Rietveld 408576698