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