Title: [88495] trunk/Source/WebKit/chromium
- Revision
- 88495
- Author
- [email protected]
- Date
- 2011-06-09 15:53:32 -0700 (Thu, 09 Jun 2011)
Log Message
2011-06-09 Sheriff Bot <[email protected]>
Unreviewed, rolling out r88486.
http://trac.webkit.org/changeset/88486
https://bugs.webkit.org/show_bug.cgi?id=62409
Broke chromium-win compile (Requested by jamesr on #webkit).
* public/WebData.h:
* public/WebPageSerializer.h:
* src/WebData.cpp:
* src/WebPageSerializer.cpp:
(WebKit::WebPageSerializer::serialize):
(WebKit::WebPageSerializer::serializeToMHTML):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (88494 => 88495)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-06-09 22:53:13 UTC (rev 88494)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-06-09 22:53:32 UTC (rev 88495)
@@ -1,3 +1,18 @@
+2011-06-09 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r88486.
+ http://trac.webkit.org/changeset/88486
+ https://bugs.webkit.org/show_bug.cgi?id=62409
+
+ Broke chromium-win compile (Requested by jamesr on #webkit).
+
+ * public/WebData.h:
+ * public/WebPageSerializer.h:
+ * src/WebData.cpp:
+ * src/WebPageSerializer.cpp:
+ (WebKit::WebPageSerializer::serialize):
+ (WebKit::WebPageSerializer::serializeToMHTML):
+
2011-06-09 Jay Civelli <[email protected]>
Reviewed by Darin Fisher.
Modified: trunk/Source/WebKit/chromium/public/WebData.h (88494 => 88495)
--- trunk/Source/WebKit/chromium/public/WebData.h 2011-06-09 22:53:13 UTC (rev 88494)
+++ trunk/Source/WebKit/chromium/public/WebData.h 2011-06-09 22:53:32 UTC (rev 88495)
@@ -76,22 +76,6 @@
WEBKIT_API void assign(const char* data, size_t size);
WEBKIT_API size_t size() const;
-
- // Sets |data| to point to the content of the WebData at index |position|
- // and returns the number of bytes available to be read in |data|.
- // Return 0 when no more data is left.
- // Usage:
- // const char* segment;
- // size_t position = 0;
- // while (size_t length = webData.getSomeData(segment, position)) {
- // // Use the data. for example: decoder->decode(segment, length);
- // position += length;
- // }
- WEBKIT_API size_t getSomeData(const char*& data, size_t position) const;
-
- // Returns all the data from the SharedBuffer.
- // Consider using getSomeData() as data() could require flattening the internal buffer
- // which might be expensive.
WEBKIT_API const char* data() const;
bool isEmpty() const { return !size(); }
Modified: trunk/Source/WebKit/chromium/public/WebPageSerializer.h (88494 => 88495)
--- trunk/Source/WebKit/chromium/public/WebPageSerializer.h 2011-06-09 22:53:13 UTC (rev 88494)
+++ trunk/Source/WebKit/chromium/public/WebPageSerializer.h 2011-06-09 22:53:32 UTC (rev 88495)
@@ -33,7 +33,6 @@
#include "WebCString.h"
#include "WebCommon.h"
-#include "WebData.h"
#include "WebURL.h"
namespace WebKit {
@@ -50,7 +49,7 @@
struct Resource {
WebURL url;
WebCString mimeType;
- WebData data;
+ WebCString data;
};
// Serializes all the frames from the WebView, retrieves the page's
@@ -60,7 +59,7 @@
WEBKIT_API static void serialize(WebView*, WebVector<Resource>*);
// Serializes the WebView contents to a MHTML representation.
- WEBKIT_API static WebData serializeToMHTML(WebView*);
+ WEBKIT_API static WebCString serializeToMHTML(WebView*);
// IMPORTANT:
// The API below is an older implementation of a pageserialization that
Modified: trunk/Source/WebKit/chromium/src/WebData.cpp (88494 => 88495)
--- trunk/Source/WebKit/chromium/src/WebData.cpp 2011-06-09 22:53:13 UTC (rev 88494)
+++ trunk/Source/WebKit/chromium/src/WebData.cpp 2011-06-09 22:53:32 UTC (rev 88495)
@@ -69,11 +69,6 @@
return const_cast<WebDataPrivate*>(m_private)->size();
}
-size_t WebData::getSomeData(const char*& data, size_t position) const
-{
- return m_private->getSomeData(data, position);
-}
-
const char* WebData::data() const
{
if (!m_private)
Modified: trunk/Source/WebKit/chromium/src/WebPageSerializer.cpp (88494 => 88495)
--- trunk/Source/WebKit/chromium/src/WebPageSerializer.cpp 2011-06-09 22:53:13 UTC (rev 88494)
+++ trunk/Source/WebKit/chromium/src/WebPageSerializer.cpp 2011-06-09 22:53:32 UTC (rev 88495)
@@ -193,15 +193,19 @@
Resource resource;
resource.url = ""
resource.mimeType = iter->mimeType.ascii();
- resource.data = ""
+ // FIXME: we are copying all the resource data here. Idealy we would have a WebSharedData().
+ resource.data = "" iter->data->size());
result.append(resource);
}
+
*resourcesParam = result;
}
-WebData WebPageSerializer::serializeToMHTML(WebView* view)
+WebCString WebPageSerializer::serializeToMHTML(WebView* view)
{
- return MHTMLArchive::generateMHTMLData(static_cast<WebViewImpl*>(view)->page());
+ 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());
}
bool WebPageSerializer::serialize(WebFrame* frame,
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes