| Index: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| index 5c7a65aed5d3a3b007166f24dbe36c3523af31a3..caf280f2c96ea7e9d972759e8ba27e45452739b3 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| @@ -172,12 +172,12 @@ ReplacementFragment::ReplacementFragment(Document* document, DocumentFragment* f
|
| if (!editableRoot->getAttributeEventListener(EventTypeNames::webkitBeforeTextInserted)
|
| // FIXME: Remove these checks once textareas and textfields actually register an event handler.
|
| && !(shadowAncestorElement && shadowAncestorElement->layoutObject() && shadowAncestorElement->layoutObject()->isTextControl())
|
| - && layoutObjectIsRichlyEditable(*editableRoot)) {
|
| + && hasRichlyEditableStyle(*editableRoot)) {
|
| removeInterchangeNodes(m_fragment.get());
|
| return;
|
| }
|
|
|
| - if (!layoutObjectIsRichlyEditable(*editableRoot)) {
|
| + if (!hasRichlyEditableStyle(*editableRoot)) {
|
| bool isPlainText = true;
|
| for (Node& node : NodeTraversal::childrenOf(*m_fragment)) {
|
| if (isInterchangeHTMLBRElement(&node) && &node == m_fragment->lastChild())
|
| @@ -217,7 +217,7 @@ ReplacementFragment::ReplacementFragment(Document* document, DocumentFragment* f
|
| // Give the root a chance to change the text.
|
| BeforeTextInsertedEvent* evt = BeforeTextInsertedEvent::create(text);
|
| editableRoot->dispatchEvent(evt);
|
| - if (text != evt->text() || !layoutObjectIsRichlyEditable(*editableRoot)) {
|
| + if (text != evt->text() || !hasRichlyEditableStyle(*editableRoot)) {
|
| restoreAndRemoveTestRenderingNodesToFragment(holder);
|
|
|
| m_fragment = createFragmentFromText(selection.toNormalizedEphemeralRange(), evt->text());
|
| @@ -581,7 +581,7 @@ void ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline(Insert
|
| continue;
|
| }
|
|
|
| - if (element->parentNode() && layoutObjectIsRichlyEditable(*element->parentNode()))
|
| + if (element->parentNode() && hasRichlyEditableStyle(*element->parentNode()))
|
| removeElementAttribute(element, contenteditableAttr);
|
|
|
| // WebKit used to not add display: inline and float: none on copy.
|
|
|