summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/WebProcess/WebPage/win
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-18 13:36:51 +0100
committerSteve Block <steveblock@google.com>2011-05-24 15:38:28 +0100
commit2fc2651226baac27029e38c9d6ef883fa32084db (patch)
treee396d4bf89dcce6ed02071be66212495b1df1dec /Source/WebKit2/WebProcess/WebPage/win
parentb3725cedeb43722b3b175aaeff70552e562d2c94 (diff)
downloadexternal_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.zip
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.gz
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.bz2
Merge WebKit at r78450: Initial merge by git.
Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage/win')
-rw-r--r--Source/WebKit2/WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp1
-rw-r--r--Source/WebKit2/WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp5
-rw-r--r--Source/WebKit2/WebProcess/WebPage/win/WebInspectorWin.cpp1
-rw-r--r--Source/WebKit2/WebProcess/WebPage/win/WebPageWin.cpp22
4 files changed, 27 insertions, 2 deletions
diff --git a/Source/WebKit2/WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp b/Source/WebKit2/WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp
index aa1f975..13f1e3f 100644
--- a/Source/WebKit2/WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "ChunkedUpdateDrawingArea.h"
#include "UpdateChunk.h"
diff --git a/Source/WebKit2/WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp b/Source/WebKit2/WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp
index cae79c2..3c2f3c9 100644
--- a/Source/WebKit2/WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp
@@ -23,10 +23,11 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if USE(ACCELERATED_COMPOSITING)
-
+#include "config.h"
#include "LayerBackedDrawingArea.h"
+#if USE(ACCELERATED_COMPOSITING)
+
using namespace WebCore;
namespace WebKit {
diff --git a/Source/WebKit2/WebProcess/WebPage/win/WebInspectorWin.cpp b/Source/WebKit2/WebProcess/WebPage/win/WebInspectorWin.cpp
index 4c30b8b..3ae0dae 100644
--- a/Source/WebKit2/WebProcess/WebPage/win/WebInspectorWin.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/win/WebInspectorWin.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WebInspector.h"
#if ENABLE(INSPECTOR)
diff --git a/Source/WebKit2/WebProcess/WebPage/win/WebPageWin.cpp b/Source/WebKit2/WebProcess/WebPage/win/WebPageWin.cpp
index d41972c..e20af3a 100644
--- a/Source/WebKit2/WebProcess/WebPage/win/WebPageWin.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/win/WebPageWin.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "WebPage.h"
#include "FontSmoothingLevel.h"
@@ -261,6 +262,27 @@ bool WebPage::platformHasLocalDataForURL(const WebCore::KURL& url)
#endif
}
+String WebPage::cachedResponseMIMETypeForURL(const WebCore::KURL& url)
+{
+#if USE(CFNETWORK)
+ RetainPtr<CFURLRef> cfURL(AdoptCF, url.createCFURL());
+ RetainPtr<CFMutableURLRequestRef> request(AdoptCF, CFURLRequestCreateMutable(0, cfURL.get(), kCFURLRequestCachePolicyReloadIgnoringCache, 60, 0));
+
+ RetainPtr<CFStringRef> userAgent(AdoptCF, userAgent().createCFString());
+ CFURLRequestSetHTTPHeaderFieldValue(request.get(), CFSTR("User-Agent"), userAgent.get());
+
+ RetainPtr<CFURLCacheRef> cache(AdoptCF, CFURLCacheCopySharedURLCache());
+
+ RetainPtr<CFCachedURLResponseRef> cachedResponse(AdoptCF, CFURLCacheCopyResponseForRequest(cache.get(), request.get()));
+
+ CFURLResponseRef response = CFCachedURLResponseGetWrappedResponse(cachedResponse.get());
+
+ return response ? CFURLResponseGetMIMEType(response) : String();
+#else
+ return String();
+#endif
+}
+
bool WebPage::canHandleRequest(const WebCore::ResourceRequest& request)
{
#if USE(CFNETWORK)