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