<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[159859] trunk/Source/WebKit2</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/159859">159859</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2013-11-28 13:01:11 -0800 (Thu, 28 Nov 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>Perform some spring cleaning to WKContentView and WKView
https://bugs.webkit.org/show_bug.cgi?id=124961
Reviewed by Dan Bernstein.
- Store the PageClientImpl in a std::unique_ptr.
- Remove the WKBrowsingContextController internal load delegate. Replace its use with
a new PageClient function, didCommitLoadForMainFrame.
- Fix typo in the WKContentViewDelegate. contentViewdidCommitLoadForMainFrame -> contentViewDidCommitLoadForMainFrame.
- Add initializers for WKContentView and WKView that take WKContextRefs and WKPageGroupRefs to match the Mac WKView.
These are needed for WebKitTestRunner.
- Require a WKProcessGroup (or WKContextRef) and a WKBrowsingContextGroup (or WKPageGroupRef).
- Stop caching the WKProcessGroup and WKBrowsingContextGroup on the WKContentView.
- Remove incorrect implementations of initWithCoder.
- Make WKContentView lazily create its WKBrowsingContextController wrapper.
* UIProcess/API/ios/PageClientImplIOS.h:
* UIProcess/API/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
(WebKit::PageClientImpl::mainDocumentDidReceiveMobileDocType):
* UIProcess/API/ios/WKContentView.h:
* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView initWithCoder:]):
(-[WKContentView initWithFrame:processGroup:browsingContextGroup:]):
(-[WKContentView browsingContextController]):
(-[WKContentView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
(-[WKContentView _didCommitLoadForMainFrame]):
(-[WKContentView _didReceiveMobileDocTypeForMainFrame]):
(-[WKContentView _didChangeViewportArguments:WebCore::]):
(-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]):
(-[WKContentView _pageRef]):
(-[WKContentView initWithFrame:contextRef:pageGroupRef:]):
(-[WKContentView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
* UIProcess/API/ios/WKContentViewInternal.h:
* UIProcess/API/ios/WKContentViewPrivate.h: Added.
* UIProcess/API/ios/WKView.mm:
(-[WKView initWithFrame:processGroup:browsingContextGroup:]):
(-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
(-[WKView contentViewDidCommitLoadForMainFrame:]):
(-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
(-[WKView pageRef]):
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
(-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
* UIProcess/API/mac/WKBrowsingContextController.mm:
(didCommitLoadForFrame):
* UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
* UIProcess/API/mac/WKViewPrivate.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosPageClientImplIOSh">trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosPageClientImplIOSmm">trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosWKContentViewh">trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosWKContentViewmm">trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosWKContentViewInternalh">trunk/Source/WebKit2/UIProcess/API/ios/WKContentViewInternal.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosWKViewmm">trunk/Source/WebKit2/UIProcess/API/ios/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacPageClientImplh">trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacPageClientImplmm">trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKBrowsingContextControllermm">trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKBrowsingContextControllerInternalh">trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewPrivateh">trunk/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosWKContentViewPrivateh">trunk/Source/WebKit2/UIProcess/API/ios/WKContentViewPrivate.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (159858 => 159859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2013-11-28 20:59:06 UTC (rev 159858)
+++ trunk/Source/WebKit2/ChangeLog        2013-11-28 21:01:11 UTC (rev 159859)
</span><span class="lines">@@ -1,3 +1,60 @@
</span><ins>+2013-11-27 Sam Weinig <sam@webkit.org>
+
+ Perform some spring cleaning to WKContentView and WKView
+ https://bugs.webkit.org/show_bug.cgi?id=124961
+
+ Reviewed by Dan Bernstein.
+
+ - Store the PageClientImpl in a std::unique_ptr.
+ - Remove the WKBrowsingContextController internal load delegate. Replace its use with
+ a new PageClient function, didCommitLoadForMainFrame.
+ - Fix typo in the WKContentViewDelegate. contentViewdidCommitLoadForMainFrame -> contentViewDidCommitLoadForMainFrame.
+ - Add initializers for WKContentView and WKView that take WKContextRefs and WKPageGroupRefs to match the Mac WKView.
+ These are needed for WebKitTestRunner.
+ - Require a WKProcessGroup (or WKContextRef) and a WKBrowsingContextGroup (or WKPageGroupRef).
+ - Stop caching the WKProcessGroup and WKBrowsingContextGroup on the WKContentView.
+ - Remove incorrect implementations of initWithCoder.
+ - Make WKContentView lazily create its WKBrowsingContextController wrapper.
+
+ * UIProcess/API/ios/PageClientImplIOS.h:
+ * UIProcess/API/ios/PageClientImplIOS.mm:
+ (WebKit::PageClientImpl::PageClientImpl):
+ (WebKit::PageClientImpl::didCommitLoadForMainFrame):
+ (WebKit::PageClientImpl::mainDocumentDidReceiveMobileDocType):
+ * UIProcess/API/ios/WKContentView.h:
+ * UIProcess/API/ios/WKContentView.mm:
+ (-[WKContentView initWithCoder:]):
+ (-[WKContentView initWithFrame:processGroup:browsingContextGroup:]):
+ (-[WKContentView browsingContextController]):
+ (-[WKContentView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
+ (-[WKContentView _didCommitLoadForMainFrame]):
+ (-[WKContentView _didReceiveMobileDocTypeForMainFrame]):
+ (-[WKContentView _didChangeViewportArguments:WebCore::]):
+ (-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]):
+ (-[WKContentView _pageRef]):
+ (-[WKContentView initWithFrame:contextRef:pageGroupRef:]):
+ (-[WKContentView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
+ * UIProcess/API/ios/WKContentViewInternal.h:
+ * UIProcess/API/ios/WKContentViewPrivate.h: Added.
+ * UIProcess/API/ios/WKView.mm:
+ (-[WKView initWithFrame:processGroup:browsingContextGroup:]):
+ (-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
+ (-[WKView contentViewDidCommitLoadForMainFrame:]):
+ (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
+ (-[WKView pageRef]):
+ (-[WKView initWithFrame:contextRef:pageGroupRef:]):
+ (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
+ * UIProcess/API/mac/PageClientImpl.h:
+ * UIProcess/API/mac/PageClientImpl.mm:
+ (WebKit::PageClientImpl::didCommitLoadForMainFrame):
+ * UIProcess/API/mac/WKBrowsingContextController.mm:
+ (didCommitLoadForFrame):
+ * UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
+ * UIProcess/API/mac/WKViewPrivate.h:
+ * UIProcess/PageClient.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::didCommitLoadForFrame):
+
</ins><span class="cx"> 2013-11-28 Éva Balázsfalvi <balazsfalvi.eva@stud.u-szeged.hu>
</span><span class="cx">
</span><span class="cx"> Buildfix after r159824 for GCC 4.6
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosPageClientImplIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h (159858 => 159859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h        2013-11-28 20:59:06 UTC (rev 159858)
+++ trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h        2013-11-28 21:01:11 UTC (rev 159859)
</span><span class="lines">@@ -35,12 +35,10 @@
</span><span class="cx">
</span><span class="cx"> class PageClientImpl : public PageClient {
</span><span class="cx"> public:
</span><del>- static PassOwnPtr<PageClientImpl> create(WKContentView *);
</del><ins>+ explicit PageClientImpl(WKContentView *);
</ins><span class="cx"> virtual ~PageClientImpl();
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- explicit PageClientImpl(WKContentView *);
-
</del><span class="cx"> virtual std::unique_ptr<DrawingAreaProxy> createDrawingAreaProxy() OVERRIDE;
</span><span class="cx"> virtual void setViewNeedsDisplay(const WebCore::IntRect&) OVERRIDE;
</span><span class="cx"> virtual void displayView() OVERRIDE;
</span><span class="lines">@@ -58,6 +56,7 @@
</span><span class="cx"> virtual void preferencesDidChange() OVERRIDE;
</span><span class="cx"> virtual void toolTipChanged(const String&, const String&) OVERRIDE;
</span><span class="cx"> virtual bool decidePolicyForGeolocationPermissionRequest(WebFrameProxy&, WebSecurityOrigin&, GeolocationPermissionRequestProxy&) OVERRIDE;
</span><ins>+ virtual void didCommitLoadForMainFrame() OVERRIDE;
</ins><span class="cx"> virtual void didChangeContentSize(const WebCore::IntSize&) OVERRIDE;
</span><span class="cx"> virtual void setCursor(const WebCore::Cursor&) OVERRIDE;
</span><span class="cx"> virtual void setCursorHiddenUntilMouseMoves(bool) OVERRIDE;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm (159858 => 159859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm        2013-11-28 20:59:06 UTC (rev 159858)
+++ trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm        2013-11-28 21:01:11 UTC (rev 159859)
</span><span class="lines">@@ -42,20 +42,15 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-PassOwnPtr<PageClientImpl> PageClientImpl::create(WKContentView *view)
</del><ins>+PageClientImpl::PageClientImpl(WKContentView *view)
+ : m_view(view)
</ins><span class="cx"> {
</span><del>- return adoptPtr(new PageClientImpl(view));
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PageClientImpl::~PageClientImpl()
</span><span class="cx"> {
</span><span class="cx"> }
</span><del>-
-PageClientImpl::PageClientImpl(WKContentView *view)
- : m_view(view)
-{
-}
-
</del><ins>+
</ins><span class="cx"> std::unique_ptr<DrawingAreaProxy> PageClientImpl::createDrawingAreaProxy()
</span><span class="cx"> {
</span><span class="cx"> return [m_view _createDrawingAreaProxy];
</span><span class="lines">@@ -150,6 +145,11 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void PageClientImpl::didCommitLoadForMainFrame()
+{
+ [m_view _didCommitLoadForMainFrame];
+}
+
</ins><span class="cx"> void PageClientImpl::didChangeContentSize(const IntSize& contentsSize)
</span><span class="cx"> {
</span><span class="cx"> [m_view _didChangeContentSize:contentsSize];
</span><span class="lines">@@ -318,7 +318,7 @@
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::mainDocumentDidReceiveMobileDocType()
</span><span class="cx"> {
</span><del>- [m_view _mainDocumentDidReceiveMobileDocType];
</del><ins>+ [m_view _didReceiveMobileDocTypeForMainFrame];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKContentViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.h (159858 => 159859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.h        2013-11-28 20:59:06 UTC (rev 159858)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.h        2013-11-28 21:01:11 UTC (rev 159859)
</span><span class="lines">@@ -38,10 +38,9 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> @protocol WKContentViewDelegate <NSObject>
</span><del>-
</del><span class="cx"> @optional
</span><span class="cx"> - (void)contentView:(WKContentView *)contentView contentsSizeDidChange:(CGSize)newSize;
</span><del>-- (void)contentViewdidCommitLoadForMainFrame:(WKContentView *)contentView;
</del><ins>+- (void)contentViewDidCommitLoadForMainFrame:(WKContentView *)contentView;
</ins><span class="cx"> - (void)contentViewDidReceiveMobileDocType:(WKContentView *)contentView;
</span><span class="cx"> - (void)contentView:(WKContentView *)contentView didChangeViewportArgumentsSize:(CGSize)newSize initialScale:(float)initialScale minimumScale:(float)minimumScale maximumScale:(float)maximumScale allowsUserScaling:(float)allowsUserScaling;
</span><span class="cx">
</span><span class="lines">@@ -49,6 +48,7 @@
</span><span class="cx">
</span><span class="cx"> WK_API_CLASS
</span><span class="cx"> @interface WKContentView : UIView
</span><ins>+
</ins><span class="cx"> @property (readonly, nonatomic) WKBrowsingContextController *browsingContextController;
</span><span class="cx">
</span><span class="cx"> @property (nonatomic, assign) id <WKContentViewDelegate> delegate;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKContentViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm (159858 => 159859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm        2013-11-28 20:59:06 UTC (rev 159858)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm        2013-11-28 21:01:11 UTC (rev 159859)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> #import "WKBrowsingContextGroupPrivate.h"
</span><span class="cx"> #import "WKGeolocationProviderIOS.h"
</span><span class="cx"> #import "WKInteractionView.h"
</span><del>-#import "WKProcessGroupPrivate.h"
</del><ins>+#import "WKProcessGroupInternal.h"
</ins><span class="cx"> #import "WebContext.h"
</span><span class="cx"> #import "WebFrameProxy.h"
</span><span class="cx"> #import "WebPageGroup.h"
</span><span class="lines">@@ -48,13 +48,8 @@
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> using namespace WebKit;
</span><span class="cx">
</span><del>-@interface WKContentView (Internal) <WKBrowsingContextLoadDelegateInternal>
-@end
-
</del><span class="cx"> @implementation WKContentView {
</span><del>- RetainPtr<WKProcessGroup> _processGroup;
- RetainPtr<WKBrowsingContextGroup> _browsingContextGroup;
- OwnPtr<PageClientImpl> _pageClient;
</del><ins>+ std::unique_ptr<PageClientImpl> _pageClient;
</ins><span class="cx"> RefPtr<WebPageProxy> _page;
</span><span class="cx">
</span><span class="cx"> RetainPtr<WKBrowsingContextController> _browsingContextController;
</span><span class="lines">@@ -65,24 +60,17 @@
</span><span class="cx">
</span><span class="cx"> - (id)initWithCoder:(NSCoder *)coder
</span><span class="cx"> {
</span><del>- if (!(self = [super initWithCoder:coder]))
- return nil;
-
- [self _commonInitWithProcessGroup:nil browsingContextGroup:nil];
- return self;
</del><ins>+ // FIXME: Implement.
+ [self release];
+ return nil;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-- (id)initWithFrame:(CGRect)frame
-{
- return [self initWithFrame:frame processGroup:nil browsingContextGroup:nil];
-}
-
</del><span class="cx"> - (id)initWithFrame:(CGRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup
</span><span class="cx"> {
</span><span class="cx"> if (!(self = [super initWithFrame:frame]))
</span><span class="cx"> return nil;
</span><span class="cx">
</span><del>- [self _commonInitWithProcessGroup:processGroup browsingContextGroup:browsingContextGroup];
</del><ins>+ [self _commonInitializationWithContextRef:processGroup._contextRef pageGroupRef:browsingContextGroup._pageGroupRef relatedToPage:nullptr];
</ins><span class="cx"> return self;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -116,6 +104,8 @@
</span><span class="cx">
</span><span class="cx"> - (WKBrowsingContextController *)browsingContextController
</span><span class="cx"> {
</span><ins>+ if (!_browsingContextController)
+ _browsingContextController = adoptNS([[WKBrowsingContextController alloc] _initWithPageRef:toAPI(_page.get())]);
</ins><span class="cx"> return _browsingContextController.get();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -148,12 +138,9 @@
</span><span class="cx"> _page->didFinishZooming(scale);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)_decidePolicyForGeolocationRequestFromOrigin:(WebSecurityOrigin&)origin frame:(WebFrameProxy&)frame request:(GeolocationPermissionRequestProxy&)permissionRequest
-{
- [[_processGroup _geolocationProvider] decidePolicyForGeolocationRequestFromOrigin:toAPI(&origin) frame:toAPI(&frame) request:toAPI(&permissionRequest) window:[self window]];
-}
</del><ins>+#pragma mark Internal
</ins><span class="cx">
</span><del>-- (void)_commonInitWithProcessGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup
</del><ins>+- (void)_commonInitializationWithContextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef relatedToPage:(WKPageRef)relatedPage
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: This should not be necessary, find why hit testing does not work otherwise.
</span><span class="cx"> // <rdar://problem/12287363>
</span><span class="lines">@@ -163,18 +150,12 @@
</span><span class="cx"> InitWebCoreSystemInterface();
</span><span class="cx"> RunLoop::initializeMainRunLoop();
</span><span class="cx">
</span><del>- _processGroup = processGroup ? processGroup : adoptNS([[WKProcessGroup alloc] init]);
- _browsingContextGroup = browsingContextGroup ? browsingContextGroup : adoptNS([[WKBrowsingContextGroup alloc] initWithIdentifier:nil]);
- _pageClient = PageClientImpl::create(self);
- WebContext* processContext = toImpl([_processGroup _contextRef]);
- _page = processContext->createWebPage(_pageClient.get(), toImpl([_browsingContextGroup _pageGroupRef]));
</del><ins>+ _pageClient = std::make_unique<PageClientImpl>(self);
+ _page = toImpl(contextRef)->createWebPage(_pageClient.get(), toImpl(pageGroupRef), toImpl(relatedPage));
</ins><span class="cx"> _page->initializeWebPage();
</span><span class="cx"> _page->setIntrinsicDeviceScaleFactor([UIScreen mainScreen].scale);
</span><span class="cx"> _page->setUseFixedLayout(true);
</span><span class="cx">
</span><del>- _browsingContextController = adoptNS([[WKBrowsingContextController alloc] _initWithPageRef:toAPI(_page.get())]);
- [_browsingContextController setLoadDelegateInternal:self];
-
</del><span class="cx"> WebContext::statistics().wkViewCount++;
</span><span class="cx">
</span><span class="cx"> _rootContentView = adoptNS([[UIView alloc] init]);
</span><span class="lines">@@ -202,17 +183,6 @@
</span><span class="cx"> _page->setIntrinsicDeviceScaleFactor(screen.scale);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)_didChangeViewportArguments:(const WebCore::ViewportArguments&)arguments
-{
- if ([_delegate respondsToSelector:@selector(contentView:didChangeViewportArgumentsSize:initialScale:minimumScale:maximumScale:allowsUserScaling:)])
- [_delegate contentView:self
-didChangeViewportArgumentsSize:CGSizeMake(arguments.width, arguments.height)
- initialScale:arguments.zoom
- minimumScale:arguments.minZoom
- maximumScale:arguments.maxZoom
- allowsUserScaling:arguments.userZoom];
-}
-
</del><span class="cx"> #pragma mark PageClientImpl methods
</span><span class="cx">
</span><span class="cx"> - (std::unique_ptr<DrawingAreaProxy>)_createDrawingAreaProxy
</span><span class="lines">@@ -230,11 +200,10 @@
</span><span class="cx"> // FIXME: Implement.
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)browsingContextControllerDidCommitLoad:(WKBrowsingContextController *)sender
</del><ins>+- (void)_didCommitLoadForMainFrame
</ins><span class="cx"> {
</span><del>- ASSERT(sender == _browsingContextController);
- if ([_delegate respondsToSelector:@selector(contentViewdidCommitLoadForMainFrame:)])
- [_delegate contentViewdidCommitLoadForMainFrame:self];
</del><ins>+ if ([_delegate respondsToSelector:@selector(contentViewDidCommitLoadForMainFrame:)])
+ [_delegate contentViewDidCommitLoadForMainFrame:self];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_didChangeContentSize:(CGSize)contentsSize
</span><span class="lines">@@ -247,11 +216,16 @@
</span><span class="cx"> [_delegate contentView:self contentsSizeDidChange:contentsSize];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)_mainDocumentDidReceiveMobileDocType
</del><ins>+- (void)_didReceiveMobileDocTypeForMainFrame
</ins><span class="cx"> {
</span><span class="cx"> if ([_delegate respondsToSelector:@selector(contentViewDidReceiveMobileDocType:)])
</span><span class="cx"> [_delegate contentViewDidReceiveMobileDocType:self];
</span><ins>+}
</ins><span class="cx">
</span><ins>+- (void)_didChangeViewportArguments:(const WebCore::ViewportArguments&)arguments
+{
+ if ([_delegate respondsToSelector:@selector(contentView:didChangeViewportArgumentsSize:initialScale:minimumScale:maximumScale:allowsUserScaling:)])
+ [_delegate contentView:self didChangeViewportArgumentsSize:CGSizeMake(arguments.width, arguments.height) initialScale:arguments.zoom minimumScale:arguments.minZoom maximumScale:arguments.maxZoom allowsUserScaling:arguments.userZoom];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const Color&)color quads:(const Vector<FloatQuad>&)highlightedQuads topLeftRadius:(const IntSize&)topLeftRadius topRightRadius:(const IntSize&)topRightRadius bottomLeftRadius:(const IntSize&)bottomLeftRadius bottomRightRadius:(const IntSize&)bottomRightRadius
</span><span class="lines">@@ -285,4 +259,32 @@
</span><span class="cx"> return [_interactionView _interpretKeyEvent:theEvent isCharEvent:isCharEvent];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)_decidePolicyForGeolocationRequestFromOrigin:(WebSecurityOrigin&)origin frame:(WebFrameProxy&)frame request:(GeolocationPermissionRequestProxy&)permissionRequest
+{
+ [[wrapper(*_page->process()->context()) _geolocationProvider] decidePolicyForGeolocationRequestFromOrigin:toAPI(&origin) frame:toAPI(&frame) request:toAPI(&permissionRequest) window:[self window]];
+}
+
</ins><span class="cx"> @end
</span><ins>+
+@implementation WKContentView (Private)
+
+- (WKPageRef)_pageRef
+{
+ return toAPI(_page.get());
+}
+
+- (id)initWithFrame:(CGRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef
+{
+ return [self initWithFrame:frame contextRef:contextRef pageGroupRef:pageGroupRef relatedToPage:nullptr];
+}
+
+- (id)initWithFrame:(CGRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef relatedToPage:(WKPageRef)relatedPage
+{
+ if (!(self = [super initWithFrame:frame]))
+ return nil;
+
+ [self _commonInitializationWithContextRef:contextRef pageGroupRef:pageGroupRef relatedToPage:relatedPage];
+ return self;
+}
+
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKContentViewInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/ios/WKContentViewInternal.h (159858 => 159859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKContentViewInternal.h        2013-11-28 20:59:06 UTC (rev 159858)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKContentViewInternal.h        2013-11-28 21:01:11 UTC (rev 159859)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#import "WKContentView.h"
-
</del><ins>+#import "WKContentViewPrivate.h"
</ins><span class="cx"> #import <wtf/Forward.h>
</span><span class="cx"> #import <wtf/Vector.h>
</span><span class="cx">
</span><span class="lines">@@ -50,10 +49,12 @@
</span><span class="cx"> - (std::unique_ptr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy;
</span><span class="cx"> - (void)_processDidCrash;
</span><span class="cx"> - (void)_didRelaunchProcess;
</span><del>-- (void)_didChangeContentSize:(CGSize)contentsSize;
</del><span class="cx"> - (void)_setAcceleratedCompositingRootLayer:(CALayer *)rootLayer;
</span><span class="cx">
</span><del>-- (void)_mainDocumentDidReceiveMobileDocType;
</del><ins>+- (void)_didCommitLoadForMainFrame;
+- (void)_didChangeContentSize:(CGSize)contentsSize;
+- (void)_didReceiveMobileDocTypeForMainFrame;
+- (void)_didChangeViewportArguments:(const WebCore::ViewportArguments&)viewportArguments;
</ins><span class="cx">
</span><span class="cx"> - (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const WebCore::Color&)color quads:(const Vector<WebCore::FloatQuad>&)highlightedQuads topLeftRadius:(const WebCore::IntSize&)topLeftRadius topRightRadius:(const WebCore::IntSize&)topRightRadius bottomLeftRadius:(const WebCore::IntSize&)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&)bottomRightRadius;
</span><span class="cx">
</span><span class="lines">@@ -61,7 +62,6 @@
</span><span class="cx"> - (void)_stopAssistingNode;
</span><span class="cx"> - (void)_selectionChanged;
</span><span class="cx"> - (BOOL)_interpretKeyEvent:(WebIOSEvent *)theEvent isCharEvent:(BOOL)isCharEvent;
</span><del>-- (void)_didChangeViewportArguments:(const WebCore::ViewportArguments&)viewportArguments;
</del><span class="cx">
</span><span class="cx"> - (void)_decidePolicyForGeolocationRequestFromOrigin:(WebKit::WebSecurityOrigin&)origin frame:(WebKit::WebFrameProxy&)frame request:(WebKit::GeolocationPermissionRequestProxy&)permissionRequest;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKContentViewPrivateh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/WKContentViewPrivate.h (0 => 159859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKContentViewPrivate.h         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKContentViewPrivate.h        2013-11-28 21:01:11 UTC (rev 159859)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <WebKit2/WKBase.h>
+#import <WebKit2/WKContentView.h>
+
+@interface WKContentView (Private)
+
+@property (readonly) WKPageRef _pageRef;
+
+- (id)initWithFrame:(CGRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef;
+- (id)initWithFrame:(CGRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef relatedToPage:(WKPageRef)relatedPage;
+
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/ios/WKView.mm (159858 => 159859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKView.mm        2013-11-28 20:59:06 UTC (rev 159858)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKView.mm        2013-11-28 21:01:11 UTC (rev 159859)
</span><span class="lines">@@ -24,9 +24,12 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #import "config.h"
</span><del>-#import "WKView.h"
</del><ins>+#import "WKViewPrivate.h"
</ins><span class="cx">
</span><ins>+#import "WKBrowsingContextGroupPrivate.h"
</ins><span class="cx"> #import "WKContentView.h"
</span><ins>+#import "WKContentViewPrivate.h"
+#import "WKProcessGroupPrivate.h"
</ins><span class="cx"> #import "WKScrollView.h"
</span><span class="cx"> #import <UIKit/UIScreen.h>
</span><span class="cx"> #import <UIKit/UIScrollView_Private.h>
</span><span class="lines">@@ -52,33 +55,24 @@
</span><span class="cx"> - (id)initWithCoder:(NSCoder *)coder
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Implement.
</span><ins>+ [self release];
</ins><span class="cx"> return nil;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (id)initWithFrame:(CGRect)frame
</del><ins>+- (id)initWithFrame:(CGRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup
</ins><span class="cx"> {
</span><del>- if (!(self = [super initWithFrame:frame]))
- return nil;
-
- [self _commonInitializationWithProcessGroup:nil browsingContextGroup:nil];
- return self;
</del><ins>+ return [self initWithFrame:frame processGroup:processGroup browsingContextGroup:browsingContextGroup relatedToView:nil];
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-- (id)initWithFrame:(CGRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup
</del><ins>+- (id)initWithFrame:(CGRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup relatedToView:(WKView *)relatedView
</ins><span class="cx"> {
</span><span class="cx"> if (!(self = [super initWithFrame:frame]))
</span><span class="cx"> return nil;
</span><span class="cx">
</span><del>- [self _commonInitializationWithProcessGroup:processGroup browsingContextGroup:browsingContextGroup];
</del><ins>+ [self _commonInitializationWithContextRef:processGroup._contextRef pageGroupRef:browsingContextGroup._pageGroupRef relatedToPage:relatedView ? [relatedView pageRef] : nullptr];
</ins><span class="cx"> return self;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (id)initWithFrame:(CGRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup relatedToView:(WKView *)relatedView
-{
- // FIXME: Implement.
- return nil;
-}
-
</del><span class="cx"> - (void)setFrame:(CGRect)frame
</span><span class="cx"> {
</span><span class="cx"> CGRect oldFrame = [self frame];
</span><span class="lines">@@ -115,7 +109,7 @@
</span><span class="cx"> }];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)contentViewdidCommitLoadForMainFrame:(WKContentView *)contentView
</del><ins>+- (void)contentViewDidCommitLoadForMainFrame:(WKContentView *)contentView
</ins><span class="cx"> {
</span><span class="cx"> _userHasChangedPageScale = NO;
</span><span class="cx">
</span><span class="lines">@@ -156,6 +150,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #pragma mark - _UIWebViewportHandlerDelegate
</span><ins>+
</ins><span class="cx"> - (void)viewportHandlerDidChangeScales:(_UIWebViewportHandler *)viewportHandler
</span><span class="cx"> {
</span><span class="cx"> ASSERT(viewportHandler == _viewportHandler);
</span><span class="lines">@@ -180,6 +175,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> #pragma mark - UIScrollViewDelegate
</span><ins>+
</ins><span class="cx"> - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
</span><span class="cx"> {
</span><span class="cx"> ASSERT(_scrollView == scrollView);
</span><span class="lines">@@ -217,7 +213,7 @@
</span><span class="cx">
</span><span class="cx"> #pragma mark Internal
</span><span class="cx">
</span><del>-- (void)_commonInitializationWithProcessGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup
</del><ins>+- (void)_commonInitializationWithContextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef relatedToPage:(WKPageRef)relatedPage
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!_scrollView);
</span><span class="cx"> ASSERT(!_contentView);
</span><span class="lines">@@ -230,7 +226,7 @@
</span><span class="cx">
</span><span class="cx"> [self addSubview:_scrollView.get()];
</span><span class="cx">
</span><del>- _contentView = adoptNS([[WKContentView alloc] initWithFrame:bounds processGroup:processGroup browsingContextGroup:browsingContextGroup]);
</del><ins>+ _contentView = adoptNS([[WKContentView alloc] initWithFrame:bounds contextRef:contextRef pageGroupRef:pageGroupRef relatedToPage:relatedPage]);
</ins><span class="cx"> [_contentView setDelegate:self];
</span><span class="cx"> [[_contentView layer] setAnchorPoint:CGPointZero];
</span><span class="cx"> [_contentView setFrame:bounds];
</span><span class="lines">@@ -264,3 +260,26 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> @end
</span><ins>+
+@implementation WKView (Private)
+
+- (WKPageRef)pageRef
+{
+ return [_contentView _pageRef];
+}
+
+- (id)initWithFrame:(CGRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef
+{
+ return [self initWithFrame:frame contextRef:contextRef pageGroupRef:pageGroupRef relatedToPage:nil];
+}
+
+- (id)initWithFrame:(CGRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef relatedToPage:(WKPageRef)relatedPage
+{
+ if (!(self = [super initWithFrame:frame]))
+ return nil;
+
+ [self _commonInitializationWithContextRef:contextRef pageGroupRef:pageGroupRef relatedToPage:relatedPage];
+ return self;
+}
+
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h (159858 => 159859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h        2013-11-28 20:59:06 UTC (rev 159858)
+++ trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h        2013-11-28 21:01:11 UTC (rev 159859)
</span><span class="lines">@@ -69,6 +69,7 @@
</span><span class="cx"> virtual void didRelaunchProcess();
</span><span class="cx"> virtual void preferencesDidChange() OVERRIDE;
</span><span class="cx"> virtual void toolTipChanged(const String& oldToolTip, const String& newToolTip);
</span><ins>+ virtual void didCommitLoadForMainFrame() OVERRIDE;
</ins><span class="cx"> virtual void setCursor(const WebCore::Cursor&);
</span><span class="cx"> virtual void setCursorHiddenUntilMouseMoves(bool);
</span><span class="cx"> virtual void didChangeViewportProperties(const WebCore::ViewportAttributes&);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm (159858 => 159859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm        2013-11-28 20:59:06 UTC (rev 159858)
+++ trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm        2013-11-28 21:01:11 UTC (rev 159859)
</span><span class="lines">@@ -264,6 +264,10 @@
</span><span class="cx"> [m_wkView _toolTipChangedFrom:nsStringFromWebCoreString(oldToolTip) to:nsStringFromWebCoreString(newToolTip)];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void PageClientImpl::didCommitLoadForMainFrame()
+{
+}
+
</ins><span class="cx"> void PageClientImpl::setCursor(const WebCore::Cursor& cursor)
</span><span class="cx"> {
</span><span class="cx"> if (![NSApp _cursorRectCursor])
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKBrowsingContextControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm (159858 => 159859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm        2013-11-28 20:59:06 UTC (rev 159858)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm        2013-11-28 21:01:11 UTC (rev 159859)
</span><span class="lines">@@ -398,10 +398,6 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo;
</span><del>-#if PLATFORM(IOS)
- if ([browsingContext.loadDelegateInternal respondsToSelector:@selector(browsingContextControllerDidCommitLoad:)])
- [browsingContext.loadDelegateInternal browsingContextControllerDidCommitLoad:browsingContext];
-#endif // PLATFORM(IOS)
</del><span class="cx"> if ([browsingContext.loadDelegate respondsToSelector:@selector(browsingContextControllerDidCommitLoad:)])
</span><span class="cx"> [browsingContext.loadDelegate browsingContextControllerDidCommitLoad:browsingContext];
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKBrowsingContextControllerInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h (159858 => 159859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h        2013-11-28 20:59:06 UTC (rev 159858)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h        2013-11-28 21:01:11 UTC (rev 159859)
</span><span class="lines">@@ -27,19 +27,8 @@
</span><span class="cx">
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx">
</span><del>-#if PLATFORM(IOS)
-@protocol WKBrowsingContextLoadDelegateInternal <NSObject>
-@optional
-- (void)browsingContextControllerDidCommitLoad:(WKBrowsingContextController *)sender;
-@end
-#endif // PLATFORM(IOS)
-
</del><span class="cx"> @interface WKBrowsingContextController ()
</span><span class="cx">
</span><del>-#if PLATFORM(IOS)
-@property (assign) id <WKBrowsingContextLoadDelegateInternal> loadDelegateInternal;
-#endif // PLATFORM(IOS)
-
</del><span class="cx"> /* This should only be called from associate view. */
</span><span class="cx"> - (id)_initWithPageRef:(WKPageRef)pageRef;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h (159858 => 159859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h        2013-11-28 20:59:06 UTC (rev 159858)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h        2013-11-28 21:01:11 UTC (rev 159859)
</span><span class="lines">@@ -23,9 +23,11 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><ins>+#import <WebKit2/WKBase.h>
</ins><span class="cx"> #import <WebKit2/WKView.h>
</span><del>-#import <WebKit2/WKBase.h>
</del><span class="cx">
</span><ins>+#if !TARGET_OS_IPHONE
+
</ins><span class="cx"> typedef enum {
</span><span class="cx"> WKContentAnchorTopLeft,
</span><span class="cx"> WKContentAnchorTopRight,
</span><span class="lines">@@ -33,16 +35,26 @@
</span><span class="cx"> WKContentAnchorBottomRight,
</span><span class="cx"> } WKContentAnchor;
</span><span class="cx">
</span><ins>+#endif
+
</ins><span class="cx"> @interface WKView (Private)
</span><span class="cx">
</span><span class="cx"> /* C SPI support. */
</span><span class="cx">
</span><del>-@property(readonly) WKPageRef pageRef;
-@property WKContentAnchor contentAnchor;
</del><ins>+@property (readonly) WKPageRef pageRef;
</ins><span class="cx">
</span><ins>+#if TARGET_OS_IPHONE
+- (id)initWithFrame:(CGRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef;
+- (id)initWithFrame:(CGRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef relatedToPage:(WKPageRef)relatedPage;
+#else
</ins><span class="cx"> - (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef;
</span><span class="cx"> - (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef relatedToPage:(WKPageRef)relatedPage;
</span><ins>+#endif
</ins><span class="cx">
</span><ins>+#if !TARGET_OS_IPHONE
+
+@property WKContentAnchor contentAnchor;
+
</ins><span class="cx"> - (NSPrintOperation *)printOperationWithPrintInfo:(NSPrintInfo *)printInfo forFrame:(WKFrameRef)frameRef;
</span><span class="cx"> - (BOOL)canChangeFrameLayout:(WKFrameRef)frameRef;
</span><span class="cx">
</span><span class="lines">@@ -82,4 +94,6 @@
</span><span class="cx"> - (void)forceAsyncDrawingAreaSizeUpdate:(NSSize)size;
</span><span class="cx"> - (void)waitForAsyncDrawingAreaSizeUpdate;
</span><span class="cx">
</span><ins>+#endif
+
</ins><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (159858 => 159859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2013-11-28 20:59:06 UTC (rev 159858)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2013-11-28 21:01:11 UTC (rev 159859)
</span><span class="lines">@@ -125,6 +125,8 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ virtual void didCommitLoadForMainFrame() = 0;
+
</ins><span class="cx"> #if USE(TILED_BACKING_STORE)
</span><span class="cx"> virtual void pageDidRequestScroll(const WebCore::IntPoint&) = 0;
</span><span class="cx"> virtual void didRenderFrame(const WebCore::IntSize& contentsSize, const WebCore::IntRect& coveredRect) = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (159858 => 159859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2013-11-28 20:59:06 UTC (rev 159858)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2013-11-28 21:01:11 UTC (rev 159859)
</span><span class="lines">@@ -2158,8 +2158,10 @@
</span><span class="cx"> WebFrameProxy* frame = m_process->webFrame(frameID);
</span><span class="cx"> MESSAGE_CHECK(frame);
</span><span class="cx">
</span><del>- if (frame->isMainFrame())
</del><ins>+ if (frame->isMainFrame()) {
</ins><span class="cx"> m_pageLoadState.didCommitLoad();
</span><ins>+ m_pageClient->didCommitLoadForMainFrame();
+ }
</ins><span class="cx">
</span><span class="cx"> #if USE(APPKIT)
</span><span class="cx"> // FIXME (bug 59111): didCommitLoadForFrame comes too late when restoring a page from b/f cache, making us disable secure event mode in password fields.
</span></span></pre>
</div>
</div>
</body>
</html>