| Index: sky/engine/core/editing/ReplaceSelectionCommand.cpp
|
| diff --git a/sky/engine/core/editing/ReplaceSelectionCommand.cpp b/sky/engine/core/editing/ReplaceSelectionCommand.cpp
|
| index afbd39aad8700f172453dab30fe0a21145514738..bfd1a6d7b580ca6e3175e8ef7096fd265daff1a3 100644
|
| --- a/sky/engine/core/editing/ReplaceSelectionCommand.cpp
|
| +++ b/sky/engine/core/editing/ReplaceSelectionCommand.cpp
|
| @@ -411,29 +411,8 @@ void ReplaceSelectionCommand::moveElementOutOfAncestor(PassRefPtr<Element> prpEl
|
| removeNode(ancestor.release());
|
| }
|
|
|
| -static inline bool nodeHasVisibleRenderText(Text& text)
|
| -{
|
| - return text.renderer() && text.renderer()->renderedTextLength() > 0;
|
| -}
|
| -
|
| void ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds(InsertedNodes& insertedNodes)
|
| {
|
| - document().updateLayout();
|
| -
|
| - Node* lastLeafInserted = insertedNodes.lastLeafInserted();
|
| - if (lastLeafInserted && lastLeafInserted->isTextNode() && !nodeHasVisibleRenderText(toText(*lastLeafInserted))
|
| - && !enclosingElementWithTag(firstPositionInOrBeforeNode(lastLeafInserted), HTMLNames::scriptTag)) {
|
| - insertedNodes.willRemoveNode(*lastLeafInserted);
|
| - removeNode(lastLeafInserted);
|
| - }
|
| -
|
| - // We don't have to make sure that firstNodeInserted isn't inside a select or script element, because
|
| - // it is a top level node in the fragment and the user can't insert into those elements.
|
| - Node* firstNodeInserted = insertedNodes.firstNodeInserted();
|
| - if (firstNodeInserted && firstNodeInserted->isTextNode() && !nodeHasVisibleRenderText(toText(*firstNodeInserted))) {
|
| - insertedNodes.willRemoveNode(*firstNodeInserted);
|
| - removeNode(firstNodeInserted);
|
| - }
|
| }
|
|
|
| VisiblePosition ReplaceSelectionCommand::positionAtEndOfInsertedContent() const
|
|
|