You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/10/18 20:22:11 UTC
ios commit: Make CDVWebViewDelegate able to load pages after a failed
load.
Updated Branches:
refs/heads/master 82d16e526 -> 0c34e4dd1
Make CDVWebViewDelegate able to load pages after a failed load.
This can happen when a native plugin calls loadRequest while the current
page is still loading.
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/0c34e4dd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/0c34e4dd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/0c34e4dd
Branch: refs/heads/master
Commit: 0c34e4dd183f6b15d275cba0c5fc427df4dbd727
Parents: 82d16e5
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri Oct 18 14:21:11 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Oct 18 14:22:04 2013 -0400
----------------------------------------------------------------------
CordovaLib/Classes/CDVWebViewDelegate.m | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/0c34e4dd/CordovaLib/Classes/CDVWebViewDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVWebViewDelegate.m b/CordovaLib/Classes/CDVWebViewDelegate.m
index 6576b14..2c0b6d8 100644
--- a/CordovaLib/Classes/CDVWebViewDelegate.m
+++ b/CordovaLib/Classes/CDVWebViewDelegate.m
@@ -83,12 +83,12 @@
#define VerboseLog(...) do {} while (0)
typedef enum {
- STATE_IDLE,
- STATE_WAITING_FOR_LOAD_START,
- STATE_WAITING_FOR_LOAD_FINISH,
- STATE_IOS5_POLLING_FOR_LOAD_START,
- STATE_IOS5_POLLING_FOR_LOAD_FINISH,
- STATE_CANCELLED
+ STATE_IDLE = 0,
+ STATE_WAITING_FOR_LOAD_START = 1,
+ STATE_WAITING_FOR_LOAD_FINISH = 2,
+ STATE_IOS5_POLLING_FOR_LOAD_START = 3,
+ STATE_IOS5_POLLING_FOR_LOAD_FINISH = 4,
+ STATE_CANCELLED = 5
} State;
@implementation CDVWebViewDelegate
@@ -227,6 +227,7 @@ typedef enum {
case STATE_IDLE:
case STATE_IOS5_POLLING_FOR_LOAD_START:
+ case STATE_CANCELLED:
// Page navigation start.
_loadCount = 0;
_state = STATE_WAITING_FOR_LOAD_START;