]> git.saurik.com Git - cydia.git/commitdiff
OMG, that was a stupid Browser bug.
authorJay Freeman (saurik) <saurik@saurk.com>
Fri, 19 Jun 2009 20:35:17 +0000 (20:35 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 07:13:57 +0000 (07:13 +0000)
UICaboodle/BrowserView.h
UICaboodle/BrowserView.mm

index af083d3392acc0c46d4c7e585ece7a0236a03180..f1a9dbcb56101e97d0226e65e2b9c01dbc25d5a6 100644 (file)
@@ -76,6 +76,8 @@
 
     CGSize size_;
     bool editing_;
 
     CGSize size_;
     bool editing_;
+
+    Class class_;
 }
 
 - (void) alertSheet:(UIActionSheet *)sheet buttonClicked:(int)button;
 }
 
 - (void) alertSheet:(UIActionSheet *)sheet buttonClicked:(int)button;
@@ -94,6 +96,7 @@
 
 - (id) initWithBook:(RVBook *)book;
 - (id) initWithBook:(RVBook *)book forWidth:(float)width;
 
 - (id) initWithBook:(RVBook *)book;
 - (id) initWithBook:(RVBook *)book forWidth:(float)width;
+- (id) initWithBook:(RVBook *)book forWidth:(float)width ofClass:(Class)_class;
 
 - (NSString *) stringByEvaluatingJavaScriptFromString:(NSString *)script;
 - (void) callFunction:(WebScriptObject *)function;
 
 - (NSString *) stringByEvaluatingJavaScriptFromString:(NSString *)script;
 - (void) callFunction:(WebScriptObject *)function;
index fee3cf0c2e8960b19bc7c9e419d9f0f968b61f11..b99c2d2bb4f4d76309814f7bd69db1e7c63f7105 100644 (file)
@@ -643,7 +643,7 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:UCLocalize(
 
                     [self setBackButtonTitle:title_];
 
 
                     [self setBackButtonTitle:title_];
 
-                    BrowserView *browser([[[BrowserView alloc] initWithBook:book] autorelease]);
+                    BrowserView *browser([[[class_ alloc] initWithBook:book] autorelease]);
                     [browser loadURL:url];
                     page = browser;
                 }
                     [browser loadURL:url];
                     page = browser;
                 }
@@ -896,7 +896,7 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:UCLocalize(
     RVBook *book(!popup_ ? book_ : [[[RVPopUpBook alloc] initWithFrame:[delegate_ popUpBounds]] autorelease]);
 
     /* XXX: deal with cydia:// pages */
     RVBook *book(!popup_ ? book_ : [[[RVPopUpBook alloc] initWithFrame:[delegate_ popUpBounds]] autorelease]);
 
     /* XXX: deal with cydia:// pages */
-    BrowserView *browser([[[BrowserView alloc] initWithBook:book forWidth:width] autorelease]);
+    BrowserView *browser([[[class_ alloc] initWithBook:book forWidth:width] autorelease]);
 
     if (features != nil && popup_) {
         [book setDelegate:delegate_];
 
     if (features != nil && popup_) {
         [book setDelegate:delegate_];
@@ -1158,8 +1158,9 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:UCLocalize(
     [self _setTileDrawingEnabled:YES];
 }
 
     [self _setTileDrawingEnabled:YES];
 }
 
-- (id) initWithBook:(RVBook *)book forWidth:(float)width {
+- (id) initWithBook:(RVBook *)book forWidth:(float)width ofClass:(Class)_class {
     if ((self = [super initWithBook:book]) != nil) {
     if ((self = [super initWithBook:book]) != nil) {
+        class_ = _class;
         loading_ = [[NSMutableSet alloc] initWithCapacity:3];
         popup_ = false;
 
         loading_ = [[NSMutableSet alloc] initWithCapacity:3];
         popup_ = false;
 
@@ -1289,6 +1290,10 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:UCLocalize(
     } return self;
 }
 
     } return self;
 }
 
+- (id) initWithBook:(RVBook *)book forWidth:(float)width {
+    return [self initWithBook:book forWidth:width ofClass:[self class]];
+}
+
 - (id) initWithBook:(RVBook *)book {
     return [self initWithBook:book forWidth:0];
 }
 - (id) initWithBook:(RVBook *)book {
     return [self initWithBook:book forWidth:0];
 }