summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--LayoutTests/platform/android-v8/fast/dom/Geolocation/callback-to-deleted-context-expected.txt10
-rw-r--r--LayoutTests/platform/android-v8/fast/dom/Geolocation/notimer-after-unload-expected.txt2
-rw-r--r--LayoutTests/platform/android-v8/http/tests/appcache/local-content-expected.txt6
-rw-r--r--LayoutTests/platform/android/fast/dom/Geolocation/callback-to-deleted-context-expected.txt (renamed from LayoutTests/platform/android-jsc/fast/dom/Geolocation/callback-to-deleted-context-expected.txt)0
-rw-r--r--LayoutTests/platform/android/fast/dom/Geolocation/notimer-after-unload-expected.txt (renamed from LayoutTests/platform/android-jsc/fast/dom/Geolocation/notimer-after-unload-expected.txt)0
-rw-r--r--LayoutTests/platform/android/http/tests/appcache/local-content-expected.txt (renamed from LayoutTests/platform/android-jsc/http/tests/appcache/local-content-expected.txt)0
-rw-r--r--WebCore/platform/graphics/android/PathAndroid.cpp27
-rw-r--r--WebKit/android/WebCoreSupport/WebRequest.cpp21
-rw-r--r--WebKit/android/WebCoreSupport/WebRequest.h1
-rw-r--r--WebKit/android/WebCoreSupport/WebRequestContext.cpp4
10 files changed, 34 insertions, 37 deletions
diff --git a/LayoutTests/platform/android-v8/fast/dom/Geolocation/callback-to-deleted-context-expected.txt b/LayoutTests/platform/android-v8/fast/dom/Geolocation/callback-to-deleted-context-expected.txt
deleted file mode 100644
index 5b4fd95..0000000
--- a/LayoutTests/platform/android-v8/fast/dom/Geolocation/callback-to-deleted-context-expected.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-Tests that when a Geolocation request is made from a remote frame, and that frame's script context goes away before the Geolocation callback is made, the callback is not made. If the callback is attempted, a crash will occur.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS No callbacks invoked
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/platform/android-v8/fast/dom/Geolocation/notimer-after-unload-expected.txt b/LayoutTests/platform/android-v8/fast/dom/Geolocation/notimer-after-unload-expected.txt
deleted file mode 100644
index 77f5ce9..0000000
--- a/LayoutTests/platform/android-v8/fast/dom/Geolocation/notimer-after-unload-expected.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-ALERT: unload-called
-You should have seen one unload alert appear.
diff --git a/LayoutTests/platform/android-v8/http/tests/appcache/local-content-expected.txt b/LayoutTests/platform/android-v8/http/tests/appcache/local-content-expected.txt
deleted file mode 100644
index b748094..0000000
--- a/LayoutTests/platform/android-v8/http/tests/appcache/local-content-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CONSOLE MESSAGE: line 0: Not allowed to load local resource: file:///usr/include/stdio.h
-Test that documents loaded from application cache don't get access to local resources accidentally.
-
-Should say SUCCESS:
-
-SUCCESS
diff --git a/LayoutTests/platform/android-jsc/fast/dom/Geolocation/callback-to-deleted-context-expected.txt b/LayoutTests/platform/android/fast/dom/Geolocation/callback-to-deleted-context-expected.txt
index 5b4fd95..5b4fd95 100644
--- a/LayoutTests/platform/android-jsc/fast/dom/Geolocation/callback-to-deleted-context-expected.txt
+++ b/LayoutTests/platform/android/fast/dom/Geolocation/callback-to-deleted-context-expected.txt
diff --git a/LayoutTests/platform/android-jsc/fast/dom/Geolocation/notimer-after-unload-expected.txt b/LayoutTests/platform/android/fast/dom/Geolocation/notimer-after-unload-expected.txt
index 77f5ce9..77f5ce9 100644
--- a/LayoutTests/platform/android-jsc/fast/dom/Geolocation/notimer-after-unload-expected.txt
+++ b/LayoutTests/platform/android/fast/dom/Geolocation/notimer-after-unload-expected.txt
diff --git a/LayoutTests/platform/android-jsc/http/tests/appcache/local-content-expected.txt b/LayoutTests/platform/android/http/tests/appcache/local-content-expected.txt
index b748094..b748094 100644
--- a/LayoutTests/platform/android-jsc/http/tests/appcache/local-content-expected.txt
+++ b/LayoutTests/platform/android/http/tests/appcache/local-content-expected.txt
diff --git a/WebCore/platform/graphics/android/PathAndroid.cpp b/WebCore/platform/graphics/android/PathAndroid.cpp
index 13bd888..5b7e019 100644
--- a/WebCore/platform/graphics/android/PathAndroid.cpp
+++ b/WebCore/platform/graphics/android/PathAndroid.cpp
@@ -30,6 +30,8 @@
#include "FloatRect.h"
#include "GraphicsContext.h"
#include "ImageBuffer.h"
+#include "PlatformGraphicsContext.h"
+#include "SkiaUtils.h"
#include "SkPaint.h"
#include "SkPath.h"
#include "SkRegion.h"
@@ -77,7 +79,11 @@ bool Path::hasCurrentPoint() const
FloatPoint Path::currentPoint() const
{
- // FIXME: Return current point of subpath. See b/2869593
+ if (hasCurrentPoint()) {
+ SkPoint lastPt;
+ m_path->getLastPt(&lastPt);
+ return lastPt;
+ }
float quietNaN = std::numeric_limits<float>::quiet_NaN();
return FloatPoint(quietNaN, quietNaN);
}
@@ -354,17 +360,6 @@ static FloatRect boundingBoxForCurrentStroke(GraphicsContext* context)
return FloatRect(SkScalarToFloat(r.fLeft), SkScalarToFloat(r.fTop),
SkScalarToFloat(r.width()), SkScalarToFloat(r.height()));
}
-
-static GraphicsContext* scratchContext()
-{
- static ImageBuffer* scratch = 0;
- // TODO(benm): Confirm with reed that it's correct to use the (default) DeviceRGB ColorSpace parameter in the call to create below.
- if (!scratch)
- scratch = ImageBuffer::create(IntSize(1, 1)).leakPtr();
- // We don't bother checking for failure creating the ImageBuffer, since our
- // ImageBuffer initializer won't fail.
- return scratch->context();
-}
FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier)
{
@@ -384,15 +379,13 @@ FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier)
#if ENABLE(SVG)
bool Path::strokeContains(StrokeStyleApplier* applier, const FloatPoint& point) const
{
-#if 0
- ASSERT(applier);
GraphicsContext* scratch = scratchContext();
scratch->save();
applier->strokeStyle(scratch);
SkPaint paint;
- scratch->platformContext()->setupPaintForStroking(&paint, 0, 0);
+ scratch->setupStrokePaint(&paint);
SkPath strokePath;
paint.getFillPath(*platformPath(), &strokePath);
bool contains = SkPathContainsPoint(&strokePath, point,
@@ -400,10 +393,6 @@ bool Path::strokeContains(StrokeStyleApplier* applier, const FloatPoint& point)
scratch->restore();
return contains;
-#else
- // FIXME:
- return false;
-#endif
}
#endif
diff --git a/WebKit/android/WebCoreSupport/WebRequest.cpp b/WebKit/android/WebCoreSupport/WebRequest.cpp
index 79e780e..8c718d8 100644
--- a/WebKit/android/WebCoreSupport/WebRequest.cpp
+++ b/WebKit/android/WebCoreSupport/WebRequest.cpp
@@ -35,6 +35,9 @@
#include <net/http/http_response_headers.h>
#include <net/url_request/url_request.h>
#include <string>
+#include <utils/AssetManager.h>
+
+extern android::AssetManager* globalAssetManager();
// TODO:
// - Get gmail log in to work
@@ -90,6 +93,9 @@ void WebRequest::start(bool isPrivateBrowsing)
if (m_request->url().SchemeIs("data"))
return handleDataURL(m_request->url());
+ if (m_request->url().SchemeIs("browser"))
+ return handleBrowserURL(m_request->url());
+
if (!isPrivateBrowsing)
m_request->set_context(WebRequestContext::GetAndroidContext());
else
@@ -134,6 +140,21 @@ void WebRequest::handleDataURL(GURL url)
finish(true);
}
+void WebRequest::handleBrowserURL(GURL url)
+{
+ std::string data("data:text/html;charset=utf-8,");
+ if (url.spec() == "browser:incognito") {
+ AssetManager* assetManager = globalAssetManager();
+ Asset* asset = assetManager->open("webkit/incognito_mode_start_page.html", Asset::ACCESS_BUFFER);
+ if (asset) {
+ data.append((const char*)asset->getBuffer(false), asset->getLength());
+ delete asset;
+ }
+ }
+ GURL dataURL(data.c_str());
+ handleDataURL(dataURL);
+}
+
// Called upon a server-initiated redirect. The delegate may call the
// request's Cancel method to prevent the redirect from being followed.
// Since there may be multiple chained redirects, there may also be more
diff --git a/WebKit/android/WebCoreSupport/WebRequest.h b/WebKit/android/WebCoreSupport/WebRequest.h
index 9c9c830..dc53ca6 100644
--- a/WebKit/android/WebCoreSupport/WebRequest.h
+++ b/WebKit/android/WebCoreSupport/WebRequest.h
@@ -61,6 +61,7 @@ private:
friend class base::RefCountedThreadSafe<WebRequest>;
virtual ~WebRequest();
void handleDataURL(GURL);
+ void handleBrowserURL(GURL);
void finish(bool success);
// Not owned
diff --git a/WebKit/android/WebCoreSupport/WebRequestContext.cpp b/WebKit/android/WebCoreSupport/WebRequestContext.cpp
index 6b2fe1b..1b7a5ee 100644
--- a/WebKit/android/WebCoreSupport/WebRequestContext.cpp
+++ b/WebKit/android/WebCoreSupport/WebRequestContext.cpp
@@ -120,6 +120,10 @@ WebRequestContext* WebRequestContext::GetAndroidContextForPath(const char* cooki
androidContext->http_transaction_factory_ = new net::HttpCache(androidContext->host_resolver(), net::ProxyService::CreateNull(), net::SSLConfigService::CreateSystemSSLConfigService(), 0, 0, 0, defaultBackend);
scoped_refptr<SQLitePersistentCookieStore> cookieDb = new SQLitePersistentCookieStore(cookiePath);
+
+ // This is needed for the page cycler
+ net::CookieMonster::EnableFileScheme();
+
androidContext->cookie_store_ = new net::CookieMonster(cookieDb.get(), 0);
return androidContext.release();