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

Issue 65303008: Have ElementTraversal::firstWithin() take a reference (Closed)

Created:
7 years, 1 month ago by Inactive
Modified:
7 years, 1 month ago
Reviewers:
adamk
CC:
blink-reviews, krit, aboxhall, webcomponents-bugzilla_chromium.org, eae+blinkwatch, dglazkov+blink, dmazzoni, apavlov+blink_chromium.org, adamk+blink_chromium.org, darktears, pdr, f(malita), Stephen Chennney, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Have ElementTraversal::firstWithin() take a reference Have ElementTraversal::firstWithin() take a reference instead of a pointer as its implementation expects the pointer to be non-null. This makes the code look safer. R=adamk

Patch Set 1 #

Total comments: 1

Patch Set 2 : Rebase on master #

Patch Set 3 : Rebase on master #

Patch Set 4 : Rebase on master #

Patch Set 5 : Rebase on master #

Patch Set 6 : Rebase on master #

Patch Set 7 : Rebase on master #

Patch Set 8 : Rebase on master #

Patch Set 9 : Rebase on master #

Patch Set 10 : Rebase on master #

Patch Set 11 : Rebase on master #

Patch Set 12 : Rebase on master #

Patch Set 13 : Rebase on master #

Patch Set 14 : Rebase on master #

Patch Set 15 : Rebase on master #

Patch Set 16 : Rebase on master #

Patch Set 17 : Rebase on master #

Patch Set 18 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -114 lines) Patch
M Source/core/accessibility/AXRenderObject.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/StyleInvalidationAnalysis.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/StyleInvalidationAnalysis.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/ContainerNode.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Document.cpp View 1 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/dom/DocumentOrderedMap.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/dom/ElementTraversal.h View 1 2 chunks +6 lines, -6 lines 0 comments Download
M Source/core/dom/LiveNodeList.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/SelectorQuery.h View 1 chunk +1 line, -1 line 0 comments Download
Source/core/dom/SelectorQuery.cpp View 1 18 chunks +34 lines, -33 lines 0 comments Download
M Source/core/dom/StyleSheetCollection.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/TreeScope.cpp View 3 chunks +6 lines, -3 lines 0 comments Download
M Source/core/dom/VisitedLinkState.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/dom/shadow/ElementShadow.h View 1 chunk +1 line, -1 line 0 comments Download
Source/core/dom/shadow/ElementShadow.cpp View 1 1 chunk +4 lines, -4 lines 0 comments Download
M Source/core/dom/shadow/ShadowRoot.cpp View 1 chunk +1 line, -1 line 0 comments Download
Source/core/editing/markup.cpp View 1 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/html/HTMLCollection.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLCollection.cpp View 1 8 chunks +11 lines, -11 lines 0 comments Download
M Source/core/html/HTMLFieldSetElement.h View 1 chunk +1 line, -1 line 0 comments Download
Source/core/html/HTMLFieldSetElement.cpp View 1 4 chunks +7 lines, -7 lines 0 comments Download
M Source/core/html/HTMLNameCollection.cpp View 1 chunk +1 line, -1 line 0 comments Download
Source/core/html/HTMLObjectElement.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLSelectElement.cpp View 1 1 chunk +13 lines, -13 lines 0 comments Download
M Source/core/page/FocusController.h View 1 chunk +1 line, -1 line 0 comments Download
Source/core/page/FocusController.cpp View 1 4 chunks +5 lines, -6 lines 0 comments Download
Source/core/svg/SVGElement.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
Source/core/svg/SVGUseElement.cpp View 1 4 chunks +7 lines, -7 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Inactive
7 years, 1 month ago (2013-11-12 23:36:09 UTC) #1
adamk
7 years, 1 month ago (2013-11-12 23:50:00 UTC) #2
lgtm

https://codereview.chromium.org/65303008/diff/1/Source/core/dom/TreeScope.cpp
File Source/core/dom/TreeScope.cpp (right):

https://codereview.chromium.org/65303008/diff/1/Source/core/dom/TreeScope.cpp...
Source/core/dom/TreeScope.cpp:280: ASSERT(rootNode());
Sure would be nice if we could get rid of the bizarre case where rootNode() is
null (only happens for a single special instance of TreeScope that's used in a
few places). I guess this ASSERT at least points out that that's a reasonable
assumption.

Powered by Google App Engine
This is Rietveld 408576698