Changeset 164010 in webkit
- Timestamp:
- Feb 12, 2014 8:43:24 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r164004 r164010 1 2014-02-12 Anders Carlsson <andersca@apple.com> 2 3 Pass the related page in the WebPageConfiguration struct 4 https://bugs.webkit.org/show_bug.cgi?id=128714 5 6 Reviewed by Darin Adler. 7 8 * UIProcess/API/Cocoa/WKWebView.mm: 9 (-[WKWebView initWithFrame:configuration:]): 10 * UIProcess/API/ios/WKContentView.h: 11 * UIProcess/API/ios/WKContentView.mm: 12 (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::]): 13 1 14 2014-02-12 Anders Carlsson <andersca@apple.com> 2 15 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r164004 r164010 105 105 CGRect bounds = self.bounds; 106 106 107 WebKit::WebContext& context = *[_configuration processClass]->_context; 108 109 WebKit::WebPageConfiguration webPageConfiguration; 110 webPageConfiguration.preferences = [_configuration preferences]->_preferences.get(); 111 if (WKWebView *relatedWebView = [_configuration _relatedWebView]) 112 webPageConfiguration.relatedPage = relatedWebView->_page.get(); 113 107 114 #if PLATFORM(IOS) 108 115 _scrollView = adoptNS([[WKScrollView alloc] initWithFrame:bounds]); … … 112 119 [self addSubview:_scrollView.get()]; 113 120 114 _contentView = adoptNS([[WKContentView alloc] initWithFrame:bounds con figuration:_configuration.get()]);121 _contentView = adoptNS([[WKContentView alloc] initWithFrame:bounds context:context configuration:std::move(webPageConfiguration)]); 115 122 _page = _contentView->_page; 116 123 [_contentView setDelegate:self]; … … 123 130 124 131 #if PLATFORM(MAC) && !PLATFORM(IOS) 125 WebKit::WebPageConfiguration webPageConfiguration; 126 webPageConfiguration.preferences = [_configuration preferences]->_preferences.get(); 127 128 _wkView = [[WKView alloc] initWithFrame:bounds context:*[_configuration.get() processClass]->_context configuration:std::move(webPageConfiguration)]; 132 _wkView = [[WKView alloc] initWithFrame:bounds context:context configuration:std::move(webPageConfiguration)]; 129 133 [self addSubview:_wkView.get()]; 130 134 _page = WebKit::toImpl([_wkView pageRef]); -
trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.h
r163666 r164010 36 36 namespace WebKit { 37 37 class RemoteLayerTreeTransaction; 38 class WebContext; 39 struct WebPageConfiguration; 38 40 } 39 41 … … 56 58 @property (readonly) WKPageRef _pageRef; 57 59 58 - (instancetype)initWithFrame:(CGRect)frame con figuration:(WKWebViewConfiguration *)configuration;60 - (instancetype)initWithFrame:(CGRect)frame context:(WebKit::WebContext&)context configuration:(WebKit::WebPageConfiguration)webPageConfiguration; 59 61 60 62 - (id)initWithFrame:(CGRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef; -
trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm
r163836 r164010 96 96 } 97 97 98 - (instancetype)initWithFrame:(CGRect)frame con figuration:(WKWebViewConfiguration *)configuration98 - (instancetype)initWithFrame:(CGRect)frame context:(WebKit::WebContext&)context configuration:(WebKit::WebPageConfiguration)webPageConfiguration 99 99 { 100 100 if (!(self = [super initWithFrame:frame])) … … 105 105 _pageClient = std::make_unique<PageClientImpl>(self); 106 106 107 WebPageConfiguration webPageConfiguration; 108 webPageConfiguration.preferences = configuration.preferences->_preferences.get(); 109 110 _page = configuration.processClass->_context->createWebPage(*_pageClient, std::move(webPageConfiguration)); 107 _page = context.createWebPage(*_pageClient, std::move(webPageConfiguration)); 111 108 _page->initializeWebPage(); 112 109 _page->setIntrinsicDeviceScaleFactor([UIScreen mainScreen].scale);
Note: See TracChangeset
for help on using the changeset viewer.