Make previousLinePosition() not to use dangling RootInlineBox

This patch makes |previousLinePosition()| not to use dangling |RootInlineBox|
pointer to avoid use-after-free.

Before this patch, |isEditablePosition()| is called with |DoUpdateStyle|
parameter to update layout tree if needed. Usually, layout tree isn't updated
by this |isEditablePosition()| call since |previousLinePosition()| updates
layout tree at entry. However, if there are pending style sheet, e.g. @import
directive, and HTML import, e.g link rel=import, layout tree is updated since
document isn't rendering ready, |haveImportLoaded()| &&
|haveRenderBlockingStyleSheetsLoaded()|.

BUG=618237
TEST=LayoutTests/editing/selection/modify_move/move_backward_line_import_crash.html

Committed: https://crrev.com/fb81c66590538c2487a34b8623066a22d0b27dff
Review-Url: https://codereview.chromium.org/2082893005
Cr-Original-Commit-Position: refs/heads/master@{#401231}
Cr-Commit-Position: refs/heads/master@{#401581}
(cherry picked from commit e9c943f368d15bbfe414aedf5e001792257f3eeb)

Review URL: https://codereview.chromium.org/2149913003 .

Cr-Commit-Position: refs/branch-heads/2743@{#642}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}
2 files changed