2011-06-09 Jay Civelli <jcivelli@chromium.org>
[WebKit-https.git] / Source / WebKit / chromium / src / WebPageSerializer.cpp
index 6df84bb6b96a8dd34c2686e2066128d7e0ff5bbd..cd0aec7e439fb018d055a3b1a972f6524c6c702e 100644 (file)
@@ -193,19 +193,15 @@ void WebPageSerializer::serialize(WebView* view, WebVector<WebPageSerializer::Re
         Resource resource;
         resource.url = iter->url;
         resource.mimeType = iter->mimeType.ascii();
-        // FIXME: we are copying all the resource data here. Idealy we would have a WebSharedData().
-        resource.data = WebCString(iter->data->data(), iter->data->size());
+        resource.data = iter->data;
         result.append(resource);
     }
-
     *resourcesParam = result;         
 }
 
-WebCString WebPageSerializer::serializeToMHTML(WebView* view)
+WebData WebPageSerializer::serializeToMHTML(WebView* view)
 {
-    RefPtr<SharedBuffer> mhtml = MHTMLArchive::generateMHTMLData(static_cast<WebViewImpl*>(view)->page());
-    // FIXME: we are copying all the data here. Idealy we would have a WebSharedData().
-    return WebCString(mhtml->data(), mhtml->size());
+    return MHTMLArchive::generateMHTMLData(static_cast<WebViewImpl*>(view)->page());
 }
 
 bool WebPageSerializer::serialize(WebFrame* frame,