summaryrefslogtreecommitdiff
path: root/CyteKit/WebViewController.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2013-12-23 16:18:02 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2013-12-23 16:18:02 -0800
commitd32f96beabb726c84dfeaa3a51bb365eded7f8f9 (patch)
treec60863e6007bd76307d1929b7c98a6eb129b50a4 /CyteKit/WebViewController.mm
parent5738f070516b40d0ae4e0ebb570ec86449b4ad60 (diff)
Fix background color so it works on all iOS builds.
Diffstat (limited to 'CyteKit/WebViewController.mm')
-rw-r--r--CyteKit/WebViewController.mm31
1 files changed, 14 insertions, 17 deletions
diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm
index f5ec060..c4931cb 100644
--- a/CyteKit/WebViewController.mm
+++ b/CyteKit/WebViewController.mm
@@ -418,12 +418,12 @@ float CYScrollViewDecelerationRateNormal;
if (page == nil) {
CyteWebViewController *browser([[[class_ alloc] init] autorelease]);
- [browser setColor:color_];
[browser setRequest:request];
page = browser;
}
[page setDelegate:delegate_];
+ [page setPageColor:color_];
if (!pop) {
[[self navigationItem] setTitle:title_];
@@ -579,20 +579,18 @@ float CYScrollViewDecelerationRateNormal;
float blue([[rgb blue] getFloatValue:DOM_CSS_NUMBER]);
float alpha([[rgb alpha] getFloatValue:DOM_CSS_NUMBER]);
- uic = [UIColor
- colorWithRed:(red / 255)
- green:(green / 255)
- blue:(blue / 255)
- alpha:alpha
- ];
+ if (alpha == 1)
+ uic = [UIColor
+ colorWithRed:(red / 255)
+ green:(green / 255)
+ blue:(blue / 255)
+ alpha:alpha
+ ];
}
}
- if (uic == nil)
- uic = [UIColor groupTableViewBackgroundColor];
-
- color_ = uic;
- [scroller_ setBackgroundColor:uic];
+ [self setPageColor:uic];
+ [scroller_ setBackgroundColor:color_];
break;
}
}
@@ -838,7 +836,7 @@ float CYScrollViewDecelerationRateNormal;
width_ = width;
class_ = _class;
- color_ = [UIColor groupTableViewBackgroundColor];
+ [self setPageColor:nil];
allowsNavigationAction_ = true;
@@ -956,6 +954,9 @@ float CYScrollViewDecelerationRateNormal;
//[scroller setAllowsRubberBanding:YES];
}
+ [webview_ setOpaque:NO];
+ [webview_ setBackgroundColor:color_];
+
[scroller_ setFixedBackgroundPattern:YES];
[scroller_ setBackgroundColor:color_];
[scroller_ setClipsSubviews:YES];
@@ -1000,10 +1001,6 @@ float CYScrollViewDecelerationRateNormal;
} return self;
}
-- (void) setColor:(UIColor *)color {
- color_ = color;
-}
-
- (void) callFunction:(WebScriptObject *)function {
WebThreadLocked lock;