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

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

Issue 115693010: Fix Range.createContextualFragment for non-Element contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Handle SVG elements. Created 7 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 | « Source/core/editing/markup.h ('k') | Source/core/html/HTMLDocument.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/markup.cpp
diff --git a/Source/core/editing/markup.cpp b/Source/core/editing/markup.cpp
index 184ed05a8a271e9cc874a41d94ad39fcc278523a..a99a7225ac6f3f0ad13896276511b7aa662bbbba 100644
--- a/Source/core/editing/markup.cpp
+++ b/Source/core/editing/markup.cpp
@@ -57,6 +57,7 @@
#include "core/html/HTMLTextFormControlElement.h"
#include "core/frame/Frame.h"
#include "core/rendering/RenderObject.h"
+#include "core/svg/SVGElement.h"
#include "platform/weborigin/KURL.h"
#include "wtf/StdLibExtras.h"
#include "wtf/text/StringBuilder.h"
@@ -1025,6 +1026,16 @@ PassRefPtr<DocumentFragment> createContextualFragment(const String& markup, HTML
return fragment.release();
}
+PassRefPtr<DocumentFragment> createContextualFragment(const String& markup, SVGElement* element, ParserContentPolicy parserContentPolicy, ExceptionState& exceptionState)
+{
+ ASSERT(element);
+
+ RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(markup, element, parserContentPolicy, "createContextualFragment", exceptionState);
+ if (!fragment)
+ return 0;
+ return fragment.release();
+}
+
void replaceChildrenWithFragment(ContainerNode* container, PassRefPtr<DocumentFragment> fragment, ExceptionState& exceptionState)
{
ASSERT(container);
« no previous file with comments | « Source/core/editing/markup.h ('k') | Source/core/html/HTMLDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698