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