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