| Index: third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
|
| index 8a12f1e3019bf3f1dbc5a96bfa9ca025ee641d00..116f844ce9e813ee271691f6ec34780bfb1b7a8b 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
|
| @@ -236,17 +236,17 @@ bool InsertListCommand::doApplyForSingleParagraph(bool forceCreateList, const HT
|
| Node* listChildNode = enclosingListChild(selectionNode);
|
| bool switchListType = false;
|
| if (listChildNode) {
|
| - if (!listChildNode->parentNode()->hasEditableStyle())
|
| + if (!hasEditableStyle(*listChildNode->parentNode()))
|
| return false;
|
| // Remove the list child.
|
| HTMLElement* listElement = enclosingList(listChildNode);
|
| if (listElement) {
|
| - if (!listElement->hasEditableStyle()) {
|
| + if (!hasEditableStyle(*listElement)) {
|
| // Since, |listElement| is uneditable, we can't move |listChild|
|
| // out from |listElement|.
|
| return false;
|
| }
|
| - if (!listElement->parentNode()->hasEditableStyle()) {
|
| + if (!hasEditableStyle(*listElement->parentNode())) {
|
| // Since parent of |listElement| is uneditable, we can not remove
|
| // |listElement| for switching list type neither unlistify.
|
| return false;
|
| @@ -260,8 +260,8 @@ bool InsertListCommand::doApplyForSingleParagraph(bool forceCreateList, const HT
|
| if (editingState->isAborted())
|
| return false;
|
| }
|
| - DCHECK(listElement->hasEditableStyle());
|
| - DCHECK(listElement->parentNode()->hasEditableStyle());
|
| + DCHECK(hasEditableStyle(*listElement));
|
| + DCHECK(hasEditableStyle(*listElement->parentNode()));
|
| if (!listElement->hasTagName(listTag)) {
|
| // |listChildNode| will be removed from the list and a list of type
|
| // |m_type| will be created.
|
| @@ -330,7 +330,7 @@ void InsertListCommand::unlistifyParagraph(const VisiblePosition& originalStart,
|
| {
|
| // Since, unlistify paragraph inserts nodes into parent and removes node
|
| // from parent, if parent of |listElement| should be editable.
|
| - DCHECK(listElement->parentNode()->hasEditableStyle());
|
| + DCHECK(hasEditableStyle(*listElement->parentNode()));
|
| Node* nextListChild;
|
| Node* previousListChild;
|
| VisiblePosition start;
|
|
|