|
|
Created:
4 years, 10 months ago by yosin_UTC9 Modified:
4 years, 10 months ago CC:
blink-reviews, chromium-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionMake insert{Un}OrderedListCommand/insertUnorderedListCommand to do nothing for uneditable
This patch makes |InsertListCommand::doApplyForSingleParagraph()| to check
whether parent of list element which will be switch to another list type or
unlistify, editable or not. If it is uneditable, we do nothing, because we
can't modify uneditable element.
Without this patch, we hit assertion in |InsertNodeBeforeCommand| constructor.
BUG=547705
TEST=LayoutTests/editing/execCommand/unlistify-uneditable-parent-crash.html
Committed: https://crrev.com/4ee4fc6cd5de77570db3291353656dabb3b2bdb7
Cr-Commit-Position: refs/heads/master@{#372302}
Patch Set 1 : 2016-01-28T16:39:01 #Patch Set 2 : 2016-01-29T11:06:31 #
Messages
Total messages: 24 (12 generated)
Description was changed from ========== sim# Enter a description of the change. 2016-01-28T16:39:01 BUG=547705 TEST=LayoutTests/editing/execCommand/unlistify-uneditable-parent-crash.html ========== to ========== Make InsertListCommand::unlififyParagraph() to do nothing when it applied to uneditable element This patch makes |InsertListCommand::unlififyParagraph()| to check whether parent of list element to unlistify is editable or not. If it is uneditable, |unlififyParagraph()| does nothing. BUG=547705 TEST=LayoutTests/editing/execCommand/unlistify-uneditable-parent-crash.html ==========
Description was changed from ========== Make InsertListCommand::unlififyParagraph() to do nothing when it applied to uneditable element This patch makes |InsertListCommand::unlififyParagraph()| to check whether parent of list element to unlistify is editable or not. If it is uneditable, |unlififyParagraph()| does nothing. BUG=547705 TEST=LayoutTests/editing/execCommand/unlistify-uneditable-parent-crash.html ========== to ========== Make InsertListCommand::unlififyParagraph() to do nothing when it applied to uneditable element This patch makes |InsertListCommand::unlififyParagraph()| to check whether parent of list element to unlistify is editable or not. If it is uneditable, |unlififyParagraph()| does nothing. Without this patch, we hit assertion in |InsertNodeBeforeCommand| constructor. BUG=547705 TEST=LayoutTests/editing/execCommand/unlistify-uneditable-parent-crash.html ==========
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1646673003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1646673003/1
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
yosin@chromium.org changed reviewers: + hajimehoshi@chromium.org, tkent@chromium.org, xiaochengh@chromium.org, yoichio@chromium.org
PTAL
Can we improve enclosingList, fixOrphanedListChild, or mergeWithNeighboringLists so that they return only acceptable list elements, instead of rejecting unexpected list element in unlistifyParagraph?
Description was changed from ========== Make InsertListCommand::unlififyParagraph() to do nothing when it applied to uneditable element This patch makes |InsertListCommand::unlififyParagraph()| to check whether parent of list element to unlistify is editable or not. If it is uneditable, |unlififyParagraph()| does nothing. Without this patch, we hit assertion in |InsertNodeBeforeCommand| constructor. BUG=547705 TEST=LayoutTests/editing/execCommand/unlistify-uneditable-parent-crash.html ========== to ========== Make insert{Un}OrderedListCommand/insertUnorderedListCommand to do nothing for uneditable This patch makes |InsertListCommand::doApplyForSingleParagraph()| to check whether parent of list element which will be switch to another list type or unlistify, editable or not. If it is uneditable, we do nothing, because we can't modify uneditable element. Without this patch, we hit assertion in |InsertNodeBeforeCommand| constructor. BUG=547705 TEST=LayoutTests/editing/execCommand/unlistify-uneditable-parent-crash.html ==========
PTAL >Can we improve enclosingList, fixOrphanedListChild, or mergeWithNeighboringLists so that they return only acceptable list elements, instead of rejecting unexpected list element in unlistifyParagraph? Here is possible improvements of them. They aren't relevant this crash. So, I postpone them. enclosingList(); check "display" property rather than tag name. I think we leave this function independent from editability. fixOrphanedListChild(); No need to change except for inserting ASSERT(listChild->parentNode()->hasEditableStyle()). In current code, it is checked before calling this. mergeWithNeighboringLists(); we should check editability of merge destination list element.
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1646673003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1646673003/20001
lgtm
The CQ bit was unchecked by yosin@chromium.org
The CQ bit was checked by yosin@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1646673003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1646673003/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by yosin@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1646673003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1646673003/20001
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Make insert{Un}OrderedListCommand/insertUnorderedListCommand to do nothing for uneditable This patch makes |InsertListCommand::doApplyForSingleParagraph()| to check whether parent of list element which will be switch to another list type or unlistify, editable or not. If it is uneditable, we do nothing, because we can't modify uneditable element. Without this patch, we hit assertion in |InsertNodeBeforeCommand| constructor. BUG=547705 TEST=LayoutTests/editing/execCommand/unlistify-uneditable-parent-crash.html ========== to ========== Make insert{Un}OrderedListCommand/insertUnorderedListCommand to do nothing for uneditable This patch makes |InsertListCommand::doApplyForSingleParagraph()| to check whether parent of list element which will be switch to another list type or unlistify, editable or not. If it is uneditable, we do nothing, because we can't modify uneditable element. Without this patch, we hit assertion in |InsertNodeBeforeCommand| constructor. BUG=547705 TEST=LayoutTests/editing/execCommand/unlistify-uneditable-parent-crash.html Committed: https://crrev.com/4ee4fc6cd5de77570db3291353656dabb3b2bdb7 Cr-Commit-Position: refs/heads/master@{#372302} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/4ee4fc6cd5de77570db3291353656dabb3b2bdb7 Cr-Commit-Position: refs/heads/master@{#372302} |