[Attachment Support] Create attachment elements when dropping files on iOS
[WebKit-https.git] / Source / WebCore / editing / WebContentReader.cpp
index cf419367d184d18d382cad2ec936a33827b54a4f..544912a7493c716807777e35eee023e4e23ea734 100644 (file)
 
 namespace WebCore {
 
 
 namespace WebCore {
 
+DocumentFragment& WebContentReader::ensureFragment()
+{
+    ASSERT(frame.document());
+    if (!fragment)
+        fragment = frame.document()->createDocumentFragment();
+    return *fragment;
+}
+
 void WebContentReader::addFragment(Ref<DocumentFragment>&& newFragment)
 {
     if (!fragment)
 void WebContentReader::addFragment(Ref<DocumentFragment>&& newFragment)
 {
     if (!fragment)