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