Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(906)

Unified Diff: Source/core/editing/commands/CreateLinkCommand.cpp

Issue 1294543005: Move execCommand related files in core/editing/ related files into core/editing/commands/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-17T17:57:33 Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/editing/commands/CreateLinkCommand.cpp
diff --git a/Source/core/editing/CreateLinkCommand.cpp b/Source/core/editing/commands/CreateLinkCommand.cpp
similarity index 95%
rename from Source/core/editing/CreateLinkCommand.cpp
rename to Source/core/editing/commands/CreateLinkCommand.cpp
index 8044a3e8e8d4b5c1265b3a47410cec71ca898a13..309773b032b2cb9f0c8955d0c430176ae7603444 100644
--- a/Source/core/editing/CreateLinkCommand.cpp
+++ b/Source/core/editing/commands/CreateLinkCommand.cpp
@@ -24,9 +24,9 @@
*/
#include "config.h"
-#include "core/dom/Text.h"
-#include "core/editing/CreateLinkCommand.h"
+#include "core/editing/commands/CreateLinkCommand.h"
+#include "core/dom/Text.h"
#include "core/html/HTMLAnchorElement.h"
namespace blink {
@@ -45,9 +45,9 @@ void CreateLinkCommand::doApply()
RefPtrWillBeRawPtr<HTMLAnchorElement> anchorElement = HTMLAnchorElement::create(document());
anchorElement->setHref(AtomicString(m_url));
- if (endingSelection().isRange())
+ if (endingSelection().isRange()) {
applyStyledElement(anchorElement.get());
- else {
+ } else {
insertNodeAt(anchorElement.get(), endingSelection().start());
RefPtrWillBeRawPtr<Text> textNode = Text::create(document(), m_url);
appendNode(textNode.get(), anchorElement.get());

Powered by Google App Engine
This is Rietveld 408576698