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

Unified Diff: Source/core/editing/EditorCommand.cpp

Issue 788153003: Make execCommand("insertImage", false, "") not add a src attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tweak test style Created 6 years 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
« no previous file with comments | « LayoutTests/editing/execCommand/insertImage-src.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/EditorCommand.cpp
diff --git a/Source/core/editing/EditorCommand.cpp b/Source/core/editing/EditorCommand.cpp
index f21739a2dd0691a403624350bc8a40a7659c54f3..97873eb7c13f6a6baee3d77e4f1d49980ce2cb2b 100644
--- a/Source/core/editing/EditorCommand.cpp
+++ b/Source/core/editing/EditorCommand.cpp
@@ -517,7 +517,8 @@ static bool executeInsertImage(LocalFrame& frame, Event*, EditorCommandSource, c
{
ASSERT(frame.document());
RefPtrWillBeRawPtr<HTMLImageElement> image = HTMLImageElement::create(*frame.document());
- image->setSrc(value);
+ if (!value.isEmpty())
+ image->setSrc(value);
return executeInsertElement(frame, image.release());
}
« no previous file with comments | « LayoutTests/editing/execCommand/insertImage-src.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698