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

Issue 2322853004: Convert an assertion to if-condition in ReplaceSelectionCommand::doApply() (Closed)

Created:
4 years, 3 months ago by yosin_UTC9
Modified:
4 years, 3 months ago
Reviewers:
yoichio, Xiaocheng
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Convert 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)
yosin_UTC9
PTAL
4 years, 3 months ago (2016-09-09 09:30:17 UTC) #6
Xiaocheng
https://codereview.chromium.org/2322853004/diff/1/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp File third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp (left): https://codereview.chromium.org/2322853004/diff/1/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp#oldcode1151 third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp:1151: DCHECK_NE(enclosingBlockOfInsertionPos, currentRoot); What's the reason the assertion was introduced? ...
4 years, 3 months ago (2016-09-12 04:58:56 UTC) #9
yosin_UTC9
PTAL https://codereview.chromium.org/2322853004/diff/1/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp File third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp (left): https://codereview.chromium.org/2322853004/diff/1/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp#oldcode1151 third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp:1151: DCHECK_NE(enclosingBlockOfInsertionPos, currentRoot); On 2016/09/12 at 04:58:56, Xiaocheng wrote: ...
4 years, 3 months ago (2016-09-12 05:21:38 UTC) #14
Xiaocheng
lgtm with a nit. https://codereview.chromium.org/2322853004/diff/20001/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp File third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp (right): https://codereview.chromium.org/2322853004/diff/20001/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp#newcode1148 third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp:1148: // Adjust |enclosingBlockOfInsertionPos| to prevent ...
4 years, 3 months ago (2016-09-12 07:19:49 UTC) #18
yosin_UTC9
https://codereview.chromium.org/2322853004/diff/20001/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp File third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp (right): https://codereview.chromium.org/2322853004/diff/20001/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp#newcode1148 third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp:1148: // Adjust |enclosingBlockOfInsertionPos| to prevent nesting. On 2016/09/12 at ...
4 years, 3 months ago (2016-09-12 07:36:01 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2322853004/20001
4 years, 3 months ago (2016-09-12 07:36:55 UTC) #21
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 3 months ago (2016-09-12 07:41:38 UTC) #22
commit-bot: I haz the power
4 years, 3 months ago (2016-09-12 07:44:49 UTC) #24
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/8f313902e23e2589ddd9d3d2bfed8ee61e979f17
Cr-Commit-Position: refs/heads/master@{#417889}

Powered by Google App Engine
This is Rietveld 408576698