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