Chromium Code Reviews
DescriptionConvert an assertion to if-condition in ReplaceSelectionCommand::doApply()
This patch converts a following assertion
DCHECK_NE(enclosingBlockOfInsertionPos, currentRoot)
to if-condition in |ReplaceSelectionCommand::doApply()|, since we found a
pattern to hit this assertion in "paste-text.html".
New test case is the result of converting "paste-text-009.html" to use w3c
test harness. The difference between "paste-test.html" and "paste-text-009.html"
is root editable:
"past-text.html":
|currentRoot| is "<div>one"
|enclosingBlockOfInsertionPos| is "<div>one"
"paste-text-009.html":
|currentRoot| is BODY
|enclosingBlockOfInsertionPos| is "<div>Omitted".
This patch also changes a variable name reference |insertionPos| to
|enclosingBlockOfInsertionPos| to match with current code.
Note: This assertion is introduced by https://bugs.webkit.org/show_bug.cgi?id=8592
BUG=644147
TEST=LayoutTests/editing/pasteboard/paste_text.html
Committed: https://crrev.com/8f313902e23e2589ddd9d3d2bfed8ee61e979f17
Cr-Commit-Position: refs/heads/master@{#417889}
Patch Set 1 : 2016-09-09T17:11:56 #
Total comments: 2
Patch Set 2 : 2016-09-12T14:19:36 #
Total comments: 2
Messages
Total messages: 24 (16 generated)
|