cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [3/4] android commit: CB-8317 Make it work to load about:blank and to dispatch exit message (close #149)
Date Wed, 21 Jan 2015 00:48:47 GMT
CB-8317 Make it work to load about:blank and to dispatch exit message (close #149)


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/d7fc37d3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/d7fc37d3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/d7fc37d3

Branch: refs/heads/3.7.x
Commit: d7fc37d365f066b22ebe5dc37eccf3a6e8323206
Parents: c3bdebd
Author: shingotoda <shingotoda1984@gmail.com>
Authored: Fri Jan 16 17:40:54 2015 +1100
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue Jan 20 19:46:20 2015 -0500

----------------------------------------------------------------------
 framework/src/org/apache/cordova/CordovaWebView.java       | 2 +-
 framework/src/org/apache/cordova/CordovaWebViewClient.java | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/d7fc37d3/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index 0cfa172..f728f74 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -454,7 +454,7 @@ public class CordovaWebView extends WebView {
         if (LOG.isLoggable(LOG.DEBUG) && !url.startsWith("javascript:")) {
             LOG.d(TAG, ">>> loadUrlNow()");
         }
-        if (url.startsWith("file://") || url.startsWith("javascript:") || internalWhitelist.isUrlWhiteListed(url))
{
+        if (url.startsWith("file://") || url.startsWith("javascript:") || url.startsWith("about:")
|| internalWhitelist.isUrlWhiteListed(url)) {
             super.loadUrl(url);
         }
     }

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/d7fc37d3/framework/src/org/apache/cordova/CordovaWebViewClient.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebViewClient.java b/framework/src/org/apache/cordova/CordovaWebViewClient.java
index 218cd81..6b3b460 100755
--- a/framework/src/org/apache/cordova/CordovaWebViewClient.java
+++ b/framework/src/org/apache/cordova/CordovaWebViewClient.java
@@ -193,8 +193,8 @@ public class CordovaWebViewClient extends WebViewClient {
     @Override
     public void onPageFinished(WebView view, String url) {
         super.onPageFinished(view, url);
-        // Ignore excessive calls.
-        if (!isCurrentlyLoading) {
+        // Ignore excessive calls, if url is not about:blank (CB-8317).
+        if (!isCurrentlyLoading && !url.startsWith("about:")) {
             return;
         }
         isCurrentlyLoading = false;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message