77aedd1c5c32b789283b04b5389b3202bf96d5f4
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-11-12  Alexey Proskuryakov  <ap@apple.com>
2
3         Disable WebCrypto on Mountain Lion
4         https://bugs.webkit.org/show_bug.cgi?id=124261
5
6         Rubber-stamped by Sam Weinig.
7
8         * Configurations/FeatureDefines.xcconfig:
9
10 2013-11-12  Nick Diego Yamane  <nick.yamane@openbossa.org>
11
12         [GTK][EFL] More on renaming WebKit::APIObject to API::Object
13         https://bugs.webkit.org/show_bug.cgi?id=124255
14
15         Reviewed by Anders Carlsson.
16
17         In r159163 WebKit::APIObject has been renamed to API::Object.
18         This patch refactors the remaining files which were still
19         using WebKit::APIObject and WebKit::TypedAPIObject.
20
21         * Shared/WebBatteryStatus.h:
22         * Shared/WebNetworkInfo.h:
23         * UIProcess/API/C/WKGrammarDetail.cpp:
24         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
25         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
26         * UIProcess/API/gtk/WebKitWebViewGroup.cpp:
27         * UIProcess/CoordinatedGraphics/WebView.h:
28         * UIProcess/WebBatteryManagerProxy.cpp:
29         * UIProcess/WebBatteryManagerProxy.h:
30         * UIProcess/WebGrammarDetail.cpp:
31         * UIProcess/WebNetworkInfoManagerProxy.cpp:
32         * UIProcess/WebNetworkInfoManagerProxy.h:
33         * UIProcess/WebTextChecker.h:
34         * UIProcess/WebVibrationProxy.h:
35         * UIProcess/WebViewportAttributes.h:
36         * UIProcess/efl/EwkTouchEvent.h:
37         * UIProcess/efl/EwkTouchPoint.h:
38         * UIProcess/efl/WebPopupItemEfl.h:
39         * UIProcess/efl/WebUIPopupMenuClient.cpp:
40         * UIProcess/gtk/WebFullScreenClientGtk.h:
41         * UIProcess/gtk/WebInspectorClientGtk.h:
42         * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
43         * UIProcess/soup/WebSoupRequestManagerProxy.h:
44         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
45         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
46
47 2013-11-12  Anders Carlsson  <andersca@apple.com>
48
49         fast/canvas/webgl/draw-arrays-out-of-bounds.html is flaky on Mavericks WK2 testers, fails about 20% of the time
50         https://bugs.webkit.org/show_bug.cgi?id=124223
51         <rdar://problem/15333977>
52
53         Reviewed by Tim Horton.
54
55         It's wrong to use DataReferences in sync IPC replies; the underlying MessageDecoder will be freed after the call to
56         sendSync returns and the DataReference will point to freed memory. Use a Vector<char> instead.
57
58         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
59         * NetworkProcess/SynchronousNetworkLoaderClient.cpp:
60         (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer):
61         (WebKit::SynchronousNetworkLoaderClient::sendDelayedReply):
62         * NetworkProcess/SynchronousNetworkLoaderClient.h:
63         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
64         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
65
66 2013-11-12  Gustavo Noronha Silva  <gns@gnome.org>
67
68         Unreviewed try at fixing the GTK+ build.
69
70         * UIProcess/soup/WebSoupRequestManagerProxy.h: rename TypedAPIObject to API:TypedObject.
71
72 2013-11-12  Nick Diego Yamane  <nick.yamane@openbossa.org>
73
74         [EFL][GTK] Remove MutableArray leftovers from build systems
75         https://bugs.webkit.org/show_bug.cgi?id=124248
76
77         Reviewed by Anders Carlsson.
78
79         MutableArray.cpp and .h file has been removed by r159155.
80
81         * CMakeLists.txt:
82         * GNUmakefile.list.am:
83
84 2013-11-12  Anders Carlsson  <andersca@apple.com>
85
86         Rename APIObject to API::Object
87         https://bugs.webkit.org/show_bug.cgi?id=124247
88
89         Reviewed by Tim Horton.
90
91         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
92         (-[WKRemoteObjectRegistry _handleMessageWithName:body:]):
93         * Shared/API/c/WKArray.cpp:
94         (WKArrayCreate):
95         (WKArrayCreateAdoptingValues):
96         * Shared/API/c/WKContextMenuItem.cpp:
97         (WKContextMenuItemGetTypeID):
98         * Shared/API/c/WKSharedAPICast.h:
99         (WebKit::toAPI):
100         * Shared/API/c/WKType.cpp:
101         (WKGetTypeID):
102         (WKRetain):
103         (WKRelease):
104         * Shared/APIObject.cpp:
105         (API::Object::Object):
106         * Shared/APIObject.h:
107         (API::Object::~Object):
108         (API::TypedObject::~TypedObject):
109         (API::TypedObject::TypedObject):
110         * Shared/Cocoa/APIObject.mm:
111         (API::Object::ref):
112         (API::Object::deref):
113         (API::Object::newObject):
114         * Shared/Cocoa/WKNSArray.mm:
115         (-[WKNSArray objectAtIndex:]):
116         (-[WKNSArray API::]):
117         * Shared/Cocoa/WKNSDictionary.mm:
118         (-[WKNSDictionary objectForKey:]):
119         (-[WKNSDictionary API::]):
120         * Shared/Cocoa/WKObject.h:
121         * Shared/Cocoa/WKObject.mm:
122         (-[WKObject dealloc]):
123         (-[WKObject API::]):
124         * Shared/ImmutableArray.cpp:
125         (WebKit::ImmutableArray::create):
126         (WebKit::ImmutableArray::createStringArray):
127         (WebKit::ImmutableArray::ImmutableArray):
128         * Shared/ImmutableArray.h:
129         * Shared/ImmutableDictionary.cpp:
130         (WebKit::ImmutableDictionary::keys):
131         * Shared/ImmutableDictionary.h:
132         (WebKit::ImmutableDictionary::get):
133         * Shared/MutableDictionary.cpp:
134         (WebKit::MutableDictionary::add):
135         (WebKit::MutableDictionary::set):
136         * Shared/MutableDictionary.h:
137         * Shared/SecurityOriginData.cpp:
138         (WebKit::performAPICallbackWithSecurityOriginDataVector):
139         * Shared/UserMessageCoders.h:
140         (WebKit::UserMessageEncoder::baseEncode):
141         (WebKit::UserMessageEncoder::UserMessageEncoder):
142         (WebKit::UserMessageDecoder::baseDecode):
143         (WebKit::UserMessageDecoder::UserMessageDecoder):
144         * Shared/WebArchive.cpp:
145         (WebKit::WebArchive::subresources):
146         (WebKit::WebArchive::subframeArchives):
147         * Shared/WebArchive.h:
148         * Shared/WebArchiveResource.h:
149         * Shared/WebBackForwardListItem.h:
150         * Shared/WebCertificateInfo.h:
151         * Shared/WebConnection.cpp:
152         (WebKit::WebConnection::postMessage):
153         (WebKit::WebConnection::handleMessage):
154         * Shared/WebConnection.h:
155         * Shared/WebConnectionClient.cpp:
156         (WebKit::WebConnectionClient::didReceiveMessage):
157         * Shared/WebConnectionClient.h:
158         * Shared/WebContextMenuItem.cpp:
159         (WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
160         (WebKit::WebContextMenuItem::userData):
161         (WebKit::WebContextMenuItem::setUserData):
162         * Shared/WebContextMenuItem.h:
163         * Shared/WebContextMenuItemData.cpp:
164         (WebKit::WebContextMenuItemData::userData):
165         (WebKit::WebContextMenuItemData::setUserData):
166         * Shared/WebContextMenuItemData.h:
167         * Shared/WebData.h:
168         * Shared/WebError.h:
169         * Shared/WebGeolocationPosition.h:
170         * Shared/WebGeometry.h:
171         * Shared/WebGraphicsContext.h:
172         * Shared/WebHitTestResult.h:
173         * Shared/WebImage.h:
174         * Shared/WebNumber.h:
175         * Shared/WebOpenPanelParameters.h:
176         * Shared/WebRenderLayer.cpp:
177         (WebKit::WebRenderLayer::createArrayFromLayerList):
178         * Shared/WebRenderLayer.h:
179         * Shared/WebRenderObject.cpp:
180         (WebKit::WebRenderObject::WebRenderObject):
181         * Shared/WebRenderObject.h:
182         * Shared/WebSecurityOrigin.h:
183         * Shared/WebSerializedScriptValue.h:
184         * Shared/WebString.h:
185         * Shared/WebURL.h:
186         * Shared/WebURLRequest.h:
187         * Shared/WebURLResponse.h:
188         * Shared/WebUserContentURLPattern.h:
189         * Shared/mac/ObjCObjectGraph.h:
190         * Shared/mac/ObjCObjectGraphCoders.mm:
191         (WebKit::WebContextObjCObjectGraphDecoderImpl::decode):
192         (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode):
193         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
194         (WKPluginSiteDataManagerGetTypeID):
195         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
196         (WKContextGetInfoForInstalledPlugIns):
197         * UIProcess/API/Cocoa/WKBackForwardList.mm:
198         (-[WKBackForwardList API::]):
199         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
200         (-[WKBackForwardListItem API::]):
201         * UIProcess/API/Cocoa/WKNavigationData.mm:
202         (-[WKNavigationData API::]):
203         * UIProcess/API/mac/WKBrowsingContextGroup.mm:
204         (createWKArray):
205         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
206         * UIProcess/Authentication/AuthenticationDecisionListener.h:
207         * UIProcess/Authentication/WebCredential.h:
208         * UIProcess/Authentication/WebProtectionSpace.h:
209         * UIProcess/Downloads/DownloadProxy.h:
210         * UIProcess/GeolocationPermissionRequestProxy.h:
211         * UIProcess/Notifications/NotificationPermissionRequest.h:
212         * UIProcess/Notifications/WebNotification.h:
213         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
214         (WebKit::WebNotificationManagerProxy::refWebContextSupplement):
215         (WebKit::WebNotificationManagerProxy::derefWebContextSupplement):
216         * UIProcess/Notifications/WebNotificationManagerProxy.h:
217         * UIProcess/Notifications/WebNotificationProvider.cpp:
218         (WebKit::WebNotificationProvider::clearNotifications):
219         * UIProcess/Plugins/WebPluginSiteDataManager.h:
220         * UIProcess/StatisticsRequest.cpp:
221         (WebKit::StatisticsRequest::completedRequest):
222         * UIProcess/WebApplicationCacheManagerProxy.cpp:
223         (WebKit::WebApplicationCacheManagerProxy::refWebContextSupplement):
224         (WebKit::WebApplicationCacheManagerProxy::derefWebContextSupplement):
225         * UIProcess/WebApplicationCacheManagerProxy.h:
226         * UIProcess/WebBackForwardList.cpp:
227         (WebKit::WebBackForwardList::addItem):
228         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
229         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
230         (WebKit::WebBackForwardList::clear):
231         * UIProcess/WebBackForwardList.h:
232         * UIProcess/WebColorPickerResultListenerProxy.h:
233         * UIProcess/WebConnectionToWebProcess.cpp:
234         (WebKit::WebConnectionToWebProcess::encodeMessageBody):
235         (WebKit::WebConnectionToWebProcess::decodeMessageBody):
236         * UIProcess/WebConnectionToWebProcess.h:
237         * UIProcess/WebContext.cpp:
238         (WebKit::WebContext::createNewWebProcess):
239         (WebKit::WebContext::postMessageToInjectedBundle):
240         (WebKit::WebContext::didReceiveMessageFromInjectedBundle):
241         (WebKit::WebContext::didReceiveSynchronousMessageFromInjectedBundle):
242         (WebKit::WebContext::didReceiveMessage):
243         (WebKit::WebContext::didReceiveSyncMessage):
244         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
245         * UIProcess/WebContext.h:
246         (WebKit::WebContext::setInjectedBundleInitializationUserData):
247         * UIProcess/WebContextInjectedBundleClient.cpp:
248         (WebKit::WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle):
249         (WebKit::WebContextInjectedBundleClient::didReceiveSynchronousMessageFromInjectedBundle):
250         (WebKit::WebContextInjectedBundleClient::getInjectedBundleInitializationUserData):
251         * UIProcess/WebContextInjectedBundleClient.h:
252         * UIProcess/WebContextUserMessageCoders.h:
253         (WebKit::WebContextUserMessageEncoder::WebContextUserMessageEncoder):
254         (WebKit::WebContextUserMessageEncoder::encode):
255         (WebKit::WebContextUserMessageDecoder::WebContextUserMessageDecoder):
256         (WebKit::WebContextUserMessageDecoder::decode):
257         * UIProcess/WebCookieManagerProxy.cpp:
258         (WebKit::WebCookieManagerProxy::refWebContextSupplement):
259         (WebKit::WebCookieManagerProxy::derefWebContextSupplement):
260         * UIProcess/WebCookieManagerProxy.h:
261         * UIProcess/WebDatabaseManagerProxy.cpp:
262         (WebKit::WebDatabaseManagerProxy::refWebContextSupplement):
263         (WebKit::WebDatabaseManagerProxy::derefWebContextSupplement):
264         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
265         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
266         * UIProcess/WebDatabaseManagerProxy.h:
267         * UIProcess/WebEditCommandProxy.h:
268         * UIProcess/WebFormClient.cpp:
269         (WebKit::WebFormClient::willSubmitForm):
270         * UIProcess/WebFormClient.h:
271         * UIProcess/WebFrameListenerProxy.h:
272         * UIProcess/WebFrameProxy.h:
273         * UIProcess/WebGeolocationManagerProxy.cpp:
274         (WebKit::WebGeolocationManagerProxy::refWebContextSupplement):
275         (WebKit::WebGeolocationManagerProxy::derefWebContextSupplement):
276         * UIProcess/WebGeolocationManagerProxy.h:
277         * UIProcess/WebGrammarDetail.h:
278         * UIProcess/WebIconDatabase.h:
279         * UIProcess/WebIconDatabaseClient.h:
280         * UIProcess/WebInspectorProxy.h:
281         * UIProcess/WebKeyValueStorageManager.cpp:
282         (WebKit::WebKeyValueStorageManager::refWebContextSupplement):
283         (WebKit::WebKeyValueStorageManager::derefWebContextSupplement):
284         (WebKit::didGetKeyValueStorageOrigins):
285         * UIProcess/WebKeyValueStorageManager.h:
286         * UIProcess/WebLoaderClient.cpp:
287         (WebKit::WebLoaderClient::didStartProvisionalLoadForFrame):
288         (WebKit::WebLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
289         (WebKit::WebLoaderClient::didFailProvisionalLoadWithErrorForFrame):
290         (WebKit::WebLoaderClient::didCommitLoadForFrame):
291         (WebKit::WebLoaderClient::didFinishDocumentLoadForFrame):
292         (WebKit::WebLoaderClient::didFinishLoadForFrame):
293         (WebKit::WebLoaderClient::didFailLoadWithErrorForFrame):
294         (WebKit::WebLoaderClient::didSameDocumentNavigationForFrame):
295         (WebKit::WebLoaderClient::didReceiveTitleForFrame):
296         (WebKit::WebLoaderClient::didFirstLayoutForFrame):
297         (WebKit::WebLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
298         (WebKit::WebLoaderClient::didLayout):
299         (WebKit::WebLoaderClient::didRemoveFrameFromHierarchy):
300         (WebKit::WebLoaderClient::didDisplayInsecureContentForFrame):
301         (WebKit::WebLoaderClient::didRunInsecureContentForFrame):
302         (WebKit::WebLoaderClient::didDetectXSSForFrame):
303         (WebKit::WebLoaderClient::didChangeBackForwardList):
304         (WebKit::WebLoaderClient::willGoToBackForwardListItem):
305         * UIProcess/WebLoaderClient.h:
306         * UIProcess/WebMediaCacheManagerProxy.cpp:
307         (WebKit::WebMediaCacheManagerProxy::refWebContextSupplement):
308         (WebKit::WebMediaCacheManagerProxy::derefWebContextSupplement):
309         * UIProcess/WebMediaCacheManagerProxy.h:
310         * UIProcess/WebNavigationData.h:
311         * UIProcess/WebOpenPanelResultListenerProxy.h:
312         * UIProcess/WebOriginDataManagerProxy.cpp:
313         (WebKit::WebOriginDataManagerProxy::refWebContextSupplement):
314         (WebKit::WebOriginDataManagerProxy::derefWebContextSupplement):
315         * UIProcess/WebOriginDataManagerProxy.h:
316         * UIProcess/WebPageContextMenuClient.cpp:
317         (WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu):
318         (WebKit::WebPageContextMenuClient::showContextMenu):
319         * UIProcess/WebPageContextMenuClient.h:
320         * UIProcess/WebPageGroup.h:
321         * UIProcess/WebPageProxy.cpp:
322         (WebKit::WebPageProxy::relatedPages):
323         (WebKit::WebPageProxy::loadURL):
324         (WebKit::WebPageProxy::loadURLRequest):
325         (WebKit::WebPageProxy::loadFile):
326         (WebKit::WebPageProxy::loadData):
327         (WebKit::WebPageProxy::loadHTMLString):
328         (WebKit::WebPageProxy::loadAlternateHTMLString):
329         (WebKit::WebPageProxy::loadPlainTextString):
330         (WebKit::WebPageProxy::loadWebArchiveData):
331         (WebKit::WebPageProxy::didChangeBackForwardList):
332         (WebKit::WebPageProxy::willGoToBackForwardListItem):
333         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
334         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
335         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
336         (WebKit::WebPageProxy::didCommitLoadForFrame):
337         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
338         (WebKit::WebPageProxy::didFinishLoadForFrame):
339         (WebKit::WebPageProxy::didFailLoadForFrame):
340         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
341         (WebKit::WebPageProxy::didReceiveTitleForFrame):
342         (WebKit::WebPageProxy::didFirstLayoutForFrame):
343         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
344         (WebKit::WebPageProxy::didLayout):
345         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
346         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
347         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
348         (WebKit::WebPageProxy::didDetectXSSForFrame):
349         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
350         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
351         (WebKit::WebPageProxy::decidePolicyForResponse):
352         (WebKit::WebPageProxy::unableToImplementPolicy):
353         (WebKit::WebPageProxy::willSubmitForm):
354         (WebKit::WebPageProxy::mouseDidMoveOverElement):
355         (WebKit::WebPageProxy::didFindStringMatches):
356         (WebKit::WebPageProxy::postMessageToInjectedBundle):
357         (WebKit::WebPageProxy::internalShowContextMenu):
358         * UIProcess/WebPageProxy.h:
359         * UIProcess/WebPolicyClient.cpp:
360         (WebKit::WebPolicyClient::decidePolicyForNavigationAction):
361         (WebKit::WebPolicyClient::decidePolicyForNewWindowAction):
362         (WebKit::WebPolicyClient::decidePolicyForResponse):
363         (WebKit::WebPolicyClient::unableToImplementPolicy):
364         * UIProcess/WebPolicyClient.h:
365         * UIProcess/WebPreferences.h:
366         * UIProcess/WebResourceCacheManagerProxy.cpp:
367         (WebKit::WebResourceCacheManagerProxy::refWebContextSupplement):
368         (WebKit::WebResourceCacheManagerProxy::derefWebContextSupplement):
369         * UIProcess/WebResourceCacheManagerProxy.h:
370         * UIProcess/WebUIClient.cpp:
371         (WebKit::WebUIClient::mouseDidMoveOverElement):
372         * UIProcess/WebUIClient.h:
373         * UIProcess/mac/WebContextMenuProxyMac.mm:
374         (-[WKUserDataWrapper initWithUserData:API::]):
375         (-[WKUserDataWrapper API::]):
376         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
377         (WKBundlePostSynchronousMessage):
378         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
379         (contextMenuItems):
380         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
381         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
382         * WebProcess/InjectedBundle/InjectedBundle.cpp:
383         (WebKit::InjectedBundle::postMessage):
384         (WebKit::InjectedBundle::postSynchronousMessage):
385         (WebKit::InjectedBundle::originsWithApplicationCache):
386         (WebKit::InjectedBundle::didReceiveMessage):
387         (WebKit::InjectedBundle::didReceiveMessageToPage):
388         * WebProcess/InjectedBundle/InjectedBundle.h:
389         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
390         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
391         (WebKit::InjectedBundleBackForwardListItem::children):
392         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
393         * WebProcess/InjectedBundle/InjectedBundleClient.cpp:
394         (WebKit::InjectedBundleClient::didReceiveMessage):
395         (WebKit::InjectedBundleClient::didReceiveMessageToPage):
396         * WebProcess/InjectedBundle/InjectedBundleClient.h:
397         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h:
398         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
399         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
400         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
401         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
402         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
403         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h:
404         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
405         (WebKit::InjectedBundlePageFormClient::willSubmitForm):
406         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
407         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
408         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
409         (WebKit::InjectedBundlePageLoaderClient::willLoadURLRequest):
410         (WebKit::InjectedBundlePageLoaderClient::willLoadDataRequest):
411         (WebKit::InjectedBundlePageLoaderClient::shouldGoToBackForwardListItem):
412         (WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
413         (WebKit::InjectedBundlePageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
414         (WebKit::InjectedBundlePageLoaderClient::didFailProvisionalLoadWithErrorForFrame):
415         (WebKit::InjectedBundlePageLoaderClient::didCommitLoadForFrame):
416         (WebKit::InjectedBundlePageLoaderClient::didFinishDocumentLoadForFrame):
417         (WebKit::InjectedBundlePageLoaderClient::didFinishLoadForFrame):
418         (WebKit::InjectedBundlePageLoaderClient::didFailLoadWithErrorForFrame):
419         (WebKit::InjectedBundlePageLoaderClient::didSameDocumentNavigationForFrame):
420         (WebKit::InjectedBundlePageLoaderClient::didReceiveTitleForFrame):
421         (WebKit::InjectedBundlePageLoaderClient::didRemoveFrameFromHierarchy):
422         (WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
423         (WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
424         (WebKit::InjectedBundlePageLoaderClient::didDetectXSSForFrame):
425         (WebKit::InjectedBundlePageLoaderClient::didFirstLayoutForFrame):
426         (WebKit::InjectedBundlePageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
427         (WebKit::InjectedBundlePageLoaderClient::didLayout):
428         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
429         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
430         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
431         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
432         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
433         (WebKit::InjectedBundlePagePolicyClient::unableToImplementPolicy):
434         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
435         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h:
436         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
437         (WebKit::InjectedBundlePageUIClient::mouseDidMoveOverElement):
438         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
439         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
440         * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
441         (WebKit::InjectedBundleUserMessageEncoder::InjectedBundleUserMessageEncoder):
442         (WebKit::InjectedBundleUserMessageEncoder::encode):
443         (WebKit::InjectedBundleUserMessageDecoder::InjectedBundleUserMessageDecoder):
444         (WebKit::InjectedBundleUserMessageDecoder::decode):
445         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
446         (WebKit::InjectedBundle::load):
447         * WebProcess/WebConnectionToUIProcess.cpp:
448         (WebKit::WebConnectionToUIProcess::encodeMessageBody):
449         (WebKit::WebConnectionToUIProcess::decodeMessageBody):
450         * WebProcess/WebConnectionToUIProcess.h:
451         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
452         (WebKit::WebChromeClient::mouseDidMoveOverElement):
453         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
454         (WebKit::WebFrameLoaderClient::detachedFromParent2):
455         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
456         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
457         (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
458         (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
459         (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
460         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
461         (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
462         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
463         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
464         (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
465         (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
466         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
467         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
468         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
469         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
470         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
471         (WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy):
472         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
473         (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
474         (WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
475         (WebKit::WebFrameLoaderClient::didRunInsecureContent):
476         (WebKit::WebFrameLoaderClient::didDetectXSS):
477         * WebProcess/WebPage/PageBanner.h:
478         * WebProcess/WebPage/PageOverlay.h:
479         * WebProcess/WebPage/WebContextMenu.cpp:
480         (WebKit::WebContextMenu::show):
481         (WebKit::WebContextMenu::menuItemsWithUserData):
482         (WebKit::WebContextMenu::items):
483         * WebProcess/WebPage/WebContextMenu.h:
484         * WebProcess/WebPage/WebFrame.cpp:
485         (WebKit::WebFrame::childFrames):
486         * WebProcess/WebPage/WebFrame.h:
487         * WebProcess/WebPage/WebInspector.h:
488         * WebProcess/WebPage/WebPage.cpp:
489         (WebKit::WebPage::trackedRepaintRects):
490         (WebKit::WebPage::loadURLRequest):
491         (WebKit::WebPage::loadDataImpl):
492         (WebKit::WebPage::postInjectedBundleMessage):
493         * WebProcess/WebPage/WebPage.h:
494         * WebProcess/WebPage/WebPageGroupProxy.h:
495         * WebProcess/WebProcess.cpp:
496         (WebKit::WebProcess::initializeWebProcess):
497         (WebKit::WebProcess::postInjectedBundleMessage):
498
499 2013-11-12  Nick Diego Yamane  <nick.yamane@openbossa.org>
500
501         Fix GTK build after r159142
502         https://bugs.webkit.org/show_bug.cgi?id=124243
503
504         Reviewed by Anders Carlsson.
505
506         Use Vector + ImmutableArray instead of MutableArray
507
508         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
509         (webkitContextMenuItemCreate):
510
511 2013-11-12  Anders Carlsson  <andersca@apple.com>
512
513         Remove ImmutableArray::isMutable
514         https://bugs.webkit.org/show_bug.cgi?id=124242
515
516         Reviewed by Dan Bernstein.
517
518         * Shared/API/c/WKMutableArray.cpp:
519         (WKArrayIsMutable):
520         * Shared/Cocoa/WKNSArray.mm:
521         (-[WKNSArray copyWithZone:]):
522         * Shared/ImmutableArray.h:
523
524 2013-11-12  Anders Carlsson  <andersca@apple.com>
525
526         WKMutableArrayRef should be an ImmutableArray
527         https://bugs.webkit.org/show_bug.cgi?id=124239
528
529         Reviewed by Sam Weinig.
530
531         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
532         (ensureObjectStream):
533         * Shared/API/c/WKMutableArray.cpp:
534         (WKMutableArrayCreate):
535         * Shared/API/c/WKSharedAPICast.h:
536
537 2013-11-12  Anders Carlsson  <andersca@apple.com>
538
539         Remove more functionality from MutableArray
540         https://bugs.webkit.org/show_bug.cgi?id=124235
541
542         Reviewed by Beth Dakin.
543
544         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
545         (encodeToObjectStream):
546         * Shared/API/c/WKMutableArray.cpp:
547         (WKArrayAppendItem):
548         (WKArrayRemoveItemAtIndex):
549         * Shared/Cocoa/WKNSArray.mm:
550         (-[WKNSArray copyWithZone:]):
551         * Shared/ImmutableArray.h:
552         (WebKit::ImmutableArray::elements):
553         * Shared/MutableArray.cpp:
554         * Shared/MutableArray.h:
555
556 2013-11-12  Anders Carlsson  <andersca@apple.com>
557
558         Remove most uses of MutableArray
559         https://bugs.webkit.org/show_bug.cgi?id=124232
560
561         Reviewed by Sam Weinig.
562
563         * Shared/API/c/WKMutableArray.cpp:
564         (WKMutableArrayCreate):
565         * Shared/UserMessageCoders.h:
566         (WebKit::UserMessageDecoder::baseDecode):
567         * Shared/WebRenderLayer.h:
568         (WebKit::WebRenderLayer::create):
569         (WebKit::WebRenderLayer::WebRenderLayer):
570         * Shared/WebRenderObject.cpp:
571         (WebKit::WebRenderObject::WebRenderObject):
572         * Shared/WebRenderObject.h:
573         (WebKit::WebRenderObject::create):
574         (WebKit::WebRenderObject::WebRenderObject):
575         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
576         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
577
578 2013-11-12  Anders Carlsson  <andersca@apple.com>
579
580         Use Vector + ImmutableArray instead of MutableArray
581         https://bugs.webkit.org/show_bug.cgi?id=124221
582
583         Reviewed by Andreas Kling.
584
585         * Shared/WebRenderLayer.cpp:
586         (WebKit::WebRenderLayer::createArrayFromLayerList):
587         * Shared/WebRenderLayer.h:
588         * UIProcess/Notifications/WebNotificationProvider.cpp:
589         (WebKit::WebNotificationProvider::clearNotifications):
590         * UIProcess/WebPageContextMenuClient.cpp:
591         (WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu):
592         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
593         (contextMenuItems):
594         (WKBundlePageCopyContextMenuItems):
595         (WKBundlePageCopyContextMenuAtPointInWindow):
596
597 2013-11-12  Zan Dobersek  <zdobersek@igalia.com>
598
599         Unreviewed GTK build fix after r159129.
600
601         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
602         (webkit_file_chooser_request_select_files): Use ImmutableArray::create() instead.
603         * UIProcess/API/gtk/WebKitWebViewGroup.cpp:
604         (toImmutableArray): Ditto.
605
606 2013-11-12  Anders Carlsson  <andersca@apple.com>
607
608         Stop using WKArrayCreate internally
609         https://bugs.webkit.org/show_bug.cgi?id=124217
610
611         Reviewed by Andreas Kling.
612
613         * UIProcess/API/mac/WKBrowsingContextGroup.mm:
614         (createWKArray):
615         (-[WKBrowsingContextGroup addUserStyleSheet:baseURL:whitelistedURLPatterns:blacklistedURLPatterns:mainFrameOnly:]):
616         (-[WKBrowsingContextGroup addUserScript:baseURL:whitelistedURLPatterns:blacklistedURLPatterns:injectionTime:mainFrameOnly:]):
617         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
618         (WKBundlePageCopyContextMenuItems):
619
620 2013-11-12  Csaba Osztrogonác  <ossy@webkit.org>
621
622         URTBF after r159129, use create() instead of adopt() everywhere.
623
624         * UIProcess/WebGrammarDetail.cpp:
625         (WebKit::WebGrammarDetail::guesses):
626         * UIProcess/efl/WebUIPopupMenuClient.cpp:
627         (WebUIPopupMenuClient::showPopupMenu):
628
629 2013-11-12  Anders Carlsson  <andersca@apple.com>
630
631         Simplify ImmutableArray creation
632         https://bugs.webkit.org/show_bug.cgi?id=124213
633
634         Reviewed by Andreas Kling.
635
636         Get rid of the various ImmutableArray::adopt functions and have a single create function instead.
637         Use std::move to avoid unnecessarily copying vector data.
638
639         * Shared/API/c/WKArray.cpp:
640         (WKArrayCreate):
641         (WKArrayCreateAdoptingValues):
642         * Shared/Cocoa/WKNSArray.mm:
643         (-[WKNSArray copyWithZone:]):
644         * Shared/ImmutableArray.cpp:
645         (WebKit::ImmutableArray::create):
646         (WebKit::ImmutableArray::createStringArray):
647         (WebKit::ImmutableArray::ImmutableArray):
648         * Shared/ImmutableArray.h:
649         (WebKit::ImmutableArray::at):
650         (WebKit::ImmutableArray::size):
651         (WebKit::ImmutableArray::entries):
652         * Shared/ImmutableDictionary.cpp:
653         (WebKit::ImmutableDictionary::keys):
654         * Shared/MutableArray.cpp:
655         (WebKit::MutableArray::MutableArray):
656         (WebKit::MutableArray::append):
657         (WebKit::MutableArray::reserveCapacity):
658         (WebKit::MutableArray::removeItemAtIndex):
659         * Shared/SecurityOriginData.cpp:
660         (WebKit::performAPICallbackWithSecurityOriginDataVector):
661         * Shared/UserMessageCoders.h:
662         (WebKit::UserMessageDecoder::baseDecode):
663         * Shared/WebArchive.cpp:
664         (WebKit::WebArchive::subresources):
665         (WebKit::WebArchive::subframeArchives):
666         * Shared/WebContextMenuItem.cpp:
667         (WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
668         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
669         (WKContextGetInfoForInstalledPlugIns):
670         * UIProcess/StatisticsRequest.cpp:
671         (WebKit::StatisticsRequest::completedRequest):
672         * UIProcess/WebBackForwardList.cpp:
673         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
674         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
675         * UIProcess/WebContext.cpp:
676         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
677         * UIProcess/WebDatabaseManagerProxy.cpp:
678         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
679         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
680         * UIProcess/WebKeyValueStorageManager.cpp:
681         (WebKit::didGetKeyValueStorageOrigins):
682         * UIProcess/WebLoaderClient.cpp:
683         (WebKit::WebLoaderClient::didChangeBackForwardList):
684         * UIProcess/WebPageContextMenuClient.cpp:
685         (WebKit::WebPageContextMenuClient::showContextMenu):
686         * UIProcess/WebPageProxy.cpp:
687         (WebKit::WebPageProxy::relatedPages):
688         (WebKit::WebPageProxy::didFindStringMatches):
689         * WebProcess/InjectedBundle/InjectedBundle.cpp:
690         (WebKit::InjectedBundle::originsWithApplicationCache):
691         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
692         (WebKit::InjectedBundleBackForwardListItem::children):
693         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
694         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
695         * WebProcess/WebPage/WebFrame.cpp:
696         (WebKit::WebFrame::childFrames):
697         * WebProcess/WebPage/WebPage.cpp:
698         (WebKit::WebPage::trackedRepaintRects):
699
700 2013-11-12  Csaba Osztrogonác  <ossy@webkit.org>
701
702         The last URTBF after r159108 to make GTK happy.
703
704         * GNUmakefile.am:
705
706 2013-11-12  Csaba Osztrogonác  <ossy@webkit.org>
707
708         One more URTBF after r159108, I hope the last one.
709
710         * GNUmakefile.am:
711
712 2013-11-12  Tim Horton  <timothy_horton@apple.com>
713
714         Remote Layer Tree: Assertions during layer flushing after replaceSublayer()
715         https://bugs.webkit.org/show_bug.cgi?id=124194
716
717         Reviewed by Anders Carlsson.
718
719         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
720         (PlatformCALayerRemote::replaceSublayer):
721         Only remove the old layer from the children array once (via removeFromSuperlayer).
722         Update the superlayer backpointer on the new layer.
723
724 2013-11-12  Anders Carlsson  <andersca@apple.com>
725
726         Add ImmutableArray::createStringArray
727         https://bugs.webkit.org/show_bug.cgi?id=124210
728
729         Reviewed by Andreas Kling.
730
731         Creating an ImmutableArray of WebStrings is a common operation, so add a 
732         helper function to ImmutableArray that does this from a Vector of Strings.
733
734         * Shared/ImmutableArray.cpp:
735         (WebKit::ImmutableArray::createStringArray):
736         * Shared/ImmutableArray.h:
737         * Shared/ImmutableDictionary.cpp:
738         (WebKit::ImmutableDictionary::keys):
739         * Shared/WebOpenPanelParameters.cpp:
740         (WebKit::WebOpenPanelParameters::acceptMIMETypes):
741         (WebKit::WebOpenPanelParameters::selectedFileNames):
742         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
743         (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
744         * UIProcess/WebCookieManagerProxy.cpp:
745         (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
746         * UIProcess/WebMediaCacheManagerProxy.cpp:
747         (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
748         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
749         (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
750
751 2013-11-12  Csaba Osztrogonác  <ossy@webkit.org>
752
753         One more URTBF after r159108.
754
755         * GNUmakefile.am:
756
757 2013-11-12  Anders Carlsson  <andersca@apple.com>
758
759         Begin cleaning up handling of ImmutableArray vectors
760         https://bugs.webkit.org/show_bug.cgi?id=124208
761
762         Reviewed by Andreas Kling.
763
764         Use range based for to iterate the loops. Use reserveInitialCapacity + uncheckedAppend
765         when appending vector elements.
766
767         * Shared/SecurityOriginData.cpp:
768         (WebKit::performAPICallbackWithSecurityOriginDataVector):
769         * Shared/WebArchive.cpp:
770         (WebKit::WebArchive::subresources):
771         (WebKit::WebArchive::subframeArchives):
772         * Shared/WebContextMenuItem.cpp:
773         (WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
774         * Shared/WebOpenPanelParameters.cpp:
775         (WebKit::WebOpenPanelParameters::acceptMIMETypes):
776         (WebKit::WebOpenPanelParameters::selectedFileNames):
777         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
778         (WKContextGetInfoForInstalledPlugIns):
779         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
780         (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
781         * UIProcess/StatisticsRequest.cpp:
782         (WebKit::StatisticsRequest::completedRequest):
783         * UIProcess/WebContext.cpp:
784         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
785         * UIProcess/WebCookieManagerProxy.cpp:
786         (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
787         * UIProcess/WebDatabaseManagerProxy.cpp:
788         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
789         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
790         * UIProcess/WebMediaCacheManagerProxy.cpp:
791         (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
792         * UIProcess/WebPageContextMenuClient.cpp:
793         (WebKit::WebPageContextMenuClient::showContextMenu):
794         * UIProcess/WebPageProxy.cpp:
795         (WebKit::WebPageProxy::relatedPages):
796         (WebKit::WebPageProxy::didFindStringMatches):
797         * WebProcess/InjectedBundle/InjectedBundle.cpp:
798         (WebKit::InjectedBundle::originsWithApplicationCache):
799         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
800         (WebKit::InjectedBundleBackForwardListItem::children):
801         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
802         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
803         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
804         (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
805         * WebProcess/WebPage/WebPage.cpp:
806         (WebKit::WebPage::trackedRepaintRects):
807
808 2013-11-12  Csaba Osztrogonác  <ossy@webkit.org>
809
810         One more URTBF after r159108.
811
812         * CMakeLists.txt:
813
814 2013-11-12  Csaba Osztrogonác  <ossy@webkit.org>
815
816         URTBF after r159108.
817
818         * CMakeLists.txt:
819         * GNUmakefile.list.am:
820
821 2013-11-12  Anders Carlsson  <andersca@apple.com>
822
823         Move StringReference to Platform/IPC
824         https://bugs.webkit.org/show_bug.cgi?id=124203
825
826         Reviewed by Antti Koivisto.
827
828         * Platform/IPC/StringReference.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/StringReference.cpp.
829         (CoreIPC::StringReference::toString):
830         (CoreIPC::StringReference::encode):
831         (CoreIPC::StringReference::decode):
832         (CoreIPC::StringReference::Hash::hash):
833         * Platform/IPC/StringReference.h: Renamed from Source/WebKit2/Platform/CoreIPC/StringReference.h.
834         (CoreIPC::StringReference::StringReference):
835         (CoreIPC::StringReference::isEmpty):
836         (CoreIPC::StringReference::size):
837         (CoreIPC::StringReference::data):
838         (CoreIPC::StringReference::operator==):
839         (CoreIPC::StringReference::Hash::equal):
840         * WebKit2.xcodeproj/project.pbxproj:
841
842 2013-11-11  Tim Horton  <timothy_horton@apple.com>
843
844         Remote Layer Tree: Sporadic memory corruption during painting
845         https://bugs.webkit.org/show_bug.cgi?id=124191
846
847         Reviewed by Brady Eidson.
848
849         Fix a logic error (flipped the logic, didn't flip the operator)
850         made in the last version of r158982 that caused some crashes because
851         it allowed us to overrun the end of cgPaintingRects.
852
853         * Shared/mac/RemoteLayerBackingStore.mm:
854         (RemoteLayerBackingStore::drawInContext):
855
856 2013-11-11  Commit Queue  <commit-queue@webkit.org>
857
858         Unreviewed, rolling out r159088.
859         http://trac.webkit.org/changeset/159088
860         https://bugs.webkit.org/show_bug.cgi?id=124187
861
862         It broke the EFL build, because it removed a used function
863         (rs=thorton) (Requested by Ossy_night on #webkit).
864
865         * UIProcess/WebPageProxy.cpp:
866         (WebKit::WebPageProxy::WebPageProxy):
867         (WebKit::WebPageProxy::resetStateAfterProcessExited):
868         * UIProcess/WebPageProxy.h:
869         (WebKit::WebPageProxy::urlAtProcessExit):
870         (WebKit::WebPageProxy::loadStateAtProcessExit):
871
872 2013-11-11  Csaba Osztrogonác  <ossy@webkit.org>
873
874         URTBF after r159077 to make GTK build happy.
875
876         * GNUmakefile.list.am:
877
878 2013-11-11  Gustavo Noronha Silva  <gns@gnome.org>
879
880         REGRESSION(r158976): Web Inspector: unable to start docked or dock
881         https://bugs.webkit.org/show_bug.cgi?id=124148
882
883         Reviewed by Timothy Hatcher.
884
885         * UIProcess/WebInspectorProxy.cpp:
886         (WebKit::WebInspectorProxy::canAttach): check for a level that is greater than 1 rather than 0
887         to deny attachment, since 1 is the first level of inspectors.
888
889 2013-11-11  Anders Carlsson  <andersca@apple.com>
890
891         FrameFilter can just be an std::function instead
892         https://bugs.webkit.org/show_bug.cgi?id=124176
893
894         Reviewed by Tim Horton.
895
896         * WebProcess/WebPage/WebFrame.cpp:
897         (WebKit::WebFrame::webArchiveData):
898
899 2013-11-11  Anders Carlsson  <andersca@apple.com>
900
901         Remove unused Qt cruft
902         https://bugs.webkit.org/show_bug.cgi?id=124174
903
904         Reviewed by Tim Horton.
905
906         * UIProcess/WebPageProxy.cpp:
907         (WebKit::WebPageProxy::WebPageProxy):
908         (WebKit::WebPageProxy::resetStateAfterProcessExited):
909         * UIProcess/WebPageProxy.h:
910
911 2013-11-11  Anders Carlsson  <andersca@apple.com>
912
913         REGRESSION (r158927): curly-braces-escaping.html is broken on Mac WebKit2
914         https://bugs.webkit.org/show_bug.cgi?id=124164
915
916         Reviewed by Alexey Proskuryakov.
917
918         Back out the change to use NSSecureCoding for encoding/decoding NSURLRequest and
919         NSURLResponse objects; turns out the NSURL encoding/decoding doesn't preserve the raw URL bytes.
920
921         * Shared/mac/WebCoreArgumentCodersMac.mm:
922         (CoreIPC::encodePlatformData):
923         (CoreIPC::decodePlatformData):
924
925 2013-11-11  Ryuan Choi  <ryuan.choi@samsung.com>
926
927         Unreviewed build fix on CMake Based port since r159077.
928
929         * CMakeLists.txt:
930
931 2013-11-11  Tim Horton  <timothy_horton@apple.com>
932
933         Remote Layer Tree: Implement Page Overlays
934         https://bugs.webkit.org/show_bug.cgi?id=124165
935         <rdar://problem/15199056>
936
937         Reviewed by Anders Carlsson.
938
939         Implement page overlays, very similar to how they work in TiledCoreAnimationDrawingArea,
940         but manipulating the PlatformCALayer tree instead of the CALayer tree directly.
941
942         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
943         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
944         (WebKit::RemoteLayerTreeContext::outOfTreeLayerWasAdded):
945         (WebKit::RemoteLayerTreeContext::outOfTreeLayerWillBeRemoved):
946         (WebKit::RemoteLayerTreeContext::flushLayers):
947         Add a list of out-of-tree GraphicsLayers which are flushed in addition
948         to the page's GraphicsLayer tree, and functions to manipulate this list.
949
950         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
951         Make RemoteLayerTreeDrawingArea a GraphicsLayerClient, so we can get callbacks
952         from the GraphicsLayers that drive our page overlays.
953         Override the relevant page overlay functions.
954         Add storage for the root layer, view size, and a map of PageOverlay->GraphicsLayer.
955
956         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
957         (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
958         Store the root GraphicsLayer for later use.
959
960         (WebKit::RemoteLayerTreeDrawingArea::updateGeometry):
961         Update the size of the page overlays when the DrawingArea's geometry changes.
962
963         (WebKit::RemoteLayerTreeDrawingArea::updatePreferences):
964         Update the page overlay settings when necessary.
965
966         (WebKit::RemoteLayerTreeDrawingArea::didInstallPageOverlay):
967         Create a GraphicsLayer for our page overlay, set it up, and parent it.
968         Inform the RemoteLayerTreeContext that it will need to flush this GraphicsLayer,
969         since it's not a part of the page's GraphicsLayer tree.
970
971         (WebKit::RemoteLayerTreeDrawingArea::didUninstallPageOverlay):
972         Tear down our page overlay's GraphicsLayer.
973
974         (WebKit::RemoteLayerTreeDrawingArea::setPageOverlayNeedsDisplay):
975         (WebKit::RemoteLayerTreeDrawingArea::setPageOverlayOpacity):
976         (WebKit::RemoteLayerTreeDrawingArea::paintContents):
977         (WebKit::RemoteLayerTreeDrawingArea::deviceScaleFactor):
978
979 2013-11-11  Anders Carlsson  <andersca@apple.com>
980
981         Add a FrameLoadState object and begin moving loading related members from WebFrameProxy
982         https://bugs.webkit.org/show_bug.cgi?id=124163
983
984         Reviewed by Beth Dakin.
985
986         * UIProcess/API/C/WKFrame.cpp:
987         (WKFrameGetFrameLoadState):
988         * UIProcess/FrameLoadState.cpp: Added.
989         (WebKit::FrameLoadState::FrameLoadState):
990         (WebKit::FrameLoadState::~FrameLoadState):
991         * UIProcess/FrameLoadState.h: Added.
992         * UIProcess/WebFrameProxy.cpp:
993         (WebKit::WebFrameProxy::WebFrameProxy):
994         (WebKit::WebFrameProxy::didStartProvisionalLoad):
995         (WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad):
996         (WebKit::WebFrameProxy::didFailProvisionalLoad):
997         (WebKit::WebFrameProxy::didCommitLoad):
998         (WebKit::WebFrameProxy::didFinishLoad):
999         (WebKit::WebFrameProxy::didFailLoad):
1000         (WebKit::WebFrameProxy::didSameDocumentNavigation):
1001         (WebKit::WebFrameProxy::setUnreachableURL):
1002         * UIProcess/WebFrameProxy.h:
1003         (WebKit::WebFrameProxy::frameLoadState):
1004         (WebKit::WebFrameProxy::loadState):
1005         (WebKit::WebFrameProxy::url):
1006         (WebKit::WebFrameProxy::provisionalURL):
1007         (WebKit::WebFrameProxy::unreachableURL):
1008         * UIProcess/WebPageProxy.cpp:
1009         (WebKit::WebPageProxy::WebPageProxy):
1010         (WebKit::WebPageProxy::activeURL):
1011         * UIProcess/WebPageProxy.h:
1012         (WebKit::WebPageProxy::loadStateAtProcessExit):
1013         * WebKit2.xcodeproj/project.pbxproj:
1014
1015 2013-11-11  Gergo Balogh  <geryxyz@inf.u-szeged.hu>
1016
1017         Remove #include from test input of the *Messages.in processing scripts.
1018         https://bugs.webkit.org/show_bug.cgi?id=123563
1019
1020         Reviewed by Darin Adler.
1021
1022         * Scripts/webkit2/messages_unittest.py:
1023
1024 2013-11-11  Anders Carlsson  <andersca@apple.com>
1025
1026         Remove block based APIs from the WebKit2 C API
1027         https://bugs.webkit.org/show_bug.cgi?id=124157
1028
1029         Reviewed by Sam Weinig.
1030
1031         Remove most of the block based C APIs from WebKit2. We want to discourage people from using
1032         them since any C API "objects" captured by blocks won't be implicitly retained which
1033         can lead to dangling pointer bugs.
1034
1035         * UIProcess/API/C/WKDatabaseManager.cpp:
1036         * UIProcess/API/C/WKDatabaseManager.h:
1037         * UIProcess/API/C/WKFrame.cpp:
1038         * UIProcess/API/C/WKFrame.h:
1039         * UIProcess/API/C/WKPage.cpp:
1040         * UIProcess/API/C/WKPage.h:
1041         * UIProcess/API/C/WKPagePrivate.h:
1042
1043 2013-11-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1044
1045         [GTK] Crash when printing via javascript in WebKit2
1046         https://bugs.webkit.org/show_bug.cgi?id=124043
1047
1048         Reviewed by Martin Robinson.
1049
1050         It happens because the print operation when started by the
1051         WebProcess due to a DOM operation is supposed to be synchronous
1052         and our print operation is always asynchronous. This is currently
1053         handled only in the UI process because other ports print
1054         synchronously in the WebProcess. In the GTK+ port we need to
1055         notify the WebProcess that the print operation should run
1056         synchronously when request by a DOM operation. Together with the
1057         print settings and page setup we now send a print mode that can be
1058         sync or async. When printing in sync mode we run a nested main loop
1059         for the print operation, making sure that print sources have a
1060         higher priority.
1061
1062         * Shared/PrintInfo.cpp:
1063         (WebKit::PrintInfo::encode): Encode the print mode.
1064         (WebKit::PrintInfo::decode): Decode the print mode.
1065         * Shared/PrintInfo.h: Add PrintMode enum.
1066         * Shared/gtk/PrintInfoGtk.cpp:
1067         (WebKit::PrintInfo::PrintInfo): Initialize print mode.
1068         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
1069         (drawPagesForPrintingCompleted): Do not call endPrinting() when
1070         printing synchronously because WebPageProxy already calls it right
1071         after sending the message to the WebProcess.
1072         (webkitPrintOperationPrintPagesForFrame): Create the PrintInfo
1073         struct with a print mode.
1074         (webkitPrintOperationSetPrintMode): Helper private function to set
1075         the print mode of the print operation.
1076         * UIProcess/API/gtk/WebKitPrintOperationPrivate.h:
1077         * UIProcess/API/gtk/WebKitWebView.cpp:
1078         (webkitWebViewPrintFrame): Set sync print mode when printing due
1079         to a UIClient request.
1080         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
1081         (WebKit::PrintPagesData::PrintPagesData): Create a main loop when
1082         printing synchronously.
1083         (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize
1084         print mode.
1085         (WebKit::WebPrintOperationGtk::printPagesIdleDone): Finish the
1086         nested main loop when printing synchronously.
1087         (WebKit::WebPrintOperationGtk::print): Run a nested main loop when
1088         printing synchronously.
1089         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
1090         (WebKit::WebPrintOperationGtk::printMode): Return the print mode.
1091
1092 2013-11-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1093
1094         [GTK] [WebKit2] Crash when printing to a file via javascript
1095         https://bugs.webkit.org/show_bug.cgi?id=122801
1096
1097         Reviewed by Martin Robinson.
1098
1099         This crash is caused by a GTK+ bug, but we can work around it by
1100         ensuring the print dialog is always shown with a valid
1101         GtkPrintSettings object.
1102
1103         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
1104         (webkitPrintOperationRunDialog):
1105
1106 2013-11-09  Dan Bernstein  <mitz@apple.com>
1107
1108         Use createCFURLFromBuffer when converting a String to a CFURL
1109         https://bugs.webkit.org/show_bug.cgi?id=124113
1110
1111         Reviewed by Anders Carlsson.
1112
1113         * Shared/API/c/cf/WKURLCF.mm:
1114         (WKURLCopyCFURL): Replaced some code with a call to createCFURLFromBuffer(), which does the
1115         same thing.
1116
1117         * Shared/Cocoa/WKNSURLExtras.h: Added.
1118         * Shared/Cocoa/WKNSURLExtras.mm: Added.
1119         (+[NSURL _web_URLWithWTFString:relativeToURL:]): Added. Returns nil for the null String,
1120         otherwise returns the result of createCFURLFromBuffer().
1121
1122         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
1123         (-[WKBackForwardListItem URL]): Changed to use +_web_URLWithWTFString:relativeToURL:.
1124         (-[WKBackForwardListItem originalURL]): Ditto.
1125
1126         * UIProcess/API/Cocoa/WKNavigationData.mm:
1127         (-[WKNavigationData destinationURL]): Ditto.
1128
1129         * UIProcess/API/mac/WKBrowsingContextController.mm:
1130         (-[WKBrowsingContextController unreachableURL]): Ditto.
1131
1132         * WebKit2.xcodeproj/project.pbxproj: Added references to new files.
1133
1134 2013-11-09  Anders Carlsson  <andersca@apple.com>
1135
1136         Encode form data using the KeyedEncoder
1137         https://bugs.webkit.org/show_bug.cgi?id=124107
1138
1139         Reviewed by Sam Weinig.
1140
1141         * Shared/cf/KeyedEncoder.cpp:
1142         (WebKit::KeyedEncoder::encodeBool):
1143         (WebKit::KeyedEncoder::encodeDouble):
1144         * Shared/cf/KeyedEncoder.h:
1145
1146 2013-11-09  Anders Carlsson  <andersca@apple.com>
1147
1148         Remove an unused file.
1149
1150         Rubber-stamped by Andreas Kling.
1151
1152         * WebProcess/WebPage/gtk/ChunkedUpdateDrawingAreaGtk.cpp: Removed.
1153
1154 2013-11-09  Patrick Gansterer  <paroga@webkit.org>
1155
1156         Move RunLoop from WebCore to WTF
1157         https://bugs.webkit.org/show_bug.cgi?id=116606
1158
1159         Reviewed by Anders Carlsson.
1160
1161         * DatabaseProcess/DatabaseProcess.cpp:
1162         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
1163         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1164         * NetworkProcess/NetworkProcess.cpp:
1165         * NetworkProcess/NetworkProcess.h:
1166         * NetworkProcess/NetworkResourceLoader.h:
1167         * NetworkProcess/mac/DiskCacheMonitor.h:
1168         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
1169         * Platform/CoreIPC/Connection.cpp:
1170         * Platform/CoreIPC/Connection.h:
1171         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1172         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
1173         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
1174         * PluginProcess/PluginControllerProxy.h:
1175         * PluginProcess/PluginProcess.cpp:
1176         * PluginProcess/PluginProcess.h:
1177         * PluginProcess/WebProcessConnection.cpp:
1178         * PluginProcess/unix/PluginProcessMainUnix.cpp:
1179         * Shared/ChildProcess.cpp:
1180         * Shared/ChildProcess.h:
1181         * Shared/ChildProcessProxy.cpp:
1182         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h:
1183         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm:
1184         * Shared/Plugins/NPObjectProxy.cpp:
1185         * Shared/WebKit2Initialize.cpp:
1186         (WebKit::InitializeWebKit2):
1187         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
1188         * UIProcess/API/mac/FindIndicatorWindow.h:
1189         * UIProcess/API/mac/WKPrintingView.mm:
1190         * UIProcess/API/mac/WKView.mm:
1191         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h:
1192         * UIProcess/DrawingAreaProxyImpl.h:
1193         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
1194         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1195         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1196         * UIProcess/Network/NetworkProcessProxy.cpp:
1197         * UIProcess/Plugins/PluginProcessProxy.cpp:
1198         * UIProcess/ResponsivenessTimer.cpp:
1199         * UIProcess/ResponsivenessTimer.h:
1200         * UIProcess/VisitedLinkProvider.h:
1201         * UIProcess/WebContext.cpp:
1202         * UIProcess/WebProcessProxy.cpp:
1203         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
1204         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
1205         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
1206         * WebProcess/Network/WebResourceLoadScheduler.h:
1207         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
1208         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1209         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1210         * WebProcess/Plugins/PluginView.h:
1211         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
1212         * WebProcess/WebPage/DrawingAreaImpl.h:
1213         * WebProcess/WebPage/EventDispatcher.cpp:
1214         * WebProcess/WebPage/PageOverlay.h:
1215         * WebProcess/WebPage/WebPage.cpp:
1216         * WebProcess/WebPage/WebPage.h:
1217         * WebProcess/WebProcess.cpp:
1218         * WebProcess/efl/WebProcessMainEfl.cpp:
1219         * WebProcess/gtk/WebProcessMainGtk.cpp:
1220
1221 2013-11-08  Brady Eidson  <beidson@apple.com>
1222
1223         Merge IDBDatabaseBackendInterface and IDBDatabaseBackendImpl
1224         https://bugs.webkit.org/show_bug.cgi?id=124088
1225
1226         Reviewed by Tim Horton.
1227
1228         This abstraction is no longer meaningful in its current form in WebCore.
1229         The current groundwork for the WK2 DatabaseProcess relied on this abstraction,
1230         but that will be reworked in a future patch.
1231
1232         * DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.h:
1233
1234         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
1235         (WebKit::WebIDBFactoryBackend::maybeCreateTransactionBackend):
1236         (WebKit::WebIDBFactoryBackend::createCursorBackend):
1237         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
1238
1239         * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp:
1240         (WebKit::WebProcessIDBDatabaseBackend::put):
1241         (WebKit::WebProcessIDBDatabaseBackend::openCursor):
1242         * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h:
1243
1244 2013-11-08  Jaehun Lim  <ljaehun.lim@samsung.com>
1245
1246         Unreviewed build fix after r158984.
1247
1248         No needs to include "KeyedEncoder.h".
1249         WebKit/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp:31:26: fatal error: KeyedEncoder.h: No such file or directory
1250
1251         * WebProcess/WebPage/WebBackForwardListProxy.cpp: Removed #include line.
1252
1253 2013-11-08  Anders Carlsson  <andersca@apple.com>
1254
1255         Implement encoding of arrays of objects
1256         https://bugs.webkit.org/show_bug.cgi?id=124091
1257
1258         Reviewed by Beth Dakin.
1259
1260         Add a new array stack and push and pop from it accordingly.
1261
1262         * Shared/cf/KeyedEncoder.cpp:
1263         (WebKit::KeyedEncoder::~KeyedEncoder):
1264         (WebKit::KeyedEncoder::encodeBytes):
1265         (WebKit::KeyedEncoder::encodeUInt32):
1266         (WebKit::KeyedEncoder::encodeInt32):
1267         (WebKit::KeyedEncoder::encodeInt64):
1268         (WebKit::KeyedEncoder::encodeFloat):
1269         (WebKit::KeyedEncoder::beginArray):
1270         (WebKit::KeyedEncoder::beginArrayElement):
1271         (WebKit::KeyedEncoder::endArrayElement):
1272         (WebKit::KeyedEncoder::endArray):
1273         * Shared/cf/KeyedEncoder.h:
1274
1275 2013-11-08  Tim Horton  <timothy_horton@apple.com>
1276
1277         Remote Layer Tree: RemoteLayerBackingStore partial repaint is broken for the tile cache
1278         https://bugs.webkit.org/show_bug.cgi?id=123944
1279
1280         Reviewed by Simon Fraser.
1281
1282         Rework RemoteLayerBackingStore painting to fix some rounding issues
1283         that would cause pixel cracks upon repaint, and to speed it up a bit.
1284
1285         * Shared/mac/RemoteLayerBackingStore.h:
1286         Redefine RepaintRectList because we can't include WebLayer.h here yet.
1287         Remove createBackingStore, which was never implemented.
1288         Remove mapToContentCoordinates, because we don't need it on Mac.
1289
1290         (WebKit::RemoteLayerBackingStore::paintingRects): Added.
1291
1292         * Shared/mac/RemoteLayerBackingStore.mm:
1293         (RemoteLayerBackingStore::setNeedsDisplay):
1294         (RemoteLayerBackingStore::display):
1295         Stop using mapToContentCoordinates.
1296
1297         (RemoteLayerBackingStore::drawInContext):
1298         Use clipping instead of painting the image multiple times.
1299         Never repaint more than the dirty region's bounds.
1300         Don't waste time with all of the drawNativeImage code, just use CG.
1301         Unindent the switch's cases.
1302         Store the rects we're painting so that enumerateRectsBeingDrawn can get them.
1303         Pixel-snap the rects we're painting.
1304         Clip the context before going to paint.
1305
1306         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1307         (PlatformCALayerRemote::enumerateRectsBeingDrawn):
1308         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1309         Retrieve the rects currently being painted from our backing store, and
1310         transform them (mostly) according to the CTM, to match the transformation
1311         that will have occurred underneath wkCALayerEnumerateRectsBeingDrawnWithBlock.
1312
1313 2013-11-08  Anders Carlsson  <andersca@apple.com>
1314
1315         Implement more KeyedEncoder functionality
1316         https://bugs.webkit.org/show_bug.cgi?id=124089
1317
1318         Reviewed by Beth Dakin.
1319
1320         * Shared/cf/KeyedEncoder.cpp:
1321         (WebKit::KeyedEncoder::encodeBytes):
1322         (WebKit::KeyedEncoder::encodeInt32):
1323         (WebKit::KeyedEncoder::encodeFloat):
1324         * Shared/cf/KeyedEncoder.h:
1325
1326 2013-11-08  Anders Carlsson  <andersca@apple.com>
1327
1328         KeyedEncoder should be able to encoder objects
1329         https://bugs.webkit.org/show_bug.cgi?id=124085
1330
1331         Reviewed by Sam Weinig.
1332
1333         Add a dictionary stack to KeyedEncoder that's pushed and popped by
1334         beginObject/endObject.
1335
1336         * Shared/cf/KeyedEncoder.cpp:
1337         (WebKit::KeyedEncoder::KeyedEncoder):
1338         (WebKit::KeyedEncoder::~KeyedEncoder):
1339         (WebKit::KeyedEncoder::encodeUInt32):
1340         (WebKit::KeyedEncoder::encodeString):
1341         (WebKit::KeyedEncoder::beginObject):
1342         (WebKit::KeyedEncoder::endObject):
1343         * Shared/cf/KeyedEncoder.h:
1344
1345 2013-11-08  Alexandru Chiculita  <achicu@adobe.com>
1346
1347         Web Inspector: It should be possible to debug the Inspector code
1348         https://bugs.webkit.org/show_bug.cgi?id=124065
1349
1350         Reviewed by Timothy Hatcher.
1351
1352         When the script is paused, the debugger will pause all the pages in the same PageGroup.
1353         All the Inspector windows were created in the same PageGroup, so pausing one debugger
1354         would stop the other too.
1355
1356         Added WebInspectorPageGroups to manage the PageGroups created for the Inspectors.
1357         The WebInspectors will now use the inspection "level" to figure out which PageGroup to use.
1358         The inspector that debugs the main page will use "__WebInspectorPageGroupLevel1__",
1359         the second inspector (that debugs the first inspector) will use "__WebInspectorPageGroupLevel2__" ...
1360
1361         * UIProcess/WebInspectorProxy.cpp:
1362         (WebKit::WebInspectorPageGroups::shared):
1363         (WebKit::WebInspectorPageGroups::inspectorLevel):
1364         (WebKit::WebInspectorPageGroups::isInspectorPageGroup):
1365         (WebKit::WebInspectorPageGroups::inspectorPageGroupLevel):
1366         (WebKit::WebInspectorPageGroups::inspectorPageGroupForLevel):
1367         (WebKit::WebInspectorPageGroups::createInspectorPageGroup):
1368         (WebKit::WebInspectorProxy::WebInspectorProxy):
1369         (WebKit::WebInspectorProxy::inspectorPageGroup):
1370         (WebKit::WebInspectorProxy::isInspectorPage):
1371         (WebKit::WebInspectorProxy::canAttach):
1372         * UIProcess/WebInspectorProxy.h:
1373
1374 2013-11-08  Anders Carlsson  <andersca@apple.com>
1375
1376         Begin stubbing out a KeyedEncoder class in WebCore
1377         https://bugs.webkit.org/show_bug.cgi?id=124079
1378
1379         Reviewed by Sam Weinig.
1380
1381         * Shared/KeyedEncoder.h: Removed.
1382         * Shared/cf/KeyedCodingValueCF.cpp: Removed.
1383         * Shared/cf/KeyedEncoder.cpp: Added.
1384         Remove old keyed encoders.
1385
1386         (WebKit::createDictionary):
1387         Helper function to create a mutable dictionary.
1388         (WebKit::KeyedEncoder::KeyedEncoder):
1389         Create the root dictionary.
1390
1391         (WebKit::KeyedEncoder::encodeUInt32):
1392         Create a CFNumberRef and add it to the dictionary.
1393
1394         * Shared/cf/KeyedEncoder.h: Added.
1395         * WebKit2.xcodeproj/project.pbxproj:
1396         Add new files.
1397
1398         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1399         (WebKit::updateBackForwardItem):
1400         Create a KeyedEncoder and encode the history tree.
1401
1402 2013-11-08  Brady Eidson  <beidson@apple.com>
1403
1404         Merge IDBTransactionBackendInterface and IDBTransactionBackendImpl
1405         https://bugs.webkit.org/show_bug.cgi?id=124077
1406
1407         Reviewed by Alexey Proskuryakov.
1408
1409         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
1410         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
1411
1412 2013-11-08  Brady Eidson  <beidson@apple.com>
1413
1414         Merge IDBCursorBackendInterface and IDBCursorBackendImpl
1415         https://bugs.webkit.org/show_bug.cgi?id=124068
1416
1417         Reviewed by Anders Carlsson.
1418
1419         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
1420         (WebKit::WebIDBFactoryBackend::createCursorBackend):
1421         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
1422
1423 2013-11-08  Anders Carlsson  <andersca@apple.com>
1424
1425         Remove a workaround for a bug in malloc on Symbian
1426         https://bugs.webkit.org/show_bug.cgi?id=124069
1427
1428         Reviewed by Sam Weinig.
1429
1430         * Platform/CoreIPC/ArgumentDecoder.cpp:
1431         (CoreIPC::ArgumentDecoder::~ArgumentDecoder):
1432         (CoreIPC::ArgumentDecoder::initialize):
1433         * Platform/CoreIPC/ArgumentDecoder.h:
1434
1435 2013-11-08  Anders Carlsson  <andersca@apple.com>
1436
1437         More build fixes.
1438
1439         * UIProcess/API/mac/WKBrowsingContextController.mm:
1440         * UIProcess/API/mac/WKConnection.mm:
1441         (didReceiveMessage):
1442
1443 2013-11-08  Anders Carlsson  <andersca@apple.com>
1444
1445         More build fixes.
1446
1447         * UIProcess/API/mac/WKConnection.h:
1448         * UIProcess/API/mac/WKConnection.mm:
1449         (didReceiveMessage):
1450
1451 2013-11-08  Anders Carlsson  <andersca@apple.com>
1452
1453         Try to fix the 32-bit build.
1454
1455         * Shared/API/Cocoa/WKBrowsingContextHandleInternal.h:
1456
1457 2013-11-08  Anders Carlsson  <andersca@apple.com>
1458
1459         Replace __alignof with alignof.
1460
1461         Rubber-stamped by Beth Dakin.
1462
1463         * Platform/CoreIPC/ArgumentCoders.cpp:
1464         (CoreIPC::::encode):
1465         (CoreIPC::decodeStringText):
1466         * Platform/CoreIPC/ArgumentCoders.h:
1467         (CoreIPC::SimpleArgumentCoder::encode):
1468         (CoreIPC::SimpleArgumentCoder::decode):
1469         * Platform/CoreIPC/ArgumentDecoder.h:
1470         (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
1471         * WebProcess/WebPage/DecoderAdapter.cpp:
1472         (WebKit::DecoderAdapter::decodeString):
1473         * WebProcess/WebPage/EncoderAdapter.cpp:
1474         (WebKit::EncoderAdapter::encodeString):
1475
1476 2013-11-08  Anders Carlsson  <andersca@apple.com>
1477
1478         Add a way to get a WKWebProcessPlugInBrowserContextController from a handle
1479         https://bugs.webkit.org/show_bug.cgi?id=124063
1480
1481         Reviewed by Beth Dakin.
1482
1483         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1484         (+[WKWebProcessPlugInBrowserContextController lookUpBrowsingContextFromHandle:]):
1485         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
1486
1487 2013-11-08  Anders Carlsson  <andersca@apple.com>
1488
1489         More work on WKBrowsingContextHandle
1490         https://bugs.webkit.org/show_bug.cgi?id=124060
1491
1492         Reviewed by Beth Dakin.
1493
1494         Implement -hash and -isEqual: and add -[WKWebProcessPlugInBrowserContextController handle].
1495
1496         * Shared/API/Cocoa/WKBrowsingContextHandle.mm:
1497         (-[WKBrowsingContextHandle hash]):
1498         (-[WKBrowsingContextHandle isEqual:]):
1499         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1500         (decodeInvocation):
1501         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1502         (-[WKWebProcessPlugInBrowserContextController mainFrameDocument]):
1503         (-[WKWebProcessPlugInBrowserContextController selectedRange]):
1504         (-[WKWebProcessPlugInBrowserContextController handle]):
1505         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerInternal.h:
1506         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
1507
1508 2013-11-08  Anders Carlsson  <andersca@apple.com>
1509
1510         Add A WKBrowsingContextHandle class
1511         https://bugs.webkit.org/show_bug.cgi?id=124058
1512
1513         Reviewed by Sam Weinig.
1514
1515         The WKBrowsingContextHandle class represents a browsing context and can be sent across process boundaries.
1516
1517         * Shared/API/Cocoa/WKBrowsingContextHandle.h: Added.
1518         * Shared/API/Cocoa/WKBrowsingContextHandle.mm: Added.
1519         (-[WKBrowsingContextHandle _initWithPageID:]):
1520         (-[WKBrowsingContextHandle encodeWithCoder:]):
1521         (-[WKBrowsingContextHandle initWithCoder:]):
1522         (+[WKBrowsingContextHandle supportsSecureCoding]):
1523         * Shared/API/Cocoa/WKBrowsingContextHandleInternal.h: Added.
1524         * UIProcess/API/mac/WKBrowsingContextController.mm:
1525         (-[WKBrowsingContextController handle]):
1526         * UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
1527         * UIProcess/API/mac/WKBrowsingContextControllerPrivate.h:
1528         (NS_ENUM):
1529         * WebKit2.xcodeproj/project.pbxproj:
1530
1531 2013-11-08  Anders Carlsson  <andersca@apple.com>
1532
1533         Add WKRemoteObjectRegistry to WKConnection
1534         https://bugs.webkit.org/show_bug.cgi?id=124054
1535
1536         Reviewed by Sam Weinig.
1537
1538         * UIProcess/API/mac/WKConnection.h:
1539         * UIProcess/API/mac/WKConnection.mm:
1540         (-[WKConnection delegate]):
1541         (-[WKConnection setDelegate:]):
1542         (-[WKConnection remoteObjectRegistry]):
1543         (didReceiveMessage):
1544
1545 2013-11-08  Anders Carlsson  <andersca@apple.com>
1546
1547         Encode and decode NSURLRequests using NSCoder
1548         https://bugs.webkit.org/show_bug.cgi?id=124051
1549
1550         Reviewed by Sam Weinig.
1551
1552         * Shared/mac/WebCoreArgumentCodersMac.mm:
1553         (CoreIPC::archiveAndEncodeObject):
1554         (CoreIPC::decodeAndUnarchiveObject):
1555         (CoreIPC::::encodePlatformData):
1556         (CoreIPC::::decodePlatformData):
1557
1558 2013-11-07  Anders Carlsson  <andersca@apple.com>
1559
1560         Encode and decode NSURLResponse objects using NSCoder
1561         https://bugs.webkit.org/show_bug.cgi?id=124028
1562
1563         Reviewed by Andreas Kling.
1564
1565         * Shared/mac/WebCoreArgumentCodersMac.mm:
1566         (CoreIPC::::encodePlatformData):
1567         (CoreIPC::::decodePlatformData):
1568
1569 2013-11-07  Anders Carlsson  <andersca@apple.com>
1570
1571         Move m_destinationID to MessageDecoder
1572         https://bugs.webkit.org/show_bug.cgi?id=124026
1573
1574         Reviewed by Andreas Kling.
1575
1576         * Platform/CoreIPC/ArgumentDecoder.h:
1577         * Platform/CoreIPC/MessageDecoder.h:
1578         (CoreIPC::MessageDecoder::destinationID):
1579
1580 2013-11-07  Anders Carlsson  <andersca@apple.com>
1581
1582         Get rid of the out-of-line memory attachment type
1583         https://bugs.webkit.org/show_bug.cgi?id=124023
1584
1585         Reviewed by Andreas Kling.
1586
1587         We're only using out-of-line memory for when the message body is too big, so
1588         isolate that code in Connection and get rid of the out of line attachment type.
1589
1590         * Platform/CoreIPC/Attachment.cpp:
1591         (CoreIPC::Attachment::Attachment):
1592         * Platform/CoreIPC/Attachment.h:
1593         (CoreIPC::Attachment::port):
1594         (CoreIPC::Attachment::disposition):
1595         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1596         (CoreIPC::Connection::sendOutgoingMessage):
1597         (CoreIPC::createMessageDecoder):
1598
1599 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
1600
1601         Lots of layers get solid color but transparent contents layers now
1602         https://bugs.webkit.org/show_bug.cgi?id=123537
1603
1604         Reviewed by Tim Horton.
1605         
1606         Add some properties to the list of things not to implicitly animate.
1607
1608         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1609         (WebKit::RemoteLayerTreePropertyApplier::disableActionsForLayer):
1610
1611 2013-11-07  Anders Carlsson  <andersca@apple.com>
1612
1613         Remove more dead code
1614         https://bugs.webkit.org/show_bug.cgi?id=124016
1615
1616         Reviewed by Beth Dakin.
1617
1618         We're always layer backed now so we never scroll using the PageClient.
1619
1620         * UIProcess/API/mac/PageClientImpl.mm:
1621         (WebKit::PageClientImpl::canScrollView):
1622         (WebKit::PageClientImpl::scrollView):
1623
1624 2013-11-07  Anders Carlsson  <andersca@apple.com>
1625
1626         Don't repaint the view when the web process crashes
1627         https://bugs.webkit.org/show_bug.cgi?id=124013
1628
1629         Reviewed by Dan Bernstein.
1630
1631         It's up to each individual port to decide whether the view should be repainted when the web process crashes.
1632
1633         * UIProcess/API/mac/PageClientImpl.mm:
1634         (WebKit::PageClientImpl::setViewNeedsDisplay):
1635         (WebKit::PageClientImpl::displayView):
1636         * UIProcess/WebPageProxy.cpp:
1637         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1638
1639 2013-11-07  Tamas Gergely  <gertom@inf.u-szeged.hu>
1640
1641         Report error on unknown template class usage.
1642         https://bugs.webkit.org/show_bug.cgi?id=123096
1643
1644         Reviewed by Darin Adler.
1645
1646         Report error when template class is not found in the dictionary.
1647
1648         * Scripts/webkit2/messages.py:
1649         (class_template_headers):
1650         (class_template_headers.template):
1651
1652 2013-11-07  Denis Nomiyama  <d.nomiyama@samsung.com>
1653
1654         [GTK] Glyphs in vertical text tests are rotated 90 degrees clockwise
1655         https://bugs.webkit.org/show_bug.cgi?id=50619
1656
1657         Reviewed by Martin Robinson.
1658
1659         Added WebCore/platform/graphics/opentype to the include path.
1660
1661         * PlatformEfl.cmake:
1662         * PlatformGTK.cmake:
1663
1664 2013-11-07  Brendan Long  <b.long@cablelabs.com>
1665
1666         [Gtk] Remove old takeFocus() method from PageClientImpl and mark methods as OVERRIDE
1667         https://bugs.webkit.org/show_bug.cgi?id=123919
1668
1669         Reviewed by Carlos Garcia Campos.
1670
1671         * UIProcess/API/gtk/PageClientImpl.cpp: Remove takeFocus().
1672         * UIProcess/API/gtk/PageClientImpl.h: Remove takeFocus() and mark methods as OVERRIDE.
1673
1674 2013-11-06  Dan Bernstein  <mitz@apple.com>
1675
1676         Moved UIProcess/Cocoa to UIProcess/API/Cocoa.
1677
1678         Rubber-stamped by Anders Carlsson.
1679
1680         * UIProcess/API/Cocoa: Copied from Source/WebKit2/UIProcess/Cocoa.
1681         * UIProcess/Cocoa: Removed.
1682         * UIProcess/Cocoa/WKBackForwardList.h: Removed.
1683         * UIProcess/Cocoa/WKBackForwardList.mm: Removed.
1684         * UIProcess/Cocoa/WKBackForwardListInternal.h: Removed.
1685         * UIProcess/Cocoa/WKBackForwardListItem.h: Removed.
1686         * UIProcess/Cocoa/WKBackForwardListItem.mm: Removed.
1687         * UIProcess/Cocoa/WKBackForwardListItemInternal.h: Removed.
1688         * UIProcess/Cocoa/WKBrowsingContextHistoryDelegate.h: Removed.
1689         * UIProcess/Cocoa/WKNavigationData.h: Removed.
1690         * UIProcess/Cocoa/WKNavigationData.mm: Removed.
1691         * UIProcess/Cocoa/WKNavigationDataInternal.h: Removed.
1692         * WebKit2.xcodeproj/project.pbxproj:
1693
1694 2013-11-06  Brendan Long  <b.long@cablelabs.com>
1695
1696         [Gtk][EFL] Fix build after r158759
1697         https://bugs.webkit.org/show_bug.cgi?id=123910
1698
1699         Reviewed by Gyuyoung Kim.
1700
1701         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
1702         (WebKit::CoordinatedDrawingAreaProxy::incorporateUpdate): Remove call to flashBackingStoreUpdates().
1703
1704 2013-11-06  Tim Horton  <timothy_horton@apple.com>
1705
1706         Remote Layer Tree: RemoteLayerTreeDrawingArea doesn't make layers for fixedpos elements
1707         https://bugs.webkit.org/show_bug.cgi?id=123943
1708
1709         Reviewed by Simon Fraser.
1710
1711         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1712         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1713         (WebKit::RemoteLayerTreeDrawingArea::updatePreferences):
1714         Make fixed position elements create compositing layers and stacking contexts
1715         in the RemoteLayerTreeDrawingArea just like they do in TiledCoreAnimationDrawingArea.
1716
1717         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1718         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
1719         Fix the comment, since we have long since achieved this goal.
1720
1721 2013-11-06  Anders Carlsson  <andersca@apple.com>
1722
1723         Implement enough functionality so that NSURLRequest objects can be decoded
1724         https://bugs.webkit.org/show_bug.cgi?id=123942
1725
1726         Reviewed by Andreas Kling.
1727
1728         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1729         (-[WKRemoteObjectEncoder requiresSecureCoding]):
1730         Add new method. Return YES.
1731
1732         (-[WKRemoteObjectDecoder decodeValueOfObjCType:at:]):
1733         Add new method. This currently only handles 'i', but we'll add more variants as needed.
1734
1735         (-[WKRemoteObjectDecoder decodeBoolForKey:]):
1736         Get a WebBoolean from the dictionary and return its value.
1737
1738 2013-11-06  Anders Carlsson  <andersca@apple.com>
1739
1740         Encoded object stream should be sequential
1741         https://bugs.webkit.org/show_bug.cgi?id=123939
1742
1743         Reviewed by Andreas Kling.
1744
1745         Reserve space in the object stream for objects that are to be encoded, otherwise
1746         the object stream will not be sequential.
1747
1748         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1749         (encodeToObjectStream):
1750         * Shared/ImmutableArray.h:
1751         (WebKit::ImmutableArray::entries):
1752
1753 2013-11-06  Anders Carlsson  <andersca@apple.com>
1754
1755         Allow property list classes to exist in containers
1756         https://bugs.webkit.org/show_bug.cgi?id=123938
1757
1758         Reviewed by Andreas Kling.
1759
1760         * Shared/API/Cocoa/WKRemoteObjectInterface.mm:
1761         (isContainerClass):
1762         Return whether a given class is a container class.
1763
1764         (propertyListClasses):
1765         Return the set of property list classes.
1766
1767         (allowedArgumentClassesForMethod):
1768         Allow all property list classes for container type arguments.
1769
1770 2013-11-06  Daniel Bates  <dabates@apple.com>
1771
1772         [iOS] Upstream Letterpress effect
1773         https://bugs.webkit.org/show_bug.cgi?id=123932
1774
1775         Reviewed by Sam Weinig.
1776
1777         Add feature define ENABLE_LETTERPRESS disabled by default. We only enable
1778         letterpress on iOS.
1779
1780         * Configurations/FeatureDefines.xcconfig:
1781
1782 2013-11-06  Dan Bernstein  <mitz@apple.com>
1783
1784         Fixed multiple API test failures after r158764.
1785
1786         Reviewed by Sam Weinig.
1787
1788         * UIProcess/API/mac/WKBrowsingContextController.mm:
1789         (setUpPagePolicyClient): If the delegate isn’t set or doesn’t respond to a selector, respond
1790         with WKFramePolicyListenerUse().
1791
1792 2013-11-06  Anders Carlsson  <andersca@apple.com>
1793
1794         Move allowed classes handling to decodeObject
1795         https://bugs.webkit.org/show_bug.cgi?id=123930
1796
1797         Reviewed by Andreas Kling.
1798
1799         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1800         (decodeObjectFromObjectStream):
1801         Pass allowed classes through to decodeObject.
1802
1803         (decodeObject):
1804         Update to take an NSSet of allowed classes. If the set is nil, use the current set.
1805
1806         (-[WKRemoteObjectDecoder decodeObjectOfClasses:forKey:]):
1807         Pass classes to decodeObject.
1808
1809 2013-11-06  Sergio Correia  <sergio.correia@openbossa.org>
1810
1811         Fix EFL build after r158753
1812         https://bugs.webkit.org/show_bug.cgi?id=123923
1813
1814         r158753 renamed WKNavigationData.h as WKNavigationDataRef.h, so
1815         update it in UIProcess/API/efl/ewk_navigation_data_private.h.
1816
1817         Reviewed by Csaba Osztrogonác.
1818
1819         * UIProcess/API/efl/ewk_navigation_data_private.h:
1820
1821 2013-11-06  Anders Carlsson  <andersca@apple.com>
1822
1823         Implement more decoding methods
1824         https://bugs.webkit.org/show_bug.cgi?id=123922
1825
1826         Reviewed by Dan Bernstein.
1827
1828         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1829         (-[WKRemoteObjectDecoder decodeObjectForKey:]):
1830         Call decodeObjectOfClasses:forKey: passing nil as the classes set.
1831
1832         (-[WKRemoteObjectDecoder decodeInt64ForKey:]):
1833         Try to get a WebUInt64 and return its value.
1834
1835         (-[WKRemoteObjectDecoder decodeDoubleForKey:]):
1836         Try to get a WebDouble and return its value.
1837
1838         (-[WKRemoteObjectDecoder decodeBytesForKey:returnedLength:]):
1839         Move this method next to the other decoding methods.
1840
1841         (-[WKRemoteObjectDecoder requiresSecureCoding]):
1842         Ditto.
1843
1844 2013-11-06  Brendan Long  <b.long@cablelabs.com>
1845
1846         [Gtk][EFL] Fix build after r158759
1847         https://bugs.webkit.org/show_bug.cgi?id=123910
1848
1849         Reviewed by Gustavo Noronha Silva.
1850
1851         * UIProcess/API/gtk/PageClientImpl.cpp: Remove flashBackingStoreUpdates().
1852         * UIProcess/API/gtk/PageClientImpl.h: Same.
1853         * UIProcess/CoordinatedGraphics/WebView.cpp: Same.
1854         * UIProcess/CoordinatedGraphics/WebView.h: Same.
1855         * UIProcess/DrawingAreaProxyImpl.cpp:
1856         (WebKit::DrawingAreaProxyImpl::incorporateUpdate): Don't call flashBackingStoreUpdates().
1857
1858 2013-11-06  Jer Noble  <jer.noble@apple.com>
1859
1860         Unreviewed Mac build fix; include ResourceResponse.
1861
1862         * Shared/WebNavigationDataStore.h:
1863
1864 2013-11-06  Anders Carlsson  <andersca@apple.com>
1865
1866         Decode invocation arguments
1867         https://bugs.webkit.org/show_bug.cgi?id=123917
1868
1869         Reviewed by Sam Weinig.
1870
1871         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1872         (-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:WebKit::]):
1873         Initialize the object stream.
1874
1875         (decodeObjectFromObjectStream):
1876         Check that we're not reading past the end of the stream, then decode the object.
1877
1878         (decodeInvocationArguments):
1879         Decode arguments from the object stream.
1880
1881         (decodeInvocation):
1882         Call decodeInvocationArguments and set up the selector argument.
1883         
1884         * Shared/ImmutableArray.h:
1885         (WebKit::ImmutableArray::at):
1886         (WebKit::ImmutableArray::size):
1887         (WebKit::ImmutableArray::entries):
1888         Constify.
1889
1890 2013-11-06  Dan Bernstein  <mitz@apple.com>
1891
1892         [Cocoa] Add -[WKNavigationData response]
1893         https://bugs.webkit.org/show_bug.cgi?id=123918
1894
1895         Reviewed by Sam Weinig.
1896
1897         * Shared/WebNavigationDataStore.h: Added a ResourceResponse data member.
1898         (WebKit::WebNavigationDataStore::encode): Encode the response.
1899         (WebKit::WebNavigationDataStore::decode): Decode the response.
1900         * UIProcess/Cocoa/WKNavigationData.h: Declared new property.
1901         * UIProcess/Cocoa/WKNavigationData.mm:
1902         (-[WKNavigationData response]): Added.
1903         * UIProcess/WebNavigationData.h:
1904         (WebKit::WebNavigationData::response): Added.
1905         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1906         (WebKit::WebFrameLoaderClient::updateGlobalHistory): Set the response in the data store.
1907
1908 2013-11-06  Sam Weinig  <sam@webkit.org>
1909
1910         Fix the 32-bit build.
1911
1912         * UIProcess/API/mac/WKBrowsingContextController.h:
1913         * UIProcess/API/mac/WKBrowsingContextController.mm:
1914         (-[WKBrowsingContextController dealloc]):
1915         (-[WKBrowsingContextController _initWithPageRef:]):
1916
1917 2013-11-06  Dan Bernstein  <mitz@apple.com>
1918
1919         [Cocoa] Add -[WKBrowsingContextController unreachableURL]
1920         https://bugs.webkit.org/show_bug.cgi?id=123909
1921
1922         Reviewed by Anders Carlsson.
1923
1924         * UIProcess/API/mac/WKBrowsingContextController.h: Declared unreachableURL property.
1925         * UIProcess/API/mac/WKBrowsingContextController.mm:
1926         (-[WKBrowsingContextController unreachableURL]): Added.
1927         * UIProcess/WebPageProxy.cpp:
1928         (WebKit::WebPageProxy::unreachableURL): Added.
1929         * UIProcess/WebPageProxy.h:
1930
1931 2013-11-06  Anders Carlsson  <andersca@apple.com>
1932
1933         Encode parameters as objects
1934         https://bugs.webkit.org/show_bug.cgi?id=123912
1935
1936         Reviewed by Beth Dakin.
1937
1938         We want to ensure that the objects have the right types when decoded, so just encode them as objects.
1939
1940         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1941         (encodeInvocation):
1942         (-[WKRemoteObjectEncoder encodeValueOfObjCType:at:]):
1943
1944 2013-11-06  Sam Weinig  <sam@webkit.org>
1945
1946         Add WKBrowsingContextPolicyDelegate
1947         https://bugs.webkit.org/show_bug.cgi?id=123904
1948
1949         Reviewed by Anders Carlsson.
1950
1951         * UIProcess/API/mac/WKBrowsingContextController.h:
1952         * UIProcess/API/mac/WKBrowsingContextController.mm:
1953         Implement a WKPagePolicyClient in terms of the new WKBrowsingContextPolicyDelegate protocol.
1954         
1955         * UIProcess/API/mac/WKBrowsingContextPolicyDelegate.h: 
1956         Added.
1957
1958         * UIProcess/API/mac/WebKit2.h:
1959         Add new #include of WKBrowsingContextPolicyDelegate.h
1960
1961         * WebKit2.xcodeproj/project.pbxproj:
1962         Add new file.
1963
1964 2013-11-06  Anders Carlsson  <andersca@apple.com>
1965
1966         WKRemoteObjectInterface should keep track of allowed decodable classes
1967         https://bugs.webkit.org/show_bug.cgi?id=123903
1968
1969         Reviewed by Sam Weinig.
1970
1971         * Shared/API/Cocoa/WKRemoteObjectInterface.mm:
1972         (allowedArgumentClassesForMethod):
1973         Helper function that returns a vector of sets of allowed classes for each method argument.
1974
1975         (initializeAllowedArgumentClasses):
1976         Iterate over the methods in the protocol, get the extended method type encoding and create an
1977         NSMethodSignature from it. Finally, pass the signature to allowedArgumentClassesForMethod.
1978
1979         (initializeAllowedArgumentClasses):
1980         Call the other initializeAllowedArgumentClasses twice, once for required methods,
1981         and once for optional methods.
1982
1983         (-[WKRemoteObjectInterface initWithProtocol:identifier:]):
1984         Call initializeAllowedArgumentClasses.
1985
1986         (-[WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
1987         Add new getter.
1988
1989         * Shared/API/Cocoa/WKRemoteObjectInterfaceInternal.h:
1990
1991 2013-11-06  Anders Carlsson  <andersca@apple.com>
1992
1993         Remove dead code
1994         https://bugs.webkit.org/show_bug.cgi?id=123902
1995
1996         Reviewed by Tim Horton.
1997
1998         Remove the PageClient::containingWindowGraphicsContext() as well as the
1999         WKPageSetDebugPaintFlags and WKPageGetDebugPaintFlags API functions.
2000
2001         * UIProcess/API/C/WKPage.cpp:
2002         * UIProcess/API/mac/PageClientImpl.h:
2003         * UIProcess/API/mac/PageClientImpl.mm:
2004         * UIProcess/PageClient.h:
2005         * UIProcess/WebPageProxy.cpp:
2006         * UIProcess/WebPageProxy.h:
2007         * UIProcess/mac/WebPageProxyMac.mm:
2008         (WebKit::WebPageProxy::searchTheWeb):
2009
2010 2013-11-06  Dan Bernstein  <mitz@apple.com>
2011
2012         Promoted WKBrowsingContextHistoryDelegate.h to private.
2013
2014         Rubber-stamped by Sam Weinig.
2015
2016         * WebKit2.xcodeproj/project.pbxproj:
2017
2018 2013-11-06  Dan Bernstein  <mitz@apple.com>
2019
2020         [Cocoa] History delegate
2021         https://bugs.webkit.org/show_bug.cgi?id=123837
2022
2023         Reviewed by Sam Weinig.
2024
2025         * Shared/Cocoa/APIObject.mm:
2026         (WebKit::APIObject::newObject): Allocate a WKNavigationData if the object is a
2027         WebNavigationData.
2028
2029         * Shared/Cocoa/WKNSString.h:
2030         (WebKit::wrapper): Added. Returns a WebString’s wrapper as an NSString.
2031
2032         * Shared/Cocoa/WKNSURL.h:
2033         (WebKit::wrapper): Added. Returns a WebURL’s wrapper as an NSURL.
2034
2035         * UIProcess/API/C/WKNavigationData.cpp: Renamed.
2036         * UIProcess/API/C/WKNavigationData.h: Renamed.
2037         * UIProcess/API/C/WKNavigationDataRef.cpp: Copied from Source/WebKit2/UIProcess/API/C/WKNavigationData.cpp.
2038         * UIProcess/API/C/WKNavigationDataRef.h: Copied from Source/WebKit2/UIProcess/API/C/WKNavigationData.h.
2039
2040         * UIProcess/API/mac/WKBrowsingContextController.h: Declared historyDelegate property.
2041
2042         * UIProcess/API/mac/WKProcessGroup.mm:
2043         (didNavigateWithNavigationData): Added history client callback that calls the browsing
2044         context’s history delegate.
2045         (didPerformClientRedirect): Ditto.
2046         (didPerformServerRedirect): Ditto.
2047         (didUpdateHistoryTitle): Ditto.
2048         (setUpHistoryClient): Added.
2049         (-[WKProcessGroup initWithInjectedBundleURL:]): Added call to setUpHistoryClient.
2050         (-[WKProcessGroup dealloc]): Clear the history client.
2051
2052         * UIProcess/Cocoa/WKBrowsingContextHistoryDelegate.h: Added.
2053
2054         * UIProcess/Cocoa/WKNavigationData.h: Added.
2055         * UIProcess/Cocoa/WKNavigationData.mm: Added.
2056         (-[WKNavigationData dealloc]): Calls the WebNavigationData destructor.
2057         (-[WKNavigationData title]): Added.
2058         (-[WKNavigationData originalRequest]): Added.
2059         (-[WKNavigationData destinationURL]): Added.
2060         (-[WKNavigationData _apiObject]): Returns the wrapped WebNavigationData.
2061         * UIProcess/Cocoa/WKNavigationDataInternal.h: Added.
2062         (WebKit::wrapper): Added. Returns a WebNavigationData’s wrapper as a WKNavigationData.
2063         * WebKit2.xcodeproj/project.pbxproj: Updated for renames and additions.
2064
2065 2013-11-05  Anders Carlsson  <andersca@apple.com>
2066
2067         Begin work on decoding invocations
2068         https://bugs.webkit.org/show_bug.cgi?id=123838
2069
2070         Reviewed by Dan Bernstein.
2071
2072         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2073         (encodeInvocation):
2074         Declare the type string and selector keys as constants.
2075
2076         (encodeObject):
2077         Make sure to encode the class name for NSInvocations as well.
2078
2079         (decodeInvocation):
2080         Figure out the local and remove method signatures and make sure that they are equal.
2081
2082         * Shared/API/Cocoa/WKRemoteObjectInterface.mm:
2083         (methodArgumentTypeEncodingForSelector):
2084         Helper function that returns the type encoding for a given selector.
2085
2086         (-[WKRemoteObjectInterface _methodSignatureForSelector:]):
2087         Helper function that returns a method signature for the method with the name referred to by selector.
2088
2089         * Shared/API/Cocoa/WKRemoteObjectInterfaceInternal.h: Added.
2090         Add internal header.
2091
2092         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
2093         (-[WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]):
2094         Pass the right object to the WKRemoteObjectDecoder initializer and decode the invocation.
2095
2096         * WebKit2.xcodeproj/project.pbxproj:
2097         Add internal header.
2098
2099 2013-11-05  Anders Carlsson  <andersca@apple.com>
2100
2101         WKRemoteObjectDecoder should know which interface it's decoding for
2102         https://bugs.webkit.org/show_bug.cgi?id=123833
2103
2104         Reviewed by Andreas Kling.
2105
2106         Move the interface identifier out into the root object body dictionary and make 
2107         the encoded invocation a sibling of it. That way we can look up the interface before
2108         creating the decoder.
2109         
2110         Also, manage exported objects and interfaces in a separate hash map.
2111
2112         * Shared/API/Cocoa/WKRemoteObjectCoder.h:
2113         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2114         (-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:WebKit::]):
2115         (decodeInvocation):
2116         (decodeObject):
2117         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
2118         (-[WKRemoteObjectRegistry registerExportedObject:interface:]):
2119         (-[WKRemoteObjectRegistry unregisterExportedObject:interface:]):
2120         (-[WKRemoteObjectRegistry _sendInvocation:interface:]):
2121         (-[WKRemoteObjectRegistry _handleMessageWithName:body:]):
2122         (-[WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]):
2123
2124 2013-11-05  Anders Carlsson  <andersca@apple.com>
2125
2126         Add support for decoding NSStrings
2127         https://bugs.webkit.org/show_bug.cgi?id=123829
2128
2129         Reviewed by Andreas Kling.
2130
2131         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2132         (encodeObject):
2133         (-[WKRemoteObjectDecoder allowsKeyedCoding]):
2134         Always return YES.
2135
2136         (-[WKRemoteObjectDecoder containsValueForKey:]):
2137         Look up the key in the current dictionary.
2138
2139         (-[WKRemoteObjectDecoder decodeBytesForKey:returnedLength:]):
2140         Try to get the WebData object and return its data + size.
2141
2142         (-[WKRemoteObjectDecoder requiresSecureCoding]):
2143         Return YES.
2144
2145         (checkIfClassIsAllowed):
2146         Check if the class or any of its superclasses are are allowed.
2147
2148         (validateClass):
2149         Call checkIfClassIsAllowed and validate that the class conforms to NSSecureCoding.
2150
2151         (decodeObject):
2152         Get the class name, verify that the class exists and is allowed. 
2153         Allocate and initialize an object using initWithCoder:.
2154
2155         (-[WKRemoteObjectDecoder decodeObjectOfClasses:forKey:]):
2156         Set the allowed classes, look up the object in _currentDictionary and call decodeObject.
2157
2158         (-[WKRemoteObjectDecoder allowedClasses]):
2159         Return _allowedClasses.
2160
2161         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
2162         (-[WKRemoteObjectRegistry _sendInvocation:interface:]):
2163         Declare interfaceIdentifier as a constant.
2164
2165         (-[WKRemoteObjectRegistry _invokeMessageWithBody:]):
2166         Decode the interface identifier.
2167
2168         * Shared/ImmutableDictionary.h:
2169         (WebKit::ImmutableDictionary::get):
2170         (WebKit::ImmutableDictionary::size):
2171         (WebKit::ImmutableDictionary::map):
2172         Make member functions const.
2173
2174 2013-11-05  Benjamin Poulain  <benjamin@webkit.org>
2175
2176         Fix Mountain Lion Debug bot after r158689
2177
2178         Unreviewed.
2179
2180         It looks like WebGeolocationManagerProxy::stopUpdating() and WebGeolocationManagerProxy::processDidClose()
2181         are racing in some cases, causing the assertion to fail.
2182
2183         That case is handled properly in the last if() branch of WebGeolocationManagerProxy::removeRequester().
2184         This patch remove the overzealous assertion.
2185
2186         * UIProcess/WebGeolocationManagerProxy.cpp:
2187         (WebKit::WebGeolocationManagerProxy::removeRequester):
2188
2189 2013-11-05  Tim Horton  <timothy_horton@apple.com>
2190
2191         Remote Layer Tree: Apply layer changes to LayerTypeCustom layers to the custom layer in the Web process, not to the CALayerHost
2192         https://bugs.webkit.org/show_bug.cgi?id=123818
2193
2194         Reviewed by Anders Carlsson.
2195
2196         Changes to the properties of a PlatformCALayer of type LayerTypeCustom are intended
2197         to affect the custom CALayer; however, we were bundling them up with the transaction
2198         and applying them to the CALayerHost, leading to important properties being lost.
2199
2200         Instead, apply them to the Web-process-side CALayer when building the transaction.
2201
2202         * Shared/mac/RemoteLayerTreePropertyApplier.h: Added.
2203         * Shared/mac/RemoteLayerTreePropertyApplier.mm: Added.
2204         (WebKit::cgColorFromColor):
2205         (WebKit::toCAFilterType):
2206         (WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
2207         (WebKit::RemoteLayerTreePropertyApplier::disableActionsForLayer):
2208         Move code to apply LayerProperties to a CALayer from RemoteLayerTreeHost.
2209         Move code to disable actions on a CALayer from RemoteLayerTreeHost.
2210
2211         * UIProcess/mac/RemoteLayerTreeHost.mm:
2212         (WebKit::RemoteLayerTreeHost::commit):
2213         (WebKit::RemoteLayerTreeHost::createLayer):
2214         Use RemoteLayerTreePropertyApplier.
2215         Hand it a map of LayerID->CALayer so that it can look up related layers
2216         for children and mask layers.
2217
2218         * WebKit2.xcodeproj/project.pbxproj:
2219         Add RemoteLayerTreePropertyApplier.{h,mm}
2220
2221         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2222         (PlatformCALayerRemote::recursiveBuildTransaction):
2223         Upon commit, apply changes to LayerTypeCustom layers to the platform layer.
2224         Setting children or maskLayer won't work, since we don't know about other raw CALayers.
2225         This is OK, since nothing uses those properties on custom layers.
2226
2227         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.cpp:
2228         (PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
2229         Disable actions on the root custom layer.
2230
2231 2013-11-05  Anders Carlsson  <andersca@apple.com>
2232
2233         Begin work on a WKRemoteObjectDecoder object
2234         https://bugs.webkit.org/show_bug.cgi?id=123819
2235
2236         Reviewed by Dan Bernstein.
2237
2238         * Shared/API/Cocoa/WKRemoteObjectCoder.h:
2239         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2240         (-[WKRemoteObjectDecoder initWithRootObjectDictionary:]):
2241         Add designated initializer.
2242
2243         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
2244         (-[WKRemoteObjectRegistry _handleMessageWithName:body:]):
2245         If the message has the expected name and body type, pass it along to -_invokeMessageWithBody:.
2246
2247         (-[WKRemoteObjectRegistry _invokeMessageWithBody:]):
2248         Create a decoder.
2249
2250 2013-11-05  Benjamin Poulain  <benjamin@webkit.org>
2251
2252         [WK2] Add a WebKit2 API for Geolocation's highAccuracy
2253         https://bugs.webkit.org/show_bug.cgi?id=123786
2254
2255         Reviewed by Darin Adler.
2256
2257         This adds support for highAccuracy Geolocation with WebKit2.
2258
2259         The key is to track which page/requester need what kind of geolocation
2260         in order to change between high and low accuracy as pages run and disappear.
2261
2262         WebGeolocationManager and WebGeolocationManagerProxy have very similar roles
2263         but for different sources:
2264         -WebGeolocationManager tracks which live page require high accuracy geolocation.
2265          When the state changes, it forward the information to the UIProcess.
2266         -WebGeolocationManagerProxy tracks which WebContent processes needs high accuracy.
2267
2268         * Shared/APIClientTraits.cpp:
2269         * Shared/APIClientTraits.h:
2270         * UIProcess/API/C/WKGeolocationManager.h:
2271         * UIProcess/WebGeolocationManagerProxy.cpp:
2272         (WebKit::WebGeolocationManagerProxy::startUpdating):
2273         (WebKit::WebGeolocationManagerProxy::removeRequester):
2274         (WebKit::WebGeolocationManagerProxy::setEnableHighAccuracy):
2275         * UIProcess/WebGeolocationManagerProxy.h:
2276         (WebKit::WebGeolocationManagerProxy::isUpdating):
2277         (WebKit::WebGeolocationManagerProxy::isHighAccuracyEnabled):
2278         * UIProcess/WebGeolocationManagerProxy.messages.in:
2279         * UIProcess/WebGeolocationProvider.cpp:
2280         (WebKit::WebGeolocationProvider::setEnableHighAccuracy):
2281         * UIProcess/WebGeolocationProvider.h:
2282         * WebProcess/Geolocation/WebGeolocationManager.cpp:
2283         (WebKit::WebGeolocationManager::registerWebPage):
2284         (WebKit::WebGeolocationManager::unregisterWebPage):
2285         (WebKit::WebGeolocationManager::setEnableHighAccuracyForPage):
2286         * WebProcess/Geolocation/WebGeolocationManager.h:
2287         (WebKit::WebGeolocationManager::isUpdating):
2288         (WebKit::WebGeolocationManager::isHighAccuracyEnabled):
2289         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
2290         (WebKit::WebGeolocationClient::setEnableHighAccuracy):
2291
2292 2013-11-05  Anders Carlsson  <andersca@apple.com>
2293
2294         Implement more NSCoder methods
2295         https://bugs.webkit.org/show_bug.cgi?id=123815
2296
2297         Reviewed by Dan Bernstein.
2298
2299         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2300         (encodeObject):
2301         Assert that object is not nil.
2302
2303         (createEncodedObject):
2304         Handle nil objects.
2305
2306         (-[WKRemoteObjectEncoder encodeValueOfObjCType:at:]):
2307         Call the right object stream encoding function based on the object type.
2308
2309         (-[WKRemoteObjectEncoder encodeBool:forKey:]):
2310         (-[WKRemoteObjectEncoder encodeInt64:forKey:]):
2311         (-[WKRemoteObjectEncoder encodeDouble:forKey:]):
2312         Create APIObjects and add them to the current dictionary.
2313
2314 2013-11-05  Anders Carlsson  <andersca@apple.com>
2315
2316         Encode the class name
2317         https://bugs.webkit.org/show_bug.cgi?id=123813
2318
2319         Reviewed by Dan Bernstein.
2320
2321         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2322         (encodeObject):
2323         Get the Class using -[NSObject classForCoder] and encode its name in the object dictionary.
2324
2325 2013-11-05  Anders Carlsson  <andersca@apple.com>
2326
2327         Clean up the WKRemoteObjectEncoder code
2328         https://bugs.webkit.org/show_bug.cgi?id=123811
2329
2330         Reviewed by Dan Bernstein.
2331
2332         Add a new object stream array to be used for the non-keyed encoding values
2333         and free functions for encoding values to the object stream. Simplify object encoding
2334         by moving the dictionary creation out into a separate function and ditching the block based methods.
2335
2336         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2337         (ensureObjectStream):
2338         Add helper function to create an object stream.
2339
2340         (encodeToObjectStream):
2341         Add overloads for encoding values into the object streams.
2342
2343         (encodeInvocation):
2344         Add helper function for encoding an NSInvocation.
2345
2346         (encodeObject):
2347         Call encodeInvocation if needed, otherwise just use encodeWithCoder:.
2348
2349         (createEncodedObject):
2350         Helper function that sets up a dictionary, encodes the object into the dictionary and then returns the dictionary.
2351
2352         (-[WKRemoteObjectEncoder encodeObject:forKey:]):
2353         Call createEncodedObject.    
2354
2355 2013-11-04  Brady Eidson  <beidson@apple.com>
2356
2357         IDB: Split backend Cursors and Transactions into their own files
2358         https://bugs.webkit.org/show_bug.cgi?id=123789
2359
2360         Reviewed by Alexey Proskuryakov.
2361
2362         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
2363         (WebKit::WebIDBFactoryBackend::createCursorBackend):
2364         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
2365
2366 2013-11-04  Alexey Proskuryakov  <ap@apple.com>
2367
2368         DumpRenderTree should reset its preferences file on launch
2369         https://bugs.webkit.org/show_bug.cgi?id=29751
2370
2371         Reviewed by Dan Bernstein.
2372
2373         * UIProcess/mac/WKFullKeyboardAccessWatcher.mm:
2374         (-[WKFullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
2375         Further fix reading of AppleKeyboardUIMode - reading it from kCFPreferencesAnyApplication
2376         domain meant that current application's domain was explcitly ignored, and the only
2377         way to override the setting in WTR was through argument domain.
2378
2379 2013-11-04  Tim Horton  <timothy_horton@apple.com>
2380
2381         Remote Layer Tree: Make LayerTypeCustom remote-host CALayers from the Web process
2382         https://bugs.webkit.org/show_bug.cgi?id=123766
2383
2384         Reviewed by Anders Carlsson.
2385
2386         Put each LayerTypeCustom layer into a CAContext, so that we can
2387         host small CALayer trees (for video, plugins, etc.) from the Web process
2388         to the UI process without proxying their (more complex) content.
2389
2390         * Shared/mac/RemoteLayerTreeTransaction.h:
2391         * Shared/mac/RemoteLayerTreeTransaction.mm:
2392         (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode):
2393         (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode):
2394         (WebKit::RemoteLayerTreeTransaction::dump):
2395         Store, encode, and dump the CAContext ID of custom layers.
2396
2397         * UIProcess/mac/RemoteLayerTreeHost.mm:
2398         (WebKit::RemoteLayerTreeHost::createLayer):
2399         Create a CALayerHost with the CAContext ID from the Web process.
2400
2401         * WebKit2.xcodeproj/project.pbxproj:
2402         Add PlatformCALayerRemoteCustom.
2403
2404         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
2405         (WebKit::GraphicsLayerCARemote::createPlatformCALayer):
2406         Call the newly-added custom-layer constructor.
2407
2408         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2409         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2410         (PlatformCALayerRemote::create):
2411         (PlatformCALayerRemote::PlatformCALayerRemote):
2412         Move the call to layerWasCreated() out to ::create(), so that all of
2413         the constructors for this class and all subclasses have completed
2414         before we call it (so that layerWasCreated() can store the context ID
2415         in the created layer properties object).
2416
2417         (WebKit::PlatformCALayerRemote::hostingContextID):
2418         Should never be reached on the base class, only PlatformCALayerRemoteCustom.
2419
2420         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.cpp: Added.
2421         (PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
2422         (PlatformCALayerRemoteCustom::~PlatformCALayerRemoteCustom):
2423         (PlatformCALayerRemoteCustom::hostingContextID):
2424         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h: Added.
2425         Add PlatformCALayerRemoteCustom, which owns a LayerHostingContext
2426         which it will use to share a custom CALayer tree with the UI process.
2427
2428         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
2429         Drive-by remove an unnecessary include.
2430
2431         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
2432         (WebKit::RemoteLayerTreeContext::layerWasCreated):
2433         Store the CAContext ID with the layer creation properties so it can
2434         be used to create a CALayerHost upon commit in the UI process.
2435
2436 2013-11-04  Tim Horton  <timothy_horton@apple.com>
2437
2438         Remove PlatformCALayer::playerLayer
2439         https://bugs.webkit.org/show_bug.cgi?id=123764
2440
2441         Reviewed by Sam Weinig.
2442
2443         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2444         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2445         Remove playerLayer().
2446
2447 2013-11-04  Anders Carlsson  <andersca@apple.com>
2448
2449         WKRemoteObjectEncoder should escape keys
2450         https://bugs.webkit.org/show_bug.cgi?id=123761
2451
2452         Reviewed by Tim Horton.
2453
2454         Keys that start with $ will be reserved for use by the coder, so prepend an extra
2455         $ to keys that already start with $ to avoid clashes.
2456
2457         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2458         (escapeKey):
2459         (-[WKRemoteObjectEncoder encodeBytes:length:forKey:]):
2460         (-[WKRemoteObjectEncoder _encodeObjectForKey:usingBlock:]):
2461
2462 2013-11-04  Benjamin Poulain  <bpoulain@apple.com>
2463
2464         [WK2] Update WebGeolocationManager to support multiple WebContent processes
2465         https://bugs.webkit.org/show_bug.cgi?id=123658
2466
2467         Reviewed by Anders Carlsson.
2468
2469         Change WebGeolocationManagerProxy to track which WebProcessProxy needs geolocation.
2470
2471         * UIProcess/WebContext.cpp:
2472         (WebKit::WebContext::disconnectProcess):
2473         WebContext::disconnectProcess does not handle ContextSupplement yet when using multiple
2474         WebContent processes. Add an explicit call for WebGeolocationManagerProxy as a temporary
2475         solution.
2476
2477         * UIProcess/WebGeolocationManagerProxy.cpp:
2478         (WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy):
2479         (WebKit::WebGeolocationManagerProxy::contextDestroyed):
2480         (WebKit::WebGeolocationManagerProxy::processDidClose):
2481         (WebKit::WebGeolocationManagerProxy::startUpdating):
2482         (WebKit::WebGeolocationManagerProxy::stopUpdating):
2483         (WebKit::WebGeolocationManagerProxy::removeRequester):
2484         * UIProcess/WebGeolocationManagerProxy.h:
2485         * UIProcess/WebGeolocationManagerProxy.messages.in:
2486
2487 2013-11-01  Jer Noble  <jer.noble@apple.com>
2488
2489         [PluginProxy] Add a setting to disable video plugin proxy support in HTMLMediaElement.
2490         https://bugs.webkit.org/show_bug.cgi?id=123621
2491
2492         Reviewed by Eric Carlson.
2493
2494         Add WebKit2 functions for setting then new isVideoPluginProxyEnabled preference.
2495
2496         * Shared/WebPreferencesStore.h:
2497         * UIProcess/API/C/WKPreferences.cpp:
2498         (WKPreferencesSetVideoPluginProxyEnabled):
2499         (WKPreferencesGetVideoPluginProxyEnabled):
2500         * UIProcess/API/C/WKPreferences.h:
2501         * WebProcess/WebPage/WebPage.cpp:
2502         (WebKit::WebPage::updatePreferences):
2503
2504 2013-11-04  Anders Carlsson  <andersca@apple.com>
2505
2506         More WKRemoteObjectRegistry work
2507         https://bugs.webkit.org/show_bug.cgi?id=123754
2508
2509         Reviewed by Dan Bernstein.
2510
2511         * Shared/API/Cocoa/WKRemoteObjectCoder.h:
2512         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2513         (-[WKRemoteObjectEncoder rootObjectDictionary]):
2514         Add a getter for the root object dictionary.
2515
2516         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
2517         (-[WKRemoteObjectRegistry _sendInvocation:interface:]):
2518         Call _sendMessageWithBody:.
2519         (-[WKRemoteObjectRegistry _sendMessageWithBody:]):
2520         Call WebConnection::postMessage.
2521
2522 2013-11-03  Dan Bernstein  <mitz@apple.com>
2523
2524         [Cocoa] Wrappers' -copyWithZone: should copy if the collection is mutable
2525         https://bugs.webkit.org/show_bug.cgi?id=123707
2526
2527         Reviewed by Geoff Garen and Anders Carlsson.
2528
2529         * Shared/Cocoa/WKNSArray.mm:
2530         (-[WKNSArray copyWithZone:]): If the array is mutable, make a copy.
2531         * Shared/Cocoa/WKNSDictionary.mm:
2532         (-[WKNSDictionary copyWithZone:]): If the dictionary is mutable, make a copy.
2533         * Shared/ImmutableArray.h:
2534         (WebKit::ImmutableArray::entries): Added this accessor.
2535
2536 2013-11-03  Dan Bernstein  <mitz@apple.com>
2537
2538         Reverted r158538.
2539
2540         * Shared/Cocoa/WKNSArray.mm:
2541         (-[WKNSArray copyWithZone:]):
2542         * Shared/Cocoa/WKNSDictionary.mm:
2543         (-[WKNSDictionary copyWithZone:]):
2544         * Shared/ImmutableArray.h:
2545
2546 2013-11-03  Dan Bernstein  <mitz@apple.com>
2547
2548         [Cocoa] Wrappers' -copyWithZone: should copy if the collection is mutable
2549         https://bugs.webkit.org/show_bug.cgi?id=123707
2550
2551         Reviewed by Geoff Garen.
2552
2553         * Shared/Cocoa/WKNSArray.mm:
2554         (-[WKNSArray copyWithZone:]): If the array is mutable, make a copy.
2555         * Shared/Cocoa/WKNSDictionary.mm:
2556         (-[WKNSDictionary copyWithZone:]): If the dictionary is mutable, make a copy.
2557         * Shared/ImmutableArray.h:
2558         (WebKit::ImmutableArray::entries): Added this accessor.
2559
2560 2013-11-02  Dan Bernstein  <mitz@apple.com>
2561
2562         [Cocoa] Wrappers mishandle NULL values in arrays and dictionaries
2563         https://bugs.webkit.org/show_bug.cgi?id=123671
2564
2565         Reviewed by Darin Adler.
2566
2567         * Shared/Cocoa/WKNSArray.mm:
2568         (-[WKNSArray objectAtIndex:]): Represent a NULL object as NSNull.
2569         * Shared/Cocoa/WKNSDictionary.mm:
2570         (-[WKNSDictionary objectForKey:]): Represent a NULL value as NSNull.
2571         * Shared/ImmutableDictionary.h:
2572         (WebKit::ImmutableDictionary::get): Added this overload that returns whether the key exists.
2573
2574 2013-11-02  Dan Bernstein  <mitz@apple.com>
2575
2576         Fixed release builds.
2577
2578         * Shared/Cocoa/WKNSDictionary.mm:
2579         (-[WKNSDictionary initWithObjects:forKeys:count:]):
2580
2581 2013-11-02  Dan Bernstein  <mitz@apple.com>
2582
2583         [Cocoa] Add WKNSDictionary
2584         https://bugs.webkit.org/show_bug.cgi?id=123660
2585
2586         Reviewed by Anders Carlsson.
2587
2588         * Shared/Cocoa/APIObject.mm:
2589         (WebKit::APIObject::newObject): Allocate a WKNSDictionary if the APIObject is a dictionary.
2590         * Shared/Cocoa/WKNSDictionary.h: Added.
2591         (WebKit::wrapper):  Added. Returns an ImmutableDictionary’s wrapper as an NSDictionary.
2592         * Shared/Cocoa/WKNSDictionary.mm: Added.
2593         (-[WKNSDictionary dealloc]): Calls the ImmutableDictionary destructor.
2594         (-[WKNSDictionary count]): Added.
2595         (-[WKNSDictionary objectForKey:]): Added.
2596         (-[WKNSDictionary keyEnumerator]): Added.
2597         (-[WKNSDictionary copyWithZone:]): Retains self.
2598         (-[WKNSDictionary _apiObject]): Returns the wrapped ImmutableDictionary.
2599         * WebKit2.xcodeproj/project.pbxproj: Added references to new files.
2600
2601 2013-11-02  Tim Horton  <timothy_horton@apple.com>
2602
2603         Address some review comments noted in r158463
2604         https://bugs.webkit.org/show_bug.cgi?id=123646
2605
2606         Reviewed by Darin Adler.
2607
2608         * Shared/mac/RemoteLayerBackingStore.mm:
2609         Put our __has_include ifs all on one line.
2610
2611         (createIOSurface):
2612         IOSurfaceAlignProperty returns size_t, not unsigned long.
2613
2614         (RemoteLayerBackingStore::display):
2615         (RemoteLayerBackingStore::drawInContext):
2616         Create the frontImage in display() and hand it to drawInContext().
2617
2618         Use the GraphicsContext API instead of CG itself for clearRect().
2619
2620         When using ShareableBitmap, replace m_frontBuffer instead of
2621         having a backBuffer local; the CGImageRef will retain the
2622         ShareableBitmap it references.
2623
2624         Duplicate our drawInContext() calls so we don't have to allocate
2625         a GraphicsContext on the heap in the IOSurface case.
2626
2627         Don't bother clearing frontContext; it'll happen for us at
2628         the appropriate time. Instead, assert that it's still alive after
2629         we drop our reference to the frontImage created from it.
2630
2631 2013-11-02  Zan Dobersek  <zdobersek@igalia.com>
2632
2633         [GTK] invalid use of incomplete type 'class WTF::PassOwnPtr<WTF::Vector<unsigned char> >'
2634         https://bugs.webkit.org/show_bug.cgi?id=123601
2635
2636         Reviewed by Carlos Garcia Campos.
2637
2638         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: Explicitly include the PassOwnPtr.h header
2639         as certain configurations on the GTK port don't ensure that the header is included indirectly.
2640
2641 2013-11-02  Vitaly Katunin  <vkatunin@luxoft.com>
2642
2643         [GTK] invalid application of 'sizeof' to incomplete type
2644         https://bugs.webkit.org/show_bug.cgi?id=123502
2645
2646         Reviewed by Carlos Garcia Campos.
2647
2648         * Shared/WebCoreArgumentCoders.cpp:
2649
2650 2013-11-01  Tim Horton  <timothy_horton@apple.com>
2651
2652         Remote Layer Tree: Crashes allocating incredibly large backing store for tiled backing layers
2653         https://bugs.webkit.org/show_bug.cgi?id=123651
2654
2655         Reviewed by Simon Fraser.
2656
2657         * Shared/mac/RemoteLayerBackingStore.mm:
2658         (RemoteLayerBackingStore::display):
2659         (RemoteLayerBackingStore::drawInContext):
2660         We can't dirty the whole layer if we have no existing front buffer if
2661         we have no paints, because that will lead to layers which were never
2662         setNeedsDisplay()'d getting backing store. Added back an assertion
2663         that will catch this, too.
2664
2665 2013-11-01  Dan Bernstein  <mitz@apple.com>
2666
2667         [Cocoa] WKObject seems to be initializing its target in a thread-safe manner, but really is not
2668         https://bugs.webkit.org/show_bug.cgi?id=123640
2669
2670         Reviewed by Darin Adler.
2671
2672         * Shared/Cocoa/WKObject.mm:
2673         (initializeTargetIfNeeded): Removed misleading incorrect code.
2674
2675 2013-11-01  Benjamin Poulain  <benjamin@webkit.org>
2676
2677         [WK2] Create a unique identifier for WebPageGroup if the input name is empty
2678         https://bugs.webkit.org/show_bug.cgi?id=123606
2679
2680         Reviewed by Andreas Kling.
2681
2682         Strengthen the "public" API of page group.
2683         If someone uses WKBrowsingContextGroup with a nil or empty string, the related WKString
2684         would be empty, and all the WKBrowsingContextGroup end up with the same identifier.
2685
2686         * UIProcess/WebPageGroup.cpp:
2687         (WebKit::WebPageGroup::WebPageGroup):
2688
2689 2013-11-01  Dan Bernstein  <mitz@apple.com>
2690
2691         [Cocoa] Avoid some double-wrapping of strings and URLs
2692         https://bugs.webkit.org/show_bug.cgi?id=123632
2693
2694         Reviewed by Anders Carlsson.
2695
2696         * Shared/API/c/cf/WKStringCF.cpp: Removed.
2697         * Shared/API/c/cf/WKStringCF.mm: Copied from Source/WebKit2/Shared/API/c/cf/WKStringCF.cpp.
2698         (wkNSStringClass): Added this helper.
2699         (WKStringCreateWithCFString): If the passed-in CFString is already wrapping a WebString,
2700         then retain it and return it.
2701         * Shared/API/c/cf/WKURLCF.cpp: Removed.
2702         * Shared/API/c/cf/WKURLCF.mm: Copied from Source/WebKit2/Shared/API/c/cf/WKURLCF.cpp.
2703         (wkNSURLClass): Added this helper.
2704         (WKURLCreateWithCFURL): If the passed-in CFURL is already wrapping a WebURL, then retain it
2705         and return it.
2706         * WebKit2.xcodeproj/project.pbxproj: Updated for renames.
2707
2708 2013-11-01  Anders Carlsson  <andersca@apple.com>
2709
2710         Begin work on encoding argument types
2711         https://bugs.webkit.org/show_bug.cgi?id=123631
2712
2713         Reviewed by Dan Bernstein.
2714
2715         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2716         (-[WKRemoteObjectEncoder _encodeInvocation:forKey:]):
2717         Encode argument types in an array.
2718
2719         (-[WKRemoteObjectEncoder _encodedObjectUsingBlock:]):
2720         Add new helper method that encodes an object and returns the dictionary.
2721
2722         (-[WKRemoteObjectEncoder _encodeObjectForKey:usingBlock:]):
2723         Implement this in terms of _encodedObjectUsingBlock:.
2724
2725         * Shared/MutableArray.cpp:
2726         (WebKit::MutableArray::append):
2727         * Shared/MutableArray.h:
2728         Change append to take a PassRefPtr.
2729
2730 2013-10-31  Gavin Barraclough  <barraclough@apple.com>
2731
2732         Rename InWindowState -> ViewState
2733         https://bugs.webkit.org/show_bug.cgi?id=123584
2734
2735         Rubber stamped by Sam Weinig.
2736
2737         WebPageProxy::setViewState offers the option to wait for a reply. Previously this option
2738         was only available via setIsInWindow, hence the mechanism to wait to the update has
2739         'InWindowState' in method and variable names (i.e.
2740         'WebPageProxy::waitForDidUpdateInWindowState'). Since the mechanism is now applicable to
2741         all ViewState changes, rename to reflect this.
2742
2743         * UIProcess/API/mac/WKView.mm:
2744         (-[WKView endDeferringViewInWindowChangesSync]):
2745         * UIProcess/WebPageProxy.cpp:
2746         (WebKit::WebPageProxy::WebPageProxy):
2747         (WebKit::WebPageProxy::waitForDidUpdateViewState):
2748         (WebKit::WebPageProxy::resetStateAfterProcessExited):
2749         * UIProcess/WebPageProxy.h:
2750         (WebKit::WebPageProxy::didUpdateViewState):
2751         * UIProcess/WebPageProxy.messages.in:
2752         * WebProcess/WebPage/WebPage.cpp:
2753         (WebKit::WebPage::WebPage):
2754         (WebKit::WebPage::didUpdateViewStateTimerFired):
2755         (WebKit::WebPage::setViewState):
2756         * WebProcess/WebPage/WebPage.h:
2757         * WebProcess/WebPage/WebPage.messages.in:
2758         * WebProcess/WebPage/mac/WebPageMac.mm:
2759         (WebKit::WebPage::didUpdateViewStateTimerFired):
2760
2761 2013-11-01  Tim Horton  <timothy_horton@apple.com>
2762
2763         Remote Layer Tree: Move RemoteLayerBackingStore to Shared/
2764         https://bugs.webkit.org/show_bug.cgi?id=123646
2765
2766         Reviewed by Darin Adler.
2767
2768         Move RemoteLayerBackingStore to Shared/, since it is
2769         used on both the UI and Web process side of things.
2770
2771         * Shared/mac/RemoteLayerBackingStore.h: Renamed from Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.h.
2772         * Shared/mac/RemoteLayerBackingStore.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.mm.
2773         * WebKit2.xcodeproj/project.pbxproj:
2774
2775 2013-11-01  Tim Horton  <timothy_horton@apple.com>
2776
2777         Remote Layer Tree: Vend layer contents via IOSurfaces
2778         https://bugs.webkit.org/show_bug.cgi?id=123600
2779
2780         Reviewed by Anders Carlsson.
2781
2782         Address some review comments from Darin (and subsequently Anders).
2783
2784         * WebProcess/WebPage/mac/RemoteLayerBackingStore.h:
2785         (WebKit::RemoteLayerBackingStore::surface):
2786         No need for .get() here.
2787
2788         * WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:
2789         (RemoteLayerBackingStore::ensureBackingStore):
2790         All on one line for readability.
2791
2792         (createIOSurfaceContext):
2793         This 'if' is meaningless.
2794
2795         (createIOSurface):
2796         No need for a RetainPtr here, the dictionary is autoreleased.
2797
2798         (RemoteLayerBackingStore::display):
2799         Snuggle 'context' up next to the other declarations.
2800
2801 2013-11-01  Anders Carlsson  <andersca@apple.com>
2802
2803         Don't use the C API in WKRemoteObjectCoder
2804         https://bugs.webkit.org/show_bug.cgi?id=123627
2805
2806         Reviewed by Dan Bernstein.
2807
2808         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2809         (-[WKRemoteObjectEncoder init]):
2810         (-[WKRemoteObjectEncoder encodeBytes:length:forKey:]):
2811         (-[WKRemoteObjectEncoder _encodeObjectForKey:usingBlock:]):
2812         * Shared/ImmutableDictionary.h:
2813         * Shared/MutableDictionary.cpp:
2814         (WebKit::MutableDictionary::add):
2815         (WebKit::MutableDictionary::set):
2816         * Shared/MutableDictionary.h:
2817
2818 2013-11-01  Emilio Pozuelo Monfort  <pochu27@gmail.com>
2819
2820         Fix build on non-linux platforms
2821         https://bugs.webkit.org/show_bug.cgi?id=123622
2822
2823         Reviewed by Darin Adler.
2824
2825         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2826
2827 2013-11-01  Brian Holt  <brian.holt@samsung.com>
2828
2829         [GTK] [WK2] Crash in webkitWebViewLoadFailedWithTLSErrors
2830         https://bugs.webkit.org/show_bug.cgi?id=123618
2831
2832         Reviewed by Mario Sanchez Prada.
2833
2834         The GOwnPtrSoup header was not included which meant that the
2835         specialization for GOwnPtr<SoupURI> was not used and instead the
2836         default freeOwnedGPtr which calls g_free is used and crashes.
2837
2838         * UIProcess/API/gtk/WebKitWebView.cpp:
2839
2840 2013-10-31  Tim Horton  <timothy_horton@apple.com>
2841
2842         Fix a typo/review comment from Dan, in http://trac.webkit.org/changeset/158413
2843
2844         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2845
2846 2013-10-31  Tim Horton  <timothy_horton@apple.com>
2847
2848         Remote Layer Tree: Vend layer contents via IOSurfaces
2849         https://bugs.webkit.org/show_bug.cgi?id=123600
2850
2851         Reviewed by Anders Carlsson.
2852
2853         * Configurations/WebKit2.xcconfig:
2854         Link WebKit2 against IOSurface.
2855
2856         * Shared/mac/RemoteLayerTreeTransaction.mm:
2857         (WebKit::dumpChangedLayers):
2858         Dump the size of the backing store instead of the pointer of its
2859         SharedBitmap, because that's slightly more useful.
2860
2861         * UIProcess/mac/RemoteLayerTreeHost.mm:
2862         (WebKit::RemoteLayerTreeHost::commit):
2863         If a layer's backing store uses accelerated drawing, hand the IOSurface
2864         to the CALayer for display.
2865
2866         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2867         (PlatformCALayerRemote::PlatformCALayerRemote):
2868         Initialize contentsScale to 1 to match CA. Other properties will follow.
2869
2870         (PlatformCALayerRemote::ensureBackingStore):
2871         Instead of replacing the RemoteLayerBackingStore when its properties
2872         change, allow it to update them on the fly. Replacing them caused
2873         us to throw away repaint rects when the accelerated drawing
2874         flag was flipped.
2875
2876         (PlatformCALayerRemote::acceleratesDrawing):
2877         (PlatformCALayerRemote::setAcceleratesDrawing):
2878         Store the accelerated drawing flag and mark it dirty when it changes.
2879
2880         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2881         * WebProcess/WebPage/mac/RemoteLayerBackingStore.h:
2882         (WebKit::RemoteLayerBackingStore::image):
2883         Rename bitmap() to image() and have it create a CGImageRef from
2884         the ShareableBitmap, ready for direct application to a CALayer.
2885
2886         (WebKit::RemoteLayerBackingStore::surface):
2887         Return a IOSurface ready for direct application to a CALayer.
2888
2889         (WebKit::RemoteLayerBackingStore::acceleratesDrawing):
2890         (WebKit::RemoteLayerBackingStore::hasFrontBuffer):
2891         Return whether or not we have a front buffer/surface.
2892
2893         * WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:
2894         Forward-declare some CGIOSurface SPI.
2895
2896         (RemoteLayerBackingStore::RemoteLayerBackingStore):
2897         (RemoteLayerBackingStore::ensureBackingStore):
2898         Throw away our front image and reset flags if needed.
2899
2900         (RemoteLayerBackingStore::encode):
2901         (RemoteLayerBackingStore::decode):
2902         En/decode the front surface instead of the ShareableBitmap if needed,
2903         using CoreIPC::MachPort. Destroy the port on receipt.
2904
2905         (createIOSurfaceContext):
2906         Create a CGIOSurfaceContext from an IOSurface.
2907
2908         (createIOSurface):
2909         Create an IOSurface of the given size.
2910
2911         (RemoteLayerBackingStore::image):
2912         Return a CGImageRef, if we're not using accelerated drawing.
2913         Moved from the header.
2914
2915         (RemoteLayerBackingStore::display):
2916         (RemoteLayerBackingStore::drawInContext):
2917         If using accelerated drawing, create and paint into an IOSurface.
2918         Reorganize some code to make the copying-from-the-front-image code
2919         work for both software and IOSurfaces.
2920         Flush the context when completed, to ensure that any asynchronous
2921         painting is complete before we vend the surface to the UI process.
2922
2923 2013-10-31  Anders Carlsson  <andersca@apple.com>
2924
2925         Begin stubbing out the WKRemoteObjectCoder NSCoder subclass
2926         https://bugs.webkit.org/show_bug.cgi?id=123596
2927
2928         Reviewed by Tim Horton.
2929
2930         * Shared/API/Cocoa/WKRemoteObject.mm:
2931         (-[WKRemoteObject forwardInvocation:]):
2932         Call through to the WKRemoteObjectRegistry.
2933
2934         * Shared/API/Cocoa/WKRemoteObjectCoder.h: Added.
2935         * Shared/API/Cocoa/WKRemoteObjectCoder.mm: Added.
2936         (-[WKRemoteObjectEncoder init]):
2937         Create a root WKDictionary.
2938
2939         (-[WKRemoteObjectEncoder dealloc]):
2940         Assert that the current dictionary is the root dictionary; that we're back where we started.
2941
2942         (-[WKRemoteObjectEncoder allowsKeyedCoding]):
2943         Return YES.
2944
2945         (-[WKRemoteObjectEncoder encodeObject:forKey:]):
2946         Check that the object is valid and then encode it.
2947
2948         (-[WKRemoteObjectEncoder _encodeInvocation:forKey:]):
2949         Encode the method type string and invocation selector.
2950
2951         (-[WKRemoteObjectEncoder encodeBytes:length:forKey:]):
2952         Create a WKDataRef and add it to the dictionary.
2953
2954         (-[WKRemoteObjectEncoder _encodeObjectForKey:usingBlock:]):
2955         Create a new dictionary and call the block.
2956
2957         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
2958         (-[WKRemoteObjectRegistry _sendInvocation:interface:]):
2959         Create an encoder and encode the invocation and interface.
2960
2961         * Shared/API/Cocoa/WKRemoteObjectRegistryInternal.h: Added.
2962         Add IPI header.
2963
2964         * WebKit2.xcodeproj/project.pbxproj:
2965         Add new files.
2966
2967 2013-10-31  Anders Carlsson  <andersca@apple.com>
2968
2969         Address review comments.
2970
2971         * Shared/API/Cocoa/WKRemoteObject.h:
2972         * Shared/API/Cocoa/WKRemoteObject.mm:
2973         (-[WKRemoteObject conformsToProtocol:]):
2974
2975 2013-10-31  Anders Carlsson  <andersca@apple.com>
2976
2977         Add a WKRemoteObject class
2978         https://bugs.webkit.org/show_bug.cgi?id=123586
2979
2980         Reviewed by Dan Bernstein.
2981
2982         * Shared/API/Cocoa/WKRemoteObject.h: Added.
2983         * Shared/API/Cocoa/WKRemoteObject.mm: Added.
2984         (-[WKRemoteObject _initWithObjectRegistry:interface:]):
2985         Add designated initializer.
2986
2987         (-[WKRemoteObject conformsToProtocol:]):
2988         Check if the interface protocol conforms to our protocol.
2989
2990         (methodArgumentTypeEncodingForSelector):
2991         Helper function that looks up a method in a given protocol and returns its type encoding.
2992
2993         (-[WKRemoteObject methodSignatureForSelector:]):
2994         Try to find the method argument type encoding for the given selector and return its NSMethodSignature.
2995
2996         (-[WKRemoteObject forwardInvocation:]):
2997         Add stub.
2998
2999         * Shared/API/Cocoa/WKRemoteObjectInterface.mm:
3000         Remove a newline.
3001
3002         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
3003         (-[WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
3004         Establish a mapping between interface identifiers and remote object proxies.
3005
3006         * WebKit2.xcodeproj/project.pbxproj:
3007
3008 2013-10-31  Alexey Proskuryakov  <ap@apple.com>
3009
3010         Enable WebCrypto on Mac
3011         https://bugs.webkit.org/show_bug.cgi?id=123587
3012
3013         Reviewed by Anders Carlsson.
3014
3015         * Configurations/FeatureDefines.xcconfig: Do it.
3016
3017 2013-10-31  Sergio Correia  <sergio.correia@openbossa.org>
3018
3019         [WK2] Convert SeccompFilters to using unique_ptr instead of OwnPtr/PassOwnPtr
3020         https://bugs.webkit.org/show_bug.cgi?id=122883
3021
3022         Reviewed by Darin Adler.
3023
3024         * Shared/linux/SeccompFilters/OpenSyscall.cpp:
3025         (WebKit::OpenSyscall::createFromOpenatContext):
3026         (WebKit::OpenSyscall::createFromCreatContext):
3027         (WebKit::OpenSyscall::execute):
3028         * Shared/linux/SeccompFilters/OpenSyscall.h:
3029         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
3030         (WebKit::SIGSYSHandler):
3031         (WebKit::SeccompBrokerClient::dispatch):
3032         (WebKit::SeccompBroker::runLoop):
3033         * Shared/linux/SeccompFilters/SigactionSyscall.cpp:
3034         (WebKit::SigactionSyscall::createFromContext):
3035         * Shared/linux/SeccompFilters/SigactionSyscall.h:
3036         * Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp:
3037         (WebKit::SigprocmaskSyscall::createFromContext):
3038         * Shared/linux/SeccompFilters/SigprocmaskSyscall.h:
3039         * Shared/linux/SeccompFilters/Syscall.cpp:
3040         (WebKit::Syscall::createFromContext):
3041         (WebKit::Syscall::createFromDecoder):
3042         (WebKit::SyscallResult::createFromDecoder):
3043         * Shared/linux/SeccompFilters/Syscall.h:
3044         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
3045
3046 2013-10-31  Gavin Barraclough  <barraclough@apple.com>
3047
3048         Change WebPage, WebPageProxy, WebPageCreationParameters to use ViewState
3049         https://bugs.webkit.org/show_bug.cgi?id=123379
3050
3051         Reviewed by Darin Adler.
3052
3053         Visibility state of the Page should be stored and communicated consistently.
3054
3055         Remove individual visibility flags from WebPageProxy, WebPageCreationParameters,
3056         and replace them with a ViewState, and add a ViewState member to WebPage.
3057         Merge together all messages that convey and individual aspect of the ViewState.
3058
3059         Restructure WebPageProxy::viewStateDidChange to break the operation down into
3060         three steps: 1) update m_viewState, 2) send the new ViewState to the WebProcess,
3061         and 3) perform any further work necessary in the UIProcess.
3062
3063         This patch fixes a problem that if the web process crashes m_isVisible &
3064         m_isInWindow in WebPageProxy were not updated, and could have held stale values
3065         on reattach.
3066
3067         In WebPage, add a new message to update the entire ViewState - diff the prior
3068         value against the new one to detect changes, call existing methods accordingly.
3069
3070         * Shared/ViewState.h:
3071             - Add constants 'Reset', 'AllFlags'
3072         * Shared/WebPageCreationParameters.cpp:
3073         (WebKit::WebPageCreationParameters::encode):
3074         (WebKit::WebPageCreationParameters::decode):
3075         * Shared/WebPageCreationParameters.h:
3076             - Removed boolean visibility flags, added viewState.
3077         * UIProcess/WebPageProxy.cpp:
3078         (WebKit::WebPageProxy::WebPageProxy):
3079             - Constructor calls updateViewState to initialize m_viewState.
3080         (WebKit::WebPageProxy::reattachToWebProcess):
3081             - ViewStaet is not updated while detatched; recalculate.
3082         (WebKit::WebPageProxy::initializeWebPage):
3083             - m_isVisible -> isViewVisible()
3084         (WebKit::WebPageProxy::updateViewState):
3085             - Added, update m_viewState by querying the page client.
3086         (WebKit::WebPageProxy::viewStateDidChange):
3087             - Restructured to use m_viewState, reordered to combine messages.
3088         (WebKit::WebPageProxy::creationParameters):
3089             - Removed boolean visibility flags, added viewState.
3090         * UIProcess/WebPageProxy.h:
3091         (WebKit::WebPageProxy::isInWindow):
3092         (WebKit::WebPageProxy::isViewVisible):
3093             - Removed boolean visibility flags, added viewState.
3094         * WebProcess/WebPage/WebPage.cpp:
3095         (WebKit::WebPage::WebPage):
3096             - initial state now passed as a ViewState.
3097         (WebKit::WebPage::setIsInWindow):
3098             - Remove code to send reply (this is handled by setViewState).
3099         (WebKit::WebPage::setViewState):
3100             - Set m_viewState - diff from prior & call methods to update.
3101         * WebProcess/WebPage/WebPage.h:
3102             - Added setViewState, m_viewState.
3103         * WebProcess/WebPage/WebPage.messages.in:
3104             - Add SetViewState, remove individual messages.
3105         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3106         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
3107             - initial state now passed as a ViewState.
3108
3109 2013-10-30  Gavin Barraclough  <barraclough@apple.com>
3110
3111         WebPageCreationParameters should be consistent in Window.open
3112         https://bugs.webkit.org/show_bug.cgi?id=123557
3113
3114         Reviewed by Sam Weinig.
3115
3116         When Window.open in called in WebKit2 the WebProcess sends a synchronous request to open
3117         a page (WebPageProxy::createNewPage). The UIProcess creates a WebpageProxy, and responds
3118         with instructions to the WebProcess to create the WebPage. The initial creation state of
3119         the WebPage is communicated to the WebProcess via two routes (firstly an asynchronous
3120         WebProcess::CreateWebPage message, and secondly in the synchronous response from
3121         WebPageProxy::createNewPage). Unfortunately these responses are inconsistent with each
3122         other. The creationParameters() for the page are calculated twice, and since the WKView
3123         will be added to a window between the async message being sent and the synchronous reply
3124         being returned the visibility state of the page can change.
3125
3126         To fix the inconsistency we can set the creation parameters at the point that the
3127         WebPageProxy is instantiated. This will result in a functional change that is web
3128         visible, since the page will initially be opened in a hidden/blurred state, and may
3129         later become visible/focussed. This change is consistent with the direction we want to
3130         evolve in. Whilst we will still probably require a synchronous message from the
3131         WebProcess to the UIProcess on Window.open, we'll probably make this return much earlier
3132         – having just created the WebPageProxy, but avoiding blocking the WebProcess over the
3133         client delegate callback that opens the new window.
3134
3135         This fix results in a layout test result change, due to the change in behavior (page is
3136         created blurred, and becomes focussed, resulting in a focus event being fired – rather
3137         than the window opening directly into a focussed state). This is reported as a
3138         progression (test is broken in WebKit1, fixed in WebKit2 after this change). In reality
3139         the test is actually slightly broken in DRT/test-runner – the test runs differently than
3140         in browser, since there is is no visible main window. In-browser this patch results in
3141         no change in behavior on dom/Window/mozilla-focus-blur.html (the affected test).
3142
3143         * UIProcess/WebPageProxy.cpp:
3144         (WebKit::WebPageProxy::initializeWebPage):
3145             - call initializeCreationParameters
3146         (WebKit::WebPageProxy::initializeCreationParameters):
3147             - calculate m_creationParameters
3148         * UIProcess/WebPageProxy.h:
3149         (WebKit::WebPageProxy::creationParameters):
3150             - Added m_creationParameters, initializeCreationParameters,
3151               creationParameters returns m_creationParameters
3152
3153 2013-10-31  Philippe Normand  <pnormand@igalia.com>
3154
3155         [WK2][GTK] enable-media-stream Setting
3156         https://bugs.webkit.org/show_bug.cgi?id=123145
3157
3158         Reviewed by Anders Carlsson.
3159
3160         * Shared/WebPreferencesStore.h: New MediaStreamEnabled boolean preference.
3161         * UIProcess/API/C/WKPreferences.cpp: MediaStreamEnabled getter and
3162         setter functions.
3163         (WKPreferencesSetMediaStreamEnabled):
3164         (WKPreferencesGetMediaStreamEnabled):
3165         * UIProcess/API/C/WKPreferences.h:
3166         * UIProcess/API/gtk/WebKitSettings.cpp: Add a enable-media-stream
3167         property to the GTK WebKitSettings class. It will act as a facade
3168         to the MediaStreamEnabled preference.
3169         (webKitSettingsSetProperty):
3170         (webKitSettingsGetProperty):
3171         (webkit_settings_class_init):
3172         (webkit_settings_get_enable_media_stream):
3173         (webkit_settings_set_enable_media_stream):
3174         * UIProcess/API/gtk/WebKitSettings.h:
3175         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
3176         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
3177         (testWebKitSettings): Test enable-media-stream websetting.
3178         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3179         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3180         Allow WKTR to override the MediaStreamEnabled preference.
3181         * WebProcess/WebPage/WebPage.cpp:
3182         (WebKit::WebPage::updatePreferences): Update MediaStreamEnabled
3183         along with the other settings.
3184
3185 2013-10-30  Brady Eidson  <beidson@apple.com>
3186
3187         IDB Database versions are uint64_t, not int64_t
3188         https://bugs.webkit.org/show_bug.cgi?id=123556
3189
3190         Reviewed by Alexey Proskuryakov.
3191
3192         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
3193         (WebKit::WebIDBFactoryBackend::open):
3194         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
3195
3196         * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp:
3197         (WebKit::WebProcessIDBDatabaseBackend::openConnection):
3198         * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h:
3199
3200 2013-10-30  Dan Bernstein  <mitz@apple.com>
3201
3202         Fixed a potential race condition around the initializtion of WKObject’s target.
3203
3204         Reviewed by Mark Rowe.
3205
3206         * Shared/Cocoa/WKObject.mm:
3207         (initializeTargetIfNeeded): Removed the early return if _target is non-nil. As Mark pointed
3208         out, when stores are reordered relative to other stores, it is possible for the early return
3209         to occur while the object _target is pointing to is not yet valid.
3210
3211 2013-10-30  Ryosuke Niwa  <rniwa@webkit.org>
3212
3213         Remove code for Mac Lion
3214         https://bugs.webkit.org/show_bug.cgi?id=123542
3215
3216         Reviewed by Anders Carlsson.
3217
3218
3219         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
3220         * UIProcess/API/mac/WKView.mm:
3221         (-[WKView viewWillMoveToWindow:]):
3222         * WebProcess/com.apple.WebProcess.sb.in:
3223
3224 2013-10-30  Dan Bernstein  <mitz@apple.com>
3225
3226         Try to fix the !WK_API_ENABLED Mac build.
3227
3228         * Shared/Cocoa/APIObject.mm:
3229
3230 2013-10-30  Dan Bernstein  <mitz@apple.com>
3231
3232         [Cocoa] Make all API objects have Cocoa wrappers, and delegate refcounting to those wrappers
3233         https://bugs.webkit.org/show_bug.cgi?id=123394
3234
3235         Reviewed by Darin Adler.
3236
3237         All wrappers conform to a new WKObject protocol and contain the wrapped object inline.
3238         APIObject-derived classes override operator new to call newObject, which allocates the
3239         wrapper and returns a pointer to the inline API object.
3240
3241         There are three kinds of wrapper classes: (a) classes that inherit directly from NSObject
3242         and implement their API by calling the wrapped object (example: WKBackForwardList),
3243         (b) internal classes that inherit from a class cluster, and implement the primitive methods
3244         of the class cluster by calling the wrapped object (example: WKNSArray), and (c) internal
3245         classes that inerit from the new WKObject class, and proxy to an object of some public type,
3246         which is created from the wrapped object (example: WKNSURL).
3247
3248         * Shared/APIObject.h:
3249         (WebKit::APIObject::wrapper): Added this getter.
3250         (WebKit::TypedAPIObject::operator new): Added override that calls newObject.
3251         * Shared/Cocoa/APIObject.mm: Added.
3252         (WebKit::APIObject::ref): Retains the wrapper.
3253         (WebKit::APIObject::deref): Releases the wrapper. When the wrapper is deallocated, it calls
3254         the API object destructor.
3255         (WebKit::APIObject::newObject): Allocates the wrapper and returns a pointer to the API
3256         object inside the wrapper.
3257
3258         * Shared/Cocoa/WKNSArray.h:
3259         (WebKit::wrapper): Added. Returns an ImmutableArray’s wrapper as an NSArray.
3260         Replaced the RefPtr<ImmutableArray> ivar with space for an ImmutableArray to live inside
3261         the wrapper.
3262         (-[WKNSArray dealloc]): Calls the ImmutableArray destructor.
3263         (-[WKNSArray count]): Updated for ivar change.
3264         (-[WKNSArray objectAtIndex:]): Ditto.
3265         (-[WKNSArray _apiObject]): Returns the wrapped ImmutableArray.
3266
3267         * Shared/Cocoa/WKNSObjectExtras.h: Removed.
3268         * Shared/Cocoa/WKNSObjectExtras.mm: Removed.
3269
3270         * Shared/Cocoa/WKNSString.h: Added.
3271         * Shared/Cocoa/WKNSString.mm: Added.
3272         (-[WKNSString _web_createTarget]): Override this WKObject method to create an NSString from
3273         the WebString.
3274         (-[WKNSString copyWithZone:]): Retains self.
3275
3276         * Shared/Cocoa/WKNSURL.h: Added.
3277         * Shared/Cocoa/WKNSURL.mm: Added.
3278         (-[WKNSURL _web_createTarget]): Override this WKObject method to create an NSURL from
3279         the WebURL.
3280         (-[WKNSURL copyWithZone:]): Retains self.
3281
3282         * Shared/Cocoa/WKObject.h: Added.
3283         * Shared/Cocoa/WKObject.mm: Added.
3284         (-[WKObject dealloc]): Calls the destructor of the wrapped object and releases the target
3285         object.
3286         (initializeTargetIfNeeded): Helper function. Tries to create the target exactly once.
3287         (-[WKObject isEqual:]): NSObject override that creates and compares to the target
3288         object if necessary.
3289         (-[WKObject hash]): NSObject override that creates and hashes the target object if
3290         there is one.
3291         (-[WKObject isKindOfClass:]): NSObject override that delegates to the target object.
3292         (-[WKObject isMemberOfClass:]): Ditto.
3293         (-[WKObject respondsToSelector:]): NSObject override that creates the target object if
3294         necessary and returns whether it or self responds to the selector.
3295         (-[WKObject conformsToProtocol:]): Similarly for protocols.
3296         (-[WKObject forwardingTargetForSelector:]): NSObject override that creates the target object
3297         if necessary and returns it as the target.
3298         (-[WKObject description]): NSObject override that creates the target object if necessary and
3299         forwards to it.
3300         (-[WKObject _web_createTarget]): Added. The base implementation returns nil.
3301         (-[WKObject _apiObject]): Returns the wrapped object.
3302
3303         * UIProcess/API/mac/WKBrowsingContextController.mm:
3304         (-[WKBrowsingContextController backForwardList]): Changed to return the existing wrapper.
3305         (didChangeBackForwardList): Changed to use existing wrappers.
3306
3307         Replaced the RefPtr<WebBackForwardList> ivar with space for a WebBackForwardList to live
3308         inside the wrapper.
3309         (-[WKBackForwardList dealloc]): Call the WebBackForwardList destructor.
3310         (toWKBackForwardListItem): Changed to us the existing wrapper.
3311         (-[WKBackForwardList currentItem]): Updated for ivar change.
3312         (-[WKBackForwardList backItem]): Ditto.
3313         (-[WKBackForwardList forwardItem]): Ditto.
3314         (-[WKBackForwardList itemAtIndex:]): Ditto.
3315         (-[WKBackForwardList backListCount]): Ditto.
3316         (-[WKBackForwardList forwardListCount]): Ditto,
3317         (-[WKBackForwardList backListWithLimit:]): Ditto, and also changed to use the
3318         ImmutableArray’s existing wrapper.
3319         (-[WKBackForwardList forwardListWithLimit:]): Ditto.
3320         (-[WKBackForwardList _apiObject]): Returns the WebBackForwardListItem.
3321         * UIProcess/Cocoa/WKBackForwardListInternal.h:
3322         (WebKit::wrapper): Added. Returns a WebBackForwardList’s wrapper as a WKBackForwardList.
3323
3324         * UIProcess/Cocoa/WKBackForwardListItem.mm:
3325         Replaced the RefPtr<WebBackForwardListItem> ivar with space for a WebBackForwardListItem to
3326         live inside the wrapper.
3327         (-[WKBackForwardListItem dealloc]): Call the WebBackForwardListItem destructor.
3328         (-[WKBackForwardListItem URL]): Updated for ivar change, and changed to make an NSURL
3329         directly instead of going through a wrapper.
3330         (-[WKBackForwardListItem title]): Updated for ivar change, and changed to use
3331         String’s operator NSString*.
3332         (-[WKBackForwardListItem originalURL]): Updated for ivar change, and changed to make an
3333         NSURL directly instead of going through a wrapper.
3334         (-[WKBackForwardListItem _apiObject]): Returns the WebBackForwardListItem.
3335         (-[WKBackForwardListItem _item]): Ditto.
3336         * UIProcess/Cocoa/WKBackForwardListItemInternal.h:
3337         (WebKit::wrapper): Added. Returns a WebBackForwardListItem’s wrapper as a
3338         WKBackForwardListItem.
3339
3340         * UIProcess/WebColorPickerResultListenerProxy.h: Changed into a TypedAPIObject.
3341
3342         * UIProcess/WebFormSubmissionListenerProxy.h:
3343         (WebKit::WebFormSubmissionListenerProxy::operator new): Override to call newObject.
3344
3345         * UIProcess/WebFramePolicyListenerProxy.h:
3346         (WebKit::WebFramePolicyListenerProxy::operator new): Ditto.
3347
3348         * WebKit2.xcodeproj/project.pbxproj: Updated for file additions and removals.
3349
3350 2013-10-30  Anders Carlsson  <andersca@apple.com>
3351
3352         Begin fleshing out an API test for WKRemoteObjectRegistry
3353         https://bugs.webkit.org/show_bug.cgi?id=123531
3354
3355         Reviewed by Andreas Kling.
3356
3357         * Shared/API/Cocoa/WKRemoteObjectInterface.h:
3358         Add WK_API_CLASS annotation.
3359
3360         * Shared/API/Cocoa/WKRemoteObjectRegistry.h:
3361         Add WK_API_CLASS annotation.
3362
3363         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
3364         Add a WebConnection ivar.
3365
3366         (-[WKRemoteObjectRegistry _initWithConnectionRef:]):
3367         Add SPI to create an WKRemoteObjectRegistry object with an existing WKConnectionRef.
3368
3369         (-[WKRemoteObjectRegistry _handleMessageWithName:body:]):
3370         Add SPI that will be used to process incoming messages from an existing WKConnectionRef.
3371
3372         * Shared/API/Cocoa/WKRemoteObjectRegistryPrivate.h: Added.
3373         Add SPI header.
3374
3375         * WebKit2.xcodeproj/project.pbxproj:
3376         Add new files.
3377
3378 2013-10-30  Tim Horton  <timothy_horton@apple.com>
3379
3380         Remote Layer Tree: Lots of ASSERT(m_children.isEmpty()); on Poster Circle
3381         https://bugs.webkit.org/show_bug.cgi?id=123517
3382
3383         Reviewed by Simon Fraser.
3384
3385         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3386         (PlatformCALayerRemote::setSublayers):
3387         When setting our list of sublayers, remove all of the new layers from
3388         their parents first.
3389
3390 2013-10-30  Antti Koivisto  <antti@apple.com>
3391
3392         Add debug settings for simple line layout
3393         https://bugs.webkit.org/show_bug.cgi?id=123514
3394
3395         Reviewed by Andreas Kling.
3396         
3397         Expose debug settings.
3398
3399         * Shared/WebPreferencesStore.h:
3400         * UIProcess/API/C/WKPreferences.cpp:
3401         (WKPreferencesSetSimpleLineLayoutEnabled):
3402         (WKPreferencesGetSimpleLineLayoutEnabled):
3403         (WKPreferencesSetSimpleLineLayoutDebugBordersEnabled):
3404         (WKPreferencesGetSimpleLineLayoutDebugBordersEnabled):
3405         * UIProcess/API/C/WKPreferencesPrivate.h:
3406         * WebProcess/WebPage/WebPage.cpp:
3407         (WebKit::WebPage::updatePreferences):
3408
3409 2013-10-30  Anders Carlsson  <andersca@apple.com>
3410
3411         Add stubbed out WKRemoteObjectRegistry class
3412         https://bugs.webkit.org/show_bug.cgi?id=123512
3413
3414         Reviewed by Andreas Kling.
3415
3416         Also add a WKRemoteObjectInterface class that represents a remote object interface.
3417
3418         * Shared/API/Cocoa/WKRemoteObjectInterface.h: Added.
3419         * Shared/API/Cocoa/WKRemoteObjectInterface.mm: Added.
3420         (-[WKRemoteObjectInterface initWithProtocol:identifier:]):
3421         (+[WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]):
3422         * Shared/API/Cocoa/WKRemoteObjectRegistry.h: Added.
3423         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm: Added.
3424         (-[WKRemoteObjectRegistry registerExportedObject:interface:]):
3425         (-[WKRemoteObjectRegistry unregisterExportedObject:interface:]):
3426         (-[WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
3427         * WebKit2.xcodeproj/project.pbxproj:
3428
3429 2013-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>
3430
3431         [GTK] webkit_web_context_allow_tls_certificate_for_host doc is missing Since tag
3432         https://bugs.webkit.org/show_bug.cgi?id=123499
3433
3434         Reviewed by Philippe Normand.
3435
3436         * UIProcess/API/gtk/WebKitWebContext.cpp: Add Since: 2.4.
3437
3438 2013-10-29  Alexey Proskuryakov  <ap@apple.com>
3439
3440         Result of focus-option-control-on-page.html depends on system preferences
3441         https://bugs.webkit.org/show_bug.cgi?id=123304
3442
3443         Reviewed by Simon Fraser.
3444
3445         * UIProcess/mac/WKFullKeyboardAccessWatcher.mm:
3446         (-[WKFullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
3447         Read the preference from its correct domain. This doesn't affect behavior in practice
3448         and isn't part of the fix, but it's a good opportunity to correct this code.
3449
3450 2013-10-29  Brady Eidson  <beidson@apple.com>
3451
3452         Move IDBTransactionBackendLevelDB to generic IDBBackingStoreInterface
3453         https://bugs.webkit.org/show_bug.cgi?id=123483
3454
3455         Reviewed by Andreas Kling.
3456
3457         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
3458         (WebKit::WebIDBFactoryBackend::createCursorBackend): Stubbed out.
3459         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
3460
3461         * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp:
3462         (WebKit::WebProcessIDBDatabaseBackend::factoryBackend): Stubbed out.
3463         * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h:
3464
3465 2013-10-29  Jer Noble  <jer.noble@apple.com>
3466
3467         [MSE] [Mac] Enable MediaSource on the Mac
3468         https://bugs.webkit.org/show_bug.cgi?id=122484
3469
3470         Reviewed by Darin Adler.
3471
3472         Enable ENABLE_MEDIA_SOURCE.
3473
3474         * Configurations/FeatureDefines.xcconfig:
3475
3476 2013-10-29  Tim Horton  <timothy_horton@apple.com>
3477
3478         More correct build fix after 158223.
3479
3480         Only fails in release because it's inline.
3481         Include the relevant header to get the function.
3482
3483         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3484
3485 2013-10-29  Tim Horton  <timothy_horton@apple.com>
3486
3487         Remote Layer Tree: Support tiled drawing and use it for the main frame
3488         https://bugs.webkit.org/show_bug.cgi?id=123422
3489
3490         Reviewed by Simon Fraser.
3491
3492         Add a PlatformCALayerRemote subclass that behaves similarly to
3493         WebTiledBackingLayer, forwarding relevant things (setNeedsDisplay, etc.)
3494         to the TileController which it owns.
3495
3496         Teach the remote layer tree code enough to proxy these layers across,
3497         and paint them in a manner similar to WebSimpleLayer (just calling
3498         straight back to the TileController to paint).
3499
3500         * Shared/mac/RemoteLayerTreeTransaction.h:
3501         * Shared/mac/RemoteLayerTreeTransaction.mm:
3502         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
3503         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
3504         (WebKit::dumpChangedLayers):
3505         * UIProcess/mac/RemoteLayerTreeHost.mm:
3506         (WebKit::RemoteLayerTreeHost::commit):
3507         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3508         (PlatformCALayerRemote::setEdgeAntialiasingMask):
3509         Add support for adjusting/encoding/decoding/dumping/applying edgeAntialiasingMask.
3510
3511         (WebKit::RemoteLayerTreeTransaction::dump):