Index: Source/core/editing/CreateLinkCommand.cpp |
diff --git a/Source/core/editing/CreateLinkCommand.cpp b/Source/core/editing/CreateLinkCommand.cpp |
index d21924bbc1c2c804f738092837faa0b227236a9a..4ac85b7300d949d5ec43610b22e13b287a65cff8 100644 |
--- a/Source/core/editing/CreateLinkCommand.cpp |
+++ b/Source/core/editing/CreateLinkCommand.cpp |
@@ -31,7 +31,7 @@ |
namespace WebCore { |
-CreateLinkCommand::CreateLinkCommand(Document* document, const String& url) |
+CreateLinkCommand::CreateLinkCommand(Document& document, const String& url) |
: CompositeEditCommand(document) |
{ |
m_url = url; |
@@ -42,14 +42,14 @@ void CreateLinkCommand::doApply() |
if (endingSelection().isNone()) |
return; |
- RefPtr<HTMLAnchorElement> anchorElement = HTMLAnchorElement::create(document()); |
+ RefPtr<HTMLAnchorElement> anchorElement = HTMLAnchorElement::create(&document()); |
anchorElement->setHref(m_url); |
if (endingSelection().isRange()) |
applyStyledElement(anchorElement.get()); |
else { |
insertNodeAt(anchorElement.get(), endingSelection().start()); |
- RefPtr<Text> textNode = Text::create(document(), m_url); |
+ RefPtr<Text> textNode = Text::create(&document(), m_url); |
appendNode(textNode.get(), anchorElement.get()); |
setEndingSelection(VisibleSelection(positionInParentBeforeNode(anchorElement.get()), positionInParentAfterNode(anchorElement.get()), DOWNSTREAM, endingSelection().isDirectional())); |
} |