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