diff options
Diffstat (limited to 'WebCore/editing/CreateLinkCommand.cpp')
-rw-r--r-- | WebCore/editing/CreateLinkCommand.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/WebCore/editing/CreateLinkCommand.cpp b/WebCore/editing/CreateLinkCommand.cpp index d7048fe..fe7af4a 100644 --- a/WebCore/editing/CreateLinkCommand.cpp +++ b/WebCore/editing/CreateLinkCommand.cpp @@ -46,10 +46,9 @@ void CreateLinkCommand::doApply() RefPtr<HTMLAnchorElement> anchorElement = HTMLAnchorElement::create(document()); anchorElement->setHref(m_url); - if (endingSelection().isRange()) { - pushPartiallySelectedAnchorElementsDown(); + if (endingSelection().isRange()) applyStyledElement(anchorElement.get()); - } else { + else { insertNodeAt(anchorElement.get(), endingSelection().start()); RefPtr<Text> textNode = Text::create(document(), m_url); appendNode(textNode.get(), anchorElement.get()); |