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

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

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 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
« no previous file with comments | « Source/core/editing/CreateLinkCommand.cpp ('k') | Source/core/editing/UnlinkCommand.cpp » ('j') | 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 6ecd44be276a96a5e9428cbf10ae36a637ad72be..1c6a0169c29b4987bf855723dabc989f8a594688 100644
--- a/Source/core/editing/EditorCommand.cpp
+++ b/Source/core/editing/EditorCommand.cpp
@@ -494,7 +494,8 @@ static bool executeInsertBacktab(Frame& frame, Event* event, EditorCommandSource
static bool executeInsertHorizontalRule(Frame& frame, Event*, EditorCommandSource, const String& value)
{
- RefPtr<HTMLHRElement> rule = HTMLHRElement::create(frame.document());
+ ASSERT(frame.document());
+ RefPtr<HTMLHRElement> rule = HTMLHRElement::create(*frame.document());
if (!value.isEmpty())
rule->setIdAttribute(value);
return executeInsertNode(frame, rule.release());
@@ -508,7 +509,8 @@ static bool executeInsertHTML(Frame& frame, Event*, EditorCommandSource, const S
static bool executeInsertImage(Frame& frame, Event*, EditorCommandSource, const String& value)
{
// FIXME: If userInterface is true, we should display a dialog box and let the user choose a local image.
- RefPtr<HTMLImageElement> image = HTMLImageElement::create(frame.document());
+ ASSERT(frame.document());
+ RefPtr<HTMLImageElement> image = HTMLImageElement::create(*frame.document());
image->setSrc(value);
return executeInsertNode(frame, image.release());
}
« no previous file with comments | « Source/core/editing/CreateLinkCommand.cpp ('k') | Source/core/editing/UnlinkCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698