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