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

Issue 425393002: Simplify code for finding body in FrameSelection::setSelectionFromNone() (Closed)

Created:
6 years, 4 months ago by Inactive
Modified:
6 years, 4 months ago
CC:
blink-reviews, yosin
Project:
blink
Visibility:
Public.

Description

Simplify code for finding body in FrameSelection::setSelectionFromNone() Simplify code for finding body in FrameSelection::setSelectionFromNone() by using Traversal<HTMLBodyElement>::firstChild(*documentElement). This is very close to what is done in Document::body() except that body() searches for both HTMLBodyElement and HTMLFrameSetElement. For this reason, we cannot simply call Document::body() here. Besides being shorter, the new code is also more optimal because: - It does not check documentElement as it cannot be an HTMLBodyElement. For HTML documents, the documentElement is an HTMLHtmlElement. - It avoids checking descendants and will only check the direct children of the <html> element. R=adamk@chromium.org, leviw@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179259

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -2 lines) Patch
M Source/core/editing/FrameSelection.cpp View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Inactive
6 years, 4 months ago (2014-07-30 21:23:19 UTC) #1
leviw_travelin_and_unemployed
lgtm
6 years, 4 months ago (2014-07-30 21:24:51 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/425393002/1
6 years, 4 months ago (2014-07-30 21:25:37 UTC) #3
commit-bot: I haz the power
6 years, 4 months ago (2014-07-30 22:04:07 UTC) #4
Message was sent while issue was closed.
Change committed as 179259

Powered by Google App Engine
This is Rietveld 408576698