#include <substrate.h>
+MSClassHook(UIWebDocumentView)
+
@class WKView;
extern "C" void WebThreadLock();
- (void) setContentView:(WebView *)view;
@end
+@interface UIWebDocumentView : NSObject
+- (WebView *) webView;
+@end
+
static WBMarkup *SharedMarkup_;
@implementation WBMarkup
if ((self = [super init]) != nil) {
WebThreadLock();
- SharedMarkup_ = self;
+ if ($UIWebDocumentView == Nil)
+ view_ = [[WebView alloc] initWithFrame:CGRectMake(0, 0, 640, 5000)];
+ else
+ view_ = [[[$UIWebDocumentView alloc] initWithFrame:CGRectMake(0, 0, 640, 5000)] webView];
- view_ = [[WebView alloc] initWithFrame:CGRectMake(0, 0, 640, 5000)];
[view_ setDrawsBackground:NO];
WebPreferences *preferences([[WebPreferences alloc] initWithIdentifier:@"com.apple.webkit.webmarkup"]);