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