<!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>[159724] 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/159724">159724</a></dd>
<dt>Author</dt> <dd>enrica@apple.com</dd>
<dt>Date</dt> <dd>2013-11-22 19:29:50 -0800 (Fri, 22 Nov 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Upstream iOS WebKit2 to OpenSource (part 3).
https://bugs.webkit.org/show_bug.cgi?id=124803

Reviewed by Anders Carlsson and Tim Horton.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessmacDatabaseProcessMacmm">trunk/Source/WebKit2/DatabaseProcess/mac/DatabaseProcessMac.mm</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessEntryPointmacXPCServiceNetworkServiceEntryPointmm">trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoaderh">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessRemoteNetworkingContexth">trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessmacDiskCacheMonitormm">trunk/Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.mm</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessmacNetworkProcessMacmm">trunk/Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessmacNetworkResourceLoaderMacmm">trunk/Source/WebKit2/NetworkProcess/mac/NetworkResourceLoaderMac.mm</a></li>
<li><a href="#trunkSourceWebKit2PlatformCoreIPCConnectioncpp">trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformCoreIPCConnectionh">trunk/Source/WebKit2/Platform/CoreIPC/Connection.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformCoreIPCMessageDecodercpp">trunk/Source/WebKit2/Platform/CoreIPC/MessageDecoder.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformCoreIPCMessageDecoderh">trunk/Source/WebKit2/Platform/CoreIPC/MessageDecoder.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformCoreIPCmacConnectionMaccpp">trunk/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformCoreIPCmacImportanceAssertionh">trunk/Source/WebKit2/Platform/CoreIPC/mac/ImportanceAssertion.h</a></li>
<li><a href="#trunkSourceWebKit2PluginProcessEntryPointmacXPCServicePluginServiceEntryPointmm">trunk/Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm</a></li>
<li><a href="#trunkSourceWebKit2Scriptswebkit2messagespy">trunk/Source/WebKit2/Scripts/webkit2/messages.py</a></li>
<li><a href="#trunkSourceWebKit2SharedAPICocoaWKRemoteObjectCodermm">trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIcWKContextMenuItemcpp">trunk/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIcWKPluginInformationcpp">trunk/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIccgWKImageCGcpp">trunk/Source/WebKit2/Shared/API/c/cg/WKImageCG.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedDrawingAreaInfoh">trunk/Source/WebKit2/Shared/DrawingAreaInfo.h</a></li>
<li><a href="#trunkSourceWebKit2SharedEditorStatecpp">trunk/Source/WebKit2/Shared/EditorState.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedEditorStateh">trunk/Source/WebKit2/Shared/EditorState.h</a></li>
<li><a href="#trunkSourceWebKit2SharedNativeWebKeyboardEventh">trunk/Source/WebKit2/Shared/NativeWebKeyboardEvent.h</a></li>
<li><a href="#trunkSourceWebKit2SharedNativeWebMouseEventh">trunk/Source/WebKit2/Shared/NativeWebMouseEvent.h</a></li>
<li><a href="#trunkSourceWebKit2SharedNativeWebTouchEventh">trunk/Source/WebKit2/Shared/NativeWebTouchEvent.h</a></li>
<li><a href="#trunkSourceWebKit2SharedNativeWebWheelEventh">trunk/Source/WebKit2/Shared/NativeWebWheelEvent.h</a></li>
<li><a href="#trunkSourceWebKit2SharedPluginsNetscapePluginInformationcpp">trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedPluginsNetscapemacPluginInformationMacmm">trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCoderscpp">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCodersh">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h</a></li>
<li><a href="#trunkSourceWebKit2SharedWebEventh">trunk/Source/WebKit2/Shared/WebEvent.h</a></li>
<li><a href="#trunkSourceWebKit2SharedWebEventConversioncpp">trunk/Source/WebKit2/Shared/WebEventConversion.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebEventConversionh">trunk/Source/WebKit2/Shared/WebEventConversion.h</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPreferencesStoreh">trunk/Source/WebKit2/Shared/WebPreferencesStore.h</a></li>
<li><a href="#trunkSourceWebKit2SharedWebSecurityOriginh">trunk/Source/WebKit2/Shared/WebSecurityOrigin.h</a></li>
<li><a href="#trunkSourceWebKit2SharedmacChildProcessMacmm">trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedmacColorSpaceDatamm">trunk/Source/WebKit2/Shared/mac/ColorSpaceData.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerBackingStoreh">trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.h</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerBackingStoremm">trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerTreePropertyAppliermm">trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedmacSecItemShimmessagesin">trunk/Source/WebKit2/Shared/mac/SecItemShim.messages.in</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKNativeEventh">trunk/Source/WebKit2/UIProcess/API/C/WKNativeEvent.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagecpp">trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICmacWKContextPrivateMach">trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICmacWKContextPrivateMacmm">trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.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="#trunkSourceWebKit2UIProcessAPImacWKProcessGroupmm">trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroup.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKProcessGroupPrivateh">trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroupPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewh">trunk/Source/WebKit2/UIProcess/API/mac/WKView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDatabasesmacDatabaseProcessProxyMacmm">trunk/Source/WebKit2/UIProcess/Databases/mac/DatabaseProcessProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessLaunchermacProcessLauncherMacmm">trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkmacNetworkProcessProxyMacmm">trunk/Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextcpp">trunk/Source/WebKit2/UIProcess/WebContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContexth">trunk/Source/WebKit2/UIProcess/WebContext.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebEditCommandProxycpp">trunk/Source/WebKit2/UIProcess/WebEditCommandProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebGeolocationManagerProxycpp">trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebGeolocationManagerProxyh">trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebLoaderClientcpp">trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebLoaderClienth">trunk/Source/WebKit2/UIProcess/WebLoaderClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebUIClientcpp">trunk/Source/WebKit2/UIProcess/WebUIClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebUIClienth">trunk/Source/WebKit2/UIProcess/WebUIClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacTiledCoreAnimationDrawingAreaProxyh">trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacTiledCoreAnimationDrawingAreaProxymm">trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWKFullScreenWindowControllermm">trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebContextMacmm">trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebFullScreenManagerProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2Prefixh">trunk/Source/WebKit2/WebKit2Prefix.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessEntryPointmacLegacyProcessWebContentProcessMainmm">trunk/Source/WebKit2/WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessEntryPointmacXPCServiceWebContentServiceEntryPointmm">trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessGeolocationWebGeolocationManagercpp">trunk/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessGeolocationWebGeolocationManagerh">trunk/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessGeolocationWebGeolocationManagermessagesin">trunk/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePagecpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePageh">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsNetscapemacWKNPAPIPlugInContainermm">trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPluginViewcpp">trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebAlternativeTextClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebAlternativeTextClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebDatabaseManagerh">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebEditorClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportmacWebFrameNetworkingContexth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportmacWebSystemInterfacemm">trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreacpp">trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebBackForwardListProxyh">trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcesscpp">trunk/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcessh">trunk/Source/WebKit2/WebProcess/WebProcess.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessmacWebProcessMacmm">trunk/Source/WebKit2/WebProcess/mac/WebProcessMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/Source/WebKit2/NetworkProcess/ios/</li>
<li><a href="#trunkSourceWebKit2NetworkProcessiosNetworkProcessIOSmm">trunk/Source/WebKit2/NetworkProcess/ios/NetworkProcessIOS.mm</a></li>
<li>trunk/Source/WebKit2/Shared/Downloads/ios/</li>
<li><a href="#trunkSourceWebKit2SharedDownloadsiosDownloadIOSmm">trunk/Source/WebKit2/Shared/Downloads/ios/DownloadIOS.mm</a></li>
<li>trunk/Source/WebKit2/Shared/ios/</li>
<li><a href="#trunkSourceWebKit2SharediosNativeWebKeyboardEventIOSmm">trunk/Source/WebKit2/Shared/ios/NativeWebKeyboardEventIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2SharediosNativeWebTouchEventIOSmm">trunk/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2SharediosWKGestureTypesh">trunk/Source/WebKit2/Shared/ios/WKGestureTypes.h</a></li>
<li><a href="#trunkSourceWebKit2SharediosWebIOSEventFactoryh">trunk/Source/WebKit2/Shared/ios/WebIOSEventFactory.h</a></li>
<li><a href="#trunkSourceWebKit2SharediosWebIOSEventFactorymm">trunk/Source/WebKit2/Shared/ios/WebIOSEventFactory.mm</a></li>
<li><a href="#trunkSourceWebKit2SharediosWebPlatformTouchPointIOScpp">trunk/Source/WebKit2/Shared/ios/WebPlatformTouchPointIOS.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharediosWebTouchEventIOScpp">trunk/Source/WebKit2/Shared/ios/WebTouchEventIOS.cpp</a></li>
<li>trunk/Source/WebKit2/UIProcess/API/ios/</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="#trunkSourceWebKit2UIProcessAPIiosUIWKRemoteViewh">trunk/Source/WebKit2/UIProcess/API/ios/UIWKRemoteView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosUIWKRemoteViewmm">trunk/Source/WebKit2/UIProcess/API/ios/UIWKRemoteView.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="#trunkSourceWebKit2UIProcessAPIiosWKGeolocationProviderIOSh">trunk/Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosWKGeolocationProviderIOSmm">trunk/Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosWKGeolocationProviderIOSObjCSecurityOriginmm">trunk/Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosWKInteractionViewh">trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosWKInteractionViewmm">trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosWKScrollViewh">trunk/Source/WebKit2/UIProcess/API/ios/WKScrollView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosWKScrollViewmm">trunk/Source/WebKit2/UIProcess/API/ios/WKScrollView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosWKViewmm">trunk/Source/WebKit2/UIProcess/API/ios/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAutoCorrectionCallbackh">trunk/Source/WebKit2/UIProcess/AutoCorrectionCallback.h</a></li>
<li>trunk/Source/WebKit2/UIProcess/ios/</li>
<li><a href="#trunkSourceWebKit2UIProcessiosTextCheckerIOSmm">trunk/Source/WebKit2/UIProcess/ios/TextCheckerIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosTiledCoreAnimationDrawingAreaProxyIOSh">trunk/Source/WebKit2/UIProcess/ios/TiledCoreAnimationDrawingAreaProxyIOS.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosTiledCoreAnimationDrawingAreaProxyIOSmm">trunk/Source/WebKit2/UIProcess/ios/TiledCoreAnimationDrawingAreaProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWebFullScreenManagerProxyIOSmm">trunk/Source/WebKit2/UIProcess/ios/WebFullScreenManagerProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWebInspectorProxyIOSmm">trunk/Source/WebKit2/UIProcess/ios/WebInspectorProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm">trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWebProcessProxyIOSmm">trunk/Source/WebKit2/UIProcess/ios/WebProcessProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessEntryPointmacXPCServiceWebContentServiceInfoiOSplist">trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist</a></li>
<li>trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/</li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportiosWebChromeClientIOSmm">trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportiosWebDatabaseManagerIOSmm">trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebDatabaseManagerIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportiosWebEditorClientIOSmm">trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportiosWebFrameLoaderClientIOSmm">trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm</a></li>
<li>trunk/Source/WebKit2/WebProcess/WebPage/ios/</li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosTiledCoreAnimationDrawingAreaIOSh">trunk/Source/WebKit2/WebProcess/WebPage/ios/TiledCoreAnimationDrawingAreaIOS.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosTiledCoreAnimationDrawingAreaIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/TiledCoreAnimationDrawingAreaIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebBackForwardListProxyIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
<li>trunk/Source/WebKit2/WebProcess/ios/</li>
<li><a href="#trunkSourceWebKit2WebProcessiosWebProcessIOSmm">trunk/Source/WebKit2/WebProcess/ios/WebProcessIOS.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPDFSimplePDFPluginh">trunk/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPDFSimplePDFPluginmm">trunk/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/ChangeLog        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -1,3 +1,11 @@
</span><ins>+2013-11-22  Enrica Casucci  &lt;enrica@apple.com&gt;
+
+        Upstream iOS WebKit2 to OpenSource (part 3).
+        https://bugs.webkit.org/show_bug.cgi?id=124803
+
+        Reviewed by Anders Carlsson and Tim Horton.
+
+
</ins><span class="cx"> 2013-11-22  Jer Noble  &lt;jer.noble@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Mac] Can't drag full-screen video to another monitor
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessmacDatabaseProcessMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/mac/DatabaseProcessMac.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/mac/DatabaseProcessMac.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/DatabaseProcess/mac/DatabaseProcessMac.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -44,8 +44,10 @@
</span><span class="cx"> 
</span><span class="cx"> void DatabaseProcess::initializeProcessName(const ChildProcessInitializationParameters&amp; parameters)
</span><span class="cx"> {
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     NSString *applicationName = [NSString stringWithFormat:WEB_UI_STRING(&quot;%@ Database Storage&quot;, &quot;visible name of the database process. The argument is the application name.&quot;), (NSString *)parameters.uiProcessName];
</span><span class="cx">     WKSetVisibleApplicationName((CFStringRef)applicationName);
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DatabaseProcess::initializeSandbox(const ChildProcessInitializationParameters&amp; parameters, SandboxInitializationParameters&amp; sandboxParameters)
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessEntryPointmacXPCServiceNetworkServiceEntryPointmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -36,9 +36,11 @@
</span><span class="cx"> 
</span><span class="cx"> void NetworkServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage)
</span><span class="cx"> {
</span><ins>+#if ENABLE(NETWORK_PROCESS)
</ins><span class="cx">     // Remove the SecItemShim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by
</span><span class="cx">     // the this process don't try to insert the shim and crash.
</span><span class="cx">     EnvironmentUtilities::stripValuesEndingWithString(&quot;DYLD_INSERT_LIBRARIES&quot;, &quot;/SecItemShim.dylib&quot;);
</span><span class="cx"> 
</span><span class="cx">     XPCServiceInitializer&lt;NetworkProcess, XPCServiceInitializerDelegate&gt;(connection, initializerMessage);
</span><ins>+#endif
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -105,7 +105,9 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     static size_t fileBackedResourceMinimumSize();
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     virtual void willCacheResponseAsync(WebCore::ResourceHandle*, NSCachedURLResponse *) OVERRIDE;
</span><ins>+#endif
</ins><span class="cx">     virtual void willStopBufferingData(WebCore::ResourceHandle*, const char*, int) OVERRIDE;
</span><span class="cx"> #endif // PLATFORM(MAC)
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessRemoteNetworkingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -67,6 +67,9 @@
</span><span class="cx">     virtual bool localFileContentSniffingEnabled() const OVERRIDE;
</span><span class="cx">     virtual RetainPtr&lt;CFDataRef&gt; sourceApplicationAuditData() const OVERRIDE;
</span><span class="cx">     virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&amp;) const OVERRIDE;
</span><ins>+#if PLATFORM(IOS)
+    virtual void reportNetworkDataUsage(uint64_t rawBytesSent, uint64_t rawBytesReceived, uint64_t cellularBytesSent, uint64_t cellularBytesReceived) OVERRIDE { }
+#endif // PLATFORM(IOS)
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(SOUP)
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessiosNetworkProcessIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/NetworkProcess/ios/NetworkProcessIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/ios/NetworkProcessIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/NetworkProcess/ios/NetworkProcessIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,81 @@
</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 &quot;config.h&quot;
+#import &quot;NetworkProcess.h&quot;
+
+#if ENABLE(NETWORK_PROCESS)
+
+#import &lt;WebCore/NotImplemented.h&gt;
+#import &lt;WebCore/WebCoreThreadSystemInterface.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void NetworkProcess::initializeProcess(const ChildProcessInitializationParameters&amp;)
+{
+#if PLATFORM(IOS)
+    InitWebCoreThreadSystemInterface();
+#endif // PLATFORM(IOS)
+}
+
+void NetworkProcess::initializeProcessName(const ChildProcessInitializationParameters&amp;)
+{
+    notImplemented();
+}
+
+void NetworkProcess::initializeSandbox(const ChildProcessInitializationParameters&amp;, SandboxInitializationParameters&amp;)
+{
+    notImplemented();
+}
+
+void NetworkProcess::platformSetCacheModel(CacheModel)
+{
+    notImplemented();
+}
+
+void NetworkProcess::allowSpecificHTTPSCertificateForHost(const PlatformCertificateInfo&amp;, const String&amp;)
+{
+    notImplemented();
+}
+
+void NetworkProcess::clearCacheForAllOrigins(uint32_t)
+{
+}
+
+void NetworkProcess::platformInitializeNetworkProcess(const NetworkProcessCreationParameters&amp;)
+{
+    notImplemented();
+}
+
+void NetworkProcess::platformTerminate()
+{
+    notImplemented();
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(NETWORK_PROCESS)
</ins></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessmacDiskCacheMonitormm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx"> 
</span><span class="cx"> typedef void (^CFCachedURLResponseCallBackBlock)(CFCachedURLResponseRef);
</span><span class="cx"> extern &quot;C&quot; void _CFCachedURLResponseSetBecameFileBackedCallBackBlock(CFCachedURLResponseRef, CFCachedURLResponseCallBackBlock, dispatch_queue_t);
</span><span class="lines">@@ -106,4 +106,4 @@
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><del>-#endif // #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#endif // !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessmacNetworkProcessMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> #import &quot;SecItemShim.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx"> typedef struct _CFURLCache* CFURLCacheRef;
</span><span class="cx"> extern &quot;C&quot; CFURLCacheRef CFURLCacheCopySharedURLCache();
</span><span class="cx"> extern &quot;C&quot; void _CFURLCacheSetMinSizeForVMCachedResource(CFURLCacheRef, CFIndex);
</span><span class="lines">@@ -70,10 +70,15 @@
</span><span class="cx"> 
</span><span class="cx"> void NetworkProcess::initializeProcessName(const ChildProcessInitializationParameters&amp; parameters)
</span><span class="cx"> {
</span><ins>+#if PLATFORM(IOS)
+    UNUSED_PARAM(parameters);
+#else
</ins><span class="cx">     NSString *applicationName = [NSString stringWithFormat:WEB_UI_STRING(&quot;%@ Networking&quot;, &quot;visible name of the network process. The argument is the application name.&quot;), (NSString *)parameters.uiProcessName];
</span><span class="cx">     WKSetVisibleApplicationName((CFStringRef)applicationName);
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> static void overrideSystemProxies(const String&amp; httpProxy, const String&amp; httpsProxy)
</span><span class="cx"> {
</span><span class="cx">     NSMutableDictionary *proxySettings = [NSMutableDictionary dictionary];
</span><span class="lines">@@ -106,6 +111,7 @@
</span><span class="cx">     if ([proxySettings count] &gt; 0)
</span><span class="cx">         WKCFNetworkSetOverrideSystemProxySettings((CFDictionaryRef)proxySettings);
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> void NetworkProcess::platformInitializeNetworkProcess(const NetworkProcessCreationParameters&amp; parameters)
</span><span class="cx"> {
</span><span class="lines">@@ -123,10 +129,12 @@
</span><span class="cx">     SecItemShim::shared().initialize(this);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     if (!parameters.httpProxy.isNull() || !parameters.httpsProxy.isNull())
</span><span class="cx">         overrideSystemProxies(parameters.httpProxy, parameters.httpsProxy);
</span><ins>+#endif
</ins><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">     RetainPtr&lt;CFURLCacheRef&gt; cache = adoptCF(CFURLCacheCopySharedURLCache());
</span><span class="cx">     if (!cache)
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessmacNetworkResourceLoaderMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/mac/NetworkResourceLoaderMac.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/mac/NetworkResourceLoaderMac.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/NetworkProcess/mac/NetworkResourceLoaderMac.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #import &quot;config.h&quot;
</span><span class="cx"> #import &quot;NetworkResourceLoader.h&quot;
</span><span class="cx"> 
</span><ins>+#if ENABLE(NETWORK_PROCESS)
+
</ins><span class="cx"> #import &quot;DiskCacheMonitor.h&quot;
</span><span class="cx"> #import &quot;ShareableResource.h&quot;
</span><span class="cx"> #import &lt;WebCore/ResourceHandle.h&gt;
</span><span class="lines">@@ -42,7 +44,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx"> typedef const struct _CFURLCache* CFURLCacheRef;
</span><span class="cx"> typedef const struct _CFCachedURLResponse* CFCachedURLResponseRef;
</span><span class="cx"> extern &quot;C&quot; CFURLCacheRef CFURLCacheCopySharedURLCache();
</span><span class="lines">@@ -57,7 +59,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx"> 
</span><span class="cx"> static void tryGetShareableHandleFromCFData(ShareableResource::Handle&amp; handle, CFDataRef data)
</span><span class="cx"> {
</span><span class="lines">@@ -101,6 +103,7 @@
</span><span class="cx">     return SharedMemory::systemPageSize();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> void NetworkResourceLoader::willCacheResponseAsync(ResourceHandle* handle, NSCachedURLResponse *nsResponse)
</span><span class="cx"> {
</span><span class="cx">     ASSERT_UNUSED(handle, handle == m_handle);
</span><span class="lines">@@ -112,5 +115,9 @@
</span><span class="cx"> 
</span><span class="cx">     m_handle-&gt;continueWillCacheResponse(nsResponse);
</span><span class="cx"> }
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span><ins>+
+#endif // ENABLE(NETWORK_PROCESS)
+
</ins></span></pre></div>
<a id="trunkSourceWebKit2PlatformCoreIPCConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -344,7 +344,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Encode the sync request ID.
</span><span class="cx">     COMPILE_ASSERT(sizeof(m_syncRequestID) == sizeof(int64_t), CanUseAtomicIncrement);
</span><del>-    syncRequestID = atomicIncrement(reinterpret_cast&lt;int64_t volatile*&gt;(&amp;m_syncRequestID));
</del><ins>+    syncRequestID = ++m_syncRequestID;
</ins><span class="cx">     *encoder &lt;&lt; syncRequestID;
</span><span class="cx"> 
</span><span class="cx">     return encoder;
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformCoreIPCConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/CoreIPC/Connection.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/CoreIPC/Connection.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Platform/CoreIPC/Connection.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -205,7 +205,7 @@
</span><span class="cx"> 
</span><span class="cx">     Client* m_client;
</span><span class="cx">     bool m_isServer;
</span><del>-    uint64_t m_syncRequestID;
</del><ins>+    std::atomic&lt;uint64_t&gt; m_syncRequestID;
</ins><span class="cx"> 
</span><span class="cx">     bool m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage;
</span><span class="cx">     bool m_shouldExitOnSyncMessageSendFailure;
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformCoreIPCMessageDecodercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/CoreIPC/MessageDecoder.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/CoreIPC/MessageDecoder.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Platform/CoreIPC/MessageDecoder.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> #include &quot;MessageFlags.h&quot;
</span><span class="cx"> #include &quot;StringReference.h&quot;
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx"> #include &quot;ImportanceAssertion.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">     return m_messageFlags &amp; DispatchMessageWhenWaitingForSyncReply;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx"> void MessageDecoder::setImportanceAssertion(std::unique_ptr&lt;ImportanceAssertion&gt; assertion)
</span><span class="cx"> {
</span><span class="cx">     m_importanceAssertion = std::move(assertion);
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformCoreIPCMessageDecoderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/CoreIPC/MessageDecoder.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/CoreIPC/MessageDecoder.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Platform/CoreIPC/MessageDecoder.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">     bool isSyncMessage() const;
</span><span class="cx">     bool shouldDispatchMessageWhenWaitingForSyncReply() const;
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">     void setImportanceAssertion(std::unique_ptr&lt;ImportanceAssertion&gt;);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> 
</span><span class="cx">     uint64_t m_destinationID;
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">     std::unique_ptr&lt;ImportanceAssertion&gt; m_importanceAssertion;
</span><span class="cx"> #endif
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformCoreIPCmacConnectionMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx">         // Create the receive port.
</span><span class="cx">         mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &amp;m_receivePort);
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">         mach_port_set_attributes(mach_task_self(), m_receivePort, MACH_PORT_IMPORTANCE_RECEIVER, (mach_port_info_t)0, 0);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -399,7 +399,7 @@
</span><span class="cx">     std::unique_ptr&lt;MessageDecoder&gt; decoder = createMessageDecoder(header);
</span><span class="cx">     ASSERT(decoder);
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">     decoder-&gt;setImportanceAssertion(std::make_unique&lt;ImportanceAssertion&gt;(header));
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformCoreIPCmacImportanceAssertionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/CoreIPC/mac/ImportanceAssertion.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/CoreIPC/mac/ImportanceAssertion.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Platform/CoreIPC/mac/ImportanceAssertion.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #ifndef ImportanceAssertion_h
</span><span class="cx"> #define ImportanceAssertion_h
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx"> 
</span><span class="cx"> #if __has_include(&lt;libproc_internal.h&gt;)
</span><span class="cx"> #include &lt;libproc_internal.h&gt;
</span><span class="lines">@@ -58,6 +58,6 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#endif // __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#endif // PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx"> 
</span><span class="cx"> #endif // ImportanceAssertion_h
</span></span></pre></div>
<a id="trunkSourceWebKit2PluginProcessEntryPointmacXPCServicePluginServiceEntryPointmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -31,6 +31,8 @@
</span><span class="cx"> #import &quot;XPCServiceEntryPoint.h&quot;
</span><span class="cx"> #import &lt;wtf/RunLoop.h&gt;
</span><span class="cx"> 
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> class PluginServiceInitializerDelegate : public XPCServiceInitializerDelegate {
</span><span class="lines">@@ -61,10 +63,13 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace WebKit;
</span><span class="cx"> 
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+
</ins><span class="cx"> extern &quot;C&quot; WK_EXPORT void PluginServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage);
</span><span class="cx"> 
</span><span class="cx"> void PluginServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage)
</span><span class="cx"> {
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx">     // FIXME: Add support for teardown from PluginProcessMain.mm
</span><span class="cx"> 
</span><span class="cx">     // Remove the PluginProcess shim from the DYLD_INSERT_LIBRARIES environment variable so any processes
</span><span class="lines">@@ -72,4 +77,5 @@
</span><span class="cx">     EnvironmentUtilities::stripValuesEndingWithString(&quot;DYLD_INSERT_LIBRARIES&quot;, &quot;/PluginProcessShim.dylib&quot;);
</span><span class="cx"> 
</span><span class="cx">     XPCServiceInitializer&lt;PluginProcess, PluginServiceInitializerDelegate&gt;(connection, initializerMessage);
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2Scriptswebkit2messagespy"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Scripts/webkit2/messages.py (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Scripts/webkit2/messages.py        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Scripts/webkit2/messages.py        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -196,6 +196,7 @@
</span><span class="cx">         'WebCore::TransformOperation',
</span><span class="cx">         'WebCore::TransformOperations',
</span><span class="cx">         'WebCore::TranslateTransformOperation',
</span><ins>+        'WebCore::ViewportArguments',
</ins><span class="cx">         'WebCore::ViewportAttributes',
</span><span class="cx">         'WebCore::WindowFeatures',
</span><span class="cx">         'WebKit::AttributedString',
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPICocoaWKRemoteObjectCodermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -397,7 +397,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         default:
</span><del>-            [NSException raise:NSInvalidArgumentException format:@&quot;Unsupported invocation argument type '%s' for argument %zu&quot;, type, i];
</del><ins>+            [NSException raise:NSInvalidArgumentException format:@&quot;Unsupported invocation argument type '%s' for argument %zu&quot;, type, (unsigned long)i];
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIcWKContextMenuItemcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -84,6 +84,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(CONTEXT_MENUS)
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> static WKContextMenuItemTag compatibleContextMenuItemTag(WKContextMenuItemTag tag)
</span><span class="cx"> {
</span><span class="lines">@@ -105,6 +106,7 @@
</span><span class="cx">     return tag;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><ins>+#endif // ENABLE(CONTEXT_MENUS)
</ins><span class="cx"> 
</span><span class="cx"> WKContextMenuItemTag WKContextMenuItemGetTag(WKContextMenuItemRef itemRef)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIcWKPluginInformationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;WKPluginInformation.h&quot;
</span><span class="cx"> 
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
+
</ins><span class="cx"> #include &quot;PluginInformation.h&quot;
</span><span class="cx"> #include &quot;WKSharedAPICast.h&quot;
</span><span class="cx"> #include &quot;WebString.h&quot;
</span><span class="lines">@@ -115,3 +117,4 @@
</span><span class="cx">     static WebString* key = WebString::create(plugInInformationReplacementObscuredKey()).leakRef();
</span><span class="cx">     return toAPI(key);
</span><span class="cx"> }
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIccgWKImageCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/c/cg/WKImageCG.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/c/cg/WKImageCG.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/API/c/cg/WKImageCG.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -57,6 +57,10 @@
</span><span class="cx">     auto graphicsContext = webImage-&gt;bitmap()-&gt;createGraphicsContext();
</span><span class="cx">     FloatRect rect(FloatPoint(0, 0), imageSize);
</span><span class="cx">     graphicsContext-&gt;clearRect(rect);
</span><ins>+#if PLATFORM(IOS)
+    graphicsContext-&gt;drawNativeImage(imageRef, imageSize, WebCore::ColorSpaceDeviceRGB, rect, rect, 1.0);
+#else
</ins><span class="cx">     graphicsContext-&gt;drawNativeImage(imageRef, imageSize, WebCore::ColorSpaceDeviceRGB, rect, rect);
</span><ins>+#endif
</ins><span class="cx">     return toAPI(webImage.release().leakRef());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedDownloadsiosDownloadIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/Downloads/ios/DownloadIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Downloads/ios/DownloadIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/Shared/Downloads/ios/DownloadIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;Download.h&quot;
+
+#import &lt;WebCore/NotImplemented.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+    
+void Download::start()
+{
+    notImplemented();
+}
+
+void Download::startWithHandle(ResourceHandle*, const ResourceResponse&amp;)
+{
+    notImplemented();
+}
+
+void Download::cancel()
+{
+    notImplemented();
+}
+
+void Download::platformInvalidate()
+{
+    notImplemented();
+}
+
+void Download::didDecideDestination(const String&amp;, bool)
+{
+    notImplemented();
+}
+
+void Download::platformDidFinish()
+{
+    notImplemented();
+}
+
+void Download::receivedCredential(const AuthenticationChallenge&amp;, const Credential&amp;)
+{
+    notImplemented();
+}
+
+void Download::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&amp;)
+{
+    notImplemented();
+}
+
+void Download::receivedCancellation(const AuthenticationChallenge&amp;)
+{
+    notImplemented();
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharedDrawingAreaInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/DrawingAreaInfo.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/DrawingAreaInfo.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/DrawingAreaInfo.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -30,7 +30,11 @@
</span><span class="cx"> 
</span><span class="cx"> enum DrawingAreaType {
</span><span class="cx"> #if PLATFORM(MAC)
</span><ins>+#if PLATFORM(IOS)
+    DrawingAreaTypeTiledCoreAnimationIOS,
+#else
</ins><span class="cx">     DrawingAreaTypeTiledCoreAnimation,
</span><ins>+#endif
</ins><span class="cx">     DrawingAreaTypeRemoteLayerTree,
</span><span class="cx"> #else
</span><span class="cx"> #if USE(COORDINATED_GRAPHICS)
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedEditorStatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/EditorState.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/EditorState.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/EditorState.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -29,6 +29,10 @@
</span><span class="cx"> #include &quot;Arguments.h&quot;
</span><span class="cx"> #include &quot;WebCoreArgumentCoders.h&quot;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+#include &lt;WebCore/SelectionRect.h&gt;
+#endif
+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> void EditorState::encode(CoreIPC::ArgumentEncoder&amp; encoder) const
</span><span class="lines">@@ -42,6 +46,14 @@
</span><span class="cx">     encoder &lt;&lt; isInPlugin;
</span><span class="cx">     encoder &lt;&lt; hasComposition;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    encoder &lt;&lt; caretRectAtStart;
+    encoder &lt;&lt; caretRectAtEnd;
+    encoder &lt;&lt; selectionRects;
+    encoder &lt;&lt; selectedTextLength;
+    encoder &lt;&lt; wordAtSelection;
+#endif
+
</ins><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx">     encoder &lt;&lt; cursorRect;
</span><span class="cx"> #endif
</span><span class="lines">@@ -73,6 +85,19 @@
</span><span class="cx">     if (!decoder.decode(result.hasComposition))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    if (!decoder.decode(result.caretRectAtStart))
+        return false;
+    if (!decoder.decode(result.caretRectAtEnd))
+        return false;
+    if (!decoder.decode(result.selectionRects))
+        return false;
+    if (!decoder.decode(result.selectedTextLength))
+        return false;
+    if (!decoder.decode(result.wordAtSelection))
+        return false;
+#endif
+
</ins><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx">     if (!decoder.decode(result.cursorRect))
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedEditorStateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/EditorState.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/EditorState.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/EditorState.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -42,6 +42,9 @@
</span><span class="cx">         , isInPasswordField(false)
</span><span class="cx">         , isInPlugin(false)
</span><span class="cx">         , hasComposition(false)
</span><ins>+#if PLATFORM(IOS)
+    , selectedTextLength(0)
+#endif
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -55,6 +58,14 @@
</span><span class="cx">     bool isInPlugin;
</span><span class="cx">     bool hasComposition;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    WebCore::IntRect caretRectAtStart;
+    WebCore::IntRect caretRectAtEnd;
+    Vector&lt;WebCore::SelectionRect&gt; selectionRects;
+    uint64_t selectedTextLength;
+    String wordAtSelection;
+#endif
+
</ins><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx">     WebCore::IntRect cursorRect;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedNativeWebKeyboardEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/NativeWebKeyboardEvent.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/NativeWebKeyboardEvent.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/NativeWebKeyboardEvent.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -54,6 +54,8 @@
</span><span class="cx"> #elif PLATFORM(EFL)
</span><span class="cx">     NativeWebKeyboardEvent(const Evas_Event_Key_Down*, bool);
</span><span class="cx">     NativeWebKeyboardEvent(const Evas_Event_Key_Up*);
</span><ins>+#elif PLATFORM(IOS)
+    NativeWebKeyboardEvent(WebIOSEvent *);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(APPKIT)
</span><span class="lines">@@ -65,6 +67,8 @@
</span><span class="cx"> #elif PLATFORM(EFL)
</span><span class="cx">     const void* nativeEvent() const { return m_nativeEvent; }
</span><span class="cx">     bool isFiltered() const { return m_isFiltered; }
</span><ins>+#elif PLATFORM(IOS)
+    WebIOSEvent* nativeEvent() const { return m_nativeEvent.get(); }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -77,6 +81,8 @@
</span><span class="cx"> #elif PLATFORM(EFL)
</span><span class="cx">     const void* m_nativeEvent;
</span><span class="cx">     bool m_isFiltered;
</span><ins>+#elif PLATFORM(IOS)
+    RetainPtr&lt;WebIOSEvent&gt; m_nativeEvent;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedNativeWebMouseEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/NativeWebMouseEvent.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/NativeWebMouseEvent.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/NativeWebMouseEvent.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -28,6 +28,14 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;WebEvent.h&quot;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+#include &lt;wtf/RetainPtr.h&gt;
+#ifdef __OBJC__
+@class UIWebTouchEventsGestureRecognizer;
+#else
+class UIWebTouchEventsGestureRecognizer;
+#endif // __OBJC__
+#endif // PLATFORM(IOS)
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> #include &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> OBJC_CLASS NSView;
</span><span class="lines">@@ -60,6 +68,8 @@
</span><span class="cx">     const GdkEvent* nativeEvent() const { return m_nativeEvent.get(); }
</span><span class="cx"> #elif PLATFORM(EFL)
</span><span class="cx">     const void* nativeEvent() const { return m_nativeEvent; }
</span><ins>+#elif PLATFORM(IOS)
+    const void* nativeEvent() const { return 0; }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedNativeWebTouchEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/NativeWebTouchEvent.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/NativeWebTouchEvent.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/NativeWebTouchEvent.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -38,12 +38,19 @@
</span><span class="cx"> 
</span><span class="cx"> class NativeWebTouchEvent : public WebTouchEvent {
</span><span class="cx"> public:
</span><ins>+#if PLATFORM(IOS)
+    explicit NativeWebTouchEvent(UIWebTouchEventsGestureRecognizer *);
+    const UIWebTouchEventsGestureRecognizer* nativeEvent() const { return m_nativeEvent.get(); }
+#endif
</ins><span class="cx"> #if PLATFORM(EFL)
</span><span class="cx">     NativeWebTouchEvent(EwkTouchEvent*, const WebCore::AffineTransform&amp;);
</span><span class="cx">     const EwkTouchEvent* nativeEvent() const { return m_nativeEvent.get(); }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+#if PLATFORM(IOS)
+    RetainPtr&lt;UIWebTouchEventsGestureRecognizer&gt; m_nativeEvent;
+#endif
</ins><span class="cx"> #if PLATFORM(EFL)
</span><span class="cx">     RefPtr&lt;EwkTouchEvent&gt; m_nativeEvent;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedNativeWebWheelEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/NativeWebWheelEvent.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/NativeWebWheelEvent.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/NativeWebWheelEvent.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -58,6 +58,8 @@
</span><span class="cx">     const GdkEvent* nativeEvent() const { return m_nativeEvent.get(); }
</span><span class="cx"> #elif PLATFORM(EFL)
</span><span class="cx">     const Evas_Event_Mouse_Wheel* nativeEvent() const { return m_nativeEvent; }
</span><ins>+#elif PLATFORM(IOS)
+    const void* nativeEvent() const { return 0; }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedPluginsNetscapePluginInformationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;PluginInformation.h&quot;
</span><span class="cx"> 
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
+
</ins><span class="cx"> #include &quot;PluginInfoStore.h&quot;
</span><span class="cx"> #include &quot;PluginModuleInfo.h&quot;
</span><span class="cx"> #include &quot;WKAPICast.h&quot;
</span><span class="lines">@@ -169,3 +171,5 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span><ins>+
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharedPluginsNetscapemacPluginInformationMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #import &quot;config.h&quot;
</span><span class="cx"> #import &quot;PluginInformation.h&quot;
</span><span class="cx"> 
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
+
</ins><span class="cx"> #import &quot;PluginModuleInfo.h&quot;
</span><span class="cx"> #import &quot;PluginSandboxProfile.h&quot;
</span><span class="cx"> #import &quot;StringUtilities.h&quot;
</span><span class="lines">@@ -45,3 +47,5 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span><ins>+
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -59,6 +59,12 @@
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringHash.h&gt;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+#include &lt;WebCore/FloatQuad.h&gt;
+#include &lt;WebCore/SelectionRect.h&gt;
+#include &lt;WebCore/SharedBuffer.h&gt;
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> using namespace WebCore;
</span><span class="cx"> using namespace WebKit;
</span><span class="cx"> 
</span><span class="lines">@@ -130,6 +136,29 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+void ArgumentCoder&lt;FloatQuad&gt;::encode(ArgumentEncoder&amp; encoder, const FloatQuad&amp; floatQuad)
+{
+    SimpleArgumentCoder&lt;FloatQuad&gt;::encode(encoder, floatQuad);
+}
+
+bool ArgumentCoder&lt;FloatQuad&gt;::decode(ArgumentDecoder&amp; decoder, FloatQuad&amp; floatQuad)
+{
+    return SimpleArgumentCoder&lt;FloatQuad&gt;::decode(decoder, floatQuad);
+}
+
+void ArgumentCoder&lt;ViewportArguments&gt;::encode(ArgumentEncoder&amp; encoder, const ViewportArguments&amp; viewportArguments)
+{
+    SimpleArgumentCoder&lt;ViewportArguments&gt;::encode(encoder, viewportArguments);
+}
+
+bool ArgumentCoder&lt;ViewportArguments&gt;::decode(ArgumentDecoder&amp; decoder, ViewportArguments&amp; viewportArguments)
+{
+    return SimpleArgumentCoder&lt;ViewportArguments&gt;::decode(decoder, viewportArguments);
+}
+#endif // PLATFORM(IOS)
+
+
</ins><span class="cx"> void ArgumentCoder&lt;IntPoint&gt;::encode(ArgumentEncoder&amp; encoder, const IntPoint&amp; intPoint)
</span><span class="cx"> {
</span><span class="cx">     SimpleArgumentCoder&lt;IntPoint&gt;::encode(encoder, intPoint);
</span><span class="lines">@@ -648,6 +677,83 @@
</span><span class="cx">     return decodePlatformData(decoder, resourceError);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+
+void ArgumentCoder&lt;SelectionRect&gt;::encode(ArgumentEncoder&amp; encoder, const SelectionRect&amp; selectionRect)
+{
+    encoder &lt;&lt; selectionRect.rect();
+    encoder &lt;&lt; static_cast&lt;uint32_t&gt;(selectionRect.direction());
+    encoder &lt;&lt; selectionRect.minX();
+    encoder &lt;&lt; selectionRect.maxX();
+    encoder &lt;&lt; selectionRect.maxY();
+    encoder &lt;&lt; selectionRect.lineNumber();
+    encoder &lt;&lt; selectionRect.isLineBreak();
+    encoder &lt;&lt; selectionRect.isFirstOnLine();
+    encoder &lt;&lt; selectionRect.isLastOnLine();
+    encoder &lt;&lt; selectionRect.containsStart();
+    encoder &lt;&lt; selectionRect.containsEnd();
+    encoder &lt;&lt; selectionRect.isHorizontal();
+}
+
+bool ArgumentCoder&lt;SelectionRect&gt;::decode(ArgumentDecoder&amp; decoder, SelectionRect&amp; selectionRect)
+{
+    WebCore::IntRect rect;
+    if (!decoder.decode(rect))
+        return false;
+    selectionRect.setRect(rect);
+
+    uint32_t direction;
+    if (!decoder.decode(direction))
+        return false;
+    selectionRect.setDirection((WebCore::TextDirection)direction);
+
+    int intValue;
+    if (!decoder.decode(intValue))
+        return false;
+    selectionRect.setMinX(intValue);
+
+    if (!decoder.decode(intValue))
+        return false;
+    selectionRect.setMaxX(intValue);
+
+    if (!decoder.decode(intValue))
+        return false;
+    selectionRect.setMaxY(intValue);
+
+    if (!decoder.decode(intValue))
+        return false;
+    selectionRect.setLineNumber(intValue);
+
+    bool boolValue;
+    if (!decoder.decode(boolValue))
+        return false;
+    selectionRect.setIsLineBreak(boolValue);
+
+    if (!decoder.decode(boolValue))
+        return false;
+    selectionRect.setIsFirstOnLine(boolValue);
+
+    if (!decoder.decode(boolValue))
+        return false;
+    selectionRect.setIsLastOnLine(boolValue);
+
+    if (!decoder.decode(boolValue))
+        return false;
+    selectionRect.setContainsStart(boolValue);
+
+    if (!decoder.decode(boolValue))
+        return false;
+    selectionRect.setContainsEnd(boolValue);
+
+    if (!decoder.decode(boolValue))
+        return false;
+    selectionRect.setIsHorizontal(boolValue);
+
+    return true;
+}
+
+#endif
+
</ins><span class="cx"> void ArgumentCoder&lt;WindowFeatures&gt;::encode(ArgumentEncoder&amp; encoder, const WindowFeatures&amp; windowFeatures)
</span><span class="cx"> {
</span><span class="cx">     encoder &lt;&lt; windowFeatures.x;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCodersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -81,6 +81,16 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+namespace WebCore {
+class FloatQuad;
+class SelectionRect;
+struct PasteboardImage;
+struct PasteboardWebContent;
+struct ViewportArguments;
+}
+#endif
+
</ins><span class="cx"> namespace CoreIPC {
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct ArgumentCoder&lt;WebCore::AffineTransform&gt; {
</span><span class="lines">@@ -113,6 +123,18 @@
</span><span class="cx">     static bool decode(ArgumentDecoder&amp;, WebCore::FloatSize&amp;);
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+template&lt;&gt; struct ArgumentCoder&lt;WebCore::FloatQuad&gt; {
+    static void encode(ArgumentEncoder&amp;, const WebCore::FloatQuad&amp;);
+    static bool decode(ArgumentDecoder&amp;, WebCore::FloatQuad&amp;);
+};
+
+template&lt;&gt; struct ArgumentCoder&lt;WebCore::ViewportArguments&gt; {
+    static void encode(ArgumentEncoder&amp;, const WebCore::ViewportArguments&amp;);
+    static bool decode(ArgumentDecoder&amp;, WebCore::ViewportArguments&amp;);
+};
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> template&lt;&gt; struct ArgumentCoder&lt;WebCore::IntPoint&gt; {
</span><span class="cx">     static void encode(ArgumentEncoder&amp;, const WebCore::IntPoint&amp;);
</span><span class="cx">     static bool decode(ArgumentDecoder&amp;, WebCore::IntPoint&amp;);
</span><span class="lines">@@ -224,6 +246,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><ins>+template&lt;&gt; struct ArgumentCoder&lt;WebCore::SelectionRect&gt; {
+    static void encode(ArgumentEncoder&amp;, const WebCore::SelectionRect&amp;);
+    static bool decode(ArgumentDecoder&amp;, WebCore::SelectionRect&amp;);
+};
+
</ins><span class="cx"> template&lt;&gt; struct ArgumentCoder&lt;WebCore::PasteboardWebContent&gt; {
</span><span class="cx">     static void encode(ArgumentEncoder&amp;, const WebCore::PasteboardWebContent&amp;);
</span><span class="cx">     static bool decode(ArgumentDecoder&amp;, WebCore::PasteboardWebContent&amp;);
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebEvent.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebEvent.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/WebEvent.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -239,6 +239,72 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><ins>+#if PLATFORM(IOS)
+class WebPlatformTouchPoint {
+public:
+    enum TouchPointState {
+        TouchReleased,
+        TouchPressed,
+        TouchMoved,
+        TouchStationary,
+        TouchCancelled
+    };
+
+    WebPlatformTouchPoint() { }
+    WebPlatformTouchPoint(unsigned identifier, WebCore::IntPoint location, TouchPointState phase)
+        : m_identifier(identifier)
+        , m_location(location)
+        , m_phase(phase)
+    {
+    }
+
+    unsigned identifier() const { return m_identifier; }
+    WebCore::IntPoint location() const { return m_location; }
+    TouchPointState phase() const { return static_cast&lt;TouchPointState&gt;(m_phase); }
+
+    void encode(CoreIPC::ArgumentEncoder&amp;) const;
+    static bool decode(CoreIPC::ArgumentDecoder&amp;, WebPlatformTouchPoint&amp;);
+
+private:
+    unsigned m_identifier;
+    WebCore::IntPoint m_location;
+    uint32_t m_phase;
+};
+
+class WebTouchEvent : public WebEvent {
+public:
+    WebTouchEvent() { }
+    WebTouchEvent(WebEvent::Type type, Modifiers modifiers, double timestamp, const Vector&lt;WebPlatformTouchPoint&gt;&amp; touchPoints, WebCore::IntPoint position, bool isGesture, float gestureScale, float gestureRotation)
+        : WebEvent(type, modifiers, timestamp)
+        , m_touchPoints(touchPoints)
+        , m_position(position)
+        , m_isGesture(isGesture)
+        , m_gestureScale(gestureScale)
+        , m_gestureRotation(gestureRotation)
+    {
+        ASSERT(type == TouchStart || type == TouchMove || type == TouchEnd || type == TouchCancel);
+    }
+
+    const Vector&lt;WebPlatformTouchPoint&gt;&amp; touchPoints() const { return m_touchPoints; }
+
+    WebCore::IntPoint position() const { return m_position; }
+
+    bool isGesture() const { return m_isGesture; }
+    float gestureScale() const { return m_gestureScale; }
+    float gestureRotation() const { return m_gestureRotation; }
+
+    void encode(CoreIPC::ArgumentEncoder&amp;) const;
+    static bool decode(CoreIPC::ArgumentDecoder&amp;, WebTouchEvent&amp;);
+    
+private:
+    Vector&lt;WebPlatformTouchPoint&gt; m_touchPoints;
+    
+    WebCore::IntPoint m_position;
+    bool m_isGesture;
+    float m_gestureScale;
+    float m_gestureRotation;
+};
+#else
</ins><span class="cx"> // FIXME: Move this class to its own header file.
</span><span class="cx"> // FIXME: Having &quot;Platform&quot; in the name makes it sound like this event is platform-specific or low-
</span><span class="cx"> // level in some way. That doesn't seem to be the case.
</span><span class="lines">@@ -301,6 +367,7 @@
</span><span class="cx">     Vector&lt;WebPlatformTouchPoint&gt; m_touchPoints;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+#endif // PLATFORM(IOS)
</ins><span class="cx"> #endif // ENABLE(TOUCH_EVENTS)
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebEventConversioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebEventConversion.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebEventConversion.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/WebEventConversion.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -197,8 +197,35 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><ins>+
+#if PLATFORM(IOS)
+static WebCore::PlatformTouchPoint::TouchPhaseType touchEventType(const WebPlatformTouchPoint&amp; webTouchPoint)
+{
+    switch (webTouchPoint.phase()) {
+    case WebPlatformTouchPoint::TouchReleased:
+        return WebCore::PlatformTouchPoint::TouchPhaseEnded;
+    case WebPlatformTouchPoint::TouchPressed:
+        return WebCore::PlatformTouchPoint::TouchPhaseBegan;
+    case WebPlatformTouchPoint::TouchMoved:
+        return WebCore::PlatformTouchPoint::TouchPhaseMoved;
+    case WebPlatformTouchPoint::TouchStationary:
+        return WebCore::PlatformTouchPoint::TouchPhaseStationary;
+    case WebPlatformTouchPoint::TouchCancelled:
+        return WebCore::PlatformTouchPoint::TouchPhaseCancelled;
+    }
+}
+
</ins><span class="cx"> class WebKit2PlatformTouchPoint : public WebCore::PlatformTouchPoint {
</span><span class="cx"> public:
</span><ins>+WebKit2PlatformTouchPoint(const WebPlatformTouchPoint&amp; webTouchPoint)
+    : PlatformTouchPoint(webTouchPoint.identifier(), webTouchPoint.location(), touchEventType(webTouchPoint))
+{
+}
+};
+#else
+
+class WebKit2PlatformTouchPoint : public WebCore::PlatformTouchPoint {
+public:
</ins><span class="cx">     WebKit2PlatformTouchPoint(const WebPlatformTouchPoint&amp; webTouchPoint)
</span><span class="cx">     {
</span><span class="cx">         m_id = webTouchPoint.id();
</span><span class="lines">@@ -231,6 +258,7 @@
</span><span class="cx">         m_rotationAngle = webTouchPoint.rotationAngle();
</span><span class="cx">     }
</span><span class="cx"> };
</span><ins>+#endif // PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx"> class WebKit2PlatformTouchEvent : public WebCore::PlatformTouchEvent {
</span><span class="cx"> public:
</span><span class="lines">@@ -266,9 +294,22 @@
</span><span class="cx"> 
</span><span class="cx">         m_timestamp = webEvent.timestamp();
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+        unsigned touchCount = webEvent.touchPoints().size();
+        m_touchPoints.reserveInitialCapacity(touchCount);
+        for (unsigned i = 0; i &lt; touchCount; ++i)
+            m_touchPoints.uncheckedAppend(WebKit2PlatformTouchPoint(webEvent.touchPoints().at(i)));
+
+        m_gestureScale = webEvent.gestureScale();
+        m_gestureRotation = webEvent.gestureRotation();
+        m_isGesture = webEvent.isGesture();
+        m_position = webEvent.position();
+        m_globalPosition = webEvent.position();
+#else
</ins><span class="cx">         // PlatformTouchEvent
</span><span class="cx">         for (size_t i = 0; i &lt; webEvent.touchPoints().size(); ++i)
</span><span class="cx">             m_touchPoints.append(WebKit2PlatformTouchPoint(webEvent.touchPoints().at(i)));
</span><ins>+#endif //PLATFORM(IOS)
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebEventConversionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebEventConversion.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebEventConversion.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/WebEventConversion.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -31,9 +31,13 @@
</span><span class="cx"> #include &lt;WebCore/PlatformWheelEvent.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><ins>+#if PLATFORM(IOS)
+#include &lt;WebCore/PlatformTouchEventIOS.h&gt;
+#else
</ins><span class="cx"> #include &lt;WebCore/PlatformTouchEvent.h&gt;
</span><span class="cx"> #include &lt;WebCore/PlatformTouchPoint.h&gt;
</span><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="lines">@@ -52,8 +56,10 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx"> WebCore::PlatformTouchEvent platform(const WebTouchEvent&amp;);
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> WebCore::PlatformTouchPoint platform(const WebTouchPoint&amp;);
</span><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPreferencesStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPreferencesStore.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPreferencesStore.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/WebPreferencesStore.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> #define DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED false
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx"> #define DEFAULT_SCREEN_FONT_SUBSTITUTION_ENABLED false
</span><span class="cx"> #else
</span><span class="cx"> #define DEFAULT_SCREEN_FONT_SUBSTITUTION_ENABLED true
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebSecurityOriginh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebSecurityOrigin.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebSecurityOrigin.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/WebSecurityOrigin.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -65,6 +65,10 @@
</span><span class="cx"> 
</span><span class="cx">     WebCore::SecurityOrigin* securityOrigin() const { return m_securityOrigin.get(); }
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    WebCore::SecurityOrigin* securityOrigin() { return m_securityOrigin.get(); }
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> private:
</span><span class="cx">     WebSecurityOrigin(PassRefPtr&lt;WebCore::SecurityOrigin&gt; securityOrigin)
</span><span class="cx">         : m_securityOrigin(securityOrigin)
</span></span></pre></div>
<a id="trunkSourceWebKit2SharediosNativeWebKeyboardEventIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/ios/NativeWebKeyboardEventIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ios/NativeWebKeyboardEventIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/Shared/ios/NativeWebKeyboardEventIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,39 @@
</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 &quot;config.h&quot;
+#import &quot;NativeWebKeyboardEvent.h&quot;
+
+#import &quot;WebIOSEventFactory.h&quot;
+
+namespace WebKit {
+
+NativeWebKeyboardEvent::NativeWebKeyboardEvent(WebIOSEvent *event)
+    : WebKeyboardEvent(WebIOSEventFactory::createWebKeyboardEvent(event))
+    , m_nativeEvent(event)
+{
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharediosNativeWebTouchEventIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,102 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;NativeWebTouchEvent.h&quot;
+
+#import &quot;WebEvent.h&quot;
+#import &lt;Foundation/NSGeometry.h&gt;
+#import &lt;UIKit/UITouch.h&gt;
+#import &lt;UIKit/UIWebTouchEventsGestureRecognizer.h&gt;
+#import &lt;WebCore/IntPoint.h&gt;
+#import &lt;wtf/CurrentTime.h&gt;
+
+namespace WebKit {
+
+static inline WebEvent::Type webEventTypeForUIWebTouchEventType(UIWebTouchEventType type)
+{
+    switch (type) {
+    case UIWebTouchEventTouchBegin:
+        return WebEvent::TouchStart;
+    case UIWebTouchEventTouchChange:
+        return WebEvent::TouchStart;
+    case UIWebTouchEventTouchEnd:
+        return WebEvent::TouchStart;
+    case UIWebTouchEventTouchCancel:
+        return WebEvent::TouchStart;
+    }
+}
+
+static WebPlatformTouchPoint::TouchPointState convertTouchPhase(NSNumber *touchPhaseNumber)
+{
+    UITouchPhase touchPhase = static_cast&lt;UITouchPhase&gt;([touchPhaseNumber unsignedIntValue]);
+    switch (touchPhase) {
+    case UITouchPhaseBegan:
+        return WebPlatformTouchPoint::TouchPressed;
+    case UITouchPhaseMoved:
+        return WebPlatformTouchPoint::TouchMoved;
+    case UITouchPhaseStationary:
+        return WebPlatformTouchPoint::TouchStationary;
+    case UITouchPhaseEnded:
+        return WebPlatformTouchPoint::TouchReleased;
+    case UITouchPhaseCancelled:
+        return WebPlatformTouchPoint::TouchCancelled;
+    default:
+        ASSERT_NOT_REACHED();
+        return WebPlatformTouchPoint::TouchStationary;
+    }
+}
+
+static inline WebCore::IntPoint positionForCGPoint(CGPoint position)
+{
+    return WebCore::IntPoint(position);
+}
+
+static inline Vector&lt;WebPlatformTouchPoint&gt; extractWebTouchPoint(UIWebTouchEventsGestureRecognizer *gestureRecognizer)
+{
+    unsigned touchCount = [gestureRecognizer.touchLocations count];
+    NSArray *touchLocations = gestureRecognizer.touchLocations;
+    NSArray *touchIdentifiers = gestureRecognizer.touchIdentifiers;
+    NSArray *touchPhases = gestureRecognizer.touchPhases;
+
+    Vector&lt;WebPlatformTouchPoint&gt; touchPointList;
+    touchPointList.reserveInitialCapacity(touchCount);
+    for (unsigned i = 0; i &lt; touchCount; ++i) {
+        unsigned identifier = [(NSNumber *)[touchIdentifiers objectAtIndex:i] unsignedIntValue];
+        WebCore::IntPoint location = positionForCGPoint([(NSValue *)[touchLocations objectAtIndex:i] pointValue]);
+        WebPlatformTouchPoint::TouchPointState phase = convertTouchPhase([touchPhases objectAtIndex:i]);
+        WebPlatformTouchPoint touchPoint(identifier, location, phase);
+        touchPointList.uncheckedAppend(touchPoint);
+    }
+    return touchPointList;
+}
+
+NativeWebTouchEvent::NativeWebTouchEvent(UIWebTouchEventsGestureRecognizer *gestureRecognizer)
+    : WebTouchEvent(webEventTypeForUIWebTouchEventType(gestureRecognizer.type), static_cast&lt;Modifiers&gt;(0), WTF::currentTime(), extractWebTouchPoint(gestureRecognizer), positionForCGPoint(gestureRecognizer.locationInWindow), gestureRecognizer.inJavaScriptGesture, gestureRecognizer.scale, gestureRecognizer.rotation)
+    , m_nativeEvent(gestureRecognizer)
+{
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharediosWKGestureTypesh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/ios/WKGestureTypes.h (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ios/WKGestureTypes.h                                (rev 0)
+++ trunk/Source/WebKit2/Shared/ios/WKGestureTypes.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,68 @@
</span><ins>+/*
+ * Copyright (C) 2012 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.
+ */
+
+#ifndef WKGestureTypes_h
+#define WKGestureTypes_h
+
+namespace WebKit {
+
+typedef enum {
+    WKGestureLoupe,
+    WKGestureOneFingerTap,
+    WKGestureTapAndAHalf,
+    WKGestureDoubleTap,
+    WKGestureTapAndHalf,
+    WKGestureDoubleTapInUneditable,
+    WKGestureOneFingerTapInUneditable,
+    WKGestureOneFingerTapSelectsAll,
+    WKGestureOneFingerDoubleTap,
+    WKGestureOneFingerTripleTap,
+    WKGestureTwoFingerSingleTap,
+    WKGestureTwoFingerRangedSelectGesture,
+    WKGestureTapOnLinkWithGesture
+} WKGestureType;
+
+typedef enum {
+    WKSelectionTouchStarted,
+    WKSelectionTouchMoved,
+    WKSelectionTouchEnded,
+    WKSelectionTouchEndedMovingForward,
+    WKSelectionTouchEndedMovingBackward,
+    WKSelectionTouchEndedNotMoving
+} WKSelectionTouch;
+
+typedef enum {
+    WKGestureRecognizerStatePossible,
+    WKGestureRecognizerStateBegan,
+    WKGestureRecognizerStateChanged,
+    WKGestureRecognizerStateEnded,
+    WKGestureRecognizerStateCancelled,
+    WKGestureRecognizerStateFailed,
+    WKGestureRecognizerStateRecognized = WKGestureRecognizerStateEnded
+} WKGestureRecognizerState;
+
+} // namespace WebKit
+
+#endif // WKGestureTypes_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharediosWebIOSEventFactoryh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/ios/WebIOSEventFactory.h (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ios/WebIOSEventFactory.h                                (rev 0)
+++ trunk/Source/WebKit2/Shared/ios/WebIOSEventFactory.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,37 @@
</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.
+ */
+
+#ifndef WebIOSEventFactory_h
+#define WebIOSEventFactory_h
+
+#import &quot;WebEvent.h&quot;
+#import &lt;WebCore/WebEvent.h&gt;
+
+class WebIOSEventFactory {
+public:
+    static WebKit::WebKeyboardEvent createWebKeyboardEvent(WebIOSEvent *event);
+};
+
+#endif // WebIOSEventFactory_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharediosWebIOSEventFactorymm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/ios/WebIOSEventFactory.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ios/WebIOSEventFactory.mm                                (rev 0)
+++ trunk/Source/WebKit2/Shared/ios/WebIOSEventFactory.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,83 @@
</span><ins>+/*
+ * Copyright (C) 2013, 2011 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 &quot;config.h&quot;
+#import &quot;WebIOSEventFactory.h&quot;
+
+#import &lt;WebCore/KeyEventCodesIOS.h&gt;
+#import &lt;WebCore/PlatformEventFactoryIOS.h&gt;
+
+static WebKit::WebEvent::Modifiers modifiersForEvent(WebIOSEvent *event)
+{
+    unsigned modifiers = 0;
+    WebEventFlags eventModifierFlags = event.modifierFlags;
+
+    if (eventModifierFlags &amp; WebEventFlagMaskShift)
+        modifiers |= WebKit::WebEvent::ShiftKey;
+    if (eventModifierFlags &amp; WebEventFlagMaskControl)
+        modifiers |= WebKit::WebEvent::ControlKey;
+    if (eventModifierFlags &amp; WebEventFlagMaskAlternate)
+        modifiers |= WebKit::WebEvent::AltKey;
+    if (eventModifierFlags &amp; WebEventFlagMaskCommand)
+        modifiers |= WebKit::WebEvent::MetaKey;
+
+    return static_cast&lt;WebKit::WebEvent::Modifiers&gt;(modifiers);
+}
+
+WebKit::WebKeyboardEvent WebIOSEventFactory::createWebKeyboardEvent(WebIOSEvent *event)
+{
+    WebKit::WebEvent::Type type = (event.type == WebEventKeyUp) ? WebKit::WebEvent::KeyUp : WebKit::WebEvent::KeyDown;
+    String text = event.characters;
+    String unmodifiedText = event.charactersIgnoringModifiers;
+    String keyIdentifier = WebCore::keyIdentifierForKeyEvent(event);
+    int windowsVirtualKeyCode = event.keyCode;
+    int nativeVirtualKeyCode = event.keyCode;
+    int macCharCode = 0;
+    bool autoRepeat = event.isKeyRepeating;
+    bool isKeypad = false;
+    bool isSystemKey = false;
+    WebKit::WebEvent::Modifiers modifiers = modifiersForEvent(event);
+    double timestamp = event.timestamp;
+
+    if (windowsVirtualKeyCode == '\r') {
+        text = ASCIILiteral(&quot;\r&quot;);
+        unmodifiedText = text;
+    }
+
+    // The adjustments below are only needed in backward compatibility mode, but we cannot tell what mode we are in from here.
+
+    // Turn 0x7F into 8, because backspace needs to always be 8.
+    if (text == &quot;\x7F&quot;)
+        text = ASCIILiteral(&quot;\x8&quot;);
+    if (unmodifiedText == &quot;\x7F&quot;)
+        unmodifiedText = ASCIILiteral(&quot;\x8&quot;);
+    // Always use 9 for tab.
+    if (windowsVirtualKeyCode == 9) {
+        text = ASCIILiteral(&quot;\x9&quot;);
+        unmodifiedText = text;
+    }
+
+    return WebKit::WebKeyboardEvent(type, text, unmodifiedText, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, macCharCode, autoRepeat, isKeypad, isSystemKey, modifiers, timestamp);
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharediosWebPlatformTouchPointIOScpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/ios/WebPlatformTouchPointIOS.cpp (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ios/WebPlatformTouchPointIOS.cpp                                (rev 0)
+++ trunk/Source/WebKit2/Shared/ios/WebPlatformTouchPointIOS.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * Copyright (C) 2012 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.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebEvent.h&quot;
+
+#if ENABLE(TOUCH_EVENTS)
+
+#include &quot;Arguments.h&quot;
+#include &quot;WebCoreArgumentCoders.h&quot;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebPlatformTouchPoint::encode(CoreIPC::ArgumentEncoder&amp; encoder) const
+{
+    encoder &lt;&lt; m_identifier;
+    encoder &lt;&lt; m_location;
+    encoder &lt;&lt; m_phase;
+}
+
+bool WebPlatformTouchPoint::decode(CoreIPC::ArgumentDecoder&amp; decoder, WebPlatformTouchPoint&amp; result)
+{
+    if (!decoder.decode(result.m_identifier))
+        return false;
+    if (!decoder.decode(result.m_location))
+        return false;
+    if (!decoder.decode(result.m_phase))
+        return false;
+    return true;
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(TOUCH_EVENTS)
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharediosWebTouchEventIOScpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/ios/WebTouchEventIOS.cpp (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ios/WebTouchEventIOS.cpp                                (rev 0)
+++ trunk/Source/WebKit2/Shared/ios/WebTouchEventIOS.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2012 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.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebEvent.h&quot;
+
+#if ENABLE(TOUCH_EVENTS)
+
+#include &quot;ArgumentCoders.h&quot;
+#include &quot;Arguments.h&quot;
+#include &quot;WebCoreArgumentCoders.h&quot;
+
+namespace WebKit {
+
+void WebTouchEvent::encode(CoreIPC::ArgumentEncoder&amp; encoder) const
+{
+    WebEvent::encode(encoder);
+
+    encoder &lt;&lt; m_touchPoints;
+    encoder &lt;&lt; m_position;
+    encoder &lt;&lt; m_isGesture;
+    encoder &lt;&lt; m_gestureScale;
+    encoder &lt;&lt; m_gestureRotation;
+}
+
+bool WebTouchEvent::decode(CoreIPC::ArgumentDecoder&amp; decoder, WebTouchEvent&amp; result)
+{
+    if (!WebEvent::decode(decoder, result))
+        return false;
+
+    if (!decoder.decode(result.m_touchPoints))
+        return false;
+    if (!decoder.decode(result.m_position))
+        return false;
+    if (!decoder.decode(result.m_isGesture))
+        return false;
+    if (!decoder.decode(result.m_gestureScale))
+        return false;
+    if (!decoder.decode(result.m_gestureRotation))
+        return false;
+
+    return true;
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(TOUCH_EVENTS)
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharedmacChildProcessMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx"> typedef bool (^LSServerConnectionAllowedBlock) ( CFDictionaryRef optionsRef );
</span><span class="cx"> extern &quot;C&quot; void _LSSetApplicationLaunchServicesServerConnectionStatus(uint64_t flags, LSServerConnectionAllowedBlock block);
</span><span class="cx"> extern &quot;C&quot; CFDictionaryRef _LSApplicationCheckIn(int sessionID, CFDictionaryRef applicationInfo);
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ChildProcess::setProcessSuppressionEnabledInternal(bool processSuppressionEnabled)
</span><span class="cx"> {
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">     if (this-&gt;processSuppressionEnabled() == processSuppressionEnabled)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -122,7 +122,7 @@
</span><span class="cx">     setProcessSuppressionEnabledInternal(true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx"> static void initializeTimerCoalescingPolicy()
</span><span class="cx"> {
</span><span class="cx">     // Set task_latency and task_throughput QOS tiers as appropriate for a visible application.
</span><span class="lines">@@ -134,6 +134,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ChildProcess::setApplicationIsDaemon()
</span><span class="cx"> {
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     OSStatus error = SetApplicationIsDaemon(true);
</span><span class="cx">     ASSERT_UNUSED(error, error == noErr);
</span><span class="cx"> 
</span><span class="lines">@@ -141,11 +142,12 @@
</span><span class="cx">     _LSSetApplicationLaunchServicesServerConnectionStatus(0, 0);
</span><span class="cx">     RetainPtr&lt;CFDictionaryRef&gt; unused = _LSApplicationCheckIn(-2, CFBundleGetInfoDictionary(CFBundleGetMainBundle()));
</span><span class="cx"> #endif
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ChildProcess::platformInitialize()
</span><span class="cx"> {
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">     initializeTimerCoalescingPolicy();
</span><span class="cx"> #endif
</span><span class="cx">     // Starting with process suppression disabled.  The proxy for this process will
</span><span class="lines">@@ -179,7 +181,7 @@
</span><span class="cx">     osVersion.append(osVersionParts[1]);
</span><span class="cx">     sandboxParameters.addParameter(&quot;_OS_VERSION&quot;, osVersion.utf8().data());
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1080
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1080
</ins><span class="cx">     // Use private temporary and cache directories.
</span><span class="cx">     setenv(&quot;DIRHELPER_USER_DIR_SUFFIX&quot;, fileSystemRepresentation(sandboxParameters.systemDirectorySuffix()).data(), 0);
</span><span class="cx">     char temporaryDirectory[PATH_MAX];
</span><span class="lines">@@ -244,14 +246,17 @@
</span><span class="cx">     }
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     // This will override LSFileQuarantineEnabled from Info.plist unless sandbox quarantine is globally disabled.
</span><span class="cx">     OSStatus error = WKEnableSandboxStyleFileQuarantine();
</span><span class="cx">     if (error) {
</span><span class="cx">         WTFLogAlways(&quot;%s: Couldn't enable sandbox style file quarantine: %ld\n&quot;, getprogname(), (long)error);
</span><span class="cx">         exit(EX_NOPERM);
</span><span class="cx">     }
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if USE(APPKIT)
</ins><span class="cx"> void ChildProcess::stopNSAppRunLoop()
</span><span class="cx"> {
</span><span class="cx">     ASSERT([NSApp isRunning]);
</span><span class="lines">@@ -260,5 +265,6 @@
</span><span class="cx">     NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined location:NSMakePoint(0, 0) modifierFlags:0 timestamp:0.0 windowNumber:0 context:nil subtype:0 data1:0 data2:0];
</span><span class="cx">     [NSApp postEvent:event atStart:true];
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacColorSpaceDatamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/ColorSpaceData.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/ColorSpaceData.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/mac/ColorSpaceData.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ColorSpaceData::encode(CoreIPC::ArgumentEncoder&amp; encoder) const
</span><span class="cx"> {
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     if (cgColorSpace) {
</span><span class="cx">         // Try to encode the name.
</span><span class="cx">         if (RetainPtr&lt;CFStringRef&gt; name = adoptCF(CGColorSpaceCopyName(cgColorSpace.get()))) {
</span><span class="lines">@@ -55,6 +56,7 @@
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx">     }
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx">     // The color space was null or failed to be encoded.
</span><span class="cx">     encoder.encodeEnum(Null);
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -53,7 +53,9 @@
</span><span class="cx">     bool display();
</span><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;CGImageRef&gt; image() const;
</span><ins>+#if USE(IOSURFACE)
</ins><span class="cx">     RetainPtr&lt;IOSurfaceRef&gt; surface() const { return m_frontSurface; }
</span><ins>+#endif
</ins><span class="cx">     WebCore::IntSize size() const { return m_size; }
</span><span class="cx">     float scale() const { return m_scale; }
</span><span class="cx">     bool acceleratesDrawing() const { return m_acceleratesDrawing; }
</span><span class="lines">@@ -66,7 +68,13 @@
</span><span class="cx">     void enumerateRectsBeingDrawn(CGContextRef, void (^)(CGRect));
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    bool hasFrontBuffer() { return m_acceleratesDrawing ? !!m_frontSurface : !!m_frontBuffer; }
</del><ins>+    bool hasFrontBuffer()
+    {
+#if USE(IOSURFACE)
+        return m_acceleratesDrawing ? !!m_frontSurface : !!m_frontBuffer;
+#endif
+        return !!m_frontBuffer;
+    }
</ins><span class="cx"> 
</span><span class="cx">     void drawInContext(WebCore::GraphicsContext&amp;, CGImageRef frontImage);
</span><span class="cx"> 
</span><span class="lines">@@ -78,7 +86,9 @@
</span><span class="cx">     WebCore::Region m_dirtyRegion;
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;ShareableBitmap&gt; m_frontBuffer;
</span><ins>+#if USE(IOSURFACE)
</ins><span class="cx">     RetainPtr&lt;IOSurfaceRef&gt; m_frontSurface;
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     bool m_acceleratesDrawing;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerBackingStoremm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -36,12 +36,18 @@
</span><span class="cx"> #import &lt;WebCore/GraphicsContextCG.h&gt;
</span><span class="cx"> #import &lt;WebCore/WebLayer.h&gt;
</span><span class="cx"> 
</span><ins>+#if USE(IOSURFACE)
+#import &lt;mach/mach_port.h&gt;
+#endif
+
</ins><span class="cx"> #if defined(__has_include) &amp;&amp; __has_include(&lt;ApplicationServices/ApplicationServicesPriv.h&gt;)
</span><span class="cx"> #import &lt;ApplicationServices/ApplicationServicesPriv.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> extern &quot;C&quot; {
</span><ins>+#if USE(IOSURFACE)
</ins><span class="cx"> CGContextRef CGIOSurfaceContextCreate(IOSurfaceRef, size_t, size_t, size_t, size_t, CGColorSpaceRef, CGBitmapInfo);
</span><ins>+#endif
</ins><span class="cx"> CGImageRef CGIOSurfaceContextCreateImage(CGContextRef);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -63,7 +69,9 @@
</span><span class="cx">     m_scale = scale;
</span><span class="cx">     m_acceleratesDrawing = acceleratesDrawing;
</span><span class="cx"> 
</span><ins>+#if USE(IOSURFACE)
</ins><span class="cx">     m_frontSurface = nullptr;
</span><ins>+#endif
</ins><span class="cx">     m_frontBuffer = nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -73,14 +81,19 @@
</span><span class="cx">     encoder &lt;&lt; m_scale;
</span><span class="cx">     encoder &lt;&lt; m_acceleratesDrawing;
</span><span class="cx"> 
</span><ins>+#if USE(IOSURFACE)
</ins><span class="cx">     if (m_acceleratesDrawing) {
</span><span class="cx">         mach_port_t port = IOSurfaceCreateMachPort(m_frontSurface.get());
</span><span class="cx">         encoder &lt;&lt; CoreIPC::MachPort(port, MACH_MSG_TYPE_MOVE_SEND);
</span><del>-    } else {
-        ShareableBitmap::Handle handle;
-        m_frontBuffer-&gt;createHandle(handle);
-        encoder &lt;&lt; handle;
</del><ins>+        return;
</ins><span class="cx">     }
</span><ins>+#else
+    ASSERT(!m_acceleratesDrawing);
+#endif
+
+    ShareableBitmap::Handle handle;
+    m_frontBuffer-&gt;createHandle(handle);
+    encoder &lt;&lt; handle;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RemoteLayerBackingStore::decode(CoreIPC::ArgumentDecoder&amp; decoder, RemoteLayerBackingStore&amp; result)
</span><span class="lines">@@ -94,19 +107,24 @@
</span><span class="cx">     if (!decoder.decode(result.m_acceleratesDrawing))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><ins>+#if USE(IOSURFACE)
</ins><span class="cx">     if (result.m_acceleratesDrawing) {
</span><span class="cx">         CoreIPC::MachPort machPort;
</span><span class="cx">         if (!decoder.decode(machPort))
</span><span class="cx">             return false;
</span><span class="cx">         result.m_frontSurface = adoptCF(IOSurfaceLookupFromMachPort(machPort.port()));
</span><span class="cx">         mach_port_deallocate(mach_task_self(), machPort.port());
</span><del>-    } else {
-        ShareableBitmap::Handle handle;
-        if (!decoder.decode(handle))
-            return false;
-        result.m_frontBuffer = ShareableBitmap::create(handle);
</del><ins>+        return true;
</ins><span class="cx">     }
</span><ins>+#else
+    ASSERT(!result.m_acceleratesDrawing);
+#endif
</ins><span class="cx"> 
</span><ins>+    ShareableBitmap::Handle handle;
+    if (!decoder.decode(handle))
+        return false;
+    result.m_frontBuffer = ShareableBitmap::create(handle);
+
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -120,6 +138,7 @@
</span><span class="cx">     setNeedsDisplay(IntRect(IntPoint(), m_size));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if USE(IOSURFACE)
</ins><span class="cx"> static RetainPtr&lt;CGContextRef&gt; createIOSurfaceContext(IOSurfaceRef surface, IntSize size, CGColorSpaceRef colorSpace)
</span><span class="cx"> {
</span><span class="cx">     if (!surface)
</span><span class="lines">@@ -155,6 +174,7 @@
</span><span class="cx"> 
</span><span class="cx">     return adoptCF(IOSurfaceCreate((CFDictionaryRef)dict));
</span><span class="cx"> }
</span><ins>+#endif // USE(IOSURFACE)
</ins><span class="cx"> 
</span><span class="cx"> RetainPtr&lt;CGImageRef&gt; RemoteLayerBackingStore::image() const
</span><span class="cx"> {
</span><span class="lines">@@ -176,7 +196,9 @@
</span><span class="cx">         bool previouslyDrewContents = hasFrontBuffer();
</span><span class="cx"> 
</span><span class="cx">         m_frontBuffer = nullptr;
</span><ins>+#if USE(IOSURFACE)
</ins><span class="cx">         m_frontSurface = nullptr;
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">         return previouslyDrewContents;
</span><span class="cx">     }
</span><span class="lines">@@ -196,6 +218,7 @@
</span><span class="cx">     scaledSize.scale(m_scale);
</span><span class="cx">     IntSize expandedScaledSize = expandedIntSize(scaledSize);
</span><span class="cx"> 
</span><ins>+#if USE(IOSURFACE)
</ins><span class="cx">     if (m_acceleratesDrawing) {
</span><span class="cx">         RetainPtr&lt;IOSurfaceRef&gt; backSurface = createIOSurface(expandedScaledSize);
</span><span class="cx">         RetainPtr&lt;CGContextRef&gt; cgContext = createIOSurfaceContext(backSurface.get(), expandedScaledSize, sRGBColorSpaceRef());
</span><span class="lines">@@ -221,13 +244,18 @@
</span><span class="cx">             frontImage = nullptr;
</span><span class="cx">             ASSERT(frontContext);
</span><span class="cx">         }
</span><del>-    } else {
-        RetainPtr&lt;CGImageRef&gt; frontImage = image();
-        m_frontBuffer = ShareableBitmap::createShareable(expandedScaledSize, ShareableBitmap::SupportsAlpha);
-        std::unique_ptr&lt;GraphicsContext&gt; context = m_frontBuffer-&gt;createGraphicsContext();
-        drawInContext(*context, frontImage.get());
</del><ins>+
+        return true;
</ins><span class="cx">     }
</span><ins>+#else
+    ASSERT(!m_acceleratesDrawing);
+#endif
</ins><span class="cx"> 
</span><ins>+    RetainPtr&lt;CGImageRef&gt; frontImage = image();
+    m_frontBuffer = ShareableBitmap::createShareable(expandedScaledSize, ShareableBitmap::SupportsAlpha);
+    std::unique_ptr&lt;GraphicsContext&gt; context = m_frontBuffer-&gt;createGraphicsContext();
+    drawInContext(*context, frontImage.get());
+    
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerTreePropertyAppliermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -141,10 +141,14 @@
</span><span class="cx">         layer.timeOffset = properties.timeOffset;
</span><span class="cx"> 
</span><span class="cx">     if (properties.changedProperties &amp; RemoteLayerTreeTransaction::BackingStoreChanged) {
</span><ins>+#if USE(IOSURFACE)
</ins><span class="cx">         if (properties.backingStore.acceleratesDrawing())
</span><span class="cx">             layer.contents = (id)properties.backingStore.surface().get();
</span><span class="cx">         else
</span><del>-            layer.contents = (id)properties.backingStore.image().get();
</del><ins>+#else
+            ASSERT(!properties.backingStore.acceleratesDrawing());
+#endif
+        layer.contents = (id)properties.backingStore.image().get();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (properties.changedProperties &amp; RemoteLayerTreeTransaction::FiltersChanged)
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacSecItemShimmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/SecItemShim.messages.in (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/SecItemShim.messages.in        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/Shared/mac/SecItemShim.messages.in        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -20,6 +20,7 @@
</span><span class="cx"> # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
</span><span class="cx"> # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> messages -&gt; SecItemShim {
</span><span class="cx"> 
</span><span class="cx"> #if USE(SECURITY_FRAMEWORK)
</span><span class="lines">@@ -27,3 +28,4 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> }
</span><ins>+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKNativeEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKNativeEvent.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKNativeEvent.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKNativeEvent.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -26,11 +26,15 @@
</span><span class="cx"> #ifndef WKNativeEvent_h
</span><span class="cx"> #define WKNativeEvent_h
</span><span class="cx"> 
</span><ins>+#ifdef __APPLE__
+#include &lt;TargetConditionals.h&gt;
+#endif
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> extern &quot;C&quot; {
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#ifdef __APPLE__
</del><ins>+#if defined(__APPLE__) &amp;&amp; !TARGET_OS_IPHONE
</ins><span class="cx"> #ifdef __OBJC__
</span><span class="cx"> @class NSEvent;
</span><span class="cx"> #elif __cplusplus
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -888,15 +888,15 @@
</span><span class="cx">     toImpl(page)-&gt;setScrollPinningBehavior(corePinning);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-
-
-// -- DEPRECATED --
-
</del><span class="cx"> void WKPageSetInvalidMessageFunction(WKPageInvalidMessageFunction)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Remove this function when doing so won't break WebKit nightlies.
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
+
+// -- DEPRECATED --
+
</ins><span class="cx"> WKStringRef WKPageGetPluginInformationBundleIdentifierKey()
</span><span class="cx"> {
</span><span class="cx">     return WKPluginInformationBundleIdentifierKey();
</span><span class="lines">@@ -939,3 +939,4 @@
</span><span class="cx"> 
</span><span class="cx"> // -- DEPRECATED --
</span><span class="cx"> 
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICmacWKContextPrivateMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -37,6 +37,8 @@
</span><span class="cx"> 
</span><span class="cx"> WK_EXPORT bool WKContextIsPlugInUpdateAvailable(WKContextRef context, WKStringRef plugInBundleIdentifier);
</span><span class="cx"> 
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
+
</ins><span class="cx"> WK_EXPORT WKDictionaryRef WKContextCopyPlugInInfoForBundleIdentifier(WKContextRef context, WKStringRef plugInBundleIdentifier);
</span><span class="cx"> 
</span><span class="cx"> typedef void (^WKContextGetInfoForInstalledPlugInsBlock)(WKArrayRef, WKErrorRef);
</span><span class="lines">@@ -64,6 +66,8 @@
</span><span class="cx"> /* Value type: WKBooleanRef */
</span><span class="cx"> WK_EXPORT WKStringRef WKPlugInInfoIsSandboxedKey();
</span><span class="cx"> 
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICmacWKContextPrivateMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -56,9 +56,15 @@
</span><span class="cx"> 
</span><span class="cx"> bool WKContextIsPlugInUpdateAvailable(WKContextRef contextRef, WKStringRef plugInBundleIdentifierRef)
</span><span class="cx"> {
</span><ins>+#if PLATFORM(IOS)
+    return false;
+#else
</ins><span class="cx">     return WKIsPluginUpdateAvailable((NSString *)adoptCF(WKStringCopyCFString(kCFAllocatorDefault, plugInBundleIdentifierRef)).get());
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
+
</ins><span class="cx"> WKDictionaryRef WKContextCopyPlugInInfoForBundleIdentifier(WKContextRef contextRef, WKStringRef plugInBundleIdentifierRef)
</span><span class="cx"> {
</span><span class="cx">     PluginModuleInfo plugin = toImpl(contextRef)-&gt;pluginInfoStore().findPluginWithBundleIdentifier(toWTFString(plugInBundleIdentifierRef));
</span><span class="lines">@@ -126,3 +132,5 @@
</span><span class="cx"> {
</span><span class="cx">     return WKPluginInformationHasSandboxProfileKey();
</span><span class="cx"> }
</span><ins>+
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosPageClientImplIOSh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,109 @@
</span><ins>+/*
+ * Copyright (C) 2012, 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.
+ */
+
+#ifndef PageClientImplIOS_h
+#define PageClientImplIOS_h
+
+#import &quot;PageClient.h&quot;
+#import &lt;wtf/RetainPtr.h&gt;
+
+@class WKContentView;
+
+namespace WebKit {
+    
+class PageClientImpl : public PageClient {
+public:
+    static PassOwnPtr&lt;PageClientImpl&gt; create(WKContentView *);
+    virtual ~PageClientImpl();
+    
+private:
+    explicit PageClientImpl(WKContentView *);
+    
+    virtual std::unique_ptr&lt;DrawingAreaProxy&gt; createDrawingAreaProxy() OVERRIDE;
+    virtual void setViewNeedsDisplay(const WebCore::IntRect&amp;) OVERRIDE;
+    virtual void displayView() OVERRIDE;
+    virtual bool canScrollView() OVERRIDE;
+    virtual void scrollView(const WebCore::IntRect&amp; scrollRect, const WebCore::IntSize&amp; scrollOffset) OVERRIDE;
+    virtual WebCore::IntSize viewSize() OVERRIDE;
+    virtual bool isViewWindowActive() OVERRIDE;
+    virtual bool isViewFocused() OVERRIDE;
+    virtual bool isViewVisible() OVERRIDE;
+    virtual bool isWindowVisible() OVERRIDE;
+    virtual bool isViewInWindow() OVERRIDE;
+    virtual void processDidCrash() OVERRIDE;
+    virtual void didRelaunchProcess() OVERRIDE;
+    virtual void pageClosed() OVERRIDE;
+    virtual void preferencesDidChange() OVERRIDE;
+    virtual void toolTipChanged(const String&amp;, const String&amp;) OVERRIDE;
+    virtual void didChangeContentSize(const WebCore::IntSize&amp;) OVERRIDE;
+    virtual void setCursor(const WebCore::Cursor&amp;) OVERRIDE;
+    virtual void setCursorHiddenUntilMouseMoves(bool) OVERRIDE;
+    virtual void didChangeViewportProperties(const WebCore::ViewportAttributes&amp;) OVERRIDE;
+    virtual void registerEditCommand(PassRefPtr&lt;WebEditCommandProxy&gt;, WebPageProxy::UndoOrRedo) OVERRIDE;
+    virtual void clearAllEditCommands() OVERRIDE;
+    virtual bool canUndoRedo(WebPageProxy::UndoOrRedo) OVERRIDE;
+    virtual void executeUndoRedo(WebPageProxy::UndoOrRedo) OVERRIDE;
+    virtual void accessibilityWebProcessTokenReceived(const CoreIPC::DataReference&amp;) OVERRIDE;
+    virtual bool interpretKeyEvent(const NativeWebKeyboardEvent&amp;, Vector&lt;WebCore::KeypressCommand&gt;&amp;) OVERRIDE;
+    virtual bool executeSavedCommandBySelector(const String&amp; selector) OVERRIDE;
+    virtual void setDragImage(const WebCore::IntPoint&amp; clientPosition, PassRefPtr&lt;ShareableBitmap&gt; dragImage, bool isLinkDrag) OVERRIDE;
+    virtual void updateSecureInputState() OVERRIDE;
+    virtual void resetSecureInputState() OVERRIDE;
+    virtual void notifyInputContextAboutDiscardedComposition() OVERRIDE;
+    virtual void makeFirstResponder() OVERRIDE;
+    virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&amp;) OVERRIDE;
+    virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&amp;) OVERRIDE;
+    virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&amp;) OVERRIDE;
+    virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&amp;) OVERRIDE;
+    virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&amp;, bool wasEventHandled) OVERRIDE;
+#if ENABLE(TOUCH_EVENTS)
+    virtual void doneWithTouchEvent(const NativeWebTouchEvent&amp;, bool wasEventHandled) OVERRIDE;
+#endif
+    virtual PassRefPtr&lt;WebPopupMenuProxy&gt; createPopupMenuProxy(WebPageProxy*) OVERRIDE;
+    virtual PassRefPtr&lt;WebContextMenuProxy&gt; createContextMenuProxy(WebPageProxy*) OVERRIDE;
+    virtual void setFindIndicator(PassRefPtr&lt;FindIndicator&gt;, bool fadeOut, bool animate) OVERRIDE;
+#if USE(ACCELERATED_COMPOSITING)
+    virtual void enterAcceleratedCompositingMode(const LayerTreeContext&amp;) OVERRIDE;
+    virtual void exitAcceleratedCompositingMode() OVERRIDE;
+    virtual void updateAcceleratedCompositingMode(const LayerTreeContext&amp;) OVERRIDE;
+    virtual void setAcceleratedCompositingRootLayer(CALayer *rootLayer) OVERRIDE;
+#endif
+
+    virtual void mainDocumentDidReceiveMobileDocType() OVERRIDE;
+
+    virtual void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color&amp; color, const Vector&lt;WebCore::FloatQuad&gt;&amp; highlightedQuads, const WebCore::IntSize&amp; topLeftRadius, const WebCore::IntSize&amp; topRightRadius, const WebCore::IntSize&amp; bottomLeftRadius, const WebCore::IntSize&amp; bottomRightRadius) OVERRIDE;
+
+    void didChangeViewportArguments(const WebCore::ViewportArguments&amp; viewportArguments) OVERRIDE;
+
+    virtual void startAssistingNode(const WebCore::IntRect&amp;, bool hasNextFocusable, bool hasPreviousFocusable) OVERRIDE;
+    virtual void stopAssistingNode() OVERRIDE;
+    virtual void selectionDidChange() OVERRIDE;
+    virtual bool interpretKeyEvent(const NativeWebKeyboardEvent&amp;, bool isCharEvent) OVERRIDE;
+
+    WKContentView *m_view;
+};
+} // namespace WebKit
+
+#endif // PageClientImplIOS_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosPageClientImplIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,338 @@
</span><ins>+/*
+ * Copyright (C) 2012, 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 &quot;config.h&quot;
+#import &quot;PageClientImplIOS.h&quot;
+
+#import &quot;NativeWebKeyboardEvent.h&quot;
+#import &quot;WKContentViewInternal.h&quot;
+#import &quot;WebContextMenuProxy.h&quot;
+#import &quot;WebEditCommandProxy.h&quot;
+#import &lt;UIKit/UIWebTouchEventsGestureRecognizer.h&gt;
+#import &lt;WebCore/NotImplemented.h&gt;
+#import &lt;WebCore/PlatformScreen.h&gt;
+
+@interface UIView (IPI)
+- (UIScrollView *)_scroller;
+@end
+
+using namespace WebCore;
+
+namespace WebKit {
+
+PassOwnPtr&lt;PageClientImpl&gt; PageClientImpl::create(WKContentView *view)
+{
+    return adoptPtr(new PageClientImpl(view));
+}
+
+PageClientImpl::~PageClientImpl()
+{
+}
+    
+PageClientImpl::PageClientImpl(WKContentView *view)
+    : m_view(view)
+{
+}
+    
+std::unique_ptr&lt;DrawingAreaProxy&gt; PageClientImpl::createDrawingAreaProxy()
+{
+    return [m_view _createDrawingAreaProxy];
+}
+
+void PageClientImpl::setViewNeedsDisplay(const IntRect&amp; rect)
+{
+    ASSERT_NOT_REACHED();
+}
+
+void PageClientImpl::displayView()
+{
+    ASSERT_NOT_REACHED();
+}
+
+void PageClientImpl::scrollView(const IntRect&amp;, const IntSize&amp;)
+{
+    ASSERT_NOT_REACHED();
+}
+
+bool PageClientImpl::canScrollView()
+{
+    notImplemented();
+    return false;
+}
+
+IntSize PageClientImpl::viewSize()
+{
+    if (UIScrollView *scroller = [m_view _scroller])
+        return IntSize(scroller.bounds.size);
+
+    return IntSize(m_view.bounds.size);
+}
+
+bool PageClientImpl::isViewWindowActive()
+{
+    notImplemented();
+    return true;
+}
+
+bool PageClientImpl::isViewFocused()
+{
+    notImplemented();
+    return true;
+}
+
+bool PageClientImpl::isViewVisible()
+{
+    notImplemented();
+    return true;
+}
+
+bool PageClientImpl::isWindowVisible()
+{
+    notImplemented();
+    return true;
+}
+
+bool PageClientImpl::isViewInWindow()
+{
+    return [m_view window];
+}
+
+void PageClientImpl::processDidCrash()
+{
+    [m_view _processDidCrash];
+}
+
+void PageClientImpl::didRelaunchProcess()
+{
+    [m_view _didRelaunchProcess];
+}
+
+void PageClientImpl::pageClosed()
+{
+    notImplemented();
+}
+
+void PageClientImpl::preferencesDidChange()
+{
+    notImplemented();
+}
+
+void PageClientImpl::toolTipChanged(const String&amp;, const String&amp;)
+{
+    notImplemented();
+}
+
+void PageClientImpl::didChangeContentSize(const IntSize&amp; contentsSize)
+{
+    [m_view _didChangeContentSize:contentsSize];
+}
+
+void PageClientImpl::setCursor(const Cursor&amp;)
+{
+    notImplemented();
+}
+
+void PageClientImpl::setCursorHiddenUntilMouseMoves(bool)
+{
+    notImplemented();
+}
+
+void PageClientImpl::didChangeViewportProperties(const ViewportAttributes&amp;)
+{
+    notImplemented();
+}
+
+void PageClientImpl::registerEditCommand(PassRefPtr&lt;WebEditCommandProxy&gt;, WebPageProxy::UndoOrRedo)
+{
+    notImplemented();
+}
+
+void PageClientImpl::clearAllEditCommands()
+{
+    notImplemented();
+}
+
+bool PageClientImpl::canUndoRedo(WebPageProxy::UndoOrRedo)
+{
+    notImplemented();
+    return false;
+}
+
+void PageClientImpl::executeUndoRedo(WebPageProxy::UndoOrRedo)
+{
+    notImplemented();
+}
+
+void PageClientImpl::accessibilityWebProcessTokenReceived(const CoreIPC::DataReference&amp;)
+{
+    notImplemented();
+}
+
+bool PageClientImpl::interpretKeyEvent(const NativeWebKeyboardEvent&amp;, Vector&lt;KeypressCommand&gt;&amp;)
+{
+    notImplemented();
+    return false;
+}
+
+bool PageClientImpl::interpretKeyEvent(const NativeWebKeyboardEvent&amp; event, bool isCharEvent)
+{
+    return [m_view _interpretKeyEvent:event.nativeEvent() isCharEvent:isCharEvent];
+}
+    
+bool PageClientImpl::executeSavedCommandBySelector(const String&amp;)
+{
+    notImplemented();
+    return false;
+}
+
+void PageClientImpl::setDragImage(const IntPoint&amp;, PassRefPtr&lt;ShareableBitmap&gt;, bool)
+{
+    notImplemented();
+}
+
+void PageClientImpl::selectionDidChange()
+{
+    [m_view _selectionChanged];
+}
+
+void PageClientImpl::updateSecureInputState()
+{
+    notImplemented();
+}
+
+void PageClientImpl::resetSecureInputState()
+{
+    notImplemented();
+}
+
+void PageClientImpl::notifyInputContextAboutDiscardedComposition()
+{
+    notImplemented();
+}
+
+void PageClientImpl::makeFirstResponder()
+{
+    notImplemented();
+}
+
+FloatRect PageClientImpl::convertToDeviceSpace(const FloatRect&amp; rect)
+{
+    notImplemented();
+    return FloatRect();
+}
+
+FloatRect PageClientImpl::convertToUserSpace(const FloatRect&amp; rect)
+{
+    notImplemented();
+    return FloatRect();
+}
+
+IntPoint PageClientImpl::screenToWindow(const IntPoint&amp; point)
+{
+    notImplemented();
+    return IntPoint();
+}
+
+IntRect PageClientImpl::windowToScreen(const IntRect&amp; rect)
+{
+    notImplemented();
+    return IntRect();
+}
+
+void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent&amp;, bool)
+{
+    notImplemented();
+}
+
+#if ENABLE(TOUCH_EVENTS)
+void PageClientImpl::doneWithTouchEvent(const NativeWebTouchEvent&amp; nativeWebtouchEvent, bool eventHandled)
+{
+    [nativeWebtouchEvent.nativeEvent() setDefaultPrevented:eventHandled];
+}
+#endif
+
+PassRefPtr&lt;WebPopupMenuProxy&gt; PageClientImpl::createPopupMenuProxy(WebPageProxy*)
+{
+    notImplemented();
+    return 0;
+}
+
+PassRefPtr&lt;WebContextMenuProxy&gt; PageClientImpl::createContextMenuProxy(WebPageProxy*)
+{
+    notImplemented();
+    return 0;
+}
+
+void PageClientImpl::setFindIndicator(PassRefPtr&lt;FindIndicator&gt;, bool, bool)
+{
+    notImplemented();
+}
+    
+#if USE(ACCELERATED_COMPOSITING)
+void PageClientImpl::enterAcceleratedCompositingMode(const LayerTreeContext&amp; layerTreeContext)
+{
+}
+
+void PageClientImpl::exitAcceleratedCompositingMode()
+{
+    notImplemented();
+}
+
+void PageClientImpl::updateAcceleratedCompositingMode(const LayerTreeContext&amp;)
+{
+}
+
+void PageClientImpl::setAcceleratedCompositingRootLayer(CALayer *rootLayer)
+{
+    [m_view _setAcceleratedCompositingRootLayer:rootLayer];
+}
+#endif
+
+void PageClientImpl::mainDocumentDidReceiveMobileDocType()
+{
+    [m_view _mainDocumentDidReceiveMobileDocType];
+}
+
+void PageClientImpl::didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color&amp; color, const Vector&lt;WebCore::FloatQuad&gt;&amp; highlightedQuads, const WebCore::IntSize&amp; topLeftRadius, const WebCore::IntSize&amp; topRightRadius, const WebCore::IntSize&amp; bottomLeftRadius, const WebCore::IntSize&amp; bottomRightRadius)
+{
+    [m_view _didGetTapHighlightForRequest:requestID color:color quads:highlightedQuads topLeftRadius:topLeftRadius topRightRadius:topRightRadius bottomLeftRadius:bottomLeftRadius bottomRightRadius:bottomRightRadius];
+}
+
+void PageClientImpl::didChangeViewportArguments(const WebCore::ViewportArguments&amp; viewportArguments)
+{
+    [m_view _didChangeViewportArguments:viewportArguments];
+}
+
+void PageClientImpl::startAssistingNode(const WebCore::IntRect&amp;, bool, bool)
+{
+    [m_view _startAssistingNode];
+}
+
+void PageClientImpl::stopAssistingNode()
+{
+    [m_view _stopAssistingNode];
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosUIWKRemoteViewh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/UIWKRemoteView.h (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/UIWKRemoteView.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/UIWKRemoteView.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+/*
+ * Copyright (C) 2012, 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 &lt;UIKit/UIView.h&gt;
+
+@interface UIWKRemoteView : UIView
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosUIWKRemoteViewmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/UIWKRemoteView.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/UIWKRemoteView.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/UIWKRemoteView.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+/*
+ * Copyright (C) 2012, 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 &quot;config.h&quot;
+#import &quot;UIWKRemoteView.h&quot;
+
+#import &lt;QuartzCore/CALayerHost.h&gt;
+
+@implementation UIWKRemoteView
+
++ (Class)layerClass
+{
+    return [CALayerHost class];
+}
+
+@end
+
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKContentViewh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.h (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,65 @@
</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 &lt;UIKit/UIKit.h&gt;
+#import &lt;WebKit2/WKBrowsingContextController.h&gt;
+#import &lt;WebKit2/WKBrowsingContextGroup.h&gt;
+#import &lt;WebKit2/WKProcessGroup.h&gt;
+
+@class WKContentView;
+
+typedef NS_ENUM(unsigned, WKContentType)
+{
+    Standard = 0,
+    PlainText,
+    Image
+};
+
+@protocol WKContentViewDelegate &lt;NSObject&gt;
+
+@optional
+- (void)contentView:(WKContentView *)contentView contentsSizeDidChange:(CGSize)newSize;
+- (void)contentViewdidCommitLoadForMainFrame:(WKContentView *)contentView;
+- (void)contentViewDidReceiveMobileDocType:(WKContentView *)contentView;
+- (void)contentView:(WKContentView *)contentView didChangeViewportArgumentsSize:(CGSize)newSize initialScale:(float)initialScale minimumScale:(float)minimumScale maximumScale:(float)maximumScale allowsUserScaling:(float)allowsUserScaling;
+
+@end
+
+WK_API_CLASS
+@interface WKContentView : UIView
+@property (readonly, nonatomic) WKBrowsingContextController *browsingContextController;
+
+@property (nonatomic, assign) id &lt;WKContentViewDelegate&gt; delegate;
+@property (nonatomic, readonly) WKContentType contentType;
+
+- (id)initWithFrame:(CGRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup;
+
+- (void)setMinimumSize:(CGSize)size;
+- (void)setViewportSize:(CGSize)size;
+
+- (void)didScrollTo:(CGPoint)contentOffset;
+- (void)didZoomToScale:(CGFloat)scale;
+
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKContentViewmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,342 @@
</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 &quot;config.h&quot;
+#import &quot;WKContentViewInternal.h&quot;
+
+#import &quot;PageClientImplIOS.h&quot;
+#import &quot;RemoteLayerTreeDrawingAreaProxy.h&quot;
+#import &quot;TiledCoreAnimationDrawingAreaProxyIOS.h&quot;
+#import &quot;UIWKRemoteView.h&quot;
+#import &quot;WKBrowsingContextControllerInternal.h&quot;
+#import &quot;WKBrowsingContextGroupPrivate.h&quot;
+#import &quot;WKGeolocationProviderIOS.h&quot;
+#import &quot;WKProcessGroupPrivate.h&quot;
+#import &quot;WKInteractionView.h&quot;
+#import &quot;WebContext.h&quot;
+#import &quot;WebPageGroup.h&quot;
+#import &quot;WebSystemInterface.h&quot;
+#import &lt;QuartzCore/CALayerHost.h&gt;
+#import &lt;UIKit/UIWindow_Private.h&gt;
+#import &lt;WebCore/ViewportArguments.h&gt;
+#import &lt;WebCore/WebCoreThreadSystemInterface.h&gt;
+#import &lt;wtf/RetainPtr.h&gt;
+
+using namespace WebCore;
+using namespace WebKit;
+
+@interface WKContentView (Internal) &lt;WKBrowsingContextLoadDelegateInternal&gt;
+@end
+
+@implementation WKContentView {
+    RetainPtr&lt;WKProcessGroup&gt; _processGroup;
+    RetainPtr&lt;WKBrowsingContextGroup&gt; _browsingContextGroup;
+    OwnPtr&lt;PageClientImpl&gt; _pageClient;
+    RefPtr&lt;WebPageProxy&gt; _page;
+
+    RetainPtr&lt;WKBrowsingContextController&gt; _browsingContextController;
+
+    RetainPtr&lt;UIView&gt; _rootContentView;
+    RetainPtr&lt;WKInteractionView&gt; _interactionView;
+}
+
+- (id)initWithCoder:(NSCoder *)coder
+{
+    if (!(self = [super initWithCoder:coder]))
+        return nil;
+
+    [self _commonInitWithProcessGroup:nil browsingContextGroup:nil];
+    return self;
+}
+
+- (id)initWithFrame:(CGRect)frame
+{
+    return [self initWithFrame:frame processGroup:nil browsingContextGroup:nil];
+}
+
+- (id)initWithFrame:(CGRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup
+{
+    if (!(self = [super initWithFrame:frame]))
+        return nil;
+
+    [self _commonInitWithProcessGroup:processGroup browsingContextGroup:browsingContextGroup];
+    return self;
+}
+
+- (void)dealloc
+{
+    _page-&gt;close();
+
+    WebContext::statistics().wkViewCount--;
+
+    [super dealloc];
+}
+
+- (void)willMoveToWindow:(UIWindow *)newWindow
+{
+    NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter];
+    UIWindow *window = self.window;
+
+    if (window)
+        [defaultCenter removeObserver:self name:UIWindowDidMoveToScreenNotification object:window];
+
+    if (newWindow)
+        [defaultCenter addObserver:self selector:@selector(_windowDidMoveToScreenNotification:) name:UIWindowDidMoveToScreenNotification object:newWindow];
+}
+
+- (void)didMoveToWindow
+{
+    if (self.window)
+        [self _updateForScreen:self.window.screen];
+    _page-&gt;viewStateDidChange(ViewState::IsInWindow);
+}
+
+- (WKBrowsingContextController *)browsingContextController
+{
+    return _browsingContextController.get();
+}
+
+- (WKContentType)contentType
+{
+    if (_page-&gt;mainFrame()-&gt;mimeType() == &quot;text/plain&quot;)
+        return WKContentType::PlainText;
+    else if (_page-&gt;mainFrame()-&gt;isDisplayingStandaloneImageDocument())
+        return WKContentType::Image;
+    return WKContentType::Standard;
+}
+
+- (void)setMinimumSize:(CGSize)size
+{
+    _page-&gt;drawingArea()-&gt;setSize(IntSize(size), IntSize(), IntSize());
+}
+
+- (void)setViewportSize:(CGSize)size
+{
+    _page-&gt;setFixedLayoutSize(IntSize(size));
+}
+
+- (void)didScrollTo:(CGPoint)contentOffset
+{
+    _page-&gt;didFinishScrolling(contentOffset);
+}
+
+- (void)didZoomToScale:(CGFloat)scale
+{
+    _page-&gt;didFinishZooming(scale);
+}
+
+static void decidePolicyForGeolocationPermissionRequest(WKPageRef page, WKFrameRef frame, WKSecurityOriginRef origin, WKGeolocationPermissionRequestRef permissionRequest, const void* clientInfo)
+{
+    WKContentView *view = reinterpret_cast&lt;WKContentView *&gt;(const_cast&lt;void*&gt;(clientInfo));
+    ASSERT([view isKindOfClass:[WKContentView class]]);
+
+    [[view-&gt;_processGroup _geolocationProvider] decidePolicyForGeolocationRequestFromOrigin:origin frame:frame request:permissionRequest window:[view window]];
+}
+
+- (void)_commonInitWithProcessGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup
+{
+    // FIXME: This should not be necessary, find why hit testing does not work otherwise.
+    // &lt;rdar://problem/12287363&gt;
+    self.backgroundColor = [UIColor blackColor];
+
+    InitWebCoreThreadSystemInterface();
+    InitWebCoreSystemInterface();
+    RunLoop::initializeMainRunLoop();
+
+    _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-&gt;createWebPage(_pageClient.get(), toImpl([_browsingContextGroup _pageGroupRef]));
+    _page-&gt;initializeWebPage();
+    _page-&gt;setIntrinsicDeviceScaleFactor([UIScreen mainScreen].scale);
+    _page-&gt;setUseFixedLayout(true);
+
+    WKPageUIClient pageUIClient = {
+        kWKPageUIClientCurrentVersion,
+        self,
+        0, // createNewPage_deprecatedForUseWithV0
+        0, // showPage
+        0, // closeOtherPage
+        0, // takeFocus
+        0, // focus
+        0, // unfocus
+        0, // runJavaScriptAlert
+        0, // runJavaScriptConfirm
+        0, // runJavaScriptPrompt
+        0, // setStatusText
+        0, // mouseDidMoveOverElement_deprecatedForUseWithV0
+        0, // missingPluginButtonClicked
+        0, // didNotHandleKeyEvent
+        0, // didNotHandleWheelEvent
+        0, // toolbarsAreVisible
+        0, // setToolbarsAreVisible
+        0, // menuBarIsVisible
+        0, // setMenuBarIsVisible
+        0, // statusBarIsVisible
+        0, // setStatusBarIsVisible
+        0, // isResizable
+        0, // setIsResizable
+        0, // getWindowFrameOtherPage
+        0, // setWindowFrameOtherPage
+        0, // runBeforeUnloadConfirmPanel
+        0, // didDraw
+        0, // pageDidScroll
+        0, // exceededDatabaseQuota
+        0, // runOpenPanel
+        decidePolicyForGeolocationPermissionRequest,
+        0, // headerHeight
+        0, // footerHeight
+        0, // drawHeader
+        0, // drawFooter
+        0, // printFrame
+        0, // runModal
+        0, // didCompleteRubberBandForMainFrame
+        0, // saveDataToFileInDownloadsFolder
+        0, // shouldInterruptJavaScript
+        0, // createOtherPage
+        0, // mouseDidMoveOverElement
+        0, // decidePolicyForNotificationPermissionRequest
+        0, // unavailablePluginButtonClicked
+        0, // showColorPicker
+        0, // hideColorPicker
+        0, // unavailablePluginButtonClicked
+    };
+    WKPageSetPageUIClient(toAPI(_page.get()), &amp;pageUIClient);
+
+    _browsingContextController = adoptNS([[WKBrowsingContextController alloc] _initWithPageRef:toAPI(_page.get())]);
+    [_browsingContextController setLoadDelegateInternal:self];
+
+    WebContext::statistics().wkViewCount++;
+
+    _rootContentView = adoptNS([[UIView alloc] init]);
+    [[_rootContentView layer] setMasksToBounds:NO];
+    [_rootContentView setUserInteractionEnabled:NO];
+
+    [self addSubview:_rootContentView.get()];
+
+    _interactionView = adoptNS([[WKInteractionView alloc] init]);
+    [_interactionView setPage:_page];
+    [self addSubview:_interactionView.get()];
+}
+
+- (void)_windowDidMoveToScreenNotification:(NSNotification *)notification
+{
+    ASSERT(notification.object == self.window);
+
+    UIScreen *screen = notification.userInfo[UIWindowNewScreenUserInfoKey];
+    [self _updateForScreen:screen];
+}
+
+- (void)_updateForScreen:(UIScreen *)screen
+{
+    ASSERT(screen);
+    _page-&gt;setIntrinsicDeviceScaleFactor(screen.scale);
+}
+
+- (void)_didChangeViewportArguments:(const WebCore::ViewportArguments&amp;)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];
+}
+
+#pragma mark PageClientImpl methods
+
+- (std::unique_ptr&lt;DrawingAreaProxy&gt;)_createDrawingAreaProxy
+{
+    return std::make_unique&lt;RemoteLayerTreeDrawingAreaProxy&gt;(_page.get());
+}
+
+- (void)_processDidCrash
+{
+    // FIXME: Implement.
+}
+
+- (void)_didRelaunchProcess
+{
+    // FIXME: Implement.
+}
+
+- (void)browsingContextControllerDidCommitLoad:(WKBrowsingContextController *)sender
+{
+    ASSERT(sender == _browsingContextController);
+    if ([_delegate respondsToSelector:@selector(contentViewdidCommitLoadForMainFrame:)])
+        [_delegate contentViewdidCommitLoadForMainFrame:self];
+}
+
+- (void)_didChangeContentSize:(CGSize)contentsSize
+{
+    [self setBounds:{CGPointZero, contentsSize}];
+    [_interactionView setFrame:CGRectMake(0, 0, contentsSize.width, contentsSize.height)];
+    [_rootContentView setFrame:CGRectMake(0, 0, contentsSize.width, contentsSize.height)];
+
+    if ([_delegate respondsToSelector:@selector(contentView:contentsSizeDidChange:)])
+        [_delegate contentView:self contentsSizeDidChange:contentsSize];
+}
+
+- (void)_mainDocumentDidReceiveMobileDocType
+{
+    if ([_delegate respondsToSelector:@selector(contentViewDidReceiveMobileDocType:)])
+        [_delegate contentViewDidReceiveMobileDocType:self];
+
+}
+
+- (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const Color&amp;)color quads:(const Vector&lt;FloatQuad&gt;&amp;)highlightedQuads topLeftRadius:(const IntSize&amp;)topLeftRadius topRightRadius:(const IntSize&amp;)topRightRadius bottomLeftRadius:(const IntSize&amp;)bottomLeftRadius bottomRightRadius:(const IntSize&amp;)bottomRightRadius
+{
+    [_interactionView _didGetTapHighlightForRequest:requestID color:color quads:highlightedQuads topLeftRadius:topLeftRadius topRightRadius:topRightRadius bottomLeftRadius:bottomLeftRadius bottomRightRadius:bottomRightRadius];
+}
+
+- (void)_setAcceleratedCompositingRootLayer:(CALayer *)rootLayer
+{
+    [[_rootContentView layer] setSublayers:@[rootLayer]];
+}
+
+// FIXME: change the name. Leave it for now to make it easier to refer to the UIKit implementation.
+- (void)_startAssistingNode
+{
+    [_interactionView _startAssistingNode];
+}
+
+- (void)_stopAssistingNode
+{
+    [_interactionView _stopAssistingNode];
+}
+
+- (void)_selectionChanged
+{
+    [_interactionView _selectionChanged];
+}
+
+- (BOOL)_interpretKeyEvent:(WebIOSEvent *)theEvent isCharEvent:(BOOL)isCharEvent
+{
+    return [_interactionView _interpretKeyEvent:theEvent isCharEvent:isCharEvent];
+}
+
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKContentViewInternalh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/WKContentViewInternal.h (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKContentViewInternal.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKContentViewInternal.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,63 @@
</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 &quot;WKContentView.h&quot;
+
+#import &lt;wtf/Forward.h&gt;
+#import &lt;wtf/Vector.h&gt;
+
+namespace WebCore {
+class Color;
+class FloatQuad;
+class IntSize;
+struct ViewportArguments;
+}
+
+namespace WebKit {
+class DrawingAreaProxy;
+class LayerTreeContext;
+}
+
+@class WebIOSEvent;
+
+@interface WKContentView ()
+
+- (std::unique_ptr&lt;WebKit::DrawingAreaProxy&gt;)_createDrawingAreaProxy;
+- (void)_processDidCrash;
+- (void)_didRelaunchProcess;
+- (void)_didChangeContentSize:(CGSize)contentsSize;
+- (void)_setAcceleratedCompositingRootLayer:(CALayer *)rootLayer;
+
+- (void)_mainDocumentDidReceiveMobileDocType;
+
+- (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const WebCore::Color&amp;)color quads:(const Vector&lt;WebCore::FloatQuad&gt;&amp;)highlightedQuads topLeftRadius:(const WebCore::IntSize&amp;)topLeftRadius topRightRadius:(const WebCore::IntSize&amp;)topRightRadius bottomLeftRadius:(const WebCore::IntSize&amp;)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&amp;)bottomRightRadius;
+
+- (void)_startAssistingNode;
+- (void)_stopAssistingNode;
+- (void)_selectionChanged;
+- (BOOL)_interpretKeyEvent:(WebIOSEvent *)theEvent isCharEvent:(BOOL)isCharEvent;
+- (void)_didChangeViewportArguments:(const WebCore::ViewportArguments&amp;)viewportArguments;
+
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKGeolocationProviderIOSh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.h (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &lt;Foundation/NSObject.h&gt;
+#import &lt;WebKit2/WKBase.h&gt;
+
+namespace WebKit {
+class WebContext;
+}
+
+@class UIWindow;
+
+@interface WKGeolocationProviderIOS : NSObject
+-(id)initWithContext:(WebKit::WebContext*)context;
+-(void)decidePolicyForGeolocationRequestFromOrigin:(WKSecurityOriginRef)origin frame:(WKFrameRef)frame request:(WKGeolocationPermissionRequestRef)permissionRequest window:(UIWindow*)window;
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKGeolocationProviderIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,274 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;WKGeolocationProviderIOS.h&quot;
+
+#import &quot;GeolocationPermissionRequestProxy.h&quot;
+#import &quot;WebContext.h&quot;
+#import &quot;WebGeolocationManagerProxy.h&quot;
+#import &quot;WebSecurityOrigin.h&quot;
+#import &lt;WebGeolocationPosition.h&gt;
+#import &lt;WebCore/GeolocationPosition.h&gt;
+#import &lt;WebKit/WebGeolocationCoreLocationProvider.h&gt;
+#import &lt;WebKit/WebUIDelegatePrivate.h&gt;
+#import &lt;WebKit2/WKGeolocationPermissionRequest.h&gt;
+#import &lt;wtf/Assertions.h&gt;
+#import &lt;wtf/PassRefPtr.h&gt;
+#import &lt;wtf/RefPtr.h&gt;
+#import &lt;wtf/RetainPtr.h&gt;
+#import &lt;wtf/HashSet.h&gt;
+
+using namespace WebKit;
+
+@interface WKGeolocationProviderIOS ()
+-(void)_startUpdating;
+-(void)_stopUpdating;
+-(void)_setEnableHighAccuracy:(BOOL)enable;
+@end
+
+@interface WKGeolocationProviderIOS (WebGeolocationCoreLocationUpdateListener) &lt;WebGeolocationCoreLocationUpdateListener&gt;
+@end
+
+@interface WKWebAllowDenyPolicyListener : NSObject&lt;WebAllowDenyPolicyListener&gt;
+- (id)initWithProvider:(WKGeolocationProviderIOS*)provider permissionRequestProxy:(PassRefPtr&lt;GeolocationPermissionRequestProxy&gt;)permissionRequestProxy;
+- (void)denyOnlyThisRequest NO_RETURN_DUE_TO_ASSERT;
+@end
+
+namespace WebKit {
+void decidePolicyForGeolocationRequestFromOrigin(WebCore::SecurityOrigin*, const String&amp; urlString, id&lt;WebAllowDenyPolicyListener&gt;, UIWindow*);
+};
+
+static void startUpdatingCallback(WKGeolocationManagerRef geolocationManager, const void* clientInfo)
+{
+    WKGeolocationProviderIOS *geolocationProvider = reinterpret_cast&lt;WKGeolocationProviderIOS*&gt;(const_cast&lt;void*&gt;(clientInfo));
+    ASSERT([geolocationProvider isKindOfClass:[WKGeolocationProviderIOS class]]);
+    [geolocationProvider _startUpdating];
+}
+
+static void stopUpdatingCallback(WKGeolocationManagerRef geolocationManager, const void* clientInfo)
+{
+    WKGeolocationProviderIOS *geolocationProvider = reinterpret_cast&lt;WKGeolocationProviderIOS*&gt;(const_cast&lt;void*&gt;(clientInfo));
+    ASSERT([geolocationProvider isKindOfClass:[WKGeolocationProviderIOS class]]);
+    [geolocationProvider _stopUpdating];
+}
+
+static void setEnableHighAccuracy(WKGeolocationManagerRef geolocationManager, bool enable, const void* clientInfo)
+{
+    WKGeolocationProviderIOS *geolocationProvider = reinterpret_cast&lt;WKGeolocationProviderIOS*&gt;(const_cast&lt;void*&gt;(clientInfo));
+    ASSERT([geolocationProvider isKindOfClass:[WKGeolocationProviderIOS class]]);
+    [geolocationProvider _setEnableHighAccuracy:enable];
+}
+
+struct GeolocationRequestData {
+    RefPtr&lt;WebCore::SecurityOrigin&gt; origin;
+    RefPtr&lt;WebFrameProxy&gt; frame;
+    RefPtr&lt;GeolocationPermissionRequestProxy&gt; permissionRequest;
+    RetainPtr&lt;UIWindow&gt; window;
+};
+
+@implementation WKGeolocationProviderIOS {
+    RefPtr&lt;WebGeolocationManagerProxy&gt; _geolocationManager;
+    RetainPtr&lt;WebGeolocationCoreLocationProvider&gt; _coreLocationProvider;
+    BOOL _isWebCoreGeolocationActive;
+    RefPtr&lt;WebGeolocationPosition&gt; _lastActivePosition;
+    Vector&lt;GeolocationRequestData&gt; _requestsWaitingForCoreLocationStart;
+    HashSet&lt;void*&gt; _requestsInWarmUp;
+}
+
+-(void)_stopUpdatingIfPossible
+{
+    if (_isWebCoreGeolocationActive)
+        return;
+
+    if (_requestsWaitingForCoreLocationStart.isEmpty() &amp;&amp; _requestsInWarmUp.isEmpty()) {
+        [_coreLocationProvider.get() stop];
+        _lastActivePosition.clear();
+    }
+}
+
+#pragma mark - WKGeolocationProvider callbacks implementation.
+-(void)_startUpdating
+{
+    _isWebCoreGeolocationActive = YES;
+    [_coreLocationProvider.get() start];
+
+    // If we have the last position, it is from the initialization or warm up. It is the last known
+    // good position so we can return it directly.
+    if (_lastActivePosition)
+        _geolocationManager-&gt;providerDidChangePosition(_lastActivePosition.get());
+}
+
+-(void)_stopUpdating
+{
+    _isWebCoreGeolocationActive = NO;
+    [self _stopUpdatingIfPossible];
+}
+
+-(void)_setEnableHighAccuracy:(BOOL)enableHighAccuracy
+{
+    [_coreLocationProvider.get() setEnableHighAccuracy:enableHighAccuracy];
+}
+
+#pragma mark - Public API implementation.
+
+-(id)init
+{
+    ASSERT_NOT_REACHED();
+    return [self initWithContext:(WebContext::sharedProcessContext())];
+}
+
+-(id)initWithContext:(WebContext*)context
+{
+    self = [super init];
+    if (!self)
+        return nil;
+    _geolocationManager = context-&gt;supplement&lt;WebGeolocationManagerProxy&gt;();
+    WKGeolocationProvider providerCallback = {
+        kWKGeolocationProviderCurrentVersion,
+        self,
+        startUpdatingCallback,
+        stopUpdatingCallback,
+        setEnableHighAccuracy
+    };
+    _geolocationManager-&gt;initializeProvider(&amp;providerCallback);
+    _coreLocationProvider = adoptNS([[WebGeolocationCoreLocationProvider alloc] initWithListener:self]);
+    return self;
+}
+
+-(void)decidePolicyForGeolocationRequestFromOrigin:(WKSecurityOriginRef)origin frame:(WKFrameRef)frame request:(WKGeolocationPermissionRequestRef)permissionRequest window:(UIWindow*)window
+{
+    GeolocationRequestData geolocationRequestData;
+    geolocationRequestData.origin = toImpl(origin)-&gt;securityOrigin();
+    geolocationRequestData.frame = toImpl(frame);
+    geolocationRequestData.permissionRequest = toImpl(permissionRequest);
+    geolocationRequestData.window = window;
+    _requestsWaitingForCoreLocationStart.append(geolocationRequestData);
+    [_coreLocationProvider.get() start];
+}
+@end
+
+#pragma mark - WebGeolocationCoreLocationUpdateListener implementation.
+
+@implementation WKGeolocationProviderIOS (WebGeolocationCoreLocationUpdateListener)
+- (void)geolocationDelegateStarted
+{
+    Vector&lt;GeolocationRequestData&gt; requests;
+    requests.swap(_requestsWaitingForCoreLocationStart);
+    HashSet&lt;void*&gt; latestRequestsForWarmup;
+    for (size_t i = 0; i &lt; requests.size(); ++i) {
+        GeolocationPermissionRequestProxy* permissionRequest = requests[i].permissionRequest.get();
+        latestRequestsForWarmup.add(permissionRequest);
+        _requestsInWarmUp.add(permissionRequest);
+    }
+
+    // Start the warmup period in which we keep CoreLocation running while waiting for the user response.
+    const int64_t warmUpTimeoutInterval = 20 * NSEC_PER_SEC;
+    dispatch_time_t when = dispatch_time(DISPATCH_TIME_NOW, warmUpTimeoutInterval);
+    dispatch_after(when, dispatch_get_main_queue(), ^{
+        HashSet&lt;void*&gt;::const_iterator end = latestRequestsForWarmup.end();
+        for (HashSet&lt;void*&gt;::const_iterator it = latestRequestsForWarmup.begin(); it != end; ++it)
+            _requestsInWarmUp.remove(*it);
+        [self _stopUpdatingIfPossible];
+    });
+
+    for (size_t i = 0; i &lt; requests.size(); ++i) {
+        RetainPtr&lt;WKWebAllowDenyPolicyListener&gt; policyListener = adoptNS([[WKWebAllowDenyPolicyListener alloc] initWithProvider:self permissionRequestProxy:requests[i].permissionRequest.get()]);
+        decidePolicyForGeolocationRequestFromOrigin(requests[i].origin.get(), requests[i].frame-&gt;url(), policyListener.get(), requests[i].window.get());
+    }
+}
+
+- (void)geolocationDelegateUnableToStart
+{
+    for (size_t i = 0; i &lt; _requestsWaitingForCoreLocationStart.size(); ++i)
+        _requestsWaitingForCoreLocationStart[i].permissionRequest-&gt;deny();
+    _requestsWaitingForCoreLocationStart.clear();
+    [self _stopUpdatingIfPossible];
+}
+
+- (void)positionChanged:(WebCore::GeolocationPosition*)position
+{
+    _lastActivePosition = WebGeolocationPosition::create(position-&gt;timestamp(), position-&gt;latitude(), position-&gt;longitude(), position-&gt;accuracy(), position-&gt;canProvideAltitude(), position-&gt;altitude(), position-&gt;canProvideAltitudeAccuracy(), position-&gt;altitudeAccuracy(), position-&gt;canProvideHeading(), position-&gt;heading(), position-&gt;canProvideSpeed(), position-&gt;speed());
+    _geolocationManager-&gt;providerDidChangePosition(_lastActivePosition.get());
+}
+
+- (void)errorOccurred:(NSString *)errorMessage
+{
+    _geolocationManager-&gt;providerDidFailToDeterminePosition(errorMessage);
+}
+
+- (void)resetGeolocation
+{
+    _geolocationManager-&gt;resetPermissions();
+}
+
+#pragma mark - Methods for udating the state WKWebAllowDenyPolicyListener
+- (void)permissionDenied:(GeolocationPermissionRequestProxy*)permissionRequestProxy
+{
+    _requestsInWarmUp.remove(permissionRequestProxy);
+    [self _stopUpdatingIfPossible];
+}
+
+@end
+
+# pragma mark - Implementation of WKWebAllowDenyPolicyListener
+@implementation WKWebAllowDenyPolicyListener {
+    RetainPtr&lt;WKGeolocationProviderIOS&gt; _provider;
+    RefPtr&lt;GeolocationPermissionRequestProxy&gt; _permissionRequestProxy;
+}
+
+- (id)initWithProvider:(WKGeolocationProviderIOS*)provider permissionRequestProxy:(PassRefPtr&lt;GeolocationPermissionRequestProxy&gt;)permissionRequestProxy
+{
+    self = [super init];
+    if (!self)
+        return nil;
+
+    _provider = provider;
+    _permissionRequestProxy = permissionRequestProxy;
+    return self;
+}
+
+- (void)allow
+{
+    _permissionRequestProxy-&gt;allow();
+}
+
+- (void)deny
+{
+    [_provider.get() permissionDenied:_permissionRequestProxy.get()];
+    _permissionRequestProxy-&gt;deny();
+}
+
+- (void)denyOnlyThisRequest
+{
+    // The method denyOnlyThisRequest is iAd specific for WebKit1.
+    ASSERT_NOT_REACHED();
+}
+
+- (BOOL)shouldClearCache
+{
+    return NO;
+}
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKGeolocationProviderIOSObjCSecurityOriginmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;WKGeolocationProviderIOS.h&quot;
+
+#import &lt;Foundation/NSURL.h&gt;
+#import &lt;UIKit/UIWebGeolocationPolicyDecider.h&gt;
+#import &lt;UIKit/UIWindow.h&gt;
+#import &lt;WebCore/SecurityOrigin.h&gt;
+#import &lt;WebKit/WebSecurityOriginPrivate.h&gt;
+#import &lt;WebKit/WebUIDelegatePrivate.h&gt;
+#import &lt;wtf/RetainPtr.h&gt;
+#import &lt;wtf/text/WTFString.h&gt;
+
+@interface WebSecurityOrigin (WebInternal)
+- (id)_initWithWebCoreSecurityOrigin:(WebCore::SecurityOrigin *)origin;
+@end
+
+namespace WebKit {
+
+void decidePolicyForGeolocationRequestFromOrigin(WebCore::SecurityOrigin*, const String&amp; urlString, id&lt;WebAllowDenyPolicyListener&gt;, UIWindow* window);
+
+void decidePolicyForGeolocationRequestFromOrigin(WebCore::SecurityOrigin* origin, const String&amp; urlString, id&lt;WebAllowDenyPolicyListener&gt; listener, UIWindow* window)
+{
+    RetainPtr&lt;WebSecurityOrigin&gt; securityOrigin = adoptNS([[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:origin]);
+    RetainPtr&lt;NSURL&gt; requestUrl = adoptNS([[NSURL alloc] initWithString:urlString]);
+    [[UIWebGeolocationPolicyDecider sharedPolicyDecider] decidePolicyForGeolocationRequestFromOrigin:securityOrigin.get() requestingURL:requestUrl.get() window:window listener:listener];
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKInteractionViewh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.h (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+/*
+ * Copyright (C) 2012, 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 &lt;UIKit/UIWebFormAccessory.h&gt;
+#import &lt;UIKit/UITextInput_Private.h&gt;
+#import &lt;UIKit/UIView.h&gt;
+#import &lt;UIKit/UIWebTouchEventsGestureRecognizer.h&gt;
+#import &lt;UIKit/UIWKTextInteractionAssistant.h&gt;
+#import &lt;wtf/Forward.h&gt;
+#import &lt;wtf/Vector.h&gt;
+
+@class UIWebScrollView;
+
+namespace WebCore {
+class Color;
+class FloatQuad;
+class IntSize;
+}
+
+namespace WebKit {
+class WebPageProxy;
+}
+
+@class WebIOSEvent;
+
+@interface WKInteractionView : UIView&lt;UIGestureRecognizerDelegate, UIWebTouchEventsGestureRecognizerDelegate, UITextInputPrivate, UIWebFormAccessoryDelegate, UIWKInteractionViewProtocol&gt;
+
+- (void)setScrollView:(UIWebScrollView *)scrollView;
+- (void)setPage:(PassRefPtr&lt;WebKit::WebPageProxy&gt;)page;
+
+- (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const WebCore::Color&amp;)color quads:(const Vector&lt;WebCore::FloatQuad&gt;&amp;)highlightedQuads topLeftRadius:(const WebCore::IntSize&amp;)topLeftRadius topRightRadius:(const WebCore::IntSize&amp;)topRightRadius bottomLeftRadius:(const WebCore::IntSize&amp;)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&amp;)bottomRightRadius;
+
+- (void)_startAssistingNode;
+- (void)_stopAssistingNode;
+- (void)_selectionChanged;
+- (BOOL)_interpretKeyEvent:(WebIOSEvent *)theEvent isCharEvent:(BOOL)isCharEvent;
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKInteractionViewmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,1610 @@
</span><ins>+/*
+ * Copyright (C) 2012, 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 &quot;config.h&quot;
+#import &quot;WKInteractionView.h&quot;
+
+#import &quot;NativeWebKeyboardEvent.h&quot;
+#import &quot;NativeWebTouchEvent.h&quot;
+#import &quot;WKBase.h&quot;
+#import &quot;WKGestureTypes.h&quot;
+#import &quot;WebEvent.h&quot;
+#import &quot;WebIOSEventFactory.h&quot;
+#import &quot;WebPageMessages.h&quot;
+#import &quot;WebProcessProxy.h&quot;
+#import &lt;UIKit/UIFont_Private.h&gt;
+#import &lt;UIKit/UIKeyboardImpl.h&gt;
+#import &lt;UIKit/UILongPressGestureRecognizer_Private.h&gt;
+#import &lt;UIKit/UITapGestureRecognizer_Private.h&gt;
+#import &lt;UIKit/UITextInteractionAssistant_Private.h&gt;
+#import &lt;UIKit/UIWebScrollView.h&gt;
+#import &lt;UIKit/_UIHighlightView.h&gt;
+#import &lt;UIKit/_UIWebHighlightLongPressGestureRecognizer.h&gt;
+#import &lt;WebCore/Color.h&gt;
+#import &lt;WebCore/FloatQuad.h&gt;
+#import &lt;WebCore/WebEvent.h&gt;
+#import &lt;WebKit/WebSelectionRect.h&gt;
+#import &lt;wtf/RetainPtr.h&gt;
+
+using namespace WebCore;
+using namespace WebKit;
+
+static const float highlightDelay = 0.12;
+
+@interface WKTextRange : UITextRange {
+    CGRect _startRect;
+    CGRect _endRect;
+    BOOL _isNone;
+    BOOL _isRange;
+    BOOL _isEditable;
+    NSArray *_selectionRects;
+    NSUInteger _selectedTextLength;
+}
+@property (nonatomic) CGRect startRect;
+@property (nonatomic) CGRect endRect;
+@property (nonatomic) BOOL isNone;
+@property (nonatomic) BOOL isRange;
+@property (nonatomic) BOOL isEditable;
+@property (nonatomic) NSUInteger selectedTextLength;
+@property (copy, nonatomic) NSArray *selectionRects;
+
++ (WKTextRange *)textRangeWithState:(BOOL)isNone isRange:(BOOL)isRange isEditable:(BOOL)isEditable startRect:(CGRect)startRect endRect:(CGRect)endRect selectionRects:(NSArray *)selectionRects selectedTextLength:(NSUInteger)selectedTextLength;
+
+@end
+
+@interface WKTextPosition : UITextPosition {
+    CGRect _positionRect;
+}
+
+@property (nonatomic) CGRect positionRect;
+
++ (WKTextPosition *)textPositionWithRect:(CGRect)positionRect;
+
+@end
+
+@interface WKTextSelectionRect : UITextSelectionRect
+
+@property (nonatomic, retain) WebSelectionRect *webRect;
+
++ (NSArray *)textSelectionRectsWithWebRects:(NSArray *)webRects;
+
+@end
+
+@interface WKAutocorrectionRects : UIWKAutocorrectionRects {
+    CGRect _firstRect;
+    CGRect _lastRect;
+}
++ (WKAutocorrectionRects *)autocorrectionRectsWithRects:(CGRect)firstRect lastRect:(CGRect)lastRect;
+
+@end
+
+@interface UITextInteractionAssistant (UITextInteractionAssistant_Internal)
+// FIXME: this needs to be moved from the internal header to the private.
+- (id)initWithView:(UIResponder &lt;UITextInput&gt; *)view;
+- (void)selectWord;
+@end
+
+typedef void (^UIWKAutocorrectionCompletionHandler)(UIWKAutocorrectionRects *rectsForInput);
+
+struct WKAutoCorrectionData{
+    String fontName;
+    CGFloat fontSize;
+    uint64_t fontTraits;
+    CGRect textFirstRect;
+    CGRect textLastRect;
+    UIWKAutocorrectionCompletionHandler completionHandler;
+};
+
+@interface WKInteractionView (Private)
+@property (readonly, nonatomic) WKAutoCorrectionData *autocorrectionData;
+@end
+
+@implementation WKInteractionView {
+    RetainPtr&lt;UIWebTouchEventsGestureRecognizer&gt; _touchEventGestureRecognizer;
+    RetainPtr&lt;UITapGestureRecognizer&gt; _singleTapGestureRecognizer;
+    RetainPtr&lt;_UIWebHighlightLongPressGestureRecognizer&gt; _highlightLongPressGestureRecognizer;
+
+    UIWKTextInteractionAssistant *_textSelectionAssistant;
+    UITextInputTraits *_traits;
+    BOOL _canBeFirstResponder;
+    UIWebFormAccessory *_accessory;
+    id &lt;UITextInputDelegate&gt; _inputDelegate;
+    BOOL _showingTextStyleOptions;
+
+    __weak UIWebScrollView *_scrollView;
+    RefPtr&lt;WebPageProxy&gt; _page;
+
+    RetainPtr&lt;_UIHighlightView&gt; _highlightView;
+    uint64_t _latestTapHighlightID;
+    BOOL _isTapHighlightIDValid;
+    WKAutoCorrectionData _autocorrectionData;
+}
+
+@synthesize inputDelegate = _inputDelegate;
+
+- (id)initWithFrame:(CGRect)frame
+{
+    self = [super initWithFrame:frame];
+    if (self) {
+        _touchEventGestureRecognizer = adoptNS([[UIWebTouchEventsGestureRecognizer alloc] initWithTarget:self action:@selector(_webTouchEventsRecognized:) touchDelegate:self]);
+        [_touchEventGestureRecognizer.get() setDelegate:self];
+        [self addGestureRecognizer:_touchEventGestureRecognizer.get()];
+
+        _singleTapGestureRecognizer = adoptNS([[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_singleTapRecognized:)]);
+        [_singleTapGestureRecognizer.get() setDelegate:self];
+        [self addGestureRecognizer:_singleTapGestureRecognizer.get()];
+
+        _highlightLongPressGestureRecognizer = adoptNS([[_UIWebHighlightLongPressGestureRecognizer alloc] initWithTarget:self action:@selector(_highlightLongPressRecognized:)]);
+        [_highlightLongPressGestureRecognizer.get() setDelay:highlightDelay];
+        [_highlightLongPressGestureRecognizer.get() setDelegate:self];
+        [self addGestureRecognizer:_highlightLongPressGestureRecognizer.get()];
+        
+        [self setUserInteractionEnabled:YES];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_resetShowingTextStyle:) name:UIMenuControllerDidHideMenuNotification object:nil];
+        _showingTextStyleOptions = NO;
+    }
+
+    return self;
+}
+
+- (void)dealloc
+{
+    [_touchEventGestureRecognizer.get() setDelegate:nil];
+    [_singleTapGestureRecognizer.get() setDelegate:nil];
+    [_highlightLongPressGestureRecognizer.get() setDelegate:nil];
+    [_textSelectionAssistant release];
+    [_accessory release];
+    [super dealloc];
+}
+
+- (void)setScrollView:(UIWebScrollView *)scrollView
+{
+    _scrollView = scrollView;
+}
+
+- (void)setPage:(PassRefPtr&lt;WebKit::WebPageProxy&gt;)page
+{
+    _page = page;
+}
+
+- (BOOL)canBecomeFirstResponder
+{
+    return _canBeFirstResponder;
+}
+
+- (BOOL)resignFirstResponder
+{
+    [self _cancelInteraction];
+    return [super resignFirstResponder];
+}
+
+- (void)_webTouchEventsRecognized:(UIWebTouchEventsGestureRecognizer *)gestureRecognizer
+{
+    NativeWebTouchEvent nativeWebTouchEvent(gestureRecognizer);
+
+    // FIXME: this kind of event delivery is supposed to be only used for testing. We must switch to asynchronous handling.
+    _page-&gt;setShouldSendEventsSynchronously(true);
+    _page-&gt;handleTouchEvent(nativeWebTouchEvent);
+    _page-&gt;setShouldSendEventsSynchronously(false);
+}
+
+static FloatQuad inflateQuad(const FloatQuad&amp; quad, float inflateSize)
+{
+    // We sort the output points like this (as expected by the highlight view):
+    //  p2------p3
+    //  |       |
+    //  p1------p4
+
+    // 1) Sort the points horizontally.
+    FloatPoint points[4] = { quad.p1(), quad.p4(), quad.p2(), quad.p3() };
+    if (points[0].x() &gt; points[1].x())
+        std::swap(points[0], points[1]);
+    if (points[2].x() &gt; points[3].x())
+        std::swap(points[2], points[3]);
+
+    if (points[0].x() &gt; points[2].x())
+        std::swap(points[0], points[2]);
+    if (points[1].x() &gt; points[3].x())
+        std::swap(points[1], points[3]);
+
+    if (points[1].x() &gt; points[2].x())
+        std::swap(points[1], points[2]);
+
+    // 2) Swap them vertically to have the output points [p2, p1, p3, p4].
+    if (points[1].y() &lt; points[0].y())
+        std::swap(points[0], points[1]);
+    if (points[3].y() &lt; points[2].y())
+        std::swap(points[2], points[3]);
+
+    // 3) Adjust the positions.
+    points[0].move(-inflateSize, -inflateSize);
+    points[1].move(-inflateSize, inflateSize);
+    points[2].move(inflateSize, -inflateSize);
+    points[3].move(inflateSize, inflateSize);
+
+    return FloatQuad(points[1], points[0], points[2], points[3]);
+}
+
+- (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const WebCore::Color&amp;)color quads:(const Vector&lt;WebCore::FloatQuad&gt;&amp;)highlightedQuads topLeftRadius:(const WebCore::IntSize&amp;)topLeftRadius topRightRadius:(const WebCore::IntSize&amp;)topRightRadius bottomLeftRadius:(const WebCore::IntSize&amp;)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&amp;)bottomRightRadius
+{
+    if (!_isTapHighlightIDValid || _latestTapHighlightID != requestID)
+        return;
+
+    const CGFloat UIWebViewMinimumHighlightRadius = 2.0;
+    if (!_highlightView) {
+        _highlightView = adoptNS([[_UIHighlightView alloc] initWithFrame:CGRectZero]);
+        [_highlightView.get() setOpaque:NO];
+        [_highlightView.get() setCornerRadius:UIWebViewMinimumHighlightRadius];
+    }
+    [self addSubview:_highlightView.get()];
+
+    RetainPtr&lt;UIColor&gt; highlightUIKitColor = adoptNS([[UIColor alloc] initWithRed:(color.red() / 255.0) green:(color.green() / 255.0) blue:(color.blue() / 255.0) alpha:(color.alpha() / 255.0)]);
+    [_highlightView.get() setColor:highlightUIKitColor.get()];
+
+    // Like WebKit1, we don't bother highlighting items that are bigger than the constraining rect.
+    // FIXME: this should not be done in mixed coordinate systems. It should be expressed in the ScrollView coordinates.
+    CGRect constrainRect = _scrollView.bounds;
+
+    bool allHighlightRectsAreRectilinear = true;
+    const size_t quadCount = highlightedQuads.size();
+    RetainPtr&lt;NSMutableArray&gt; rects = adoptNS([[NSMutableArray alloc] initWithCapacity:static_cast&lt;const NSUInteger&gt;(quadCount)]);
+    for (size_t i = 0; i &lt; quadCount; ++i) {
+        const FloatQuad&amp; quad = highlightedQuads[i];
+        if (quad.isRectilinear()) {
+            CGRect rect = quad.boundingBox();
+            if ((CGRectGetWidth(rect) &gt; CGRectGetWidth(constrainRect)) || (CGRectGetHeight(rect) &gt; CGRectGetHeight(constrainRect)))
+                continue;
+
+            rect = CGRectInset(rect, -UIWebViewMinimumHighlightRadius, -UIWebViewMinimumHighlightRadius);
+            [rects.get() addObject:[NSValue valueWithCGRect:rect]];
+        } else {
+            allHighlightRectsAreRectilinear = false;
+            rects.clear();
+            break;
+        }
+    }
+
+    // FIXME: WebKit1 uses the visibleRect. Using the whole frame from the page seems overkill.
+    CGRect boundaryRect = [self frame];
+    if (allHighlightRectsAreRectilinear)
+        [_highlightView.get() setFrames:rects.get() boundaryRect:boundaryRect];
+    else {
+        RetainPtr&lt;NSMutableArray&gt; quads = adoptNS([[NSMutableArray alloc] initWithCapacity:static_cast&lt;const NSUInteger&gt;(quadCount)]);
+        for (size_t i = 0; i &lt; quadCount; ++i) {
+            const FloatQuad&amp; quad = highlightedQuads[i];
+            FloatQuad extendedQuad = inflateQuad(quad, UIWebViewMinimumHighlightRadius);
+            [quads.get() addObject:[NSValue valueWithCGPoint:extendedQuad.p1()]];
+            [quads.get() addObject:[NSValue valueWithCGPoint:extendedQuad.p2()]];
+            [quads.get() addObject:[NSValue valueWithCGPoint:extendedQuad.p3()]];
+            [quads.get() addObject:[NSValue valueWithCGPoint:extendedQuad.p4()]];
+        }
+        [_highlightView.get() setQuads:quads.get() boundaryRect:boundaryRect];
+    }
+
+    RetainPtr&lt;NSMutableArray&gt; borderRadii = adoptNS([[NSMutableArray alloc] initWithCapacity:4]);
+    [borderRadii.get() addObject:[NSValue valueWithCGSize:CGSizeMake(topLeftRadius.width() + UIWebViewMinimumHighlightRadius, topLeftRadius.height() + UIWebViewMinimumHighlightRadius)]];
+    [borderRadii.get() addObject:[NSValue valueWithCGSize:CGSizeMake(topRightRadius.width() + UIWebViewMinimumHighlightRadius, topRightRadius.height() + UIWebViewMinimumHighlightRadius)]];
+    [borderRadii.get() addObject:[NSValue valueWithCGSize:CGSizeMake(bottomLeftRadius.width() + UIWebViewMinimumHighlightRadius, bottomLeftRadius.height() + UIWebViewMinimumHighlightRadius)]];
+    [borderRadii.get() addObject:[NSValue valueWithCGSize:CGSizeMake(bottomRightRadius.width() + UIWebViewMinimumHighlightRadius, bottomRightRadius.height() + UIWebViewMinimumHighlightRadius)]];
+    [_highlightView.get() setCornerRadii:borderRadii.get()];
+}
+
+- (void)_cancelLongPressGestureRecognizer
+{
+    [_highlightLongPressGestureRecognizer.get() cancel];
+}
+
+- (void)_didScroll
+{
+    [self _cancelLongPressGestureRecognizer];
+    [self _cancelInteraction];
+}
+
+- (BOOL)_requiresKeyboardResetOnReload
+{
+    return YES;
+}
+
+- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
+{
+    if (_textSelectionAssistant) {
+        if (gestureRecognizer == _highlightLongPressGestureRecognizer || gestureRecognizer == _singleTapGestureRecognizer)
+            return NO;
+    }
+    return YES;
+}
+
+- (void)_cancelInteraction
+{
+    _isTapHighlightIDValid = NO;
+    [_highlightView.get() removeFromSuperview];
+}
+
+- (void)_highlightLongPressRecognized:(UILongPressGestureRecognizer *)gestureRecognizer
+{
+    ASSERT(gestureRecognizer == _highlightLongPressGestureRecognizer);
+
+    switch ([gestureRecognizer state]) {
+    case UIGestureRecognizerStateBegan:
+        _page-&gt;tapHighlightAtPosition([gestureRecognizer startPoint], _latestTapHighlightID);
+        _isTapHighlightIDValid = YES;
+        break;
+    case UIGestureRecognizerStateEnded:
+        [self _attemptClickAtLocation:[gestureRecognizer startPoint]];
+        break;
+    case UIGestureRecognizerStateCancelled:
+        [self _cancelInteraction];
+        break;
+    default:
+        break;
+    }
+}
+
+- (void)_singleTapRecognized:(UITapGestureRecognizer *)gestureRecognizer
+{
+    [self _attemptClickAtLocation:[gestureRecognizer location]];
+}
+
+- (BOOL)gestureRecognizer:(UIGestureRecognizer *)preventingGestureRecognizer canPreventGestureRecognizer:(UIGestureRecognizer *)preventedGestureRecognizer
+{
+    BOOL shouldNotPreventPanGesture = preventingGestureRecognizer == _highlightLongPressGestureRecognizer;
+    return !(shouldNotPreventPanGesture &amp;&amp; [preventedGestureRecognizer isKindOfClass:NSClassFromString(@&quot;UIScrollViewPanGestureRecognizer&quot;)]);
+}
+
+- (void)_attemptClickAtLocation:(CGPoint)location
+{
+    // FIXME: Ideally, we should always provide some visual feedback on click. If a short tap did not trigger the
+    // tap highlight, we should show one based on a timer if we commit the synthetic mouse events.
+    [self _cancelInteraction];
+
+    if (![self isFirstResponder])
+        [self becomeFirstResponder];
+
+    _page-&gt;process()-&gt;send(Messages::WebPage::HandleTap(IntPoint(location)), _page-&gt;pageID());
+}
+
+- (UIView *)inputAccessoryView
+{
+    if (!_canBeFirstResponder)
+        return nil;
+    
+    if (!_accessory) {
+        _accessory = [[UIWebFormAccessory alloc] init];
+        _accessory.delegate = self;
+    }
+    
+    return _accessory;
+}
+
+- (NSArray *)supportedPasteboardTypesForCurrentSelection
+{
+    if (_page-&gt;editorState().selectionIsNone)
+        return nil;
+    
+    static NSMutableArray *richTypes = nil;
+    static NSMutableArray *plainTextTypes = nil;
+    if (!plainTextTypes) {
+        plainTextTypes = [[NSMutableArray alloc] init];
+        // FIXME: should add [plainTextTypes addObject:(id)kUTTypeURL];
+        // when we figure out how to share this type between WebCore and WebKit2
+        [plainTextTypes addObjectsFromArray:UIPasteboardTypeListString];
+
+        richTypes = [[NSMutableArray alloc] init];
+        // FIXME: should add [richTypes addObject:(PasteboardTypes::WebArchivePboardType)];
+        // when we figure out how to share this type between WebCore and WebKit2
+        [richTypes addObjectsFromArray:UIPasteboardTypeListImage];
+        [richTypes addObjectsFromArray:plainTextTypes];
+    }
+
+    return (_page-&gt;editorState().isContentRichlyEditable) ? richTypes : plainTextTypes;
+}
+
+- (void)_addShortcut:(id)sender
+{
+    // FIXME: To be implemented.
+}
+
+- (void)_promptForReplace:(id)sender
+{
+    // FIXME: To be implemented.
+}
+
+- (void)replace:(id)sender
+{
+    // FIXME: To be implemented.
+}
+
+- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
+{
+    // FIXME: need to handle hasWebSelection
+    BOOL hasWebSelection = NO;
+
+    if (action == @selector(_showTextStyleOptions:))
+        return _page-&gt;editorState().isContentRichlyEditable &amp;&amp; _page-&gt;editorState().selectionIsRange &amp;&amp; !_showingTextStyleOptions;
+    if (_showingTextStyleOptions)
+        return (action == @selector(toggleBoldface:) || action == @selector(toggleItalics:) || action == @selector(toggleUnderline:));
+    if (action == @selector(cut:))
+        return !_page-&gt;editorState().isInPasswordField &amp;&amp; _page-&gt;editorState().isContentEditable &amp;&amp; _page-&gt;editorState().selectionIsRange;
+    
+    if (action == @selector(paste:)) {
+        if (_page-&gt;editorState().selectionIsNone || !_page-&gt;editorState().isContentEditable)
+            return NO;
+        UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
+        NSArray *types = [self supportedPasteboardTypesForCurrentSelection];
+        NSIndexSet *indices = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [pasteboard numberOfItems])];
+        return [pasteboard containsPasteboardTypes:types inItemSet:indices];
+    }
+
+    if (action == @selector(copy:)) {
+        if (_page-&gt;editorState().isInPasswordField)
+            return NO;
+        return hasWebSelection || _page-&gt;editorState().selectionIsRange;
+    }
+
+    if (action == @selector(_define:)) {
+        if (_page-&gt;editorState().isInPasswordField || !(hasWebSelection || _page-&gt;editorState().selectionIsRange))
+            return NO;
+
+        NSUInteger textLength = _page-&gt;editorState().selectedTextLength;
+        // FIXME: We should be calling UIReferenceLibraryViewController to check if the length is
+        // acceptable, but the interface takes a string.
+        // &lt;rdar://problem/15254406&gt;
+        if (!textLength || textLength &gt; 200)
+            return NO;
+
+        return YES;
+    }
+
+    if (action == @selector(_addShortcut:)) {
+        if (_page-&gt;editorState().isInPasswordField || !(hasWebSelection || _page-&gt;editorState().selectionIsRange))
+            return NO;
+        // FIXME: need to implement, returning NO always for now.
+        return NO;
+    }
+
+    if (action == @selector(_promptForReplace:)) {
+        // FIXME: need to implement
+        return NO;
+    }
+
+    if (action == @selector(select:)) {
+        // Disable select in password fields so that you can't see word boundaries.
+        return !_page-&gt;editorState().isInPasswordField &amp;&amp; [self hasContent] &amp;&amp; !_page-&gt;editorState().selectionIsNone &amp;&amp; !_page-&gt;editorState().selectionIsRange;
+    }
+
+    if (action == @selector(selectAll:)) {
+        if (_page-&gt;editorState().selectionIsNone || ![self hasContent])
+            return NO;
+        if (!_page-&gt;editorState().selectionIsRange)
+            return YES;
+        // Enable selectAll for non-editable text, where the user can't access
+        // this command via long-press to get a caret.
+        if (_page-&gt;editorState().isContentEditable)
+            return NO;
+        // Don't attempt selectAll with general web content.
+        if (hasWebSelection)
+            return NO;
+        // FIXME: Only enable if the selection doesn't already span the entire document.
+        return YES;
+    }
+
+    if (action == @selector(replace:))
+        return _page-&gt;editorState().isContentEditable &amp;&amp; !_page-&gt;editorState().isInPasswordField;
+
+    return [super canPerformAction:action withSender:sender];
+}
+
+- (void)_resetShowingTextStyle:(NSNotification *)notification
+{
+    _showingTextStyleOptions = NO;
+    [_textSelectionAssistant hideTextStyleOptions];
+}
+
+- (void)copy:(id)sender
+{
+    _page-&gt;executeEditCommand(ASCIILiteral(&quot;copy&quot;));
+}
+
+- (void)cut:(id)sender
+{
+    [self.inputDelegate textWillChange:self];
+
+    _page-&gt;executeEditCommand(ASCIILiteral(&quot;cut&quot;));
+
+    [self.inputDelegate textDidChange:self];
+}
+
+- (void)paste:(id)sender
+{
+    [self.inputDelegate textWillChange:self];
+    
+    _page-&gt;executeEditCommand(ASCIILiteral(&quot;paste&quot;));
+    
+    [self.inputDelegate textDidChange:self];
+}
+
+- (void)select:(id)sender
+{
+    [_textSelectionAssistant selectWord];
+    // We cannot use selectWord command, because we want to be able to select the word even when it is the last in the paragraph.
+    _page-&gt;extendSelection(WordGranularity);
+}
+
+- (void)selectAll:(id)sender
+{
+    [_textSelectionAssistant selectAll:sender];
+    _page-&gt;executeEditCommand(ASCIILiteral(&quot;selectAll&quot;));
+}
+
+- (void)toggleBoldface:(id)sender
+{
+    if (!_page-&gt;editorState().isContentRichlyEditable)
+        return;
+
+    _page-&gt;executeEditCommand(ASCIILiteral(&quot;toggleBold&quot;));
+}
+
+- (void)toggleItalics:(id)sender
+{
+    if (!_page-&gt;editorState().isContentRichlyEditable)
+        return;
+
+    _page-&gt;executeEditCommand(ASCIILiteral(&quot;toggleItalic&quot;));
+}
+
+- (void)toggleUnderline:(id)sender
+{
+    if (!_page-&gt;editorState().isContentRichlyEditable)
+        return;
+
+    _page-&gt;executeEditCommand(ASCIILiteral(&quot;toggleUnderline&quot;));
+}
+
+- (void)_showTextStyleOptions:(id)sender
+{
+    _showingTextStyleOptions = YES;
+    [_textSelectionAssistant showTextStyleOptions];
+}
+
+- (void)_showDictionary:(NSString *)text
+{
+    CGRect presentationRect = _page-&gt;editorState().selectionRects[0].rect();
+    [(UIWKTextInteractionAssistant *)self.interactionAssistant showDictionaryFor:text fromRect:presentationRect];
+}
+
+static void selectedString(WKStringRef string, WKErrorRef error, void* context)
+{
+    if (error)
+        return;
+    if (!string)
+        return;
+
+    NSString *convertedString = toImpl(string)-&gt;string();
+    WKInteractionView* view = static_cast&lt;WKInteractionView*&gt;(context);
+    ASSERT(view);
+    [view _showDictionary:convertedString];
+}
+
+- (void)_define:(id)sender
+{
+    _page-&gt;getSelectionOrContentsAsString(StringCallback::create(self, selectedString));
+}
+
+// UIWKInteractionViewProtocol
+
+static inline WKGestureType toWKGestureType(UIWKGestureType gestureType)
+{
+    switch (gestureType) {
+    case UIWKGestureLoupe:
+        return WKGestureLoupe;
+    case UIWKGestureOneFingerTap:
+        return WKGestureOneFingerTap;
+    case UIWKGestureTapAndAHalf:
+        return WKGestureTapAndAHalf;
+    case UIWKGestureDoubleTap:
+        return WKGestureDoubleTap;
+    case UIWKGestureTapAndHalf:
+        return WKGestureTapAndHalf;
+    case UIWKGestureDoubleTapInUneditable:
+        return WKGestureDoubleTapInUneditable;
+    case UIWKGestureOneFingerTapInUneditable:
+        return WKGestureOneFingerTapInUneditable;
+    case UIWKGestureOneFingerTapSelectsAll:
+        return WKGestureOneFingerTapSelectsAll;
+    case UIWKGestureOneFingerDoubleTap:
+        return WKGestureOneFingerDoubleTap;
+    case UIWKGestureOneFingerTripleTap:
+        return WKGestureOneFingerTripleTap;
+    case UIWKGestureTwoFingerSingleTap:
+        return WKGestureTwoFingerSingleTap;
+    case UIWKGestureTwoFingerRangedSelectGesture:
+        return WKGestureTwoFingerRangedSelectGesture;
+    case UIWKGestureTapOnLinkWithGesture:
+        return WKGestureTapOnLinkWithGesture;
+    }
+    ASSERT_NOT_REACHED();
+    return WKGestureLoupe;
+}
+
+static inline UIWKGestureType toUIWKGestureType(WKGestureType gestureType)
+{
+    switch (gestureType) {
+    case WKGestureLoupe:
+        return UIWKGestureLoupe;
+    case WKGestureOneFingerTap:
+        return UIWKGestureOneFingerTap;
+    case WKGestureTapAndAHalf:
+        return UIWKGestureTapAndAHalf;
+    case WKGestureDoubleTap:
+        return UIWKGestureDoubleTap;
+    case WKGestureTapAndHalf:
+        return UIWKGestureTapAndHalf;
+    case WKGestureDoubleTapInUneditable:
+        return UIWKGestureDoubleTapInUneditable;
+    case WKGestureOneFingerTapInUneditable:
+        return UIWKGestureOneFingerTapInUneditable;
+    case WKGestureOneFingerTapSelectsAll:
+        return UIWKGestureOneFingerTapSelectsAll;
+    case WKGestureOneFingerDoubleTap:
+        return UIWKGestureOneFingerDoubleTap;
+    case WKGestureOneFingerTripleTap:
+        return UIWKGestureOneFingerTripleTap;
+    case WKGestureTwoFingerSingleTap:
+        return UIWKGestureTwoFingerSingleTap;
+    case WKGestureTwoFingerRangedSelectGesture:
+        return UIWKGestureTwoFingerRangedSelectGesture;
+    case WKGestureTapOnLinkWithGesture:
+        return UIWKGestureTapOnLinkWithGesture;
+    }
+}
+
+static inline WKSelectionTouch toWKSelectionTouch(UIWKSelectionTouch touch)
+{
+    switch (touch) {
+    case UIWKSelectionTouchStarted:
+        return WKSelectionTouchStarted;
+    case UIWKSelectionTouchMoved:
+        return WKSelectionTouchMoved;
+    case UIWKSelectionTouchEnded:
+        return WKSelectionTouchEnded;
+    case UIWKSelectionTouchEndedMovingForward:
+        return WKSelectionTouchEndedMovingForward;
+    case UIWKSelectionTouchEndedMovingBackward:
+        return WKSelectionTouchEndedMovingBackward;
+    case UIWKSelectionTouchEndedNotMoving:
+        return WKSelectionTouchEndedNotMoving;
+    }
+    ASSERT_NOT_REACHED();
+    return WKSelectionTouchEnded;
+}
+
+static inline UIWKSelectionTouch toUIWKSelectionTouch(WKSelectionTouch touch)
+{
+    switch (touch) {
+    case WKSelectionTouchStarted:
+        return UIWKSelectionTouchStarted;
+    case WKSelectionTouchMoved:
+        return UIWKSelectionTouchMoved;
+    case WKSelectionTouchEnded:
+        return UIWKSelectionTouchEnded;
+    case WKSelectionTouchEndedMovingForward:
+        return UIWKSelectionTouchEndedMovingForward;
+    case WKSelectionTouchEndedMovingBackward:
+        return UIWKSelectionTouchEndedMovingBackward;
+    case WKSelectionTouchEndedNotMoving:
+        return UIWKSelectionTouchEndedNotMoving;
+    }
+}
+
+static inline WKGestureRecognizerState toWKGestureRecognizerState(UIGestureRecognizerState state)
+{
+    switch (state) {
+    case UIGestureRecognizerStatePossible:
+        return WKGestureRecognizerStatePossible;
+    case UIGestureRecognizerStateBegan:
+        return WKGestureRecognizerStateBegan;
+    case UIGestureRecognizerStateChanged:
+        return WKGestureRecognizerStateChanged;
+    case UIGestureRecognizerStateCancelled:
+        return WKGestureRecognizerStateCancelled;
+    case UIGestureRecognizerStateEnded:
+        return WKGestureRecognizerStateEnded;
+    case UIGestureRecognizerStateFailed:
+        return WKGestureRecognizerStateFailed;
+    }
+}
+
+static inline UIGestureRecognizerState toUIGestureRecognizerState(WKGestureRecognizerState state)
+{
+    switch (state) {
+    case WKGestureRecognizerStatePossible:
+        return UIGestureRecognizerStatePossible;
+    case WKGestureRecognizerStateBegan:
+        return UIGestureRecognizerStateBegan;
+    case WKGestureRecognizerStateChanged:
+        return UIGestureRecognizerStateChanged;
+    case WKGestureRecognizerStateCancelled:
+        return UIGestureRecognizerStateCancelled;
+    case WKGestureRecognizerStateEnded:
+        return UIGestureRecognizerStateEnded;
+    case WKGestureRecognizerStateFailed:
+        return UIGestureRecognizerStateFailed;
+    }
+}
+
+static void selectionChangedWithGesture(const WebCore::IntPoint&amp; point, uint32_t gestureType, uint32_t gestureState, uint32_t flags, WKErrorRef error, void* context)
+{
+    if (error) {
+        ASSERT_NOT_REACHED();
+        return;
+    }
+    WKInteractionView *view = static_cast&lt;WKInteractionView*&gt;(context);
+    ASSERT(view);
+    // FIXME: need to pass flags to selectionChangedWithGestureAt.
+    [(UIWKTextInteractionAssistant *)[view interactionAssistant] selectionChangedWithGestureAt:(CGPoint)point withGesture:toUIWKGestureType((WKGestureType)gestureType) withState:toUIGestureRecognizerState(static_cast&lt;WKGestureRecognizerState&gt;(gestureState))];
+}
+
+static void selectionChangedWithTouch(const WebCore::IntPoint&amp; point, uint32_t touch, WKErrorRef error, void* context)
+{
+    if (error) {
+        ASSERT_NOT_REACHED();
+        return;
+    }
+    WKInteractionView *view = static_cast&lt;WKInteractionView*&gt;(context);
+    ASSERT(view);
+    [(UIWKTextInteractionAssistant *)[view interactionAssistant] selectionChangedWithTouchAt:(CGPoint)point withSelectionTouch:toUIWKSelectionTouch((WKSelectionTouch)touch)];
+}
+
+- (void)changeSelectionWithGestureAt:(CGPoint)point withGesture:(UIWKGestureType)gestureType withState:(UIGestureRecognizerState)state
+{
+    _page-&gt;selectWithGesture(WebCore::IntPoint(point), CharacterGranularity, toWKGestureType(gestureType), toWKGestureRecognizerState(state), GestureCallback::create(self, selectionChangedWithGesture));
+}
+
+- (void)changeSelectionWithTouchAt:(CGPoint)point withSelectionTouch:(UIWKSelectionTouch)touch baseIsStart:(BOOL)baseIsStart
+{
+    _page-&gt;updateSelectionWithTouches(WebCore::IntPoint(point), toWKSelectionTouch(touch), baseIsStart, TouchesCallback::create(self, selectionChangedWithTouch));
+}
+
+- (void)changeSelectionWithTouchesFrom:(CGPoint)from to:(CGPoint)to withGesture:(UIWKGestureType)gestureType withState:(UIGestureRecognizerState)gestureState
+{
+    _page-&gt;selectWithTwoTouches(WebCore::IntPoint(from), WebCore::IntPoint(to), toWKGestureType(gestureType), toWKGestureRecognizerState(gestureState), GestureCallback::create(self, selectionChangedWithGesture));
+}
+
+- (WKAutoCorrectionData *)autocorrectionData
+{
+    return &amp;_autocorrectionData;
+}
+
+static void autocorrectionData(const Vector&lt;FloatRect&gt;&amp; rects, const String&amp; fontName, double fontSize, uint64_t traits, WKErrorRef error, void* context)
+{
+    WKInteractionView* view = static_cast&lt;WKInteractionView*&gt;(context);
+    ASSERT(view);
+    CGRect firstRect = CGRectZero;
+    CGRect lastRect = CGRectZero;
+    if (rects.size()) {
+        firstRect = rects[0];
+        lastRect = rects[rects.size() - 1];
+    }
+
+    WKAutoCorrectionData *autocorrectionData = view.autocorrectionData;
+    autocorrectionData-&gt;fontName = fontName;
+    autocorrectionData-&gt;fontSize = fontSize;
+    autocorrectionData-&gt;fontTraits = traits;
+    autocorrectionData-&gt;textFirstRect = firstRect;
+    autocorrectionData-&gt;textLastRect = lastRect;
+
+    autocorrectionData-&gt;completionHandler(rects.size() ? [WKAutocorrectionRects autocorrectionRectsWithRects:firstRect lastRect:lastRect] : nil);
+    [autocorrectionData-&gt;completionHandler release];
+    autocorrectionData-&gt;completionHandler = nil;
+}
+
+// FIXME: This will be removed when we make requestAutocorrectionRectsForString non optional.
+- (void)requestAutocorrectionData:(NSString *)text withCorrection:(NSString *)correction
+{
+}
+
+// The completion handler can pass nil if input does not match the actual text preceding the insertion point.
+- (void)requestAutocorrectionRectsForString:(NSString *)input withCompletionHandler:(void (^)(UIWKAutocorrectionRects *rectsForInput))completionHandler
+{
+    if (!input || ![input length]) {
+        completionHandler(nil);
+        return;
+    }
+    _autocorrectionData.completionHandler = [completionHandler copy];
+    _page-&gt;requestAutocorrectionData(input, AutocorrectionDataCallback::create(self, autocorrectionData));
+}
+
+- (CGRect)textFirstRect
+{
+    return _autocorrectionData.textFirstRect;
+}
+
+- (CGRect)textLastRect
+{
+    return _autocorrectionData.textLastRect;
+}
+
+static void autocorrectionResult(WKStringRef correction, WKErrorRef error, void* context)
+{
+    WKInteractionView* view = static_cast&lt;WKInteractionView*&gt;(context);
+    ASSERT(view);
+    WKAutoCorrectionData *autocorrectionData = view.autocorrectionData;
+
+    autocorrectionData-&gt;completionHandler(correction ? [WKAutocorrectionRects autocorrectionRectsWithRects:autocorrectionData-&gt;textFirstRect lastRect:autocorrectionData-&gt;textLastRect] : nil);
+    [autocorrectionData-&gt;completionHandler release];
+    autocorrectionData-&gt;completionHandler = nil;
+}
+
+// FIXME: This will be removed when we make applyAutocorrection:(NSString *)correction toString:(NSString *)input withCompletionHandler:(void (^)(UIWKAutocorrectionRects *rectsForCorrection))completionHandler non optional.
+- (void)applyAutocorrection:(NSString *)newText toString:(NSString *)input withRect:(CGRect)autocorrectRect
+{
+}
+
+// The completion handler should pass the rect of the correction text after replacing the input text, or nil if the replacement could not be performed.
+- (void)applyAutocorrection:(NSString *)correction toString:(NSString *)input withCompletionHandler:(void (^)(UIWKAutocorrectionRects *rectsForCorrection))completionHandler
+{
+    _autocorrectionData.completionHandler = [completionHandler copy];
+    _page-&gt;applyAutocorrection(correction, input, StringCallback::create(self, autocorrectionResult));
+}
+
+- (void)requestAutocorrectionContextWithCompletionHandler:(void (^)(UIWKAutocorrectionContext *autocorrectionContext))completionHandler
+{
+    // FIXME: Need to retrieve the information from the WebProcess.
+    completionHandler(nil);
+}
+
+// UIWebFormAccessoryDelegate
+- (void)accessoryDone
+{
+    [self resignFirstResponder];
+    _page-&gt;blurAssistedNode();
+}
+
+- (void)accessoryTab:(BOOL)isNext
+{
+}
+
+- (void)accessoryAutoFill
+{
+}
+
+- (void)accessoryClear
+{
+}
+
+- (void)_updateAccessory
+{
+    // FIXME: need to initialize with valus from the WebProcess.
+    _accessory.nextEnabled = YES;
+    _accessory.previousEnabled = YES;
+    
+    [_accessory setClearVisible:NO];
+
+    // FIXME: hide or show the AutoFill button as needed.
+}
+
+// Keyboard interaction
+// UITextInput protocol implementation
+
+- (NSString *)textInRange:(UITextRange *)range
+{
+    return nil;
+}
+
+- (void)replaceRange:(UITextRange *)range withText:(NSString *)text
+{
+}
+
+- (UITextRange *)selectedTextRange
+{
+    unsigned size = _page-&gt;editorState().selectionRects.size();
+    NSMutableArray *webRects = [NSMutableArray arrayWithCapacity:size];
+    for (unsigned i = 0; i &lt; size; i++) {
+        const WebCore::SelectionRect&amp; coreRect = _page-&gt;editorState().selectionRects[i];
+        WebSelectionRect *webRect = [WebSelectionRect selectionRect];
+        webRect.rect = coreRect.rect();
+        webRect.writingDirection = coreRect.direction() == LTR ? WKWritingDirectionLeftToRight : WKWritingDirectionRightToLeft;
+        webRect.isLineBreak = coreRect.isLineBreak();
+        webRect.isFirstOnLine = coreRect.isFirstOnLine();
+        webRect.isLastOnLine = coreRect.isLastOnLine();
+        webRect.containsStart = coreRect.containsStart();
+        webRect.containsEnd = coreRect.containsEnd();
+        webRect.isInFixedPosition = coreRect.isInFixedPosition();
+        webRect.isHorizontal = coreRect.isHorizontal();
+        [webRects addObject:webRect];
+    }
+
+    return [WKTextRange textRangeWithState:_page-&gt;editorState().selectionIsNone
+                                   isRange:_page-&gt;editorState().selectionIsRange
+                                isEditable:_page-&gt;editorState().isContentEditable
+                                 startRect:_page-&gt;editorState().caretRectAtStart
+                                   endRect:_page-&gt;editorState().caretRectAtEnd
+                            selectionRects:webRects
+                        selectedTextLength:_page-&gt;editorState().selectedTextLength];
+}
+
+- (CGRect)caretRectForPosition:(UITextPosition *)position
+{
+    return ((WKTextPosition *)position).positionRect;
+}
+
+- (NSArray *)selectionRectsForRange:(UITextRange *)range
+{
+    return [WKTextSelectionRect textSelectionRectsWithWebRects:((WKTextRange *)range).selectionRects];
+}
+
+- (void)setSelectedTextRange:(UITextRange *)range
+{
+}
+
+- (UITextRange *)markedTextRange
+{
+    return nil;
+}
+
+- (NSDictionary *)markedTextStyle
+{
+    return nil;
+}
+
+- (void)setMarkedTextStyle:(NSDictionary *)styleDictionary
+{
+}
+
+- (void)setMarkedText:(NSString *)markedText selectedRange:(NSRange)selectedRange
+{
+}
+
+- (void)unmarkText
+{
+}
+
+- (UITextPosition *)beginningOfDocument
+{
+    return nil;
+}
+
+- (UITextPosition *)endOfDocument
+{
+    return nil;
+}
+
+- (UITextRange *)textRangeFromPosition:(UITextPosition *)fromPosition toPosition:(UITextPosition *)toPosition
+{
+    return nil;
+}
+
+- (UITextPosition *)positionFromPosition:(UITextPosition *)position offset:(NSInteger)offset
+{
+    return nil;
+}
+
+- (UITextPosition *)positionFromPosition:(UITextPosition *)position inDirection:(UITextLayoutDirection)direction offset:(NSInteger)offset
+{
+    return nil;
+}
+
+- (NSComparisonResult)comparePosition:(UITextPosition *)position toPosition:(UITextPosition *)other
+{
+    return NSOrderedSame;
+}
+
+- (NSInteger)offsetFromPosition:(UITextPosition *)from toPosition:(UITextPosition *)toPosition
+{
+    return 0;
+}
+
+- (id &lt;UITextInputTokenizer&gt;)tokenizer
+{
+    return nil;
+}
+
+- (UITextPosition *)positionWithinRange:(UITextRange *)range farthestInDirection:(UITextLayoutDirection)direction
+{
+    return nil;
+}
+
+- (UITextRange *)characterRangeByExtendingPosition:(UITextPosition *)position inDirection:(UITextLayoutDirection)direction
+{
+    return nil;
+}
+
+- (UITextWritingDirection)baseWritingDirectionForPosition:(UITextPosition *)position inDirection:(UITextStorageDirection)direction
+{
+    return UITextWritingDirectionLeftToRight;
+}
+
+- (void)setBaseWritingDirection:(UITextWritingDirection)writingDirection forRange:(UITextRange *)range
+{
+}
+
+- (CGRect)firstRectForRange:(UITextRange *)range
+{
+    return CGRectZero;
+}
+
+/* Hit testing. */
+- (UITextPosition *)closestPositionToPoint:(CGPoint)point
+{
+    return nil;
+}
+
+- (UITextPosition *)closestPositionToPoint:(CGPoint)point withinRange:(UITextRange *)range
+{
+    return nil;
+}
+
+- (UITextRange *)characterRangeAtPoint:(CGPoint)point
+{
+    return nil;
+}
+
+- (void)deleteBackward
+{
+    _page-&gt;executeEditCommand(ASCIILiteral(&quot;deleteBackward&quot;));
+}
+
+// Inserts the given string, replacing any selected or marked text.
+- (void)insertText:(NSString *)aStringValue
+{
+    _page-&gt;insertText(aStringValue, NSNotFound, 0);
+}
+
+- (BOOL)hasText
+{
+    return YES;
+}
+
+// end of UITextInput protocol implementation
+
+// UITextInputPrivate protocol
+// Direct access to the (private) UITextInputTraits object.
+- (UITextInputTraits *)textInputTraits
+{
+    if (!_traits)
+        _traits = [[UITextInputTraits alloc] init];
+    return _traits;
+}
+
+- (UITextInteractionAssistant *)interactionAssistant
+{
+    // This method should only be called when we're in UIWebSelectionModeTextOnly however it is
+    // possible that it can be called while we are transitioning between modes.
+    // assert(!_webSelectionAssistant);
+
+    if (!_textSelectionAssistant)
+        _textSelectionAssistant = [[UIWKTextInteractionAssistant alloc] initWithView:self];
+
+    return _textSelectionAssistant;
+}
+
+
+// NSRange support.  Would like to deprecate to the extent possible, although some support
+// (i.e. selectionRange) has shipped as API.
+- (NSRange)selectionRange
+{
+    return NSMakeRange(NSNotFound, 0);
+}
+
+- (CGRect)rectForNSRange:(NSRange)range
+{
+    return CGRectZero;
+}
+
+- (NSRange)_markedTextNSRange
+{
+    return NSMakeRange(NSNotFound, 0);
+}
+
+// DOM range support.
+- (DOMRange *)selectedDOMRange
+{
+    return nil;
+}
+
+- (void)setSelectedDOMRange:(DOMRange *)range affinityDownstream:(BOOL)affinityDownstream
+{
+}
+
+/* Modify text without starting a new undo grouping.
+ */
+- (void)replaceRangeWithTextWithoutClosingTyping:(UITextRange *)range replacementText:(NSString *)text
+{
+}
+
+// Caret rect support.  Shouldn't be necessary, but firstRectForRange doesn't offer precisely
+// the same functionality.
+- (CGRect)rectContainingCaretSelection
+{
+    return CGRectZero;
+}
+
+// Web events.
+- (BOOL)requiresKeyEvents
+{
+    return YES;
+}
+
+- (void)handleKeyWebEvent:(WebIOSEvent *)theEvent
+{
+    _page-&gt;handleKeyboardEvent(NativeWebKeyboardEvent(theEvent));
+}
+
+- (BOOL)_interpretKeyEvent:(WebIOSEvent *)event isCharEvent:(BOOL)isCharEvent
+{
+    static const unsigned kWebEnterKey = 0x0003;
+    static const unsigned kWebBackspaceKey = 0x0008;
+    static const unsigned kWebReturnKey = 0x000D;
+    static const unsigned kWebDeleteKey = 0x007F;
+    static const unsigned kWebLeftArrowKey = 0x00AC;
+    static const unsigned kWebUpArrowKey = 0x00AD;
+    static const unsigned kWebRightArrowKey = 0x00AE;
+    static const unsigned kWebDownArrowKey = 0x00AF;
+    static const unsigned kWebDeleteForwardKey = 0xF728;
+
+    if (!_page-&gt;editorState().isContentEditable &amp;&amp; event.isTabKey)
+        return NO;
+
+    BOOL shift = event.modifierFlags &amp; WebEventFlagMaskShift;
+
+    switch (event.characterSet) {
+    case WebEventCharacterSetSymbol: {
+        String command;
+        NSString *characters = [event charactersIgnoringModifiers];
+        if ([characters length] == 0)
+            break;
+        switch ([characters characterAtIndex:0]) {
+        case kWebLeftArrowKey:
+            command = shift ? ASCIILiteral(&quot;moveLeftAndModifySelection&quot;) :  ASCIILiteral(&quot;moveLeft&quot;);
+            break;
+
+        case kWebUpArrowKey:
+            command = shift ? ASCIILiteral(&quot;moveUpAndModifySelection&quot;) :  ASCIILiteral(&quot;moveUp&quot;);
+            break;
+
+        case kWebRightArrowKey:
+            command = shift ? ASCIILiteral(&quot;moveRightAndModifySelection&quot;) :  ASCIILiteral(&quot;moveRight&quot;);
+            break;
+
+        case kWebDownArrowKey:
+            command = shift ? ASCIILiteral(&quot;moveDownAndModifySelection&quot;) :  ASCIILiteral(&quot;moveDown&quot;);
+            break;
+        }
+        if (!command.isEmpty()) {
+            _page-&gt;executeEditCommand(command);
+            return YES;
+        }
+        break;
+    }
+    case WebEventCharacterSetASCII:
+    case WebEventCharacterSetUnicode: {
+        NSString *characters = [event characters];
+        if ([characters length] == 0)
+            break;
+        switch ([characters characterAtIndex:0]) {
+        case kWebBackspaceKey:
+        case kWebDeleteKey:
+            [[UIKeyboardImpl sharedInstance] deleteFromInput];
+            return YES;
+
+        case kWebEnterKey:
+        case kWebReturnKey:
+            if (isCharEvent) {
+                // Map \r from HW keyboard to \n to match the behavior of the soft keyboard.
+                [[UIKeyboardImpl sharedInstance] addInputString:@&quot;\n&quot; withFlags:0];
+                return YES;
+            }
+            return NO;
+
+        case kWebDeleteForwardKey:
+            _page-&gt;executeEditCommand(ASCIILiteral(&quot;deleteForward&quot;));
+            return YES;
+
+        default: {
+            if (isCharEvent) {
+                [[UIKeyboardImpl sharedInstance] addInputString:event.characters withFlags:event.keyboardFlags];
+                return YES;
+            }
+            return NO;
+        }
+    }
+        break;
+    }
+    default:
+        return NO;
+    }
+
+    return NO;
+}
+
+// Sets a buffer to make room for autocorrection views
+- (void)setBottomBufferHeight:(CGFloat)bottomBuffer
+{
+}
+
+- (UIView *)automaticallySelectedOverlay
+{
+    return self;
+}
+
+- (UITextGranularity)selectionGranularity
+{
+    return UITextGranularityCharacter;
+}
+
+- (void)insertDictationResult:(NSArray *)dictationResult withCorrectionIdentifier:(id)correctionIdentifier
+{
+}
+
+// Should return an array of NSDictionary objects that key/value paries for the final text, correction identifier and
+// alternative selection counts using the keys defined at the top of this header.
+- (NSArray *)metadataDictionariesForDictationResults
+{
+    return nil;
+}
+
+// Returns the dictation result boundaries from position so that text that was not dictated can be excluded from logging.
+// If these are not implemented, no text will be logged.
+- (UITextPosition *)previousUnperturbedDictationResultBoundaryFromPosition:(UITextPosition *)position
+{
+    return nil;
+}
+
+- (UITextPosition *)nextUnperturbedDictationResultBoundaryFromPosition:(UITextPosition *)position
+{
+    return nil;
+}
+
+// The can all be (and have been) trivially implemented in terms of UITextInput.  Deprecate and remove.
+- (void)moveBackward:(unsigned)count
+{
+}
+
+- (void)moveForward:(unsigned)count
+{
+}
+
+- (unichar)characterBeforeCaretSelection
+{
+    return 0;
+}
+
+- (NSString *)wordContainingCaretSelection
+{
+    return nil;
+}
+
+- (DOMRange *)wordRangeContainingCaretSelection
+{
+    return nil;
+}
+
+- (NSString *)markedText
+{
+    return nil;
+}
+
+- (void)setMarkedText:(NSString *)text
+{
+}
+
+- (BOOL)hasContent
+{
+    return YES;
+}
+
+- (void)selectAll
+{
+}
+
+- (UIColor *)textColorForCaretSelection
+{
+    return [UIColor blackColor];
+}
+
+- (UIFont *)fontForCaretSelection
+{
+    CGFloat zoomScale = 1.0;    // FIXME: retrieve the actual document scale factor.
+    CGFloat scaledSize = _autocorrectionData.fontSize;
+    if (CGFAbs(zoomScale - 1.0) &gt; FLT_EPSILON)
+        scaledSize *= zoomScale;
+    return [UIFont fontWithFamilyName:_autocorrectionData.fontName traits:(UIFontTrait)_autocorrectionData.fontTraits size:scaledSize];
+}
+
+- (BOOL)hasSelection
+{
+    return NO;
+}
+
+- (BOOL)isPosition:(UITextPosition *)position atBoundary:(UITextGranularity)granularity inDirection:(UITextDirection)direction
+{
+    return NO;
+}
+
+- (UITextPosition *)positionFromPosition:(UITextPosition *)position toBoundary:(UITextGranularity)granularity inDirection:(UITextDirection)direction
+{
+    return nil;
+}
+
+- (BOOL)isPosition:(UITextPosition *)position withinTextUnit:(UITextGranularity)granularity inDirection:(UITextDirection)direction
+{
+    return NO;
+}
+
+- (UITextRange *)rangeEnclosingPosition:(UITextPosition *)position withGranularity:(UITextGranularity)granularity inDirection:(UITextDirection)direction
+{
+    return nil;
+}
+
+- (void)takeTraitsFrom:(UITextInputTraits *)traits
+{
+    [[self textInputTraits] takeTraitsFrom:traits];
+}
+
+// FIXME: I want to change the name of these functions, but I'm leaving it for now
+// to make it easier to look up the corresponding functions in UIKit.
+
+- (void)_startAssistingKeyboard
+{
+    if (!_textSelectionAssistant)
+        _textSelectionAssistant = [[UIWKTextInteractionAssistant alloc] initWithView:self];
+    else {
+        // Reset the gesture recognizers in case editibility has changed.
+        [_textSelectionAssistant setGestureRecognizers];
+    }
+    [_textSelectionAssistant activateSelection];
+}
+
+- (void)_stopAssistingKeyboard
+{
+    if (_textSelectionAssistant) {
+        [_textSelectionAssistant deactivateSelection];
+        [_textSelectionAssistant release];
+        _textSelectionAssistant = nil;
+    }
+}
+
+- (void)_startAssistingNode
+{
+    _canBeFirstResponder = YES;
+    if (![self isFirstResponder])
+        [self becomeFirstResponder];
+
+    [self _startAssistingKeyboard];
+    [self _updateAccessory];
+    [self reloadInputViews];
+}
+
+- (void)_stopAssistingNode
+{
+    _canBeFirstResponder = NO;
+    if ([self isFirstResponder])
+        [self resignFirstResponder];
+    
+    [self _stopAssistingKeyboard];
+    [self reloadInputViews];
+    [self _updateAccessory];
+}
+
+- (void)_selectionChanged
+{
+    // FIXME: We need to figure out what to do if the selection is changed by Javascript.
+    if (!_showingTextStyleOptions)
+        [_textSelectionAssistant selectionChanged];
+}
+
+#pragma mark - Implementation of UIWebTouchEventsGestureRecognizerDelegate.
+
+- (BOOL)shouldIgnoreWebTouch
+{
+    return NO;
+}
+
+- (BOOL)isAnyTouchOverActiveArea:(NSSet *)touches
+{
+    return YES;
+}
+
+@end
+
+// UITextRange, UITextPosition and UITextSelectionRect implementations for WK2
+
+@implementation WKTextRange (UITextInputAdditions)
+
+- (BOOL)_isCaret
+{
+    return self.empty;
+}
+
+- (BOOL)_isRanged
+{
+    return !self.empty;
+}
+
+@end
+
+@implementation WKTextRange
+
++(WKTextRange *)textRangeWithState:(BOOL)isNone isRange:(BOOL)isRange isEditable:(BOOL)isEditable startRect:(CGRect)startRect endRect:(CGRect)endRect selectionRects:(NSArray *)selectionRects selectedTextLength:(NSUInteger)selectedTextLength
+{
+    WKTextRange *range = [[WKTextRange alloc] init];
+    range.isNone = isNone;
+    range.isRange = isRange;
+    range.isEditable = isEditable;
+    range.startRect = startRect;
+    range.endRect = endRect;
+    range.selectedTextLength = selectedTextLength;
+    range.selectionRects = selectionRects;
+    return [range autorelease];
+}
+
+- (void)dealloc
+{
+    [self.selectionRects release];
+    [super dealloc];
+}
+
+- (NSString *)description
+{
+    return [NSString stringWithFormat:@&quot;%@(%p) - start:%@, end:%@&quot;, [self class], self, NSStringFromCGRect(self.startRect), NSStringFromCGRect(self.endRect)];
+}
+
+- (WKTextPosition *)start
+{
+    WKTextPosition *pos = [WKTextPosition textPositionWithRect:self.startRect];
+    return pos;
+}
+
+- (UITextPosition *)end
+{
+    WKTextPosition *pos = [WKTextPosition textPositionWithRect:self.endRect];
+    return pos;
+}
+
+- (BOOL)isEmpty
+{
+    return !self.isRange;
+}
+
+- (BOOL)isEqual:(id)other
+{
+    assert([other isKindOfClass:[WKTextRange class]]);
+    WKTextRange *otherRange = (WKTextRange *)other;
+    
+    if (self == other)
+        return YES;
+    
+    if (self.isRange) {
+        if (!otherRange.isRange)
+            return NO;
+        return CGRectEqualToRect(self.startRect, otherRange.startRect) &amp;&amp; CGRectEqualToRect(self.endRect, otherRange.endRect);
+    } else if (!self.isRange) {
+        if (otherRange.isRange)
+            return NO;
+        return CGRectEqualToRect(self.startRect, otherRange.startRect);
+    }
+    return otherRange.isNone;
+}
+
+@end
+
+@implementation WKTextPosition
+
+@synthesize positionRect = _positionRect;
+
++ (WKTextPosition *)textPositionWithRect:(CGRect)positionRect
+{
+    WKTextPosition *pos =[[WKTextPosition alloc] init];
+    pos.positionRect = positionRect;
+    return [pos autorelease];
+}
+
+- (BOOL)isEqual:(id)other
+{
+    assert([other isKindOfClass:[self class]]);
+    return CGRectEqualToRect(self.positionRect, ((WKTextPosition *)other).positionRect);
+}
+
+- (NSString *)description
+{
+    return [NSString stringWithFormat:@&quot;&lt;WKTextPosition: %p, {%@}&gt;&quot;, self, NSStringFromCGRect(self.positionRect)];
+}
+
+@end
+
+@implementation WKTextSelectionRect
+
+- (id)initWithWebRect:(WebSelectionRect *)wRect
+{
+    self = [super init];
+    if (self)
+        self.webRect = wRect;
+
+    return self;
+}
+
+- (void)dealloc
+{
+    self.webRect = nil;
+    [super dealloc];
+}
+
+// FIXME: we are using this implementation for now
+// that uses WebSelectionRect, but we want to provide our own
+// based on WebCore::SelectionRect.
+
++ (NSArray *)textSelectionRectsWithWebRects:(NSArray *)webRects
+{
+    NSMutableArray *array = [NSMutableArray arrayWithCapacity:webRects.count];
+    for (WebSelectionRect *webRect in webRects) {
+        RetainPtr&lt;WKTextSelectionRect&gt; rect = adoptNS([[WKTextSelectionRect alloc] initWithWebRect:webRect]);
+        [array addObject:rect.get()];
+    }
+    return array;
+}
+
+- (CGRect)rect
+{
+    return _webRect.rect;
+}
+
+- (UITextWritingDirection)writingDirection
+{
+    return (UITextWritingDirection)_webRect.writingDirection;
+}
+
+- (UITextRange *)range
+{
+    return nil;
+}
+
+- (BOOL)containsStart
+{
+    return _webRect.containsStart;
+}
+
+- (BOOL)containsEnd
+{
+    return _webRect.containsEnd;
+}
+
+- (BOOL)isVertical
+{
+    return !_webRect.isHorizontal;
+}
+
+@end
+
+@implementation WKAutocorrectionRects
+
++ (WKAutocorrectionRects *)autocorrectionRectsWithRects:(CGRect)firstRect lastRect:(CGRect)lastRect
+{
+    WKAutocorrectionRects *rects =[[WKAutocorrectionRects alloc] init];
+    rects.firstRect = firstRect;
+    rects.lastRect = lastRect;
+    return [rects autorelease];
+}
+
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKScrollViewh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/WKScrollView.h (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKScrollView.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKScrollView.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,29 @@
</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 &lt;UIKit/UIWebScrollView.h&gt;
+
+@interface WKScrollView : UIWebScrollView
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKScrollViewmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/WKScrollView.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKScrollView.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKScrollView.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,37 @@
</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 &quot;config.h&quot;
+#import &quot;WKScrollView.h&quot;
+
+@implementation WKScrollView
+
+- (BOOL)touchesShouldCancelInContentView:(UIView *)contentView
+{
+    return NO;
+}
+
+@end
+
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKViewmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/ios/WKView.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKView.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKView.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,266 @@
</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 &quot;config.h&quot;
+#import &quot;WKView.h&quot;
+
+#import &quot;WKContentView.h&quot;
+#import &quot;WKScrollView.h&quot;
+#import &lt;UIKit/UIScreen.h&gt;
+#import &lt;UIKit/UIScrollView_Private.h&gt;
+#import &lt;UIKit/_UIWebViewportHandler.h&gt;
+#import &lt;wtf/RetainPtr.h&gt;
+
+static const float minWebViewScale = 0.25;
+static const float maxWebViewScale = 5;
+static struct _UIWebViewportConfiguration standardViewportConfiguration = { { UIWebViewportStandardViewportWidth, UIWebViewportGrowsAndShrinksToFitHeight }, UIWebViewportScaleForScalesToFit, minWebViewScale, maxWebViewScale, true };
+
+@interface WKView () &lt;UIScrollViewDelegate, WKContentViewDelegate, _UIWebViewportHandlerDelegate&gt;
+- (void)_setDocumentScale:(CGFloat)newScale;
+@end
+
+@implementation WKView {
+    RetainPtr&lt;WKScrollView&gt; _scrollView;
+    RetainPtr&lt;WKContentView&gt; _contentView;
+
+    BOOL _userHasChangedPageScale;
+    RetainPtr&lt;_UIWebViewportHandler&gt; _viewportHandler;
+}
+
+- (id)initWithCoder:(NSCoder *)coder
+{
+    // FIXME: Implement.
+    return nil;
+}
+
+- (id)initWithFrame:(CGRect)frame
+{
+    if (!(self = [super initWithFrame:frame]))
+        return nil;
+
+    [self _commonInitializationWithProcessGroup:nil browsingContextGroup:nil];
+    return self;
+}
+
+- (id)initWithFrame:(CGRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup
+{
+    if (!(self = [super initWithFrame:frame]))
+        return nil;
+
+    [self _commonInitializationWithProcessGroup:processGroup browsingContextGroup:browsingContextGroup];
+    return self;
+}
+
+- (id)initWithFrame:(CGRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup relatedToView:(WKView *)relatedView
+{
+    // FIXME: Implement.
+    return nil;
+}
+
+- (void)setFrame:(CGRect)frame
+{
+    CGRect oldFrame = [self frame];
+    [super setFrame:frame];
+
+    if (!CGSizeEqualToSize(oldFrame.size, frame.size))
+        [self _frameOrBoundsChanged];
+}
+
+- (void)setBounds:(CGRect)bounds
+{
+    CGRect oldBounds = [self bounds];
+    [super setBounds:bounds];
+    
+    if (!CGSizeEqualToSize(oldBounds.size, bounds.size))
+        [self _frameOrBoundsChanged];
+}
+
+- (WKBrowsingContextController *)browsingContextController
+{
+    return [_contentView browsingContextController];
+}
+
+#pragma mark WKContentViewDelegate
+
+- (void)contentView:(WKContentView *)contentView contentsSizeDidChange:(CGSize)newSize
+{
+    CGFloat zoomScale = [_scrollView zoomScale];
+    CGSize contentsSizeInScrollViewCoordinates = CGSizeMake(newSize.width * zoomScale, newSize.height * zoomScale);
+    [_scrollView setContentSize:contentsSizeInScrollViewCoordinates];
+
+    [_viewportHandler update:^{
+         [_viewportHandler setDocumentBounds:{CGPointZero, newSize}];
+    }];
+}
+
+- (void)contentViewdidCommitLoadForMainFrame:(WKContentView *)contentView
+{
+    _userHasChangedPageScale = NO;
+
+    WKContentType contentType = [_contentView contentType];
+    [_viewportHandler update:^{
+        [_viewportHandler clearWebKitViewportConfigurationFlags];
+        struct _UIWebViewportConfiguration configuration = standardViewportConfiguration;
+
+        if (contentType == PlainText) {
+            CGFloat screenWidth = [[UIScreen mainScreen] bounds].size.width;
+            configuration.size.width = screenWidth;
+        } else if (contentType == WKContentType::Image)
+            configuration.minimumScale = 0.01;
+
+        [_viewportHandler resetViewportConfiguration:&amp;configuration];
+    }];
+}
+
+- (void)contentViewDidReceiveMobileDocType:(WKContentView *)contentView
+{
+    [_viewportHandler update:^{
+        struct _UIWebViewportConfiguration configuration = standardViewportConfiguration;
+        configuration.minimumScale = 1;
+        configuration.size = CGSizeMake(320.0, UIWebViewportGrowsAndShrinksToFitHeight);
+        [_viewportHandler resetViewportConfiguration:&amp;configuration];
+    }];
+}
+
+- (void)contentView:(WKContentView *)contentView didChangeViewportArgumentsSize:(CGSize)newSize initialScale:(float)initialScale minimumScale:(float)minimumScale maximumScale:(float)maximumScale allowsUserScaling:(float)allowsUserScaling
+{
+    [_viewportHandler update:^{
+        [_viewportHandler applyWebKitViewportArgumentsSize:newSize
+                                              initialScale:initialScale
+                                              minimumScale:minimumScale
+                                              maximumScale:maximumScale
+                                         allowsUserScaling:allowsUserScaling];
+    }];
+}
+
+#pragma mark - _UIWebViewportHandlerDelegate
+- (void)viewportHandlerDidChangeScales:(_UIWebViewportHandler *)viewportHandler
+{
+    ASSERT(viewportHandler == _viewportHandler);
+    [_scrollView setMinimumZoomScale:viewportHandler.minimumScale];
+    [_scrollView setMaximumZoomScale:viewportHandler.maximumScale];
+    [_scrollView setZoomEnabled:viewportHandler.allowsUserScaling];
+
+    if (!_userHasChangedPageScale)
+        [self _setDocumentScale:viewportHandler.initialScale];
+    else {
+        CGFloat currentScale = [_scrollView zoomScale];
+        CGFloat validScale = std::max(std::min(currentScale, static_cast&lt;CGFloat&gt;(viewportHandler.maximumScale)), static_cast&lt;CGFloat&gt;(viewportHandler.minimumScale));
+        [self _setDocumentScale:validScale];
+    }
+}
+
+- (void)viewportHandler:(_UIWebViewportHandler *)viewportHandler didChangeViewportSize:(CGSize)newSize
+{
+    ASSERT(viewportHandler == _viewportHandler);
+    [_contentView setViewportSize:newSize];
+}
+
+
+#pragma mark - UIScrollViewDelegate
+- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
+{
+    ASSERT(_scrollView == scrollView);
+    return _contentView.get();
+}
+
+- (void)scrollViewWillBeginZooming:(UIScrollView *)scrollView withView:(UIView *)view
+{
+    if (scrollView.pinchGestureRecognizer.state == UIGestureRecognizerStateBegan)
+        _userHasChangedPageScale = YES;
+}
+
+- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
+{
+    // If we're decelerating, scroll offset will be updated when scrollViewDidFinishDecelerating: is called.
+    if (!decelerate)
+        [_contentView didScrollTo:scrollView.contentOffset];
+}
+
+- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
+{
+    [_contentView didScrollTo:scrollView.contentOffset];
+}
+
+- (void)scrollViewDidScrollToTop:(UIScrollView *)scrollView
+{
+    [_contentView didScrollTo:scrollView.contentOffset];
+}
+
+- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(CGFloat)scale
+{
+    ASSERT(scrollView == _scrollView);
+    [_contentView didZoomToScale:scale];
+}
+
+#pragma mark Internal
+
+- (void)_commonInitializationWithProcessGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup
+{
+    ASSERT(!_scrollView);
+    ASSERT(!_contentView);
+
+    CGRect bounds = self.bounds;
+
+    _scrollView = adoptNS([[WKScrollView alloc] initWithFrame:bounds]);
+    [_scrollView setDelegate:self];
+    [_scrollView setBouncesZoom:YES];
+
+    [self addSubview:_scrollView.get()];
+
+    _contentView = adoptNS([[WKContentView alloc] initWithFrame:bounds processGroup:processGroup browsingContextGroup:browsingContextGroup]);
+    [_contentView setDelegate:self];
+    [[_contentView layer] setAnchorPoint:CGPointZero];
+    [_contentView setFrame:bounds];
+    [_scrollView addSubview:_contentView.get()];
+
+    _viewportHandler = adoptNS([[_UIWebViewportHandler alloc] init]);
+    [_viewportHandler setDelegate:self];
+
+    [self _frameOrBoundsChanged];
+}
+
+- (void)_frameOrBoundsChanged
+{
+    CGRect bounds = [self bounds];
+    [_viewportHandler update:^{
+        [_viewportHandler setAvailableViewSize:bounds.size];
+    }];
+    [_scrollView setFrame:bounds];
+    [_contentView setMinimumSize:bounds.size];
+}
+
+- (void)_setDocumentScale:(CGFloat)newScale
+{
+    CGPoint contentOffsetInDocumentCoordinates = [_scrollView convertPoint:[_scrollView contentOffset] toView:_contentView.get()];
+
+    [_scrollView setZoomScale:newScale];
+    [_contentView didZoomToScale:newScale];
+
+    CGPoint contentOffset = [_scrollView convertPoint:contentOffsetInDocumentCoordinates fromView:_contentView.get()];
+    [_scrollView setContentOffset:contentOffset];
+}
+
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKBrowsingContextControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -106,6 +106,9 @@
</span><span class="cx">     
</span><span class="cx">     // Delegate for load callbacks.
</span><span class="cx">     id&lt;WKBrowsingContextLoadDelegate&gt; _loadDelegate;
</span><ins>+#if PLATFORM(IOS)
+    id &lt;WKBrowsingContextLoadDelegateInternal&gt; _loadDelegateInternal;
+#endif // PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx">     // Delegate for policy callbacks.
</span><span class="lines">@@ -527,6 +530,10 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo;
</span><ins>+#if PLATFORM(IOS)
+    if ([browsingContext.loadDelegateInternal respondsToSelector:@selector(browsingContextControllerDidCommitLoad:)])
+        [browsingContext.loadDelegateInternal browsingContextControllerDidCommitLoad:browsingContext];
+#endif // PLATFORM(IOS)
</ins><span class="cx">     if ([browsingContext.loadDelegate respondsToSelector:@selector(browsingContextControllerDidCommitLoad:)])
</span><span class="cx">         [browsingContext.loadDelegate browsingContextControllerDidCommitLoad:browsingContext];
</span><span class="cx"> }
</span><span class="lines">@@ -704,6 +711,18 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+- (id &lt;WKBrowsingContextLoadDelegateInternal&gt;)loadDelegateInternal
+{
+    return _data-&gt;_loadDelegateInternal;
+}
+
+- (void)setLoadDelegateInternal:(id &lt;WKBrowsingContextLoadDelegateInternal&gt;)loadDelegateInternal
+{
+    _data-&gt;_loadDelegateInternal = loadDelegateInternal;
+}
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> /* This should only be called from associate view. */
</span><span class="cx"> 
</span><span class="cx"> - (id)_initWithPageRef:(WKPageRef)pageRef
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKBrowsingContextControllerInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -25,8 +25,19 @@
</span><span class="cx"> 
</span><span class="cx"> #import &quot;WKBrowsingContextControllerPrivate.h&quot;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+@protocol WKBrowsingContextLoadDelegateInternal &lt;NSObject&gt;
+@optional
+- (void)browsingContextControllerDidCommitLoad:(WKBrowsingContextController *)sender;
+@end
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> @interface WKBrowsingContextController (Internal)
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+@property (assign) id &lt;WKBrowsingContextLoadDelegateInternal&gt; loadDelegateInternal;
+#endif // PLATFORM(IOS)
+
</ins><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="trunkSourceWebKit2UIProcessAPImacWKProcessGroupmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroup.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroup.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroup.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -42,6 +42,12 @@
</span><span class="cx"> #import &quot;WebFrameProxy.h&quot;
</span><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+#import &quot;WKAPICast.h&quot;
+#import &quot;WKGeolocationProviderIOS.h&quot;
+#import &lt;WebCore/WebCoreThreadSystemInterface.h&gt;
+#endif
+
</ins><span class="cx"> using namespace WebKit;
</span><span class="cx"> 
</span><span class="cx"> @interface WKProcessGroupData : NSObject {
</span><span class="lines">@@ -49,6 +55,10 @@
</span><span class="cx">     // Underlying context object.
</span><span class="cx">     WKRetainPtr&lt;WKContextRef&gt; _contextRef;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    RetainPtr&lt;WKGeolocationProviderIOS&gt; _geolocationProvider;
+#endif // PLATFORM(IOS)
+
</ins><span class="cx">     // Delegate for callbacks.
</span><span class="cx">     id&lt;WKProcessGroupDelegate&gt; _delegate;
</span><span class="cx"> }
</span><span class="lines">@@ -176,6 +186,11 @@
</span><span class="cx"> 
</span><span class="cx">     _data = [[WKProcessGroupData alloc] init];
</span><span class="cx">     
</span><ins>+#if PLATFORM(IOS)
+    // FIXME: Remove once &lt;rdar://problem/15256572&gt;  is fixed.
+    InitWebCoreThreadSystemInterface();
+#endif
+
</ins><span class="cx">     if (bundleURL)
</span><span class="cx">         _data-&gt;_contextRef = adoptWK(WKContextCreateWithInjectedBundlePath(adoptWK(WKStringCreateWithCFString((CFStringRef)[bundleURL path])).get()));
</span><span class="cx">     else
</span><span class="lines">@@ -219,4 +234,13 @@
</span><span class="cx">     return _data-&gt;_contextRef.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+- (WKGeolocationProviderIOS *)_geolocationProvider
+{
+    if (!_data-&gt;_geolocationProvider)
+        _data-&gt;_geolocationProvider = adoptNS([[WKGeolocationProviderIOS alloc] initWithContext:toImpl(_data-&gt;_contextRef.get())]);
+    return _data-&gt;_geolocationProvider.get();
+}
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKProcessGroupPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroupPrivate.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroupPrivate.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroupPrivate.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -23,11 +23,20 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+#include &lt;TargetConditionals.h&gt;
+
</ins><span class="cx"> #import &lt;WebKit2/WKProcessGroup.h&gt;
</span><span class="cx"> #import &lt;WebKit2/WKBase.h&gt;
</span><span class="cx"> 
</span><ins>+#if TARGET_OS_IPHONE
+@class WKGeolocationProviderIOS;
+#endif
+
</ins><span class="cx"> @interface WKProcessGroup (Private)
</span><span class="cx"> 
</span><span class="cx"> @property(readonly) WKContextRef _contextRef;
</span><ins>+#if TARGET_OS_IPHONE
+@property(readonly) WKGeolocationProviderIOS *_geolocationProvider;
+#endif
</ins><span class="cx"> 
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -23,7 +23,11 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+#if TARGET_OS_IPHONE
+#import &lt;UIKit/UIKit.h&gt;
+#else
</ins><span class="cx"> #import &lt;Cocoa/Cocoa.h&gt;
</span><ins>+#endif
</ins><span class="cx"> #import &lt;WebKit2/WKDeclarationSpecifiers.h&gt;
</span><span class="cx"> 
</span><span class="cx"> @class WKBrowsingContextController;
</span><span class="lines">@@ -31,15 +35,20 @@
</span><span class="cx"> @class WKProcessGroup;
</span><span class="cx"> @class WKViewData;
</span><span class="cx"> 
</span><ins>+#if TARGET_OS_IPHONE
</ins><span class="cx"> WK_EXPORT
</span><ins>+@interface WKView : UIView {
+#else
+WK_EXPORT
</ins><span class="cx"> @interface WKView : NSView &lt;NSTextInputClient&gt; {
</span><ins>+#endif
</ins><span class="cx"> @private
</span><span class="cx">     WKViewData *_data;
</span><span class="cx">     unsigned _unused;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (id)initWithFrame:(NSRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup;
-- (id)initWithFrame:(NSRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup relatedToView:(WKView *)relatedView;
</del><ins>+- (id)initWithFrame:(CGRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup;
+- (id)initWithFrame:(CGRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup relatedToView:(WKView *)relatedView;
</ins><span class="cx"> 
</span><span class="cx"> @property(readonly) WKBrowsingContextController *browsingContextController;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAutoCorrectionCallbackh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/AutoCorrectionCallback.h (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/AutoCorrectionCallback.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/AutoCorrectionCallback.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,85 @@
</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.
+ */
+
+#ifndef AutoCorrectionCallback_h
+#define AutoCorrectionCallback_h
+
+#include &quot;GenericCallback.h&quot;
+#include &quot;WKAPICast.h&quot;
+#include &quot;WebError.h&quot;
+#include &lt;wtf/HashMap.h&gt;
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+
+namespace WebKit {
+
+class AutocorrectionDataCallback : public CallbackBase {
+public:
+    typedef void (*CallbackFunction)(const Vector&lt;WebCore::FloatRect&gt;&amp;, const String&amp;, double, uint64_t, WKErrorRef, void*);
+
+    static PassRefPtr&lt;AutocorrectionDataCallback&gt; create(void* context, CallbackFunction callback)
+    {
+        return adoptRef(new AutocorrectionDataCallback(context, callback));
+    }
+
+    virtual ~AutocorrectionDataCallback()
+    {
+        ASSERT(!m_callback);
+    }
+
+    void performCallbackWithReturnValue(const Vector&lt;WebCore::FloatRect&gt;&amp; returnValue1, const String&amp; returnValue2, double returnValue3, uint64_t returnValue4)
+    {
+        ASSERT(m_callback);
+
+        m_callback(returnValue1, returnValue2, returnValue3, returnValue4, 0, context());
+
+        m_callback = 0;
+    }
+
+    void invalidate()
+    {
+        ASSERT(m_callback);
+
+        RefPtr&lt;WebError&gt; error = WebError::create();
+        m_callback(Vector&lt;WebCore::FloatRect&gt;(), String(), 0, 0, toAPI(error.get()), context());
+
+        m_callback = 0;
+    }
+
+private:
+
+    AutocorrectionDataCallback(void* context, CallbackFunction callback)
+        : CallbackBase(context)
+        , m_callback(callback)
+    {
+        ASSERT(m_callback);
+    }
+    
+    CallbackFunction m_callback;
+};
+
+} // namespace WebKit
+
+#endif // AutoCorrectionCallback_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDatabasesmacDatabaseProcessProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Databases/mac/DatabaseProcessProxyMac.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Databases/mac/DatabaseProcessProxyMac.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/Databases/mac/DatabaseProcessProxyMac.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx">     if (id value = [[NSUserDefaults standardUserDefaults] objectForKey:@&quot;WebKit2UseXPCServiceForWebProcess&quot;])
</span><span class="cx">         return [value boolValue];
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">     return true;
</span><span class="cx"> #else
</span><span class="cx">     return false;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessLaunchermacProcessLauncherMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -107,12 +107,15 @@
</span><span class="cx">         processShimPathNSString = [[processAppExecutablePath stringByDeletingLastPathComponent] stringByAppendingPathComponent:@&quot;PluginProcessShim.dylib&quot;];
</span><span class="cx">     } else
</span><span class="cx"> #endif // ENABLE(NETSCAPE_PLUGIN_API)
</span><ins>+#if ENABLE(NETWORK_PROCESS)
</ins><span class="cx">     if (launchOptions.processType == ProcessLauncher::WebProcess) {
</span><span class="cx">         NSString *processPath = [webKit2Bundle pathForAuxiliaryExecutable:@&quot;WebProcess.app&quot;];
</span><span class="cx">         NSString *processAppExecutablePath = [[NSBundle bundleWithPath:processPath] executablePath];
</span><span class="cx"> 
</span><span class="cx">         processShimPathNSString = [[processAppExecutablePath stringByDeletingLastPathComponent] stringByAppendingPathComponent:@&quot;WebProcessShim.dylib&quot;];
</span><del>-    } else if (launchOptions.processType == ProcessLauncher::NetworkProcess) {
</del><ins>+    } else
+#endif // ENABLE(NETWORK_PROCESS)
+    if (launchOptions.processType == ProcessLauncher::NetworkProcess) {
</ins><span class="cx">         NSString *processPath = [webKit2Bundle pathForAuxiliaryExecutable:@&quot;NetworkProcess.app&quot;];
</span><span class="cx">         NSString *processAppExecutablePath = [[NSBundle bundleWithPath:processPath] executablePath];
</span><span class="cx"> 
</span><span class="lines">@@ -144,7 +147,7 @@
</span><span class="cx">             return &quot;com.apple.WebKit.Networking.Development&quot;;
</span><span class="cx">         return &quot;com.apple.WebKit.Networking&quot;;
</span><span class="cx"> #endif
</span><del>-#if ENABLE(NETWORK_PROCESS)
</del><ins>+#if ENABLE(DATABASE_PROCESS)
</ins><span class="cx">     case ProcessLauncher::DatabaseProcess:
</span><span class="cx">         if (forDevelopment)
</span><span class="cx">             return &quot;com.apple.WebKit.Databases.Development&quot;;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkmacNetworkProcessProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">     if (id value = [[NSUserDefaults standardUserDefaults] objectForKey:@&quot;WebKit2UseXPCServiceForWebProcess&quot;])
</span><span class="cx">         return [value boolValue];
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">     return true;
</span><span class="cx"> #else
</span><span class="cx">     return false;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -43,7 +43,11 @@
</span><span class="cx"> OBJC_CLASS WKView;
</span><span class="cx"> OBJC_CLASS NSTextAlternatives;
</span><span class="cx"> #endif
</span><ins>+
+#if PLATFORM(IOS)
+OBJC_CLASS UIWKView;
</ins><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx">     class Cursor;
</span><span class="lines">@@ -133,8 +137,8 @@
</span><span class="cx">     virtual void handleDownloadRequest(DownloadProxy*) = 0;
</span><span class="cx"> #endif // PLATFORM(EFL) || PLATFORM(GTK)
</span><span class="cx"> 
</span><del>-#if PLATFORM(EFL)
-    virtual void didChangeContentsSize(const WebCore::IntSize&amp;) = 0;
</del><ins>+#if PLATFORM(EFL) || PLATFORM(IOS)
+    virtual void didChangeContentSize(const WebCore::IntSize&amp;) = 0;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span><span class="lines">@@ -158,9 +162,13 @@
</span><span class="cx">     virtual void resetSecureInputState() = 0;
</span><span class="cx">     virtual void notifyInputContextAboutDiscardedComposition() = 0;
</span><span class="cx">     virtual void makeFirstResponder() = 0;
</span><ins>+#endif
+
+#if USE(APPKIT)
</ins><span class="cx">     virtual void setPromisedData(const String&amp; pasteboardName, PassRefPtr&lt;WebCore::SharedBuffer&gt; imageBuffer, const String&amp; filename, const String&amp; extension, const String&amp; title,
</span><span class="cx">                                  const String&amp; url, const String&amp; visibleUrl, PassRefPtr&lt;WebCore::SharedBuffer&gt; archiveBuffer) = 0;
</span><span class="cx"> #endif
</span><ins>+
</ins><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx">     virtual void getEditorCommandsForKeyEvent(const NativeWebKeyboardEvent&amp;, const AtomicString&amp;, Vector&lt;WTF::String&gt;&amp;) = 0;
</span><span class="cx"> #endif
</span><span class="lines">@@ -189,7 +197,7 @@
</span><span class="cx">     virtual void updateAcceleratedCompositingMode(const LayerTreeContext&amp;) = 0;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; PLATFORM(MAC)
</ins><span class="cx">     virtual void pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus) = 0;
</span><span class="cx">     virtual void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, PluginComplexTextInputState) = 0;
</span><span class="cx">     virtual void didPerformDictionaryLookup(const AttributedString&amp;, const DictionaryPopupInfo&amp;) = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -118,6 +118,14 @@
</span><span class="cx">     return contexts();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+WebContext* WebContext::sharedProcessContext()
+{
+    static WKContextRef sharedContextRef = WKContextCreate();
+    return toImpl(sharedContextRef);
+}
+#endif
+
</ins><span class="cx"> WebContext::WebContext(ProcessModel processModel, const String&amp; injectedBundlePath)
</span><span class="cx">     : m_processModel(processModel)
</span><span class="cx">     , m_webProcessCountLimit(UINT_MAX)
</span><span class="lines">@@ -1107,7 +1115,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     ASSERT_NOT_REACHED();
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebContext::setHTTPPipeliningEnabled(bool enabled)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContext.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/WebContext.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -98,6 +98,9 @@
</span><span class="cx"> public:
</span><span class="cx">     static PassRefPtr&lt;WebContext&gt; create(const String&amp; injectedBundlePath);
</span><span class="cx">     virtual ~WebContext();
</span><ins>+#if PLATFORM(IOS)
+    static WebContext *sharedProcessContext();
+#endif
</ins><span class="cx"> 
</span><span class="cx">     static const Vector&lt;WebContext*&gt;&amp; allContexts();
</span><span class="cx"> 
</span><span class="lines">@@ -472,7 +475,7 @@
</span><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;NSObject&gt; m_automaticTextReplacementNotificationObserver;
</span><span class="cx">     RetainPtr&lt;NSObject&gt; m_automaticSpellingCorrectionNotificationObserver;
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">     RetainPtr&lt;NSObject&gt; m_automaticQuoteSubstitutionNotificationObserver;
</span><span class="cx">     RetainPtr&lt;NSObject&gt; m_automaticDashSubstitutionNotificationObserver;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebEditCommandProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebEditCommandProxy.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebEditCommandProxy.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/WebEditCommandProxy.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -129,6 +129,12 @@
</span><span class="cx">         return WEB_UI_STRING_KEY(&quot;Bold&quot;, &quot;Bold (Undo action name)&quot;, &quot;Undo action name&quot;);
</span><span class="cx">     case EditActionItalics:
</span><span class="cx">         return WEB_UI_STRING_KEY(&quot;Italics&quot;, &quot;Italics (Undo action name)&quot;, &quot;Undo action name&quot;);
</span><ins>+#if PLATFORM(IOS)
+    case EditActionDelete:
+        return WEB_UI_STRING_KEY(&quot;Delete&quot;, &quot;Delete (Undo action name)&quot;, &quot;Undo action name&quot;);
+    case EditActionDictation:
+        return WEB_UI_STRING_KEY(&quot;Dictation&quot;, &quot;Dictation (Undo action name)&quot;, &quot;Undo action name&quot;);
+#endif
</ins><span class="cx">     case EditActionPaste:
</span><span class="cx">         return WEB_UI_STRING_KEY(&quot;Paste&quot;, &quot;Paste (Undo action name)&quot;, &quot;Undo action name&quot;);
</span><span class="cx">     case EditActionPasteFont:
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebGeolocationManagerProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -92,6 +92,13 @@
</span><span class="cx">     context()-&gt;sendToAllProcesses(Messages::WebGeolocationManager::DidFailToDeterminePosition(errorMessage));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+void WebGeolocationManagerProxy::resetPermissions()
+{
+    context()-&gt;sendToAllProcesses(Messages::WebGeolocationManager::ResetPermissions());
+}
+#endif
+
</ins><span class="cx"> void WebGeolocationManagerProxy::startUpdating(CoreIPC::Connection* connection)
</span><span class="cx"> {
</span><span class="cx">     bool wasUpdating = isUpdating();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebGeolocationManagerProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -49,6 +49,9 @@
</span><span class="cx"> 
</span><span class="cx">     void providerDidChangePosition(WebGeolocationPosition*);
</span><span class="cx">     void providerDidFailToDeterminePosition(const String&amp; errorMessage = String());
</span><ins>+#if PLATFORM(IOS)
+    void resetPermissions();
+#endif
</ins><span class="cx"> 
</span><span class="cx">     using API::Object::ref;
</span><span class="cx">     using API::Object::deref;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -267,6 +267,8 @@
</span><span class="cx">         m_client.willGoToBackForwardListItem(toAPI(page), toAPI(item), toAPI(userData), m_client.clientInfo);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
+
</ins><span class="cx"> void WebLoaderClient::didFailToInitializePlugin(WebPageProxy* page, ImmutableDictionary* pluginInformation)
</span><span class="cx"> {
</span><span class="cx">     if (m_client.didFailToInitializePlugin_deprecatedForUseWithV0)
</span><span class="lines">@@ -329,4 +331,6 @@
</span><span class="cx">     return loadPolicy;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebLoaderClient.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebLoaderClient.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/WebLoaderClient.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -93,9 +93,11 @@
</span><span class="cx">     bool shouldGoToBackForwardListItem(WebPageProxy*, WebBackForwardListItem*);
</span><span class="cx">     void willGoToBackForwardListItem(WebPageProxy*, WebBackForwardListItem*, API::Object*);
</span><span class="cx"> 
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx">     PluginModuleLoadPolicy pluginLoadPolicy(WebPageProxy*, PluginModuleLoadPolicy currentPluginLoadPolicy, ImmutableDictionary*, String&amp; unavailabilityDescriptionOutParameter);
</span><span class="cx">     void didFailToInitializePlugin(WebPageProxy*, ImmutableDictionary*);
</span><span class="cx">     void didBlockInsecurePluginVersion(WebPageProxy*, ImmutableDictionary*);
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -306,7 +306,7 @@
</span><span class="cx">     , m_mediaVolume(1)
</span><span class="cx">     , m_mayStartMediaWhenInWindow(true)
</span><span class="cx">     , m_waitingForDidUpdateViewState(false)
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
</ins><span class="cx">     , m_exposedRectChangedTimer(this, &amp;WebPageProxy::exposedRectChangedTimerFired)
</span><span class="cx">     , m_clipsToExposedRect(false)
</span><span class="cx">     , m_lastSentClipsToExposedRect(false)
</span><span class="lines">@@ -565,7 +565,7 @@
</span><span class="cx">     m_contextMenuClient.initialize(0);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
</ins><span class="cx">     m_exposedRectChangedTimer.stop();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -2161,7 +2161,7 @@
</span><span class="cx">     if (frame-&gt;isMainFrame())
</span><span class="cx">         m_pageLoadState.didCommitLoad();
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if USE(APPKIT)
</ins><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 class="cx">     // FIXME: A load going on in one frame shouldn't affect text editing in other frames on the page.
</span><span class="cx">     m_pageClient-&gt;resetSecureInputState();
</span><span class="lines">@@ -2603,6 +2603,7 @@
</span><span class="cx">     m_process-&gt;context()-&gt;storageManager().setAllowedSessionStorageNamespaceConnection(m_pageID, 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx"> void WebPageProxy::unavailablePluginButtonClicked(uint32_t opaquePluginUnavailabilityReason, const String&amp; mimeType, const String&amp; pluginURLString, const String&amp; pluginspageAttributeURLString, const String&amp; frameURLString, const String&amp; pageURLString)
</span><span class="cx"> {
</span><span class="cx">     MESSAGE_CHECK_URL(pluginURLString);
</span><span class="lines">@@ -2611,13 +2612,9 @@
</span><span class="cx">     MESSAGE_CHECK_URL(pageURLString);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;ImmutableDictionary&gt; pluginInformation;
</span><del>-#if ENABLE(NETSCAPE_PLUGIN_API)
</del><span class="cx">     String newMimeType = mimeType;
</span><span class="cx">     PluginModuleInfo plugin = m_process-&gt;context()-&gt;pluginInfoStore().findPlugin(newMimeType, URL(URL(), pluginURLString));
</span><span class="cx">     pluginInformation = createPluginInformationDictionary(plugin, frameURLString, mimeType, pageURLString, pluginspageAttributeURLString, pluginURLString);
</span><del>-#else
-    UNUSED_PARAM(mimeType);
-#endif
</del><span class="cx"> 
</span><span class="cx">     WKPluginUnavailabilityReason pluginUnavailabilityReason = kWKPluginUnavailabilityReasonPluginMissing;
</span><span class="cx">     switch (static_cast&lt;RenderEmbeddedObject::PluginUnavailabilityReason&gt;(opaquePluginUnavailabilityReason)) {
</span><span class="lines">@@ -2636,6 +2633,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_uiClient.unavailablePluginButtonClicked(this, pluginUnavailabilityReason, pluginInformation.get());
</span><span class="cx"> }
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx"> 
</span><span class="cx"> void WebPageProxy::setToolbarsAreVisible(bool toolbarsAreVisible)
</span><span class="cx"> {
</span><span class="lines">@@ -2734,7 +2732,7 @@
</span><span class="cx"> void WebPageProxy::pageDidScroll()
</span><span class="cx"> {
</span><span class="cx">     m_uiClient.pageDidScroll(this);
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; PLATFORM(MAC)
</ins><span class="cx">     dismissCorrectionPanel(ReasonForDismissingAlternativeTextIgnored);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="lines">@@ -2811,10 +2809,10 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // PLATFORM(EFL) || PLATFORM(GTK)
</span><span class="cx"> 
</span><del>-#if PLATFORM(EFL)
-void WebPageProxy::didChangeContentsSize(const IntSize&amp; size)
</del><ins>+#if PLATFORM(EFL) || PLATFORM(IOS)
+void WebPageProxy::didChangeContentSize(const IntSize&amp; size)
</ins><span class="cx"> {
</span><del>-    m_pageClient-&gt;didChangeContentsSize(size);
</del><ins>+    m_pageClient-&gt;didChangeContentSize(size);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -2960,6 +2958,12 @@
</span><span class="cx">         cancelComposition();
</span><span class="cx">         m_pageClient-&gt;notifyInputContextAboutDiscardedComposition();
</span><span class="cx">     }
</span><ins>+#if PLATFORM(IOS)
+    else {
+        // We need to notify the client on iOS to make sure the selection is redrawn.
+        m_pageClient-&gt;selectionDidChange();
+    }
+#endif
</ins><span class="cx"> #elif PLATFORM(EFL) || PLATFORM(GTK)
</span><span class="cx">     m_pageClient-&gt;updateTextInputState();
</span><span class="cx"> #endif
</span><span class="lines">@@ -3738,6 +3742,11 @@
</span><span class="cx">     invalidateCallbackMap(m_scriptValueCallbacks);
</span><span class="cx">     invalidateCallbackMap(m_computedPagesCallbacks);
</span><span class="cx">     invalidateCallbackMap(m_validateCommandCallbacks);
</span><ins>+#if PLATFORM(IOS)
+    invalidateCallbackMap(m_gestureCallbacks);
+    invalidateCallbackMap(m_touchesCallbacks);
+    invalidateCallbackMap(m_autocorrectionCallbacks);
+#endif
</ins><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx">     invalidateCallbackMap(m_printFinishedCallbacks);
</span><span class="cx"> #endif
</span><span class="lines">@@ -3794,7 +3803,7 @@
</span><span class="cx">     // FIXME: Notify input methods about abandoned composition.
</span><span class="cx">     m_temporarilyClosedComposition = false;
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; PLATFORM(MAC)
</ins><span class="cx">     dismissCorrectionPanel(ReasonForDismissingAlternativeTextIgnored);
</span><span class="cx">     m_pageClient-&gt;dismissDictionaryLookupPanel();
</span><span class="cx"> #endif
</span><span class="lines">@@ -3832,7 +3841,9 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     m_creationParameters.layerHostingMode = m_layerHostingMode;
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     m_creationParameters.colorSpace = m_pageClient-&gt;colorSpace();
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4005,7 +4016,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::recommendedScrollbarStyleDidChange(int32_t newStyle)
</span><span class="cx"> {
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if USE(APPKIT)
</ins><span class="cx">     m_pageClient-&gt;recommendedScrollbarStyleDidChange(newStyle);
</span><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(newStyle);
</span><span class="lines">@@ -4031,6 +4042,7 @@
</span><span class="cx">     m_pageCount = pageCount;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx"> void WebPageProxy::didFailToInitializePlugin(const String&amp; mimeType, const String&amp; frameURLString, const String&amp; pageURLString)
</span><span class="cx"> {
</span><span class="cx">     m_loaderClient.didFailToInitializePlugin(this, createPluginInformationDictionary(mimeType, frameURLString, pageURLString).get());
</span><span class="lines">@@ -4054,6 +4066,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_loaderClient.didBlockInsecurePluginVersion(this, pluginInformation.get());
</span><span class="cx"> }
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx"> 
</span><span class="cx"> bool WebPageProxy::willHandleHorizontalScrollEvents() const
</span><span class="cx"> {
</span><span class="lines">@@ -4203,7 +4216,7 @@
</span><span class="cx">     m_process-&gt;send(Messages::WebPage::SetMinimumLayoutSize(minimumLayoutSize), m_pageID, 0);
</span><span class="cx">     m_drawingArea-&gt;minimumLayoutSizeDidChange();
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if USE(APPKIT)
</ins><span class="cx">     if (m_minimumLayoutSize.width() &lt;= 0)
</span><span class="cx">         intrinsicContentSizeDidChange(IntSize(-1, -1));
</span><span class="cx"> #endif
</span><span class="lines">@@ -4222,7 +4235,7 @@
</span><span class="cx">     m_process-&gt;send(Messages::WebPage::SetAutoSizingShouldExpandToViewHeight(shouldExpand), m_pageID, 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; PLATFORM(MAC)
</ins><span class="cx"> 
</span><span class="cx"> void WebPageProxy::substitutionsPanelIsShowing(bool&amp; isShowing)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #define WebPageProxy_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;APIObject.h&quot;
</span><ins>+#include &quot;AutoCorrectionCallback.h&quot;
</ins><span class="cx"> #include &quot;Connection.h&quot;
</span><span class="cx"> #include &quot;DragControllerAction.h&quot;
</span><span class="cx"> #include &quot;DrawingAreaProxy.h&quot;
</span><span class="lines">@@ -65,6 +66,7 @@
</span><span class="cx"> #include &lt;WebCore/PlatformScreen.h&gt;
</span><span class="cx"> #include &lt;WebCore/ScrollTypes.h&gt;
</span><span class="cx"> #include &lt;WebCore/TextChecking.h&gt;
</span><ins>+#include &lt;WebCore/TextGranularity.h&gt;
</ins><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><span class="cx"> #include &lt;wtf/OwnPtr.h&gt;
</span><span class="lines">@@ -219,6 +221,98 @@
</span><span class="cx">     CallbackFunction m_callback;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+class GestureCallback : public CallbackBase {
+public:
+    typedef void (*CallbackFunction)(const WebCore::IntPoint&amp;, uint32_t, uint32_t, uint32_t, WKErrorRef, void*);
+
+    static PassRefPtr&lt;GestureCallback&gt; create(void* context, CallbackFunction callback)
+    {
+        return adoptRef(new GestureCallback(context, callback));
+    }
+
+    virtual ~GestureCallback()
+    {
+        ASSERT(!m_callback);
+    }
+
+    void performCallbackWithReturnValue(const WebCore::IntPoint&amp; returnValue1, uint32_t returnValue2, uint32_t returnValue3, uint32_t returnValue4)
+    {
+        ASSERT(m_callback);
+
+        m_callback(returnValue1, returnValue2, returnValue3, returnValue4, 0, context());
+
+        m_callback = 0;
+    }
+
+    void invalidate()
+    {
+        ASSERT(m_callback);
+
+        RefPtr&lt;WebError&gt; error = WebError::create();
+        m_callback(WebCore::IntPoint(), 0, 0, 0, toAPI(error.get()), context());
+
+        m_callback = 0;
+    }
+
+private:
+
+    GestureCallback(void* context, CallbackFunction callback)
+        : CallbackBase(context)
+        , m_callback(callback)
+    {
+        ASSERT(m_callback);
+    }
+
+    CallbackFunction m_callback;
+};
+
+class TouchesCallback : public CallbackBase {
+public:
+    typedef void (*CallbackFunction)(const WebCore::IntPoint&amp;, uint32_t, WKErrorRef, void*);
+
+    static PassRefPtr&lt;TouchesCallback&gt; create(void* context, CallbackFunction callback)
+    {
+        return adoptRef(new TouchesCallback(context, callback));
+    }
+
+    virtual ~TouchesCallback()
+    {
+        ASSERT(!m_callback);
+    }
+
+    void performCallbackWithReturnValue(const WebCore::IntPoint&amp; returnValue1, uint32_t returnValue2)
+    {
+        ASSERT(m_callback);
+
+        m_callback(returnValue1, returnValue2, 0, context());
+
+        m_callback = 0;
+    }
+
+    void invalidate()
+    {
+        ASSERT(m_callback);
+
+        RefPtr&lt;WebError&gt; error = WebError::create();
+        m_callback(WebCore::IntPoint(), 0, toAPI(error.get()), context());
+        
+        m_callback = 0;
+    }
+    
+private:
+    
+    TouchesCallback(void* context, CallbackFunction callback)
+        : CallbackBase(context)
+        , m_callback(callback)
+    {
+        ASSERT(m_callback);
+    }
+    
+    CallbackFunction m_callback;
+};
+#endif
+
</ins><span class="cx"> class WebPageProxy
</span><span class="cx">     : public API::TypedObject&lt;API::Object::Type::Page&gt;
</span><span class="cx"> #if ENABLE(INPUT_TYPE_COLOR)
</span><span class="lines">@@ -332,6 +426,14 @@
</span><span class="cx"> 
</span><span class="cx">     void executeEditCommand(const String&amp; commandName);
</span><span class="cx">     void validateCommand(const String&amp; commandName, PassRefPtr&lt;ValidateCommandCallback&gt;);
</span><ins>+#if PLATFORM(IOS)
+    void selectWithGesture(const WebCore::IntPoint, WebCore::TextGranularity, uint32_t gestureType, uint32_t gestureState, PassRefPtr&lt;GestureCallback&gt;);
+    void updateSelectionWithTouches(const WebCore::IntPoint, uint32_t touches, bool baseIsStart, PassRefPtr&lt;TouchesCallback&gt;);
+    void selectWithTwoTouches(const WebCore::IntPoint from, const WebCore::IntPoint to, uint32_t gestureType, uint32_t gestureState, PassRefPtr&lt;GestureCallback&gt;);
+    void extendSelection(WebCore::TextGranularity);
+    void requestAutocorrectionData(const String&amp; textForAutocorrection, PassRefPtr&lt;AutocorrectionDataCallback&gt;);
+    void applyAutocorrection(const String&amp; correction, const String&amp; originalText, PassRefPtr&lt;StringCallback&gt;);
+#endif
</ins><span class="cx"> 
</span><span class="cx">     const EditorState&amp; editorState() const { return m_editorState; }
</span><span class="cx">     bool canDelete() const { return hasSelectedRange() &amp;&amp; isContentEditable(); }
</span><span class="lines">@@ -703,6 +805,15 @@
</span><span class="cx">     void setSuppressVisibilityUpdates(bool flag) { m_suppressVisibilityUpdates = flag; }
</span><span class="cx">     bool suppressVisibilityUpdates() { return m_suppressVisibilityUpdates; }
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    void didFinishScrolling(const WebCore::FloatPoint&amp; contentOffset);
+    void didFinishZooming(float newScale);
+
+    void tapHighlightAtPosition(const WebCore::FloatPoint&amp;, uint64_t&amp; requestID);
+
+    void blurAssistedNode();
+#endif
+
</ins><span class="cx">     void postMessageToInjectedBundle(const String&amp; messageName, API::Object* messageBody);
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INPUT_TYPE_COLOR)
</span><span class="lines">@@ -802,7 +913,9 @@
</span><span class="cx">     void shouldInterruptJavaScript(bool&amp; result);
</span><span class="cx">     void setStatusText(const String&amp;);
</span><span class="cx">     void mouseDidMoveOverElement(const WebHitTestResult::Data&amp; hitTestResultData, uint32_t modifiers, CoreIPC::MessageDecoder&amp;);
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx">     void unavailablePluginButtonClicked(uint32_t opaquePluginUnavailabilityReason, const String&amp; mimeType, const String&amp; pluginURLString, const String&amp; pluginsPageURLString, const String&amp; frameURLString, const String&amp; pageURLString);
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx">     void setToolbarsAreVisible(bool toolbarsAreVisible);
</span><span class="cx">     void getToolbarsAreVisible(bool&amp; toolbarsAreVisible);
</span><span class="cx">     void setMenuBarIsVisible(bool menuBarIsVisible);
</span><span class="lines">@@ -828,8 +941,10 @@
</span><span class="cx">     void didChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar);
</span><span class="cx">     void didChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide, bool pinnedToTopSide, bool pinnedToBottomSide);
</span><span class="cx">     void didChangePageCount(unsigned);
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx">     void didFailToInitializePlugin(const String&amp; mimeType, const String&amp; frameURLString, const String&amp; pageURLString);
</span><span class="cx">     void didBlockInsecurePluginVersion(const String&amp; mimeType, const String&amp; pluginURLString, const String&amp; frameURLString, const String&amp; pageURLString, bool replacementObscured);
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx">     void setCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents) { m_canShortCircuitHorizontalWheelEvents = canShortCircuitHorizontalWheelEvents; }
</span><span class="cx"> 
</span><span class="cx">     void reattachToWebProcess();
</span><span class="lines">@@ -848,8 +963,8 @@
</span><span class="cx"> #if USE(COORDINATED_GRAPHICS)
</span><span class="cx">     void didFindZoomableArea(const WebCore::IntPoint&amp;, const WebCore::IntRect&amp;);
</span><span class="cx"> #endif
</span><del>-#if PLATFORM(EFL)
-    void didChangeContentsSize(const WebCore::IntSize&amp;);
</del><ins>+#if PLATFORM(EFL) || PLATFORM(IOS)
+    void didChangeContentSize(const WebCore::IntSize&amp;);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="lines">@@ -951,6 +1066,12 @@
</span><span class="cx">     void scriptValueCallback(const CoreIPC::DataReference&amp;, uint64_t);
</span><span class="cx">     void computedPagesCallback(const Vector&lt;WebCore::IntRect&gt;&amp;, double totalScaleFactorForPrinting, uint64_t);
</span><span class="cx">     void validateCommandCallback(const String&amp;, bool, int, uint64_t);
</span><ins>+#if PLATFORM(IOS)
+    void gestureCallback(const WebCore::IntPoint&amp;, uint32_t, uint32_t, uint32_t, uint64_t);
+    void touchesCallback(const WebCore::IntPoint&amp;, uint32_t, uint64_t);
+    void autocorrectionDataCallback(const Vector&lt;WebCore::FloatRect&gt;&amp;, const String&amp;, float, uint64_t, uint64_t);
+    void interpretKeyEvent(const EditorState&amp;, bool isCharEvent, bool&amp; handled);
+#endif
</ins><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx">     void printFinishedCallback(const WebCore::ResourceError&amp;, uint64_t);
</span><span class="cx"> #endif
</span><span class="lines">@@ -968,7 +1089,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool maybeInitializeSandboxExtensionHandle(const WebCore::URL&amp;, SandboxExtension::Handle&amp;);
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
</ins><span class="cx">     void substitutionsPanelIsShowing(bool&amp;);
</span><span class="cx">     void showCorrectionPanel(int32_t panelType, const WebCore::FloatRect&amp; boundingBoxOfReplacedString, const String&amp; replacedString, const String&amp; replacementString, const Vector&lt;String&gt;&amp; alternativeReplacementStrings);
</span><span class="cx">     void dismissCorrectionPanel(int32_t reason);
</span><span class="lines">@@ -980,8 +1101,19 @@
</span><span class="cx">     void removeDictationAlternatives(uint64_t dictationContext);
</span><span class="cx">     void dictationAlternatives(uint64_t dictationContext, Vector&lt;String&gt;&amp; result);
</span><span class="cx"> #endif
</span><del>-#endif // PLATFORM(MAC)
</del><ins>+#endif // PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
</ins><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    void mainDocumentDidReceiveMobileDocType();
+
+    void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color&amp; color, const Vector&lt;WebCore::FloatQuad&gt;&amp; geometries, const WebCore::IntSize&amp; topLeftRadius, const WebCore::IntSize&amp; topRightRadius, const WebCore::IntSize&amp; bottomLeftRadius, const WebCore::IntSize&amp; bottomRightRadius);
+
+    void didChangeViewportArguments(const WebCore::ViewportArguments&amp; viewportArguments);
+
+    void startAssistingNode(const WebCore::IntRect&amp;, bool hasNextFocusable, bool hasPreviousFocusable);
+    void stopAssistingNode();
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> #if USE(SOUP)
</span><span class="cx">     void didReceiveURIRequest(String uriString, uint64_t requestID);
</span><span class="cx"> #endif
</span><span class="lines">@@ -1052,6 +1184,11 @@
</span><span class="cx">     HashMap&lt;uint64_t, RefPtr&lt;ScriptValueCallback&gt;&gt; m_scriptValueCallbacks;
</span><span class="cx">     HashMap&lt;uint64_t, RefPtr&lt;ComputedPagesCallback&gt;&gt; m_computedPagesCallbacks;
</span><span class="cx">     HashMap&lt;uint64_t, RefPtr&lt;ValidateCommandCallback&gt;&gt; m_validateCommandCallbacks;
</span><ins>+#if PLATFORM(IOS)
+    HashMap&lt;uint64_t, RefPtr&lt;GestureCallback&gt;&gt; m_gestureCallbacks;
+    HashMap&lt;uint64_t, RefPtr&lt;TouchesCallback&gt;&gt; m_touchesCallbacks;
+    HashMap&lt;uint64_t, RefPtr&lt;AutocorrectionDataCallback&gt;&gt; m_autocorrectionCallbacks;
+#endif
</ins><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx">     HashMap&lt;uint64_t, RefPtr&lt;PrintFinishedCallback&gt;&gt; m_printFinishedCallbacks;
</span><span class="cx"> #endif
</span><span class="lines">@@ -1211,7 +1348,9 @@
</span><span class="cx">     bool m_waitingForDidUpdateViewState;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     WebCore::Timer&lt;WebPageProxy&gt; m_exposedRectChangedTimer;
</span><ins>+#endif // PLATFORM(IOS)
</ins><span class="cx">     WebCore::FloatRect m_exposedRect;
</span><span class="cx">     WebCore::FloatRect m_lastSentExposedRect;
</span><span class="cx">     bool m_clipsToExposedRect;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -30,12 +30,16 @@
</span><span class="cx">     RunJavaScriptPrompt(uint64_t frameID, WTF::String message, WTF::String defaultValue) -&gt; (WTF::String result)
</span><span class="cx">     ShouldInterruptJavaScript() -&gt; (bool shouldInterupt)
</span><span class="cx">     MouseDidMoveOverElement(WebKit::WebHitTestResult::Data hitTestResultData, uint32_t modifiers, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx">     UnavailablePluginButtonClicked(uint32_t pluginUnavailabilityReason, WTF::String mimeType, WTF::String pluginURLString, WTF::String pluginspageAttributeURLString, WTF::String frameURLString, WTF::String pageURLString)
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx">     DidChangeViewportProperties(WebCore::ViewportAttributes attributes)
</span><span class="cx">     DidReceiveEvent(uint32_t type, bool handled)
</span><span class="cx">     StopResponsivenessTimer()
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     SetCursor(WebCore::Cursor cursor)
</span><span class="cx">     SetCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves)
</span><ins>+#endif
</ins><span class="cx">     SetStatusText(WTF::String statusText)
</span><span class="cx">     SetToolTip(WTF::String toolTip)
</span><span class="cx">     SetFocus(bool focused)
</span><span class="lines">@@ -65,8 +69,10 @@
</span><span class="cx">     DidChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar)
</span><span class="cx">     DidChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide, bool pinnedToTopSide, bool pinnedToBottomSide)
</span><span class="cx">     DidChangePageCount(unsigned pageCount);
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx">     DidFailToInitializePlugin(WTF::String mimeType, WTF::String frameURLString, WTF::String pageURLString)
</span><span class="cx">     DidBlockInsecurePluginVersion(WTF::String mimeType, WTF::String pluginURLString, WTF::String frameURLString, WTF::String pageURLString, bool replacementObscured)
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx">     SetCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents)
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(EFL)
</span><span class="lines">@@ -81,8 +87,8 @@
</span><span class="cx">     DidFindZoomableArea(WebCore::IntPoint target, WebCore::IntRect area)
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(EFL)
-    DidChangeContentsSize(WebCore::IntSize newSize)
</del><ins>+#if PLATFORM(EFL) || PLATFORM(IOS)
+    DidChangeContentSize(WebCore::IntSize newSize)
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="lines">@@ -141,6 +147,12 @@
</span><span class="cx">     ScriptValueCallback(CoreIPC::DataReference resultData, uint64_t callbackID)
</span><span class="cx">     ComputedPagesCallback(Vector&lt;WebCore::IntRect&gt; pageRects, double totalScaleFactorForPrinting, uint64_t callbackID)
</span><span class="cx">     ValidateCommandCallback(WTF::String command, bool isEnabled, int32_t state, uint64_t callbackID)
</span><ins>+#if PLATFORM(IOS)
+    GestureCallback(WebCore::IntPoint point, uint32_t gestureType, uint32_t gestureState, uint32_t flags, uint64_t callbackID)
+    TouchesCallback(WebCore::IntPoint point, uint32_t touches, uint64_t callbackID)
+    AutocorrectionDataCallback(Vector&lt;WebCore::FloatRect&gt; textRects, String fontName, double fontSize, uint64_t traits, uint64_t callbackID);
+    InterpretKeyEvent(WebKit::EditorState state, bool isCharEvent) -&gt; (bool handled)
+#endif
</ins><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx">     PrintFinishedCallback(WebCore::ResourceError error, uint64_t callbackID)
</span><span class="cx"> #endif
</span><span class="lines">@@ -265,10 +277,10 @@
</span><span class="cx">     SearchTheWeb(WTF::String string)
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if USE(APPKIT)
</ins><span class="cx">     SubstitutionsPanelIsShowing() -&gt; (bool isShowing)
</span><span class="cx"> #endif
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; PLATFORM(MAC)
</ins><span class="cx">     # Autocorrection messages
</span><span class="cx">     ShowCorrectionPanel(int32_t panelType, WebCore::FloatRect boundingBoxOfReplacedString, String replacedString, String replacementString, Vector&lt;String&gt; alternativeReplacementStrings)
</span><span class="cx">     DismissCorrectionPanel(int32_t reason)
</span><span class="lines">@@ -288,6 +300,16 @@
</span><span class="cx">     WindowedPluginGeometryDidChange(WebCore::IntRect frameRect, WebCore::IntRect clipRect, uint64_t windowID)
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    MainDocumentDidReceiveMobileDocType();
+
+    DidGetTapHighlightGeometries(uint64_t requestID, WebCore::Color color, Vector&lt;WebCore::FloatQuad&gt; geometries, WebCore::IntSize topLeftRadius, WebCore::IntSize topRightRadius, WebCore::IntSize bottomLeftRadius, WebCore::IntSize bottomRightRadius)
+    DidChangeViewportArguments(WebCore::ViewportArguments viewportArguments)
+
+    StartAssistingNode(WebCore::IntRect scrollRect, bool hasNextFocusable, bool hasPreviousFocusable)
+    StopAssistingNode()
+#endif
+
</ins><span class="cx">     # Search popup menus
</span><span class="cx">     SaveRecentSearches(WTF::String name, Vector&lt;String&gt; searchItems)
</span><span class="cx">     LoadRecentSearches(WTF::String name) -&gt; (Vector&lt;String&gt; result)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebUIClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebUIClient.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebUIClient.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/WebUIClient.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -176,6 +176,7 @@
</span><span class="cx">     m_client.mouseDidMoveOverElement(toAPI(page), toAPI(webHitTestResult.get()), toAPI(modifiers), toAPI(userData), m_client.clientInfo);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx"> void WebUIClient::unavailablePluginButtonClicked(WebPageProxy* page, WKPluginUnavailabilityReason pluginUnavailabilityReason, ImmutableDictionary* pluginInformation)
</span><span class="cx"> {
</span><span class="cx">     if (pluginUnavailabilityReason == kWKPluginUnavailabilityReasonPluginMissing) {
</span><span class="lines">@@ -204,6 +205,7 @@
</span><span class="cx">             toAPI(pluginInformation),
</span><span class="cx">             m_client.clientInfo);
</span><span class="cx"> }
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx"> 
</span><span class="cx"> bool WebUIClient::implementsDidNotHandleKeyEvent() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebUIClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebUIClient.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebUIClient.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/WebUIClient.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -71,8 +71,10 @@
</span><span class="cx"> 
</span><span class="cx">     void setStatusText(WebPageProxy*, const String&amp;);
</span><span class="cx">     void mouseDidMoveOverElement(WebPageProxy*, const WebHitTestResult::Data&amp;, WebEvent::Modifiers, API::Object*);
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx">     void unavailablePluginButtonClicked(WebPageProxy*, WKPluginUnavailabilityReason, ImmutableDictionary*);
</span><del>-    
</del><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+
</ins><span class="cx">     bool implementsDidNotHandleKeyEvent() const;
</span><span class="cx">     void didNotHandleKeyEvent(WebPageProxy*, const NativeWebKeyboardEvent&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosTextCheckerIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/ios/TextCheckerIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/TextCheckerIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/ios/TextCheckerIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,193 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;TextChecker.h&quot;
+
+#import &quot;TextCheckerState.h&quot;
+#import &lt;WebCore/NotImplemented.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+    
+TextCheckerState textCheckerState;
+
+const TextCheckerState&amp; TextChecker::state()
+{
+    notImplemented();
+    return textCheckerState;
+}
+
+bool TextChecker::isContinuousSpellCheckingAllowed()
+{
+    notImplemented();
+    return false;
+}
+
+void TextChecker::setContinuousSpellCheckingEnabled(bool)
+{
+    notImplemented();
+}
+
+void TextChecker::setGrammarCheckingEnabled(bool)
+{
+    notImplemented();
+}
+
+void TextChecker::setAutomaticSpellingCorrectionEnabled(bool)
+{
+    notImplemented();
+}
+
+void TextChecker::setAutomaticQuoteSubstitutionEnabled(bool)
+{
+    notImplemented();
+}
+
+void TextChecker::setAutomaticDashSubstitutionEnabled(bool)
+{
+    notImplemented();
+}
+
+void TextChecker::setAutomaticLinkDetectionEnabled(bool)
+{
+    notImplemented();
+}
+
+void TextChecker::setAutomaticTextReplacementEnabled(bool)
+{
+    notImplemented();
+}
+
+static bool smartInsertDeleteEnabled;
+
+bool TextChecker::isSmartInsertDeleteEnabled()
+{
+    notImplemented();
+    return smartInsertDeleteEnabled;
+}
+
+void TextChecker::setSmartInsertDeleteEnabled(bool)
+{
+    notImplemented();
+}
+
+bool TextChecker::substitutionsPanelIsShowing()
+{
+    notImplemented();
+    return false;
+}
+
+void TextChecker::toggleSubstitutionsPanelIsShowing()
+{
+    notImplemented();
+}
+
+void TextChecker::continuousSpellCheckingEnabledStateChanged(bool)
+{
+    notImplemented();
+}
+
+void TextChecker::grammarCheckingEnabledStateChanged(bool)
+{
+    notImplemented();
+}
+
+int64_t TextChecker::uniqueSpellDocumentTag(WebPageProxy*)
+{
+    notImplemented();
+    return 0;
+}
+
+void TextChecker::closeSpellDocumentWithTag(int64_t)
+{
+    notImplemented();
+}
+
+#if USE(UNIFIED_TEXT_CHECKING)
+
+Vector&lt;TextCheckingResult&gt; TextChecker::checkTextOfParagraph(int64_t, const UChar*, int, uint64_t)
+{
+    notImplemented();
+    return Vector&lt;TextCheckingResult&gt;();
+}
+
+#endif
+
+void TextChecker::checkSpellingOfString(int64_t, const UChar*, uint32_t, int32_t&amp;, int32_t&amp;)
+{
+    // Mac uses checkTextOfParagraph instead.
+    notImplemented();
+}
+
+void TextChecker::checkGrammarOfString(int64_t, const UChar*, uint32_t, Vector&lt;WebCore::GrammarDetail&gt;&amp;, int32_t&amp;, int32_t&amp;)
+{
+    // Mac uses checkTextOfParagraph instead.
+    notImplemented();
+}
+
+bool TextChecker::spellingUIIsShowing()
+{
+    notImplemented();
+    return false;
+}
+
+void TextChecker::toggleSpellingUIIsShowing()
+{
+    notImplemented();
+}
+
+void TextChecker::updateSpellingUIWithMisspelledWord(int64_t, const String&amp;)
+{
+    notImplemented();
+}
+
+void TextChecker::updateSpellingUIWithGrammarString(int64_t, const String&amp;, const GrammarDetail&amp;)
+{
+    notImplemented();
+}
+
+void TextChecker::getGuessesForWord(int64_t, const String&amp;, const String&amp;, Vector&lt;String&gt;&amp;)
+{
+    notImplemented();
+}
+
+void TextChecker::learnWord(int64_t, const String&amp;)
+{
+    notImplemented();
+}
+
+void TextChecker::ignoreWord(int64_t, const String&amp;)
+{
+    notImplemented();
+}
+
+void TextChecker::requestCheckingOfString(PassRefPtr&lt;TextCheckerCompletion&gt;)
+{
+    notImplemented();
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosTiledCoreAnimationDrawingAreaProxyIOSh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/ios/TiledCoreAnimationDrawingAreaProxyIOS.h (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/TiledCoreAnimationDrawingAreaProxyIOS.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/ios/TiledCoreAnimationDrawingAreaProxyIOS.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2012 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.
+ */
+
+#ifndef TiledCoreAnimationDrawingAreaProxyIOS_h
+#define TiledCoreAnimationDrawingAreaProxyIOS_h
+
+#include &quot;DrawingAreaProxy.h&quot;
+#include &lt;wtf/PassOwnPtr.h&gt;
+
+namespace WebKit {
+
+class TiledCoreAnimationDrawingAreaProxyIOS : public DrawingAreaProxy {
+public:
+    explicit TiledCoreAnimationDrawingAreaProxyIOS(WebPageProxy*);
+    virtual ~TiledCoreAnimationDrawingAreaProxyIOS();
+
+private:
+    // DrawingAreaProxy
+    virtual void deviceScaleFactorDidChange() OVERRIDE;
+    virtual void sizeDidChange() OVERRIDE;
+    virtual void enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&amp;) OVERRIDE;
+};
+
+} // namespace WebKit
+
+#endif // TiledCoreAnimationDrawingAreaProxyIOS_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosTiledCoreAnimationDrawingAreaProxyIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/ios/TiledCoreAnimationDrawingAreaProxyIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/TiledCoreAnimationDrawingAreaProxyIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/ios/TiledCoreAnimationDrawingAreaProxyIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;TiledCoreAnimationDrawingAreaProxyIOS.h&quot;
+
+#import &quot;DrawingAreaMessages.h&quot;
+#import &quot;WebPageProxy.h&quot;
+#import &quot;WebProcessProxy.h&quot;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+TiledCoreAnimationDrawingAreaProxyIOS::TiledCoreAnimationDrawingAreaProxyIOS(WebPageProxy* webPageProxy)
+    : DrawingAreaProxy(DrawingAreaTypeTiledCoreAnimationIOS, webPageProxy)
+{
+}
+    
+TiledCoreAnimationDrawingAreaProxyIOS::~TiledCoreAnimationDrawingAreaProxyIOS()
+{
+}
+
+void TiledCoreAnimationDrawingAreaProxyIOS::deviceScaleFactorDidChange()
+{
+    m_webPageProxy-&gt;process()-&gt;send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy-&gt;deviceScaleFactor()), m_webPageProxy-&gt;pageID());
+}
+
+void TiledCoreAnimationDrawingAreaProxyIOS::sizeDidChange()
+{
+    m_webPageProxy-&gt;process()-&gt;send(Messages::DrawingArea::UpdateGeometry(m_size, IntSize()), m_webPageProxy-&gt;pageID());
+}
+
+void TiledCoreAnimationDrawingAreaProxyIOS::enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&amp; layerTreeContext)
+{
+    m_webPageProxy-&gt;enterAcceleratedCompositingMode(layerTreeContext);
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWebFullScreenManagerProxyIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/ios/WebFullScreenManagerProxyIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebFullScreenManagerProxyIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/ios/WebFullScreenManagerProxyIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,75 @@
</span><ins>+/*
+ * Copyright (C) 2010 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 &quot;config.h&quot;
+#import &quot;WebFullScreenManagerProxy.h&quot;
+
+#if ENABLE(FULLSCREEN_API) &amp;&amp; PLATFORM(IOS)
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebFullScreenManagerProxy::invalidate()
+{
+    if (!m_webView)
+        return;
+    
+    m_webView = 0;
+}
+
+void WebFullScreenManagerProxy::close()
+{
+    // No-op.
+}
+
+bool WebFullScreenManagerProxy::isFullScreen()
+{
+    return false;
+}
+
+void WebFullScreenManagerProxy::enterFullScreen()
+{
+    // No-op.
+}
+
+void WebFullScreenManagerProxy::exitFullScreen()
+{
+    // No-op.
+}
+    
+void WebFullScreenManagerProxy::beganEnterFullScreen(const IntRect&amp; initialFrame, const IntRect&amp; finalFrame)
+{
+    // No-op.
+}
+
+void WebFullScreenManagerProxy::beganExitFullScreen(const IntRect&amp; initialFrame, const IntRect&amp; finalFrame)
+{
+    // No-op.
+}
+
+} // namespace WebKit
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWebInspectorProxyIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/ios/WebInspectorProxyIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebInspectorProxyIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/ios/WebInspectorProxyIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,148 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;WebInspectorProxy.h&quot;
+
+#if ENABLE(INSPECTOR)
+
+#import &lt;WebCore/NotImplemented.h&gt;
+
+namespace WebKit {
+
+void WebInspectorProxy::createInspectorWindow()
+{
+    notImplemented();
+}
+
+void WebInspectorProxy::updateInspectorWindowTitle() const
+{
+    notImplemented();
+}
+
+WebPageProxy* WebInspectorProxy::platformCreateInspectorPage()
+{
+    notImplemented();
+    return 0;
+}
+
+void WebInspectorProxy::platformOpen()
+{
+    notImplemented();
+}
+
+void WebInspectorProxy::platformDidClose()
+{
+    notImplemented();
+}
+
+void WebInspectorProxy::platformBringToFront()
+{
+    notImplemented();
+}
+
+bool WebInspectorProxy::platformIsFront()
+{
+    notImplemented();
+    return false;
+}
+
+void WebInspectorProxy::platformInspectedURLChanged(const String&amp;)
+{
+    notImplemented();
+}
+
+void WebInspectorProxy::platformSave(const String&amp; suggestedURL, const String&amp; content, bool base64Encoded, bool forceSaveDialog)
+{
+    notImplemented();
+}
+
+void WebInspectorProxy::platformAppend(const String&amp; suggestedURL, const String&amp; content)
+{
+    notImplemented();
+}
+
+void WebInspectorProxy::inspectedViewFrameDidChange(CGFloat)
+{
+    notImplemented();
+}
+
+unsigned WebInspectorProxy::platformInspectedWindowHeight()
+{
+    notImplemented();
+    return 0;
+}
+
+unsigned WebInspectorProxy::platformInspectedWindowWidth()
+{
+    notImplemented();
+    return 0;
+}
+
+void WebInspectorProxy::platformAttach()
+{
+    notImplemented();
+}
+
+void WebInspectorProxy::platformDetach()
+{
+    notImplemented();
+}
+
+void WebInspectorProxy::platformSetAttachedWindowHeight(unsigned)
+{
+    notImplemented();
+}
+
+void WebInspectorProxy::platformSetToolbarHeight(unsigned height)
+{
+    notImplemented();
+}
+
+String WebInspectorProxy::inspectorPageURL() const
+{
+    notImplemented();
+    return String();
+}
+
+String WebInspectorProxy::inspectorBaseURL() const
+{
+    notImplemented();
+    return String();
+}
+
+void WebInspectorProxy::platformSetAttachedWindowWidth(unsigned)
+{
+    notImplemented();
+}
+
+void WebInspectorProxy::platformAttachAvailabilityChanged(bool available)
+{
+    notImplemented();
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(INSPECTOR)
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,407 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;WebPageProxy.h&quot;
+
+#import &quot;NativeWebKeyboardEvent.h&quot;
+#import &quot;WebPageMessages.h&quot;
+#import &quot;WebProcessProxy.h&quot;
+#import &lt;WebCore/NotImplemented.h&gt;
+#import &lt;WebCore/SharedBuffer.h&gt;
+#import &quot;PageClientImplIOS.h&quot;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebPageProxy::platformInitialize()
+{
+    notImplemented();
+}
+
+String WebPageProxy::standardUserAgent(const String&amp;)
+{
+    notImplemented();
+
+    // Just return the iOS 5.1 user agent for now.
+    return &quot;Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3&quot;;
+}
+
+void WebPageProxy::getIsSpeaking(bool&amp;)
+{
+    notImplemented();
+}
+
+void WebPageProxy::speak(const String&amp;)
+{
+    notImplemented();
+}
+
+void WebPageProxy::stopSpeaking()
+{
+    notImplemented();
+}
+
+void WebPageProxy::searchWithSpotlight(const String&amp;)
+{
+    notImplemented();
+}
+
+void WebPageProxy::searchTheWeb(const String&amp;)
+{
+    notImplemented();
+}
+
+void WebPageProxy::windowAndViewFramesChanged(const FloatRect&amp;, const FloatPoint&amp;)
+{
+    notImplemented();
+}
+
+void WebPageProxy::setComposition(const String&amp;, Vector&lt;CompositionUnderline&gt;, uint64_t, uint64_t, uint64_t, uint64_t)
+{
+    notImplemented();
+
+}
+
+void WebPageProxy::confirmComposition()
+{
+    notImplemented();
+}
+
+void WebPageProxy::cancelComposition()
+{
+    notImplemented();
+
+}
+
+bool WebPageProxy::insertText(const String&amp; text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd)
+{
+    if (!isValid())
+        return true;
+    
+    bool handled = true;
+    process()-&gt;sendSync(Messages::WebPage::InsertText(text, replacementRangeStart, replacementRangeEnd), Messages::WebPage::InsertText::Reply(handled, m_editorState), m_pageID);
+    return handled;
+}
+
+bool WebPageProxy::insertDictatedText(const String&amp;, uint64_t, uint64_t, const Vector&lt;WebCore::TextAlternativeWithRange&gt;&amp;)
+{
+    notImplemented();
+    return false;
+}
+
+void WebPageProxy::getMarkedRange(uint64_t&amp;, uint64_t&amp;)
+{
+    notImplemented();
+}
+
+void WebPageProxy::getSelectedRange(uint64_t&amp;, uint64_t&amp;)
+{
+    notImplemented();
+}
+
+void WebPageProxy::getAttributedSubstringFromRange(uint64_t, uint64_t, AttributedString&amp;)
+{
+    notImplemented();
+}
+
+uint64_t WebPageProxy::characterIndexForPoint(const IntPoint)
+{
+    notImplemented();
+    return 0;
+}
+
+IntRect WebPageProxy::firstRectForCharacterRange(uint64_t, uint64_t)
+{
+    notImplemented();
+    return IntRect();
+}
+
+bool WebPageProxy::executeKeypressCommands(const Vector&lt;WebCore::KeypressCommand&gt;&amp;)
+{
+    notImplemented();
+    return false;
+}
+
+String WebPageProxy::stringSelectionForPasteboard()
+{
+    notImplemented();
+    return String();
+}
+
+PassRefPtr&lt;WebCore::SharedBuffer&gt; WebPageProxy::dataSelectionForPasteboard(const String&amp;)
+{
+    notImplemented();
+    return 0;
+}
+
+bool WebPageProxy::readSelectionFromPasteboard(const String&amp;)
+{
+    notImplemented();
+    return false;
+}
+
+void WebPageProxy::performDictionaryLookupAtLocation(const WebCore::FloatPoint&amp;)
+{
+    notImplemented();
+}
+
+void WebPageProxy::gestureCallback(const WebCore::IntPoint&amp; point, uint32_t gestureType, uint32_t gestureState, uint32_t flags, uint64_t callbackID)
+{
+    RefPtr&lt;GestureCallback&gt; callback = m_gestureCallbacks.take(callbackID);
+    if (!callback) {
+        ASSERT_NOT_REACHED();
+        return;
+    }
+    
+    callback-&gt;performCallbackWithReturnValue(point, gestureType, gestureState, flags);
+}
+
+void WebPageProxy::touchesCallback(const WebCore::IntPoint&amp; point, uint32_t touches, uint64_t callbackID)
+{
+    RefPtr&lt;TouchesCallback&gt; callback = m_touchesCallbacks.take(callbackID);
+    if (!callback) {
+        ASSERT_NOT_REACHED();
+        return;
+    }
+
+    callback-&gt;performCallbackWithReturnValue(point, touches);
+}
+
+void WebPageProxy::autocorrectionDataCallback(const Vector&lt;WebCore::FloatRect&gt;&amp; rects, const String&amp; fontName, float fontSize, uint64_t fontTraits, uint64_t callbackID)
+{
+    RefPtr&lt;AutocorrectionDataCallback&gt; callback = m_autocorrectionCallbacks.take(callbackID);
+    if (!callback) {
+        ASSERT_NOT_REACHED();
+        return;
+    }
+
+    callback-&gt;performCallbackWithReturnValue(rects, fontName, fontSize, fontTraits);
+}
+
+void WebPageProxy::selectWithGesture(const WebCore::IntPoint point, WebCore::TextGranularity granularity, uint32_t gestureType, uint32_t gestureState, PassRefPtr&lt;GestureCallback&gt; callback)
+{
+    if (!isValid()) {
+        callback-&gt;invalidate();
+        return;
+    }
+    
+    uint64_t callbackID = callback-&gt;callbackID();
+    m_gestureCallbacks.set(callbackID, callback);
+    m_process-&gt;send(Messages::WebPage::SelectWithGesture(point, (uint32_t)granularity, gestureType, gestureState, callbackID), m_pageID);
+}
+
+void WebPageProxy::updateSelectionWithTouches(const WebCore::IntPoint point, uint32_t touches, bool baseIsStart, PassRefPtr&lt;TouchesCallback&gt; callback)
+{
+    if (!isValid()) {
+        callback-&gt;invalidate();
+        return;
+    }
+
+    uint64_t callbackID = callback-&gt;callbackID();
+    m_touchesCallbacks.set(callbackID, callback);
+    m_process-&gt;send(Messages::WebPage::UpdateSelectionWithTouches(point, touches, baseIsStart, callbackID), m_pageID);
+}
+
+void WebPageProxy::requestAutocorrectionData(const String&amp; textForAutocorrection, PassRefPtr&lt;AutocorrectionDataCallback&gt; callback)
+{
+    if (!isValid()) {
+        callback-&gt;invalidate();
+        return;
+    }
+
+    uint64_t callbackID = callback-&gt;callbackID();
+    m_autocorrectionCallbacks.set(callbackID, callback);
+    m_process-&gt;send(Messages::WebPage::RequestAutocorrectionData(textForAutocorrection, callbackID), m_pageID);
+}
+
+void WebPageProxy::applyAutocorrection(const String&amp; correction, const String&amp; originalText, PassRefPtr&lt;StringCallback&gt; callback)
+{
+    if (!isValid()) {
+        callback-&gt;invalidate();
+        return;
+    }
+
+    uint64_t callbackID = callback-&gt;callbackID();
+    m_stringCallbacks.set(callbackID, callback);
+    m_process-&gt;send(Messages::WebPage::ApplyAutocorrection(correction, originalText, callbackID), m_pageID);
+}
+
+void WebPageProxy::selectWithTwoTouches(const WebCore::IntPoint from, const WebCore::IntPoint to, uint32_t gestureType, uint32_t gestureState, PassRefPtr&lt;GestureCallback&gt; callback)
+{
+    if (!isValid()) {
+        callback-&gt;invalidate();
+        return;
+    }
+
+    uint64_t callbackID = callback-&gt;callbackID();
+    m_gestureCallbacks.set(callbackID, callback);
+    m_process-&gt;send(Messages::WebPage::SelectWithTwoTouches(from, to, gestureType, gestureState, callbackID), m_pageID);
+}
+
+void WebPageProxy::extendSelection(WebCore::TextGranularity granularity)
+{
+    m_process-&gt;send(Messages::WebPage::ExtendSelection(static_cast&lt;uint32_t&gt;(granularity)), m_pageID);
+}
+
+void WebPageProxy::interpretQueuedKeyEvent(const EditorState&amp;, bool&amp;, Vector&lt;WebCore::KeypressCommand&gt;&amp;)
+{
+    notImplemented();
+}
+
+void WebPageProxy::interpretKeyEvent(const EditorState&amp; state, bool isCharEvent, bool&amp; handled)
+{
+    m_editorState = state;
+    handled = m_pageClient-&gt;interpretKeyEvent(m_keyEventQueue.first(), isCharEvent);
+}
+
+// Complex text input support for plug-ins.
+void WebPageProxy::sendComplexTextInputToPlugin(uint64_t, const String&amp;)
+{
+    notImplemented();
+}
+
+void WebPageProxy::setSmartInsertDeleteEnabled(bool)
+{
+    notImplemented();
+}
+
+void WebPageProxy::registerWebProcessAccessibilityToken(const CoreIPC::DataReference&amp;)
+{
+    notImplemented();
+}    
+
+void WebPageProxy::makeFirstResponder()
+{
+    notImplemented();
+}
+
+void WebPageProxy::registerUIProcessAccessibilityTokens(const CoreIPC::DataReference&amp;, const CoreIPC::DataReference&amp;)
+{
+    notImplemented();
+}
+
+void WebPageProxy::pluginFocusOrWindowFocusChanged(uint64_t, bool)
+{
+    notImplemented();
+}
+
+void WebPageProxy::setPluginComplexTextInputState(uint64_t, uint64_t)
+{
+    notImplemented();
+}
+
+void WebPageProxy::executeSavedCommandBySelector(const String&amp;, bool&amp;)
+{
+    notImplemented();
+}
+
+bool WebPageProxy::shouldDelayWindowOrderingForEvent(const WebKit::WebMouseEvent&amp;)
+{
+    notImplemented();
+    return false;
+}
+
+bool WebPageProxy::acceptsFirstMouse(int, const WebKit::WebMouseEvent&amp;)
+{
+    notImplemented();
+    return false;
+}
+
+void WebPageProxy::didFinishScrolling(const WebCore::FloatPoint&amp; contentOffset)
+{
+    process()-&gt;send(Messages::WebPage::DidFinishScrolling(contentOffset), m_pageID);
+}
+
+void WebPageProxy::didFinishZooming(float newScale)
+{
+    process()-&gt;send(Messages::WebPage::DidFinishZooming(newScale), m_pageID);
+}
+
+void WebPageProxy::tapHighlightAtPosition(const WebCore::FloatPoint&amp; position, uint64_t&amp; requestID)
+{
+    static uint64_t uniqueRequestID = 0;
+    requestID = ++uniqueRequestID;
+
+    process()-&gt;send(Messages::WebPage::TapHighlightAtPosition(requestID, position), m_pageID);
+}
+
+void WebPageProxy::blurAssistedNode()
+{
+    process()-&gt;send(Messages::WebPage::BlurAssistedNode(), m_pageID);
+}
+
+void WebPageProxy::mainDocumentDidReceiveMobileDocType()
+{
+    m_pageClient-&gt;mainDocumentDidReceiveMobileDocType();
+}
+
+void WebPageProxy::didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color&amp; color, const Vector&lt;WebCore::FloatQuad&gt;&amp; highlightedQuads, const WebCore::IntSize&amp; topLeftRadius, const WebCore::IntSize&amp; topRightRadius, const WebCore::IntSize&amp; bottomLeftRadius, const WebCore::IntSize&amp; bottomRightRadius)
+{
+    m_pageClient-&gt;didGetTapHighlightGeometries(requestID, color, highlightedQuads, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
+}
+
+void WebPageProxy::didChangeViewportArguments(const WebCore::ViewportArguments&amp; viewportArguments)
+{
+    m_pageClient-&gt;didChangeViewportArguments(viewportArguments);
+}
+
+void WebPageProxy::startAssistingNode(const WebCore::IntRect&amp; scrollRect, bool hasNextFocusable, bool hasPreviousFocusable)
+{
+    m_pageClient-&gt;startAssistingNode(scrollRect, hasNextFocusable, hasPreviousFocusable);
+}
+
+void WebPageProxy::stopAssistingNode()
+{
+    m_pageClient-&gt;stopAssistingNode();
+}
+
+void WebPageProxy::didPerformDictionaryLookup(const AttributedString&amp;, const DictionaryPopupInfo&amp;)
+{
+    notImplemented();
+}
+
+void WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication(const String&amp;, const String&amp;, const CoreIPC::DataReference&amp;, const String&amp;)
+{
+    notImplemented();
+}
+
+void WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplicationRaw(const String&amp;, const String&amp;, const uint8_t*, unsigned long, const String&amp;)
+{
+    notImplemented();
+}
+
+void WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication(const String&amp;)
+{
+    notImplemented();
+}
+
+void WebPageProxy::setAcceleratedCompositingRootLayer(PlatformLayer* rootLayer)
+{
+    m_pageClient-&gt;setAcceleratedCompositingRootLayer(rootLayer);
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWebProcessProxyIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/ios/WebProcessProxyIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebProcessProxyIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/ios/WebProcessProxyIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,77 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;WebProcessProxy.h&quot;
+
+#import &lt;WebCore/NotImplemented.h&gt;
+
+namespace WebKit {
+
+bool WebProcessProxy::fullKeyboardAccessEnabled()
+{
+    notImplemented();
+    return false;
+}
+
+static bool shouldUseXPC()
+{
+    if (id value = [[NSUserDefaults standardUserDefaults] objectForKey:@&quot;WebKit2UseXPCServiceForWebProcess&quot;])
+        return [value boolValue];
+
+#if USE(XPC_SERVICES)
+    return true;
+#else
+    return false;
+#endif
+}
+
+void WebProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions&amp; launchOptions)
+{
+    // We want the web process to match the architecture of the UI process.
+    launchOptions.architecture = ProcessLauncher::LaunchOptions::MatchCurrentArchitecture;
+    launchOptions.executableHeap = false;
+
+    launchOptions.useXPC = shouldUseXPC();
+}
+
+bool WebProcessProxy::pageIsProcessSuppressible(WebPageProxy* page)
+{
+    notImplemented();
+    return false;
+}
+
+bool WebProcessProxy::allPagesAreProcessSuppressible() const
+{
+    notImplemented();
+    return false;
+}
+
+void WebProcessProxy::updateProcessSuppressionState()
+{
+    notImplemented();
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacTiledCoreAnimationDrawingAreaProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #ifndef TiledCoreAnimationDrawingAreaProxy_h
</span><span class="cx"> #define TiledCoreAnimationDrawingAreaProxy_h
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
+
</ins><span class="cx"> #include &quot;DrawingAreaProxy.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -67,4 +69,6 @@
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><ins>+#endif // !PLATFORM(IOS)
+
</ins><span class="cx"> #endif // TiledCoreAnimationDrawingAreaProxy_h
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacTiledCoreAnimationDrawingAreaProxymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #import &quot;config.h&quot;
</span><span class="cx"> #import &quot;TiledCoreAnimationDrawingAreaProxy.h&quot;
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
+
</ins><span class="cx"> #import &quot;ColorSpaceData.h&quot;
</span><span class="cx"> #import &quot;DrawingAreaMessages.h&quot;
</span><span class="cx"> #import &quot;DrawingAreaProxyMessages.h&quot;
</span><span class="lines">@@ -147,3 +149,5 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span><ins>+
+#endif // !PLATFORM(IOS)
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWKFullScreenWindowControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> #import &quot;config.h&quot;
</span><span class="cx"> 
</span><del>-#if ENABLE(FULLSCREEN_API)
</del><ins>+#if ENABLE(FULLSCREEN_API) &amp;&amp; !PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx"> #import &quot;WKFullScreenWindowController.h&quot;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebContextMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -33,7 +33,9 @@
</span><span class="cx"> #import &quot;WebKitSystemInterface.h&quot;
</span><span class="cx"> #import &quot;WebProcessCreationParameters.h&quot;
</span><span class="cx"> #import &quot;WebProcessMessages.h&quot;
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> #import &lt;QuartzCore/CARemoteLayerServer.h&gt;
</span><ins>+#endif
</ins><span class="cx"> #import &lt;WebCore/Color.h&gt;
</span><span class="cx"> #import &lt;WebCore/FileSystem.h&gt;
</span><span class="cx"> #import &lt;WebCore/NotImplemented.h&gt;
</span><span class="lines">@@ -47,7 +49,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx"> 
</span><span class="cx"> #if __has_include(&lt;CFNetwork/CFURLProtocolPriv.h&gt;)
</span><span class="cx"> #include &lt;CFNetwork/CFURLProtocolPriv.h&gt;
</span><span class="lines">@@ -65,7 +67,9 @@
</span><span class="cx"> NSString *WebStorageDirectoryDefaultsKey = @&quot;WebKitLocalStorageDatabasePathPreferenceKey&quot;;
</span><span class="cx"> NSString *WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey = @&quot;WebKitKerningAndLigaturesEnabledByDefault&quot;;
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> static NSString *WebKitApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification = @&quot;NSApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification&quot;;
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> // FIXME: &lt;rdar://problem/9138817&gt; - After this &quot;backwards compatibility&quot; radar is removed, this code should be removed to only return an empty String.
</span><span class="cx"> NSString *WebIconDatabaseDirectoryDefaultsKey = @&quot;WebIconDatabaseDirectoryDefaultsKey&quot;;
</span><span class="lines">@@ -94,7 +98,7 @@
</span><span class="cx">     didRegister = true;
</span><span class="cx">     NSMutableDictionary *registrationDictionary = [NSMutableDictionary dictionary];
</span><span class="cx">     
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">     [registrationDictionary setObject:[NSNumber numberWithBool:YES] forKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey];
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -113,7 +117,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx"> static void applicationOcclusionStateChanged()
</span><span class="cx"> {
</span><span class="cx">     const Vector&lt;WebContext*&gt;&amp; contexts = WebContext::allContexts();
</span><span class="lines">@@ -175,7 +179,7 @@
</span><span class="cx"> 
</span><span class="cx"> static void registerOcclusionNotificationHandlers()
</span><span class="cx"> {
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">     for (const OcclusionNotificationHandler&amp; occlusionNotificationHandler : occlusionNotificationHandlers) {
</span><span class="cx">         bool result = WKRegisterOcclusionNotificationHandler(occlusionNotificationHandler.notificationType, occlusionNotificationHandler.handler);
</span><span class="cx">         UNUSED_PARAM(result);
</span><span class="lines">@@ -186,7 +190,7 @@
</span><span class="cx"> 
</span><span class="cx"> static void unregisterOcclusionNotificationHandlers()
</span><span class="cx"> {
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">     for (const OcclusionNotificationHandler&amp; occlusionNotificationHandler : occlusionNotificationHandlers) {
</span><span class="cx">         bool result = WKUnregisterOcclusionNotificationHandler(occlusionNotificationHandler.notificationType, occlusionNotificationHandler.handler);
</span><span class="cx">         UNUSED_PARAM(result);
</span><span class="lines">@@ -274,22 +278,28 @@
</span><span class="cx"> {
</span><span class="cx">     parameters.presenterApplicationPid = getpid();
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
</ins><span class="cx">     parameters.accessibilityEnhancedUserInterfaceEnabled = [[NSApp accessibilityAttributeValue:@&quot;AXEnhancedUserInterface&quot;] boolValue];
</span><ins>+#else
+    parameters.accessibilityEnhancedUserInterfaceEnabled = false;
+#endif
</ins><span class="cx"> 
</span><span class="cx">     NSURLCache *urlCache = [NSURLCache sharedURLCache];
</span><span class="cx">     parameters.nsURLCacheMemoryCapacity = [urlCache memoryCapacity];
</span><span class="cx">     parameters.nsURLCacheDiskCapacity = [urlCache diskCapacity];
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">     parameters.shouldForceScreenFontSubstitution = [[NSUserDefaults standardUserDefaults] boolForKey:@&quot;NSFontDefaultScreenFontSubstitutionEnabled&quot;];
</span><span class="cx"> #endif
</span><span class="cx">     parameters.shouldEnableKerningAndLigaturesByDefault = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey];
</span><span class="cx"> 
</span><span class="cx"> #if USE(ACCELERATED_COMPOSITING) &amp;&amp; HAVE(HOSTED_CORE_ANIMATION)
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     mach_port_t renderServerPort = [[CARemoteLayerServer sharedServer] serverPort];
</span><span class="cx">     if (renderServerPort != MACH_PORT_NULL)
</span><span class="cx">         parameters.acceleratedCompositingPort = CoreIPC::MachPort(renderServerPort, MACH_MSG_TYPE_COPY_SEND);
</span><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: This should really be configurable; we shouldn't just blindly allow read access to the UI process bundle.
</span><span class="cx">     parameters.uiProcessBundleResourcePath = [[NSBundle mainBundle] resourcePath];
</span><span class="lines">@@ -300,8 +310,10 @@
</span><span class="cx"> #if ENABLE(NETWORK_PROCESS)
</span><span class="cx">     if (!m_usesNetworkProcess) {
</span><span class="cx"> #endif
</span><ins>+#if ENABLE(CUSTOM_PROTOCOLS)
</ins><span class="cx">         for (NSString *scheme in [WKBrowsingContextController customSchemes])
</span><span class="cx">             parameters.urlSchemesRegisteredForCustomProtocols.append(scheme);
</span><ins>+#endif
</ins><span class="cx"> #if ENABLE(NETWORK_PROCESS)
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -558,6 +570,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebContext::registerNotificationObservers()
</span><span class="cx"> {
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     m_customSchemeRegisteredObserver = [[NSNotificationCenter defaultCenter] addObserverForName:WebKit::SchemeForCustomProtocolRegisteredNotificationName object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
</span><span class="cx">         NSString *scheme = [notification object];
</span><span class="cx">         ASSERT([scheme isKindOfClass:[NSString class]]);
</span><span class="lines">@@ -596,10 +609,12 @@
</span><span class="cx">         textCheckerStateChanged();
</span><span class="cx">     }];
</span><span class="cx"> #endif
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebContext::unregisterNotificationObservers()
</span><span class="cx"> {
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     [[NSNotificationCenter defaultCenter] removeObserver:m_customSchemeRegisteredObserver.get()];
</span><span class="cx">     [[NSNotificationCenter defaultCenter] removeObserver:m_customSchemeUnregisteredObserver.get()];
</span><span class="cx">     [[NSNotificationCenter defaultCenter] removeObserver:m_enhancedAccessibilityObserver.get()];
</span><span class="lines">@@ -610,9 +625,10 @@
</span><span class="cx">     [[NSNotificationCenter defaultCenter] removeObserver:m_automaticQuoteSubstitutionNotificationObserver.get()];
</span><span class="cx">     [[NSNotificationCenter defaultCenter] removeObserver:m_automaticDashSubstitutionNotificationObserver.get()];
</span><span class="cx"> #endif
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx"> static CFURLStorageSessionRef privateBrowsingSession()
</span><span class="cx"> {
</span><span class="cx">     static CFURLStorageSessionRef session;
</span><span class="lines">@@ -629,7 +645,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool WebContext::isURLKnownHSTSHost(const String&amp; urlString, bool privateBrowsingEnabled) const
</span><span class="cx"> {
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">     RetainPtr&lt;CFURLRef&gt; url = URL(URL(), urlString).createCFURL();
</span><span class="cx"> 
</span><span class="cx">     return _CFNetworkIsKnownHSTSHostWithSession(url.get(), privateBrowsingEnabled ? privateBrowsingSession() : nullptr);
</span><span class="lines">@@ -640,7 +656,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebContext::resetHSTSHosts()
</span><span class="cx"> {
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">     _CFNetworkResetHSTSHostsWithSession(nullptr);
</span><span class="cx">     _CFNetworkResetHSTSHostsWithSession(privateBrowsingSession());
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebFullScreenManagerProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #import &quot;config.h&quot;
</span><span class="cx"> #import &quot;WebFullScreenManagerProxy.h&quot;
</span><span class="cx"> 
</span><del>-#if ENABLE(FULLSCREEN_API)
</del><ins>+#if ENABLE(FULLSCREEN_API) &amp;&amp; !PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx"> #import &quot;LayerTreeContext.h&quot;
</span><span class="cx"> #import &quot;WKFullScreenWindowController.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2Prefixh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2Prefix.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2Prefix.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebKit2Prefix.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -32,15 +32,18 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> #define ENABLE_WEB_PROCESS_SANDBOX 1
</span><del>-
</del><span class="cx"> #define ENABLE_NETWORK_PROCESS 1
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> #define ENABLE_DATABASE_PROCESS 1
</span><span class="cx"> 
</span><span class="cx"> #define ENABLE_MEMORY_SAMPLER 1
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> #define ENABLE_CUSTOM_PROTOCOLS 1
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> #define ENABLE_SHAREABLE_RESOURCE 1
</span><span class="cx"> 
</span><span class="lines">@@ -62,6 +65,10 @@
</span><span class="cx"> #define ENABLE_SHARED_WORKER_PROCESS 1
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090) || !PLATFORM(IOS_SIMULATOR)
+#define WTF_USE_XPC_SERVICES 1
+#endif
+
</ins><span class="cx"> /* When C++ exceptions are disabled, the C++ library defines |try| and |catch|
</span><span class="cx"> * to allow C++ code that expects exceptions to build. These definitions
</span><span class="cx"> * interfere with Objective-C++ uses of Objective-C exception handlers, which
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessEntryPointmacLegacyProcessWebContentProcessMainmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -40,6 +40,11 @@
</span><span class="cx"> #import &lt;wtf/text/CString.h&gt;
</span><span class="cx"> #import &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+#import &lt;GraphicsServices/GraphicsServices.h&gt;
+#import &lt;WebCore/WebCoreThreadSystemInterface.h&gt;
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> #if USE(APPKIT)
</span><span class="cx"> @interface NSApplication (WebNSApplicationDetails)
</span><span class="cx"> -(void)_installAutoreleasePoolsOnCurrentThreadIfNecessary;
</span><span class="lines">@@ -73,6 +78,11 @@
</span><span class="cx">         // FIXME: Remove when &lt;rdar://problem/8929426&gt; is fixed.
</span><span class="cx">         [NSApp _installAutoreleasePoolsOnCurrentThreadIfNecessary];
</span><span class="cx"> #endif
</span><ins>+
+#if PLATFORM(IOS)
+        GSInitialize();
+        InitWebCoreThreadSystemInterface();
+#endif // PLATFORM(IOS)
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     virtual bool getConnectionIdentifier(CoreIPC::Connection::Identifier&amp; identifier)
</span><span class="lines">@@ -167,8 +177,12 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void startRunLoop() OVERRIDE
</span><span class="cx">     {
</span><ins>+#if USE(APPKIT)
</ins><span class="cx">         ASSERT(NSApp);
</span><span class="cx">         [NSApp run];
</span><ins>+#else
+        RunLoop::run();
+#endif
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessEntryPointmacXPCServiceWebContentServiceInfoiOSplist"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
+&lt;plist version=&quot;1.0&quot;&gt;
+&lt;dict&gt;
+        &lt;key&gt;CFBundleGetInfoString&lt;/key&gt;
+        &lt;string&gt;${BUNDLE_VERSION}, Copyright 2003-2013 Apple Inc.&lt;/string&gt;
+        &lt;key&gt;CFBundleDevelopmentRegion&lt;/key&gt;
+        &lt;string&gt;English&lt;/string&gt;
+        &lt;key&gt;CFBundleExecutable&lt;/key&gt;
+        &lt;string&gt;${EXECUTABLE_NAME}&lt;/string&gt;
+        &lt;key&gt;CFBundleIdentifier&lt;/key&gt;
+        &lt;string&gt;com.apple.WebKit.WebContent&lt;/string&gt;
+        &lt;key&gt;CFBundleInfoDictionaryVersion&lt;/key&gt;
+        &lt;string&gt;6.0&lt;/string&gt;
+        &lt;key&gt;CFBundleName&lt;/key&gt;
+        &lt;string&gt;${PRODUCT_NAME}&lt;/string&gt;
+        &lt;key&gt;CFBundlePackageType&lt;/key&gt;
+        &lt;string&gt;XPC!&lt;/string&gt;
+        &lt;key&gt;CFBundleShortVersionString&lt;/key&gt;
+        &lt;string&gt;${SHORT_VERSION_STRING}&lt;/string&gt;
+        &lt;key&gt;CFBundleSignature&lt;/key&gt;
+        &lt;string&gt;????&lt;/string&gt;
+        &lt;key&gt;CFBundleVersion&lt;/key&gt;
+        &lt;string&gt;${BUNDLE_VERSION}&lt;/string&gt;
+        &lt;key&gt;LSFileQuarantineEnabled&lt;/key&gt;
+        &lt;true/&gt;
+        &lt;key&gt;WebKitEntryPoint&lt;/key&gt;
+        &lt;string&gt;WebContentServiceInitializer&lt;/string&gt;
+        &lt;key&gt;XPCService&lt;/key&gt;
+        &lt;dict&gt;
+                &lt;key&gt;JoinExistingSession&lt;/key&gt;
+                &lt;true/&gt;
+                &lt;key&gt;ServiceType&lt;/key&gt;
+                &lt;string&gt;Application&lt;/string&gt;
+                &lt;key&gt;RunLoopType&lt;/key&gt;
+                &lt;string&gt;NSRunLoop&lt;/string&gt;
+                &lt;key&gt;_MultipleInstances&lt;/key&gt;
+                &lt;true/&gt;
+        &lt;/dict&gt;
+&lt;/dict&gt;
+&lt;/plist&gt;
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessEntryPointmacXPCServiceWebContentServiceEntryPointmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -31,6 +31,11 @@
</span><span class="cx"> #import &quot;XPCServiceEntryPoint.h&quot;
</span><span class="cx"> #import &lt;wtf/RunLoop.h&gt;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+#import &lt;GraphicsServices/GraphicsServices.h&gt;
+#import &lt;WebCore/WebCoreThreadSystemInterface.h&gt;
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> using namespace WebCore;
</span><span class="cx"> using namespace WebKit;
</span><span class="cx"> 
</span><span class="lines">@@ -42,5 +47,10 @@
</span><span class="cx">     // the this process don't try to insert the shim and crash.
</span><span class="cx">     EnvironmentUtilities::stripValuesEndingWithString(&quot;DYLD_INSERT_LIBRARIES&quot;, &quot;/WebProcessShim.dylib&quot;);
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    GSInitialize();
+    InitWebCoreThreadSystemInterface();
+#endif // PLATFORM(IOS)
+
</ins><span class="cx">     XPCServiceInitializer&lt;WebProcess, XPCServiceInitializerDelegate&gt;(connection, initializerMessage);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessGeolocationWebGeolocationManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -126,4 +126,11 @@
</span><span class="cx"> #endif // ENABLE(GEOLOCATION)
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+void WebGeolocationManager::resetPermissions()
+{
+    m_process-&gt;resetAllGeolocationPermissions();
+}
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessGeolocationWebGeolocationManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -65,6 +65,9 @@
</span><span class="cx"> 
</span><span class="cx">     void didChangePosition(const WebGeolocationPosition::Data&amp;);
</span><span class="cx">     void didFailToDeterminePosition(const String&amp; errorMessage);
</span><ins>+#if PLATFORM(IOS)
+    void resetPermissions();
+#endif // PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx">     WebProcess* m_process;
</span><span class="cx">     HashSet&lt;WebPage*&gt; m_pageSet;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessGeolocationWebGeolocationManagermessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.messages.in (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.messages.in        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.messages.in        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -23,4 +23,7 @@
</span><span class="cx"> messages -&gt; WebGeolocationManager {
</span><span class="cx">     DidChangePosition(WebKit::WebGeolocationPosition::Data position);
</span><span class="cx">     DidFailToDeterminePosition(WTF::String errorMessage);
</span><ins>+#if PLATFORM(IOS)
+    ResetPermissions();
+#endif
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -345,7 +345,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WKBundlePageSetTopOverhangImage(WKBundlePageRef pageRef, WKImageRef imageRef)
</span><span class="cx"> {
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
</ins><span class="cx">     toImpl(pageRef)-&gt;setTopOverhangImage(toImpl(imageRef));
</span><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(pageRef);
</span><span class="lines">@@ -355,7 +355,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WKBundlePageSetBottomOverhangImage(WKBundlePageRef pageRef, WKImageRef imageRef)
</span><span class="cx"> {
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
</ins><span class="cx">     toImpl(pageRef)-&gt;setBottomOverhangImage(toImpl(imageRef));
</span><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(pageRef);
</span><span class="lines">@@ -363,6 +363,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> void WKBundlePageSetHeaderBanner(WKBundlePageRef pageRef, WKBundlePageBannerRef bannerRef)
</span><span class="cx"> {
</span><span class="cx">     toImpl(pageRef)-&gt;setHeaderPageBanner(toImpl(bannerRef));
</span><span class="lines">@@ -372,6 +373,7 @@
</span><span class="cx"> {
</span><span class="cx">     toImpl(pageRef)-&gt;setFooterPageBanner(toImpl(bannerRef));
</span><span class="cx"> }
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx"> bool WKBundlePageHasLocalDataForURL(WKBundlePageRef pageRef, WKURLRef urlRef)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -447,8 +447,10 @@
</span><span class="cx"> WK_EXPORT void WKBundlePageSetTopOverhangImage(WKBundlePageRef page, WKImageRef image);
</span><span class="cx"> WK_EXPORT void WKBundlePageSetBottomOverhangImage(WKBundlePageRef page, WKImageRef image);
</span><span class="cx"> 
</span><ins>+#if !TARGET_OS_IPHONE
</ins><span class="cx"> WK_EXPORT void WKBundlePageSetHeaderBanner(WKBundlePageRef page, WKBundlePageBannerRef banner);
</span><span class="cx"> WK_EXPORT void WKBundlePageSetFooterBanner(WKBundlePageRef page, WKBundlePageBannerRef banner);
</span><ins>+#endif // !TARGET_OS_IPHONE
</ins><span class="cx"> 
</span><span class="cx"> WK_EXPORT bool WKBundlePageHasLocalDataForURL(WKBundlePageRef page, WKURLRef url);
</span><span class="cx"> WK_EXPORT bool WKBundlePageCanHandleRequest(WKURLRequestRef request);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsNetscapemacWKNPAPIPlugInContainermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -64,8 +64,12 @@
</span><span class="cx">     if (!_plugin)
</span><span class="cx">         return NO;
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     _plugin-&gt;openPluginPreferencePane();
</span><span class="cx">     return YES;
</span><ins>+#else
+    return NO;
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPDFSimplePDFPluginh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -1,227 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011, 2012 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.
- */
-
-#ifndef SimplePDFPlugin_h
-#define SimplePDFPlugin_h
-
-#include &quot;Plugin.h&quot;
-#include &lt;WebCore/ScrollableArea.h&gt;
-#include &lt;wtf/RetainPtr.h&gt;
-
-typedef const struct OpaqueJSContext* JSContextRef;
-typedef struct OpaqueJSValue* JSObjectRef;
-typedef const struct OpaqueJSValue* JSValueRef;
-
-OBJC_CLASS NSData;
-
-namespace WebCore {
-struct PluginInfo;
-}
-
-namespace WebKit {
-
-class PluginView;
-class WebFrame;
-
-class SimplePDFPlugin : public Plugin, protected WebCore::ScrollableArea {
-public:
-    static PassRefPtr&lt;SimplePDFPlugin&gt; create(WebFrame*);
-    ~SimplePDFPlugin();
-
-    static WebCore::PluginInfo pluginInfo();
-
-    // In-process PDFViews don't support asynchronous initialization.
-    virtual bool isBeingAsynchronouslyInitialized() const { return false; }
-
-    void didMutatePDFDocument() { m_pdfDocumentWasMutated = true; }
-    
-    WebCore::IntSize size() const { return m_size; }
-
-protected:
-    explicit SimplePDFPlugin(WebFrame*);
-
-    WebFrame* webFrame() const { return m_frame; }
-
-    void setSize(WebCore::IntSize size) { m_size = size; }
-
-    RetainPtr&lt;PDFDocument&gt; pdfDocument() const { return m_pdfDocument; }
-    void setPDFDocument(RetainPtr&lt;PDFDocument&gt; document) { m_pdfDocument = document; }
-
-    WebCore::IntSize pdfDocumentSize() const { return m_pdfDocumentSize; }
-    void setPDFDocumentSize(WebCore::IntSize size) { m_pdfDocumentSize = size; }
-
-    const String&amp; suggestedFilename() { return m_suggestedFilename; }
-    
-    virtual NSData *liveData() const;
-    NSData *rawData() const { return (NSData *)m_data.get(); }
-
-    bool pdfDocumentWasMutated() const { return m_pdfDocumentWasMutated; }
-
-    // Regular plug-ins don't need access to view, but we add scrollbars to embedding FrameView for proper event handling.
-    PluginView* pluginView();
-    const PluginView* pluginView() const;
-
-    virtual void updateScrollbars();
-    virtual PassRefPtr&lt;WebCore::Scrollbar&gt; createScrollbar(WebCore::ScrollbarOrientation);
-    virtual void destroyScrollbar(WebCore::ScrollbarOrientation);
-    virtual void addArchiveResource();
-    virtual void pdfDocumentDidLoad();
-    virtual void computePageBoxes();
-    virtual void calculateSizes();
-    void paintBackground(WebCore::GraphicsContext*, const WebCore::IntRect&amp; dirtyRect);
-    void paintContent(WebCore::GraphicsContext*, const WebCore::IntRect&amp; dirtyRect);
-    void paintControls(WebCore::GraphicsContext*, const WebCore::IntRect&amp; dirtyRect);
-    
-    void runScriptsInPDFDocument();
-
-    // Plug-in methods
-    virtual bool initialize(const Parameters&amp;);
-    virtual void destroy();
-    virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect&amp; dirtyRectInWindowCoordinates);
-    virtual void updateControlTints(WebCore::GraphicsContext*);
-    virtual bool supportsSnapshotting() const { return false; }
-    virtual PassRefPtr&lt;ShareableBitmap&gt; snapshot();
-#if PLATFORM(MAC)
-    virtual PlatformLayer* pluginLayer();
-#endif
-    virtual bool isTransparent();
-    virtual bool wantsWheelEvents() OVERRIDE;
-    virtual void geometryDidChange(const WebCore::IntSize&amp; pluginSize, const WebCore::IntRect&amp; clipRect, const WebCore::AffineTransform&amp; pluginToRootViewTransform);
-    virtual void visibilityDidChange();
-    virtual void frameDidFinishLoading(uint64_t requestID);
-    virtual void frameDidFail(uint64_t requestID, bool wasCancelled);
-    virtual void didEvaluateJavaScript(uint64_t requestID, const String&amp; result);
-    virtual void streamDidReceiveResponse(uint64_t streamID, const WebCore::URL&amp; responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const String&amp; mimeType, const String&amp; headers, const String&amp; suggestedFileName);
-    virtual void streamDidReceiveData(uint64_t streamID, const char* bytes, int length);
-    virtual void streamDidFinishLoading(uint64_t streamID);
-    virtual void streamDidFail(uint64_t streamID, bool wasCancelled);
-    virtual void manualStreamDidReceiveResponse(const WebCore::URL&amp; responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const WTF::String&amp; mimeType, const WTF::String&amp; headers, const String&amp; suggestedFileName);
-    virtual void manualStreamDidReceiveData(const char* bytes, int length);
-    virtual void manualStreamDidFinishLoading();
-    virtual void manualStreamDidFail(bool wasCancelled);
-    virtual bool handleMouseEvent(const WebMouseEvent&amp;);
-    virtual bool handleWheelEvent(const WebWheelEvent&amp;);
-    virtual bool handleMouseEnterEvent(const WebMouseEvent&amp;);
-    virtual bool handleMouseLeaveEvent(const WebMouseEvent&amp;);
-    virtual bool handleContextMenuEvent(const WebMouseEvent&amp;);
-    virtual bool handleKeyboardEvent(const WebKeyboardEvent&amp;);
-    virtual void setFocus(bool);
-    virtual NPObject* pluginScriptableNPObject();
-#if PLATFORM(MAC)
-    virtual void windowFocusChanged(bool);
-    virtual void windowAndViewFramesChanged(const WebCore::IntRect&amp; windowFrameInScreenCoordinates, const WebCore::IntRect&amp; viewFrameInWindowCoordinates);
-    virtual void windowVisibilityChanged(bool);
-    virtual void contentsScaleFactorChanged(float);
-    virtual uint64_t pluginComplexTextInputIdentifier() const;
-    virtual void sendComplexTextInput(const String&amp; textInput);
-    virtual void setLayerHostingMode(LayerHostingMode) OVERRIDE;
-#endif
-
-    virtual void storageBlockingStateChanged(bool);
-    virtual void privateBrowsingStateChanged(bool);
-    virtual bool getFormValue(String&amp; formValue);
-    virtual bool handleScroll(WebCore::ScrollDirection, WebCore::ScrollGranularity);
-    virtual WebCore::Scrollbar* horizontalScrollbar();
-    virtual WebCore::Scrollbar* verticalScrollbar();
-
-    virtual RetainPtr&lt;PDFDocument&gt; pdfDocumentForPrinting() const OVERRIDE { return m_pdfDocument; }
-
-    // ScrollableArea methods.
-    virtual WebCore::IntRect scrollCornerRect() const OVERRIDE;
-    virtual WebCore::ScrollableArea* enclosingScrollableArea() const OVERRIDE;
-    virtual WebCore::IntRect scrollableAreaBoundingBox() const OVERRIDE;
-    virtual void setScrollOffset(const WebCore::IntPoint&amp;) OVERRIDE;
-    virtual int scrollSize(WebCore::ScrollbarOrientation) const OVERRIDE;
-    virtual bool isActive() const OVERRIDE;
-    virtual void invalidateScrollbarRect(WebCore::Scrollbar*, const WebCore::IntRect&amp;) OVERRIDE;
-    virtual void invalidateScrollCornerRect(const WebCore::IntRect&amp;) OVERRIDE;
-    virtual bool isScrollCornerVisible() const OVERRIDE;
-    virtual int scrollPosition(WebCore::Scrollbar*) const OVERRIDE;
-    virtual WebCore::IntPoint scrollPosition() const OVERRIDE;
-    virtual WebCore::IntPoint minimumScrollPosition() const OVERRIDE;
-    virtual WebCore::IntPoint maximumScrollPosition() const OVERRIDE;
-    virtual int visibleHeight() const OVERRIDE;
-    virtual int visibleWidth() const OVERRIDE;
-    virtual WebCore::IntSize contentsSize() const OVERRIDE;
-    virtual WebCore::Scrollbar* horizontalScrollbar() const OVERRIDE { return m_horizontalScrollbar.get(); }
-    virtual WebCore::Scrollbar* verticalScrollbar() const OVERRIDE { return m_verticalScrollbar.get(); }
-    virtual bool scrollbarsCanBeActive() const OVERRIDE;
-    virtual bool shouldSuspendScrollAnimations() const OVERRIDE { return false; } // If we return true, ScrollAnimatorMac will keep cycling a timer forever, waiting for a good time to animate.
-    virtual void scrollbarStyleChanged(int newStyle, bool forceUpdate) OVERRIDE;
-    
-    virtual WebCore::IntRect convertFromScrollbarToContainingView(const WebCore::Scrollbar*, const WebCore::IntRect&amp; scrollbarRect) const OVERRIDE;
-    virtual WebCore::IntRect convertFromContainingViewToScrollbar(const WebCore::Scrollbar*, const WebCore::IntRect&amp; parentRect) const OVERRIDE;
-    virtual WebCore::IntPoint convertFromScrollbarToContainingView(const WebCore::Scrollbar*, const WebCore::IntPoint&amp; scrollbarPoint) const OVERRIDE;
-    virtual WebCore::IntPoint convertFromContainingViewToScrollbar(const WebCore::Scrollbar*, const WebCore::IntPoint&amp; parentPoint) const OVERRIDE;
-    
-    virtual bool isEditingCommandEnabled(const String&amp;) OVERRIDE;
-    virtual bool handleEditingCommand(const String&amp;, const String&amp;) OVERRIDE;
-    virtual bool handlesPageScaleFactor() OVERRIDE;
-
-    virtual bool shouldAllowScripting() OVERRIDE { return false; }
-    virtual bool shouldAllowNavigationFromDrags() { return true; }
-
-    virtual unsigned countFindMatches(const String&amp;, WebCore::FindOptions, unsigned) OVERRIDE { return 0; }
-    virtual bool findString(const String&amp;, WebCore::FindOptions, unsigned) OVERRIDE { return false; }
-
-    virtual PassRefPtr&lt;WebCore::SharedBuffer&gt; liveResourceData() const OVERRIDE;
-    virtual bool performDictionaryLookupAtLocation(const WebCore::FloatPoint&amp;) OVERRIDE { return false; }
-
-    virtual String getSelectionString() const OVERRIDE { return String(); }
-
-    WebCore::IntSize m_scrollOffset;
-
-private:
-
-    JSObjectRef makeJSPDFDoc(JSContextRef);
-    static JSValueRef jsPDFDocPrint(JSContextRef, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
-
-    void convertPostScriptDataIfNeeded();
-
-    virtual bool shouldAlwaysAutoStart() const OVERRIDE { return true; }
-
-    WebCore::IntSize m_size;
-
-    WebCore::URL m_sourceURL;
-
-    String m_suggestedFilename;
-    RetainPtr&lt;CFMutableDataRef&gt; m_data;
-
-    RetainPtr&lt;PDFDocument&gt; m_pdfDocument;
-    Vector&lt;WebCore::IntRect&gt; m_pageBoxes;
-    WebCore::IntSize m_pdfDocumentSize; // All pages, including gaps.
-
-    RefPtr&lt;WebCore::Scrollbar&gt; m_horizontalScrollbar;
-    RefPtr&lt;WebCore::Scrollbar&gt; m_verticalScrollbar;
-
-    WebFrame* m_frame;
-
-    bool m_isPostScript;
-    bool m_pdfDocumentWasMutated;
-};
-
-} // namespace WebKit
-
-#endif // SimplePDFPlugin_h
</del></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPDFSimplePDFPluginmm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -1,1002 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009, 2011, 2012 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 &quot;config.h&quot;
-#import &quot;SimplePDFPlugin.h&quot;
-
-#import &quot;PDFKitImports.h&quot;
-#import &quot;PluginView.h&quot;
-#import &quot;ShareableBitmap.h&quot;
-#import &quot;WebEvent.h&quot;
-#import &quot;WebEventConversion.h&quot;
-#import &lt;JavaScriptCore/JSContextRef.h&gt;
-#import &lt;JavaScriptCore/JSObjectRef.h&gt;
-#import &lt;JavaScriptCore/JSStringRef.h&gt;
-#import &lt;JavaScriptCore/JSStringRefCF.h&gt;
-#import &lt;PDFKit/PDFKit.h&gt;
-#import &lt;WebCore/ArchiveResource.h&gt;
-#import &lt;WebCore/Chrome.h&gt;
-#import &lt;WebCore/DocumentLoader.h&gt;
-#import &lt;WebCore/FocusController.h&gt;
-#import &lt;WebCore/Frame.h&gt;
-#import &lt;WebCore/FrameView.h&gt;
-#import &lt;WebCore/GraphicsContext.h&gt;
-#import &lt;WebCore/HTTPHeaderMap.h&gt;
-#import &lt;WebCore/LocalizedStrings.h&gt;
-#import &lt;WebCore/Page.h&gt;
-#import &lt;WebCore/PluginData.h&gt;
-#import &lt;WebCore/RenderBoxModelObject.h&gt;
-#import &lt;WebCore/ScrollAnimator.h&gt;
-#import &lt;WebCore/ScrollbarTheme.h&gt;
-
-using namespace WebCore;
-
-static const char* postScriptMIMEType = &quot;application/postscript&quot;;
-
-static void appendValuesInPDFNameSubtreeToVector(CGPDFDictionaryRef subtree, Vector&lt;CGPDFObjectRef&gt;&amp; values)
-{
-    CGPDFArrayRef names;
-    if (CGPDFDictionaryGetArray(subtree, &quot;Names&quot;, &amp;names)) {
-        size_t nameCount = CGPDFArrayGetCount(names) / 2;
-        for (size_t i = 0; i &lt; nameCount; ++i) {
-            CGPDFObjectRef object;
-            CGPDFArrayGetObject(names, 2 * i + 1, &amp;object);
-            values.append(object);
-        }
-        return;
-    }
-
-    CGPDFArrayRef kids;
-    if (!CGPDFDictionaryGetArray(subtree, &quot;Kids&quot;, &amp;kids))
-        return;
-
-    size_t kidCount = CGPDFArrayGetCount(kids);
-    for (size_t i = 0; i &lt; kidCount; ++i) {
-        CGPDFDictionaryRef kid;
-        if (!CGPDFArrayGetDictionary(kids, i, &amp;kid))
-            continue;
-        appendValuesInPDFNameSubtreeToVector(kid, values);
-    }
-}
-
-static void getAllValuesInPDFNameTree(CGPDFDictionaryRef tree, Vector&lt;CGPDFObjectRef&gt;&amp; allValues)
-{
-    appendValuesInPDFNameSubtreeToVector(tree, allValues);
-}
-
-static void getAllScriptsInPDFDocument(CGPDFDocumentRef pdfDocument, Vector&lt;RetainPtr&lt;CFStringRef&gt;&gt;&amp; scripts)
-{
-    if (!pdfDocument)
-        return;
-
-    CGPDFDictionaryRef pdfCatalog = CGPDFDocumentGetCatalog(pdfDocument);
-    if (!pdfCatalog)
-        return;
-
-    // Get the dictionary of all document-level name trees.
-    CGPDFDictionaryRef namesDictionary;
-    if (!CGPDFDictionaryGetDictionary(pdfCatalog, &quot;Names&quot;, &amp;namesDictionary))
-        return;
-
-    // Get the document-level &quot;JavaScript&quot; name tree.
-    CGPDFDictionaryRef javaScriptNameTree;
-    if (!CGPDFDictionaryGetDictionary(namesDictionary, &quot;JavaScript&quot;, &amp;javaScriptNameTree))
-        return;
-
-    // The names are arbitrary. We are only interested in the values.
-    Vector&lt;CGPDFObjectRef&gt; objects;
-    getAllValuesInPDFNameTree(javaScriptNameTree, objects);
-    size_t objectCount = objects.size();
-
-    for (size_t i = 0; i &lt; objectCount; ++i) {
-        CGPDFDictionaryRef javaScriptAction;
-        if (!CGPDFObjectGetValue(reinterpret_cast&lt;CGPDFObjectRef&gt;(objects[i]), kCGPDFObjectTypeDictionary, &amp;javaScriptAction))
-            continue;
-
-        // A JavaScript action must have an action type of &quot;JavaScript&quot;.
-        const char* actionType;
-        if (!CGPDFDictionaryGetName(javaScriptAction, &quot;S&quot;, &amp;actionType) || strcmp(actionType, &quot;JavaScript&quot;))
-            continue;
-
-        const UInt8* bytes = 0;
-        CFIndex length;
-        CGPDFStreamRef stream;
-        CGPDFStringRef string;
-        RetainPtr&lt;CFDataRef&gt; data;
-        if (CGPDFDictionaryGetStream(javaScriptAction, &quot;JS&quot;, &amp;stream)) {
-            CGPDFDataFormat format;
-            data = adoptCF(CGPDFStreamCopyData(stream, &amp;format));
-            if (!data)
-                continue;
-            bytes = CFDataGetBytePtr(data.get());
-            length = CFDataGetLength(data.get());
-        } else if (CGPDFDictionaryGetString(javaScriptAction, &quot;JS&quot;, &amp;string)) {
-            bytes = CGPDFStringGetBytePtr(string);
-            length = CGPDFStringGetLength(string);
-        }
-        if (!bytes)
-            continue;
-
-        CFStringEncoding encoding = (length &gt; 1 &amp;&amp; bytes[0] == 0xFE &amp;&amp; bytes[1] == 0xFF) ? kCFStringEncodingUnicode : kCFStringEncodingUTF8;
-        RetainPtr&lt;CFStringRef&gt; script = adoptCF(CFStringCreateWithBytes(kCFAllocatorDefault, bytes, length, encoding, true));
-        if (!script)
-            continue;
-
-        scripts.append(script);
-    }
-}
-
-namespace WebKit {
-
-const uint64_t pdfDocumentRequestID = 1; // PluginController supports loading multiple streams, but we only need one for PDF.
-
-const int gutterHeight = 10;
-const int shadowOffsetX = 0;
-const int shadowOffsetY = -2;
-const int shadowSize = 7;
-
-PassRefPtr&lt;SimplePDFPlugin&gt; SimplePDFPlugin::create(WebFrame* frame)
-{
-    return adoptRef(new SimplePDFPlugin(frame));
-}
-
-SimplePDFPlugin::SimplePDFPlugin(WebFrame* frame)
-    : m_frame(frame)
-    , m_isPostScript(false)
-    , m_pdfDocumentWasMutated(false)
-{
-}
-
-SimplePDFPlugin::~SimplePDFPlugin()
-{
-}
-
-PluginInfo SimplePDFPlugin::pluginInfo()
-{
-    PluginInfo info;
-    info.name = builtInPDFPluginName();
-    info.isApplicationPlugin = true;
-
-    MimeClassInfo pdfMimeClassInfo;
-    pdfMimeClassInfo.type = &quot;application/pdf&quot;;
-    pdfMimeClassInfo.desc = pdfDocumentTypeDescription();
-    pdfMimeClassInfo.extensions.append(&quot;pdf&quot;);
-    info.mimes.append(pdfMimeClassInfo);
-    
-    MimeClassInfo textPDFMimeClassInfo;
-    textPDFMimeClassInfo.type = &quot;text/pdf&quot;;
-    textPDFMimeClassInfo.desc = pdfDocumentTypeDescription();
-    textPDFMimeClassInfo.extensions.append(&quot;pdf&quot;);
-    info.mimes.append(textPDFMimeClassInfo);
-
-    MimeClassInfo postScriptMimeClassInfo;
-    postScriptMimeClassInfo.type = postScriptMIMEType;
-    postScriptMimeClassInfo.desc = postScriptDocumentTypeDescription();
-    postScriptMimeClassInfo.extensions.append(&quot;ps&quot;);
-    info.mimes.append(postScriptMimeClassInfo);
-
-    return info;
-}
-
-PluginView* SimplePDFPlugin::pluginView()
-{
-    return static_cast&lt;PluginView*&gt;(controller());
-}
-
-const PluginView* SimplePDFPlugin::pluginView() const
-{
-    return static_cast&lt;const PluginView*&gt;(controller());
-}
-
-void SimplePDFPlugin::updateScrollbars()
-{
-    bool hadScrollbars = m_horizontalScrollbar || m_verticalScrollbar;
-
-    if (m_horizontalScrollbar) {
-        if (m_size.width() &gt;= m_pdfDocumentSize.width())
-            destroyScrollbar(HorizontalScrollbar);
-    } else if (m_size.width() &lt; m_pdfDocumentSize.width())
-        m_horizontalScrollbar = createScrollbar(HorizontalScrollbar);
-
-    if (m_verticalScrollbar) {
-        if (m_size.height() &gt;= m_pdfDocumentSize.height())
-            destroyScrollbar(VerticalScrollbar);
-    } else if (m_size.height() &lt; m_pdfDocumentSize.height())
-        m_verticalScrollbar = createScrollbar(VerticalScrollbar);
-
-    int horizontalScrollbarHeight = (m_horizontalScrollbar &amp;&amp; !m_horizontalScrollbar-&gt;isOverlayScrollbar()) ? m_horizontalScrollbar-&gt;height() : 0;
-    int verticalScrollbarWidth = (m_verticalScrollbar &amp;&amp; !m_verticalScrollbar-&gt;isOverlayScrollbar()) ? m_verticalScrollbar-&gt;width() : 0;
-
-    int pageStep = m_pageBoxes.isEmpty() ? 0 : m_pageBoxes[0].height();
-
-    if (m_horizontalScrollbar) {
-        m_horizontalScrollbar-&gt;setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
-        m_horizontalScrollbar-&gt;setProportion(m_size.width() - verticalScrollbarWidth, m_pdfDocumentSize.width());
-        IntRect scrollbarRect(pluginView()-&gt;x(), pluginView()-&gt;y() + m_size.height() - m_horizontalScrollbar-&gt;height(), m_size.width(), m_horizontalScrollbar-&gt;height());
-        if (m_verticalScrollbar)
-            scrollbarRect.contract(m_verticalScrollbar-&gt;width(), 0);
-        m_horizontalScrollbar-&gt;setFrameRect(scrollbarRect);
-    }
-    if (m_verticalScrollbar) {
-        m_verticalScrollbar-&gt;setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
-        m_verticalScrollbar-&gt;setProportion(m_size.height() - horizontalScrollbarHeight, m_pdfDocumentSize.height());
-        IntRect scrollbarRect(IntRect(pluginView()-&gt;x() + m_size.width() - m_verticalScrollbar-&gt;width(), pluginView()-&gt;y(), m_verticalScrollbar-&gt;width(), m_size.height()));
-        if (m_horizontalScrollbar)
-            scrollbarRect.contract(0, m_horizontalScrollbar-&gt;height());
-        m_verticalScrollbar-&gt;setFrameRect(scrollbarRect);
-    }
-    
-    FrameView* frameView = m_frame-&gt;coreFrame()-&gt;view();
-    if (!frameView)
-        return;
-
-    bool hasScrollbars = m_horizontalScrollbar || m_verticalScrollbar;
-    if (hadScrollbars != hasScrollbars) {
-        if (hasScrollbars)
-            frameView-&gt;addScrollableArea(this);
-        else
-            frameView-&gt;removeScrollableArea(this);
-
-        frameView-&gt;setNeedsLayout();
-    }
-}
-
-PassRefPtr&lt;Scrollbar&gt; SimplePDFPlugin::createScrollbar(ScrollbarOrientation orientation)
-{
-    RefPtr&lt;Scrollbar&gt; widget = Scrollbar::createNativeScrollbar(this, orientation, RegularScrollbar);
-    didAddScrollbar(widget.get(), orientation);
-    pluginView()-&gt;frame()-&gt;view()-&gt;addChild(widget.get());
-    return widget.release();
-}
-
-void SimplePDFPlugin::destroyScrollbar(ScrollbarOrientation orientation)
-{
-    RefPtr&lt;Scrollbar&gt;&amp; scrollbar = orientation == HorizontalScrollbar ? m_horizontalScrollbar : m_verticalScrollbar;
-    if (!scrollbar)
-        return;
-
-    willRemoveScrollbar(scrollbar.get(), orientation);
-    scrollbar-&gt;removeFromParent();
-    scrollbar-&gt;disconnectFromScrollableArea();
-    scrollbar = 0;
-}
-
-void SimplePDFPlugin::addArchiveResource()
-{
-    // FIXME: It's a hack to force add a resource to DocumentLoader. PDF documents should just be fetched as CachedResources.
-
-    // Add just enough data for context menu handling and web archives to work.
-    ResourceResponse synthesizedResponse;
-    synthesizedResponse.setSuggestedFilename(m_suggestedFilename);
-    synthesizedResponse.setURL(m_sourceURL); // Needs to match the HitTestResult::absolutePDFURL.
-    synthesizedResponse.setMimeType(&quot;application/pdf&quot;);
-
-    RefPtr&lt;ArchiveResource&gt; resource = ArchiveResource::create(SharedBuffer::wrapCFData(m_data.get()), m_sourceURL, &quot;application/pdf&quot;, String(), String(), synthesizedResponse);
-    pluginView()-&gt;frame()-&gt;document()-&gt;loader()-&gt;addArchiveResource(resource.release());
-}
-
-static void jsPDFDocInitialize(JSContextRef ctx, JSObjectRef object)
-{
-    SimplePDFPlugin* pdfView = static_cast&lt;SimplePDFPlugin*&gt;(JSObjectGetPrivate(object));
-    pdfView-&gt;ref();
-}
-
-static void jsPDFDocFinalize(JSObjectRef object)
-{
-    SimplePDFPlugin* pdfView = static_cast&lt;SimplePDFPlugin*&gt;(JSObjectGetPrivate(object));
-    pdfView-&gt;deref();
-}
-
-JSValueRef SimplePDFPlugin::jsPDFDocPrint(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    SimplePDFPlugin* pdfView = static_cast&lt;SimplePDFPlugin*&gt;(JSObjectGetPrivate(thisObject));
-    
-    WebFrame* frame = pdfView-&gt;m_frame;
-    if (!frame)
-        return JSValueMakeUndefined(ctx);
-    
-    Frame* coreFrame = frame-&gt;coreFrame();
-    if (!coreFrame)
-        return JSValueMakeUndefined(ctx);
-    
-    Page* page = coreFrame-&gt;page();
-    if (!page)
-        return JSValueMakeUndefined(ctx);
-    
-    page-&gt;chrome().print(coreFrame);
-    
-    return JSValueMakeUndefined(ctx);
-}
-
-JSObjectRef SimplePDFPlugin::makeJSPDFDoc(JSContextRef ctx)
-{
-    static JSStaticFunction jsPDFDocStaticFunctions[] = {
-        { &quot;print&quot;, jsPDFDocPrint, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { 0, 0, 0 },
-    };
-    
-    static JSClassDefinition jsPDFDocClassDefinition = {
-        0,
-        kJSClassAttributeNone,
-        &quot;Doc&quot;,
-        0,
-        0,
-        jsPDFDocStaticFunctions,
-        jsPDFDocInitialize, jsPDFDocFinalize, 0, 0, 0, 0, 0, 0, 0, 0, 0
-    };
-    
-    static JSClassRef jsPDFDocClass = JSClassCreate(&amp;jsPDFDocClassDefinition);
-    
-    return JSObjectMake(ctx, jsPDFDocClass, this);
-}
-
-static RetainPtr&lt;CFMutableDataRef&gt; convertPostScriptDataToPDF(RetainPtr&lt;CFDataRef&gt; postScriptData)
-{
-    // Convert PostScript to PDF using the Quartz 2D API.
-    // http://developer.apple.com/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_ps_convert/chapter_16_section_1.html
-
-    CGPSConverterCallbacks callbacks = { 0, 0, 0, 0, 0, 0, 0, 0 };
-    RetainPtr&lt;CGPSConverterRef&gt; converter = adoptCF(CGPSConverterCreate(0, &amp;callbacks, 0));
-    RetainPtr&lt;CGDataProviderRef&gt; provider = adoptCF(CGDataProviderCreateWithCFData(postScriptData.get()));
-    RetainPtr&lt;CFMutableDataRef&gt; pdfData = adoptCF(CFDataCreateMutable(kCFAllocatorDefault, 0));
-    RetainPtr&lt;CGDataConsumerRef&gt; consumer = adoptCF(CGDataConsumerCreateWithCFData(pdfData.get()));
-
-    CGPSConverterConvert(converter.get(), provider.get(), consumer.get(), 0);
-
-    return pdfData;
-}
-
-void SimplePDFPlugin::pdfDocumentDidLoad()
-{
-    addArchiveResource();
-
-    m_pdfDocument = adoptNS([[pdfDocumentClass() alloc] initWithData:(NSData *)m_data.get()]);
-
-    calculateSizes();
-    updateScrollbars();
-
-    controller()-&gt;invalidate(IntRect(0, 0, m_size.width(), m_size.height()));
-
-    runScriptsInPDFDocument();
-}
-    
-void SimplePDFPlugin::runScriptsInPDFDocument()
-{
-    Vector&lt;RetainPtr&lt;CFStringRef&gt;&gt; scripts;
-    getAllScriptsInPDFDocument([m_pdfDocument.get() documentRef], scripts);
-
-    size_t scriptCount = scripts.size();
-    if (!scriptCount)
-        return;
-
-    JSGlobalContextRef ctx = JSGlobalContextCreate(0);
-    JSObjectRef jsPDFDoc = makeJSPDFDoc(ctx);
-
-    for (size_t i = 0; i &lt; scriptCount; ++i) {
-        JSStringRef script = JSStringCreateWithCFString(scripts[i].get());
-        JSEvaluateScript(ctx, script, jsPDFDoc, 0, 0, 0);
-        JSStringRelease(script);
-    }
-
-    JSGlobalContextRelease(ctx);
-}
-    
-void SimplePDFPlugin::computePageBoxes()
-{
-    size_t pageCount = CGPDFDocumentGetNumberOfPages([m_pdfDocument.get() documentRef]);
-    for (size_t i = 0; i &lt; pageCount; ++i) {
-        CGPDFPageRef pdfPage = CGPDFDocumentGetPage([m_pdfDocument.get() documentRef], i + 1);
-        ASSERT(pdfPage);
-        
-        CGRect box = CGPDFPageGetBoxRect(pdfPage, kCGPDFCropBox);
-        if (CGRectIsEmpty(box))
-            box = CGPDFPageGetBoxRect(pdfPage, kCGPDFMediaBox);
-        m_pageBoxes.append(IntRect(box));
-    }
-}
-
-void SimplePDFPlugin::calculateSizes()
-{
-    size_t pageCount = CGPDFDocumentGetNumberOfPages([m_pdfDocument.get() documentRef]);
-    for (size_t i = 0; i &lt; pageCount; ++i) {
-        CGPDFPageRef pdfPage = CGPDFDocumentGetPage([m_pdfDocument.get() documentRef], i + 1);
-        ASSERT(pdfPage);
-
-        CGRect box = CGPDFPageGetBoxRect(pdfPage, kCGPDFCropBox);
-        if (CGRectIsEmpty(box))
-            box = CGPDFPageGetBoxRect(pdfPage, kCGPDFMediaBox);
-        m_pageBoxes.append(IntRect(box));
-        m_pdfDocumentSize.setWidth(max(m_pdfDocumentSize.width(), static_cast&lt;int&gt;(box.size.width)));
-        m_pdfDocumentSize.expand(0, box.size.height);
-    }
-    m_pdfDocumentSize.expand(0, gutterHeight * (m_pageBoxes.size() - 1));
-}
-
-bool SimplePDFPlugin::initialize(const Parameters&amp; parameters)
-{
-    // Load the src URL if needed.
-    m_sourceURL = parameters.url;
-    if (!parameters.shouldUseManualLoader &amp;&amp; !parameters.url.isEmpty())
-        controller()-&gt;loadURL(pdfDocumentRequestID, &quot;GET&quot;, parameters.url.string(), String(), HTTPHeaderMap(), Vector&lt;uint8_t&gt;(), false);
-
-    controller()-&gt;didInitializePlugin();
-    return true;
-}
-
-void SimplePDFPlugin::destroy()
-{
-    if (m_frame) {
-        if (FrameView* frameView = m_frame-&gt;coreFrame()-&gt;view())
-            frameView-&gt;removeScrollableArea(this);
-    }
-
-    destroyScrollbar(HorizontalScrollbar);
-    destroyScrollbar(VerticalScrollbar);
-}
-
-void SimplePDFPlugin::paint(GraphicsContext* graphicsContext, const IntRect&amp; dirtyRect)
-{
-    contentAreaWillPaint();
-
-    paintBackground(graphicsContext, dirtyRect);
-
-    if (!m_pdfDocument) // FIXME: Draw loading progress.
-        return;
-
-    paintContent(graphicsContext, dirtyRect);
-    paintControls(graphicsContext, dirtyRect);
-}
-
-void SimplePDFPlugin::paintBackground(GraphicsContext* graphicsContext, const IntRect&amp; dirtyRect)
-{
-    GraphicsContextStateSaver stateSaver(*graphicsContext);
-    graphicsContext-&gt;setFillColor(Color::gray, ColorSpaceDeviceRGB);
-    graphicsContext-&gt;fillRect(dirtyRect);
-}
-
-void SimplePDFPlugin::paintContent(GraphicsContext* graphicsContext, const IntRect&amp; dirtyRect)
-{
-    GraphicsContextStateSaver stateSaver(*graphicsContext);
-    CGContextRef context = graphicsContext-&gt;platformContext();
-
-    graphicsContext-&gt;setImageInterpolationQuality(InterpolationHigh);
-    graphicsContext-&gt;setShouldAntialias(true);
-    graphicsContext-&gt;setShouldSmoothFonts(true);
-    graphicsContext-&gt;setFillColor(Color::white, ColorSpaceDeviceRGB);
-
-    graphicsContext-&gt;clip(dirtyRect);
-    IntRect contentRect(dirtyRect);
-    contentRect.moveBy(IntPoint(m_scrollOffset));
-    graphicsContext-&gt;translate(-m_scrollOffset.width(), -m_scrollOffset.height());
-
-    CGContextScaleCTM(context, 1, -1);
-
-    int pageTop = 0;
-    for (size_t i = 0; i &lt; m_pageBoxes.size(); ++i) {
-        IntRect pageBox = m_pageBoxes[i];
-        float extraOffsetForCenteringX = max(roundf((m_size.width() - pageBox.width()) / 2.0f), 0.0f);
-        float extraOffsetForCenteringY = (m_pageBoxes.size() == 1) ? max(roundf((m_size.height() - pageBox.height() + shadowOffsetY) / 2.0f), 0.0f) : 0;
-
-        if (pageTop &gt; contentRect.maxY())
-            break;
-        if (pageTop + pageBox.height() + extraOffsetForCenteringY + gutterHeight &gt;= contentRect.y()) {
-            CGPDFPageRef pdfPage = CGPDFDocumentGetPage([m_pdfDocument.get() documentRef], i + 1);
-
-            graphicsContext-&gt;save();
-            graphicsContext-&gt;translate(extraOffsetForCenteringX - pageBox.x(), -extraOffsetForCenteringY - pageBox.y() - pageBox.height());
-
-            graphicsContext-&gt;setShadow(FloatSize(shadowOffsetX, shadowOffsetY), shadowSize, Color::black, ColorSpaceDeviceRGB);
-            graphicsContext-&gt;fillRect(pageBox);
-            graphicsContext-&gt;clearShadow();
-
-            graphicsContext-&gt;clip(pageBox);
-
-            CGContextDrawPDFPage(context, pdfPage);
-            graphicsContext-&gt;restore();
-        }
-        pageTop += pageBox.height() + gutterHeight;
-        CGContextTranslateCTM(context, 0, -pageBox.height() - gutterHeight);
-    }
-}
-
-void SimplePDFPlugin::paintControls(GraphicsContext* graphicsContext, const IntRect&amp; dirtyRect)
-{
-    {
-        GraphicsContextStateSaver stateSaver(*graphicsContext);
-        IntRect scrollbarDirtyRect = dirtyRect;
-        scrollbarDirtyRect.moveBy(pluginView()-&gt;frameRect().location());
-        graphicsContext-&gt;translate(-pluginView()-&gt;frameRect().x(), -pluginView()-&gt;frameRect().y());
-
-        if (m_horizontalScrollbar)
-            m_horizontalScrollbar-&gt;paint(graphicsContext, scrollbarDirtyRect);
-
-        if (m_verticalScrollbar)
-            m_verticalScrollbar-&gt;paint(graphicsContext, scrollbarDirtyRect);
-    }
-
-    IntRect dirtyCornerRect = intersection(scrollCornerRect(), dirtyRect);
-    ScrollbarTheme::theme()-&gt;paintScrollCorner(0, graphicsContext, dirtyCornerRect);
-}
-
-void SimplePDFPlugin::updateControlTints(GraphicsContext* graphicsContext)
-{
-    ASSERT(graphicsContext-&gt;updatingControlTints());
-
-    if (m_horizontalScrollbar)
-        m_horizontalScrollbar-&gt;invalidate();
-    if (m_verticalScrollbar)
-        m_verticalScrollbar-&gt;invalidate();
-    invalidateScrollCorner(scrollCornerRect());
-}
-
-PassRefPtr&lt;ShareableBitmap&gt; SimplePDFPlugin::snapshot()
-{
-    return 0;
-}
-
-#if PLATFORM(MAC)
-PlatformLayer* SimplePDFPlugin::pluginLayer()
-{
-    return 0;
-}
-#endif
-
-
-bool SimplePDFPlugin::isTransparent()
-{
-    // This should never be called from the web process.
-    ASSERT_NOT_REACHED();
-    return false;
-}
-
-bool SimplePDFPlugin::wantsWheelEvents()
-{
-    return true;
-}
-
-void SimplePDFPlugin::geometryDidChange(const IntSize&amp; size, const IntRect&amp; clipRect, const AffineTransform&amp; pluginToRootViewTransform)
-{
-    if (m_size == size) {
-        // Nothing to do.
-        return;
-    }
-
-    m_size = size;
-    updateScrollbars();
-}
-
-void SimplePDFPlugin::visibilityDidChange()
-{
-}
-
-void SimplePDFPlugin::frameDidFinishLoading(uint64_t)
-{
-    ASSERT_NOT_REACHED();
-}
-
-void SimplePDFPlugin::frameDidFail(uint64_t, bool)
-{
-    ASSERT_NOT_REACHED();
-}
-
-void SimplePDFPlugin::didEvaluateJavaScript(uint64_t, const WTF::String&amp;)
-{
-    ASSERT_NOT_REACHED();
-}
-
-void SimplePDFPlugin::convertPostScriptDataIfNeeded()
-{
-    if (!m_isPostScript)
-        return;
-
-    m_suggestedFilename = String(m_suggestedFilename + &quot;.pdf&quot;);
-    m_data = convertPostScriptDataToPDF(m_data);
-}
-
-void SimplePDFPlugin::streamDidReceiveResponse(uint64_t streamID, const URL&amp;, uint32_t, uint32_t, const String&amp; mimeType, const String&amp;, const String&amp; suggestedFilename)
-{
-    ASSERT_UNUSED(streamID, streamID == pdfDocumentRequestID);
-
-    m_suggestedFilename = suggestedFilename;
-
-    if (equalIgnoringCase(mimeType, postScriptMIMEType))
-        m_isPostScript = true;
-}
-                                           
-void SimplePDFPlugin::streamDidReceiveData(uint64_t streamID, const char* bytes, int length)
-{
-    ASSERT_UNUSED(streamID, streamID == pdfDocumentRequestID);
-
-    if (!m_data)
-        m_data = adoptCF(CFDataCreateMutable(0, 0));
-
-    CFDataAppendBytes(m_data.get(), reinterpret_cast&lt;const UInt8*&gt;(bytes), length);
-}
-
-void SimplePDFPlugin::streamDidFinishLoading(uint64_t streamID)
-{
-    ASSERT_UNUSED(streamID, streamID == pdfDocumentRequestID);
-
-    convertPostScriptDataIfNeeded();
-    pdfDocumentDidLoad();
-}
-
-void SimplePDFPlugin::streamDidFail(uint64_t streamID, bool wasCancelled)
-{
-    ASSERT_UNUSED(streamID, streamID == pdfDocumentRequestID);
-
-    m_data.clear();
-}
-
-void SimplePDFPlugin::manualStreamDidReceiveResponse(const URL&amp; responseURL, uint32_t streamLength,  uint32_t lastModifiedTime, const String&amp; mimeType, const String&amp; headers, const String&amp; suggestedFilename)
-{
-    m_suggestedFilename = suggestedFilename;
-
-    if (equalIgnoringCase(mimeType, postScriptMIMEType))
-        m_isPostScript = true;
-}
-
-void SimplePDFPlugin::manualStreamDidReceiveData(const char* bytes, int length)
-{
-    if (!m_data)
-        m_data = adoptCF(CFDataCreateMutable(0, 0));
-
-    CFDataAppendBytes(m_data.get(), reinterpret_cast&lt;const UInt8*&gt;(bytes), length);
-}
-
-void SimplePDFPlugin::manualStreamDidFinishLoading()
-{
-    convertPostScriptDataIfNeeded();
-    pdfDocumentDidLoad();
-}
-
-NSData *SimplePDFPlugin::liveData() const
-{
-    // Save data straight from the resource instead of PDFKit if the document is
-    // untouched by the user, so that PDFs which PDFKit can't display will still be downloadable.
-    if (pdfDocumentWasMutated())
-        return [m_pdfDocument.get() dataRepresentation];
-    else
-        return rawData();
-}
-
-PassRefPtr&lt;SharedBuffer&gt; SimplePDFPlugin::liveResourceData() const
-{
-    NSData *pdfData = liveData();
-
-    if (!pdfData)
-        return 0;
-
-    return SharedBuffer::wrapNSData(pdfData);
-}
-
-void SimplePDFPlugin::manualStreamDidFail(bool)
-{
-    m_data.clear();
-}
-
-bool SimplePDFPlugin::handleMouseEvent(const WebMouseEvent&amp; event)
-{
-    switch (event.type()) {
-    case WebEvent::MouseMove:
-        mouseMovedInContentArea();
-        // FIXME: Should also notify scrollbar to show hover effect. Should also send mouseExited to hide it.
-        break;
-    case WebEvent::MouseDown: {
-        // Returning false as will make EventHandler unfocus the plug-in, which is appropriate when clicking scrollbars.
-        // Ideally, we wouldn't change focus at all, but PluginView already did that for us.
-        // When support for PDF forms is added, we'll need to actually focus the plug-in when clicking in a form.
-        break;
-    }
-    case WebEvent::MouseUp: {
-        PlatformMouseEvent platformEvent = platform(event);
-        if (m_horizontalScrollbar)
-            m_horizontalScrollbar-&gt;mouseUp(platformEvent);
-        if (m_verticalScrollbar)
-            m_verticalScrollbar-&gt;mouseUp(platformEvent);
-        break;
-    }
-    default:
-        break;
-    }
-        
-    return false;
-}
-
-bool SimplePDFPlugin::handleWheelEvent(const WebWheelEvent&amp; event)
-{
-    PlatformWheelEvent platformEvent = platform(event);
-    return ScrollableArea::handleWheelEvent(platformEvent);
-}
-
-bool SimplePDFPlugin::handleMouseEnterEvent(const WebMouseEvent&amp;)
-{
-    mouseEnteredContentArea();
-    return false;
-}
-
-bool SimplePDFPlugin::handleMouseLeaveEvent(const WebMouseEvent&amp;)
-{
-    mouseExitedContentArea();
-    return false;
-}
-
-bool SimplePDFPlugin::handleContextMenuEvent(const WebMouseEvent&amp;)
-{
-    // Use default WebKit context menu.
-    return false;
-}
-
-bool SimplePDFPlugin::handleKeyboardEvent(const WebKeyboardEvent&amp;)
-{
-    return false;
-}
-
-void SimplePDFPlugin::setFocus(bool hasFocus)
-{
-}
-
-NPObject* SimplePDFPlugin::pluginScriptableNPObject()
-{
-    return 0;
-}
-
-#if PLATFORM(MAC)
-
-void SimplePDFPlugin::windowFocusChanged(bool)
-{
-}
-
-void SimplePDFPlugin::windowAndViewFramesChanged(const WebCore::IntRect&amp; windowFrameInScreenCoordinates, const WebCore::IntRect&amp; viewFrameInWindowCoordinates)
-{
-}
-
-void SimplePDFPlugin::windowVisibilityChanged(bool)
-{
-}
-
-void SimplePDFPlugin::contentsScaleFactorChanged(float)
-{
-}
-
-uint64_t SimplePDFPlugin::pluginComplexTextInputIdentifier() const
-{
-    return 0;
-}
-
-void SimplePDFPlugin::sendComplexTextInput(const String&amp;)
-{
-}
-
-void SimplePDFPlugin::setLayerHostingMode(LayerHostingMode)
-{
-}
-
-#endif
-
-void SimplePDFPlugin::storageBlockingStateChanged(bool)
-{
-}
-
-void SimplePDFPlugin::privateBrowsingStateChanged(bool)
-{
-}
-
-bool SimplePDFPlugin::getFormValue(String&amp;)
-{
-    return false;
-}
-
-bool SimplePDFPlugin::handleScroll(ScrollDirection direction, ScrollGranularity granularity)
-{
-    return scroll(direction, granularity);
-}
-
-Scrollbar* SimplePDFPlugin::horizontalScrollbar()
-{
-    return m_horizontalScrollbar.get();
-}
-
-Scrollbar* SimplePDFPlugin::verticalScrollbar()
-{
-    return m_verticalScrollbar.get();
-}
-
-IntRect SimplePDFPlugin::scrollCornerRect() const
-{
-    if (!m_horizontalScrollbar || !m_verticalScrollbar)
-        return IntRect();
-    if (m_horizontalScrollbar-&gt;isOverlayScrollbar()) {
-        ASSERT(m_verticalScrollbar-&gt;isOverlayScrollbar());
-        return IntRect();
-    }
-    return IntRect(pluginView()-&gt;width() - m_verticalScrollbar-&gt;width(), pluginView()-&gt;height() - m_horizontalScrollbar-&gt;height(), m_verticalScrollbar-&gt;width(), m_horizontalScrollbar-&gt;height());
-}
-
-ScrollableArea* SimplePDFPlugin::enclosingScrollableArea() const
-{
-    // FIXME: Walk up the frame tree and look for a scrollable parent frame or RenderLayer.
-    return 0;
-}
-
-IntRect SimplePDFPlugin::scrollableAreaBoundingBox() const
-{
-    return pluginView()-&gt;frameRect();
-}
-
-void SimplePDFPlugin::setScrollOffset(const IntPoint&amp; offset)
-{
-    m_scrollOffset = IntSize(offset.x(), offset.y());
-    // FIXME: It would be better for performance to blit parts that remain visible.
-    controller()-&gt;invalidate(IntRect(0, 0, m_size.width(), m_size.height()));
-}
-
-int SimplePDFPlugin::scrollSize(ScrollbarOrientation orientation) const
-{
-    Scrollbar* scrollbar = ((orientation == HorizontalScrollbar) ? m_horizontalScrollbar : m_verticalScrollbar).get();
-    return scrollbar ? (scrollbar-&gt;totalSize() - scrollbar-&gt;visibleSize()) : 0;
-}
-
-bool SimplePDFPlugin::isActive() const
-{
-    if (Frame* coreFrame = m_frame-&gt;coreFrame()) {
-        if (Page* page = coreFrame-&gt;page())
-            return page-&gt;focusController().isActive();
-    }
-
-    return false;
-}
-
-void SimplePDFPlugin::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect&amp; rect)
-{
-    IntRect dirtyRect = rect;
-    dirtyRect.moveBy(scrollbar-&gt;location());
-    dirtyRect.moveBy(-pluginView()-&gt;location());
-    controller()-&gt;invalidate(dirtyRect);
-}
-
-void SimplePDFPlugin::invalidateScrollCornerRect(const IntRect&amp; rect)
-{
-    controller()-&gt;invalidate(rect);
-}
-
-bool SimplePDFPlugin::isScrollCornerVisible() const
-{
-    return false;
-}
-
-int SimplePDFPlugin::scrollPosition(Scrollbar* scrollbar) const
-{
-    if (scrollbar-&gt;orientation() == HorizontalScrollbar)
-        return m_scrollOffset.width();
-    if (scrollbar-&gt;orientation() == VerticalScrollbar)
-        return m_scrollOffset.height();
-    ASSERT_NOT_REACHED();
-    return 0;
-}
-
-IntPoint SimplePDFPlugin::scrollPosition() const
-{
-    return IntPoint(m_scrollOffset.width(), m_scrollOffset.height());
-}
-
-IntPoint SimplePDFPlugin::minimumScrollPosition() const
-{
-    return IntPoint(0, 0);
-}
-
-IntPoint SimplePDFPlugin::maximumScrollPosition() const
-{
-    int horizontalScrollbarHeight = (m_horizontalScrollbar &amp;&amp; !m_horizontalScrollbar-&gt;isOverlayScrollbar()) ? m_horizontalScrollbar-&gt;height() : 0;
-    int verticalScrollbarWidth = (m_verticalScrollbar &amp;&amp; !m_verticalScrollbar-&gt;isOverlayScrollbar()) ? m_verticalScrollbar-&gt;width() : 0;
-
-    IntPoint maximumOffset(m_pdfDocumentSize.width() - m_size.width() + verticalScrollbarWidth, m_pdfDocumentSize.height() - m_size.height() + horizontalScrollbarHeight);
-    maximumOffset.clampNegativeToZero();
-    return maximumOffset;
-}
-
-int SimplePDFPlugin::visibleHeight() const
-{
-    return m_size.height();
-}
-
-int SimplePDFPlugin::visibleWidth() const
-{
-    return m_size.width();
-}
-
-IntSize SimplePDFPlugin::contentsSize() const
-{
-    return m_pdfDocumentSize;
-}
-
-bool SimplePDFPlugin::scrollbarsCanBeActive() const
-{
-    return !pluginView()-&gt;frame()-&gt;document()-&gt;inPageCache();
-}
-
-void SimplePDFPlugin::scrollbarStyleChanged(int, bool forceUpdate)
-{
-    if (!forceUpdate)
-        return;
-
-    // If the PDF was scrolled all the way to bottom right and scrollbars change to overlay style, we don't want to display white rectangles where scrollbars were.
-    IntPoint newScrollOffset = IntPoint(m_scrollOffset).shrunkTo(maximumScrollPosition());
-    setScrollOffset(newScrollOffset);
-
-    // As size of the content area changes, scrollbars may need to appear or to disappear.
-    updateScrollbars();
-
-    ScrollableArea::contentsResized();
-}
-
-IntRect SimplePDFPlugin::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntRect&amp; scrollbarRect) const
-{
-    IntRect rect = scrollbarRect;
-    rect.move(scrollbar-&gt;location() - pluginView()-&gt;location());
-    
-    return pluginView()-&gt;frame()-&gt;view()-&gt;convertFromRenderer(pluginView()-&gt;renderer(), rect);
-}
-
-IntRect SimplePDFPlugin::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect&amp; parentRect) const
-{
-    IntRect rect = pluginView()-&gt;frame()-&gt;view()-&gt;convertToRenderer(pluginView()-&gt;renderer(), parentRect);
-    rect.move(pluginView()-&gt;location() - scrollbar-&gt;location());
-    
-    return rect;
-}
-
-IntPoint SimplePDFPlugin::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntPoint&amp; scrollbarPoint) const
-{
-    IntPoint point = scrollbarPoint;
-    point.move(scrollbar-&gt;location() - pluginView()-&gt;location());
-    
-    return pluginView()-&gt;frame()-&gt;view()-&gt;convertFromRenderer(pluginView()-&gt;renderer(), point);
-}
-
-IntPoint SimplePDFPlugin::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint&amp; parentPoint) const
-{
-    IntPoint point = pluginView()-&gt;frame()-&gt;view()-&gt;convertToRenderer(pluginView()-&gt;renderer(), parentPoint);
-    point.move(pluginView()-&gt;location() - scrollbar-&gt;location());
-    
-    return point;
-}
-
-bool SimplePDFPlugin::isEditingCommandEnabled(const String&amp;)
-{
-    return false;
-}
-
-bool SimplePDFPlugin::handleEditingCommand(const String&amp;, const String&amp;)
-{
-    return false;
-}
-    
-bool SimplePDFPlugin::handlesPageScaleFactor()
-{
-    return false;
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPluginViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -582,9 +582,11 @@
</span><span class="cx"> {
</span><span class="cx">     m_plugin = 0;
</span><span class="cx"> 
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx">     String frameURLString = frame()-&gt;loader().documentLoader()-&gt;responseURL().string();
</span><span class="cx">     String pageURLString = m_webPage-&gt;corePage()-&gt;mainFrame().loader().documentLoader()-&gt;responseURL().string();
</span><span class="cx">     m_webPage-&gt;send(Messages::WebPageProxy::DidFailToInitializePlugin(m_parameters.mimeType, frameURLString, pageURLString));
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PluginView::didInitializePlugin()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebAlternativeTextClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebAlternativeTextClient.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebAlternativeTextClient.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebAlternativeTextClient.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -50,7 +50,16 @@
</span><span class="cx">     virtual Vector&lt;String&gt; dictationAlternatives(uint64_t dictationContext) OVERRIDE;
</span><span class="cx"> #endif
</span><span class="cx"> private:
</span><ins>+#if PLATFORM(IOS)
+#pragma clang diagnostic push
+#if defined(__has_warning) &amp;&amp; __has_warning(&quot;-Wunused-private-field&quot;)
+#pragma clang diagnostic ignored &quot;-Wunused-private-field&quot;
+#endif
+#endif
</ins><span class="cx">     WebPage *m_page;
</span><ins>+#if PLATFORM(IOS)
+#pragma clang diagnostic pop
+#endif
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -488,8 +488,11 @@
</span><span class="cx">     if (m_page-&gt;useFixedLayout())
</span><span class="cx">         m_page-&gt;drawingArea()-&gt;layerTreeHost()-&gt;sizeDidChange(size);
</span><span class="cx"> 
</span><del>-    m_page-&gt;send(Messages::WebPageProxy::DidChangeContentsSize(size));
</del><ins>+    m_page-&gt;send(Messages::WebPageProxy::DidChangeContentSize(size));
</ins><span class="cx"> #endif
</span><ins>+#if PLATFORM(IOS)
+    m_page-&gt;send(Messages::WebPageProxy::DidChangeContentSize(size));
+#endif
</ins><span class="cx"> 
</span><span class="cx">     m_page-&gt;drawingArea()-&gt;mainFrameContentSizeChanged(size);
</span><span class="cx"> 
</span><span class="lines">@@ -533,6 +536,7 @@
</span><span class="cx">     
</span><span class="cx"> void WebChromeClient::unavailablePluginButtonClicked(Element* element, RenderEmbeddedObject::PluginUnavailabilityReason pluginUnavailabilityReason) const
</span><span class="cx"> {
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx">     ASSERT(element-&gt;hasTagName(objectTag) || element-&gt;hasTagName(embedTag) || element-&gt;hasTagName(appletTag));
</span><span class="cx">     ASSERT(pluginUnavailabilityReason == RenderEmbeddedObject::PluginMissing || pluginUnavailabilityReason == RenderEmbeddedObject::InsecurePluginVersion || pluginUnavailabilityReason);
</span><span class="cx"> 
</span><span class="lines">@@ -545,6 +549,7 @@
</span><span class="cx">     if (!pluginspageAttributeURL.protocolIsInHTTPFamily())
</span><span class="cx">         pluginspageAttributeURL = URL();
</span><span class="cx">     m_page-&gt;send(Messages::WebPageProxy::UnavailablePluginButtonClicked(pluginUnavailabilityReason, pluginElement-&gt;serviceType(), pluginURLString, pluginspageAttributeURL.string(), frameURLString, pageURLString));
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebChromeClient::scrollbarsModeDidChange() const
</span><span class="lines">@@ -684,6 +689,7 @@
</span><span class="cx">     loader-&gt;notifyFinished(Icon::createIconForFiles(filenames));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> void WebChromeClient::setCursor(const WebCore::Cursor&amp; cursor)
</span><span class="cx"> {
</span><span class="cx"> #if USE(LAZY_NATIVE_CURSOR)
</span><span class="lines">@@ -695,6 +701,7 @@
</span><span class="cx"> {
</span><span class="cx">     m_page-&gt;send(Messages::WebPageProxy::SetCursorHiddenUntilMouseMoves(hiddenUntilMouseMoves));
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(REQUEST_ANIMATION_FRAME) &amp;&amp; !USE(REQUEST_ANIMATION_FRAME_TIMER)
</span><span class="cx"> void WebChromeClient::scheduleAnimation()
</span><span class="lines">@@ -809,8 +816,13 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void WebChromeClient::dispatchViewportPropertiesDidChange(const ViewportArguments&amp;) const
</del><ins>+void WebChromeClient::dispatchViewportPropertiesDidChange(const ViewportArguments&amp; viewportArguments) const
</ins><span class="cx"> {
</span><ins>+#if PLATFORM(IOS)
+    m_page-&gt;send(Messages::WebPageProxy::DidChangeViewportArguments(viewportArguments));
+#else
+    UNUSED_PARAM(viewportArguments);
+#endif
</ins><span class="cx"> #if USE(TILED_BACKING_STORE)
</span><span class="cx">     if (!m_page-&gt;useFixedLayout())
</span><span class="cx">         return;
</span><span class="lines">@@ -879,14 +891,18 @@
</span><span class="cx"> 
</span><span class="cx"> void WebChromeClient::didAddHeaderLayer(GraphicsLayer* headerParent)
</span><span class="cx"> {
</span><ins>+#if ENABLE(RUBBER_BANDING)
</ins><span class="cx">     if (PageBanner* banner = m_page-&gt;headerPageBanner())
</span><span class="cx">         banner-&gt;didAddParentLayer(headerParent);
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebChromeClient::didAddFooterLayer(GraphicsLayer* footerParent)
</span><span class="cx"> {
</span><ins>+#if ENABLE(RUBBER_BANDING)
</ins><span class="cx">     if (PageBanner* banner = m_page-&gt;footerPageBanner())
</span><span class="cx">         banner-&gt;didAddParentLayer(footerParent);
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebChromeClient::shouldUseTiledBackingForFrameView(const FrameView* frameView) const
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -155,11 +155,38 @@
</span><span class="cx">     virtual PassOwnPtr&lt;WebCore::ColorChooser&gt; createColorChooser(WebCore::ColorChooserClient*, const WebCore::Color&amp;) OVERRIDE;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+#if ENABLE(TOUCH_EVENTS)
+    virtual void didPreventDefaultForEvent() OVERRIDE;
+#endif
+    virtual void didReceiveMobileDocType() OVERRIDE;
+    virtual void setNeedsScrollNotifications(WebCore::Frame*, bool) OVERRIDE;
+    virtual void observedContentChange(WebCore::Frame*) OVERRIDE;
+    virtual void clearContentChangeObservers(WebCore::Frame*) OVERRIDE;
+    virtual void notifyRevealedSelectionByScrollingFrame(WebCore::Frame*) OVERRIDE;
+    virtual bool isStopping() OVERRIDE;
+
+    virtual void didLayout(LayoutType = NormalLayout) OVERRIDE;
+    virtual void didStartOverflowScroll() OVERRIDE;
+    virtual void didEndOverflowScroll() OVERRIDE;
+
+    // FIXME: See &lt;rdar://problem/5975559&gt;
+    virtual void suppressFormNotifications() OVERRIDE;
+    virtual void restoreFormNotifications() OVERRIDE;
+
+    virtual void addOrUpdateScrollingLayer(WebCore::Node*, PlatformLayer* scrollingLayer, PlatformLayer* contentsLayer, const WebCore::IntSize&amp; scrollSize, bool allowHorizontalScrollbar, bool allowVerticalScrollbar) OVERRIDE;
+    virtual void removeScrollingLayer(WebCore::Node*, PlatformLayer* scrollingLayer, PlatformLayer* contentsLayer) OVERRIDE;
+
+    virtual void webAppOrientationsUpdated() OVERRIDE;
+#endif
+
</ins><span class="cx">     virtual void runOpenPanel(WebCore::Frame*, PassRefPtr&lt;WebCore::FileChooser&gt;) OVERRIDE;
</span><span class="cx">     virtual void loadIconForFiles(const Vector&lt;String&gt;&amp;, WebCore::FileIconLoader*) OVERRIDE;
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     virtual void setCursor(const WebCore::Cursor&amp;) OVERRIDE;
</span><span class="cx">     virtual void setCursorHiddenUntilMouseMoves(bool) OVERRIDE;
</span><ins>+#endif
</ins><span class="cx"> #if ENABLE(REQUEST_ANIMATION_FRAME) &amp;&amp; !USE(REQUEST_ANIMATION_FRAME_TIMER)
</span><span class="cx">     virtual void scheduleAnimation() OVERRIDE;
</span><span class="cx"> #endif
</span><span class="lines">@@ -190,6 +217,9 @@
</span><span class="cx">             VideoTrigger |
</span><span class="cx">             PluginTrigger| 
</span><span class="cx">             CanvasTrigger |
</span><ins>+#if PLATFORM(IOS)
+            AnimatedOpacityTrigger | // Allow opacity animations to trigger compositing mode for iPhone: &lt;rdar://problem/7830677&gt;
+#endif
</ins><span class="cx">             AnimationTrigger);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -200,6 +230,11 @@
</span><span class="cx">     virtual void needTouchEvents(bool) OVERRIDE;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    virtual void elementDidFocus(const WebCore::Node*) OVERRIDE;
+    virtual void elementDidBlur(const WebCore::Node*) OVERRIDE;
+#endif
+
</ins><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span><span class="cx">     virtual bool supportsFullScreenForElement(const WebCore::Element*, bool withKeyboard) OVERRIDE;
</span><span class="cx">     virtual void enterFullScreenForElement(WebCore::Element*) OVERRIDE;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebDatabaseManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -64,6 +64,12 @@
</span><span class="cx">     virtual void dispatchDidModifyOrigin(WebCore::SecurityOrigin*) OVERRIDE;
</span><span class="cx">     virtual void dispatchDidModifyDatabase(WebCore::SecurityOrigin*, const String&amp; databaseIdentifier) OVERRIDE;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    virtual void dispatchDidAddNewOrigin(WebCore::SecurityOrigin*) OVERRIDE;
+    virtual void dispatchDidDeleteDatabase() OVERRIDE;
+    virtual void dispatchDidDeleteDatabaseOrigin() OVERRIDE;
+#endif
+
</ins><span class="cx">     WebProcess* m_process;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebEditorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -152,6 +152,20 @@
</span><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx">     virtual bool shouldShowUnicodeMenu() OVERRIDE;
</span><span class="cx"> #endif
</span><ins>+#if PLATFORM(IOS)
+    virtual void suppressSelectionNotifications() OVERRIDE;
+    virtual void restoreSelectionNotifications() OVERRIDE;
+    virtual void startDelayingAndCoalescingContentChangeNotifications() OVERRIDE;
+    virtual void stopDelayingAndCoalescingContentChangeNotifications() OVERRIDE;
+    virtual void writeDataToPasteboard(NSDictionary*) OVERRIDE;
+    virtual NSArray *supportedPasteboardTypesForCurrentSelection() OVERRIDE;
+    virtual NSArray *readDataFromPasteboard(NSString* type, int index) OVERRIDE;
+    virtual bool hasRichlyEditableSelection() OVERRIDE;
+    virtual int getPasteboardItemsCount() OVERRIDE;
+    virtual WebCore::DocumentFragment* documentFragmentFromDelegate(int index) OVERRIDE;
+    virtual bool performsTwoStepPaste(WebCore::DocumentFragment*) OVERRIDE;
+    virtual int pasteboardChangeCount() OVERRIDE;
+#endif
</ins><span class="cx"> 
</span><span class="cx">     virtual bool supportsGlobalSelection() OVERRIDE;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -1211,7 +1211,11 @@
</span><span class="cx">     bool shouldUseFixedLayout = isMainFrame &amp;&amp; webPage-&gt;useFixedLayout();
</span><span class="cx">     bool shouldDisableScrolling = isMainFrame &amp;&amp; !webPage-&gt;mainFrameIsScrollable();
</span><span class="cx">     bool shouldHideScrollbars = shouldUseFixedLayout || shouldDisableScrolling;
</span><ins>+#if PLATFORM(IOS)
+    IntRect currentFixedVisibleContentRect = IntRect();
+#else
</ins><span class="cx">     IntRect currentFixedVisibleContentRect = m_frame-&gt;coreFrame()-&gt;view() ? m_frame-&gt;coreFrame()-&gt;view()-&gt;fixedVisibleContentRect() : IntRect();
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     m_frameCameFromPageCache = false;
</span><span class="cx"> 
</span><span class="lines">@@ -1230,7 +1234,10 @@
</span><span class="cx"> 
</span><span class="cx">     m_frame-&gt;coreFrame()-&gt;view()-&gt;setProhibitsScrolling(shouldDisableScrolling);
</span><span class="cx">     m_frame-&gt;coreFrame()-&gt;view()-&gt;setVisualUpdatesAllowedByClient(!webPage-&gt;shouldExtendIncrementalRenderingSuppression());
</span><del>-    
</del><ins>+#if PLATFORM(IOS)
+    m_frame-&gt;coreFrame()-&gt;view()-&gt;setDelegatesScrolling(true);
+#endif
+
</ins><span class="cx">     if (webPage-&gt;scrollPinningBehavior() != DoNotPin)
</span><span class="cx">         m_frame-&gt;coreFrame()-&gt;view()-&gt;setScrollPinningBehavior(webPage-&gt;scrollPinningBehavior());
</span><span class="cx"> 
</span><span class="lines">@@ -1366,6 +1373,7 @@
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;Widget&gt; WebFrameLoaderClient::createJavaAppletWidget(const IntSize&amp; pluginSize, HTMLAppletElement* appletElement, const URL&amp;, const Vector&lt;String&gt;&amp; paramNames, const Vector&lt;String&gt;&amp; paramValues)
</span><span class="cx"> {
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     RefPtr&lt;Widget&gt; plugin = createPlugin(pluginSize, appletElement, URL(), paramNames, paramValues, appletElement-&gt;serviceType(), false);
</span><span class="cx">     if (!plugin) {
</span><span class="cx">         if (WebPage* webPage = m_frame-&gt;page()) {
</span><span class="lines">@@ -1375,6 +1383,9 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     return plugin.release();
</span><ins>+#else
+    return 0;
+#endif // !PLATFORM(IOS)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -49,6 +49,9 @@
</span><span class="cx">     
</span><span class="cx">     virtual void makeRepresentation(WebCore::DocumentLoader*) OVERRIDE;
</span><span class="cx">     virtual void forceLayout() OVERRIDE;
</span><ins>+#if PLATFORM(IOS)
+    virtual void forceLayoutWithoutRecalculatingStyles() OVERRIDE;
+#endif
</ins><span class="cx">     virtual void forceLayoutForNonHTML() OVERRIDE;
</span><span class="cx">     
</span><span class="cx">     virtual void setCopiesOnScroll() OVERRIDE;
</span><span class="lines">@@ -65,6 +68,9 @@
</span><span class="cx"> #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
</span><span class="cx">     virtual bool canAuthenticateAgainstProtectionSpace(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ProtectionSpace&amp;) OVERRIDE;
</span><span class="cx"> #endif
</span><ins>+#if PLATFORM(IOS)
+    virtual RetainPtr&lt;CFDictionaryRef&gt; connectionProperties(WebCore::DocumentLoader*, unsigned long identifier) OVERRIDE;
+#endif
</ins><span class="cx">     virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&amp;) OVERRIDE;
</span><span class="cx">     virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int dataLength) OVERRIDE;
</span><span class="cx">     virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier) OVERRIDE;
</span><span class="lines">@@ -167,6 +173,9 @@
</span><span class="cx">     
</span><span class="cx">     virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*) OVERRIDE;
</span><span class="cx">     virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*) OVERRIDE;
</span><ins>+#if PLATFORM(IOS)
+    virtual void didRestoreFrameHierarchyForCachedFrame() OVERRIDE;
+#endif
</ins><span class="cx">     virtual void transitionToCommittedForNewPage() OVERRIDE;
</span><span class="cx"> 
</span><span class="cx">     virtual void didSaveToPageCache() OVERRIDE;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportiosWebChromeClientIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,124 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;WebChromeClient.h&quot;
+
+#import &lt;WebCore/NotImplemented.h&gt;
+#import &quot;WebCoreArgumentCoders.h&quot;
+#import &quot;WebFrame.h&quot;
+#import &quot;WebPage.h&quot;
+#import &quot;WebPageProxyMessages.h&quot;
+
+namespace WebKit {
+
+#if ENABLE(TOUCH_EVENTS)
+void WebChromeClient::didPreventDefaultForEvent()
+{
+    notImplemented();
+}
+#endif
+
+void WebChromeClient::elementDidFocus(const WebCore::Node* node)
+{
+    m_page-&gt;elementDidFocus(const_cast&lt;WebCore::Node*&gt;(node));
+}
+
+void WebChromeClient::elementDidBlur(const WebCore::Node* node)
+{
+    m_page-&gt;elementDidBlur(const_cast&lt;WebCore::Node*&gt;(node));
+}
+
+void WebChromeClient::didReceiveMobileDocType()
+{
+    m_page-&gt;send(Messages::WebPageProxy::MainDocumentDidReceiveMobileDocType());
+}
+
+void WebChromeClient::setNeedsScrollNotifications(WebCore::Frame*, bool)
+{
+    notImplemented();
+}
+
+void WebChromeClient::observedContentChange(WebCore::Frame*)
+{
+    notImplemented();
+}
+
+void WebChromeClient::clearContentChangeObservers(WebCore::Frame*)
+{
+    notImplemented();
+}
+
+void WebChromeClient::notifyRevealedSelectionByScrollingFrame(WebCore::Frame*)
+{
+    notImplemented();
+}
+
+bool WebChromeClient::isStopping()
+{
+    notImplemented();
+    return false;
+}
+
+void WebChromeClient::didLayout(LayoutType)
+{
+    notImplemented();
+}
+
+void WebChromeClient::didStartOverflowScroll()
+{
+    notImplemented();
+}
+
+void WebChromeClient::didEndOverflowScroll()
+{
+    notImplemented();
+}
+
+void WebChromeClient::suppressFormNotifications()
+{
+    notImplemented();
+}
+
+void WebChromeClient::restoreFormNotifications()
+{
+    notImplemented();
+}
+
+void WebChromeClient::addOrUpdateScrollingLayer(WebCore::Node*, PlatformLayer*, PlatformLayer*, const WebCore::IntSize&amp;, bool, bool)
+{
+    notImplemented();
+}
+
+void WebChromeClient::removeScrollingLayer(WebCore::Node*, PlatformLayer*, PlatformLayer*)
+{
+    notImplemented();
+}
+
+void WebChromeClient::webAppOrientationsUpdated()
+{
+    notImplemented();
+}
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportiosWebDatabaseManagerIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebDatabaseManagerIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebDatabaseManagerIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebDatabaseManagerIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;WebDatabaseManager.h&quot;
+
+#import &lt;WebCore/NotImplemented.h&gt;
+
+namespace WebKit {
+
+void WebDatabaseManager::dispatchDidAddNewOrigin(WebCore::SecurityOrigin*)
+{
+    notImplemented();
+}
+
+void WebDatabaseManager::dispatchDidDeleteDatabase()
+{
+    notImplemented();
+}
+
+void WebDatabaseManager::dispatchDidDeleteDatabaseOrigin()
+{
+    notImplemented();
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportiosWebEditorClientIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,145 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;WebEditorClient.h&quot;
+
+#import &quot;WebPage.h&quot;
+#import &lt;WebCore/KeyboardEvent.h&gt;
+#import &lt;WebCore/NotImplemented.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+    
+void WebEditorClient::handleKeyboardEvent(KeyboardEvent* event)
+{
+    if (m_page-&gt;handleEditingKeyboardEvent(event, false))
+        event-&gt;setDefaultHandled();
+}
+
+void WebEditorClient::handleInputMethodKeydown(KeyboardEvent* event)
+{
+    notImplemented();
+}
+
+NSString *WebEditorClient::userVisibleString(NSURL *)
+{
+    notImplemented();
+    return nil;
+}
+
+NSURL *WebEditorClient::canonicalizeURL(NSURL *)
+{
+    notImplemented();
+    return nil;
+}
+
+NSURL *WebEditorClient::canonicalizeURLString(NSString *)
+{
+    notImplemented();
+    return nil;
+}
+
+DocumentFragment* WebEditorClient::documentFragmentFromAttributedString(NSAttributedString *, Vector&lt;RefPtr&lt;ArchiveResource&gt; &gt;&amp;)
+{
+    notImplemented();
+    return 0;
+}
+
+void WebEditorClient::setInsertionPasteboard(const String&amp;)
+{
+    // This is used only by Mail, no need to implement it now.
+    notImplemented();
+}
+
+void WebEditorClient::suppressSelectionNotifications()
+{
+    notImplemented();
+}
+
+void WebEditorClient::restoreSelectionNotifications()
+{
+    notImplemented();
+}
+
+void WebEditorClient::startDelayingAndCoalescingContentChangeNotifications()
+{
+    notImplemented();
+}
+
+void WebEditorClient::stopDelayingAndCoalescingContentChangeNotifications()
+{
+    notImplemented();
+}
+
+void WebEditorClient::writeDataToPasteboard(NSDictionary*)
+{
+    notImplemented();
+}
+
+NSArray* WebEditorClient::supportedPasteboardTypesForCurrentSelection()
+{
+    notImplemented();
+    return 0;
+}
+
+NSArray* WebEditorClient::readDataFromPasteboard(NSString*, int)
+{
+    notImplemented();
+    return 0;
+}
+
+bool WebEditorClient::hasRichlyEditableSelection()
+{
+    notImplemented();
+    return false;
+}
+
+int WebEditorClient::getPasteboardItemsCount()
+{
+    notImplemented();
+    return 0;
+}
+
+WebCore::DocumentFragment* WebEditorClient::documentFragmentFromDelegate(int)
+{
+    notImplemented();
+    return 0;
+}
+
+bool WebEditorClient::performsTwoStepPaste(WebCore::DocumentFragment*)
+{
+    notImplemented();
+    return false;
+}
+
+int WebEditorClient::pasteboardChangeCount()
+{
+    notImplemented();
+    return 0;
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportiosWebFrameLoaderClientIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;WebFrameLoaderClient.h&quot;
+
+#import &lt;WebCore/NotImplemented.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebFrameLoaderClient::didRestoreFrameHierarchyForCachedFrame()
+{
+    notImplemented();
+}
+
+void WebFrameLoaderClient::forceLayoutWithoutRecalculatingStyles()
+{
+    notImplemented();
+}
+
+RetainPtr&lt;CFDictionaryRef&gt; WebFrameLoaderClient::connectionProperties(DocumentLoader*, unsigned long identifier)
+{
+    notImplemented();
+    return nullptr;
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportmacWebFrameNetworkingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -58,6 +58,9 @@
</span><span class="cx">     virtual RetainPtr&lt;CFDataRef&gt; sourceApplicationAuditData() const OVERRIDE;
</span><span class="cx">     virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&amp;) const OVERRIDE;
</span><span class="cx">     virtual WebCore::NetworkStorageSession&amp; storageSession() const OVERRIDE;
</span><ins>+#if PLATFORM(IOS)
+    virtual void reportNetworkDataUsage(uint64_t rawBytesSent, uint64_t rawBytesReceived, uint64_t cellularBytesSent, uint64_t cellularBytesReceived) OVERRIDE { }
+#endif // PLATFORM(IOS)
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportmacWebSystemInterfacemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -36,16 +36,18 @@
</span><span class="cx">     static dispatch_once_t initOnce;
</span><span class="cx">     
</span><span class="cx">     dispatch_once(&amp;initOnce, ^{
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">         INIT(AdvanceDefaultButtonPulseAnimation);
</span><ins>+#endif
</ins><span class="cx">         INIT(CALayerEnumerateRectsBeingDrawnWithBlock);
</span><span class="cx">         INIT(CopyCFLocalizationPreferredName);
</span><span class="cx">         INIT(CGContextGetShouldSmoothFonts);
</span><span class="cx">         INIT(CGPatternCreateWithImageAndTransform);
</span><span class="cx">         INIT(CGContextResetClip);
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1080
</del><ins>+#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1080
</ins><span class="cx">         INIT(CGContextDrawsWithCorrectShadowOffsets);
</span><span class="cx"> #endif
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">         INIT(CTFontTransformGlyphs);
</span><span class="cx"> #endif
</span><span class="cx">         INIT(CopyCONNECTProxyResponse);
</span><span class="lines">@@ -53,6 +55,7 @@
</span><span class="cx">         INIT(CopyNSURLResponseCertificateChain);
</span><span class="cx">         INIT(CreateCTLineWithUniCharProvider);
</span><span class="cx">         INIT(CreateCustomCFReadStream);
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">         INIT(DrawBezeledTextArea);
</span><span class="cx">         INIT(DrawBezeledTextFieldCell);
</span><span class="cx">         INIT(DrawCapsLockIndicator);
</span><span class="lines">@@ -65,18 +68,24 @@
</span><span class="cx">         INIT(GetFontInLanguageForRange);
</span><span class="cx">         INIT(GetGlyphTransformedAdvances);
</span><span class="cx">         INIT(GetGlyphsForCharacters);
</span><ins>+#endif
</ins><span class="cx">         INIT(GetVerticalGlyphsForCharacters);
</span><span class="cx">         INIT(GetHTTPPipeliningPriority);
</span><span class="cx">         INIT(GetMIMETypeForExtension);
</span><span class="cx">         INIT(GetNSURLResponseLastModifiedDate);
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">         INIT(SignedPublicKeyAndChallengeString);
</span><span class="cx">         INIT(GetPreferredExtensionForMIMEType);
</span><ins>+#endif
</ins><span class="cx">         INIT(GetUserToBaseCTM);
</span><span class="cx">         INIT(CGContextIsPDFContext);
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">         INIT(GetWheelEventDeltas);
</span><span class="cx">         INIT(GetNSEventKeyChar);
</span><span class="cx">         INIT(HitTestMediaUIPart);
</span><ins>+#endif
</ins><span class="cx">         INIT(InitializeMaximumHTTPConnectionCountPerHost);
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">         INIT(MeasureMediaUIPart);
</span><span class="cx">         INIT(PopupMenu);
</span><span class="cx">         INIT(QTIncludeOnlyModernMediaFileTypes);
</span><span class="lines">@@ -96,9 +105,12 @@
</span><span class="cx">         INIT(QTClearMediaDownloadCache);
</span><span class="cx">         INIT(SetBaseCTM);
</span><span class="cx">         INIT(SetCGFontRenderingMode);
</span><ins>+#endif
</ins><span class="cx">         INIT(SetCONNECTProxyAuthorizationForStream);
</span><span class="cx">         INIT(SetCONNECTProxyForStream);
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">         INIT(SetDragImage);
</span><ins>+#endif
</ins><span class="cx">         INIT(SetHTTPPipeliningMaximumPriority);
</span><span class="cx">         INIT(SetHTTPPipeliningPriority);
</span><span class="cx">         INIT(SetHTTPPipeliningMinimumFastLanePriority);
</span><span class="lines">@@ -120,12 +132,17 @@
</span><span class="cx">         INIT(DeleteAllHTTPCookies);
</span><span class="cx">         INIT(DeleteHTTPCookie);
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">         INIT(SetMetadataURL);
</span><del>-        
</del><ins>+#endif // !PLATFORM(IOS)
+
+#if !PLATFORM(IOS_SIMULATOR)
</ins><span class="cx">         INIT(IOSurfaceContextCreate);
</span><span class="cx">         INIT(IOSurfaceContextCreateImage);
</span><ins>+#endif // !PLATFORM(IOS_SIMULATOR)
</ins><span class="cx">         INIT(CreateCTTypesetterWithUniCharProviderAndOptions);
</span><span class="cx">         INIT(CTRunGetInitialAdvance);
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">         INIT(RecommendedScrollerStyle);
</span><span class="cx">         INIT(ExecutableWasLinkedOnOrBeforeSnowLeopard);
</span><span class="cx">         INIT(CopyDefaultSearchProviderDisplayName);
</span><span class="lines">@@ -134,6 +151,7 @@
</span><span class="cx">         INIT(Cursor);
</span><span class="cx">         INIT(WindowSetScaledFrame);
</span><span class="cx">         INIT(WindowSetAlpha);
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx"> #if USE(CFNETWORK)
</span><span class="cx">         INIT(GetDefaultHTTPCookieStorage);
</span><span class="lines">@@ -144,6 +162,7 @@
</span><span class="cx">         INIT(SetRequestStorageSession);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">         INIT(SpeechSynthesisGetVoiceIdentifiers);
</span><span class="cx">         INIT(SpeechSynthesisGetDefaultVoiceIdentifierForLocale);
</span><span class="lines">@@ -158,6 +177,7 @@
</span><span class="cx">         INIT(AccessibilityHandleFocusChanged);
</span><span class="cx">         INIT(CreateAXUIElementRef);
</span><span class="cx">         INIT(UnregisterUniqueIdForElement);
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">         INIT(GetCFURLResponseMIMEType);
</span><span class="cx">         INIT(GetCFURLResponseURL);
</span><span class="lines">@@ -165,15 +185,17 @@
</span><span class="cx">         INIT(CopyCFURLResponseSuggestedFilename);
</span><span class="cx">         INIT(SetCFURLResponseMIMEType);
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">         INIT(CreateVMPressureDispatchOnMainQueue);
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">         INIT(DestroyRenderingResources);
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1080
</del><ins>+#if !PLATFORM(IOS)  &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1080
</ins><span class="cx">         INIT(ExecutableWasLinkedOnOrBeforeLion);
</span><span class="cx"> #endif
</span><span class="cx">         
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if !PLATFORM(IOS)  &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</ins><span class="cx">         INIT(CreateMemoryStatusPressureCriticalDispatchOnMainQueue);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -187,13 +209,23 @@
</span><span class="cx">         INIT(FilterIsBuffering);
</span><span class="cx">         INIT(FilterAddData);
</span><span class="cx">         INIT(FilterDataComplete);
</span><ins>+#if PLATFORM(IOS)
+        INIT(FilterUnblockWithCompletion);
</ins><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(IOS) &amp;&amp; PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1080
</span><span class="cx">         INIT(NSElasticDeltaForTimeDelta);
</span><span class="cx">         INIT(NSElasticDeltaForReboundDelta);
</span><span class="cx">         INIT(NSReboundDeltaForElasticDelta);
</span><span class="cx"> #endif
</span><ins>+#if PLATFORM(IOS)
+        INIT(ExecutableWasLinkedOnOrAfterIOSVersion);
+        INIT(GetDeviceClass);
+        INIT(GetViewportScreenSize);
+        INIT(GetScreenScaleFactor);
+        INIT(IsGB18030ComplianceRequired);
+#endif
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(PUBLIC_SUFFIX_LIST)
</span><span class="cx">         INIT(IsPublicSuffix);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -28,6 +28,10 @@
</span><span class="cx"> #include &lt;wtf/Functional.h&gt;
</span><span class="cx"> 
</span><span class="cx"> // Subclasses
</span><ins>+#if PLATFORM(IOS)
+#include &quot;TiledCoreAnimationDrawingAreaIOS.h&quot;
+#endif
+
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> #include &quot;RemoteLayerTreeDrawingArea.h&quot;
</span><span class="cx"> #include &quot;TiledCoreAnimationDrawingArea.h&quot;
</span><span class="lines">@@ -47,8 +51,13 @@
</span><span class="cx"> {
</span><span class="cx">     switch (parameters.drawingAreaType) {
</span><span class="cx"> #if PLATFORM(MAC)
</span><ins>+#if PLATFORM(IOS)
+    case DrawingAreaTypeTiledCoreAnimationIOS:
+        return std::make_unique&lt;TiledCoreAnimationDrawingAreaIOS&gt;(webPage, parameters);
+#else
</ins><span class="cx">     case DrawingAreaTypeTiledCoreAnimation:
</span><span class="cx">         return std::make_unique&lt;TiledCoreAnimationDrawingArea&gt;(webPage, parameters);
</span><ins>+#endif
</ins><span class="cx">     case DrawingAreaTypeRemoteLayerTree:
</span><span class="cx">         return std::make_unique&lt;RemoteLayerTreeDrawingArea&gt;(webPage, parameters);
</span><span class="cx"> #else
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebBackForwardListProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -62,6 +62,12 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void close();
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    virtual unsigned current() OVERRIDE;
+    virtual void setCurrent(unsigned newCurrent) OVERRIDE;
+    virtual bool clearAllPageCaches() OVERRIDE;
+#endif
+
</ins><span class="cx">     WebPage* m_page;
</span><span class="cx">     HashSet&lt;uint64_t&gt; m_associatedItemIDs;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -137,6 +137,7 @@
</span><span class="cx"> #include &lt;WebCore/SubstituteData.h&gt;
</span><span class="cx"> #include &lt;WebCore/TextIterator.h&gt;
</span><span class="cx"> #include &lt;WebCore/VisiblePosition.h&gt;
</span><ins>+#include &lt;WebCore/VisibleUnits.h&gt;
</ins><span class="cx"> #include &lt;WebCore/markup.h&gt;
</span><span class="cx"> #include &lt;runtime/JSCJSValue.h&gt;
</span><span class="cx"> #include &lt;runtime/JSLock.h&gt;
</span><span class="lines">@@ -273,6 +274,9 @@
</span><span class="cx">     , m_isShowingContextMenu(false)
</span><span class="cx"> #endif
</span><span class="cx">     , m_willGoToBackForwardItemCallbackEnabled(true)
</span><ins>+#if PLATFORM(IOS)
+    , m_shouldReturnWordAtSelection(false)
+#endif
</ins><span class="cx"> #if ENABLE(PAGE_VISIBILITY_API)
</span><span class="cx">     , m_visibilityState(WebCore::PageVisibilityStateVisible)
</span><span class="cx"> #endif
</span><span class="lines">@@ -437,10 +441,12 @@
</span><span class="cx">     for (HashSet&lt;PluginView*&gt;::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
</span><span class="cx">         (*it)-&gt;webPageDestroyed();
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     if (m_headerBanner)
</span><span class="cx">         m_headerBanner-&gt;detachFromPage();
</span><span class="cx">     if (m_footerBanner)
</span><span class="cx">         m_footerBanner-&gt;detachFromPage();
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx">     WebProcess::shared().removeMessageReceiver(Messages::WebPage::messageReceiverName(), m_pageID);
</span><span class="cx"> 
</span><span class="lines">@@ -612,6 +618,22 @@
</span><span class="cx">     result.hasComposition = frame.editor().hasComposition();
</span><span class="cx">     result.shouldIgnoreCompositionSelectionChange = frame.editor().ignoreCompositionSelectionChange();
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    FrameSelection&amp; selection = frame.selection();
+    if (selection.isCaret()) {
+        result.caretRectAtStart = selection.absoluteCaretBounds();
+        result.caretRectAtEnd = result.caretRectAtStart;
+        if (m_shouldReturnWordAtSelection)
+            result.wordAtSelection = plainText(wordRangeFromPosition(selection.start()).get());
+    } else if (selection.isRange()) {
+        result.caretRectAtStart = VisiblePosition(selection.start()).absoluteCaretBounds();
+        result.caretRectAtEnd = VisiblePosition(selection.end()).absoluteCaretBounds();
+        RefPtr&lt;Range&gt; selectedRange = selection.toNormalizedRange();
+        selectedRange-&gt;collectSelectionRects(result.selectionRects);
+        result.selectedTextLength = plainText(selectedRange.get(), TextIteratorDefaultBehavior, true).length();
+    }
+#endif
+
</ins><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx">     result.cursorRect = frame.selection().absoluteCaretBounds();
</span><span class="cx"> #endif
</span><span class="lines">@@ -1204,7 +1226,7 @@
</span><span class="cx">     m_page-&gt;setDeviceScaleFactor(scaleFactor);
</span><span class="cx"> 
</span><span class="cx">     // Tell all our plug-in views that the device scale factor changed.
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
</ins><span class="cx">     for (HashSet&lt;PluginView*&gt;::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
</span><span class="cx">         (*it)-&gt;setDeviceScaleFactor(scaleFactor);
</span><span class="cx"> 
</span><span class="lines">@@ -1359,6 +1381,7 @@
</span><span class="cx">     m_drawingArea-&gt;didUninstallPageOverlay(pageOverlay);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> void WebPage::setHeaderPageBanner(PassRefPtr&lt;PageBanner&gt; pageBanner)
</span><span class="cx"> {
</span><span class="cx">     if (m_headerBanner)
</span><span class="lines">@@ -1406,6 +1429,7 @@
</span><span class="cx">     if (m_footerBanner)
</span><span class="cx">         m_footerBanner-&gt;showIfHidden();
</span><span class="cx"> }
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;WebImage&gt; WebPage::scaledSnapshotWithOptions(const IntRect&amp; rect, double scaleFactor, SnapshotOptions options)
</span><span class="cx"> {
</span><span class="lines">@@ -1601,10 +1625,12 @@
</span><span class="cx">                 break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     if (!handled &amp;&amp; m_headerBanner)
</span><span class="cx">         handled = m_headerBanner-&gt;mouseEvent(mouseEvent);
</span><span class="cx">     if (!handled &amp;&amp; m_footerBanner)
</span><span class="cx">         handled = m_footerBanner-&gt;mouseEvent(mouseEvent);
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx">     if (!handled &amp;&amp; canHandleUserEvents()) {
</span><span class="cx">         CurrentEvent currentEvent(mouseEvent);
</span><span class="lines">@@ -1631,10 +1657,12 @@
</span><span class="cx">             if ((handled = (*it)-&gt;mouseEvent(mouseEvent)))
</span><span class="cx">                 break;
</span><span class="cx">     }
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     if (!handled &amp;&amp; m_headerBanner)
</span><span class="cx">         handled = m_headerBanner-&gt;mouseEvent(mouseEvent);
</span><span class="cx">     if (!handled &amp;&amp; m_footerBanner)
</span><span class="cx">         handled = m_footerBanner-&gt;mouseEvent(mouseEvent);
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx">     if (!handled) {
</span><span class="cx">         CurrentEvent currentEvent(mouseEvent);
</span><span class="lines">@@ -1964,7 +1992,7 @@
</span><span class="cx">         m_page-&gt;setCanStartMedia(true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if !PLATFORM(MAC)
</del><ins>+#if !PLATFORM(MAC) || PLATFORM(IOS)
</ins><span class="cx"> void WebPage::didUpdateViewStateTimerFired()
</span><span class="cx"> {
</span><span class="cx">     send(Messages::WebPageProxy::DidUpdateViewState());
</span><span class="lines">@@ -2818,11 +2846,13 @@
</span><span class="cx">     notificationPermissionRequestManager()-&gt;didReceiveNotificationPermissionDecision(notificationID, allowed);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> void WebPage::advanceToNextMisspelling(bool startBeforeSelection)
</span><span class="cx"> {
</span><span class="cx">     Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
</span><span class="cx">     frame.editor().advanceToNextMisspelling(startBeforeSelection);
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> void WebPage::changeSpellingToWord(const String&amp; word)
</span><span class="cx"> {
</span><span class="lines">@@ -3233,7 +3263,7 @@
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
</ins><span class="cx"> RetainPtr&lt;PDFDocument&gt; WebPage::pdfDocumentForPrintingFrame(Frame* coreFrame)
</span><span class="cx"> {
</span><span class="cx">     Document* document = coreFrame-&gt;document();
</span><span class="lines">@@ -3261,7 +3291,7 @@
</span><span class="cx">     if (!coreFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
</ins><span class="cx">     if (pdfDocumentForPrintingFrame(coreFrame))
</span><span class="cx">         return;
</span><span class="cx"> #endif // PLATFORM(MAC)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -75,8 +75,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><ins>+#if PLATFORM(IOS)
+#include &lt;WebCore/PlatformTouchEventIOS.h&gt;
+#else
</ins><span class="cx"> #include &lt;WebCore/PlatformTouchEvent.h&gt;
</span><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><span class="cx"> #include &quot;InjectedBundlePageContextMenuClient.h&quot;
</span><span class="lines">@@ -108,6 +112,7 @@
</span><span class="cx">     class Frame;
</span><span class="cx">     class FrameView;
</span><span class="cx">     class HTMLPlugInElement;
</span><ins>+    class IntPoint;
</ins><span class="cx">     class KeyboardEvent;
</span><span class="cx">     class Page;
</span><span class="cx">     class PrintContext;
</span><span class="lines">@@ -351,8 +356,10 @@
</span><span class="cx"> 
</span><span class="cx">     bool hasCachedWindowFrame() const { return m_hasCachedWindowFrame; }
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     void setTopOverhangImage(PassRefPtr&lt;WebImage&gt;);
</span><span class="cx">     void setBottomOverhangImage(PassRefPtr&lt;WebImage&gt;);
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx">     void updateHeaderAndFooterLayersForDeviceScaleChange(float scaleFactor);
</span><span class="cx"> #endif // PLATFORM(MAC)
</span><span class="lines">@@ -364,6 +371,7 @@
</span><span class="cx">     bool hasPageOverlay() const { return m_pageOverlays.size(); }
</span><span class="cx">     PageOverlayList&amp; pageOverlays() { return m_pageOverlays; }
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     void setHeaderPageBanner(PassRefPtr&lt;PageBanner&gt;);
</span><span class="cx">     PageBanner* headerPageBanner();
</span><span class="cx">     void setFooterPageBanner(PassRefPtr&lt;PageBanner&gt;);
</span><span class="lines">@@ -371,6 +379,7 @@
</span><span class="cx"> 
</span><span class="cx">     void hidePageBanners();
</span><span class="cx">     void showPageBanners();
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx">     WebCore::IntPoint screenToWindow(const WebCore::IntPoint&amp;);
</span><span class="cx">     WebCore::IntRect windowToScreen(const WebCore::IntRect&amp;);
</span><span class="lines">@@ -385,6 +394,21 @@
</span><span class="cx">     GeolocationPermissionRequestManager&amp; geolocationPermissionRequestManager() { return m_geolocationPermissionRequestManager; }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    void handleTap(const WebCore::IntPoint&amp;);
+    void tapHighlightAtPosition(uint64_t requestID, const WebCore::FloatPoint&amp;);
+
+    void blurAssistedNode();
+    void selectWithGesture(const WebCore::IntPoint&amp;, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID);
+    void updateSelectionWithTouches(const WebCore::IntPoint&amp; point, uint32_t touches, bool baseIsStart, uint64_t callbackID);
+    void selectWithTwoTouches(const WebCore::IntPoint&amp; from, const WebCore::IntPoint&amp; to, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID);
+    void extendSelection(uint32_t granularity);
+    void elementDidFocus(WebCore::Node*);
+    void elementDidBlur(WebCore::Node*);
+    void requestAutocorrectionData(const String&amp; textForAutocorrection, uint64_t callbackID);
+    void applyAutocorrection(const String&amp; correction, const String&amp; originalText, uint64_t callbackID);
+#endif
+
</ins><span class="cx">     NotificationPermissionRequestManager* notificationPermissionRequestManager();
</span><span class="cx"> 
</span><span class="cx">     void pageDidScroll();
</span><span class="lines">@@ -580,6 +604,11 @@
</span><span class="cx"> #endif
</span><span class="cx">     void setThrottled(bool isThrottled);
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    void didFinishScrolling(const WebCore::FloatPoint&amp; contentOffset);
+    void didFinishZooming(float);
+#endif
+
</ins><span class="cx"> #if PLATFORM(GTK) &amp;&amp; USE(TEXTURE_MAPPER_GL)
</span><span class="cx">     uint64_t nativeWindowHandle() { return m_nativeWindowHandle; }
</span><span class="cx"> #endif
</span><span class="lines">@@ -902,8 +931,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     RefPtr&lt;PageBanner&gt; m_headerBanner;
</span><span class="cx">     RefPtr&lt;PageBanner&gt; m_footerBanner;
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx"> 
</span><span class="cx">     RunLoop::Timer&lt;WebPage&gt; m_setCanStartMediaTimer;
</span><span class="cx">     RunLoop::Timer&lt;WebPage&gt; m_sendDidUpdateViewStateTimer;
</span><span class="lines">@@ -983,7 +1014,13 @@
</span><span class="cx"> #endif
</span><span class="cx">     
</span><span class="cx">     bool m_willGoToBackForwardItemCallbackEnabled;
</span><del>-    
</del><ins>+
+#if PLATFORM(IOS)
+    RefPtr&lt;WebCore::Node&gt; m_assistedNode;
+    RefPtr&lt;WebCore::Range&gt; m_currentWordRange;
+    bool m_shouldReturnWordAtSelection;
+#endif
+
</ins><span class="cx"> #if ENABLE(PAGE_VISIBILITY_API)
</span><span class="cx">     WebCore::PageVisibilityState m_visibilityState;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -37,6 +37,18 @@
</span><span class="cx">     MouseEvent(WebKit::WebMouseEvent event)
</span><span class="cx">     MouseEventSyncForTesting(WebKit::WebMouseEvent event) -&gt; (bool handled)
</span><span class="cx">     WheelEventSyncForTesting(WebKit::WebWheelEvent event) -&gt; (bool handled)
</span><ins>+#if PLATFORM(IOS)
+    HandleTap(WebCore::IntPoint point)
+    TapHighlightAtPosition(uint64_t requestID, WebCore::FloatPoint point)
+    BlurAssistedNode()
+    SelectWithGesture(WebCore::IntPoint point, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID)
+    UpdateSelectionWithTouches(WebCore::IntPoint point, uint32_t touches, bool baseIsStart, uint64_t callbackID)
+    SelectWithTwoTouches(WebCore::IntPoint from, WebCore::IntPoint to, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID)
+    ExtendSelection(uint32_t granularity)
+    RequestAutocorrectionData(String textForAutocorrection, uint64_t callbackID)
+    ApplyAutocorrection(String correction, String originalText, uint64_t callbackID)
+#endif
+
</ins><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx">     TouchEvent(WebKit::WebTouchEvent event)
</span><span class="cx">     TouchEventSyncForTesting(WebKit::WebTouchEvent event) -&gt; (bool handled)
</span><span class="lines">@@ -290,6 +302,11 @@
</span><span class="cx">     SetVisibilityState(uint32_t visibilityState, bool isInitialState)
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    DidFinishScrolling(WebCore::FloatPoint contentOffset);
+    DidFinishZooming(float scale);
+#endif
+
</ins><span class="cx"> #if PLATFORM(GTK) &amp;&amp; USE(TEXTURE_MAPPER_GL)
</span><span class="cx">     SetAcceleratedCompositingWindowId(int64_t id)
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosTiledCoreAnimationDrawingAreaIOSh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/WebPage/ios/TiledCoreAnimationDrawingAreaIOS.h (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/TiledCoreAnimationDrawingAreaIOS.h                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/TiledCoreAnimationDrawingAreaIOS.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+/*
+ * Copyright (C) 2012 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.
+ */
+
+#ifndef TiledCoreAnimationDrawingAreaIOS_h
+#define TiledCoreAnimationDrawingAreaIOS_h
+
+#include &quot;DrawingArea.h&quot;
+#include &lt;WebCore/GraphicsLayerClient.h&gt;
+#include &lt;WebCore/LayerFlushScheduler.h&gt;
+#include &lt;WebCore/LayerFlushSchedulerClient.h&gt;
+#include &lt;wtf/RetainPtr.h&gt;
+
+OBJC_CLASS CAContext;
+OBJC_CLASS CALayer;
+
+namespace WebKit {
+
+class TiledCoreAnimationDrawingAreaIOS : public DrawingArea, private WebCore::GraphicsLayerClient, private WebCore::LayerFlushSchedulerClient {
+public:
+    TiledCoreAnimationDrawingAreaIOS(WebPage*, const WebPageCreationParameters&amp;);
+    virtual ~TiledCoreAnimationDrawingAreaIOS();
+
+private:
+    // DrawingArea
+    virtual void setNeedsDisplay() OVERRIDE;
+    virtual void setNeedsDisplayInRect(const WebCore::IntRect&amp;) OVERRIDE;
+    virtual void scroll(const WebCore::IntRect&amp; scrollRect, const WebCore::IntSize&amp; scrollOffset) OVERRIDE;
+    virtual void setRootCompositingLayer(WebCore::GraphicsLayer*) OVERRIDE;
+    virtual void scheduleCompositingLayerFlush() OVERRIDE;
+
+    // GraphicsLayerClient
+    virtual bool shouldUseTiledBacking(const WebCore::GraphicsLayer*) const OVERRIDE;
+    virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) OVERRIDE;
+    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) OVERRIDE;
+    
+    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&amp;, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect&amp; inClip) OVERRIDE;
+    
+    virtual float minimumDocumentScale() const OVERRIDE;
+    virtual bool allowCompositingLayerVisualDegradation() const OVERRIDE;
+
+    // LayerFlushSchedulerClient
+    virtual bool flushLayers() OVERRIDE;
+
+    // Message handlers.
+    virtual void updateGeometry(const WebCore::IntSize&amp; viewSize, const WebCore::IntSize&amp; layerPosition);
+    virtual void setDeviceScaleFactor(float) OVERRIDE;
+
+    WebCore::LayerFlushScheduler m_layerFlushScheduler;
+
+    RetainPtr&lt;CAContext&gt; m_context;
+    RetainPtr&lt;CALayer&gt; m_rootLayer;
+
+    OwnPtr&lt;WebCore::GraphicsLayer&gt; m_contentLayer;
+};
+
+} // namespace WebKit
+
+#endif // TiledCoreAnimationDrawingAreaIOS_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosTiledCoreAnimationDrawingAreaIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/WebPage/ios/TiledCoreAnimationDrawingAreaIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/TiledCoreAnimationDrawingAreaIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/TiledCoreAnimationDrawingAreaIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,165 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;TiledCoreAnimationDrawingAreaIOS.h&quot;
+
+#import &quot;DrawingAreaProxyMessages.h&quot;
+#import &quot;WebPage.h&quot;
+#import &lt;QuartzCore/CAContext.h&gt;
+#import &lt;QuartzCore/QuartzCore.h&gt;
+#import &lt;UIKit/UIKit.h&gt;
+#import &lt;WebCore/Frame.h&gt;
+#import &lt;WebCore/FrameView.h&gt;
+#import &lt;WebCore/GraphicsContext.h&gt;
+#import &lt;WebCore/GraphicsLayerCA.h&gt;
+#import &lt;WebCore/MainFrame.h&gt;
+#import &lt;WebCore/NotImplemented.h&gt;
+#import &lt;WebCore/Page.h&gt;
+#import &lt;WebCore/PlatformCALayer.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+TiledCoreAnimationDrawingAreaIOS::~TiledCoreAnimationDrawingAreaIOS()
+{
+    m_layerFlushScheduler.invalidate();
+}
+
+TiledCoreAnimationDrawingAreaIOS::TiledCoreAnimationDrawingAreaIOS(WebPage* webPage, const WebPageCreationParameters&amp; parameters)
+    : DrawingArea(DrawingAreaTypeTiledCoreAnimationIOS, webPage)
+    , m_layerFlushScheduler(this)
+{
+    Page* page = webPage-&gt;corePage();
+
+    page-&gt;settings().setForceCompositingMode(true);
+    page-&gt;settings().setScrollingCoordinatorEnabled(true);
+    page-&gt;settings().setDelegatesPageScaling(true);
+    
+    m_rootLayer = [CALayer layer];
+    CGRect rootLayerFrame = m_webPage-&gt;bounds();
+    m_rootLayer.get().frame = rootLayerFrame;
+    m_rootLayer.get().opaque = YES;
+
+    RetainPtr&lt;NSMutableDictionary&gt; options = adoptNS([[NSMutableDictionary alloc] init]);
+
+    [options.get() setObject:@YES forKey:kCAContextIgnoresHitTest];
+
+    m_context = [CAContext remoteContextWithOptions:options.get()];
+    [m_context.get() setLevel:-CGFLOAT_MAX];
+    
+    [m_context.get() setLayer:m_rootLayer.get()];
+
+    LayerTreeContext layerTreeContext;
+    layerTreeContext.contextID = [m_context.get() contextId];
+
+    m_webPage-&gt;send(Messages::DrawingAreaProxy::EnterAcceleratedCompositingMode(0, layerTreeContext));
+
+    page-&gt;settings().setShowDebugBorders(true);
+    page-&gt;settings().setShowRepaintCounter(false);
+}
+
+void TiledCoreAnimationDrawingAreaIOS::setNeedsDisplay()
+{
+    notImplemented();
+}
+
+void TiledCoreAnimationDrawingAreaIOS::setNeedsDisplayInRect(const WebCore::IntRect&amp;)
+{
+    notImplemented();
+}
+
+void TiledCoreAnimationDrawingAreaIOS::scroll(const IntRect&amp;, const IntSize&amp;)
+{
+    notImplemented();
+}
+
+void TiledCoreAnimationDrawingAreaIOS::setRootCompositingLayer(GraphicsLayer* graphicsLayer)
+{
+    CALayer *rootCompositingLayer = graphicsLayer ? graphicsLayer-&gt;platformLayer() : nil;
+    if (!rootCompositingLayer)
+        return;
+
+    [CATransaction begin];
+    [CATransaction setDisableActions:YES];
+    
+    m_rootLayer.get().sublayers = [NSArray arrayWithObject:rootCompositingLayer];
+
+    [CATransaction commit];
+}
+
+void TiledCoreAnimationDrawingAreaIOS::scheduleCompositingLayerFlush()
+{
+    m_layerFlushScheduler.schedule();
+}
+
+bool TiledCoreAnimationDrawingAreaIOS::shouldUseTiledBacking(const GraphicsLayer*) const
+{
+    return true;
+}
+
+void TiledCoreAnimationDrawingAreaIOS::notifyAnimationStarted(const GraphicsLayer*, double time)
+{
+}
+    
+void TiledCoreAnimationDrawingAreaIOS::notifyFlushRequired(const GraphicsLayer*)
+{
+}
+
+void TiledCoreAnimationDrawingAreaIOS::paintContents(const GraphicsLayer*, GraphicsContext&amp; graphicsContext, GraphicsLayerPaintingPhase, const IntRect&amp; clipRect)
+{
+}
+
+float TiledCoreAnimationDrawingAreaIOS::minimumDocumentScale() const
+{
+    return 1.0;
+}
+
+bool TiledCoreAnimationDrawingAreaIOS::allowCompositingLayerVisualDegradation() const
+{
+    return false;
+}
+
+bool TiledCoreAnimationDrawingAreaIOS::flushLayers()
+{
+    @autoreleasepool {
+        m_webPage-&gt;layoutIfNeeded();
+        return m_webPage-&gt;corePage()-&gt;mainFrame().view()-&gt;flushCompositingStateIncludingSubframes();
+    }
+}
+
+void TiledCoreAnimationDrawingAreaIOS::updateGeometry(const IntSize&amp; viewSize, const WebCore::IntSize&amp; layerPosition)
+{
+    m_webPage-&gt;setSize(viewSize);
+    m_webPage-&gt;layoutIfNeeded();
+}
+
+void TiledCoreAnimationDrawingAreaIOS::setDeviceScaleFactor(float deviceScaleFactor)
+{
+    m_webPage-&gt;setDeviceScaleFactor(deviceScaleFactor);
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebBackForwardListProxyIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;WebBackForwardListProxy.h&quot;
+
+#import &lt;WebCore/NotImplemented.h&gt;
+
+namespace WebKit {
+
+unsigned WebBackForwardListProxy::current()
+{
+    notImplemented();
+    return 0;
+}
+
+void WebBackForwardListProxy::setCurrent(unsigned)
+{
+    notImplemented();
+}
+
+bool WebBackForwardListProxy::clearAllPageCaches()
+{
+    notImplemented();
+    return false;
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,756 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;WebPage.h&quot;
+
+#import &quot;EditorState.h&quot;
+#import &quot;WebChromeClient.h&quot;
+#import &quot;WebCoreArgumentCoders.h&quot;
+#import &quot;WebFrame.h&quot;
+#import &quot;WebPageProxyMessages.h&quot;
+#import &quot;WebProcess.h&quot;
+#import &quot;WKGestureTypes.h&quot;
+#import &lt;CoreText/CTFont.h&gt;
+#import &lt;WebCore/Chrome.h&gt;
+#import &lt;WebCore/Element.h&gt;
+#import &lt;WebCore/EventHandler.h&gt;
+#import &lt;WebCore/FocusController.h&gt;
+#import &lt;WebCore/FloatQuad.h&gt;
+#import &lt;WebCore/Frame.h&gt;
+#import &lt;WebCore/FrameView.h&gt;
+#import &lt;WebCore/MainFrame.h&gt;
+#import &lt;WebCore/NotImplemented.h&gt;
+#import &lt;WebCore/Page.h&gt;
+#import &lt;WebCore/PlatformKeyboardEvent.h&gt;
+#import &lt;WebCore/PlatformMouseEvent.h&gt;
+#import &lt;WebCore/SharedBuffer.h&gt;
+#import &lt;WebCore/TextIterator.h&gt;
+#import &lt;WebCore/VisibleUnits.h&gt;
+#import &lt;WebCore/WebEvent.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebPage::platformInitialize()
+{
+    notImplemented();
+}
+
+void WebPage::platformPreferencesDidChange(const WebPreferencesStore&amp;)
+{
+    notImplemented();
+}
+
+bool WebPage::executeKeypressCommandsInternal(const Vector&lt;WebCore::KeypressCommand&gt;&amp;, KeyboardEvent*)
+{
+    notImplemented();
+    return false;
+}
+
+bool WebPage::handleEditingKeyboardEvent(KeyboardEvent* event, bool)
+{
+    bool eventWasHandled = false;
+    bool sendResult = WebProcess::shared().parentProcessConnection()-&gt;sendSync(Messages::WebPageProxy::InterpretKeyEvent(editorState(), event-&gt;keyEvent()-&gt;type() == PlatformKeyboardEvent::Char),
+                                                                               Messages::WebPageProxy::InterpretKeyEvent::Reply(eventWasHandled), m_pageID);
+    if (!sendResult)
+        return false;
+
+    return eventWasHandled;
+}
+
+void WebPage::sendComplexTextInputToPlugin(uint64_t, const String&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::setComposition(const String&amp;, Vector&lt;CompositionUnderline&gt;, uint64_t, uint64_t, uint64_t, uint64_t, EditorState&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::confirmComposition(EditorState&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::cancelComposition(EditorState&amp;)
+{
+    notImplemented();
+}
+
+static PassRefPtr&lt;Range&gt; convertToRange(Frame* frame, NSRange nsrange)
+{
+    if (nsrange.location &gt; INT_MAX)
+        return 0;
+    if (nsrange.length &gt; INT_MAX || nsrange.location + nsrange.length &gt; INT_MAX)
+        nsrange.length = INT_MAX - nsrange.location;
+    
+    // our critical assumption is that we are only called by input methods that
+    // concentrate on a given area containing the selection
+    // We have to do this because of text fields and textareas. The DOM for those is not
+    // directly in the document DOM, so serialization is problematic. Our solution is
+    // to use the root editable element of the selection start as the positional base.
+    // That fits with AppKit's idea of an input context.
+    return TextIterator::rangeFromLocationAndLength(frame-&gt;selection().rootEditableElementOrDocumentElement(), nsrange.location, nsrange.length);
+}
+
+void WebPage::insertText(const String&amp; text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, bool&amp; handled, EditorState&amp; newState)
+{
+    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
+    
+    if (replacementRangeStart != NSNotFound) {
+        RefPtr&lt;Range&gt; replacementRange = convertToRange(&amp;frame, NSMakeRange(replacementRangeStart, replacementRangeEnd - replacementRangeStart));
+        if (replacementRange)
+            frame.selection().setSelection(VisibleSelection(replacementRange.get(), SEL_DEFAULT_AFFINITY));
+    }
+    
+    if (!frame.editor().hasComposition()) {
+        // An insertText: might be handled by other responders in the chain if we don't handle it.
+        // One example is space bar that results in scrolling down the page.
+        handled = frame.editor().insertText(text, 0);
+    } else {
+        handled = true;
+        frame.editor().confirmComposition(text);
+    }
+    
+    newState = editorState();
+}
+
+void WebPage::insertDictatedText(const String&amp;, uint64_t, uint64_t, const Vector&lt;WebCore::DictationAlternative&gt;&amp;, bool&amp;, EditorState&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::getMarkedRange(uint64_t&amp;, uint64_t&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::getSelectedRange(uint64_t&amp;, uint64_t&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::getAttributedSubstringFromRange(uint64_t, uint64_t, AttributedString&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::characterIndexForPoint(IntPoint, uint64_t&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::firstRectForCharacterRange(uint64_t, uint64_t, WebCore::IntRect&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::executeKeypressCommands(const Vector&lt;WebCore::KeypressCommand&gt;&amp;, bool&amp;, EditorState&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::performDictionaryLookupAtLocation(const FloatPoint&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::performDictionaryLookupForSelection(Frame*, const VisibleSelection&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::performDictionaryLookupForRange(Frame*, Range*, NSDictionary *)
+{
+    notImplemented();
+}
+
+bool WebPage::performNonEditingBehaviorForSelector(const String&amp;, WebCore::KeyboardEvent*)
+{
+    notImplemented();
+    return false;
+}
+
+bool WebPage::performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&amp;)
+{
+    notImplemented();
+    return false;
+}
+
+void WebPage::registerUIProcessAccessibilityTokens(const CoreIPC::DataReference&amp;, const CoreIPC::DataReference&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::readSelectionFromPasteboard(const String&amp;, bool&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::getStringSelectionForPasteboard(String&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::getDataSelectionForPasteboard(const String, SharedMemory::Handle&amp;, uint64_t&amp;)
+{
+    notImplemented();
+}
+
+WKAccessibilityWebPageObject* WebPage::accessibilityRemoteObject()
+{
+    notImplemented();
+    return 0;
+}
+
+bool WebPage::platformHasLocalDataForURL(const WebCore::URL&amp;)
+{
+    notImplemented();
+    return false;
+}
+
+String WebPage::cachedSuggestedFilenameForURL(const URL&amp;)
+{
+    notImplemented();
+    return String();
+}
+
+String WebPage::cachedResponseMIMETypeForURL(const URL&amp;)
+{
+    notImplemented();
+    return String();
+}
+
+PassRefPtr&lt;SharedBuffer&gt; WebPage::cachedResponseDataForURL(const URL&amp;)
+{
+    notImplemented();
+    return 0;
+}
+
+bool WebPage::platformCanHandleRequest(const WebCore::ResourceRequest&amp;)
+{
+    notImplemented();
+    return false;
+}
+
+void WebPage::shouldDelayWindowOrderingEvent(const WebKit::WebMouseEvent&amp;, bool&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::acceptsFirstMouse(int, const WebKit::WebMouseEvent&amp;, bool&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::setLayerHostingMode(LayerHostingMode)
+{
+    notImplemented();
+}
+
+void WebPage::computePagesForPrintingPDFDocument(uint64_t, const PrintInfo&amp;, Vector&lt;IntRect&gt;&amp;)
+{
+    notImplemented();
+}
+
+void WebPage::drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&amp;, uint32_t, uint32_t)
+{
+    notImplemented();
+}
+
+void WebPage::advanceToNextMisspelling(bool)
+{
+    notImplemented();
+}
+
+void WebPage::handleTap(const IntPoint&amp; point)
+{
+    Frame&amp; mainframe = m_page-&gt;mainFrame();
+    FloatPoint adjustedPoint;
+    mainframe.nodeRespondingToClickEvents(point, adjustedPoint);
+    IntPoint roundedAdjustedPoint = roundedIntPoint(adjustedPoint);
+
+    mainframe.eventHandler().mouseMoved(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, 0));
+    mainframe.eventHandler().handleMousePressEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MousePressed, 1, false, false, false, false, 0));
+    mainframe.eventHandler().handleMouseReleaseEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MouseReleased, 1, false, false, false, false, 0));
+}
+
+void WebPage::tapHighlightAtPosition(uint64_t requestID, const FloatPoint&amp; position)
+{
+    Frame&amp; mainframe = m_page-&gt;mainFrame();
+    FloatPoint adjustedPoint;
+    Node* node = mainframe.nodeRespondingToClickEvents(position, adjustedPoint);
+
+    if (!node)
+        return;
+
+    RenderObject *renderer = node-&gt;renderer();
+
+    Vector&lt;FloatQuad&gt; quads;
+    if (renderer) {
+        renderer-&gt;absoluteQuads(quads);
+        Color highlightColor = node-&gt;computedStyle()-&gt;tapHighlightColor();
+
+        RoundedRect::Radii borderRadii;
+        if (renderer-&gt;isBox()) {
+            RenderBox* box = toRenderBox(renderer);
+            borderRadii = box-&gt;borderRadii();
+        }
+
+        send(Messages::WebPageProxy::DidGetTapHighlightGeometries(requestID, highlightColor, quads, borderRadii.topLeft(), borderRadii.topRight(), borderRadii.bottomLeft(), borderRadii.bottomRight()));
+    }
+}
+
+void WebPage::blurAssistedNode()
+{
+    if (m_assistedNode &amp;&amp; m_assistedNode-&gt;isElementNode())
+        toElement(m_assistedNode.get())-&gt;blur();
+}
+
+static FloatQuad innerFrameQuad(Frame* frame, Node* assistedNode)
+{
+    frame-&gt;document()-&gt;updateLayoutIgnorePendingStylesheets();
+    RenderObject* renderer;
+    if (assistedNode-&gt;hasTagName(HTMLNames::textareaTag) || assistedNode-&gt;hasTagName(HTMLNames::inputTag))
+        renderer = assistedNode-&gt;renderer();
+    else
+        renderer = assistedNode-&gt;rootEditableElement()-&gt;renderer();
+    
+    if (!renderer)
+        return FloatQuad();
+
+    RenderStyle&amp; style = renderer-&gt;style();
+    IntRect boundingBox = renderer-&gt;absoluteBoundingBoxRect(true /* use transforms*/);
+
+    boundingBox.move(style.borderLeftWidth(), style.borderTopWidth());
+    boundingBox.setWidth(boundingBox.width() - style.borderLeftWidth() - style.borderRightWidth());
+    boundingBox.setHeight(boundingBox.height() - style.borderBottomWidth() - style.borderTopWidth());
+
+    return FloatQuad(boundingBox);
+}
+
+static IntPoint constrainPoint(const IntPoint&amp; point, Frame* frame, Node* assistedNode)
+{
+    const int DEFAULT_CONSTRAIN_INSET = 2;
+    IntRect innerFrame = innerFrameQuad(frame, assistedNode).enclosingBoundingBox();
+    IntPoint constrainedPoint = point;
+
+    int minX = innerFrame.x() + DEFAULT_CONSTRAIN_INSET;
+    int maxX = innerFrame.maxX() - DEFAULT_CONSTRAIN_INSET;
+    int minY = innerFrame.y() + DEFAULT_CONSTRAIN_INSET;
+    int maxY = innerFrame.maxY() - DEFAULT_CONSTRAIN_INSET;
+
+    if (point.x() &lt; minX)
+        constrainedPoint.setX(minX);
+    else if (point.x() &gt; maxX)
+        constrainedPoint.setX(maxX);
+
+    if (point.y() &lt; minY)
+        constrainedPoint.setY(minY);
+    else if (point.y() &gt;= maxY)
+        constrainedPoint.setY(maxY);
+                    
+    return constrainedPoint;
+}
+
+void WebPage::selectWithGesture(const IntPoint&amp; point, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID)
+{
+    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
+    FloatPoint adjustedPoint(point);
+    Node* node = frame.nodeRespondingToClickEvents(FloatPoint(point), adjustedPoint);
+    if (node &amp;&amp; node != m_assistedNode.get()) {
+        handleTap(IntPoint(adjustedPoint));
+        if (!m_assistedNode) {
+            send(Messages::WebPageProxy::GestureCallback(point, gestureType, gestureState, 0, callbackID));
+            return;
+        }
+    }
+    IntPoint constrainedPoint = constrainPoint(point, &amp;frame, m_assistedNode.get());
+    VisiblePosition position = frame.visiblePositionForPoint(constrainedPoint);
+    if (position.isNull()) {
+        send(Messages::WebPageProxy::GestureCallback(point, gestureType, gestureState, 0, callbackID));
+        return;
+    }
+    RefPtr&lt;Range&gt; range;
+    switch (static_cast&lt;WKGestureType&gt;(gestureType)) {
+    case WKGestureOneFingerTap:
+    {
+        VisiblePosition result;
+        // move the the position at the end of the word
+        if (atBoundaryOfGranularity(position, LineGranularity, DirectionForward)) {
+            // Don't cross line boundaries.
+            result = position;
+        } else if (withinTextUnitOfGranularity(position, WordGranularity, DirectionForward)) {
+            // The position lies within a word.
+            RefPtr&lt;Range&gt; wordRange = enclosingTextUnitOfGranularity(position, WordGranularity, DirectionForward);
+
+            result = wordRange-&gt;startPosition();
+            if (distanceBetweenPositions(position, result) &gt; 1)
+                result = wordRange-&gt;endPosition();
+        } else if (atBoundaryOfGranularity(position, WordGranularity, DirectionBackward)) {
+            // The position is at the end of a word.
+            result = position;
+        } else {
+            // The position is not within a word.
+            // Go to the next boundary.
+            result = positionOfNextBoundaryOfGranularity(position, WordGranularity, DirectionForward);
+
+            // If there is no such boundary we go to the end of the element.
+            if (result.isNull())
+                result = endOfEditableContent(position);
+        }
+        if (result.isNotNull())
+            range = Range::create(*frame.document(), result, result);
+        if (range)
+            m_shouldReturnWordAtSelection = true;
+    }
+        break;
+
+    case WKGestureLoupe:
+        range = Range::create(*frame.document(), position, position);
+        break;
+
+    case WKGestureTapAndAHalf:
+        switch (static_cast&lt;WKGestureRecognizerState&gt;(gestureState)) {
+        case WKGestureRecognizerStateBegan:
+            range = wordRangeFromPosition(position);
+            m_currentWordRange = Range::create(*frame.document(), range-&gt;startPosition(), range-&gt;endPosition());
+            break;
+        case WKGestureRecognizerStateChanged:
+        {
+            range = Range::create(*frame.document(), m_currentWordRange-&gt;startPosition(), m_currentWordRange-&gt;endPosition());
+            ExceptionCode ec;
+            if (position &lt; range-&gt;startPosition())
+                range-&gt;setStart(position.deepEquivalent(), ec);
+            if (position &gt; range-&gt;endPosition())
+                range-&gt;setEnd(position.deepEquivalent(), ec);
+        }
+            break;
+        case WKGestureRecognizerStateEnded:
+        case WKGestureRecognizerStateCancelled:
+            m_currentWordRange = nullptr;
+            break;
+        case WKGestureRecognizerStateFailed:
+        case WKGestureRecognizerStatePossible:
+            ASSERT_NOT_REACHED();
+        }
+        break;
+
+    case WKGestureOneFingerDoubleTap:
+        if (atBoundaryOfGranularity(position, LineGranularity, DirectionForward)) {
+            // Double-tap at end of line only places insertion point there.
+            // This helps to get the callout for pasting at ends of lines,
+            // paragraphs, and documents.
+            range = Range::create(*frame.document(), position, position);
+         } else
+            range = wordRangeFromPosition(position);
+        break;
+
+    case WKGestureTwoFingerSingleTap:
+        // Single tap with two fingers selects the entire paragraph.
+        range = enclosingTextUnitOfGranularity(position, ParagraphGranularity, DirectionForward);
+        break;
+
+    case WKGestureOneFingerTripleTap:
+        if (atBoundaryOfGranularity(position, LineGranularity, DirectionForward)) {
+            // Triple-tap at end of line only places insertion point there.
+            // This helps to get the callout for pasting at ends of lines,
+            // paragraphs, and documents.
+            range = Range::create(*frame.document(), position, position);
+        } else
+            range = enclosingTextUnitOfGranularity(position, ParagraphGranularity, DirectionForward);
+        break;
+        
+    default:
+        break;
+    }
+    if (range)
+        frame.selection().setSelectedRange(range.get(), position.affinity(), true);
+
+    send(Messages::WebPageProxy::GestureCallback(point, gestureType, gestureState, 0, callbackID));
+    m_shouldReturnWordAtSelection = false;
+}
+
+static PassRefPtr&lt;Range&gt; rangeForPosition(Frame* frame, const VisiblePosition&amp; position, bool baseIsStart)
+{
+    RefPtr&lt;Range&gt; range;
+    VisiblePosition result = position;
+
+    if (baseIsStart) {
+        VisiblePosition selectionStart = frame-&gt;selection().selection().visibleStart();
+        bool wouldFlip = position &lt;= selectionStart;
+
+        if (wouldFlip)
+            result = selectionStart.next();
+
+        if (result.isNotNull())
+            range = Range::create(*frame-&gt;document(), selectionStart, result);
+    } else {
+        VisiblePosition selectionEnd = frame-&gt;selection().selection().visibleEnd();
+        bool wouldFlip = position &gt;= selectionEnd;
+
+        if (wouldFlip)
+            result = selectionEnd.previous();
+
+        if (result.isNotNull())
+            range = Range::create(*frame-&gt;document(), result, selectionEnd);
+    }
+
+    return range.release();
+}
+
+static PassRefPtr&lt;Range&gt; rangeAtWordBoundaryForPosition(Frame* frame, const VisiblePosition&amp; position, bool baseIsStart, SelectionDirection direction)
+{
+    SelectionDirection sameDirection = baseIsStart ? DirectionForward : DirectionBackward;
+    SelectionDirection oppositeDirection = baseIsStart ? DirectionBackward : DirectionForward;
+    VisiblePosition base = baseIsStart ? frame-&gt;selection().selection().visibleStart() : frame-&gt;selection().selection().visibleEnd();
+    VisiblePosition extent = baseIsStart ? frame-&gt;selection().selection().visibleEnd() : frame-&gt;selection().selection().visibleStart();
+    VisiblePosition initialExtent = position;
+
+    if (atBoundaryOfGranularity(extent, WordGranularity, sameDirection)) {
+        // This is a word boundary. Leave selection where it is.
+        return 0;
+    }
+
+    if (atBoundaryOfGranularity(extent, WordGranularity, oppositeDirection)) {
+        // This is a word boundary in the wrong direction. Nudge the selection to a character before proceeding.
+        extent = baseIsStart ? extent.previous() : extent.next();
+    }
+
+    // Extend to the boundary of the word.
+
+    VisiblePosition wordBoundary = positionOfNextBoundaryOfGranularity(extent, WordGranularity, sameDirection);
+    if (wordBoundary.isNotNull()
+        &amp;&amp; atBoundaryOfGranularity(wordBoundary, WordGranularity, sameDirection)
+        &amp;&amp; initialExtent != wordBoundary) {
+        extent = wordBoundary;
+        return (base &lt; extent) ? Range::create(*frame-&gt;document(), base, extent) : Range::create(*frame-&gt;document(), extent, base);
+    }
+    // Conversely, if the initial extent equals the current word boundary, then
+    // run the rest of this function to see if the selection should extend
+    // the other direction to the other word.
+
+    // If this is where the extent was initially, then iterate in the other direction in the document until we hit the next word.
+    while (extent.isNotNull()
+           &amp;&amp; !atBoundaryOfGranularity(extent, WordGranularity, sameDirection)
+           &amp;&amp; extent != base
+           &amp;&amp; !atBoundaryOfGranularity(extent, LineBoundary, sameDirection)
+           &amp;&amp; !atBoundaryOfGranularity(extent, LineBoundary, oppositeDirection)) {
+        extent = baseIsStart ? extent.next() : extent.previous();
+    }
+
+    // Don't let the smart extension make the extent equal the base.
+    // Expand out to word boundary.
+    if (extent.isNull() || extent == base)
+        extent = wordBoundary;
+    if (extent.isNull())
+        return 0;
+
+    return (base &lt; extent) ? Range::create(*frame-&gt;document(), base, extent) : Range::create(*frame-&gt;document(), extent, base);
+}
+
+void WebPage::updateSelectionWithTouches(const IntPoint&amp; point, uint32_t touches, bool baseIsStart, uint64_t callbackID)
+{
+    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
+    VisiblePosition position = frame.visiblePositionForPoint(point);
+    if (position.isNull()) {
+        send(Messages::WebPageProxy::TouchesCallback(point, touches, callbackID));
+        return;
+    }
+
+    RefPtr&lt;Range&gt; range;
+    VisiblePosition result;
+    
+    switch (static_cast&lt;WKSelectionTouch&gt;(touches)) {
+        case WKSelectionTouchStarted:
+        case WKSelectionTouchEndedNotMoving:
+            break;
+        
+        case WKSelectionTouchEnded:
+            result = closestWordBoundaryForPosition(position);
+            if (result.isNotNull())
+                range = Range::create(*frame.document(), result, result);
+            break;
+
+        case WKSelectionTouchEndedMovingForward:
+            range = rangeAtWordBoundaryForPosition(&amp;frame, position, baseIsStart, DirectionForward);
+            break;
+            
+        case WKSelectionTouchEndedMovingBackward:
+            range = rangeAtWordBoundaryForPosition(&amp;frame, position, baseIsStart, DirectionBackward);
+            break;
+
+        case WKSelectionTouchMoved:
+            range = rangeForPosition(&amp;frame, position, baseIsStart);
+            break;
+    }
+    if (range)
+        frame.selection().setSelectedRange(range.get(), position.affinity(), true);
+
+    send(Messages::WebPageProxy::TouchesCallback(point, touches, callbackID));
+}
+
+void WebPage::selectWithTwoTouches(const WebCore::IntPoint&amp; from, const WebCore::IntPoint&amp; to, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID)
+{
+    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
+    VisiblePosition fromPosition = frame.visiblePositionForPoint(from);
+    VisiblePosition toPosition = frame.visiblePositionForPoint(to);
+    RefPtr&lt;Range&gt; range;
+    if (fromPosition.isNotNull() &amp;&amp; toPosition.isNotNull()) {
+        if (fromPosition &lt; toPosition)
+            range = Range::create(*frame.document(), fromPosition, toPosition);
+        else
+            range = Range::create(*frame.document(), toPosition, fromPosition);
+        frame.selection().setSelectedRange(range.get(), fromPosition.affinity(), true);
+    }
+
+    // We can use the same callback for the gestures with one point.
+    send(Messages::WebPageProxy::GestureCallback(from, gestureType, gestureState, 0, callbackID));
+}
+
+void WebPage::extendSelection(uint32_t granularity)
+{
+    // For the moment we handle only WordGranularity.
+    if (granularity != WordGranularity)
+        return;
+
+    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
+    ASSERT(frame.selection().isCaret());
+    VisiblePosition position = frame.selection().selection().start();
+    frame.selection().setSelectedRange(wordRangeFromPosition(position).get(), position.affinity(), true);
+}
+
+void WebPage::requestAutocorrectionData(const String&amp; textForAutocorrection, uint64_t callbackID)
+{
+    RefPtr&lt;Range&gt; range;
+    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
+    ASSERT(frame.selection().isCaret());
+    VisiblePosition position = frame.selection().selection().start();
+    Vector&lt;SelectionRect&gt; selectionRects;
+
+    range = wordRangeFromPosition(position);
+    String textForRange = plainText(range.get());
+    const unsigned maxSearchAttempts = 5;
+    for (size_t i = 0;  i &lt; maxSearchAttempts &amp;&amp; textForRange != textForAutocorrection; ++i)
+    {
+        position = range-&gt;startPosition().previous();
+        if (position.isNull() || position == range-&gt;startPosition())
+            break;
+        range = Range::create(*frame.document(), wordRangeFromPosition(position)-&gt;startPosition(), range-&gt;endPosition());
+        textForRange = plainText(range.get());
+    }
+    if (textForRange == textForAutocorrection)
+        range-&gt;collectSelectionRects(selectionRects);
+
+    Vector&lt;FloatRect&gt; rectsForText;
+    rectsForText.resize(selectionRects.size());
+
+    for (size_t i = 0; i &lt; selectionRects.size(); i++)
+        rectsForText[i] = selectionRects[i].rect();
+
+    bool multipleFonts = false;
+    CTFontRef font = nil;
+    if (const SimpleFontData* fontData = frame.editor().fontForSelection(multipleFonts))
+        font = fontData-&gt;getCTFont();
+
+    CGFloat fontSize = CTFontGetSize(font);
+    uint64_t fontTraits = CTFontGetSymbolicTraits(font);
+    RetainPtr&lt;NSString&gt; fontName = adoptNS((NSString *)CTFontCopyFamilyName(font));
+    send(Messages::WebPageProxy::AutocorrectionDataCallback(rectsForText, fontName.get(), fontSize, fontTraits, callbackID));
+}
+
+void WebPage::applyAutocorrection(const String&amp; correction, const String&amp; originalText, uint64_t callbackID)
+{
+    RefPtr&lt;Range&gt; range;
+    Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
+    ASSERT(frame.selection().isCaret());
+    VisiblePosition position = frame.selection().selection().start();
+
+    range = wordRangeFromPosition(position);
+    String textForRange = plainText(range.get());
+    if (textForRange != originalText) {
+        for (size_t i = 0; i &lt; originalText.length(); ++i)
+            position = position.previous();
+        if (position.isNull())
+            position = startOfDocument(static_cast&lt;Node*&gt;(frame.document()-&gt;documentElement()));
+        range = Range::create(*frame.document(), position, frame.selection().selection().start());
+        if (range)
+            textForRange = (range) ? plainText(range.get()) : emptyString();
+        unsigned loopCount = 0;
+        const unsigned maxPositionsAttempts = 10;
+        while (textForRange.length() &amp;&amp; textForRange.length() &gt; originalText.length() &amp;&amp; loopCount &lt; maxPositionsAttempts) {
+            position = position.next();
+            if (position.isNotNull() &amp;&amp; position &gt;= frame.selection().selection().start())
+                range = NULL;
+            else
+                range = Range::create(*frame.document(), position, frame.selection().selection().start());
+            textForRange = (range) ? plainText(range.get()) : emptyString();
+            loopCount++;
+        }
+    }
+    if (textForRange != originalText) {
+        send(Messages::WebPageProxy::StringCallback(String(), callbackID));
+        return;
+    }
+
+    frame.selection().setSelectedRange(range.get(), UPSTREAM, true);
+    if (correction.length())
+        frame.editor().insertText(correction, 0);
+    else
+        frame.editor().deleteWithDirection(DirectionBackward, CharacterGranularity, false, true);
+
+    send(Messages::WebPageProxy::StringCallback(correction, callbackID));
+}
+
+void WebPage::elementDidFocus(WebCore::Node* node)
+{
+    m_assistedNode = node;
+    if (node-&gt;hasTagName(WebCore::HTMLNames::inputTag) || node-&gt;hasTagName(WebCore::HTMLNames::textareaTag) || node-&gt;rendererIsEditable())
+        send(Messages::WebPageProxy::StartAssistingNode(WebCore::IntRect(), true, true));    
+}
+
+void WebPage::elementDidBlur(WebCore::Node* node)
+{
+    if (m_assistedNode == node) {
+        send(Messages::WebPageProxy::StopAssistingNode());
+        m_assistedNode = 0;
+    }
+}
+
+void WebPage::didFinishScrolling(const WebCore::FloatPoint&amp; contentOffset)
+{
+    m_page-&gt;mainFrame().view()-&gt;setScrollOffset(WebCore::IntPoint(contentOffset));
+}
+
+void WebPage::didFinishZooming(float newScale)
+{
+    m_page-&gt;mainFrame().setDocumentScale(newScale);
+    m_page-&gt;setPageScaleFactor(newScale, m_page-&gt;mainFrame().view()-&gt;scrollPosition());
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #ifndef TiledCoreAnimationDrawingArea_h
</span><span class="cx"> #define TiledCoreAnimationDrawingArea_h
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
+
</ins><span class="cx"> #include &quot;DrawingArea.h&quot;
</span><span class="cx"> #include &quot;LayerTreeContext.h&quot;
</span><span class="cx"> #include &lt;WebCore/FloatRect.h&gt;
</span><span class="lines">@@ -145,4 +147,6 @@
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><ins>+#endif // !PLATFORM(IOS)
+
</ins><span class="cx"> #endif // TiledCoreAnimationDrawingArea_h
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #import &quot;config.h&quot;
</span><span class="cx"> #import &quot;TiledCoreAnimationDrawingArea.h&quot;
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
+
</ins><span class="cx"> #import &quot;ColorSpaceData.h&quot;
</span><span class="cx"> #import &quot;DrawingAreaProxyMessages.h&quot;
</span><span class="cx"> #import &quot;LayerHostingContext.h&quot;
</span><span class="lines">@@ -252,7 +254,9 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Fixed position elements need to be composited and create stacking contexts
</span><del>-    // in order to be scrolled by the ScrollingCoordinator.
</del><ins>+    // in order to be scrolled by the ScrollingCoordinator. We also want to keep
+    // Settings:setFixedPositionCreatesStackingContext() enabled for iOS. See
+    // &lt;rdar://problem/9813262&gt; for more details.
</ins><span class="cx">     settings.setAcceleratedCompositingForFixedPositionEnabled(true);
</span><span class="cx">     settings.setFixedPositionCreatesStackingContext(true);
</span><span class="cx"> 
</span><span class="lines">@@ -694,3 +698,5 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span><ins>+
+#endif // !PLATFORM(IOS)
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -1146,7 +1146,18 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><del>-    
</del><ins>+
+#if PLATFORM(IOS)
+void WebProcess::resetAllGeolocationPermissions()
+{
+    for (auto it = m_pageMap.begin(), end = m_pageMap.end(); it != end; ++it) {
+        WebPage* page = (*it).value.get();
+        if (Frame* mainFrame = page-&gt;mainFrame())
+            mainFrame-&gt;resetAllGeolocationPermission();
+    }
+}
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> void WebProcess::pageDidEnterWindow(uint64_t pageID)
</span><span class="cx"> {
</span><span class="cx">     m_pagesInWindows.add(pageID);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.h (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.h        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.h        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -177,6 +177,10 @@
</span><span class="cx">     void allowSpecificHTTPSCertificateForHost(const CertificateInfo&amp;, const String&amp; host);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    void resetAllGeolocationPermissions();
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> private:
</span><span class="cx">     WebProcess();
</span><span class="cx"> 
</span><span class="lines">@@ -245,7 +249,7 @@
</span><span class="cx">     virtual bool shouldTerminate() OVERRIDE;
</span><span class="cx">     virtual void terminate() OVERRIDE;
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
</ins><span class="cx">     virtual void stopRunLoop() OVERRIDE;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessiosWebProcessIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/ios/WebProcessIOS.mm (0 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/ios/WebProcessIOS.mm                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/ios/WebProcessIOS.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -0,0 +1,75 @@
</span><ins>+/*
+ * Copyright (C) 2012 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 &quot;config.h&quot;
+#import &quot;WebProcess.h&quot;
+
+#import &lt;WebCore/NotImplemented.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebProcess::initializeProcessName(const ChildProcessInitializationParameters&amp;)
+{
+    notImplemented();
+}
+
+void WebProcess::initializeSandbox(const ChildProcessInitializationParameters&amp;, SandboxInitializationParameters&amp;)
+{
+    notImplemented();
+}
+
+void WebProcess::platformSetCacheModel(CacheModel)
+{
+    notImplemented();
+}
+
+void WebProcess::platformClearResourceCaches(ResourceCachesToClear)
+{
+    notImplemented();
+}
+
+void WebProcess::platformInitializeWebProcess(const WebProcessCreationParameters&amp;, CoreIPC::MessageDecoder&amp;)
+{
+    notImplemented();
+}
+
+void WebProcess::platformInitializeProcess(const ChildProcessInitializationParameters&amp;)
+{
+    notImplemented();
+}
+
+void WebProcess::platformTerminate()
+{
+    notImplemented();
+}
+
+void WebProcess::updateActivePages()
+{
+    notImplemented();
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessmacWebProcessMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/mac/WebProcessMac.mm (159723 => 159724)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/mac/WebProcessMac.mm        2013-11-23 02:54:31 UTC (rev 159723)
+++ trunk/Source/WebKit2/WebProcess/mac/WebProcessMac.mm        2013-11-23 03:29:50 UTC (rev 159724)
</span><span class="lines">@@ -224,11 +224,16 @@
</span><span class="cx"> 
</span><span class="cx"> void WebProcess::initializeSandbox(const ChildProcessInitializationParameters&amp; parameters, SandboxInitializationParameters&amp; sandboxParameters)
</span><span class="cx"> {
</span><ins>+#if PLATFORM(IOS)
+    UNUSED_PARAM(parameters);
+    UNUSED_PARAM(sandboxParameters);
+#else
</ins><span class="cx">     // Need to overide the default, because service has a different bundle ID.
</span><span class="cx">     NSBundle *webkit2Bundle = [NSBundle bundleForClass:NSClassFromString(@&quot;WKView&quot;)];
</span><span class="cx">     sandboxParameters.setOverrideSandboxProfilePath([webkit2Bundle pathForResource:@&quot;com.apple.WebProcess&quot; ofType:@&quot;sb&quot;]);
</span><span class="cx"> 
</span><span class="cx">     ChildProcess::initializeSandbox(parameters, sandboxParameters);
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebProcess::updateActivePages()
</span></span></pre>
</div>
</div>

</body>
</html>