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

Issue 2757563004: Adjust insertion point when listifying unordered list items (Closed)

Created:
3 years, 9 months ago by jfernandez
Modified:
3 years, 9 months ago
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Adjust insertion point when listifying unordered list items During the process of listifying a selection of unordered lists items the insertion point of the first element is incorretcly selected. The issue appears when the selection start at an intermediate list item and ending in a different list item. Since the process is defined to act on single paragraphs, the firts item splits the list first and then it removes the intermediate item. This logic, implemented in 'unlistifyParagraph', causes that 2 independent lists are created with a <span> element in the middle. Then, an algorithm implemented in 'listifyParagraph' looks for an insertion point for the new ordered list item. Since there is a previous sibling which represents a 'visually distinct position', the <span> temporary created during the 'unlistifyParagraph' logic is selected. The incorrectly selected insertion point leads to the subsequent doApplyForSingleParagraph executions to consider the rest of the list items in the selection to be part of a different ordered list. BUG=702792 Review-Url: https://codereview.chromium.org/2757563004 Cr-Commit-Position: refs/heads/master@{#459442} Committed: https://chromium.googlesource.com/chromium/src/+/ce9fb22d90743b6b08b1a1baa00202d781673269

Patch Set 1 #

Patch Set 2 : Rebaseline test expectations. #

Patch Set 3 : Added regression test. #

Total comments: 4

Patch Set 4 : Applied suggested changes. #

Total comments: 2

Patch Set 5 : Patch for landing, after applying last suggestions. #

Patch Set 6 : Patch rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -7 lines) Patch
A third_party/WebKit/LayoutTests/editing/execCommand/insert-list-items-inside-another-list.html View 1 2 3 4 1 chunk +65 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/editing/run/insertorderedlist-expected.txt View 1 2 3 4 5 7 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (10 generated)
jfernandez
Patch sent out for review.
3 years, 9 months ago (2017-03-17 22:07:33 UTC) #3
yosin_UTC9
https://codereview.chromium.org/2757563004/diff/40001/third_party/WebKit/LayoutTests/editing/execCommand/script-tests/insert-list-items-inside-another-list.js File third_party/WebKit/LayoutTests/editing/execCommand/script-tests/insert-list-items-inside-another-list.js (right): https://codereview.chromium.org/2757563004/diff/40001/third_party/WebKit/LayoutTests/editing/execCommand/script-tests/insert-list-items-inside-another-list.js#newcode1 third_party/WebKit/LayoutTests/editing/execCommand/script-tests/insert-list-items-inside-another-list.js:1: description("Test to make sure inserting an ordered/unordered list inside ...
3 years, 9 months ago (2017-03-21 05:37:20 UTC) #4
jfernandez
PTAL https://codereview.chromium.org/2757563004/diff/40001/third_party/WebKit/LayoutTests/editing/execCommand/script-tests/insert-list-items-inside-another-list.js File third_party/WebKit/LayoutTests/editing/execCommand/script-tests/insert-list-items-inside-another-list.js (right): https://codereview.chromium.org/2757563004/diff/40001/third_party/WebKit/LayoutTests/editing/execCommand/script-tests/insert-list-items-inside-another-list.js#newcode1 third_party/WebKit/LayoutTests/editing/execCommand/script-tests/insert-list-items-inside-another-list.js:1: description("Test to make sure inserting an ordered/unordered list ...
3 years, 9 months ago (2017-03-24 01:57:55 UTC) #5
yosin_UTC9
lgtm w/ optional nit https://codereview.chromium.org/2757563004/diff/60001/third_party/WebKit/LayoutTests/editing/execCommand/insert-list-items-inside-another-list.html File third_party/WebKit/LayoutTests/editing/execCommand/insert-list-items-inside-another-list.html (right): https://codereview.chromium.org/2757563004/diff/60001/third_party/WebKit/LayoutTests/editing/execCommand/insert-list-items-inside-another-list.html#newcode5 third_party/WebKit/LayoutTests/editing/execCommand/insert-list-items-inside-another-list.html:5: <div id="log"></div> nit: We don't ...
3 years, 9 months ago (2017-03-24 04:46:53 UTC) #6
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/2757563004/80001
3 years, 9 months ago (2017-03-24 08:17:18 UTC) #9
commit-bot: I haz the power
Failed to apply patch for third_party/WebKit/LayoutTests/external/wpt/editing/run/insertorderedlist-expected.txt: While running git apply --index -p1; error: patch failed: ...
3 years, 9 months ago (2017-03-24 09:55:17 UTC) #11
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/2757563004/120001
3 years, 9 months ago (2017-03-24 12:09:02 UTC) #15
commit-bot: I haz the power
3 years, 9 months ago (2017-03-24 16:07:41 UTC) #18
Message was sent while issue was closed.
Committed patchset #6 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/ce9fb22d90743b6b08b1a1baa002...

Powered by Google App Engine
This is Rietveld 408576698