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

Issue 54803003: Have Node::lastDescendant() return a reference (Closed)

Created:
7 years, 1 month ago by Inactive
Modified:
7 years, 1 month ago
Reviewers:
adamk
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Have Node::lastDescendant() return a reference Have Node::lastDescendant() return a reference instead of a pointer as it can never return null. It makes the calling code look safer and gets rid of several unnecessary null checks. Also get rid of Node::firstDescendant() which is unused. R=adamk Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=161096

Patch Set 1 #

Patch Set 2 : Add extra assertion #

Patch Set 3 : Update firstDescendant() as well #

Patch Set 4 : Kill firstDescendant()! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -29 lines) Patch
M Source/core/dom/Node.h View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M Source/core/dom/Node.cpp View 1 2 3 1 chunk +4 lines, -11 lines 0 comments Download
M Source/core/editing/DeleteSelectionCommand.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/editing/ReplaceSelectionCommand.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/editing/ReplaceSelectionCommand.cpp View 3 chunks +11 lines, -11 lines 0 comments Download
M Source/core/editing/VisibleUnits.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
Inactive
7 years, 1 month ago (2013-10-31 16:10:27 UTC) #1
adamk
lgtm, but it seems like making firstDescendent() return a reference should be done ASAP just ...
7 years, 1 month ago (2013-10-31 16:27:42 UTC) #2
Inactive
On 2013/10/31 16:27:42, adamk wrote: > lgtm, but it seems like making firstDescendent() return a ...
7 years, 1 month ago (2013-10-31 16:38:44 UTC) #3
adamk
On 2013/10/31 16:38:44, Chris Dumez wrote: > On 2013/10/31 16:27:42, adamk wrote: > > lgtm, ...
7 years, 1 month ago (2013-10-31 20:14:23 UTC) #4
Inactive
On 2013/10/31 20:14:23, adamk wrote: > On 2013/10/31 16:38:44, Chris Dumez wrote: > > On ...
7 years, 1 month ago (2013-10-31 20:23:36 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/54803003/160001
7 years, 1 month ago (2013-10-31 20:23:55 UTC) #6
commit-bot: I haz the power
7 years, 1 month ago (2013-10-31 21:37:24 UTC) #7
Message was sent while issue was closed.
Change committed as 161096

Powered by Google App Engine
This is Rietveld 408576698