<!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 <enrica@apple.com>
+
+ 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 <jer.noble@apple.com>
</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& parameters)
</span><span class="cx"> {
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> NSString *applicationName = [NSString stringWithFormat:WEB_UI_STRING("%@ Database Storage", "visible name of the database process. The argument is the application name."), (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& parameters, SandboxInitializationParameters& 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("DYLD_INSERT_LIBRARIES", "/SecItemShim.dylib");
</span><span class="cx">
</span><span class="cx"> XPCServiceInitializer<NetworkProcess, XPCServiceInitializerDelegate>(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<CFDataRef> sourceApplicationAuditData() const OVERRIDE;
</span><span class="cx"> virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) 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 "config.h"
+#import "NetworkProcess.h"
+
+#if ENABLE(NETWORK_PROCESS)
+
+#import <WebCore/NotImplemented.h>
+#import <WebCore/WebCoreThreadSystemInterface.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void NetworkProcess::initializeProcess(const ChildProcessInitializationParameters&)
+{
+#if PLATFORM(IOS)
+ InitWebCoreThreadSystemInterface();
+#endif // PLATFORM(IOS)
+}
+
+void NetworkProcess::initializeProcessName(const ChildProcessInitializationParameters&)
+{
+ notImplemented();
+}
+
+void NetworkProcess::initializeSandbox(const ChildProcessInitializationParameters&, SandboxInitializationParameters&)
+{
+ notImplemented();
+}
+
+void NetworkProcess::platformSetCacheModel(CacheModel)
+{
+ notImplemented();
+}
+
+void NetworkProcess::allowSpecificHTTPSCertificateForHost(const PlatformCertificateInfo&, const String&)
+{
+ notImplemented();
+}
+
+void NetworkProcess::clearCacheForAllOrigins(uint32_t)
+{
+}
+
+void NetworkProcess::platformInitializeNetworkProcess(const NetworkProcessCreationParameters&)
+{
+ 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 >= 1090
</del><ins>+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx">
</span><span class="cx"> typedef void (^CFCachedURLResponseCallBackBlock)(CFCachedURLResponseRef);
</span><span class="cx"> extern "C" 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 >= 1090
</del><ins>+#endif // !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 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 "SecItemShim.h"
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</del><ins>+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> typedef struct _CFURLCache* CFURLCacheRef;
</span><span class="cx"> extern "C" CFURLCacheRef CFURLCacheCopySharedURLCache();
</span><span class="cx"> extern "C" 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& 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("%@ Networking", "visible name of the network process. The argument is the application name."), (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& httpProxy, const String& 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] > 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& 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 >= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> RetainPtr<CFURLCacheRef> 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 "config.h"
</span><span class="cx"> #import "NetworkResourceLoader.h"
</span><span class="cx">
</span><ins>+#if ENABLE(NETWORK_PROCESS)
+
</ins><span class="cx"> #import "DiskCacheMonitor.h"
</span><span class="cx"> #import "ShareableResource.h"
</span><span class="cx"> #import <WebCore/ResourceHandle.h>
</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 >= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> typedef const struct _CFURLCache* CFURLCacheRef;
</span><span class="cx"> typedef const struct _CFCachedURLResponse* CFCachedURLResponseRef;
</span><span class="cx"> extern "C" 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 >= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx">
</span><span class="cx"> static void tryGetShareableHandleFromCFData(ShareableResource::Handle& 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->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<int64_t volatile*>(&m_syncRequestID));
</del><ins>+ syncRequestID = ++m_syncRequestID;
</ins><span class="cx"> *encoder << 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<uint64_t> 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 "MessageFlags.h"
</span><span class="cx"> #include "StringReference.h"
</span><span class="cx">
</span><del>-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</del><ins>+#if PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> #include "ImportanceAssertion.h"
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> return m_messageFlags & DispatchMessageWhenWaitingForSyncReply;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</del><ins>+#if PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> void MessageDecoder::setImportanceAssertion(std::unique_ptr<ImportanceAssertion> 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) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</del><ins>+#if PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> void setImportanceAssertion(std::unique_ptr<ImportanceAssertion>);
</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) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</del><ins>+#if PLATFORM(IOS) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> std::unique_ptr<ImportanceAssertion> 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, &m_receivePort);
</span><span class="cx">
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 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<MessageDecoder> decoder = createMessageDecoder(header);
</span><span class="cx"> ASSERT(decoder);
</span><span class="cx">
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> decoder->setImportanceAssertion(std::make_unique<ImportanceAssertion>(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 >= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx">
</span><span class="cx"> #if __has_include(<libproc_internal.h>)
</span><span class="cx"> #include <libproc_internal.h>
</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 >= 1090
</del><ins>+#endif // PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 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 "XPCServiceEntryPoint.h"
</span><span class="cx"> #import <wtf/RunLoop.h>
</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 "C" 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("DYLD_INSERT_LIBRARIES", "/PluginProcessShim.dylib");
</span><span class="cx">
</span><span class="cx"> XPCServiceInitializer<PluginProcess, PluginServiceInitializerDelegate>(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:@"Unsupported invocation argument type '%s' for argument %zu", type, i];
</del><ins>+ [NSException raise:NSInvalidArgumentException format:@"Unsupported invocation argument type '%s' for argument %zu", 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 "config.h"
</span><span class="cx"> #include "WKPluginInformation.h"
</span><span class="cx">
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
+
</ins><span class="cx"> #include "PluginInformation.h"
</span><span class="cx"> #include "WKSharedAPICast.h"
</span><span class="cx"> #include "WebString.h"
</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->bitmap()->createGraphicsContext();
</span><span class="cx"> FloatRect rect(FloatPoint(0, 0), imageSize);
</span><span class="cx"> graphicsContext->clearRect(rect);
</span><ins>+#if PLATFORM(IOS)
+ graphicsContext->drawNativeImage(imageRef, imageSize, WebCore::ColorSpaceDeviceRGB, rect, rect, 1.0);
+#else
</ins><span class="cx"> graphicsContext->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 "config.h"
+#import "Download.h"
+
+#import <WebCore/NotImplemented.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void Download::start()
+{
+ notImplemented();
+}
+
+void Download::startWithHandle(ResourceHandle*, const ResourceResponse&)
+{
+ notImplemented();
+}
+
+void Download::cancel()
+{
+ notImplemented();
+}
+
+void Download::platformInvalidate()
+{
+ notImplemented();
+}
+
+void Download::didDecideDestination(const String&, bool)
+{
+ notImplemented();
+}
+
+void Download::platformDidFinish()
+{
+ notImplemented();
+}
+
+void Download::receivedCredential(const AuthenticationChallenge&, const Credential&)
+{
+ notImplemented();
+}
+
+void Download::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&)
+{
+ notImplemented();
+}
+
+void Download::receivedCancellation(const AuthenticationChallenge&)
+{
+ 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 "Arguments.h"
</span><span class="cx"> #include "WebCoreArgumentCoders.h"
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+#include <WebCore/SelectionRect.h>
+#endif
+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="cx"> void EditorState::encode(CoreIPC::ArgumentEncoder& encoder) const
</span><span class="lines">@@ -42,6 +46,14 @@
</span><span class="cx"> encoder << isInPlugin;
</span><span class="cx"> encoder << hasComposition;
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+ encoder << caretRectAtStart;
+ encoder << caretRectAtEnd;
+ encoder << selectionRects;
+ encoder << selectedTextLength;
+ encoder << wordAtSelection;
+#endif
+
</ins><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx"> encoder << 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<WebCore::SelectionRect> 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<WebIOSEvent> 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 "WebEvent.h"
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+#include <wtf/RetainPtr.h>
+#ifdef __OBJC__
+@class UIWebTouchEventsGestureRecognizer;
+#else
+class UIWebTouchEventsGestureRecognizer;
+#endif // __OBJC__
+#endif // PLATFORM(IOS)
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> #include <wtf/RetainPtr.h>
</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&);
</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<UIWebTouchEventsGestureRecognizer> m_nativeEvent;
+#endif
</ins><span class="cx"> #if PLATFORM(EFL)
</span><span class="cx"> RefPtr<EwkTouchEvent> 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 "config.h"
</span><span class="cx"> #include "PluginInformation.h"
</span><span class="cx">
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
+
</ins><span class="cx"> #include "PluginInfoStore.h"
</span><span class="cx"> #include "PluginModuleInfo.h"
</span><span class="cx"> #include "WKAPICast.h"
</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 "config.h"
</span><span class="cx"> #import "PluginInformation.h"
</span><span class="cx">
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
+
</ins><span class="cx"> #import "PluginModuleInfo.h"
</span><span class="cx"> #import "PluginSandboxProfile.h"
</span><span class="cx"> #import "StringUtilities.h"
</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 <wtf/text/CString.h>
</span><span class="cx"> #include <wtf/text/StringHash.h>
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+#include <WebCore/FloatQuad.h>
+#include <WebCore/SelectionRect.h>
+#include <WebCore/SharedBuffer.h>
+#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<FloatQuad>::encode(ArgumentEncoder& encoder, const FloatQuad& floatQuad)
+{
+ SimpleArgumentCoder<FloatQuad>::encode(encoder, floatQuad);
+}
+
+bool ArgumentCoder<FloatQuad>::decode(ArgumentDecoder& decoder, FloatQuad& floatQuad)
+{
+ return SimpleArgumentCoder<FloatQuad>::decode(decoder, floatQuad);
+}
+
+void ArgumentCoder<ViewportArguments>::encode(ArgumentEncoder& encoder, const ViewportArguments& viewportArguments)
+{
+ SimpleArgumentCoder<ViewportArguments>::encode(encoder, viewportArguments);
+}
+
+bool ArgumentCoder<ViewportArguments>::decode(ArgumentDecoder& decoder, ViewportArguments& viewportArguments)
+{
+ return SimpleArgumentCoder<ViewportArguments>::decode(decoder, viewportArguments);
+}
+#endif // PLATFORM(IOS)
+
+
</ins><span class="cx"> void ArgumentCoder<IntPoint>::encode(ArgumentEncoder& encoder, const IntPoint& intPoint)
</span><span class="cx"> {
</span><span class="cx"> SimpleArgumentCoder<IntPoint>::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<SelectionRect>::encode(ArgumentEncoder& encoder, const SelectionRect& selectionRect)
+{
+ encoder << selectionRect.rect();
+ encoder << static_cast<uint32_t>(selectionRect.direction());
+ encoder << selectionRect.minX();
+ encoder << selectionRect.maxX();
+ encoder << selectionRect.maxY();
+ encoder << selectionRect.lineNumber();
+ encoder << selectionRect.isLineBreak();
+ encoder << selectionRect.isFirstOnLine();
+ encoder << selectionRect.isLastOnLine();
+ encoder << selectionRect.containsStart();
+ encoder << selectionRect.containsEnd();
+ encoder << selectionRect.isHorizontal();
+}
+
+bool ArgumentCoder<SelectionRect>::decode(ArgumentDecoder& decoder, SelectionRect& 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<WindowFeatures>::encode(ArgumentEncoder& encoder, const WindowFeatures& windowFeatures)
</span><span class="cx"> {
</span><span class="cx"> encoder << 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<> struct ArgumentCoder<WebCore::AffineTransform> {
</span><span class="lines">@@ -113,6 +123,18 @@
</span><span class="cx"> static bool decode(ArgumentDecoder&, WebCore::FloatSize&);
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+template<> struct ArgumentCoder<WebCore::FloatQuad> {
+ static void encode(ArgumentEncoder&, const WebCore::FloatQuad&);
+ static bool decode(ArgumentDecoder&, WebCore::FloatQuad&);
+};
+
+template<> struct ArgumentCoder<WebCore::ViewportArguments> {
+ static void encode(ArgumentEncoder&, const WebCore::ViewportArguments&);
+ static bool decode(ArgumentDecoder&, WebCore::ViewportArguments&);
+};
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> template<> struct ArgumentCoder<WebCore::IntPoint> {
</span><span class="cx"> static void encode(ArgumentEncoder&, const WebCore::IntPoint&);
</span><span class="cx"> static bool decode(ArgumentDecoder&, WebCore::IntPoint&);
</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<> struct ArgumentCoder<WebCore::SelectionRect> {
+ static void encode(ArgumentEncoder&, const WebCore::SelectionRect&);
+ static bool decode(ArgumentDecoder&, WebCore::SelectionRect&);
+};
+
</ins><span class="cx"> template<> struct ArgumentCoder<WebCore::PasteboardWebContent> {
</span><span class="cx"> static void encode(ArgumentEncoder&, const WebCore::PasteboardWebContent&);
</span><span class="cx"> static bool decode(ArgumentDecoder&, WebCore::PasteboardWebContent&);
</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<TouchPointState>(m_phase); }
+
+ void encode(CoreIPC::ArgumentEncoder&) const;
+ static bool decode(CoreIPC::ArgumentDecoder&, WebPlatformTouchPoint&);
+
+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<WebPlatformTouchPoint>& 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<WebPlatformTouchPoint>& 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&) const;
+ static bool decode(CoreIPC::ArgumentDecoder&, WebTouchEvent&);
+
+private:
+ Vector<WebPlatformTouchPoint> 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 "Platform" 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<WebPlatformTouchPoint> 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& 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& webTouchPoint)
+ : PlatformTouchPoint(webTouchPoint.identifier(), webTouchPoint.location(), touchEventType(webTouchPoint))
+{
+}
+};
+#else
+
+class WebKit2PlatformTouchPoint : public WebCore::PlatformTouchPoint {
+public:
</ins><span class="cx"> WebKit2PlatformTouchPoint(const WebPlatformTouchPoint& 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 < 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 < 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 <WebCore/PlatformWheelEvent.h>
</span><span class="cx">
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><ins>+#if PLATFORM(IOS)
+#include <WebCore/PlatformTouchEventIOS.h>
+#else
</ins><span class="cx"> #include <WebCore/PlatformTouchEvent.h>
</span><span class="cx"> #include <WebCore/PlatformTouchPoint.h>
</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&);
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> WebCore::PlatformTouchPoint platform(const WebTouchPoint&);
</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) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</del><ins>+#if !PLATFORM(IOS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 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<WebCore::SecurityOrigin> 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 "config.h"
+#import "NativeWebKeyboardEvent.h"
+
+#import "WebIOSEventFactory.h"
+
+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 "config.h"
+#import "NativeWebTouchEvent.h"
+
+#import "WebEvent.h"
+#import <Foundation/NSGeometry.h>
+#import <UIKit/UITouch.h>
+#import <UIKit/UIWebTouchEventsGestureRecognizer.h>
+#import <WebCore/IntPoint.h>
+#import <wtf/CurrentTime.h>
+
+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<UITouchPhase>([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<WebPlatformTouchPoint> extractWebTouchPoint(UIWebTouchEventsGestureRecognizer *gestureRecognizer)
+{
+ unsigned touchCount = [gestureRecognizer.touchLocations count];
+ NSArray *touchLocations = gestureRecognizer.touchLocations;
+ NSArray *touchIdentifiers = gestureRecognizer.touchIdentifiers;
+ NSArray *touchPhases = gestureRecognizer.touchPhases;
+
+ Vector<WebPlatformTouchPoint> touchPointList;
+ touchPointList.reserveInitialCapacity(touchCount);
+ for (unsigned i = 0; i < 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<Modifiers>(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 "WebEvent.h"
+#import <WebCore/WebEvent.h>
+
+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 "config.h"
+#import "WebIOSEventFactory.h"
+
+#import <WebCore/KeyEventCodesIOS.h>
+#import <WebCore/PlatformEventFactoryIOS.h>
+
+static WebKit::WebEvent::Modifiers modifiersForEvent(WebIOSEvent *event)
+{
+ unsigned modifiers = 0;
+ WebEventFlags eventModifierFlags = event.modifierFlags;
+
+ if (eventModifierFlags & WebEventFlagMaskShift)
+ modifiers |= WebKit::WebEvent::ShiftKey;
+ if (eventModifierFlags & WebEventFlagMaskControl)
+ modifiers |= WebKit::WebEvent::ControlKey;
+ if (eventModifierFlags & WebEventFlagMaskAlternate)
+ modifiers |= WebKit::WebEvent::AltKey;
+ if (eventModifierFlags & WebEventFlagMaskCommand)
+ modifiers |= WebKit::WebEvent::MetaKey;
+
+ return static_cast<WebKit::WebEvent::Modifiers>(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("\r");
+ 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 == "\x7F")
+ text = ASCIILiteral("\x8");
+ if (unmodifiedText == "\x7F")
+ unmodifiedText = ASCIILiteral("\x8");
+ // Always use 9 for tab.
+ if (windowsVirtualKeyCode == 9) {
+ text = ASCIILiteral("\x9");
+ 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 "config.h"
+#include "WebEvent.h"
+
+#if ENABLE(TOUCH_EVENTS)
+
+#include "Arguments.h"
+#include "WebCoreArgumentCoders.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebPlatformTouchPoint::encode(CoreIPC::ArgumentEncoder& encoder) const
+{
+ encoder << m_identifier;
+ encoder << m_location;
+ encoder << m_phase;
+}
+
+bool WebPlatformTouchPoint::decode(CoreIPC::ArgumentDecoder& decoder, WebPlatformTouchPoint& 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 "config.h"
+#include "WebEvent.h"
+
+#if ENABLE(TOUCH_EVENTS)
+
+#include "ArgumentCoders.h"
+#include "Arguments.h"
+#include "WebCoreArgumentCoders.h"
+
+namespace WebKit {
+
+void WebTouchEvent::encode(CoreIPC::ArgumentEncoder& encoder) const
+{
+ WebEvent::encode(encoder);
+
+ encoder << m_touchPoints;
+ encoder << m_position;
+ encoder << m_isGesture;
+ encoder << m_gestureScale;
+ encoder << m_gestureRotation;
+}
+
+bool WebTouchEvent::decode(CoreIPC::ArgumentDecoder& decoder, WebTouchEvent& 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 >= 1090
</del><ins>+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> typedef bool (^LSServerConnectionAllowedBlock) ( CFDictionaryRef optionsRef );
</span><span class="cx"> extern "C" void _LSSetApplicationLaunchServicesServerConnectionStatus(uint64_t flags, LSServerConnectionAllowedBlock block);
</span><span class="cx"> extern "C" 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 >= 1090
</del><ins>+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> if (this->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 >= 1090
</del><ins>+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 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<CFDictionaryRef> 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 >= 1090
</del><ins>+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 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("_OS_VERSION", osVersion.utf8().data());
</span><span class="cx">
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
</del><ins>+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
</ins><span class="cx"> // Use private temporary and cache directories.
</span><span class="cx"> setenv("DIRHELPER_USER_DIR_SUFFIX", 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("%s: Couldn't enable sandbox style file quarantine: %ld\n", 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& 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<CFStringRef> 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<CGImageRef> image() const;
</span><ins>+#if USE(IOSURFACE)
</ins><span class="cx"> RetainPtr<IOSurfaceRef> 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&, 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<ShareableBitmap> m_frontBuffer;
</span><ins>+#if USE(IOSURFACE)
</ins><span class="cx"> RetainPtr<IOSurfaceRef> 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 <WebCore/GraphicsContextCG.h>
</span><span class="cx"> #import <WebCore/WebLayer.h>
</span><span class="cx">
</span><ins>+#if USE(IOSURFACE)
+#import <mach/mach_port.h>
+#endif
+
</ins><span class="cx"> #if defined(__has_include) && __has_include(<ApplicationServices/ApplicationServicesPriv.h>)
</span><span class="cx"> #import <ApplicationServices/ApplicationServicesPriv.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> extern "C" {
</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 << m_scale;
</span><span class="cx"> encoder << 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 << CoreIPC::MachPort(port, MACH_MSG_TYPE_MOVE_SEND);
</span><del>- } else {
- ShareableBitmap::Handle handle;
- m_frontBuffer->createHandle(handle);
- encoder << handle;
</del><ins>+ return;
</ins><span class="cx"> }
</span><ins>+#else
+ ASSERT(!m_acceleratesDrawing);
+#endif
+
+ ShareableBitmap::Handle handle;
+ m_frontBuffer->createHandle(handle);
+ encoder << handle;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool RemoteLayerBackingStore::decode(CoreIPC::ArgumentDecoder& decoder, RemoteLayerBackingStore& 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<CGContextRef> 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<CGImageRef> 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<IOSurfaceRef> backSurface = createIOSurface(expandedScaledSize);
</span><span class="cx"> RetainPtr<CGContextRef> 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<CGImageRef> frontImage = image();
- m_frontBuffer = ShareableBitmap::createShareable(expandedScaledSize, ShareableBitmap::SupportsAlpha);
- std::unique_ptr<GraphicsContext> context = m_frontBuffer->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<CGImageRef> frontImage = image();
+ m_frontBuffer = ShareableBitmap::createShareable(expandedScaledSize, ShareableBitmap::SupportsAlpha);
+ std::unique_ptr<GraphicsContext> context = m_frontBuffer->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 & 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 & 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 -> 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 <TargetConditionals.h>
+#endif
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> extern "C" {
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#ifdef __APPLE__
</del><ins>+#if defined(__APPLE__) && !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)->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)->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 "PageClient.h"
+#import <wtf/RetainPtr.h>
+
+@class WKContentView;
+
+namespace WebKit {
+
+class PageClientImpl : public PageClient {
+public:
+ static PassOwnPtr<PageClientImpl> create(WKContentView *);
+ virtual ~PageClientImpl();
+
+private:
+ explicit PageClientImpl(WKContentView *);
+
+ virtual std::unique_ptr<DrawingAreaProxy> createDrawingAreaProxy() OVERRIDE;
+ virtual void setViewNeedsDisplay(const WebCore::IntRect&) OVERRIDE;
+ virtual void displayView() OVERRIDE;
+ virtual bool canScrollView() OVERRIDE;
+ virtual void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& 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&, const String&) OVERRIDE;
+ virtual void didChangeContentSize(const WebCore::IntSize&) OVERRIDE;
+ virtual void setCursor(const WebCore::Cursor&) OVERRIDE;
+ virtual void setCursorHiddenUntilMouseMoves(bool) OVERRIDE;
+ virtual void didChangeViewportProperties(const WebCore::ViewportAttributes&) OVERRIDE;
+ virtual void registerEditCommand(PassRefPtr<WebEditCommandProxy>, 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&) OVERRIDE;
+ virtual bool interpretKeyEvent(const NativeWebKeyboardEvent&, Vector<WebCore::KeypressCommand>&) OVERRIDE;
+ virtual bool executeSavedCommandBySelector(const String& selector) OVERRIDE;
+ virtual void setDragImage(const WebCore::IntPoint& clientPosition, PassRefPtr<ShareableBitmap> 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&) OVERRIDE;
+ virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&) OVERRIDE;
+ virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) OVERRIDE;
+ virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) OVERRIDE;
+ virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) OVERRIDE;
+#if ENABLE(TOUCH_EVENTS)
+ virtual void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled) OVERRIDE;
+#endif
+ virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) OVERRIDE;
+ virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) OVERRIDE;
+ virtual void setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut, bool animate) OVERRIDE;
+#if USE(ACCELERATED_COMPOSITING)
+ virtual void enterAcceleratedCompositingMode(const LayerTreeContext&) OVERRIDE;
+ virtual void exitAcceleratedCompositingMode() OVERRIDE;
+ virtual void updateAcceleratedCompositingMode(const LayerTreeContext&) OVERRIDE;
+ virtual void setAcceleratedCompositingRootLayer(CALayer *rootLayer) OVERRIDE;
+#endif
+
+ virtual void mainDocumentDidReceiveMobileDocType() OVERRIDE;
+
+ virtual void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius) OVERRIDE;
+
+ void didChangeViewportArguments(const WebCore::ViewportArguments& viewportArguments) OVERRIDE;
+
+ virtual void startAssistingNode(const WebCore::IntRect&, bool hasNextFocusable, bool hasPreviousFocusable) OVERRIDE;
+ virtual void stopAssistingNode() OVERRIDE;
+ virtual void selectionDidChange() OVERRIDE;
+ virtual bool interpretKeyEvent(const NativeWebKeyboardEvent&, 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 "config.h"
+#import "PageClientImplIOS.h"
+
+#import "NativeWebKeyboardEvent.h"
+#import "WKContentViewInternal.h"
+#import "WebContextMenuProxy.h"
+#import "WebEditCommandProxy.h"
+#import <UIKit/UIWebTouchEventsGestureRecognizer.h>
+#import <WebCore/NotImplemented.h>
+#import <WebCore/PlatformScreen.h>
+
+@interface UIView (IPI)
+- (UIScrollView *)_scroller;
+@end
+
+using namespace WebCore;
+
+namespace WebKit {
+
+PassOwnPtr<PageClientImpl> PageClientImpl::create(WKContentView *view)
+{
+ return adoptPtr(new PageClientImpl(view));
+}
+
+PageClientImpl::~PageClientImpl()
+{
+}
+
+PageClientImpl::PageClientImpl(WKContentView *view)
+ : m_view(view)
+{
+}
+
+std::unique_ptr<DrawingAreaProxy> PageClientImpl::createDrawingAreaProxy()
+{
+ return [m_view _createDrawingAreaProxy];
+}
+
+void PageClientImpl::setViewNeedsDisplay(const IntRect& rect)
+{
+ ASSERT_NOT_REACHED();
+}
+
+void PageClientImpl::displayView()
+{
+ ASSERT_NOT_REACHED();
+}
+
+void PageClientImpl::scrollView(const IntRect&, const IntSize&)
+{
+ 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&, const String&)
+{
+ notImplemented();
+}
+
+void PageClientImpl::didChangeContentSize(const IntSize& contentsSize)
+{
+ [m_view _didChangeContentSize:contentsSize];
+}
+
+void PageClientImpl::setCursor(const Cursor&)
+{
+ notImplemented();
+}
+
+void PageClientImpl::setCursorHiddenUntilMouseMoves(bool)
+{
+ notImplemented();
+}
+
+void PageClientImpl::didChangeViewportProperties(const ViewportAttributes&)
+{
+ notImplemented();
+}
+
+void PageClientImpl::registerEditCommand(PassRefPtr<WebEditCommandProxy>, 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&)
+{
+ notImplemented();
+}
+
+bool PageClientImpl::interpretKeyEvent(const NativeWebKeyboardEvent&, Vector<KeypressCommand>&)
+{
+ notImplemented();
+ return false;
+}
+
+bool PageClientImpl::interpretKeyEvent(const NativeWebKeyboardEvent& event, bool isCharEvent)
+{
+ return [m_view _interpretKeyEvent:event.nativeEvent() isCharEvent:isCharEvent];
+}
+
+bool PageClientImpl::executeSavedCommandBySelector(const String&)
+{
+ notImplemented();
+ return false;
+}
+
+void PageClientImpl::setDragImage(const IntPoint&, PassRefPtr<ShareableBitmap>, 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& rect)
+{
+ notImplemented();
+ return FloatRect();
+}
+
+FloatRect PageClientImpl::convertToUserSpace(const FloatRect& rect)
+{
+ notImplemented();
+ return FloatRect();
+}
+
+IntPoint PageClientImpl::screenToWindow(const IntPoint& point)
+{
+ notImplemented();
+ return IntPoint();
+}
+
+IntRect PageClientImpl::windowToScreen(const IntRect& rect)
+{
+ notImplemented();
+ return IntRect();
+}
+
+void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent&, bool)
+{
+ notImplemented();
+}
+
+#if ENABLE(TOUCH_EVENTS)
+void PageClientImpl::doneWithTouchEvent(const NativeWebTouchEvent& nativeWebtouchEvent, bool eventHandled)
+{
+ [nativeWebtouchEvent.nativeEvent() setDefaultPrevented:eventHandled];
+}
+#endif
+
+PassRefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy*)
+{
+ notImplemented();
+ return 0;
+}
+
+PassRefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy*)
+{
+ notImplemented();
+ return 0;
+}
+
+void PageClientImpl::setFindIndicator(PassRefPtr<FindIndicator>, bool, bool)
+{
+ notImplemented();
+}
+
+#if USE(ACCELERATED_COMPOSITING)
+void PageClientImpl::enterAcceleratedCompositingMode(const LayerTreeContext& layerTreeContext)
+{
+}
+
+void PageClientImpl::exitAcceleratedCompositingMode()
+{
+ notImplemented();
+}
+
+void PageClientImpl::updateAcceleratedCompositingMode(const LayerTreeContext&)
+{
+}
+
+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& color, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius)
+{
+ [m_view _didGetTapHighlightForRequest:requestID color:color quads:highlightedQuads topLeftRadius:topLeftRadius topRightRadius:topRightRadius bottomLeftRadius:bottomLeftRadius bottomRightRadius:bottomRightRadius];
+}
+
+void PageClientImpl::didChangeViewportArguments(const WebCore::ViewportArguments& viewportArguments)
+{
+ [m_view _didChangeViewportArguments:viewportArguments];
+}
+
+void PageClientImpl::startAssistingNode(const WebCore::IntRect&, 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 <UIKit/UIView.h>
+
+@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 "config.h"
+#import "UIWKRemoteView.h"
+
+#import <QuartzCore/CALayerHost.h>
+
+@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 <UIKit/UIKit.h>
+#import <WebKit2/WKBrowsingContextController.h>
+#import <WebKit2/WKBrowsingContextGroup.h>
+#import <WebKit2/WKProcessGroup.h>
+
+@class WKContentView;
+
+typedef NS_ENUM(unsigned, WKContentType)
+{
+ Standard = 0,
+ PlainText,
+ Image
+};
+
+@protocol WKContentViewDelegate <NSObject>
+
+@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 <WKContentViewDelegate> 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 "config.h"
+#import "WKContentViewInternal.h"
+
+#import "PageClientImplIOS.h"
+#import "RemoteLayerTreeDrawingAreaProxy.h"
+#import "TiledCoreAnimationDrawingAreaProxyIOS.h"
+#import "UIWKRemoteView.h"
+#import "WKBrowsingContextControllerInternal.h"
+#import "WKBrowsingContextGroupPrivate.h"
+#import "WKGeolocationProviderIOS.h"
+#import "WKProcessGroupPrivate.h"
+#import "WKInteractionView.h"
+#import "WebContext.h"
+#import "WebPageGroup.h"
+#import "WebSystemInterface.h"
+#import <QuartzCore/CALayerHost.h>
+#import <UIKit/UIWindow_Private.h>
+#import <WebCore/ViewportArguments.h>
+#import <WebCore/WebCoreThreadSystemInterface.h>
+#import <wtf/RetainPtr.h>
+
+using namespace WebCore;
+using namespace WebKit;
+
+@interface WKContentView (Internal) <WKBrowsingContextLoadDelegateInternal>
+@end
+
+@implementation WKContentView {
+ RetainPtr<WKProcessGroup> _processGroup;
+ RetainPtr<WKBrowsingContextGroup> _browsingContextGroup;
+ OwnPtr<PageClientImpl> _pageClient;
+ RefPtr<WebPageProxy> _page;
+
+ RetainPtr<WKBrowsingContextController> _browsingContextController;
+
+ RetainPtr<UIView> _rootContentView;
+ RetainPtr<WKInteractionView> _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->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->viewStateDidChange(ViewState::IsInWindow);
+}
+
+- (WKBrowsingContextController *)browsingContextController
+{
+ return _browsingContextController.get();
+}
+
+- (WKContentType)contentType
+{
+ if (_page->mainFrame()->mimeType() == "text/plain")
+ return WKContentType::PlainText;
+ else if (_page->mainFrame()->isDisplayingStandaloneImageDocument())
+ return WKContentType::Image;
+ return WKContentType::Standard;
+}
+
+- (void)setMinimumSize:(CGSize)size
+{
+ _page->drawingArea()->setSize(IntSize(size), IntSize(), IntSize());
+}
+
+- (void)setViewportSize:(CGSize)size
+{
+ _page->setFixedLayoutSize(IntSize(size));
+}
+
+- (void)didScrollTo:(CGPoint)contentOffset
+{
+ _page->didFinishScrolling(contentOffset);
+}
+
+- (void)didZoomToScale:(CGFloat)scale
+{
+ _page->didFinishZooming(scale);
+}
+
+static void decidePolicyForGeolocationPermissionRequest(WKPageRef page, WKFrameRef frame, WKSecurityOriginRef origin, WKGeolocationPermissionRequestRef permissionRequest, const void* clientInfo)
+{
+ WKContentView *view = reinterpret_cast<WKContentView *>(const_cast<void*>(clientInfo));
+ ASSERT([view isKindOfClass:[WKContentView class]]);
+
+ [[view->_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.
+ // <rdar://problem/12287363>
+ 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->createWebPage(_pageClient.get(), toImpl([_browsingContextGroup _pageGroupRef]));
+ _page->initializeWebPage();
+ _page->setIntrinsicDeviceScaleFactor([UIScreen mainScreen].scale);
+ _page->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()), &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->setIntrinsicDeviceScaleFactor(screen.scale);
+}
+
+- (void)_didChangeViewportArguments:(const WebCore::ViewportArguments&)arguments
+{
+ if ([_delegate respondsToSelector:@selector(contentView:didChangeViewportArgumentsSize:initialScale:minimumScale:maximumScale:allowsUserScaling:)])
+ [_delegate contentView:self
+didChangeViewportArgumentsSize:CGSizeMake(arguments.width, arguments.height)
+ initialScale:arguments.zoom
+ minimumScale:arguments.minZoom
+ maximumScale:arguments.maxZoom
+ allowsUserScaling:arguments.userZoom];
+}
+
+#pragma mark PageClientImpl methods
+
+- (std::unique_ptr<DrawingAreaProxy>)_createDrawingAreaProxy
+{
+ return std::make_unique<RemoteLayerTreeDrawingAreaProxy>(_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&)color quads:(const Vector<FloatQuad>&)highlightedQuads topLeftRadius:(const IntSize&)topLeftRadius topRightRadius:(const IntSize&)topRightRadius bottomLeftRadius:(const IntSize&)bottomLeftRadius bottomRightRadius:(const IntSize&)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 "WKContentView.h"
+
+#import <wtf/Forward.h>
+#import <wtf/Vector.h>
+
+namespace WebCore {
+class Color;
+class FloatQuad;
+class IntSize;
+struct ViewportArguments;
+}
+
+namespace WebKit {
+class DrawingAreaProxy;
+class LayerTreeContext;
+}
+
+@class WebIOSEvent;
+
+@interface WKContentView ()
+
+- (std::unique_ptr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy;
+- (void)_processDidCrash;
+- (void)_didRelaunchProcess;
+- (void)_didChangeContentSize:(CGSize)contentsSize;
+- (void)_setAcceleratedCompositingRootLayer:(CALayer *)rootLayer;
+
+- (void)_mainDocumentDidReceiveMobileDocType;
+
+- (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const WebCore::Color&)color quads:(const Vector<WebCore::FloatQuad>&)highlightedQuads topLeftRadius:(const WebCore::IntSize&)topLeftRadius topRightRadius:(const WebCore::IntSize&)topRightRadius bottomLeftRadius:(const WebCore::IntSize&)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&)bottomRightRadius;
+
+- (void)_startAssistingNode;
+- (void)_stopAssistingNode;
+- (void)_selectionChanged;
+- (BOOL)_interpretKeyEvent:(WebIOSEvent *)theEvent isCharEvent:(BOOL)isCharEvent;
+- (void)_didChangeViewportArguments:(const WebCore::ViewportArguments&)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 <Foundation/NSObject.h>
+#import <WebKit2/WKBase.h>
+
+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 "config.h"
+#import "WKGeolocationProviderIOS.h"
+
+#import "GeolocationPermissionRequestProxy.h"
+#import "WebContext.h"
+#import "WebGeolocationManagerProxy.h"
+#import "WebSecurityOrigin.h"
+#import <WebGeolocationPosition.h>
+#import <WebCore/GeolocationPosition.h>
+#import <WebKit/WebGeolocationCoreLocationProvider.h>
+#import <WebKit/WebUIDelegatePrivate.h>
+#import <WebKit2/WKGeolocationPermissionRequest.h>
+#import <wtf/Assertions.h>
+#import <wtf/PassRefPtr.h>
+#import <wtf/RefPtr.h>
+#import <wtf/RetainPtr.h>
+#import <wtf/HashSet.h>
+
+using namespace WebKit;
+
+@interface WKGeolocationProviderIOS ()
+-(void)_startUpdating;
+-(void)_stopUpdating;
+-(void)_setEnableHighAccuracy:(BOOL)enable;
+@end
+
+@interface WKGeolocationProviderIOS (WebGeolocationCoreLocationUpdateListener) <WebGeolocationCoreLocationUpdateListener>
+@end
+
+@interface WKWebAllowDenyPolicyListener : NSObject<WebAllowDenyPolicyListener>
+- (id)initWithProvider:(WKGeolocationProviderIOS*)provider permissionRequestProxy:(PassRefPtr<GeolocationPermissionRequestProxy>)permissionRequestProxy;
+- (void)denyOnlyThisRequest NO_RETURN_DUE_TO_ASSERT;
+@end
+
+namespace WebKit {
+void decidePolicyForGeolocationRequestFromOrigin(WebCore::SecurityOrigin*, const String& urlString, id<WebAllowDenyPolicyListener>, UIWindow*);
+};
+
+static void startUpdatingCallback(WKGeolocationManagerRef geolocationManager, const void* clientInfo)
+{
+ WKGeolocationProviderIOS *geolocationProvider = reinterpret_cast<WKGeolocationProviderIOS*>(const_cast<void*>(clientInfo));
+ ASSERT([geolocationProvider isKindOfClass:[WKGeolocationProviderIOS class]]);
+ [geolocationProvider _startUpdating];
+}
+
+static void stopUpdatingCallback(WKGeolocationManagerRef geolocationManager, const void* clientInfo)
+{
+ WKGeolocationProviderIOS *geolocationProvider = reinterpret_cast<WKGeolocationProviderIOS*>(const_cast<void*>(clientInfo));
+ ASSERT([geolocationProvider isKindOfClass:[WKGeolocationProviderIOS class]]);
+ [geolocationProvider _stopUpdating];
+}
+
+static void setEnableHighAccuracy(WKGeolocationManagerRef geolocationManager, bool enable, const void* clientInfo)
+{
+ WKGeolocationProviderIOS *geolocationProvider = reinterpret_cast<WKGeolocationProviderIOS*>(const_cast<void*>(clientInfo));
+ ASSERT([geolocationProvider isKindOfClass:[WKGeolocationProviderIOS class]]);
+ [geolocationProvider _setEnableHighAccuracy:enable];
+}
+
+struct GeolocationRequestData {
+ RefPtr<WebCore::SecurityOrigin> origin;
+ RefPtr<WebFrameProxy> frame;
+ RefPtr<GeolocationPermissionRequestProxy> permissionRequest;
+ RetainPtr<UIWindow> window;
+};
+
+@implementation WKGeolocationProviderIOS {
+ RefPtr<WebGeolocationManagerProxy> _geolocationManager;
+ RetainPtr<WebGeolocationCoreLocationProvider> _coreLocationProvider;
+ BOOL _isWebCoreGeolocationActive;
+ RefPtr<WebGeolocationPosition> _lastActivePosition;
+ Vector<GeolocationRequestData> _requestsWaitingForCoreLocationStart;
+ HashSet<void*> _requestsInWarmUp;
+}
+
+-(void)_stopUpdatingIfPossible
+{
+ if (_isWebCoreGeolocationActive)
+ return;
+
+ if (_requestsWaitingForCoreLocationStart.isEmpty() && _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->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->supplement<WebGeolocationManagerProxy>();
+ WKGeolocationProvider providerCallback = {
+ kWKGeolocationProviderCurrentVersion,
+ self,
+ startUpdatingCallback,
+ stopUpdatingCallback,
+ setEnableHighAccuracy
+ };
+ _geolocationManager->initializeProvider(&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)->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<GeolocationRequestData> requests;
+ requests.swap(_requestsWaitingForCoreLocationStart);
+ HashSet<void*> latestRequestsForWarmup;
+ for (size_t i = 0; i < 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<void*>::const_iterator end = latestRequestsForWarmup.end();
+ for (HashSet<void*>::const_iterator it = latestRequestsForWarmup.begin(); it != end; ++it)
+ _requestsInWarmUp.remove(*it);
+ [self _stopUpdatingIfPossible];
+ });
+
+ for (size_t i = 0; i < requests.size(); ++i) {
+ RetainPtr<WKWebAllowDenyPolicyListener> policyListener = adoptNS([[WKWebAllowDenyPolicyListener alloc] initWithProvider:self permissionRequestProxy:requests[i].permissionRequest.get()]);
+ decidePolicyForGeolocationRequestFromOrigin(requests[i].origin.get(), requests[i].frame->url(), policyListener.get(), requests[i].window.get());
+ }
+}
+
+- (void)geolocationDelegateUnableToStart
+{
+ for (size_t i = 0; i < _requestsWaitingForCoreLocationStart.size(); ++i)
+ _requestsWaitingForCoreLocationStart[i].permissionRequest->deny();
+ _requestsWaitingForCoreLocationStart.clear();
+ [self _stopUpdatingIfPossible];
+}
+
+- (void)positionChanged:(WebCore::GeolocationPosition*)position
+{
+ _lastActivePosition = WebGeolocationPosition::create(position->timestamp(), position->latitude(), position->longitude(), position->accuracy(), position->canProvideAltitude(), position->altitude(), position->canProvideAltitudeAccuracy(), position->altitudeAccuracy(), position->canProvideHeading(), position->heading(), position->canProvideSpeed(), position->speed());
+ _geolocationManager->providerDidChangePosition(_lastActivePosition.get());
+}
+
+- (void)errorOccurred:(NSString *)errorMessage
+{
+ _geolocationManager->providerDidFailToDeterminePosition(errorMessage);
+}
+
+- (void)resetGeolocation
+{
+ _geolocationManager->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<WKGeolocationProviderIOS> _provider;
+ RefPtr<GeolocationPermissionRequestProxy> _permissionRequestProxy;
+}
+
+- (id)initWithProvider:(WKGeolocationProviderIOS*)provider permissionRequestProxy:(PassRefPtr<GeolocationPermissionRequestProxy>)permissionRequestProxy
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+ _provider = provider;
+ _permissionRequestProxy = permissionRequestProxy;
+ return self;
+}
+
+- (void)allow
+{
+ _permissionRequestProxy->allow();
+}
+
+- (void)deny
+{
+ [_provider.get() permissionDenied:_permissionRequestProxy.get()];
+ _permissionRequestProxy->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 "config.h"
+#import "WKGeolocationProviderIOS.h"
+
+#import <Foundation/NSURL.h>
+#import <UIKit/UIWebGeolocationPolicyDecider.h>
+#import <UIKit/UIWindow.h>
+#import <WebCore/SecurityOrigin.h>
+#import <WebKit/WebSecurityOriginPrivate.h>
+#import <WebKit/WebUIDelegatePrivate.h>
+#import <wtf/RetainPtr.h>
+#import <wtf/text/WTFString.h>
+
+@interface WebSecurityOrigin (WebInternal)
+- (id)_initWithWebCoreSecurityOrigin:(WebCore::SecurityOrigin *)origin;
+@end
+
+namespace WebKit {
+
+void decidePolicyForGeolocationRequestFromOrigin(WebCore::SecurityOrigin*, const String& urlString, id<WebAllowDenyPolicyListener>, UIWindow* window);
+
+void decidePolicyForGeolocationRequestFromOrigin(WebCore::SecurityOrigin* origin, const String& urlString, id<WebAllowDenyPolicyListener> listener, UIWindow* window)
+{
+ RetainPtr<WebSecurityOrigin> securityOrigin = adoptNS([[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:origin]);
+ RetainPtr<NSURL> 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 <UIKit/UIWebFormAccessory.h>
+#import <UIKit/UITextInput_Private.h>
+#import <UIKit/UIView.h>
+#import <UIKit/UIWebTouchEventsGestureRecognizer.h>
+#import <UIKit/UIWKTextInteractionAssistant.h>
+#import <wtf/Forward.h>
+#import <wtf/Vector.h>
+
+@class UIWebScrollView;
+
+namespace WebCore {
+class Color;
+class FloatQuad;
+class IntSize;
+}
+
+namespace WebKit {
+class WebPageProxy;
+}
+
+@class WebIOSEvent;
+
+@interface WKInteractionView : UIView<UIGestureRecognizerDelegate, UIWebTouchEventsGestureRecognizerDelegate, UITextInputPrivate, UIWebFormAccessoryDelegate, UIWKInteractionViewProtocol>
+
+- (void)setScrollView:(UIWebScrollView *)scrollView;
+- (void)setPage:(PassRefPtr<WebKit::WebPageProxy>)page;
+
+- (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const WebCore::Color&)color quads:(const Vector<WebCore::FloatQuad>&)highlightedQuads topLeftRadius:(const WebCore::IntSize&)topLeftRadius topRightRadius:(const WebCore::IntSize&)topRightRadius bottomLeftRadius:(const WebCore::IntSize&)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&)bottomRightRadius;
+
+- (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 "config.h"
+#import "WKInteractionView.h"
+
+#import "NativeWebKeyboardEvent.h"
+#import "NativeWebTouchEvent.h"
+#import "WKBase.h"
+#import "WKGestureTypes.h"
+#import "WebEvent.h"
+#import "WebIOSEventFactory.h"
+#import "WebPageMessages.h"
+#import "WebProcessProxy.h"
+#import <UIKit/UIFont_Private.h>
+#import <UIKit/UIKeyboardImpl.h>
+#import <UIKit/UILongPressGestureRecognizer_Private.h>
+#import <UIKit/UITapGestureRecognizer_Private.h>
+#import <UIKit/UITextInteractionAssistant_Private.h>
+#import <UIKit/UIWebScrollView.h>
+#import <UIKit/_UIHighlightView.h>
+#import <UIKit/_UIWebHighlightLongPressGestureRecognizer.h>
+#import <WebCore/Color.h>
+#import <WebCore/FloatQuad.h>
+#import <WebCore/WebEvent.h>
+#import <WebKit/WebSelectionRect.h>
+#import <wtf/RetainPtr.h>
+
+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 <UITextInput> *)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<UIWebTouchEventsGestureRecognizer> _touchEventGestureRecognizer;
+ RetainPtr<UITapGestureRecognizer> _singleTapGestureRecognizer;
+ RetainPtr<_UIWebHighlightLongPressGestureRecognizer> _highlightLongPressGestureRecognizer;
+
+ UIWKTextInteractionAssistant *_textSelectionAssistant;
+ UITextInputTraits *_traits;
+ BOOL _canBeFirstResponder;
+ UIWebFormAccessory *_accessory;
+ id <UITextInputDelegate> _inputDelegate;
+ BOOL _showingTextStyleOptions;
+
+ __weak UIWebScrollView *_scrollView;
+ RefPtr<WebPageProxy> _page;
+
+ RetainPtr<_UIHighlightView> _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<WebKit::WebPageProxy>)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->setShouldSendEventsSynchronously(true);
+ _page->handleTouchEvent(nativeWebTouchEvent);
+ _page->setShouldSendEventsSynchronously(false);
+}
+
+static FloatQuad inflateQuad(const FloatQuad& 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() > points[1].x())
+ std::swap(points[0], points[1]);
+ if (points[2].x() > points[3].x())
+ std::swap(points[2], points[3]);
+
+ if (points[0].x() > points[2].x())
+ std::swap(points[0], points[2]);
+ if (points[1].x() > points[3].x())
+ std::swap(points[1], points[3]);
+
+ if (points[1].x() > 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() < points[0].y())
+ std::swap(points[0], points[1]);
+ if (points[3].y() < 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&)color quads:(const Vector<WebCore::FloatQuad>&)highlightedQuads topLeftRadius:(const WebCore::IntSize&)topLeftRadius topRightRadius:(const WebCore::IntSize&)topRightRadius bottomLeftRadius:(const WebCore::IntSize&)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&)bottomRightRadius
+{
+ 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<UIColor> 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<NSMutableArray> rects = adoptNS([[NSMutableArray alloc] initWithCapacity:static_cast<const NSUInteger>(quadCount)]);
+ for (size_t i = 0; i < quadCount; ++i) {
+ const FloatQuad& quad = highlightedQuads[i];
+ if (quad.isRectilinear()) {
+ CGRect rect = quad.boundingBox();
+ if ((CGRectGetWidth(rect) > CGRectGetWidth(constrainRect)) || (CGRectGetHeight(rect) > 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<NSMutableArray> quads = adoptNS([[NSMutableArray alloc] initWithCapacity:static_cast<const NSUInteger>(quadCount)]);
+ for (size_t i = 0; i < quadCount; ++i) {
+ const FloatQuad& 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<NSMutableArray> 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->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 && [preventedGestureRecognizer isKindOfClass:NSClassFromString(@"UIScrollViewPanGestureRecognizer")]);
+}
+
+- (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->process()->send(Messages::WebPage::HandleTap(IntPoint(location)), _page->pageID());
+}
+
+- (UIView *)inputAccessoryView
+{
+ if (!_canBeFirstResponder)
+ return nil;
+
+ if (!_accessory) {
+ _accessory = [[UIWebFormAccessory alloc] init];
+ _accessory.delegate = self;
+ }
+
+ return _accessory;
+}
+
+- (NSArray *)supportedPasteboardTypesForCurrentSelection
+{
+ if (_page->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->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->editorState().isContentRichlyEditable && _page->editorState().selectionIsRange && !_showingTextStyleOptions;
+ if (_showingTextStyleOptions)
+ return (action == @selector(toggleBoldface:) || action == @selector(toggleItalics:) || action == @selector(toggleUnderline:));
+ if (action == @selector(cut:))
+ return !_page->editorState().isInPasswordField && _page->editorState().isContentEditable && _page->editorState().selectionIsRange;
+
+ if (action == @selector(paste:)) {
+ if (_page->editorState().selectionIsNone || !_page->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->editorState().isInPasswordField)
+ return NO;
+ return hasWebSelection || _page->editorState().selectionIsRange;
+ }
+
+ if (action == @selector(_define:)) {
+ if (_page->editorState().isInPasswordField || !(hasWebSelection || _page->editorState().selectionIsRange))
+ return NO;
+
+ NSUInteger textLength = _page->editorState().selectedTextLength;
+ // FIXME: We should be calling UIReferenceLibraryViewController to check if the length is
+ // acceptable, but the interface takes a string.
+ // <rdar://problem/15254406>
+ if (!textLength || textLength > 200)
+ return NO;
+
+ return YES;
+ }
+
+ if (action == @selector(_addShortcut:)) {
+ if (_page->editorState().isInPasswordField || !(hasWebSelection || _page->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->editorState().isInPasswordField && [self hasContent] && !_page->editorState().selectionIsNone && !_page->editorState().selectionIsRange;
+ }
+
+ if (action == @selector(selectAll:)) {
+ if (_page->editorState().selectionIsNone || ![self hasContent])
+ return NO;
+ if (!_page->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->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->editorState().isContentEditable && !_page->editorState().isInPasswordField;
+
+ return [super canPerformAction:action withSender:sender];
+}
+
+- (void)_resetShowingTextStyle:(NSNotification *)notification
+{
+ _showingTextStyleOptions = NO;
+ [_textSelectionAssistant hideTextStyleOptions];
+}
+
+- (void)copy:(id)sender
+{
+ _page->executeEditCommand(ASCIILiteral("copy"));
+}
+
+- (void)cut:(id)sender
+{
+ [self.inputDelegate textWillChange:self];
+
+ _page->executeEditCommand(ASCIILiteral("cut"));
+
+ [self.inputDelegate textDidChange:self];
+}
+
+- (void)paste:(id)sender
+{
+ [self.inputDelegate textWillChange:self];
+
+ _page->executeEditCommand(ASCIILiteral("paste"));
+
+ [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->extendSelection(WordGranularity);
+}
+
+- (void)selectAll:(id)sender
+{
+ [_textSelectionAssistant selectAll:sender];
+ _page->executeEditCommand(ASCIILiteral("selectAll"));
+}
+
+- (void)toggleBoldface:(id)sender
+{
+ if (!_page->editorState().isContentRichlyEditable)
+ return;
+
+ _page->executeEditCommand(ASCIILiteral("toggleBold"));
+}
+
+- (void)toggleItalics:(id)sender
+{
+ if (!_page->editorState().isContentRichlyEditable)
+ return;
+
+ _page->executeEditCommand(ASCIILiteral("toggleItalic"));
+}
+
+- (void)toggleUnderline:(id)sender
+{
+ if (!_page->editorState().isContentRichlyEditable)
+ return;
+
+ _page->executeEditCommand(ASCIILiteral("toggleUnderline"));
+}
+
+- (void)_showTextStyleOptions:(id)sender
+{
+ _showingTextStyleOptions = YES;
+ [_textSelectionAssistant showTextStyleOptions];
+}
+
+- (void)_showDictionary:(NSString *)text
+{
+ CGRect presentationRect = _page->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)->string();
+ WKInteractionView* view = static_cast<WKInteractionView*>(context);
+ ASSERT(view);
+ [view _showDictionary:convertedString];
+}
+
+- (void)_define:(id)sender
+{
+ _page->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& point, uint32_t gestureType, uint32_t gestureState, uint32_t flags, WKErrorRef error, void* context)
+{
+ if (error) {
+ ASSERT_NOT_REACHED();
+ return;
+ }
+ WKInteractionView *view = static_cast<WKInteractionView*>(context);
+ ASSERT(view);
+ // FIXME: need to pass flags to selectionChangedWithGestureAt.
+ [(UIWKTextInteractionAssistant *)[view interactionAssistant] selectionChangedWithGestureAt:(CGPoint)point withGesture:toUIWKGestureType((WKGestureType)gestureType) withState:toUIGestureRecognizerState(static_cast<WKGestureRecognizerState>(gestureState))];
+}
+
+static void selectionChangedWithTouch(const WebCore::IntPoint& point, uint32_t touch, WKErrorRef error, void* context)
+{
+ if (error) {
+ ASSERT_NOT_REACHED();
+ return;
+ }
+ WKInteractionView *view = static_cast<WKInteractionView*>(context);
+ ASSERT(view);
+ [(UIWKTextInteractionAssistant *)[view interactionAssistant] selectionChangedWithTouchAt:(CGPoint)point withSelectionTouch:toUIWKSelectionTouch((WKSelectionTouch)touch)];
+}
+
+- (void)changeSelectionWithGestureAt:(CGPoint)point withGesture:(UIWKGestureType)gestureType withState:(UIGestureRecognizerState)state
+{
+ _page->selectWithGesture(WebCore::IntPoint(point), CharacterGranularity, toWKGestureType(gestureType), toWKGestureRecognizerState(state), GestureCallback::create(self, selectionChangedWithGesture));
+}
+
+- (void)changeSelectionWithTouchAt:(CGPoint)point withSelectionTouch:(UIWKSelectionTouch)touch baseIsStart:(BOOL)baseIsStart
+{
+ _page->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->selectWithTwoTouches(WebCore::IntPoint(from), WebCore::IntPoint(to), toWKGestureType(gestureType), toWKGestureRecognizerState(gestureState), GestureCallback::create(self, selectionChangedWithGesture));
+}
+
+- (WKAutoCorrectionData *)autocorrectionData
+{
+ return &_autocorrectionData;
+}
+
+static void autocorrectionData(const Vector<FloatRect>& rects, const String& fontName, double fontSize, uint64_t traits, WKErrorRef error, void* context)
+{
+ WKInteractionView* view = static_cast<WKInteractionView*>(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->fontName = fontName;
+ autocorrectionData->fontSize = fontSize;
+ autocorrectionData->fontTraits = traits;
+ autocorrectionData->textFirstRect = firstRect;
+ autocorrectionData->textLastRect = lastRect;
+
+ autocorrectionData->completionHandler(rects.size() ? [WKAutocorrectionRects autocorrectionRectsWithRects:firstRect lastRect:lastRect] : nil);
+ [autocorrectionData->completionHandler release];
+ autocorrectionData->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->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<WKInteractionView*>(context);
+ ASSERT(view);
+ WKAutoCorrectionData *autocorrectionData = view.autocorrectionData;
+
+ autocorrectionData->completionHandler(correction ? [WKAutocorrectionRects autocorrectionRectsWithRects:autocorrectionData->textFirstRect lastRect:autocorrectionData->textLastRect] : nil);
+ [autocorrectionData->completionHandler release];
+ autocorrectionData->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->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->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->editorState().selectionRects.size();
+ NSMutableArray *webRects = [NSMutableArray arrayWithCapacity:size];
+ for (unsigned i = 0; i < size; i++) {
+ const WebCore::SelectionRect& coreRect = _page->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->editorState().selectionIsNone
+ isRange:_page->editorState().selectionIsRange
+ isEditable:_page->editorState().isContentEditable
+ startRect:_page->editorState().caretRectAtStart
+ endRect:_page->editorState().caretRectAtEnd
+ selectionRects:webRects
+ selectedTextLength:_page->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 <UITextInputTokenizer>)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->executeEditCommand(ASCIILiteral("deleteBackward"));
+}
+
+// Inserts the given string, replacing any selected or marked text.
+- (void)insertText:(NSString *)aStringValue
+{
+ _page->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->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->editorState().isContentEditable && event.isTabKey)
+ return NO;
+
+ BOOL shift = event.modifierFlags & 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("moveLeftAndModifySelection") : ASCIILiteral("moveLeft");
+ break;
+
+ case kWebUpArrowKey:
+ command = shift ? ASCIILiteral("moveUpAndModifySelection") : ASCIILiteral("moveUp");
+ break;
+
+ case kWebRightArrowKey:
+ command = shift ? ASCIILiteral("moveRightAndModifySelection") : ASCIILiteral("moveRight");
+ break;
+
+ case kWebDownArrowKey:
+ command = shift ? ASCIILiteral("moveDownAndModifySelection") : ASCIILiteral("moveDown");
+ break;
+ }
+ if (!command.isEmpty()) {
+ _page->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:@"\n" withFlags:0];
+ return YES;
+ }
+ return NO;
+
+ case kWebDeleteForwardKey:
+ _page->executeEditCommand(ASCIILiteral("deleteForward"));
+ 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) > 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:@"%@(%p) - start:%@, end:%@", [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) && 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:@"<WKTextPosition: %p, {%@}>", 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<WKTextSelectionRect> 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 <UIKit/UIWebScrollView.h>
+
+@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 "config.h"
+#import "WKScrollView.h"
+
+@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 "config.h"
+#import "WKView.h"
+
+#import "WKContentView.h"
+#import "WKScrollView.h"
+#import <UIKit/UIScreen.h>
+#import <UIKit/UIScrollView_Private.h>
+#import <UIKit/_UIWebViewportHandler.h>
+#import <wtf/RetainPtr.h>
+
+static const float minWebViewScale = 0.25;
+static const float maxWebViewScale = 5;
+static struct _UIWebViewportConfiguration standardViewportConfiguration = { { UIWebViewportStandardViewportWidth, UIWebViewportGrowsAndShrinksToFitHeight }, UIWebViewportScaleForScalesToFit, minWebViewScale, maxWebViewScale, true };
+
+@interface WKView () <UIScrollViewDelegate, WKContentViewDelegate, _UIWebViewportHandlerDelegate>
+- (void)_setDocumentScale:(CGFloat)newScale;
+@end
+
+@implementation WKView {
+ RetainPtr<WKScrollView> _scrollView;
+ RetainPtr<WKContentView> _contentView;
+
+ BOOL _userHasChangedPageScale;
+ RetainPtr<_UIWebViewportHandler> _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:&configuration];
+ }];
+}
+
+- (void)contentViewDidReceiveMobileDocType:(WKContentView *)contentView
+{
+ [_viewportHandler update:^{
+ struct _UIWebViewportConfiguration configuration = standardViewportConfiguration;
+ configuration.minimumScale = 1;
+ configuration.size = CGSizeMake(320.0, UIWebViewportGrowsAndShrinksToFitHeight);
+ [_viewportHandler resetViewportConfiguration:&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<CGFloat>(viewportHandler.maximumScale)), static_cast<CGFloat>(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<WKBrowsingContextLoadDelegate> _loadDelegate;
</span><ins>+#if PLATFORM(IOS)
+ id <WKBrowsingContextLoadDelegateInternal> _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 <WKBrowsingContextLoadDelegateInternal>)loadDelegateInternal
+{
+ return _data->_loadDelegateInternal;
+}
+
+- (void)setLoadDelegateInternal:(id <WKBrowsingContextLoadDelegateInternal>)loadDelegateInternal
+{
+ _data->_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 "WKBrowsingContextControllerPrivate.h"
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+@protocol WKBrowsingContextLoadDelegateInternal <NSObject>
+@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 <WKBrowsingContextLoadDelegateInternal> 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 "WebFrameProxy.h"
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+#import "WKAPICast.h"
+#import "WKGeolocationProviderIOS.h"
+#import <WebCore/WebCoreThreadSystemInterface.h>
+#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<WKContextRef> _contextRef;
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+ RetainPtr<WKGeolocationProviderIOS> _geolocationProvider;
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> // Delegate for callbacks.
</span><span class="cx"> id<WKProcessGroupDelegate> _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 <rdar://problem/15256572> is fixed.
+ InitWebCoreThreadSystemInterface();
+#endif
+
</ins><span class="cx"> if (bundleURL)
</span><span class="cx"> _data->_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->_contextRef.get();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+- (WKGeolocationProviderIOS *)_geolocationProvider
+{
+ if (!_data->_geolocationProvider)
+ _data->_geolocationProvider = adoptNS([[WKGeolocationProviderIOS alloc] initWithContext:toImpl(_data->_contextRef.get())]);
+ return _data->_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 <TargetConditionals.h>
+
</ins><span class="cx"> #import <WebKit2/WKProcessGroup.h>
</span><span class="cx"> #import <WebKit2/WKBase.h>
</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 <UIKit/UIKit.h>
+#else
</ins><span class="cx"> #import <Cocoa/Cocoa.h>
</span><ins>+#endif
</ins><span class="cx"> #import <WebKit2/WKDeclarationSpecifiers.h>
</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 <NSTextInputClient> {
</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 "GenericCallback.h"
+#include "WKAPICast.h"
+#include "WebError.h"
+#include <wtf/HashMap.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebKit {
+
+class AutocorrectionDataCallback : public CallbackBase {
+public:
+ typedef void (*CallbackFunction)(const Vector<WebCore::FloatRect>&, const String&, double, uint64_t, WKErrorRef, void*);
+
+ static PassRefPtr<AutocorrectionDataCallback> create(void* context, CallbackFunction callback)
+ {
+ return adoptRef(new AutocorrectionDataCallback(context, callback));
+ }
+
+ virtual ~AutocorrectionDataCallback()
+ {
+ ASSERT(!m_callback);
+ }
+
+ void performCallbackWithReturnValue(const Vector<WebCore::FloatRect>& returnValue1, const String& 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<WebError> error = WebError::create();
+ m_callback(Vector<WebCore::FloatRect>(), 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:@"WebKit2UseXPCServiceForWebProcess"])
</span><span class="cx"> return [value boolValue];
</span><span class="cx">
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 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:@"PluginProcessShim.dylib"];
</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:@"WebProcess.app"];
</span><span class="cx"> NSString *processAppExecutablePath = [[NSBundle bundleWithPath:processPath] executablePath];
</span><span class="cx">
</span><span class="cx"> processShimPathNSString = [[processAppExecutablePath stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"WebProcessShim.dylib"];
</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:@"NetworkProcess.app"];
</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 "com.apple.WebKit.Networking.Development";
</span><span class="cx"> return "com.apple.WebKit.Networking";
</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 "com.apple.WebKit.Databases.Development";
</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:@"WebKit2UseXPCServiceForWebProcess"])
</span><span class="cx"> return [value boolValue];
</span><span class="cx">
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 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&) = 0;
</del><ins>+#if PLATFORM(EFL) || PLATFORM(IOS)
+ virtual void didChangeContentSize(const WebCore::IntSize&) = 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& pasteboardName, PassRefPtr<WebCore::SharedBuffer> imageBuffer, const String& filename, const String& extension, const String& title,
</span><span class="cx"> const String& url, const String& visibleUrl, PassRefPtr<WebCore::SharedBuffer> 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&, const AtomicString&, Vector<WTF::String>&) = 0;
</span><span class="cx"> #endif
</span><span class="lines">@@ -189,7 +197,7 @@
</span><span class="cx"> virtual void updateAcceleratedCompositingMode(const LayerTreeContext&) = 0;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if !PLATFORM(IOS) && 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&, const DictionaryPopupInfo&) = 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& 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<WebContext> create(const String& 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<WebContext*>& allContexts();
</span><span class="cx">
</span><span class="lines">@@ -472,7 +475,7 @@
</span><span class="cx">
</span><span class="cx"> RetainPtr<NSObject> m_automaticTextReplacementNotificationObserver;
</span><span class="cx"> RetainPtr<NSObject> m_automaticSpellingCorrectionNotificationObserver;
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</del><ins>+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> RetainPtr<NSObject> m_automaticQuoteSubstitutionNotificationObserver;
</span><span class="cx"> RetainPtr<NSObject> 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("Bold", "Bold (Undo action name)", "Undo action name");
</span><span class="cx"> case EditActionItalics:
</span><span class="cx"> return WEB_UI_STRING_KEY("Italics", "Italics (Undo action name)", "Undo action name");
</span><ins>+#if PLATFORM(IOS)
+ case EditActionDelete:
+ return WEB_UI_STRING_KEY("Delete", "Delete (Undo action name)", "Undo action name");
+ case EditActionDictation:
+ return WEB_UI_STRING_KEY("Dictation", "Dictation (Undo action name)", "Undo action name");
+#endif
</ins><span class="cx"> case EditActionPaste:
</span><span class="cx"> return WEB_UI_STRING_KEY("Paste", "Paste (Undo action name)", "Undo action name");
</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()->sendToAllProcesses(Messages::WebGeolocationManager::DidFailToDeterminePosition(errorMessage));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+void WebGeolocationManagerProxy::resetPermissions()
+{
+ context()->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& 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& 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) && !PLATFORM(IOS)
</ins><span class="cx"> , m_exposedRectChangedTimer(this, &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) && !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->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->resetSecureInputState();
</span><span class="lines">@@ -2603,6 +2603,7 @@
</span><span class="cx"> m_process->context()->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& mimeType, const String& pluginURLString, const String& pluginspageAttributeURLString, const String& frameURLString, const String& 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<ImmutableDictionary> pluginInformation;
</span><del>-#if ENABLE(NETSCAPE_PLUGIN_API)
</del><span class="cx"> String newMimeType = mimeType;
</span><span class="cx"> PluginModuleInfo plugin = m_process->context()->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<RenderEmbeddedObject::PluginUnavailabilityReason>(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) && 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& size)
</del><ins>+#if PLATFORM(EFL) || PLATFORM(IOS)
+void WebPageProxy::didChangeContentSize(const IntSize& size)
</ins><span class="cx"> {
</span><del>- m_pageClient->didChangeContentsSize(size);
</del><ins>+ m_pageClient->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->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->selectionDidChange();
+ }
+#endif
</ins><span class="cx"> #elif PLATFORM(EFL) || PLATFORM(GTK)
</span><span class="cx"> m_pageClient->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) && PLATFORM(MAC)
</ins><span class="cx"> dismissCorrectionPanel(ReasonForDismissingAlternativeTextIgnored);
</span><span class="cx"> m_pageClient->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->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->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& mimeType, const String& frameURLString, const String& 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->send(Messages::WebPage::SetMinimumLayoutSize(minimumLayoutSize), m_pageID, 0);
</span><span class="cx"> m_drawingArea->minimumLayoutSizeDidChange();
</span><span class="cx">
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if USE(APPKIT)
</ins><span class="cx"> if (m_minimumLayoutSize.width() <= 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->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) && PLATFORM(MAC)
</ins><span class="cx">
</span><span class="cx"> void WebPageProxy::substitutionsPanelIsShowing(bool& 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 "APIObject.h"
</span><ins>+#include "AutoCorrectionCallback.h"
</ins><span class="cx"> #include "Connection.h"
</span><span class="cx"> #include "DragControllerAction.h"
</span><span class="cx"> #include "DrawingAreaProxy.h"
</span><span class="lines">@@ -65,6 +66,7 @@
</span><span class="cx"> #include <WebCore/PlatformScreen.h>
</span><span class="cx"> #include <WebCore/ScrollTypes.h>
</span><span class="cx"> #include <WebCore/TextChecking.h>
</span><ins>+#include <WebCore/TextGranularity.h>
</ins><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/HashSet.h>
</span><span class="cx"> #include <wtf/OwnPtr.h>
</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&, uint32_t, uint32_t, uint32_t, WKErrorRef, void*);
+
+ static PassRefPtr<GestureCallback> create(void* context, CallbackFunction callback)
+ {
+ return adoptRef(new GestureCallback(context, callback));
+ }
+
+ virtual ~GestureCallback()
+ {
+ ASSERT(!m_callback);
+ }
+
+ void performCallbackWithReturnValue(const WebCore::IntPoint& 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<WebError> 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&, uint32_t, WKErrorRef, void*);
+
+ static PassRefPtr<TouchesCallback> create(void* context, CallbackFunction callback)
+ {
+ return adoptRef(new TouchesCallback(context, callback));
+ }
+
+ virtual ~TouchesCallback()
+ {
+ ASSERT(!m_callback);
+ }
+
+ void performCallbackWithReturnValue(const WebCore::IntPoint& returnValue1, uint32_t returnValue2)
+ {
+ ASSERT(m_callback);
+
+ m_callback(returnValue1, returnValue2, 0, context());
+
+ m_callback = 0;
+ }
+
+ void invalidate()
+ {
+ ASSERT(m_callback);
+
+ RefPtr<WebError> 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<API::Object::Type::Page>
</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& commandName);
</span><span class="cx"> void validateCommand(const String& commandName, PassRefPtr<ValidateCommandCallback>);
</span><ins>+#if PLATFORM(IOS)
+ void selectWithGesture(const WebCore::IntPoint, WebCore::TextGranularity, uint32_t gestureType, uint32_t gestureState, PassRefPtr<GestureCallback>);
+ void updateSelectionWithTouches(const WebCore::IntPoint, uint32_t touches, bool baseIsStart, PassRefPtr<TouchesCallback>);
+ void selectWithTwoTouches(const WebCore::IntPoint from, const WebCore::IntPoint to, uint32_t gestureType, uint32_t gestureState, PassRefPtr<GestureCallback>);
+ void extendSelection(WebCore::TextGranularity);
+ void requestAutocorrectionData(const String& textForAutocorrection, PassRefPtr<AutocorrectionDataCallback>);
+ void applyAutocorrection(const String& correction, const String& originalText, PassRefPtr<StringCallback>);
+#endif
</ins><span class="cx">
</span><span class="cx"> const EditorState& editorState() const { return m_editorState; }
</span><span class="cx"> bool canDelete() const { return hasSelectedRange() && 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& contentOffset);
+ void didFinishZooming(float newScale);
+
+ void tapHighlightAtPosition(const WebCore::FloatPoint&, uint64_t& requestID);
+
+ void blurAssistedNode();
+#endif
+
</ins><span class="cx"> void postMessageToInjectedBundle(const String& 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& result);
</span><span class="cx"> void setStatusText(const String&);
</span><span class="cx"> void mouseDidMoveOverElement(const WebHitTestResult::Data& hitTestResultData, uint32_t modifiers, CoreIPC::MessageDecoder&);
</span><ins>+#if ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx"> void unavailablePluginButtonClicked(uint32_t opaquePluginUnavailabilityReason, const String& mimeType, const String& pluginURLString, const String& pluginsPageURLString, const String& frameURLString, const String& pageURLString);
</span><ins>+#endif // ENABLE(NETSCAPE_PLUGIN_API)
</ins><span class="cx"> void setToolbarsAreVisible(bool toolbarsAreVisible);
</span><span class="cx"> void getToolbarsAreVisible(bool& 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& mimeType, const String& frameURLString, const String& pageURLString);
</span><span class="cx"> void didBlockInsecurePluginVersion(const String& mimeType, const String& pluginURLString, const String& frameURLString, const String& 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&, const WebCore::IntRect&);
</span><span class="cx"> #endif
</span><del>-#if PLATFORM(EFL)
- void didChangeContentsSize(const WebCore::IntSize&);
</del><ins>+#if PLATFORM(EFL) || PLATFORM(IOS)
+ void didChangeContentSize(const WebCore::IntSize&);
</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&, uint64_t);
</span><span class="cx"> void computedPagesCallback(const Vector<WebCore::IntRect>&, double totalScaleFactorForPrinting, uint64_t);
</span><span class="cx"> void validateCommandCallback(const String&, bool, int, uint64_t);
</span><ins>+#if PLATFORM(IOS)
+ void gestureCallback(const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t, uint64_t);
+ void touchesCallback(const WebCore::IntPoint&, uint32_t, uint64_t);
+ void autocorrectionDataCallback(const Vector<WebCore::FloatRect>&, const String&, float, uint64_t, uint64_t);
+ void interpretKeyEvent(const EditorState&, bool isCharEvent, bool& handled);
+#endif
</ins><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx"> void printFinishedCallback(const WebCore::ResourceError&, 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&, SandboxExtension::Handle&);
</span><span class="cx">
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if PLATFORM(MAC) && !PLATFORM(IOS)
</ins><span class="cx"> void substitutionsPanelIsShowing(bool&);
</span><span class="cx"> void showCorrectionPanel(int32_t panelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& 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<String>& result);
</span><span class="cx"> #endif
</span><del>-#endif // PLATFORM(MAC)
</del><ins>+#endif // PLATFORM(MAC) && !PLATFORM(IOS)
</ins><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+ void mainDocumentDidReceiveMobileDocType();
+
+ void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& geometries, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius);
+
+ void didChangeViewportArguments(const WebCore::ViewportArguments& viewportArguments);
+
+ void startAssistingNode(const WebCore::IntRect&, 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<uint64_t, RefPtr<ScriptValueCallback>> m_scriptValueCallbacks;
</span><span class="cx"> HashMap<uint64_t, RefPtr<ComputedPagesCallback>> m_computedPagesCallbacks;
</span><span class="cx"> HashMap<uint64_t, RefPtr<ValidateCommandCallback>> m_validateCommandCallbacks;
</span><ins>+#if PLATFORM(IOS)
+ HashMap<uint64_t, RefPtr<GestureCallback>> m_gestureCallbacks;
+ HashMap<uint64_t, RefPtr<TouchesCallback>> m_touchesCallbacks;
+ HashMap<uint64_t, RefPtr<AutocorrectionDataCallback>> m_autocorrectionCallbacks;
+#endif
</ins><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx"> HashMap<uint64_t, RefPtr<PrintFinishedCallback>> 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<WebPageProxy> 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) -> (WTF::String result)
</span><span class="cx"> ShouldInterruptJavaScript() -> (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<WebCore::IntRect> 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<WebCore::FloatRect> textRects, String fontName, double fontSize, uint64_t traits, uint64_t callbackID);
+ InterpretKeyEvent(WebKit::EditorState state, bool isCharEvent) -> (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() -> (bool isShowing)
</span><span class="cx"> #endif
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if !PLATFORM(IOS) && PLATFORM(MAC)
</ins><span class="cx"> # Autocorrection messages
</span><span class="cx"> ShowCorrectionPanel(int32_t panelType, WebCore::FloatRect boundingBoxOfReplacedString, String replacedString, String replacementString, Vector<String> 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<WebCore::FloatQuad> 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<String> searchItems)
</span><span class="cx"> LoadRecentSearches(WTF::String name) -> (Vector<String> 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&);
</span><span class="cx"> void mouseDidMoveOverElement(WebPageProxy*, const WebHitTestResult::Data&, 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&);
</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 "config.h"
+#import "TextChecker.h"
+
+#import "TextCheckerState.h"
+#import <WebCore/NotImplemented.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+TextCheckerState textCheckerState;
+
+const TextCheckerState& 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<TextCheckingResult> TextChecker::checkTextOfParagraph(int64_t, const UChar*, int, uint64_t)
+{
+ notImplemented();
+ return Vector<TextCheckingResult>();
+}
+
+#endif
+
+void TextChecker::checkSpellingOfString(int64_t, const UChar*, uint32_t, int32_t&, int32_t&)
+{
+ // Mac uses checkTextOfParagraph instead.
+ notImplemented();
+}
+
+void TextChecker::checkGrammarOfString(int64_t, const UChar*, uint32_t, Vector<WebCore::GrammarDetail>&, int32_t&, int32_t&)
+{
+ // Mac uses checkTextOfParagraph instead.
+ notImplemented();
+}
+
+bool TextChecker::spellingUIIsShowing()
+{
+ notImplemented();
+ return false;
+}
+
+void TextChecker::toggleSpellingUIIsShowing()
+{
+ notImplemented();
+}
+
+void TextChecker::updateSpellingUIWithMisspelledWord(int64_t, const String&)
+{
+ notImplemented();
+}
+
+void TextChecker::updateSpellingUIWithGrammarString(int64_t, const String&, const GrammarDetail&)
+{
+ notImplemented();
+}
+
+void TextChecker::getGuessesForWord(int64_t, const String&, const String&, Vector<String>&)
+{
+ notImplemented();
+}
+
+void TextChecker::learnWord(int64_t, const String&)
+{
+ notImplemented();
+}
+
+void TextChecker::ignoreWord(int64_t, const String&)
+{
+ notImplemented();
+}
+
+void TextChecker::requestCheckingOfString(PassRefPtr<TextCheckerCompletion>)
+{
+ 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 "DrawingAreaProxy.h"
+#include <wtf/PassOwnPtr.h>
+
+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&) 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 "config.h"
+#import "TiledCoreAnimationDrawingAreaProxyIOS.h"
+
+#import "DrawingAreaMessages.h"
+#import "WebPageProxy.h"
+#import "WebProcessProxy.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+TiledCoreAnimationDrawingAreaProxyIOS::TiledCoreAnimationDrawingAreaProxyIOS(WebPageProxy* webPageProxy)
+ : DrawingAreaProxy(DrawingAreaTypeTiledCoreAnimationIOS, webPageProxy)
+{
+}
+
+TiledCoreAnimationDrawingAreaProxyIOS::~TiledCoreAnimationDrawingAreaProxyIOS()
+{
+}
+
+void TiledCoreAnimationDrawingAreaProxyIOS::deviceScaleFactorDidChange()
+{
+ m_webPageProxy->process()->send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy->deviceScaleFactor()), m_webPageProxy->pageID());
+}
+
+void TiledCoreAnimationDrawingAreaProxyIOS::sizeDidChange()
+{
+ m_webPageProxy->process()->send(Messages::DrawingArea::UpdateGeometry(m_size, IntSize()), m_webPageProxy->pageID());
+}
+
+void TiledCoreAnimationDrawingAreaProxyIOS::enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext& layerTreeContext)
+{
+ m_webPageProxy->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 "config.h"
+#import "WebFullScreenManagerProxy.h"
+
+#if ENABLE(FULLSCREEN_API) && 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& initialFrame, const IntRect& finalFrame)
+{
+ // No-op.
+}
+
+void WebFullScreenManagerProxy::beganExitFullScreen(const IntRect& initialFrame, const IntRect& 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 "config.h"
+#import "WebInspectorProxy.h"
+
+#if ENABLE(INSPECTOR)
+
+#import <WebCore/NotImplemented.h>
+
+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&)
+{
+ notImplemented();
+}
+
+void WebInspectorProxy::platformSave(const String& suggestedURL, const String& content, bool base64Encoded, bool forceSaveDialog)
+{
+ notImplemented();
+}
+
+void WebInspectorProxy::platformAppend(const String& suggestedURL, const String& 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 "config.h"
+#import "WebPageProxy.h"
+
+#import "NativeWebKeyboardEvent.h"
+#import "WebPageMessages.h"
+#import "WebProcessProxy.h"
+#import <WebCore/NotImplemented.h>
+#import <WebCore/SharedBuffer.h>
+#import "PageClientImplIOS.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebPageProxy::platformInitialize()
+{
+ notImplemented();
+}
+
+String WebPageProxy::standardUserAgent(const String&)
+{
+ notImplemented();
+
+ // Just return the iOS 5.1 user agent for now.
+ return "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";
+}
+
+void WebPageProxy::getIsSpeaking(bool&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::speak(const String&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::stopSpeaking()
+{
+ notImplemented();
+}
+
+void WebPageProxy::searchWithSpotlight(const String&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::searchTheWeb(const String&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::windowAndViewFramesChanged(const FloatRect&, const FloatPoint&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::setComposition(const String&, Vector<CompositionUnderline>, uint64_t, uint64_t, uint64_t, uint64_t)
+{
+ notImplemented();
+
+}
+
+void WebPageProxy::confirmComposition()
+{
+ notImplemented();
+}
+
+void WebPageProxy::cancelComposition()
+{
+ notImplemented();
+
+}
+
+bool WebPageProxy::insertText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd)
+{
+ if (!isValid())
+ return true;
+
+ bool handled = true;
+ process()->sendSync(Messages::WebPage::InsertText(text, replacementRangeStart, replacementRangeEnd), Messages::WebPage::InsertText::Reply(handled, m_editorState), m_pageID);
+ return handled;
+}
+
+bool WebPageProxy::insertDictatedText(const String&, uint64_t, uint64_t, const Vector<WebCore::TextAlternativeWithRange>&)
+{
+ notImplemented();
+ return false;
+}
+
+void WebPageProxy::getMarkedRange(uint64_t&, uint64_t&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::getSelectedRange(uint64_t&, uint64_t&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::getAttributedSubstringFromRange(uint64_t, uint64_t, AttributedString&)
+{
+ 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<WebCore::KeypressCommand>&)
+{
+ notImplemented();
+ return false;
+}
+
+String WebPageProxy::stringSelectionForPasteboard()
+{
+ notImplemented();
+ return String();
+}
+
+PassRefPtr<WebCore::SharedBuffer> WebPageProxy::dataSelectionForPasteboard(const String&)
+{
+ notImplemented();
+ return 0;
+}
+
+bool WebPageProxy::readSelectionFromPasteboard(const String&)
+{
+ notImplemented();
+ return false;
+}
+
+void WebPageProxy::performDictionaryLookupAtLocation(const WebCore::FloatPoint&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::gestureCallback(const WebCore::IntPoint& point, uint32_t gestureType, uint32_t gestureState, uint32_t flags, uint64_t callbackID)
+{
+ RefPtr<GestureCallback> callback = m_gestureCallbacks.take(callbackID);
+ if (!callback) {
+ ASSERT_NOT_REACHED();
+ return;
+ }
+
+ callback->performCallbackWithReturnValue(point, gestureType, gestureState, flags);
+}
+
+void WebPageProxy::touchesCallback(const WebCore::IntPoint& point, uint32_t touches, uint64_t callbackID)
+{
+ RefPtr<TouchesCallback> callback = m_touchesCallbacks.take(callbackID);
+ if (!callback) {
+ ASSERT_NOT_REACHED();
+ return;
+ }
+
+ callback->performCallbackWithReturnValue(point, touches);
+}
+
+void WebPageProxy::autocorrectionDataCallback(const Vector<WebCore::FloatRect>& rects, const String& fontName, float fontSize, uint64_t fontTraits, uint64_t callbackID)
+{
+ RefPtr<AutocorrectionDataCallback> callback = m_autocorrectionCallbacks.take(callbackID);
+ if (!callback) {
+ ASSERT_NOT_REACHED();
+ return;
+ }
+
+ callback->performCallbackWithReturnValue(rects, fontName, fontSize, fontTraits);
+}
+
+void WebPageProxy::selectWithGesture(const WebCore::IntPoint point, WebCore::TextGranularity granularity, uint32_t gestureType, uint32_t gestureState, PassRefPtr<GestureCallback> callback)
+{
+ if (!isValid()) {
+ callback->invalidate();
+ return;
+ }
+
+ uint64_t callbackID = callback->callbackID();
+ m_gestureCallbacks.set(callbackID, callback);
+ m_process->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<TouchesCallback> callback)
+{
+ if (!isValid()) {
+ callback->invalidate();
+ return;
+ }
+
+ uint64_t callbackID = callback->callbackID();
+ m_touchesCallbacks.set(callbackID, callback);
+ m_process->send(Messages::WebPage::UpdateSelectionWithTouches(point, touches, baseIsStart, callbackID), m_pageID);
+}
+
+void WebPageProxy::requestAutocorrectionData(const String& textForAutocorrection, PassRefPtr<AutocorrectionDataCallback> callback)
+{
+ if (!isValid()) {
+ callback->invalidate();
+ return;
+ }
+
+ uint64_t callbackID = callback->callbackID();
+ m_autocorrectionCallbacks.set(callbackID, callback);
+ m_process->send(Messages::WebPage::RequestAutocorrectionData(textForAutocorrection, callbackID), m_pageID);
+}
+
+void WebPageProxy::applyAutocorrection(const String& correction, const String& originalText, PassRefPtr<StringCallback> callback)
+{
+ if (!isValid()) {
+ callback->invalidate();
+ return;
+ }
+
+ uint64_t callbackID = callback->callbackID();
+ m_stringCallbacks.set(callbackID, callback);
+ m_process->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<GestureCallback> callback)
+{
+ if (!isValid()) {
+ callback->invalidate();
+ return;
+ }
+
+ uint64_t callbackID = callback->callbackID();
+ m_gestureCallbacks.set(callbackID, callback);
+ m_process->send(Messages::WebPage::SelectWithTwoTouches(from, to, gestureType, gestureState, callbackID), m_pageID);
+}
+
+void WebPageProxy::extendSelection(WebCore::TextGranularity granularity)
+{
+ m_process->send(Messages::WebPage::ExtendSelection(static_cast<uint32_t>(granularity)), m_pageID);
+}
+
+void WebPageProxy::interpretQueuedKeyEvent(const EditorState&, bool&, Vector<WebCore::KeypressCommand>&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::interpretKeyEvent(const EditorState& state, bool isCharEvent, bool& handled)
+{
+ m_editorState = state;
+ handled = m_pageClient->interpretKeyEvent(m_keyEventQueue.first(), isCharEvent);
+}
+
+// Complex text input support for plug-ins.
+void WebPageProxy::sendComplexTextInputToPlugin(uint64_t, const String&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::setSmartInsertDeleteEnabled(bool)
+{
+ notImplemented();
+}
+
+void WebPageProxy::registerWebProcessAccessibilityToken(const CoreIPC::DataReference&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::makeFirstResponder()
+{
+ notImplemented();
+}
+
+void WebPageProxy::registerUIProcessAccessibilityTokens(const CoreIPC::DataReference&, const CoreIPC::DataReference&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::pluginFocusOrWindowFocusChanged(uint64_t, bool)
+{
+ notImplemented();
+}
+
+void WebPageProxy::setPluginComplexTextInputState(uint64_t, uint64_t)
+{
+ notImplemented();
+}
+
+void WebPageProxy::executeSavedCommandBySelector(const String&, bool&)
+{
+ notImplemented();
+}
+
+bool WebPageProxy::shouldDelayWindowOrderingForEvent(const WebKit::WebMouseEvent&)
+{
+ notImplemented();
+ return false;
+}
+
+bool WebPageProxy::acceptsFirstMouse(int, const WebKit::WebMouseEvent&)
+{
+ notImplemented();
+ return false;
+}
+
+void WebPageProxy::didFinishScrolling(const WebCore::FloatPoint& contentOffset)
+{
+ process()->send(Messages::WebPage::DidFinishScrolling(contentOffset), m_pageID);
+}
+
+void WebPageProxy::didFinishZooming(float newScale)
+{
+ process()->send(Messages::WebPage::DidFinishZooming(newScale), m_pageID);
+}
+
+void WebPageProxy::tapHighlightAtPosition(const WebCore::FloatPoint& position, uint64_t& requestID)
+{
+ static uint64_t uniqueRequestID = 0;
+ requestID = ++uniqueRequestID;
+
+ process()->send(Messages::WebPage::TapHighlightAtPosition(requestID, position), m_pageID);
+}
+
+void WebPageProxy::blurAssistedNode()
+{
+ process()->send(Messages::WebPage::BlurAssistedNode(), m_pageID);
+}
+
+void WebPageProxy::mainDocumentDidReceiveMobileDocType()
+{
+ m_pageClient->mainDocumentDidReceiveMobileDocType();
+}
+
+void WebPageProxy::didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius)
+{
+ m_pageClient->didGetTapHighlightGeometries(requestID, color, highlightedQuads, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
+}
+
+void WebPageProxy::didChangeViewportArguments(const WebCore::ViewportArguments& viewportArguments)
+{
+ m_pageClient->didChangeViewportArguments(viewportArguments);
+}
+
+void WebPageProxy::startAssistingNode(const WebCore::IntRect& scrollRect, bool hasNextFocusable, bool hasPreviousFocusable)
+{
+ m_pageClient->startAssistingNode(scrollRect, hasNextFocusable, hasPreviousFocusable);
+}
+
+void WebPageProxy::stopAssistingNode()
+{
+ m_pageClient->stopAssistingNode();
+}
+
+void WebPageProxy::didPerformDictionaryLookup(const AttributedString&, const DictionaryPopupInfo&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication(const String&, const String&, const CoreIPC::DataReference&, const String&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplicationRaw(const String&, const String&, const uint8_t*, unsigned long, const String&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication(const String&)
+{
+ notImplemented();
+}
+
+void WebPageProxy::setAcceleratedCompositingRootLayer(PlatformLayer* rootLayer)
+{
+ m_pageClient->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 "config.h"
+#import "WebProcessProxy.h"
+
+#import <WebCore/NotImplemented.h>
+
+namespace WebKit {
+
+bool WebProcessProxy::fullKeyboardAccessEnabled()
+{
+ notImplemented();
+ return false;
+}
+
+static bool shouldUseXPC()
+{
+ if (id value = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebKit2UseXPCServiceForWebProcess"])
+ return [value boolValue];
+
+#if USE(XPC_SERVICES)
+ return true;
+#else
+ return false;
+#endif
+}
+
+void WebProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions& 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 "DrawingAreaProxy.h"
</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 "config.h"
</span><span class="cx"> #import "TiledCoreAnimationDrawingAreaProxy.h"
</span><span class="cx">
</span><ins>+#if !PLATFORM(IOS)
+
</ins><span class="cx"> #import "ColorSpaceData.h"
</span><span class="cx"> #import "DrawingAreaMessages.h"
</span><span class="cx"> #import "DrawingAreaProxyMessages.h"
</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 "config.h"
</span><span class="cx">
</span><del>-#if ENABLE(FULLSCREEN_API)
</del><ins>+#if ENABLE(FULLSCREEN_API) && !PLATFORM(IOS)
</ins><span class="cx">
</span><span class="cx"> #import "WKFullScreenWindowController.h"
</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 "WebKitSystemInterface.h"
</span><span class="cx"> #import "WebProcessCreationParameters.h"
</span><span class="cx"> #import "WebProcessMessages.h"
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> #import <QuartzCore/CARemoteLayerServer.h>
</span><ins>+#endif
</ins><span class="cx"> #import <WebCore/Color.h>
</span><span class="cx"> #import <WebCore/FileSystem.h>
</span><span class="cx"> #import <WebCore/NotImplemented.h>
</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 >= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx">
</span><span class="cx"> #if __has_include(<CFNetwork/CFURLProtocolPriv.h>)
</span><span class="cx"> #include <CFNetwork/CFURLProtocolPriv.h>
</span><span class="lines">@@ -65,7 +67,9 @@
</span><span class="cx"> NSString *WebStorageDirectoryDefaultsKey = @"WebKitLocalStorageDatabasePathPreferenceKey";
</span><span class="cx"> NSString *WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey = @"WebKitKerningAndLigaturesEnabledByDefault";
</span><span class="cx">
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> static NSString *WebKitApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification = @"NSApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification";
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> // FIXME: <rdar://problem/9138817> - After this "backwards compatibility" radar is removed, this code should be removed to only return an empty String.
</span><span class="cx"> NSString *WebIconDatabaseDirectoryDefaultsKey = @"WebIconDatabaseDirectoryDefaultsKey";
</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 >= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 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 >= 1090
</del><ins>+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> static void applicationOcclusionStateChanged()
</span><span class="cx"> {
</span><span class="cx"> const Vector<WebContext*>& 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 >= 1090
</del><ins>+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> for (const OcclusionNotificationHandler& 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 >= 1090
</del><ins>+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> for (const OcclusionNotificationHandler& 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) && !PLATFORM(IOS)
</ins><span class="cx"> parameters.accessibilityEnhancedUserInterfaceEnabled = [[NSApp accessibilityAttributeValue:@"AXEnhancedUserInterface"] 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 >= 1090
</del><ins>+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> parameters.shouldForceScreenFontSubstitution = [[NSUserDefaults standardUserDefaults] boolForKey:@"NSFontDefaultScreenFontSubstitutionEnabled"];
</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) && 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 >= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 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& urlString, bool privateBrowsingEnabled) const
</span><span class="cx"> {
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</ins><span class="cx"> RetainPtr<CFURLRef> 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 >= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 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 "config.h"
</span><span class="cx"> #import "WebFullScreenManagerProxy.h"
</span><span class="cx">
</span><del>-#if ENABLE(FULLSCREEN_API)
</del><ins>+#if ENABLE(FULLSCREEN_API) && !PLATFORM(IOS)
</ins><span class="cx">
</span><span class="cx"> #import "LayerTreeContext.h"
</span><span class="cx"> #import "WKFullScreenWindowController.h"
</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) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 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 <wtf/text/CString.h>
</span><span class="cx"> #import <wtf/text/WTFString.h>
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+#import <GraphicsServices/GraphicsServices.h>
+#import <WebCore/WebCoreThreadSystemInterface.h>
+#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 <rdar://problem/8929426> 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& 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>+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+        <key>CFBundleGetInfoString</key>
+        <string>${BUNDLE_VERSION}, Copyright 2003-2013 Apple Inc.</string>
+        <key>CFBundleDevelopmentRegion</key>
+        <string>English</string>
+        <key>CFBundleExecutable</key>
+        <string>${EXECUTABLE_NAME}</string>
+        <key>CFBundleIdentifier</key>
+        <string>com.apple.WebKit.WebContent</string>
+        <key>CFBundleInfoDictionaryVersion</key>
+        <string>6.0</string>
+        <key>CFBundleName</key>
+        <string>${PRODUCT_NAME}</string>
+        <key>CFBundlePackageType</key>
+        <string>XPC!</string>
+        <key>CFBundleShortVersionString</key>
+        <string>${SHORT_VERSION_STRING}</string>
+        <key>CFBundleSignature</key>
+        <string>????</string>
+        <key>CFBundleVersion</key>
+        <string>${BUNDLE_VERSION}</string>
+        <key>LSFileQuarantineEnabled</key>
+        <true/>
+        <key>WebKitEntryPoint</key>
+        <string>WebContentServiceInitializer</string>
+        <key>XPCService</key>
+        <dict>
+                <key>JoinExistingSession</key>
+                <true/>
+                <key>ServiceType</key>
+                <string>Application</string>
+                <key>RunLoopType</key>
+                <string>NSRunLoop</string>
+                <key>_MultipleInstances</key>
+                <true/>
+        </dict>
+</dict>
+</plist>
</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 "XPCServiceEntryPoint.h"
</span><span class="cx"> #import <wtf/RunLoop.h>
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+#import <GraphicsServices/GraphicsServices.h>
+#import <WebCore/WebCoreThreadSystemInterface.h>
+#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("DYLD_INSERT_LIBRARIES", "/WebProcessShim.dylib");
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+ GSInitialize();
+ InitWebCoreThreadSystemInterface();
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> XPCServiceInitializer<WebProcess, XPCServiceInitializerDelegate>(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->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&);
</span><span class="cx"> void didFailToDeterminePosition(const String& 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<WebPage*> 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 -> 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) && !PLATFORM(IOS)
</ins><span class="cx"> toImpl(pageRef)->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) && !PLATFORM(IOS)
</ins><span class="cx"> toImpl(pageRef)->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)->setHeaderPageBanner(toImpl(bannerRef));
</span><span class="lines">@@ -372,6 +373,7 @@
</span><span class="cx"> {
</span><span class="cx"> toImpl(pageRef)->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->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 "Plugin.h"
-#include <WebCore/ScrollableArea.h>
-#include <wtf/RetainPtr.h>
-
-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<SimplePDFPlugin> 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<PDFDocument> pdfDocument() const { return m_pdfDocument; }
- void setPDFDocument(RetainPtr<PDFDocument> document) { m_pdfDocument = document; }
-
- WebCore::IntSize pdfDocumentSize() const { return m_pdfDocumentSize; }
- void setPDFDocumentSize(WebCore::IntSize size) { m_pdfDocumentSize = size; }
-
- const String& 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<WebCore::Scrollbar> 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& dirtyRect);
- void paintContent(WebCore::GraphicsContext*, const WebCore::IntRect& dirtyRect);
- void paintControls(WebCore::GraphicsContext*, const WebCore::IntRect& dirtyRect);
-
- void runScriptsInPDFDocument();
-
- // Plug-in methods
- virtual bool initialize(const Parameters&);
- virtual void destroy();
- virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect& dirtyRectInWindowCoordinates);
- virtual void updateControlTints(WebCore::GraphicsContext*);
- virtual bool supportsSnapshotting() const { return false; }
- virtual PassRefPtr<ShareableBitmap> snapshot();
-#if PLATFORM(MAC)
- virtual PlatformLayer* pluginLayer();
-#endif
- virtual bool isTransparent();
- virtual bool wantsWheelEvents() OVERRIDE;
- virtual void geometryDidChange(const WebCore::IntSize& pluginSize, const WebCore::IntRect& clipRect, const WebCore::AffineTransform& 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& result);
- virtual void streamDidReceiveResponse(uint64_t streamID, const WebCore::URL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& 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& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const WTF::String& mimeType, const WTF::String& headers, const String& suggestedFileName);
- virtual void manualStreamDidReceiveData(const char* bytes, int length);
- virtual void manualStreamDidFinishLoading();
- virtual void manualStreamDidFail(bool wasCancelled);
- virtual bool handleMouseEvent(const WebMouseEvent&);
- virtual bool handleWheelEvent(const WebWheelEvent&);
- virtual bool handleMouseEnterEvent(const WebMouseEvent&);
- virtual bool handleMouseLeaveEvent(const WebMouseEvent&);
- virtual bool handleContextMenuEvent(const WebMouseEvent&);
- virtual bool handleKeyboardEvent(const WebKeyboardEvent&);
- virtual void setFocus(bool);
- virtual NPObject* pluginScriptableNPObject();
-#if PLATFORM(MAC)
- virtual void windowFocusChanged(bool);
- virtual void windowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates);
- virtual void windowVisibilityChanged(bool);
- virtual void contentsScaleFactorChanged(float);
- virtual uint64_t pluginComplexTextInputIdentifier() const;
- virtual void sendComplexTextInput(const String& textInput);
- virtual void setLayerHostingMode(LayerHostingMode) OVERRIDE;
-#endif
-
- virtual void storageBlockingStateChanged(bool);
- virtual void privateBrowsingStateChanged(bool);
- virtual bool getFormValue(String& formValue);
- virtual bool handleScroll(WebCore::ScrollDirection, WebCore::ScrollGranularity);
- virtual WebCore::Scrollbar* horizontalScrollbar();
- virtual WebCore::Scrollbar* verticalScrollbar();
-
- virtual RetainPtr<PDFDocument> 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&) OVERRIDE;
- virtual int scrollSize(WebCore::ScrollbarOrientation) const OVERRIDE;
- virtual bool isActive() const OVERRIDE;
- virtual void invalidateScrollbarRect(WebCore::Scrollbar*, const WebCore::IntRect&) OVERRIDE;
- virtual void invalidateScrollCornerRect(const WebCore::IntRect&) 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& scrollbarRect) const OVERRIDE;
- virtual WebCore::IntRect convertFromContainingViewToScrollbar(const WebCore::Scrollbar*, const WebCore::IntRect& parentRect) const OVERRIDE;
- virtual WebCore::IntPoint convertFromScrollbarToContainingView(const WebCore::Scrollbar*, const WebCore::IntPoint& scrollbarPoint) const OVERRIDE;
- virtual WebCore::IntPoint convertFromContainingViewToScrollbar(const WebCore::Scrollbar*, const WebCore::IntPoint& parentPoint) const OVERRIDE;
-
- virtual bool isEditingCommandEnabled(const String&) OVERRIDE;
- virtual bool handleEditingCommand(const String&, const String&) OVERRIDE;
- virtual bool handlesPageScaleFactor() OVERRIDE;
-
- virtual bool shouldAllowScripting() OVERRIDE { return false; }
- virtual bool shouldAllowNavigationFromDrags() { return true; }
-
- virtual unsigned countFindMatches(const String&, WebCore::FindOptions, unsigned) OVERRIDE { return 0; }
- virtual bool findString(const String&, WebCore::FindOptions, unsigned) OVERRIDE { return false; }
-
- virtual PassRefPtr<WebCore::SharedBuffer> liveResourceData() const OVERRIDE;
- virtual bool performDictionaryLookupAtLocation(const WebCore::FloatPoint&) 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<CFMutableDataRef> m_data;
-
- RetainPtr<PDFDocument> m_pdfDocument;
- Vector<WebCore::IntRect> m_pageBoxes;
- WebCore::IntSize m_pdfDocumentSize; // All pages, including gaps.
-
- RefPtr<WebCore::Scrollbar> m_horizontalScrollbar;
- RefPtr<WebCore::Scrollbar> 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 "config.h"
-#import "SimplePDFPlugin.h"
-
-#import "PDFKitImports.h"
-#import "PluginView.h"
-#import "ShareableBitmap.h"
-#import "WebEvent.h"
-#import "WebEventConversion.h"
-#import <JavaScriptCore/JSContextRef.h>
-#import <JavaScriptCore/JSObjectRef.h>
-#import <JavaScriptCore/JSStringRef.h>
-#import <JavaScriptCore/JSStringRefCF.h>
-#import <PDFKit/PDFKit.h>
-#import <WebCore/ArchiveResource.h>
-#import <WebCore/Chrome.h>
-#import <WebCore/DocumentLoader.h>
-#import <WebCore/FocusController.h>
-#import <WebCore/Frame.h>
-#import <WebCore/FrameView.h>
-#import <WebCore/GraphicsContext.h>
-#import <WebCore/HTTPHeaderMap.h>
-#import <WebCore/LocalizedStrings.h>
-#import <WebCore/Page.h>
-#import <WebCore/PluginData.h>
-#import <WebCore/RenderBoxModelObject.h>
-#import <WebCore/ScrollAnimator.h>
-#import <WebCore/ScrollbarTheme.h>
-
-using namespace WebCore;
-
-static const char* postScriptMIMEType = "application/postscript";
-
-static void appendValuesInPDFNameSubtreeToVector(CGPDFDictionaryRef subtree, Vector<CGPDFObjectRef>& values)
-{
- CGPDFArrayRef names;
- if (CGPDFDictionaryGetArray(subtree, "Names", &names)) {
- size_t nameCount = CGPDFArrayGetCount(names) / 2;
- for (size_t i = 0; i < nameCount; ++i) {
- CGPDFObjectRef object;
- CGPDFArrayGetObject(names, 2 * i + 1, &object);
- values.append(object);
- }
- return;
- }
-
- CGPDFArrayRef kids;
- if (!CGPDFDictionaryGetArray(subtree, "Kids", &kids))
- return;
-
- size_t kidCount = CGPDFArrayGetCount(kids);
- for (size_t i = 0; i < kidCount; ++i) {
- CGPDFDictionaryRef kid;
- if (!CGPDFArrayGetDictionary(kids, i, &kid))
- continue;
- appendValuesInPDFNameSubtreeToVector(kid, values);
- }
-}
-
-static void getAllValuesInPDFNameTree(CGPDFDictionaryRef tree, Vector<CGPDFObjectRef>& allValues)
-{
- appendValuesInPDFNameSubtreeToVector(tree, allValues);
-}
-
-static void getAllScriptsInPDFDocument(CGPDFDocumentRef pdfDocument, Vector<RetainPtr<CFStringRef>>& 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, "Names", &namesDictionary))
- return;
-
- // Get the document-level "JavaScript" name tree.
- CGPDFDictionaryRef javaScriptNameTree;
- if (!CGPDFDictionaryGetDictionary(namesDictionary, "JavaScript", &javaScriptNameTree))
- return;
-
- // The names are arbitrary. We are only interested in the values.
- Vector<CGPDFObjectRef> objects;
- getAllValuesInPDFNameTree(javaScriptNameTree, objects);
- size_t objectCount = objects.size();
-
- for (size_t i = 0; i < objectCount; ++i) {
- CGPDFDictionaryRef javaScriptAction;
- if (!CGPDFObjectGetValue(reinterpret_cast<CGPDFObjectRef>(objects[i]), kCGPDFObjectTypeDictionary, &javaScriptAction))
- continue;
-
- // A JavaScript action must have an action type of "JavaScript".
- const char* actionType;
- if (!CGPDFDictionaryGetName(javaScriptAction, "S", &actionType) || strcmp(actionType, "JavaScript"))
- continue;
-
- const UInt8* bytes = 0;
- CFIndex length;
- CGPDFStreamRef stream;
- CGPDFStringRef string;
- RetainPtr<CFDataRef> data;
- if (CGPDFDictionaryGetStream(javaScriptAction, "JS", &stream)) {
- CGPDFDataFormat format;
- data = adoptCF(CGPDFStreamCopyData(stream, &format));
- if (!data)
- continue;
- bytes = CFDataGetBytePtr(data.get());
- length = CFDataGetLength(data.get());
- } else if (CGPDFDictionaryGetString(javaScriptAction, "JS", &string)) {
- bytes = CGPDFStringGetBytePtr(string);
- length = CGPDFStringGetLength(string);
- }
- if (!bytes)
- continue;
-
- CFStringEncoding encoding = (length > 1 && bytes[0] == 0xFE && bytes[1] == 0xFF) ? kCFStringEncodingUnicode : kCFStringEncodingUTF8;
- RetainPtr<CFStringRef> 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<SimplePDFPlugin> 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 = "application/pdf";
- pdfMimeClassInfo.desc = pdfDocumentTypeDescription();
- pdfMimeClassInfo.extensions.append("pdf");
- info.mimes.append(pdfMimeClassInfo);
-
- MimeClassInfo textPDFMimeClassInfo;
- textPDFMimeClassInfo.type = "text/pdf";
- textPDFMimeClassInfo.desc = pdfDocumentTypeDescription();
- textPDFMimeClassInfo.extensions.append("pdf");
- info.mimes.append(textPDFMimeClassInfo);
-
- MimeClassInfo postScriptMimeClassInfo;
- postScriptMimeClassInfo.type = postScriptMIMEType;
- postScriptMimeClassInfo.desc = postScriptDocumentTypeDescription();
- postScriptMimeClassInfo.extensions.append("ps");
- info.mimes.append(postScriptMimeClassInfo);
-
- return info;
-}
-
-PluginView* SimplePDFPlugin::pluginView()
-{
- return static_cast<PluginView*>(controller());
-}
-
-const PluginView* SimplePDFPlugin::pluginView() const
-{
- return static_cast<const PluginView*>(controller());
-}
-
-void SimplePDFPlugin::updateScrollbars()
-{
- bool hadScrollbars = m_horizontalScrollbar || m_verticalScrollbar;
-
- if (m_horizontalScrollbar) {
- if (m_size.width() >= m_pdfDocumentSize.width())
- destroyScrollbar(HorizontalScrollbar);
- } else if (m_size.width() < m_pdfDocumentSize.width())
- m_horizontalScrollbar = createScrollbar(HorizontalScrollbar);
-
- if (m_verticalScrollbar) {
- if (m_size.height() >= m_pdfDocumentSize.height())
- destroyScrollbar(VerticalScrollbar);
- } else if (m_size.height() < m_pdfDocumentSize.height())
- m_verticalScrollbar = createScrollbar(VerticalScrollbar);
-
- int horizontalScrollbarHeight = (m_horizontalScrollbar && !m_horizontalScrollbar->isOverlayScrollbar()) ? m_horizontalScrollbar->height() : 0;
- int verticalScrollbarWidth = (m_verticalScrollbar && !m_verticalScrollbar->isOverlayScrollbar()) ? m_verticalScrollbar->width() : 0;
-
- int pageStep = m_pageBoxes.isEmpty() ? 0 : m_pageBoxes[0].height();
-
- if (m_horizontalScrollbar) {
- m_horizontalScrollbar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
- m_horizontalScrollbar->setProportion(m_size.width() - verticalScrollbarWidth, m_pdfDocumentSize.width());
- IntRect scrollbarRect(pluginView()->x(), pluginView()->y() + m_size.height() - m_horizontalScrollbar->height(), m_size.width(), m_horizontalScrollbar->height());
- if (m_verticalScrollbar)
- scrollbarRect.contract(m_verticalScrollbar->width(), 0);
- m_horizontalScrollbar->setFrameRect(scrollbarRect);
- }
- if (m_verticalScrollbar) {
- m_verticalScrollbar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
- m_verticalScrollbar->setProportion(m_size.height() - horizontalScrollbarHeight, m_pdfDocumentSize.height());
- IntRect scrollbarRect(IntRect(pluginView()->x() + m_size.width() - m_verticalScrollbar->width(), pluginView()->y(), m_verticalScrollbar->width(), m_size.height()));
- if (m_horizontalScrollbar)
- scrollbarRect.contract(0, m_horizontalScrollbar->height());
- m_verticalScrollbar->setFrameRect(scrollbarRect);
- }
-
- FrameView* frameView = m_frame->coreFrame()->view();
- if (!frameView)
- return;
-
- bool hasScrollbars = m_horizontalScrollbar || m_verticalScrollbar;
- if (hadScrollbars != hasScrollbars) {
- if (hasScrollbars)
- frameView->addScrollableArea(this);
- else
- frameView->removeScrollableArea(this);
-
- frameView->setNeedsLayout();
- }
-}
-
-PassRefPtr<Scrollbar> SimplePDFPlugin::createScrollbar(ScrollbarOrientation orientation)
-{
- RefPtr<Scrollbar> widget = Scrollbar::createNativeScrollbar(this, orientation, RegularScrollbar);
- didAddScrollbar(widget.get(), orientation);
- pluginView()->frame()->view()->addChild(widget.get());
- return widget.release();
-}
-
-void SimplePDFPlugin::destroyScrollbar(ScrollbarOrientation orientation)
-{
- RefPtr<Scrollbar>& scrollbar = orientation == HorizontalScrollbar ? m_horizontalScrollbar : m_verticalScrollbar;
- if (!scrollbar)
- return;
-
- willRemoveScrollbar(scrollbar.get(), orientation);
- scrollbar->removeFromParent();
- scrollbar->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("application/pdf");
-
- RefPtr<ArchiveResource> resource = ArchiveResource::create(SharedBuffer::wrapCFData(m_data.get()), m_sourceURL, "application/pdf", String(), String(), synthesizedResponse);
- pluginView()->frame()->document()->loader()->addArchiveResource(resource.release());
-}
-
-static void jsPDFDocInitialize(JSContextRef ctx, JSObjectRef object)
-{
- SimplePDFPlugin* pdfView = static_cast<SimplePDFPlugin*>(JSObjectGetPrivate(object));
- pdfView->ref();
-}
-
-static void jsPDFDocFinalize(JSObjectRef object)
-{
- SimplePDFPlugin* pdfView = static_cast<SimplePDFPlugin*>(JSObjectGetPrivate(object));
- pdfView->deref();
-}
-
-JSValueRef SimplePDFPlugin::jsPDFDocPrint(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- SimplePDFPlugin* pdfView = static_cast<SimplePDFPlugin*>(JSObjectGetPrivate(thisObject));
-
- WebFrame* frame = pdfView->m_frame;
- if (!frame)
- return JSValueMakeUndefined(ctx);
-
- Frame* coreFrame = frame->coreFrame();
- if (!coreFrame)
- return JSValueMakeUndefined(ctx);
-
- Page* page = coreFrame->page();
- if (!page)
- return JSValueMakeUndefined(ctx);
-
- page->chrome().print(coreFrame);
-
- return JSValueMakeUndefined(ctx);
-}
-
-JSObjectRef SimplePDFPlugin::makeJSPDFDoc(JSContextRef ctx)
-{
- static JSStaticFunction jsPDFDocStaticFunctions[] = {
- { "print", jsPDFDocPrint, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { 0, 0, 0 },
- };
-
- static JSClassDefinition jsPDFDocClassDefinition = {
- 0,
- kJSClassAttributeNone,
- "Doc",
- 0,
- 0,
- jsPDFDocStaticFunctions,
- jsPDFDocInitialize, jsPDFDocFinalize, 0, 0, 0, 0, 0, 0, 0, 0, 0
- };
-
- static JSClassRef jsPDFDocClass = JSClassCreate(&jsPDFDocClassDefinition);
-
- return JSObjectMake(ctx, jsPDFDocClass, this);
-}
-
-static RetainPtr<CFMutableDataRef> convertPostScriptDataToPDF(RetainPtr<CFDataRef> 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<CGPSConverterRef> converter = adoptCF(CGPSConverterCreate(0, &callbacks, 0));
- RetainPtr<CGDataProviderRef> provider = adoptCF(CGDataProviderCreateWithCFData(postScriptData.get()));
- RetainPtr<CFMutableDataRef> pdfData = adoptCF(CFDataCreateMutable(kCFAllocatorDefault, 0));
- RetainPtr<CGDataConsumerRef> 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()->invalidate(IntRect(0, 0, m_size.width(), m_size.height()));
-
- runScriptsInPDFDocument();
-}
-
-void SimplePDFPlugin::runScriptsInPDFDocument()
-{
- Vector<RetainPtr<CFStringRef>> 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 < 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 < 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 < 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<int>(box.size.width)));
- m_pdfDocumentSize.expand(0, box.size.height);
- }
- m_pdfDocumentSize.expand(0, gutterHeight * (m_pageBoxes.size() - 1));
-}
-
-bool SimplePDFPlugin::initialize(const Parameters& parameters)
-{
- // Load the src URL if needed.
- m_sourceURL = parameters.url;
- if (!parameters.shouldUseManualLoader && !parameters.url.isEmpty())
- controller()->loadURL(pdfDocumentRequestID, "GET", parameters.url.string(), String(), HTTPHeaderMap(), Vector<uint8_t>(), false);
-
- controller()->didInitializePlugin();
- return true;
-}
-
-void SimplePDFPlugin::destroy()
-{
- if (m_frame) {
- if (FrameView* frameView = m_frame->coreFrame()->view())
- frameView->removeScrollableArea(this);
- }
-
- destroyScrollbar(HorizontalScrollbar);
- destroyScrollbar(VerticalScrollbar);
-}
-
-void SimplePDFPlugin::paint(GraphicsContext* graphicsContext, const IntRect& 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& dirtyRect)
-{
- GraphicsContextStateSaver stateSaver(*graphicsContext);
- graphicsContext->setFillColor(Color::gray, ColorSpaceDeviceRGB);
- graphicsContext->fillRect(dirtyRect);
-}
-
-void SimplePDFPlugin::paintContent(GraphicsContext* graphicsContext, const IntRect& dirtyRect)
-{
- GraphicsContextStateSaver stateSaver(*graphicsContext);
- CGContextRef context = graphicsContext->platformContext();
-
- graphicsContext->setImageInterpolationQuality(InterpolationHigh);
- graphicsContext->setShouldAntialias(true);
- graphicsContext->setShouldSmoothFonts(true);
- graphicsContext->setFillColor(Color::white, ColorSpaceDeviceRGB);
-
- graphicsContext->clip(dirtyRect);
- IntRect contentRect(dirtyRect);
- contentRect.moveBy(IntPoint(m_scrollOffset));
- graphicsContext->translate(-m_scrollOffset.width(), -m_scrollOffset.height());
-
- CGContextScaleCTM(context, 1, -1);
-
- int pageTop = 0;
- for (size_t i = 0; i < 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 > contentRect.maxY())
- break;
- if (pageTop + pageBox.height() + extraOffsetForCenteringY + gutterHeight >= contentRect.y()) {
- CGPDFPageRef pdfPage = CGPDFDocumentGetPage([m_pdfDocument.get() documentRef], i + 1);
-
- graphicsContext->save();
- graphicsContext->translate(extraOffsetForCenteringX - pageBox.x(), -extraOffsetForCenteringY - pageBox.y() - pageBox.height());
-
- graphicsContext->setShadow(FloatSize(shadowOffsetX, shadowOffsetY), shadowSize, Color::black, ColorSpaceDeviceRGB);
- graphicsContext->fillRect(pageBox);
- graphicsContext->clearShadow();
-
- graphicsContext->clip(pageBox);
-
- CGContextDrawPDFPage(context, pdfPage);
- graphicsContext->restore();
- }
- pageTop += pageBox.height() + gutterHeight;
- CGContextTranslateCTM(context, 0, -pageBox.height() - gutterHeight);
- }
-}
-
-void SimplePDFPlugin::paintControls(GraphicsContext* graphicsContext, const IntRect& dirtyRect)
-{
- {
- GraphicsContextStateSaver stateSaver(*graphicsContext);
- IntRect scrollbarDirtyRect = dirtyRect;
- scrollbarDirtyRect.moveBy(pluginView()->frameRect().location());
- graphicsContext->translate(-pluginView()->frameRect().x(), -pluginView()->frameRect().y());
-
- if (m_horizontalScrollbar)
- m_horizontalScrollbar->paint(graphicsContext, scrollbarDirtyRect);
-
- if (m_verticalScrollbar)
- m_verticalScrollbar->paint(graphicsContext, scrollbarDirtyRect);
- }
-
- IntRect dirtyCornerRect = intersection(scrollCornerRect(), dirtyRect);
- ScrollbarTheme::theme()->paintScrollCorner(0, graphicsContext, dirtyCornerRect);
-}
-
-void SimplePDFPlugin::updateControlTints(GraphicsContext* graphicsContext)
-{
- ASSERT(graphicsContext->updatingControlTints());
-
- if (m_horizontalScrollbar)
- m_horizontalScrollbar->invalidate();
- if (m_verticalScrollbar)
- m_verticalScrollbar->invalidate();
- invalidateScrollCorner(scrollCornerRect());
-}
-
-PassRefPtr<ShareableBitmap> 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& size, const IntRect& clipRect, const AffineTransform& 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&)
-{
- ASSERT_NOT_REACHED();
-}
-
-void SimplePDFPlugin::convertPostScriptDataIfNeeded()
-{
- if (!m_isPostScript)
- return;
-
- m_suggestedFilename = String(m_suggestedFilename + ".pdf");
- m_data = convertPostScriptDataToPDF(m_data);
-}
-
-void SimplePDFPlugin::streamDidReceiveResponse(uint64_t streamID, const URL&, uint32_t, uint32_t, const String& mimeType, const String&, const String& 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<const UInt8*>(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& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& 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<const UInt8*>(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<SharedBuffer> 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& 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->mouseUp(platformEvent);
- if (m_verticalScrollbar)
- m_verticalScrollbar->mouseUp(platformEvent);
- break;
- }
- default:
- break;
- }
-
- return false;
-}
-
-bool SimplePDFPlugin::handleWheelEvent(const WebWheelEvent& event)
-{
- PlatformWheelEvent platformEvent = platform(event);
- return ScrollableArea::handleWheelEvent(platformEvent);
-}
-
-bool SimplePDFPlugin::handleMouseEnterEvent(const WebMouseEvent&)
-{
- mouseEnteredContentArea();
- return false;
-}
-
-bool SimplePDFPlugin::handleMouseLeaveEvent(const WebMouseEvent&)
-{
- mouseExitedContentArea();
- return false;
-}
-
-bool SimplePDFPlugin::handleContextMenuEvent(const WebMouseEvent&)
-{
- // Use default WebKit context menu.
- return false;
-}
-
-bool SimplePDFPlugin::handleKeyboardEvent(const WebKeyboardEvent&)
-{
- 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& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates)
-{
-}
-
-void SimplePDFPlugin::windowVisibilityChanged(bool)
-{
-}
-
-void SimplePDFPlugin::contentsScaleFactorChanged(float)
-{
-}
-
-uint64_t SimplePDFPlugin::pluginComplexTextInputIdentifier() const
-{
- return 0;
-}
-
-void SimplePDFPlugin::sendComplexTextInput(const String&)
-{
-}
-
-void SimplePDFPlugin::setLayerHostingMode(LayerHostingMode)
-{
-}
-
-#endif
-
-void SimplePDFPlugin::storageBlockingStateChanged(bool)
-{
-}
-
-void SimplePDFPlugin::privateBrowsingStateChanged(bool)
-{
-}
-
-bool SimplePDFPlugin::getFormValue(String&)
-{
- 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->isOverlayScrollbar()) {
- ASSERT(m_verticalScrollbar->isOverlayScrollbar());
- return IntRect();
- }
- return IntRect(pluginView()->width() - m_verticalScrollbar->width(), pluginView()->height() - m_horizontalScrollbar->height(), m_verticalScrollbar->width(), m_horizontalScrollbar->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()->frameRect();
-}
-
-void SimplePDFPlugin::setScrollOffset(const IntPoint& offset)
-{
- m_scrollOffset = IntSize(offset.x(), offset.y());
- // FIXME: It would be better for performance to blit parts that remain visible.
- controller()->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->totalSize() - scrollbar->visibleSize()) : 0;
-}
-
-bool SimplePDFPlugin::isActive() const
-{
- if (Frame* coreFrame = m_frame->coreFrame()) {
- if (Page* page = coreFrame->page())
- return page->focusController().isActive();
- }
-
- return false;
-}
-
-void SimplePDFPlugin::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect& rect)
-{
- IntRect dirtyRect = rect;
- dirtyRect.moveBy(scrollbar->location());
- dirtyRect.moveBy(-pluginView()->location());
- controller()->invalidate(dirtyRect);
-}
-
-void SimplePDFPlugin::invalidateScrollCornerRect(const IntRect& rect)
-{
- controller()->invalidate(rect);
-}
-
-bool SimplePDFPlugin::isScrollCornerVisible() const
-{
- return false;
-}
-
-int SimplePDFPlugin::scrollPosition(Scrollbar* scrollbar) const
-{
- if (scrollbar->orientation() == HorizontalScrollbar)
- return m_scrollOffset.width();
- if (scrollbar->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 && !m_horizontalScrollbar->isOverlayScrollbar()) ? m_horizontalScrollbar->height() : 0;
- int verticalScrollbarWidth = (m_verticalScrollbar && !m_verticalScrollbar->isOverlayScrollbar()) ? m_verticalScrollbar->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()->frame()->document()->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& scrollbarRect) const
-{
- IntRect rect = scrollbarRect;
- rect.move(scrollbar->location() - pluginView()->location());
-
- return pluginView()->frame()->view()->convertFromRenderer(pluginView()->renderer(), rect);
-}
-
-IntRect SimplePDFPlugin::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const
-{
- IntRect rect = pluginView()->frame()->view()->convertToRenderer(pluginView()->renderer(), parentRect);
- rect.move(pluginView()->location() - scrollbar->location());
-
- return rect;
-}
-
-IntPoint SimplePDFPlugin::convertFromScrollbarToContainingView(const Scrollbar* scrollbar, const IntPoint& scrollbarPoint) const
-{
- IntPoint point = scrollbarPoint;
- point.move(scrollbar->location() - pluginView()->location());
-
- return pluginView()->frame()->view()->convertFromRenderer(pluginView()->renderer(), point);
-}
-
-IntPoint SimplePDFPlugin::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const
-{
- IntPoint point = pluginView()->frame()->view()->convertToRenderer(pluginView()->renderer(), parentPoint);
- point.move(pluginView()->location() - scrollbar->location());
-
- return point;
-}
-
-bool SimplePDFPlugin::isEditingCommandEnabled(const String&)
-{
- return false;
-}
-
-bool SimplePDFPlugin::handleEditingCommand(const String&, const String&)
-{
- 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()->loader().documentLoader()->responseURL().string();
</span><span class="cx"> String pageURLString = m_webPage->corePage()->mainFrame().loader().documentLoader()->responseURL().string();
</span><span class="cx"> m_webPage->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<String> 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) && __has_warning("-Wunused-private-field")
+#pragma clang diagnostic ignored "-Wunused-private-field"
+#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->useFixedLayout())
</span><span class="cx"> m_page->drawingArea()->layerTreeHost()->sizeDidChange(size);
</span><span class="cx">
</span><del>- m_page->send(Messages::WebPageProxy::DidChangeContentsSize(size));
</del><ins>+ m_page->send(Messages::WebPageProxy::DidChangeContentSize(size));
</ins><span class="cx"> #endif
</span><ins>+#if PLATFORM(IOS)
+ m_page->send(Messages::WebPageProxy::DidChangeContentSize(size));
+#endif
</ins><span class="cx">
</span><span class="cx"> m_page->drawingArea()->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->hasTagName(objectTag) || element->hasTagName(embedTag) || element->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->send(Messages::WebPageProxy::UnavailablePluginButtonClicked(pluginUnavailabilityReason, pluginElement->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->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& 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->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) && !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&) const
</del><ins>+void WebChromeClient::dispatchViewportPropertiesDidChange(const ViewportArguments& viewportArguments) const
</ins><span class="cx"> {
</span><ins>+#if PLATFORM(IOS)
+ m_page->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->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->headerPageBanner())
</span><span class="cx"> banner->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->footerPageBanner())
</span><span class="cx"> banner->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<WebCore::ColorChooser> createColorChooser(WebCore::ColorChooserClient*, const WebCore::Color&) 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 <rdar://problem/5975559>
+ virtual void suppressFormNotifications() OVERRIDE;
+ virtual void restoreFormNotifications() OVERRIDE;
+
+ virtual void addOrUpdateScrollingLayer(WebCore::Node*, PlatformLayer* scrollingLayer, PlatformLayer* contentsLayer, const WebCore::IntSize& 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<WebCore::FileChooser>) OVERRIDE;
</span><span class="cx"> virtual void loadIconForFiles(const Vector<String>&, WebCore::FileIconLoader*) OVERRIDE;
</span><span class="cx">
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> virtual void setCursor(const WebCore::Cursor&) OVERRIDE;
</span><span class="cx"> virtual void setCursorHiddenUntilMouseMoves(bool) OVERRIDE;
</span><ins>+#endif
</ins><span class="cx"> #if ENABLE(REQUEST_ANIMATION_FRAME) && !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: <rdar://problem/7830677>
+#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& 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 && webPage->useFixedLayout();
</span><span class="cx"> bool shouldDisableScrolling = isMainFrame && !webPage->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->coreFrame()->view() ? m_frame->coreFrame()->view()->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->coreFrame()->view()->setProhibitsScrolling(shouldDisableScrolling);
</span><span class="cx"> m_frame->coreFrame()->view()->setVisualUpdatesAllowedByClient(!webPage->shouldExtendIncrementalRenderingSuppression());
</span><del>-
</del><ins>+#if PLATFORM(IOS)
+ m_frame->coreFrame()->view()->setDelegatesScrolling(true);
+#endif
+
</ins><span class="cx"> if (webPage->scrollPinningBehavior() != DoNotPin)
</span><span class="cx"> m_frame->coreFrame()->view()->setScrollPinningBehavior(webPage->scrollPinningBehavior());
</span><span class="cx">
</span><span class="lines">@@ -1366,6 +1373,7 @@
</span><span class="cx">
</span><span class="cx"> PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* appletElement, const URL&, const Vector<String>& paramNames, const Vector<String>& paramValues)
</span><span class="cx"> {
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> RefPtr<Widget> plugin = createPlugin(pluginSize, appletElement, URL(), paramNames, paramValues, appletElement->serviceType(), false);
</span><span class="cx"> if (!plugin) {
</span><span class="cx"> if (WebPage* webPage = m_frame->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&) OVERRIDE;
</span><span class="cx"> #endif
</span><ins>+#if PLATFORM(IOS)
+ virtual RetainPtr<CFDictionaryRef> connectionProperties(WebCore::DocumentLoader*, unsigned long identifier) OVERRIDE;
+#endif
</ins><span class="cx"> virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&) 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 "config.h"
+#import "WebChromeClient.h"
+
+#import <WebCore/NotImplemented.h>
+#import "WebCoreArgumentCoders.h"
+#import "WebFrame.h"
+#import "WebPage.h"
+#import "WebPageProxyMessages.h"
+
+namespace WebKit {
+
+#if ENABLE(TOUCH_EVENTS)
+void WebChromeClient::didPreventDefaultForEvent()
+{
+ notImplemented();
+}
+#endif
+
+void WebChromeClient::elementDidFocus(const WebCore::Node* node)
+{
+ m_page->elementDidFocus(const_cast<WebCore::Node*>(node));
+}
+
+void WebChromeClient::elementDidBlur(const WebCore::Node* node)
+{
+ m_page->elementDidBlur(const_cast<WebCore::Node*>(node));
+}
+
+void WebChromeClient::didReceiveMobileDocType()
+{
+ m_page->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&, 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 "config.h"
+#import "WebDatabaseManager.h"
+
+#import <WebCore/NotImplemented.h>
+
+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 "config.h"
+#import "WebEditorClient.h"
+
+#import "WebPage.h"
+#import <WebCore/KeyboardEvent.h>
+#import <WebCore/NotImplemented.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebEditorClient::handleKeyboardEvent(KeyboardEvent* event)
+{
+ if (m_page->handleEditingKeyboardEvent(event, false))
+ event->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<RefPtr<ArchiveResource> >&)
+{
+ notImplemented();
+ return 0;
+}
+
+void WebEditorClient::setInsertionPasteboard(const String&)
+{
+ // 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 "config.h"
+#import "WebFrameLoaderClient.h"
+
+#import <WebCore/NotImplemented.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebFrameLoaderClient::didRestoreFrameHierarchyForCachedFrame()
+{
+ notImplemented();
+}
+
+void WebFrameLoaderClient::forceLayoutWithoutRecalculatingStyles()
+{
+ notImplemented();
+}
+
+RetainPtr<CFDictionaryRef> 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<CFDataRef> sourceApplicationAuditData() const OVERRIDE;
</span><span class="cx"> virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const OVERRIDE;
</span><span class="cx"> virtual WebCore::NetworkStorageSession& 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(&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 >= 1080
</del><ins>+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
</ins><span class="cx"> INIT(CGContextDrawsWithCorrectShadowOffsets);
</span><span class="cx"> #endif
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
</del><ins>+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 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 >= 1080
</del><ins>+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 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 >= 1090
</del><ins>+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 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) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 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 <wtf/Functional.h>
</span><span class="cx">
</span><span class="cx"> // Subclasses
</span><ins>+#if PLATFORM(IOS)
+#include "TiledCoreAnimationDrawingAreaIOS.h"
+#endif
+
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> #include "RemoteLayerTreeDrawingArea.h"
</span><span class="cx"> #include "TiledCoreAnimationDrawingArea.h"
</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<TiledCoreAnimationDrawingAreaIOS>(webPage, parameters);
+#else
</ins><span class="cx"> case DrawingAreaTypeTiledCoreAnimation:
</span><span class="cx"> return std::make_unique<TiledCoreAnimationDrawingArea>(webPage, parameters);
</span><ins>+#endif
</ins><span class="cx"> case DrawingAreaTypeRemoteLayerTree:
</span><span class="cx"> return std::make_unique<RemoteLayerTreeDrawingArea>(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<uint64_t> 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 <WebCore/SubstituteData.h>
</span><span class="cx"> #include <WebCore/TextIterator.h>
</span><span class="cx"> #include <WebCore/VisiblePosition.h>
</span><ins>+#include <WebCore/VisibleUnits.h>
</ins><span class="cx"> #include <WebCore/markup.h>
</span><span class="cx"> #include <runtime/JSCJSValue.h>
</span><span class="cx"> #include <runtime/JSLock.h>
</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<PluginView*>::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
</span><span class="cx"> (*it)->webPageDestroyed();
</span><span class="cx">
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> if (m_headerBanner)
</span><span class="cx"> m_headerBanner->detachFromPage();
</span><span class="cx"> if (m_footerBanner)
</span><span class="cx"> m_footerBanner->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& 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<Range> selectedRange = selection.toNormalizedRange();
+ selectedRange->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->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) && !PLATFORM(IOS)
</ins><span class="cx"> for (HashSet<PluginView*>::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
</span><span class="cx"> (*it)->setDeviceScaleFactor(scaleFactor);
</span><span class="cx">
</span><span class="lines">@@ -1359,6 +1381,7 @@
</span><span class="cx"> m_drawingArea->didUninstallPageOverlay(pageOverlay);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> void WebPage::setHeaderPageBanner(PassRefPtr<PageBanner> 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->showIfHidden();
</span><span class="cx"> }
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx">
</span><span class="cx"> PassRefPtr<WebImage> WebPage::scaledSnapshotWithOptions(const IntRect& 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 && m_headerBanner)
</span><span class="cx"> handled = m_headerBanner->mouseEvent(mouseEvent);
</span><span class="cx"> if (!handled && m_footerBanner)
</span><span class="cx"> handled = m_footerBanner->mouseEvent(mouseEvent);
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx">
</span><span class="cx"> if (!handled && canHandleUserEvents()) {
</span><span class="cx"> CurrentEvent currentEvent(mouseEvent);
</span><span class="lines">@@ -1631,10 +1657,12 @@
</span><span class="cx"> if ((handled = (*it)->mouseEvent(mouseEvent)))
</span><span class="cx"> break;
</span><span class="cx"> }
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> if (!handled && m_headerBanner)
</span><span class="cx"> handled = m_headerBanner->mouseEvent(mouseEvent);
</span><span class="cx"> if (!handled && m_footerBanner)
</span><span class="cx"> handled = m_footerBanner->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->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()->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& frame = m_page->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& 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) && !PLATFORM(IOS)
</ins><span class="cx"> RetainPtr<PDFDocument> WebPage::pdfDocumentForPrintingFrame(Frame* coreFrame)
</span><span class="cx"> {
</span><span class="cx"> Document* document = coreFrame->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) && !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 <WebCore/PlatformTouchEventIOS.h>
+#else
</ins><span class="cx"> #include <WebCore/PlatformTouchEvent.h>
</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 "InjectedBundlePageContextMenuClient.h"
</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<WebImage>);
</span><span class="cx"> void setBottomOverhangImage(PassRefPtr<WebImage>);
</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& pageOverlays() { return m_pageOverlays; }
</span><span class="cx">
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> void setHeaderPageBanner(PassRefPtr<PageBanner>);
</span><span class="cx"> PageBanner* headerPageBanner();
</span><span class="cx"> void setFooterPageBanner(PassRefPtr<PageBanner>);
</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&);
</span><span class="cx"> WebCore::IntRect windowToScreen(const WebCore::IntRect&);
</span><span class="lines">@@ -385,6 +394,21 @@
</span><span class="cx"> GeolocationPermissionRequestManager& geolocationPermissionRequestManager() { return m_geolocationPermissionRequestManager; }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+ void handleTap(const WebCore::IntPoint&);
+ void tapHighlightAtPosition(uint64_t requestID, const WebCore::FloatPoint&);
+
+ void blurAssistedNode();
+ void selectWithGesture(const WebCore::IntPoint&, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID);
+ void updateSelectionWithTouches(const WebCore::IntPoint& point, uint32_t touches, bool baseIsStart, uint64_t callbackID);
+ void selectWithTwoTouches(const WebCore::IntPoint& from, const WebCore::IntPoint& 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& textForAutocorrection, uint64_t callbackID);
+ void applyAutocorrection(const String& correction, const String& 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& contentOffset);
+ void didFinishZooming(float);
+#endif
+
</ins><span class="cx"> #if PLATFORM(GTK) && 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<PageBanner> m_headerBanner;
</span><span class="cx"> RefPtr<PageBanner> m_footerBanner;
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx">
</span><span class="cx"> RunLoop::Timer<WebPage> m_setCanStartMediaTimer;
</span><span class="cx"> RunLoop::Timer<WebPage> 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<WebCore::Node> m_assistedNode;
+ RefPtr<WebCore::Range> 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) -> (bool handled)
</span><span class="cx"> WheelEventSyncForTesting(WebKit::WebWheelEvent event) -> (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) -> (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) && 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 "DrawingArea.h"
+#include <WebCore/GraphicsLayerClient.h>
+#include <WebCore/LayerFlushScheduler.h>
+#include <WebCore/LayerFlushSchedulerClient.h>
+#include <wtf/RetainPtr.h>
+
+OBJC_CLASS CAContext;
+OBJC_CLASS CALayer;
+
+namespace WebKit {
+
+class TiledCoreAnimationDrawingAreaIOS : public DrawingArea, private WebCore::GraphicsLayerClient, private WebCore::LayerFlushSchedulerClient {
+public:
+ TiledCoreAnimationDrawingAreaIOS(WebPage*, const WebPageCreationParameters&);
+ virtual ~TiledCoreAnimationDrawingAreaIOS();
+
+private:
+ // DrawingArea
+ virtual void setNeedsDisplay() OVERRIDE;
+ virtual void setNeedsDisplayInRect(const WebCore::IntRect&) OVERRIDE;
+ virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& 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&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& 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& viewSize, const WebCore::IntSize& layerPosition);
+ virtual void setDeviceScaleFactor(float) OVERRIDE;
+
+ WebCore::LayerFlushScheduler m_layerFlushScheduler;
+
+ RetainPtr<CAContext> m_context;
+ RetainPtr<CALayer> m_rootLayer;
+
+ OwnPtr<WebCore::GraphicsLayer> 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 "config.h"
+#import "TiledCoreAnimationDrawingAreaIOS.h"
+
+#import "DrawingAreaProxyMessages.h"
+#import "WebPage.h"
+#import <QuartzCore/CAContext.h>
+#import <QuartzCore/QuartzCore.h>
+#import <UIKit/UIKit.h>
+#import <WebCore/Frame.h>
+#import <WebCore/FrameView.h>
+#import <WebCore/GraphicsContext.h>
+#import <WebCore/GraphicsLayerCA.h>
+#import <WebCore/MainFrame.h>
+#import <WebCore/NotImplemented.h>
+#import <WebCore/Page.h>
+#import <WebCore/PlatformCALayer.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+TiledCoreAnimationDrawingAreaIOS::~TiledCoreAnimationDrawingAreaIOS()
+{
+ m_layerFlushScheduler.invalidate();
+}
+
+TiledCoreAnimationDrawingAreaIOS::TiledCoreAnimationDrawingAreaIOS(WebPage* webPage, const WebPageCreationParameters& parameters)
+ : DrawingArea(DrawingAreaTypeTiledCoreAnimationIOS, webPage)
+ , m_layerFlushScheduler(this)
+{
+ Page* page = webPage->corePage();
+
+ page->settings().setForceCompositingMode(true);
+ page->settings().setScrollingCoordinatorEnabled(true);
+ page->settings().setDelegatesPageScaling(true);
+
+ m_rootLayer = [CALayer layer];
+ CGRect rootLayerFrame = m_webPage->bounds();
+ m_rootLayer.get().frame = rootLayerFrame;
+ m_rootLayer.get().opaque = YES;
+
+ RetainPtr<NSMutableDictionary> 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->send(Messages::DrawingAreaProxy::EnterAcceleratedCompositingMode(0, layerTreeContext));
+
+ page->settings().setShowDebugBorders(true);
+ page->settings().setShowRepaintCounter(false);
+}
+
+void TiledCoreAnimationDrawingAreaIOS::setNeedsDisplay()
+{
+ notImplemented();
+}
+
+void TiledCoreAnimationDrawingAreaIOS::setNeedsDisplayInRect(const WebCore::IntRect&)
+{
+ notImplemented();
+}
+
+void TiledCoreAnimationDrawingAreaIOS::scroll(const IntRect&, const IntSize&)
+{
+ notImplemented();
+}
+
+void TiledCoreAnimationDrawingAreaIOS::setRootCompositingLayer(GraphicsLayer* graphicsLayer)
+{
+ CALayer *rootCompositingLayer = graphicsLayer ? graphicsLayer->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& graphicsContext, GraphicsLayerPaintingPhase, const IntRect& clipRect)
+{
+}
+
+float TiledCoreAnimationDrawingAreaIOS::minimumDocumentScale() const
+{
+ return 1.0;
+}
+
+bool TiledCoreAnimationDrawingAreaIOS::allowCompositingLayerVisualDegradation() const
+{
+ return false;
+}
+
+bool TiledCoreAnimationDrawingAreaIOS::flushLayers()
+{
+ @autoreleasepool {
+ m_webPage->layoutIfNeeded();
+ return m_webPage->corePage()->mainFrame().view()->flushCompositingStateIncludingSubframes();
+ }
+}
+
+void TiledCoreAnimationDrawingAreaIOS::updateGeometry(const IntSize& viewSize, const WebCore::IntSize& layerPosition)
+{
+ m_webPage->setSize(viewSize);
+ m_webPage->layoutIfNeeded();
+}
+
+void TiledCoreAnimationDrawingAreaIOS::setDeviceScaleFactor(float deviceScaleFactor)
+{
+ m_webPage->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 "config.h"
+#import "WebBackForwardListProxy.h"
+
+#import <WebCore/NotImplemented.h>
+
+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 "config.h"
+#import "WebPage.h"
+
+#import "EditorState.h"
+#import "WebChromeClient.h"
+#import "WebCoreArgumentCoders.h"
+#import "WebFrame.h"
+#import "WebPageProxyMessages.h"
+#import "WebProcess.h"
+#import "WKGestureTypes.h"
+#import <CoreText/CTFont.h>
+#import <WebCore/Chrome.h>
+#import <WebCore/Element.h>
+#import <WebCore/EventHandler.h>
+#import <WebCore/FocusController.h>
+#import <WebCore/FloatQuad.h>
+#import <WebCore/Frame.h>
+#import <WebCore/FrameView.h>
+#import <WebCore/MainFrame.h>
+#import <WebCore/NotImplemented.h>
+#import <WebCore/Page.h>
+#import <WebCore/PlatformKeyboardEvent.h>
+#import <WebCore/PlatformMouseEvent.h>
+#import <WebCore/SharedBuffer.h>
+#import <WebCore/TextIterator.h>
+#import <WebCore/VisibleUnits.h>
+#import <WebCore/WebEvent.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebPage::platformInitialize()
+{
+ notImplemented();
+}
+
+void WebPage::platformPreferencesDidChange(const WebPreferencesStore&)
+{
+ notImplemented();
+}
+
+bool WebPage::executeKeypressCommandsInternal(const Vector<WebCore::KeypressCommand>&, KeyboardEvent*)
+{
+ notImplemented();
+ return false;
+}
+
+bool WebPage::handleEditingKeyboardEvent(KeyboardEvent* event, bool)
+{
+ bool eventWasHandled = false;
+ bool sendResult = WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::InterpretKeyEvent(editorState(), event->keyEvent()->type() == PlatformKeyboardEvent::Char),
+ Messages::WebPageProxy::InterpretKeyEvent::Reply(eventWasHandled), m_pageID);
+ if (!sendResult)
+ return false;
+
+ return eventWasHandled;
+}
+
+void WebPage::sendComplexTextInputToPlugin(uint64_t, const String&)
+{
+ notImplemented();
+}
+
+void WebPage::setComposition(const String&, Vector<CompositionUnderline>, uint64_t, uint64_t, uint64_t, uint64_t, EditorState&)
+{
+ notImplemented();
+}
+
+void WebPage::confirmComposition(EditorState&)
+{
+ notImplemented();
+}
+
+void WebPage::cancelComposition(EditorState&)
+{
+ notImplemented();
+}
+
+static PassRefPtr<Range> convertToRange(Frame* frame, NSRange nsrange)
+{
+ if (nsrange.location > INT_MAX)
+ return 0;
+ if (nsrange.length > INT_MAX || nsrange.location + nsrange.length > 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->selection().rootEditableElementOrDocumentElement(), nsrange.location, nsrange.length);
+}
+
+void WebPage::insertText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, bool& handled, EditorState& newState)
+{
+ Frame& frame = m_page->focusController().focusedOrMainFrame();
+
+ if (replacementRangeStart != NSNotFound) {
+ RefPtr<Range> replacementRange = convertToRange(&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&, uint64_t, uint64_t, const Vector<WebCore::DictationAlternative>&, bool&, EditorState&)
+{
+ notImplemented();
+}
+
+void WebPage::getMarkedRange(uint64_t&, uint64_t&)
+{
+ notImplemented();
+}
+
+void WebPage::getSelectedRange(uint64_t&, uint64_t&)
+{
+ notImplemented();
+}
+
+void WebPage::getAttributedSubstringFromRange(uint64_t, uint64_t, AttributedString&)
+{
+ notImplemented();
+}
+
+void WebPage::characterIndexForPoint(IntPoint, uint64_t&)
+{
+ notImplemented();
+}
+
+void WebPage::firstRectForCharacterRange(uint64_t, uint64_t, WebCore::IntRect&)
+{
+ notImplemented();
+}
+
+void WebPage::executeKeypressCommands(const Vector<WebCore::KeypressCommand>&, bool&, EditorState&)
+{
+ notImplemented();
+}
+
+void WebPage::performDictionaryLookupAtLocation(const FloatPoint&)
+{
+ notImplemented();
+}
+
+void WebPage::performDictionaryLookupForSelection(Frame*, const VisibleSelection&)
+{
+ notImplemented();
+}
+
+void WebPage::performDictionaryLookupForRange(Frame*, Range*, NSDictionary *)
+{
+ notImplemented();
+}
+
+bool WebPage::performNonEditingBehaviorForSelector(const String&, WebCore::KeyboardEvent*)
+{
+ notImplemented();
+ return false;
+}
+
+bool WebPage::performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&)
+{
+ notImplemented();
+ return false;
+}
+
+void WebPage::registerUIProcessAccessibilityTokens(const CoreIPC::DataReference&, const CoreIPC::DataReference&)
+{
+ notImplemented();
+}
+
+void WebPage::readSelectionFromPasteboard(const String&, bool&)
+{
+ notImplemented();
+}
+
+void WebPage::getStringSelectionForPasteboard(String&)
+{
+ notImplemented();
+}
+
+void WebPage::getDataSelectionForPasteboard(const String, SharedMemory::Handle&, uint64_t&)
+{
+ notImplemented();
+}
+
+WKAccessibilityWebPageObject* WebPage::accessibilityRemoteObject()
+{
+ notImplemented();
+ return 0;
+}
+
+bool WebPage::platformHasLocalDataForURL(const WebCore::URL&)
+{
+ notImplemented();
+ return false;
+}
+
+String WebPage::cachedSuggestedFilenameForURL(const URL&)
+{
+ notImplemented();
+ return String();
+}
+
+String WebPage::cachedResponseMIMETypeForURL(const URL&)
+{
+ notImplemented();
+ return String();
+}
+
+PassRefPtr<SharedBuffer> WebPage::cachedResponseDataForURL(const URL&)
+{
+ notImplemented();
+ return 0;
+}
+
+bool WebPage::platformCanHandleRequest(const WebCore::ResourceRequest&)
+{
+ notImplemented();
+ return false;
+}
+
+void WebPage::shouldDelayWindowOrderingEvent(const WebKit::WebMouseEvent&, bool&)
+{
+ notImplemented();
+}
+
+void WebPage::acceptsFirstMouse(int, const WebKit::WebMouseEvent&, bool&)
+{
+ notImplemented();
+}
+
+void WebPage::setLayerHostingMode(LayerHostingMode)
+{
+ notImplemented();
+}
+
+void WebPage::computePagesForPrintingPDFDocument(uint64_t, const PrintInfo&, Vector<IntRect>&)
+{
+ notImplemented();
+}
+
+void WebPage::drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, uint32_t, uint32_t)
+{
+ notImplemented();
+}
+
+void WebPage::advanceToNextMisspelling(bool)
+{
+ notImplemented();
+}
+
+void WebPage::handleTap(const IntPoint& point)
+{
+ Frame& mainframe = m_page->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& position)
+{
+ Frame& mainframe = m_page->mainFrame();
+ FloatPoint adjustedPoint;
+ Node* node = mainframe.nodeRespondingToClickEvents(position, adjustedPoint);
+
+ if (!node)
+ return;
+
+ RenderObject *renderer = node->renderer();
+
+ Vector<FloatQuad> quads;
+ if (renderer) {
+ renderer->absoluteQuads(quads);
+ Color highlightColor = node->computedStyle()->tapHighlightColor();
+
+ RoundedRect::Radii borderRadii;
+ if (renderer->isBox()) {
+ RenderBox* box = toRenderBox(renderer);
+ borderRadii = box->borderRadii();
+ }
+
+ send(Messages::WebPageProxy::DidGetTapHighlightGeometries(requestID, highlightColor, quads, borderRadii.topLeft(), borderRadii.topRight(), borderRadii.bottomLeft(), borderRadii.bottomRight()));
+ }
+}
+
+void WebPage::blurAssistedNode()
+{
+ if (m_assistedNode && m_assistedNode->isElementNode())
+ toElement(m_assistedNode.get())->blur();
+}
+
+static FloatQuad innerFrameQuad(Frame* frame, Node* assistedNode)
+{
+ frame->document()->updateLayoutIgnorePendingStylesheets();
+ RenderObject* renderer;
+ if (assistedNode->hasTagName(HTMLNames::textareaTag) || assistedNode->hasTagName(HTMLNames::inputTag))
+ renderer = assistedNode->renderer();
+ else
+ renderer = assistedNode->rootEditableElement()->renderer();
+
+ if (!renderer)
+ return FloatQuad();
+
+ RenderStyle& style = renderer->style();
+ IntRect boundingBox = renderer->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& 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() < minX)
+ constrainedPoint.setX(minX);
+ else if (point.x() > maxX)
+ constrainedPoint.setX(maxX);
+
+ if (point.y() < minY)
+ constrainedPoint.setY(minY);
+ else if (point.y() >= maxY)
+ constrainedPoint.setY(maxY);
+
+ return constrainedPoint;
+}
+
+void WebPage::selectWithGesture(const IntPoint& point, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID)
+{
+ Frame& frame = m_page->focusController().focusedOrMainFrame();
+ FloatPoint adjustedPoint(point);
+ Node* node = frame.nodeRespondingToClickEvents(FloatPoint(point), adjustedPoint);
+ if (node && node != m_assistedNode.get()) {
+ handleTap(IntPoint(adjustedPoint));
+ if (!m_assistedNode) {
+ send(Messages::WebPageProxy::GestureCallback(point, gestureType, gestureState, 0, callbackID));
+ return;
+ }
+ }
+ IntPoint constrainedPoint = constrainPoint(point, &frame, m_assistedNode.get());
+ VisiblePosition position = frame.visiblePositionForPoint(constrainedPoint);
+ if (position.isNull()) {
+ send(Messages::WebPageProxy::GestureCallback(point, gestureType, gestureState, 0, callbackID));
+ return;
+ }
+ RefPtr<Range> range;
+ switch (static_cast<WKGestureType>(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<Range> wordRange = enclosingTextUnitOfGranularity(position, WordGranularity, DirectionForward);
+
+ result = wordRange->startPosition();
+ if (distanceBetweenPositions(position, result) > 1)
+ result = wordRange->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<WKGestureRecognizerState>(gestureState)) {
+ case WKGestureRecognizerStateBegan:
+ range = wordRangeFromPosition(position);
+ m_currentWordRange = Range::create(*frame.document(), range->startPosition(), range->endPosition());
+ break;
+ case WKGestureRecognizerStateChanged:
+ {
+ range = Range::create(*frame.document(), m_currentWordRange->startPosition(), m_currentWordRange->endPosition());
+ ExceptionCode ec;
+ if (position < range->startPosition())
+ range->setStart(position.deepEquivalent(), ec);
+ if (position > range->endPosition())
+ range->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<Range> rangeForPosition(Frame* frame, const VisiblePosition& position, bool baseIsStart)
+{
+ RefPtr<Range> range;
+ VisiblePosition result = position;
+
+ if (baseIsStart) {
+ VisiblePosition selectionStart = frame->selection().selection().visibleStart();
+ bool wouldFlip = position <= selectionStart;
+
+ if (wouldFlip)
+ result = selectionStart.next();
+
+ if (result.isNotNull())
+ range = Range::create(*frame->document(), selectionStart, result);
+ } else {
+ VisiblePosition selectionEnd = frame->selection().selection().visibleEnd();
+ bool wouldFlip = position >= selectionEnd;
+
+ if (wouldFlip)
+ result = selectionEnd.previous();
+
+ if (result.isNotNull())
+ range = Range::create(*frame->document(), result, selectionEnd);
+ }
+
+ return range.release();
+}
+
+static PassRefPtr<Range> rangeAtWordBoundaryForPosition(Frame* frame, const VisiblePosition& position, bool baseIsStart, SelectionDirection direction)
+{
+ SelectionDirection sameDirection = baseIsStart ? DirectionForward : DirectionBackward;
+ SelectionDirection oppositeDirection = baseIsStart ? DirectionBackward : DirectionForward;
+ VisiblePosition base = baseIsStart ? frame->selection().selection().visibleStart() : frame->selection().selection().visibleEnd();
+ VisiblePosition extent = baseIsStart ? frame->selection().selection().visibleEnd() : frame->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()
+ && atBoundaryOfGranularity(wordBoundary, WordGranularity, sameDirection)
+ && initialExtent != wordBoundary) {
+ extent = wordBoundary;
+ return (base < extent) ? Range::create(*frame->document(), base, extent) : Range::create(*frame->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()
+ && !atBoundaryOfGranularity(extent, WordGranularity, sameDirection)
+ && extent != base
+ && !atBoundaryOfGranularity(extent, LineBoundary, sameDirection)
+ && !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 < extent) ? Range::create(*frame->document(), base, extent) : Range::create(*frame->document(), extent, base);
+}
+
+void WebPage::updateSelectionWithTouches(const IntPoint& point, uint32_t touches, bool baseIsStart, uint64_t callbackID)
+{
+ Frame& frame = m_page->focusController().focusedOrMainFrame();
+ VisiblePosition position = frame.visiblePositionForPoint(point);
+ if (position.isNull()) {
+ send(Messages::WebPageProxy::TouchesCallback(point, touches, callbackID));
+ return;
+ }
+
+ RefPtr<Range> range;
+ VisiblePosition result;
+
+ switch (static_cast<WKSelectionTouch>(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(&frame, position, baseIsStart, DirectionForward);
+ break;
+
+ case WKSelectionTouchEndedMovingBackward:
+ range = rangeAtWordBoundaryForPosition(&frame, position, baseIsStart, DirectionBackward);
+ break;
+
+ case WKSelectionTouchMoved:
+ range = rangeForPosition(&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& from, const WebCore::IntPoint& to, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID)
+{
+ Frame& frame = m_page->focusController().focusedOrMainFrame();
+ VisiblePosition fromPosition = frame.visiblePositionForPoint(from);
+ VisiblePosition toPosition = frame.visiblePositionForPoint(to);
+ RefPtr<Range> range;
+ if (fromPosition.isNotNull() && toPosition.isNotNull()) {
+ if (fromPosition < 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& frame = m_page->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& textForAutocorrection, uint64_t callbackID)
+{
+ RefPtr<Range> range;
+ Frame& frame = m_page->focusController().focusedOrMainFrame();
+ ASSERT(frame.selection().isCaret());
+ VisiblePosition position = frame.selection().selection().start();
+ Vector<SelectionRect> selectionRects;
+
+ range = wordRangeFromPosition(position);
+ String textForRange = plainText(range.get());
+ const unsigned maxSearchAttempts = 5;
+ for (size_t i = 0; i < maxSearchAttempts && textForRange != textForAutocorrection; ++i)
+ {
+ position = range->startPosition().previous();
+ if (position.isNull() || position == range->startPosition())
+ break;
+ range = Range::create(*frame.document(), wordRangeFromPosition(position)->startPosition(), range->endPosition());
+ textForRange = plainText(range.get());
+ }
+ if (textForRange == textForAutocorrection)
+ range->collectSelectionRects(selectionRects);
+
+ Vector<FloatRect> rectsForText;
+ rectsForText.resize(selectionRects.size());
+
+ for (size_t i = 0; i < selectionRects.size(); i++)
+ rectsForText[i] = selectionRects[i].rect();
+
+ bool multipleFonts = false;
+ CTFontRef font = nil;
+ if (const SimpleFontData* fontData = frame.editor().fontForSelection(multipleFonts))
+ font = fontData->getCTFont();
+
+ CGFloat fontSize = CTFontGetSize(font);
+ uint64_t fontTraits = CTFontGetSymbolicTraits(font);
+ RetainPtr<NSString> fontName = adoptNS((NSString *)CTFontCopyFamilyName(font));
+ send(Messages::WebPageProxy::AutocorrectionDataCallback(rectsForText, fontName.get(), fontSize, fontTraits, callbackID));
+}
+
+void WebPage::applyAutocorrection(const String& correction, const String& originalText, uint64_t callbackID)
+{
+ RefPtr<Range> range;
+ Frame& frame = m_page->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 < originalText.length(); ++i)
+ position = position.previous();
+ if (position.isNull())
+ position = startOfDocument(static_cast<Node*>(frame.document()->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() && textForRange.length() > originalText.length() && loopCount < maxPositionsAttempts) {
+ position = position.next();
+ if (position.isNotNull() && position >= 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->hasTagName(WebCore::HTMLNames::inputTag) || node->hasTagName(WebCore::HTMLNames::textareaTag) || node->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& contentOffset)
+{
+ m_page->mainFrame().view()->setScrollOffset(WebCore::IntPoint(contentOffset));
+}
+
+void WebPage::didFinishZooming(float newScale)
+{
+ m_page->mainFrame().setDocumentScale(newScale);
+ m_page->setPageScaleFactor(newScale, m_page->mainFrame().view()->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 "DrawingArea.h"
</span><span class="cx"> #include "LayerTreeContext.h"
</span><span class="cx"> #include <WebCore/FloatRect.h>
</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 "config.h"
</span><span class="cx"> #import "TiledCoreAnimationDrawingArea.h"
</span><span class="cx">
</span><ins>+#if !PLATFORM(IOS)
+
</ins><span class="cx"> #import "ColorSpaceData.h"
</span><span class="cx"> #import "DrawingAreaProxyMessages.h"
</span><span class="cx"> #import "LayerHostingContext.h"
</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
+ // <rdar://problem/9813262> 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->mainFrame())
+ mainFrame->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&, const String& 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) && !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 "config.h"
+#import "WebProcess.h"
+
+#import <WebCore/NotImplemented.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebProcess::initializeProcessName(const ChildProcessInitializationParameters&)
+{
+ notImplemented();
+}
+
+void WebProcess::initializeSandbox(const ChildProcessInitializationParameters&, SandboxInitializationParameters&)
+{
+ notImplemented();
+}
+
+void WebProcess::platformSetCacheModel(CacheModel)
+{
+ notImplemented();
+}
+
+void WebProcess::platformClearResourceCaches(ResourceCachesToClear)
+{
+ notImplemented();
+}
+
+void WebProcess::platformInitializeWebProcess(const WebProcessCreationParameters&, CoreIPC::MessageDecoder&)
+{
+ notImplemented();
+}
+
+void WebProcess::platformInitializeProcess(const ChildProcessInitializationParameters&)
+{
+ 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& parameters, SandboxInitializationParameters& 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(@"WKView")];
</span><span class="cx"> sandboxParameters.setOverrideSandboxProfilePath([webkit2Bundle pathForResource:@"com.apple.WebProcess" ofType:@"sb"]);
</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>