Make ApplyStyleCommand::applyBlockStyle() to use connected position only
This patch makes |ApplyStyleCommand::applyBlockStyle()| to use connected
position of |paragraphStart| by checking whether |paragraphStart| is connected
or not after calling |moveParagraphContentsToNewBlockIfNecessary()| which makes
anchor node of |paragraphStart| detached from document.
This patch also introduces |DCHECK(paragraphStart.isConnected()| to catch
other cases in future.
In crbug.com/626730, we call |endOfParagraph()| with disconnected position in
|paragraphStart| then we hit connected position |DCHECK| in |VisiblePosition|
constructor.
BUG=626730
TEST=LayoutTests/editing/execCommand/apply_style/justify_right_ul_br_crash.html
Review-Url: https://codereview.chromium.org/2170823002
Cr-Commit-Position: refs/heads/master@{#407043}
2 files changed