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