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