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

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

Issue 23453033: Have DOMPatchSupport and DocumentFragment deal with Document references (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/CompositeEditCommand.cpp ('k') | Source/core/editing/markup.h » ('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 1c6a0169c29b4987bf855723dabc989f8a594688..f098e7b1cf878c4c40b7621d6dec4d87a33280eb 100644
--- a/Source/core/editing/EditorCommand.cpp
+++ b/Source/core/editing/EditorCommand.cpp
@@ -199,7 +199,8 @@ static bool executeInsertFragment(Frame& frame, PassRefPtr<DocumentFragment> fra
static bool executeInsertNode(Frame& frame, PassRefPtr<Node> content)
{
- RefPtr<DocumentFragment> fragment = DocumentFragment::create(frame.document());
+ ASSERT(frame.document());
+ RefPtr<DocumentFragment> fragment = DocumentFragment::create(*frame.document());
TrackExceptionState es;
fragment->appendChild(content, es);
if (es.hadException())
@@ -503,7 +504,8 @@ static bool executeInsertHorizontalRule(Frame& frame, Event*, EditorCommandSourc
static bool executeInsertHTML(Frame& frame, Event*, EditorCommandSource, const String& value)
{
- return executeInsertFragment(frame, createFragmentFromMarkup(frame.document(), value, ""));
+ ASSERT(frame.document());
+ return executeInsertFragment(frame, createFragmentFromMarkup(*frame.document(), value, ""));
}
static bool executeInsertImage(Frame& frame, Event*, EditorCommandSource, const String& value)
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/markup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698