Adopt CAMachPort-as-layer-contents
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-02-16  Tim Horton  <timothy_horton@apple.com>
2
3         Adopt CAMachPort-as-layer-contents
4         https://bugs.webkit.org/show_bug.cgi?id=141687
5         <rdar://problem/19393233>
6
7         Reviewed by Simon Fraser.
8
9         * Shared/mac/RemoteLayerBackingStore.h:
10         * Shared/mac/RemoteLayerBackingStore.mm:
11         (WebKit::RemoteLayerBackingStore::decode):
12         If we have CAMachPort, just keep the MachSendRight around.
13
14         (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
15         If we have CAMachPort, make one and leak our send right into it. CAMachPort
16         will adopt the port and destroy it when needed.
17
18         (WebKit::RemoteLayerBackingStore::setBufferVolatility):
19         Tiny style fix.
20
21 2015-02-15  Sam Weinig  <sam@webkit.org>
22
23         Add experimental <attachment> element support
24         https://bugs.webkit.org/show_bug.cgi?id=141626
25
26         Reviewed by Tim Horton.
27
28         * Configurations/FeatureDefines.xcconfig:
29
30 2015-02-16  Tim Horton  <timothy_horton@apple.com>
31
32         REGRESSION (r176459): Process suspension cleanup timer sometimes never stops
33         https://bugs.webkit.org/show_bug.cgi?id=141669
34
35         Reviewed by Simon Fraser.
36
37         * WebProcess/WebProcess.cpp:
38         (WebKit::WebProcess::markAllLayersVolatileIfPossible):
39         r176459 accidentally removed the code to stop the cleanup timer
40         in the case where we successfully finish marking layers volatile,
41         causing the timer to continue running once the process comes back
42         from a suspended state.
43
44 2015-02-16  Anders Carlsson  <andersca@apple.com>
45
46         Check for the assume_nonnull feature instead of noescape
47         https://bugs.webkit.org/show_bug.cgi?id=141666
48
49         Reviewed by Dan Bernstein.
50
51         * Shared/API/Cocoa/WKFoundation.h:
52
53 2015-02-16  Anders Carlsson  <andersca@apple.com>
54
55         Add nullability qualifiers to all API headers
56         https://bugs.webkit.org/show_bug.cgi?id=141652
57         rdar://problem/19793630
58
59         Reviewed by Dan Bernstein.
60
61         * Shared/API/Cocoa/WKFoundation.h:
62         Add a WK_NULLABLE_SPECIFIER macro.
63
64         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
65         * UIProcess/API/Cocoa/WKFrameInfo.h:
66         * UIProcess/API/Cocoa/WKNavigationAction.h:
67         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
68         * UIProcess/API/Cocoa/WKNavigationResponse.h:
69         * UIProcess/API/Cocoa/WKScriptMessage.h:
70         * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
71         * UIProcess/API/Cocoa/WKUIDelegate.h:
72         * UIProcess/API/Cocoa/WKUserContentController.h:
73         * UIProcess/API/Cocoa/WKUserScript.h:
74         * UIProcess/API/Cocoa/WKWebView.h:
75         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
76         * UIProcess/API/Cocoa/WKWindowFeatures.h:
77
78         * mac/postprocess-framework-headers.sh:
79         Handle the WK_NULLABLE_SPECIFIER macro. Change the WK_NULLABLE sed command to replace
80         all occurrences of WK_NULLABLE instead of just the first one.
81
82 2015-02-16  Dan Bernstein  <mitz@apple.com>
83
84         Update SPI availability annotations 
85         https://bugs.webkit.org/show_bug.cgi?id=141588
86
87         Reviewed by Anders Carlsson.
88
89         * Shared/API/Cocoa/WKFoundation.h: Added a definition of __NSi_8_3 for when building with
90         an older SDK.
91         * UIProcess/API/Cocoa/WKErrorPrivate.h:
92         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
93
94 2015-02-16  Antti Koivisto  <antti@apple.com>
95
96         Remove unused InjectedBundle::setCacheModel.
97
98         Rubber-stamped by Anders Carlsson.
99
100         * WebProcess/InjectedBundle/InjectedBundle.cpp:
101         (WebKit::InjectedBundle::setCacheModel): Deleted.
102         * WebProcess/InjectedBundle/InjectedBundle.h:
103
104 2015-02-16  Anders Carlsson  <andersca@apple.com>
105
106         Build fix for versions of Xcode that support nullability but don't have the Foundation #defines.
107
108         * Shared/API/Cocoa/WKFoundation.h:
109
110 2015-02-16  Antti Koivisto  <antti@apple.com>
111
112         Develop/Disable Caches does not properly disable disk cache
113         https://bugs.webkit.org/show_bug.cgi?id=141636
114
115         Reviewed by Anders Carlsson.
116
117         The menu item sets the cache model to "document viewer" to disable the caches (cache size 0).
118         However the cache model was never passed to the network process after the initialization.
119
120         * NetworkProcess/NetworkProcess.messages.in:
121         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
122         (WebKit::NetworkCacheStorage::retrieve):
123         (WebKit::NetworkCacheStorage::store):
124         (WebKit::NetworkCacheStorage::update):
125
126             Don't try to store or retrieve when the maximum cache size is set to zero.
127
128         * UIProcess/WebProcessPool.cpp:
129         (WebKit::WebProcessPool::setCacheModel):
130
131            Message the network process too.
132
133         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
134         (WKBundleSetCacheModel): Deleted.
135
136             Remove the now unused SPI.
137
138         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
139
140 2015-02-16  Antti Koivisto  <antti@apple.com>
141
142         Assertion in disk cache code with redirect to a non-http resource
143         https://bugs.webkit.org/show_bug.cgi?id=141644
144
145         Reviewed by Anders Carlsson.
146
147         * NetworkProcess/NetworkResourceLoader.cpp:
148         (WebKit::NetworkResourceLoader::didFinishLoading):
149
150             Check that response is HTTP before calling computeFreshnessLifetimeForHTTPFamily.
151
152         * NetworkProcess/cache/NetworkCache.cpp:
153         (WebKit::canStore):
154
155             Deny storing non-HTTP responses to cache (though the above already covers this).
156
157 2015-02-13  Anders Carlsson  <andersca@apple.com>
158
159         Add support for nullability to the header postprocessing
160         https://bugs.webkit.org/show_bug.cgi?id=141573
161
162         Reviewed by Darin Adler.
163
164         * Shared/API/Cocoa/WKFoundation.h:
165         * UIProcess/API/Cocoa/WKBackForwardList.h:
166         * mac/postprocess-framework-headers.sh:
167
168 2015-02-16  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
169
170         [EFL] Rename WebContextEfl to WebProcessPoolEfl
171         https://bugs.webkit.org/show_bug.cgi?id=141642
172
173         Reviewed by Csaba Osztrogonác.
174
175         Although we've renamed almost everything in r177716, this is still
176         required after r177692.
177
178         * UIProcess/efl/WebProcessPoolEfl.cpp: Renamed from Source/WebKit2/UIProcess/efl/WebContextEfl.cpp.
179
180 2015-02-14  Alexey Proskuryakov  <ap@apple.com>
181
182         Build fix after <http://trac.webkit.org/changeset/180122>
183
184         * Platform/mac/StringUtilities.mm:
185
186 2015-02-14  Joseph Pecoraro  <pecoraro@apple.com>
187
188         [Mac] Possible DDActionContext leaks, RetainPtr cleanup
189         https://bugs.webkit.org/show_bug.cgi?id=141613
190
191         Reviewed by Tim Horton.
192
193         * UIProcess/mac/WKActionMenuController.mm:
194         (-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
195         Adopt the allocated object.
196
197 2015-02-09  Brian J. Burg  <burg@cs.washington.edu>
198
199         Web Inspector: remove some unnecessary Inspector prefixes from class names in Inspector namespace
200         https://bugs.webkit.org/show_bug.cgi?id=141372
201
202         Reviewed by Joseph Pecoraro.
203
204         * WebProcess/WebPage/WebInspector.cpp:
205         (WebKit::WebInspector::remoteFrontendDisconnected):
206
207 2015-02-14  Beth Dakin  <bdakin@apple.com>
208
209         REGRESSION: Page opens with enlarged font after visiting PDF, navigating back, 
210         then doing a process swap
211         https://bugs.webkit.org/show_bug.cgi?id=141584
212         -and corresponding-
213         rdar://problem/18167729
214
215         Reviewed by Tim Horton.
216
217         This patch keeps the plugin zoom/scale factors separate from page zoom/scale 
218         factors in the UI process since they are used for slightly different purposes for 
219         plugins (i.e., PDFs) than they are for normal pages. Keeping track of the right 
220         factor for the right type of document will ensure that we don’t use the wrong one.
221
222         * UIProcess/WebPageProxy.cpp:
223         (WebKit::WebPageProxy::WebPageProxy):
224         (WebKit::WebPageProxy::pageZoomFactor):
225         (WebKit::WebPageProxy::pageScaleFactor):
226         (WebKit::WebPageProxy::pluginScaleFactorDidChange):
227         (WebKit::WebPageProxy::pluginZoomFactorDidChange):
228         (WebKit::WebPageProxy::didCommitLoadForFrame):
229         (WebKit::WebPageProxy::pageZoomFactorDidChange): Deleted.
230         * UIProcess/WebPageProxy.h:
231         (WebKit::WebPageProxy::pageZoomFactor): Deleted.
232         (WebKit::WebPageProxy::pageScaleFactor): Deleted.
233         * UIProcess/WebPageProxy.messages.in:
234         * WebProcess/Plugins/PluginView.cpp:
235         (WebKit::PluginView::setPageScaleFactor):
236
237 2015-02-14  Brian J. Burg  <burg@cs.washington.edu>
238
239         REGRESSION(r179573): Web Inspector toolbar is completely messed up on Mavericks
240         https://bugs.webkit.org/show_bug.cgi?id=141555
241
242         Reviewed by Joseph Pecoraro.
243
244         The old WKView-based code called _setDrawsBackground:NO on the WKView for Mavericks.
245         Simulate this old behavior by calling WebPageProxy::setDrawsBackground(false).
246
247         WKWebView's setOpaque:BOOL gives a flat background color instead of the intended
248         gradient, so we can't use that method.
249
250         * UIProcess/mac/WebInspectorProxyMac.mm:
251         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
252
253 2015-02-13  Simon Fraser  <simon.fraser@apple.com>
254
255         Crash closing a tab when a context or popup menu is open
256         https://bugs.webkit.org/show_bug.cgi?id=141582
257         rdar://problem/17700475
258
259         Reviewed by Anders Carlsson.
260
261         If a context menu or a popup menu is open when a tab is programmatically closed,
262         then we'd crash because both the WebContextMenuProxyMac/WebPopupMenuProxyMac
263         and the WebPageProxy would be deleted while still in use, via messages
264         handled via the nested event tracking runloop.
265
266         Fix by protecting those things while showing the popup. Also programmatically
267         dismiss the popup when closing the WebPageProxy.
268
269         * UIProcess/WebContextMenuProxy.h:
270         (WebKit::WebContextMenuProxy::cancelTracking):
271         * UIProcess/WebPageProxy.cpp:
272         (WebKit::WebPageProxy::close):
273         (WebKit::WebPageProxy::showPopupMenu): Clean up some EFL-related confusion that we don't need.
274         Retaining |this| will also retain m_activePopupMenu.
275         (WebKit::WebPageProxy::hidePopupMenu):
276         (WebKit::WebPageProxy::showContextMenu):
277         (WebKit::WebPageProxy::resetState):
278         * UIProcess/WebPopupMenuProxy.h:
279         (WebKit::WebPopupMenuProxy::cancelTracking):
280         * UIProcess/mac/WebContextMenuProxyMac.h:
281         * UIProcess/mac/WebContextMenuProxyMac.mm:
282         (WebKit::WebContextMenuProxyMac::showContextMenu):
283         (WebKit::WebContextMenuProxyMac::cancelTracking):
284         * UIProcess/mac/WebPopupMenuProxyMac.h: For popups, we need to remember if we were
285         canceled to avoid trying to send events after closing.
286         * UIProcess/mac/WebPopupMenuProxyMac.mm:
287         (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
288         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
289         (WebKit::WebPopupMenuProxyMac::cancelTracking):
290
291 2015-02-13  Timothy Horton  <timothy_horton@apple.com>
292
293         Fix the iOS build.
294
295         * UIProcess/ios/ViewGestureControllerIOS.mm:
296         (WebKit::ViewGestureController::removeSwipeSnapshot):
297         * UIProcess/mac/ViewGestureController.h:
298         This code is never used on iOS.
299
300 2015-02-13  Timothy Horton  <timothy_horton@apple.com>
301
302         Make WebCore::IOSurface have single ownership instead of refcounting
303         https://bugs.webkit.org/show_bug.cgi?id=141578
304
305         Reviewed by Anders Carlsson.
306
307         * Shared/mac/RemoteLayerBackingStore.h:
308         * Shared/mac/RemoteLayerBackingStore.mm:
309         (WebKit::RemoteLayerBackingStore::Buffer::discard):
310         * UIProcess/API/mac/WKView.mm:
311         (-[WKView _takeViewSnapshot]):
312         * UIProcess/mac/ViewGestureController.h:
313         * UIProcess/mac/ViewGestureControllerMac.mm:
314         (WebKit::ViewGestureController::beginSwipeGesture):
315         (WebKit::ViewGestureController::removeSwipeSnapshot):
316         * UIProcess/mac/ViewSnapshotStore.h:
317         * UIProcess/mac/ViewSnapshotStore.mm:
318         (WebKit::ViewSnapshot::create):
319         (WebKit::ViewSnapshot::ViewSnapshot):
320         (WebKit::ViewSnapshot::hasImage):
321         Adjust to the single-ownership model.
322
323 2015-02-13  Brent Fulgham  <bfulgham@apple.com>
324
325         [iOS] Unreviewed build fix after r180076.
326
327         * UIProcess/WebPageProxy.cpp:
328         (WebKit::WebPageProxy::creationParameters): We do not
329         want to do this on iOS. 
330         * UIProcess/WebPageProxy.h: No need to expose function
331         on iOS (only Mac).
332
333 2015-02-13  Brent Fulgham  <bfulgham@apple.com>
334
335         [Mac, iOS] Adjust pagination behavior for Mail.app printing use
336         https://bugs.webkit.org/show_bug.cgi?id=141569
337         <rdar://problem/14912763>
338
339         Reviewed by Anders Carlsson.
340
341         * Shared/WebPageCreationParameters.cpp:
342         (WebKit::WebPageCreationParameters::encode): Add new flag.
343         (WebKit::WebPageCreationParameters::decode): Ditto.
344         * Shared/WebPageCreationParameters.h: Ditto.
345         * UIProcess/WebPageProxy.cpp:
346         (WebKit::WebPageProxy::creationParameters): Set new page construction flag.
347         * UIProcess/WebPageProxy.h:
348         * UIProcess/mac/WebPageProxyMac.mm:
349         (WebKit::WebPageProxy::paginationQuirkEnabled): Ask for new pagination flag
350         when running as a Mail client.
351         * WebProcess/WebPage/WebPage.cpp:
352         (WebKit::WebPage::WebPage): Set up pagination based on desired settings.
353
354 2015-02-12  Simon Fraser  <simon.fraser@apple.com>
355
356         determinePrimarySnapshottedPlugIn() should only traverse visible Frames
357         https://bugs.webkit.org/show_bug.cgi?id=141547
358         Part of rdar://problem/18445733.
359
360         Reviewed by Anders Carlsson.
361         
362         Use FrameTree::traverseNextRendered() to avoid doing things in unrendered frames
363         which are not guaranteed to have been laid out.
364
365         * WebProcess/WebPage/WebPage.cpp:
366         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
367
368 2015-02-13  Antti Koivisto  <antti@apple.com>
369
370         WorkQueue should support concurrent queues
371         https://bugs.webkit.org/show_bug.cgi?id=141559
372
373         Reviewed by Anders Carlsson.
374
375         * DatabaseProcess/DatabaseProcess.cpp:
376         (WebKit::DatabaseProcess::DatabaseProcess):
377         * Platform/IPC/Connection.h:
378         * Platform/IPC/mac/ConnectionMac.mm:
379         (IPC::Connection::open):
380         * Platform/WorkQueue.cpp:
381         (WorkQueue::create):
382
383             Also make create return a Ref.
384
385         (WorkQueue::WorkQueue):
386         * Platform/WorkQueue.h:
387
388             Add queue type enum.
389
390         * Platform/efl/WorkQueueEfl.cpp:
391         (WorkQueue::platformInitialize):
392         * Platform/gtk/WorkQueueGtk.cpp:
393         (WorkQueue::platformInitialize):
394         * Platform/mac/WorkQueueMac.cpp:
395         (WorkQueue::platformInitialize):
396         * Shared/mac/SecItemShim.cpp:
397         (WebKit::SecItemShim::initializeConnection):
398         * Shared/mac/SecItemShim.h:
399         * UIProcess/Launcher/ProcessLauncher.cpp:
400         (WebKit::processLauncherWorkQueue):
401         * UIProcess/mac/SecItemShimProxy.cpp:
402         (WebKit::SecItemShimProxy::initializeConnection):
403         * UIProcess/mac/SecItemShimProxy.h:
404         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
405         (WebKit::PluginProcessConnectionManager::initializeConnection):
406         * WebProcess/Plugins/PluginProcessConnectionManager.h:
407         * WebProcess/WebPage/EventDispatcher.cpp:
408         (WebKit::EventDispatcher::EventDispatcher):
409         (WebKit::EventDispatcher::initializeConnection):
410         * WebProcess/WebPage/EventDispatcher.h:
411         * WebProcess/WebPage/ViewUpdateDispatcher.h:
412
413 2015-02-12  Anders Carlsson  <andersca@apple.com>
414
415         Clean up the framework postprocessing phase
416         https://bugs.webkit.org/show_bug.cgi?id=141544
417
418         Reviewed by Dan Bernstein.
419
420         Rename WK_API_AVAILABILITY_ENABLED to WK_FRAMEWORK_HEADER_POSTPROCESSING_ENABLED to better match what
421         it is we're doing. Also, rename the associated script. Remove a couple of now unnecessary #defines, and
422         change everything we can to be feature-based instead of OS based.
423
424         * Configurations/WebKit.xcconfig:
425         * Shared/API/Cocoa/WKFoundation.h:
426         * WebKit2.xcodeproj/project.pbxproj:
427         * mac/postprocess-framework-headers.sh: Renamed from Source/WebKit2/mac/rewrite-availability-macros.sh.
428
429 2015-02-12  Tim Horton  <timothy_horton@apple.com>
430
431         Crash removing RemoteLayerTreeDisplayRefreshMonitor from the drawing area's map
432         https://bugs.webkit.org/show_bug.cgi?id=141545
433         <rdar://problem/17712200>
434
435         Reviewed by Simon Fraser.
436
437         * WebProcess/WebPage/WebPage.cpp:
438         (WebKit::WebPage::windowScreenDidChange):
439         * WebProcess/WebPage/WebPage.h:
440         * WebProcess/WebPage/WebPage.messages.in:
441         windowScreenDidChange should take uint32_t, since that's what PlatformDisplayID is.
442
443         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
444         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
445         RemoteLayerTreeDisplayRefreshMonitor is driven by the page's
446         RemoteLayerTreeDrawingArea. Because of this, we cannot have the same
447         sharing of DisplayRefreshMonitors that other platforms use.
448         In order to ensure that we get a unique DisplayRefreshMonitor
449         per-DrawingArea, give each page a unique DisplayID derived
450         from WebPage's unique ID.
451
452 2015-02-12  Tim Horton  <timothy_horton@apple.com>
453
454         Crash under RemoteLayerTreeDrawingArea::flushLayers() when closing a tab
455         https://bugs.webkit.org/show_bug.cgi?id=141541
456
457         Reviewed by Benjamin Poulain.
458
459         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
460         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
461         The WebPage pointer can become stale between when it is retrieved
462         and dereferenced. Retrieve it by ID inside the dispatch_async block
463         instead of outside of it.
464
465 2015-02-12  Antti Koivisto  <antti@apple.com>
466
467         WebKit persistent cache uses a lot of threads
468         https://bugs.webkit.org/show_bug.cgi?id=141520
469
470         Reviewed by Andreas Kling.
471
472         Parallel retrieves are limited but stores are not. We may end up with lots of backround io
473         dispatch queue threads if they don't complete fast enough.
474
475         This patch adds pending state for write operations similar to what retrieves already have
476         and limits to number of active operations.
477
478         * NetworkProcess/cache/NetworkCacheStorage.h:
479
480             Combine StoreOperation and UpdateOperation and rename to WriteOperation.
481             Rename RetrieveOperation to ReadOperation.
482             The idea is to emphasize that these are disk operations.
483
484         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
485         (WebKit::NetworkCacheStorage::dispatchReadOperation):
486         (WebKit::NetworkCacheStorage::dispatchPendingReadOperations):
487         (WebKit::retrieveFromMemory):
488         (WebKit::NetworkCacheStorage::retrieve):
489         (WebKit::NetworkCacheStorage::store):
490         (WebKit::NetworkCacheStorage::update):
491         (WebKit::NetworkCacheStorage::dispatchPendingWriteOperations):
492
493             Only allow 3 parallel writes.
494
495         (WebKit::NetworkCacheStorage::dispatchFullWriteOperation):
496         (WebKit::NetworkCacheStorage::dispatchHeaderWriteOperation):
497
498             More informative names.
499
500         (WebKit::NetworkCacheStorage::dispatchRetrieveOperation): Deleted.
501         (WebKit::NetworkCacheStorage::dispatchPendingRetrieveOperations): Deleted.
502         (WebKit::retrieveActive): Deleted.
503
504 2015-02-12  Carlos Garcia Campos  <cgarcia@igalia.com>
505
506         [GTK] Add API to allow overriding the default color chooser implementation
507         https://bugs.webkit.org/show_bug.cgi?id=98935
508
509         Reviewed by Gustavo Noronha Silva.
510
511         Add API to allow the user to override the default UI of color
512         chooser. Similar to the file chooser API, a new run-color-chooser
513         signal is added to WebKitWebView that passes a WebKitColorChooserRequest
514         parameter to the signal.
515
516         Initial patch by Arnaud Renevier <a.renevier@sisa.samsung.com>.
517
518         * PlatformGTK.cmake: Add new files to compilation.
519         * UIProcess/API/gtk/PageClientImpl.cpp:
520         (WebKit::PageClientImpl::createColorPicker): Create a
521         WebKitColorChooser is the view widget is a WebKitWebView or a
522         WebColorPicker otherwise,
523         * UIProcess/API/gtk/WebKitColorChooser.cpp: Added.
524         (WebKit::WebKitColorChooser::create):
525         (WebKit::WebKitColorChooser::WebKitColorChooser):
526         (WebKit::WebKitColorChooser::~WebKitColorChooser):
527         (WebKit::WebKitColorChooser::endPicker): Chain up to parent class
528         when not having a request, or finish the request if we have one.
529         (WebKit::WebKitColorChooser::colorChooserRequestFinished):
530         (WebKit::WebKitColorChooser::colorChooserRequestRGBAChanged):
531         (WebKit::WebKitColorChooser::showColorPicker): Create a new
532         WebKitColorChooserRequest and emit WebKitWebView::run-color-chooser.
533         If the signal is not handled, fallback to the default color
534         chooser dialog implemented by the parent class.
535         * UIProcess/API/gtk/WebKitColorChooser.h: Added.
536         * UIProcess/API/gtk/WebKitColorChooserRequest.cpp: Added.
537         (webkitColorChooserRequestGetProperty):
538         (webkitColorChooserRequestSetProperty):
539         (webkit_color_chooser_request_class_init):
540         (webkit_color_chooser_request_set_rgba):
541         (webkit_color_chooser_request_get_rgba):
542         (webkit_color_chooser_request_get_element_rectangle):
543         (webkit_color_chooser_request_finish):
544         (webkit_color_chooser_request_cancel):
545         (webkitColorChooserRequestCreate):
546         * UIProcess/API/gtk/WebKitColorChooserRequest.h: Added.
547         * UIProcess/API/gtk/WebKitColorChooserRequestPrivate.h: Added.
548         * UIProcess/API/gtk/WebKitWebView.cpp:
549         (webkit_web_view_class_init): Add run-color-chooser signal.
550         (webkitWebViewEmitRunColorChooser): Emit run-color-chooser signal.
551         * UIProcess/API/gtk/WebKitWebView.h:
552         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
553         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
554         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitColorChooserRequest.
555         * UIProcess/API/gtk/webkit2.h: Include WebKitColorChooserRequest.h
556
557 2015-02-11  Enrica Casucci  <enrica@apple.com>
558
559         iOS build fix.
560
561         Unreviewed.
562
563         * UIProcess/ios/WKContentViewInteraction.mm:
564         (-[WKContentView inputAssistantItem]):
565         (-[WKContentView _inputAssistantItem]):
566
567 2015-02-11  Chris Dumez  <cdumez@apple.com>
568
569         [WK2] Add logging to validate the network cache efficacy (Part 2)
570         https://bugs.webkit.org/show_bug.cgi?id=141345
571         <rdar://problem/19632080>
572
573         Reviewed by Sam Weinig.
574
575         Add diagnostic logging messages to validate the network cache efficacy.
576         The following 4 messages are added:
577         - networkCache / retrieval / success
578         - networkCache / retrieval / unhandledRequestFailure
579         - networkCache / retrieval / noLongerInCacheFailure
580         - networkCache / retrieval / unusableCachedEntryFailure
581
582         The messages are sent via IPC from the NetworkProcess to the UIProcess,
583         where the WebPageProxy code already handles diagnostic messages sent by
584         the WebProcess.
585
586 2015-02-11  Tim Horton  <timothy_horton@apple.com>
587
588         REGRESSION (iOS 8): PDFs embedded in <object>/<embed> tag don't load at all
589         https://bugs.webkit.org/show_bug.cgi?id=141457
590         <rdar://problem/18221851>
591
592         Reviewed by Alexey Proskuryakov.
593
594         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
595         (WebKit::WebFrameLoaderClient::objectContentType):
596         On iOS, if we don't know what to do with a PDF-in-object, treat it as an image.
597
598 2015-02-11  ChangSeok Oh  <changseok.oh@collabora.com>
599
600         Activate ReliefLogger of a memory pressure handler for linux system.
601         https://bugs.webkit.org/show_bug.cgi?id=123611
602
603         Reviewed by Anders Carlsson.
604
605         * Shared/WebProcessCreationParameters.cpp:
606         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
607         Make the parameter, shouldEnableMemoryPressureReliefLogging shareable with COCOA else systems.
608         (WebKit::WebProcessCreationParameters::encode): ditto.
609         (WebKit::WebProcessCreationParameters::decode): ditto.
610         * Shared/WebProcessCreationParameters.h:
611         * UIProcess/WebProcessPool.cpp:
612         (WebKit::WebProcessPool::createNewWebProcess): Set shouldEnableMemoryPressureReliefLogging
613         to true for linux system.
614         * WebProcess/WebProcess.cpp:
615         (WebKit::WebProcess::initializeWebProcess): Pass the shouldEnableMemoryPressureReliefLogging value
616         to MemoryPressureHandler::ReliefLogger::setLoggingEnabled().
617
618 2015-02-11  Yusuke Suzuki  <utatane.tea@gmail.com>
619
620         [GTK][EFL] Suppress a warning of unused params
621         https://bugs.webkit.org/show_bug.cgi?id=141474
622
623         Reviewed by Darin Adler.
624
625         Drop unused argument name, `directoryName`.
626
627         * UIProcess/API/APIWebsiteDataStore.cpp:
628         (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
629
630 2015-02-11  Carlos Garcia Campos  <cgarcia@igalia.com>
631
632         [GTK] Add default color chooser implementation using GtkColorChooserDialog
633         https://bugs.webkit.org/show_bug.cgi?id=141392
634
635         Reviewed by Gustavo Noronha Silva.
636
637         * PlatformGTK.cmake: Add new files to compilation.
638         * UIProcess/API/gtk/PageClientImpl.cpp:
639         (WebKit::PageClientImpl::createColorPicker): Call WebColorPickerGtk::create().
640         * UIProcess/gtk/WebColorPickerGtk.cpp: Added.
641         (WebKit::WebColorPickerGtk::create):
642         (WebKit::WebColorPickerGtk::WebColorPickerGtk):
643         (WebKit::WebColorPickerGtk::~WebColorPickerGtk):
644         (WebKit::WebColorPickerGtk::cancel): Set initial color.
645         (WebKit::WebColorPickerGtk::endPicker): Destroy the color chooser dialog.
646         (WebKit::WebColorPickerGtk::didChooseColor): Notify the client.
647         (WebKit::WebColorPickerGtk::colorChooserDialogRGBAChangedCallback):
648         Update the selected color.
649         (WebKit::WebColorPickerGtk::colorChooserDialogResponseCallback):
650         Cancel or finish the operation depending on the dialog response.
651         (WebKit::WebColorPickerGtk::showColorPicker): Create a
652         GtkColorChooserDialog to handle the color picker operation.
653         * UIProcess/gtk/WebColorPickerGtk.h: Added.
654         (WebKit::WebColorPickerGtk::initialColor):
655
656 2015-02-11  Commit Queue  <commit-queue@webkit.org>
657
658         Unreviewed, rolling out r179910.
659         https://bugs.webkit.org/show_bug.cgi?id=141464
660
661         Caused assertions on debug bots (Requested by ap on #webkit).
662
663         Reverted changeset:
664
665         "[WK2] Add logging to validate the network cache efficacy
666         (Part 2)"
667         https://bugs.webkit.org/show_bug.cgi?id=141345
668         http://trac.webkit.org/changeset/179910
669
670 2015-02-10  Chris Dumez  <cdumez@apple.com>
671
672         [WK2] Add logging to validate the network cache efficacy (Part 2)
673         https://bugs.webkit.org/show_bug.cgi?id=141345
674         <rdar://problem/19632080>
675
676         Reviewed by Antti Koivisto.
677
678         Add diagnostic logging messages to validate the network cache efficacy.
679         The following 4 messages are added:
680         - networkCache / retrieval / success
681         - networkCache / retrieval / unhandledRequestFailure
682         - networkCache / retrieval / noLongerInCacheFailure
683         - networkCache / retrieval / unusableCachedEntryFailure
684
685         The messages are sent via IPC from the NetworkProcess to the UIProcess,
686         where the WebPageProxy code already handles diagnostic messages sent by
687         the WebProcess.
688
689 2015-02-10  Conrad Shultz  <conrad_shultz@apple.com>
690
691         Clients need the ability to hook into immediate action lifecycle
692         https://bugs.webkit.org/show_bug.cgi?id=141449
693
694         Reviewed by Tim Horton.
695
696         * UIProcess/API/Cocoa/WKViewPrivate.h:
697         Expose new methods.
698
699         * UIProcess/API/mac/WKView.mm:
700         (-[WKView _prepareForImmediateActionAnimation]):
701         (-[WKView _cancelImmediateActionAnimation]):
702         (-[WKView _completeImmediateActionAnimation]):
703         Stub implementations.
704
705         * UIProcess/mac/WKImmediateActionController.mm:
706         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
707         Send -_prepareForImmediateActionAnimation.
708         (-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
709         Send -_cancelImmediateActionAnimation.
710         (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
711         Send -_completeImmediateActionAnimation.
712
713 2015-02-10  Dan Bernstein  <mitz@apple.com>
714
715         <rdar://problem/19770264> Starting a navigation gesture dismisses the keyboard
716
717         Reviewed by Tim Horton.
718
719         * UIProcess/ios/ViewGestureControllerIOS.mm:
720         (WebKit::ViewGestureController::beginSwipeGesture): Reordered the view hierarchy changes,
721         such that m_liveSwipeView will not momentarily move out of the window, because that causes
722         the window’s first responder to be set to nil (if it was a descendant of m_liveSwipView).
723
724 2015-02-10  Enrica Casucci  <enrica@apple.com>
725
726         Hit testing is misplaced when selecting on wikipedia page.
727         https://bugs.webkit.org/show_bug.cgi?id=141410
728         rdar://problem/19768211
729
730         Reviewed by Simon Fraser.
731
732         When loading a new document into the same WebPage object, we need
733         to clear the assisted node, since there is no guarantee that the
734         node will be blurred. The bug was caused by the use of a stale
735         assisted node to constrain the point where the gesture occurs.
736         The node was still valid, since the previous page was in the cache.
737         I've added a ASSERT to check that, when constraining the point to
738         node rectangle, the node is in the same document as the one we
739         are performing hit test on. When the frame is detached, we clear
740         the assisted node if the node is part of the document is the frame
741         being detached.
742
743         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
744         (WebKit::WebFrameLoaderClient::detachedFromParent2):
745         * WebProcess/WebPage/WebPage.h:
746         * WebProcess/WebPage/ios/WebPageIOS.mm:
747         (WebKit::constrainPoint):
748         (WebKit::WebPage::resetAssistedNodeForFrame):
749
750 2015-02-10  Joseph Pecoraro  <pecoraro@apple.com>
751
752         [Cocoa] NSData over retain in WKBrowsingContextController loadData
753         https://bugs.webkit.org/show_bug.cgi?id=141437
754
755         Reviewed by Anders Carlsson.
756
757         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
758         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
759         API::Data::createWithoutCopying will automatically do the retaining / releasing for us.
760
761 2015-02-10  Zhuo Li  <zachli@apple.com>
762
763         [WK2] Add support for registering url schemes to bypass Content Security Policy.
764         https://bugs.webkit.org/show_bug.cgi?id=140736
765
766         Reviewed by Anders Carlsson.
767
768         * Shared/WebProcessCreationParameters.cpp:
769         (WebKit::WebProcessCreationParameters::encode):
770         (WebKit::WebProcessCreationParameters::decode):
771         * Shared/WebProcessCreationParameters.h:
772         * UIProcess/API/C/WKContext.cpp:
773         (WKContextRegisterURLSchemeAsBypassingContentSecurityPolicy):
774         * UIProcess/API/C/WKContextPrivate.h:
775         * UIProcess/WebProcessPool.cpp:
776         (WebKit::WebProcessPool::createNewWebProcess):
777         (WebKit::WebProcessPool::registerURLSchemeAsBypassingContentSecurityPolicy):
778         * UIProcess/WebProcessPool.h:
779         * WebProcess/WebProcess.cpp:
780         (WebKit::WebProcess::initializeWebProcess):
781         (WebKit::WebProcess::registerURLSchemeAsBypassingContentSecurityPolicy):
782         * WebProcess/WebProcess.h:
783         * WebProcess/WebProcess.messages.in:
784
785 2015-02-10  Sanghyup Lee  <sh53.lee@samsung.com>
786
787         [EFL] Use a variable to set flicking time instead of hardcoding
788         https://bugs.webkit.org/show_bug.cgi?id=138950
789
790         Reviewed by Gyuyoung Kim.
791
792         Currently time of flick gesture animation is hardcoded as one second.
793         This patch added a static variable to increase readability.
794
795         * UIProcess/API/efl/GestureRecognizer.cpp:
796         (WebKit::GestureHandler::GestureHandler):
797         (WebKit::GestureHandler::flickAnimatorCallback):
798         (WebKit::GestureHandler::handleFlick):
799
800 2015-02-09  Enrica Casucci  <enrica@apple.com>
801
802         Selection flickers when trying to change size of selection.
803         https://bugs.webkit.org/show_bug.cgi?id=141404
804         rdar://problem/18824863
805
806         Reviewed by Benjamin Poulain.
807
808         When looking for the contracted range from the current range,
809         we were incorrectly choosing a selection whose rectangle is empty
810         as a best match candidate. This was throwing off all the logic
811         and producing a contracted range whose rectangle was bigger than the
812         expanded range, therefore producing a shrink threshold larger than the
813         growth one.
814
815         * WebProcess/WebPage/ios/WebPageIOS.mm:
816         (WebKit::WebPage::contractedRangeFromHandle):
817
818 2015-02-09  Brian J. Burg  <burg@cs.washington.edu>
819
820         REGRESSION(r179705): 2nd-level inspector availability no longer controlled by DeveloperExtrasEnabled user default
821         https://bugs.webkit.org/show_bug.cgi?id=141343
822
823         Reviewed by Timothy Hatcher.
824
825         The regression was caused by the switch to using WKWebViewConfiguration and
826         its default WebPreferences object, which is used to populate the inspector page's
827         Settings object. This WebPreferences is initialized with no identifier, so
828         only preferences in the FOR_EACH_WEBKIT_DEBUG_*_PREFERENCE macros are populated
829         from NSUserDefaults.
830
831         The simplest fix is to move DeveloperExtrasEnabled into the DEBUG group.
832
833         Previously, each inspector level had a unique identifier such as
834         __WebInspectorPageGroupLevelN__, and the n+1 level inspector was enabled
835         by toggling __WebInspectorPageGroupLevelN__.WebKit2DeveloperExrasEnabled.
836         With the move to the DEBUG group, the preference becomes simply
837         WebKitDeveloperExtrasEnabled, which enables any level of inspector.
838         (This does not clash with Safari's "Show Develop Menu" preference, which uses
839         the key "WebKitDeveloperExtrasEnabledPreferenceKey")
840
841         * Shared/WebPreferencesDefinitions.h:
842
843 2015-02-08  Antti Koivisto  <antti@apple.com>
844
845         Measure cache size more accurately
846         https://bugs.webkit.org/show_bug.cgi?id=141378
847         <rdar://problem/19760224>
848
849         Reviewed by Chris Dumez.
850
851         Estimate the cache disk space usage from the actual entry sizes instead of the item count.
852         This prevents large cache items from making the cache grow beyond its bounds.
853
854         * NetworkProcess/cache/NetworkCacheStorage.h:
855         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
856         (WebKit::NetworkCacheStorage::initialize):
857         (WebKit::NetworkCacheStorage::removeEntry):
858         (WebKit::NetworkCacheStorage::store):
859         (WebKit::NetworkCacheStorage::clear):
860         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
861
862 2015-02-09  Carlos Garcia Campos  <cgarcia@igalia.com>
863
864         REGRESSION(r179705): [GTK] The Web Inspector doesn't work after r179705
865         https://bugs.webkit.org/show_bug.cgi?id=141333
866
867         Reviewed by Žan Doberšek.
868
869         Create an initialize WebPreferences for the inspector page. This
870         was moved from cross-platform code to platform specific code.
871
872         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
873         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
874
875 2015-02-08  Timothy Horton  <timothy_horton@apple.com>
876
877         Null deref in _clearImmediateActionState when closing a view with a DataDetectors popover open
878         https://bugs.webkit.org/show_bug.cgi?id=141377
879         <rdar://problem/19711203>
880
881         Reviewed by Darin Adler.
882
883         * UIProcess/mac/WKImmediateActionController.mm:
884         (-[WKImmediateActionController _clearImmediateActionState]):
885         We can have already detached the page when DataDetectors calls us back
886         in interactionStoppedHandler. While we have kept a strong reference to the
887         page in the interactionStoppedHandler block, _page is nulled out.
888         It's OK to avoid doing this work, in any case, because closing a page
889         tears down the TextIndicator anyway.
890
891 2015-02-08  Chris Dumez  <cdumez@apple.com>
892
893         [WK2] Add logging to validate the network cache efficacy (Part 1)
894         https://bugs.webkit.org/show_bug.cgi?id=141269
895         <rdar://problem/19632080>
896
897         Reviewed by Antti Koivisto.
898
899         Add console logging to validate the network cache efficacy. This will
900         tell us if how the network cache satisties requests, in particular:
901         - Request cannot be handled by the cache
902         - Entry was not in the cache but is no longer there (pruned)
903         - Entry is in the cache but is not usable
904         - Entry is in the cache and is used.
905
906         This patch introduces a SQLite-based network cache statistics storage
907         that is used to store requests we have seen before, and query if we
908         have seen a request before. The storage is lightweight as it only
909         stores hashes in the database, in a background thread.
910
911         The statistics cache is initially bootstapped from the network disk
912         cache so that we have data initially and get as accurate statistics
913         as possible from the start.
914
915         To maintain an acceptable level of performance, we have a hard limit
916         on the number of unique requests that are retained set to 100000.
917
918         Diagnostic logging for this will be added in a follow-up patch.
919
920 2015-02-07  Chris Dumez  <cdumez@apple.com>
921
922         Add Vector::removeFirstMatching() / removeAllMatching() methods taking lambda functions
923         https://bugs.webkit.org/show_bug.cgi?id=141321
924
925         Reviewed by Darin Adler.
926
927         Use new Vector::removeFirstMatching() / removeAllMatching() methods.
928
929 2015-02-07  Tim Horton  <timothy_horton@apple.com>
930
931         Add API::HistoryClient and split some things out of API::NavigationClient
932         https://bugs.webkit.org/show_bug.cgi?id=141264
933
934         Reviewed by Darin Adler.
935
936         * UIProcess/API/APIHistoryClient.h: Added.
937         (API::HistoryClient::~HistoryClient):
938         (API::HistoryClient::didNavigateWithNavigationData):
939         (API::HistoryClient::didPerformClientRedirect):
940         (API::HistoryClient::didPerformServerRedirect):
941         (API::HistoryClient::didUpdateHistoryTitle):
942         * UIProcess/API/APINavigationClient.h:
943         (API::NavigationClient::didNavigateWithNavigationData): Deleted.
944         (API::NavigationClient::didPerformClientRedirect): Deleted.
945         (API::NavigationClient::didPerformServerRedirect): Deleted.
946         (API::NavigationClient::didUpdateHistoryTitle): Deleted.
947         * UIProcess/Cocoa/NavigationState.h:
948         * UIProcess/Cocoa/NavigationState.mm:
949         (WebKit::NavigationState::createHistoryClient):
950         (WebKit::NavigationState::HistoryClient::HistoryClient):
951         (WebKit::NavigationState::HistoryClient::~HistoryClient):
952         (WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
953         (WebKit::NavigationState::HistoryClient::didPerformClientRedirect):
954         (WebKit::NavigationState::HistoryClient::didPerformServerRedirect):
955         (WebKit::NavigationState::HistoryClient::didUpdateHistoryTitle):
956         (WebKit::NavigationState::NavigationClient::didNavigateWithNavigationData): Deleted.
957         (WebKit::NavigationState::NavigationClient::didPerformClientRedirect): Deleted.
958         (WebKit::NavigationState::NavigationClient::didPerformServerRedirect): Deleted.
959         (WebKit::NavigationState::NavigationClient::didUpdateHistoryTitle): Deleted.
960         * UIProcess/WebPageProxy.cpp:
961         (WebKit::WebPageProxy::setHistoryClient):
962         (WebKit::WebPageProxy::didNavigateWithNavigationData):
963         (WebKit::WebPageProxy::didPerformClientRedirect):
964         (WebKit::WebPageProxy::didPerformServerRedirect):
965         (WebKit::WebPageProxy::didUpdateHistoryTitle):
966         * UIProcess/WebPageProxy.h:
967         Add a API::HistoryClient and move the few things that belong on it out of API::NavigationClient.
968         Adjust accordingly in WebPageProxy and NavigationState.
969
970         * UIProcess/API/Cocoa/WKWebView.mm:
971         (-[WKWebView initWithFrame:configuration:]):
972         (-[WKWebView setNavigationDelegate:]):
973         (-[WKWebView setUIDelegate:]):
974         (-[WKWebView _setHistoryDelegate:]):
975         Lazily push the NavigationState/UIDelegate clients down to WebPageProxy upon
976         installation of a delegate, so that alternative (C SPI) delegate setters can
977         be separately created.
978
979         * WebKit2.xcodeproj/project.pbxproj:
980
981 2015-02-07  Antti Koivisto  <antti@apple.com>
982
983         And as a further followup restore the 8bit test too.
984
985         * NetworkProcess/cache/NetworkCacheKey.cpp:
986         (WebKit::hashString):
987
988 2015-02-07  Antti Koivisto  <antti@apple.com>
989
990         Use longer hashes for cache keys
991         https://bugs.webkit.org/show_bug.cgi?id=141356
992
993         Rubber-stamped by Darin Adler.
994
995         Folloup and build fix.
996
997         * NetworkProcess/cache/NetworkCacheCoders.h:
998         * NetworkProcess/cache/NetworkCacheKey.cpp:
999         (WebKit::hashString):
1000
1001             Use containsOnlyASCII instead of is8Bit so both paths always compute the same hash.
1002
1003         * NetworkProcess/cache/NetworkCacheKey.h:
1004
1005 2015-02-07  Antti Koivisto  <antti@apple.com>
1006
1007         Remove a printf.
1008
1009         * NetworkProcess/cache/NetworkCache.cpp:
1010         (WebKit::NetworkCache::retrieve):
1011
1012 2015-02-07  Antti Koivisto  <antti@apple.com>
1013
1014         Use longer hashes for cache keys
1015         https://bugs.webkit.org/show_bug.cgi?id=141356
1016
1017         Reviewed by Darin Adler.
1018
1019         The current key hashes are 32bit. We should use longer hashes to eliminate collisions.
1020
1021         This patch switches us to using MD5 digests for the cache key hashes. As a result the file names for the cache
1022         entries grow from 8 to 32 character.
1023
1024         Note that we don't need a cryptographic hash (full cache keys are verified against the entries).
1025         MD5 just happens to be fast, convenient and available.
1026
1027         The patch also moves the whole cache hierarchy down to a versioned subdirectory ("WebKitCache/Version 2")
1028         and deletes any old style cache files if they exist.
1029
1030         * NetworkProcess/cache/NetworkCacheCoders.cpp:
1031         (WebKit::NetworkCacheCoder<MD5::Digest>::encode):
1032         (WebKit::NetworkCacheCoder<MD5::Digest>::decode):
1033         * NetworkProcess/cache/NetworkCacheCoders.h:
1034         * NetworkProcess/cache/NetworkCacheKey.cpp:
1035         (WebKit::NetworkCacheKey::NetworkCacheKey):
1036         (WebKit::hashString):
1037         (WebKit::NetworkCacheKey::computeHash):
1038         (WebKit::NetworkCacheKey::hashAsString):
1039         (WebKit::NetworkCacheKey::stringToHash):
1040         * NetworkProcess/cache/NetworkCacheKey.h:
1041         (WebKit::NetworkCacheKey::shortHash):
1042         (WebKit::NetworkCacheKey::toShortHash):
1043
1044             32bit hash to use in the bloom filter.
1045
1046         (WebKit::NetworkCacheKey::hashStringLength):
1047         * NetworkProcess/cache/NetworkCacheStorage.h:
1048
1049             Bump the version.
1050
1051         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1052         (WebKit::traverseCacheFiles):
1053         (WebKit::makeVersionedDirectoryPath):
1054         (WebKit::NetworkCacheStorage::NetworkCacheStorage):
1055         (WebKit::NetworkCacheStorage::initialize):
1056         (WebKit::NetworkCacheStorage::removeEntry):
1057         (WebKit::NetworkCacheStorage::retrieve):
1058         (WebKit::NetworkCacheStorage::store):
1059         (WebKit::NetworkCacheStorage::update):
1060         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
1061         (WebKit::NetworkCacheStorage::deleteOldVersions):
1062
1063             Wipe out the version 1 cache.
1064
1065 2015-02-06  Chris Dumez  <cdumez@apple.com>
1066
1067         Have SQLiteStatement::database() return a reference
1068         https://bugs.webkit.org/show_bug.cgi?id=141348
1069
1070         Reviewed by Andreas Kling.
1071
1072         Have SQLiteStatement::database() return a reference as it can never
1073         return null.
1074
1075         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
1076         (WebKit::SQLiteIDBCursor::internalAdvanceOnce):
1077
1078 2015-02-06  Alexey Proskuryakov  <ap@apple.com>
1079
1080         Report network process crashes during layout tests
1081         https://bugs.webkit.org/show_bug.cgi?id=139646
1082
1083         Reviewed by Anders Carlsson.
1084
1085         Added a way to get network process pid, modeled after how we do this for web process.
1086
1087         * UIProcess/API/C/mac/WKContextPrivateMac.h:
1088         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
1089         (WKContextGetNetworkProcessIdentifier):
1090         * UIProcess/WebProcessPool.cpp:
1091         (WebKit::WebProcessPool::networkProcessCrashed): Don't reset m_networkProcess until
1092         after calling the client, so that the client could retrieve its pid.
1093         (WebKit::WebProcessPool::networkProcessIdentifier):
1094         * UIProcess/WebProcessPool.h:
1095
1096 2015-02-05  Timothy Hatcher  <timothy@apple.com>
1097
1098         Support overriding the deviceScaleFactor per WKWebView/WKView
1099         https://bugs.webkit.org/show_bug.cgi?id=141311
1100
1101         Reviewed by Tim Horton.
1102
1103         * UIProcess/API/Cocoa/WKViewPrivate.h:
1104         * UIProcess/API/Cocoa/WKWebView.mm:
1105         (-[WKWebView _setOverrideDeviceScaleFactor:]):
1106         (-[WKWebView _overrideDeviceScaleFactor]):
1107         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1108         * UIProcess/API/mac/WKView.mm:
1109         (-[WKView _intrinsicDeviceScaleFactor]):
1110         (-[WKView _setOverrideDeviceScaleFactor:]):
1111         (-[WKView _overrideDeviceScaleFactor]):
1112
1113 2015-02-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1114
1115         [GTK] Remove WebKitWebView::close-notification signal
1116         https://bugs.webkit.org/show_bug.cgi?id=141330
1117
1118         Reviewed by Gustavo Noronha Silva.
1119
1120         In favor of a WebKitNotification::closed signal and
1121         webkit_notification_close() method that both applications and
1122         WebKit can use to close a notification. This also fixes the
1123         onclose event that was not fired when the notification was
1124         closed. It also brings back padding space in WebKitWebViewClass.
1125
1126         * UIProcess/API/gtk/WebKitNotification.cpp:
1127         (webkit_notification_class_init): Add WebKitNotification::closed signal.
1128         (webkit_notification_close): Emit WebKitNotification::closed.
1129         * UIProcess/API/gtk/WebKitNotification.h:
1130         * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
1131         (WebKitNotificationProvider::notificationCloseCallback): Callback
1132         for WebKitNotification::closed signal that notifies the WebProcess
1133         and removes the notification from the map.
1134         (WebKitNotificationProvider::show): Connect to WebKitNotification::closed.
1135         (WebKitNotificationProvider::cancelNotificationByID): Call webkit_notification_close().
1136         * UIProcess/API/gtk/WebKitNotificationProvider.h:
1137         * UIProcess/API/gtk/WebKitWebView.cpp:
1138         (notifyNotificationClosed): The user closed the annotation, call
1139         webkit_notification_close().
1140         (webNotificationClosed): The WebKitNotification has been closed,
1141         close the libnotify notification if it hasn't been closed yet.
1142         (webkitWebViewShowNotification): Create the libnotifiy
1143         notification if needed and associate it to the WebKitNotification
1144         as user data. Connect to the closed signal of both, the libnotifiy
1145         notification and the WebKit notification.
1146         (webkitWebViewCloseNotification): Deleted.
1147         (webkit_web_view_class_init): Remove close-notification signal and
1148         the default hanlder.
1149         (webkitWebViewEmitCloseNotification): Deleted.
1150         * UIProcess/API/gtk/WebKitWebView.h:
1151         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1152         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add webkit_notification_close.
1153
1154 2015-02-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1155
1156         ASSERTION FAILED: !m_adoptionIsRequired in WTF::RefCountedBase::ref
1157         https://bugs.webkit.org/show_bug.cgi?id=141035
1158
1159         Reviewed by Sergio Villar Senin.
1160
1161         Rename PrinterListGtk::singleton() as PrinterListGtk::getOrCreate(), and
1162         make it return nullptr when the shared PrinterListGtk object is
1163         still being created. This can happen if the nested loop used by
1164         gtk_enumerate_printers dispatches a GSource that starts a new
1165         synchronous print operation. In that case we just ignore the
1166         second print operation, since there's already one ongoing.
1167
1168         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1169         (WebKit::WebChromeClient::print): Return early if
1170         PrinterListGtk::getOrCreate() return nullptr.
1171         * WebProcess/WebPage/gtk/PrinterListGtk.cpp:
1172         (WebKit::PrinterListGtk::getOrCreate): Return nullptr if the
1173         PrinterListGtk is still enumerating the printers.
1174         (WebKit::PrinterListGtk::PrinterListGtk): Initialize
1175         m_enumeratingPrinters to true before calling
1176         gtk_enumerate_printers, and to false once it finishes.
1177         (WebKit::PrinterListGtk::singleton): Deleted.
1178         (WebKit::PrinterListGtk::enumeratePrintersFunction): Deleted.
1179         * WebProcess/WebPage/gtk/PrinterListGtk.h:
1180         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Add an
1181         assertion here since PrinterListGtk::getOrCreate() should never
1182         return nullptr at this point.
1183
1184 2015-02-05  Tim Horton  <timothy_horton@apple.com>
1185
1186         Null deref in ViewGestureController::beginSwipeGesture when swiping while script is navigating
1187         https://bugs.webkit.org/show_bug.cgi?id=141308
1188         <rdar://problem/18460046>
1189
1190         Reviewed by Simon Fraser.
1191
1192         * UIProcess/mac/ViewGestureControllerMac.mm:
1193         (WebKit::ViewGestureController::trackSwipeGesture):
1194         If script navigates (history.back, probably other cases too) while in the middle of
1195         building up enough scroll events to start a swipe, it can destroy the history item
1196         that we were planning to swipe to. If this happens, bail from the swipe.
1197
1198 2015-02-05  Alexey Proskuryakov  <ap@apple.com>
1199
1200         Don't pass architecture to development plug-in XPC services
1201         https://bugs.webkit.org/show_bug.cgi?id=141309
1202
1203         Reviewed by Anders Carlsson.
1204
1205         We now have separate services for 32-bit and 64-bit.
1206
1207         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
1208         (WebKit::reexec):
1209         (WebKit::XPCServiceEventHandler):
1210         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1211         (WebKit::connectToReExecService):
1212
1213 2015-02-05  Chris Dumez  <cdumez@apple.com>
1214
1215         Use deleteEmptyDirectory() in NetworkCacheStorage::clear()
1216         https://bugs.webkit.org/show_bug.cgi?id=141314
1217
1218         Reviewed by Antti Koivisto.
1219
1220         Use deleteEmptyDirectory() in NetworkCacheStorage::clear() to simplify
1221         the code a little bit.
1222
1223         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1224         (WebKit::NetworkCacheStorage::clear):
1225
1226 2015-02-05  Joseph Pecoraro  <pecoraro@apple.com>
1227
1228         [iOS] Remove False Positive dispatch_source Leak in WebMemoryPressureHandler singleton
1229         https://bugs.webkit.org/show_bug.cgi?id=141307
1230
1231         Reviewed by Anders Carlsson.
1232
1233         * UIProcess/ios/WebMemoryPressureHandlerIOS.h:
1234         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
1235         (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
1236         We want to keep the dispatch_source around, so just tie it to the
1237         singleton so that it is not reported as a leak.
1238
1239 2015-02-05  Antti Koivisto  <antti@apple.com>
1240
1241         Switch to file backed buffer when resource is cached to disk
1242         https://bugs.webkit.org/show_bug.cgi?id=141295
1243
1244         Reviewed by Chris Dumez.
1245
1246         Wire the DidCacheResource mechanism to the new disk cache.
1247
1248         * NetworkProcess/NetworkResourceLoader.cpp:
1249         (WebKit::NetworkResourceLoader::didFinishLoading):
1250
1251             Send DidCacheResource message to the web process so it can switch the resource to file backing.
1252
1253         * NetworkProcess/cache/NetworkCache.cpp:
1254         (WebKit::NetworkCache::store):
1255         (WebKit::NetworkCache::update):
1256         * NetworkProcess/cache/NetworkCache.h:
1257         * NetworkProcess/cache/NetworkCacheStorage.h:
1258         (WebKit::DispatchPtr::DispatchPtr):
1259         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1260         (WebKit::NetworkCacheStorage::Data::Data):
1261         (WebKit::mapFile):
1262         (WebKit::decodeEntry):
1263         (WebKit::retrieveActive):
1264         (WebKit::NetworkCacheStorage::retrieve):
1265         (WebKit::NetworkCacheStorage::store):
1266
1267             Map files larger than a memory page after a successful store.
1268
1269         (WebKit::NetworkCacheStorage::update):
1270         (WebKit::encodeEntry): Deleted.
1271
1272 2015-02-05  Chris Dumez  <cdumez@apple.com>
1273
1274         [WK2] Properly check for mmap() error case
1275         https://bugs.webkit.org/show_bug.cgi?id=141304
1276
1277         Reviewed by Anders Carlsson.
1278
1279         mmap() returns MAP_FAILED, which is (void*)-1, not a null pointer in
1280         case of failure. This patch updates several wrong error checks in
1281         WebKit2.
1282
1283         * Platform/IPC/ArgumentEncoder.cpp:
1284         (IPC::allocBuffer):
1285         (IPC::ArgumentEncoder::reserve):
1286         * Platform/IPC/mac/ConnectionMac.mm:
1287         (IPC::Connection::sendOutgoingMessage):
1288
1289 2015-02-05  Brian J. Burg  <burg@cs.washington.edu>
1290
1291         Clean up WebInspectorProxy and use simpler inspector levels design
1292         https://bugs.webkit.org/show_bug.cgi?id=141135
1293
1294         Reviewed by Timothy Hatcher.
1295
1296         Inspector levels used to be managed by keeping a set of WebPageGroup
1297         instances and doing pointer comparisons to check whether the inspected
1298         view is itself a web inspector instance. This is unnecessary, as we
1299         can maintain a mapping from WebPageProxy* to its corresponding level.
1300
1301         When an inspector instance is created, it is inserted into the mapping
1302         along with its level. An inspector's level is 1 unless its inspected page
1303         is in the mapping, then it is one greater that the inspected page's level.
1304
1305         The level is provided by inspectorLevel(), rather than a member variable.
1306         WebInspectorProxy is created in the constructor of WebPageProxy. Thus, there
1307         would be no chance to add the inspector page's level to the mapping before the
1308         next level inspector tries to look it up when initializing its members.
1309
1310         This patch introduces other miscellaneous cleanups, such as naming m_page
1311         to m_inspectedPage, using Ref and using an enum class for the attachment side.
1312
1313         * UIProcess/API/C/WKInspector.cpp:
1314         (WKInspectorGetPage):
1315         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1316         (resizeWebKitWebViewBaseFromAllocation):
1317         * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp:
1318         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
1319         * UIProcess/WebInspectorProxy.cpp:
1320         (WebKit::pageLevelMap):
1321         (WebKit::WebInspectorProxy::WebInspectorProxy):
1322         (WebKit::WebInspectorProxy::inspectorLevel):
1323         (WebKit::WebInspectorProxy::inspectorPageGroupIdentifier):
1324         (WebKit::WebInspectorProxy::inspectorPagePreferences):
1325         (WebKit::WebInspectorProxy::invalidate):
1326         (WebKit::WebInspectorProxy::isFront):
1327         (WebKit::WebInspectorProxy::connect):
1328         (WebKit::WebInspectorProxy::show):
1329         (WebKit::WebInspectorProxy::hide):
1330         (WebKit::WebInspectorProxy::close):
1331         (WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess):
1332         (WebKit::WebInspectorProxy::showConsole):
1333         (WebKit::WebInspectorProxy::showResources):
1334         (WebKit::WebInspectorProxy::showMainResourceForFrame):
1335         (WebKit::WebInspectorProxy::attachBottom):
1336         (WebKit::WebInspectorProxy::attachRight):
1337         (WebKit::WebInspectorProxy::attach):
1338         (WebKit::WebInspectorProxy::detach):
1339         (WebKit::WebInspectorProxy::togglePageProfiling):
1340         (WebKit::WebInspectorProxy::isInspectorPage):
1341         (WebKit::decidePolicyForNavigationAction):
1342         (WebKit::WebInspectorProxy::remoteFrontendConnected):
1343         (WebKit::WebInspectorProxy::remoteFrontendDisconnected):
1344         (WebKit::WebInspectorProxy::dispatchMessageFromRemoteFrontend):
1345         (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
1346         (WebKit::WebInspectorProxy::createInspectorPage):
1347         (WebKit::WebInspectorProxy::didClose):
1348         (WebKit::WebInspectorPageGroups::singleton): Deleted.
1349         (WebKit::WebInspectorPageGroups::inspectorLevel): Deleted.
1350         (WebKit::WebInspectorPageGroups::isInspectorPageGroup): Deleted.
1351         (WebKit::WebInspectorPageGroups::inspectorPageGroupLevel): Deleted.
1352         (WebKit::WebInspectorPageGroups::inspectorPageGroupForLevel): Deleted.
1353         (WebKit::WebInspectorPageGroups::createInspectorPageGroup): Deleted.
1354         (WebKit::WebInspectorProxy::~WebInspectorProxy): Deleted.
1355         (WebKit::WebInspectorProxy::inspectorPageGroup): Deleted.
1356         (WebKit::WebInspectorProxy::setAttachedWindowHeight): Deleted.
1357         (WebKit::WebInspectorProxy::enableRemoteInspection): Deleted.
1358         (WebKit::WebInspectorProxy::open): Deleted.
1359         * UIProcess/WebInspectorProxy.h:
1360         (WebKit::WebInspectorProxy::create):
1361         (WebKit::WebInspectorProxy::inspectedPage):
1362         (WebKit::WebInspectorProxy::page): Deleted.
1363         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1364         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1365         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1366         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1367         (WebKit::WebInspectorProxy::dockButtonClicked):
1368         (WebKit::WebInspectorProxy::createInspectorWindow):
1369         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
1370         (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
1371         (WebKit::WebInspectorProxy::platformAttach):
1372         (WebKit::WebInspectorProxy::platformDetach):
1373         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
1374         (WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
1375         * UIProcess/mac/WebInspectorProxyMac.mm:
1376         (-[WKWebInspectorProxyObjCAdapter attachRight:]):
1377         (-[WKWebInspectorProxyObjCAdapter attachBottom:]):
1378         (WebKit::WebInspectorProxy::createInspectorWindow):
1379         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1380         (WebKit::WebInspectorProxy::platformBringToFront):
1381         (WebKit::WebInspectorProxy::windowFrameDidChange):
1382         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
1383         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
1384         (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
1385         (WebKit::WebInspectorProxy::platformAttach):
1386         (WebKit::WebInspectorProxy::platformDetach):
1387         (-[WKWebInspectorProxyObjCAdapter close]): Deleted.
1388
1389 2015-02-05  Chris Dumez  <cdumez@apple.com>
1390
1391         [WK2][Cocoa] Populate m_contentsFilter bloom filter from the main dispatch queue NetworkCacheStorage::initialize()
1392         https://bugs.webkit.org/show_bug.cgi?id=141297
1393
1394         Reviewed by Antti Koivisto.
1395
1396         Populate m_contentsFilter bloom filter from the main dispatch queue
1397         NetworkCacheStorage::initialize() to avoid thread-safety issues.
1398
1399         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1400         (WebKit::NetworkCacheStorage::initialize):
1401
1402 2015-02-05  Chris Dumez  <cdumez@apple.com>
1403
1404         Use deleteFile() in NetworkCacheStorageCocoa.mm
1405         https://bugs.webkit.org/show_bug.cgi?id=141299
1406
1407         Reviewed by Antti Koivisto.
1408
1409         Use deleteFile() in NetworkCacheStorageCocoa.mm to simplify the code
1410         a bit.
1411
1412         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1413         (WebKit::NetworkCacheStorage::removeEntry):
1414         (WebKit::NetworkCacheStorage::clear):
1415         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
1416
1417 2015-02-04  Antti Koivisto  <antti@apple.com>
1418
1419         Avoid copying std::functions across threads in NetworkCacheStorage
1420         https://bugs.webkit.org/show_bug.cgi?id=141273
1421
1422         Reviewed by Andreas Kling.
1423
1424         The current approach is risky. There is possiblity that captured variables are
1425         deleted in an unexpected thread.
1426
1427         * NetworkProcess/cache/NetworkCache.cpp:
1428         (WebKit::NetworkCache::retrieve):
1429
1430             The capture trick here is no longer needed.
1431
1432         * NetworkProcess/cache/NetworkCacheStorage.h:
1433
1434             For each cache operation we create Retrive/Store/UpdateOperation object kept alive by the active operation map.
1435             This object captures all parameters of the operation including the lambda. When the operation completes
1436             the object is removed from the map in the main thread, ensuring safe destruction.
1437
1438         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1439         (WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
1440         (WebKit::NetworkCacheStorage::dispatchPendingRetrieveOperations):
1441         (WebKit::retrieveActive):
1442
1443             Instead of maintaining a separate write cache we just look through the active write and update maps.
1444
1445         (WebKit::NetworkCacheStorage::retrieve):
1446
1447             Use fixed sized priority array rather than a dynamic one. Vector<Deque<std::unique_ptr>> doesn't quite work.
1448
1449         (WebKit::NetworkCacheStorage::store):
1450         (WebKit::NetworkCacheStorage::update):
1451         (WebKit::NetworkCacheStorage::clear):
1452
1453 2015-02-05  Youenn Fablet  <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
1454
1455         [Streams API] Implement a barebone ReadableStream interface
1456         https://bugs.webkit.org/show_bug.cgi?id=141045
1457
1458         Reviewed by Benjamin Poulain.
1459
1460         * CMakeLists.txt:
1461         * Configurations/FeatureDefines.xcconfig:
1462
1463 2015-02-04  Joseph Pecoraro  <pecoraro@apple.com>
1464
1465         [iOS] Selection callout does not follow selection when double-tap scrolling
1466         https://bugs.webkit.org/show_bug.cgi?id=141214
1467
1468         Reviewed by Benjamin Poulain.
1469
1470         Implement the delegate that gets called after UIScrollView
1471         setContentOffset animations. When scrolling to a rect, do the normal
1472         willScroll, didScroll actions to update the selection assistant.
1473
1474         * UIProcess/API/Cocoa/WKWebView.mm:
1475         (-[WKWebView _scrollToRect:origin:minimumScrollDistance:]):
1476         (-[WKWebView scrollViewDidEndScrollingAnimation:]):
1477
1478 2015-02-04  Simon Fraser  <simon.fraser@apple.com>
1479
1480         [iOS WK2] Layers that are created and destroyed in the same transaction shouldn't be encoded
1481         https://bugs.webkit.org/show_bug.cgi?id=141228
1482
1483         Reviewed by Tim Horton.
1484         
1485         With UI-side compositing, it was possible for layers to get created and
1486         destroyed in the same transaction (e.g. two layouts before a single layer
1487         tree commit). When that happened we would encode layer creation properties
1488         but not encode layer properties, since the layer would be unreachable.
1489         
1490         Fix by removing deleted layers from the created layers list, which is
1491         converted into a map for easy searching.
1492
1493         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
1494         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1495         (WebKit::RemoteLayerTreeContext::layerWasCreated):
1496         (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
1497         (WebKit::RemoteLayerTreeContext::buildTransaction):
1498
1499 2015-02-04  Michael Catanzaro  <mcatanzaro@igalia.com>
1500
1501         Build with seccomp filters broken since r179409
1502         https://bugs.webkit.org/show_bug.cgi?id=141206
1503
1504         Reviewed by Darin Adler.
1505
1506         Fix build by renaming SeccompBrokerClient::shared to SeccompBrokerClient::singleton.
1507
1508         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
1509         (WebKit::SeccompBrokerClient::singleton):
1510         (WebKit::SeccompBroker::initialize):
1511         (WebKit::SeccompBrokerClient::shared):
1512         (WebKit::SeccompBroker::runLoop):
1513
1514 2015-02-04  Simon Fraser  <simon.fraser@apple.com>
1515
1516         [iOS WK2] Assert in ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren() on tab switching
1517         https://bugs.webkit.org/show_bug.cgi?id=141223
1518         rdar://problem/18458993
1519
1520         Reviewed by Tim Horton.
1521
1522         It's possible to submit a RemoteLayerTree transaction that contains data
1523         about a created layer, but doesn't have any properties for that layer. This
1524         happens when the newly created layer isn't reached during the traversal that
1525         gathers layer properties (i.e. it's not rooted). However, whether we create
1526         a scrolling layer or not requires having properties; they are missing, so we
1527         create a normal layer, but then the scrolling tree commit asserts that we
1528         should have a scrolling layer.
1529         
1530         Fix by making scrolling layers have a corresponding layer type, which is
1531         stored in layer creation properties. This required exposing layer types
1532         up through GraphicsLayer, but that allows for some nice cleanup:
1533         
1534         1. No need to have the hokey shouldUseTiledBacking() GraphicsLayerClient hack
1535            for creating the page tiled layer.
1536         2. The notion of "custom behaviors" can be removed from GraphicsLayer entirely.
1537
1538         * Shared/mac/RemoteLayerBackingStore.mm:
1539         (WebKit::RemoteLayerBackingStore::drawInContext):
1540         * Shared/mac/RemoteLayerTreeTransaction.h:
1541         * Shared/mac/RemoteLayerTreeTransaction.mm:
1542         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
1543         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1544         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1545         (WebKit::dumpChangedLayers):
1546         (WebKit::RemoteLayerTreeTransaction::description):
1547         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
1548         (WebKit::RemoteLayerTreeHost::createLayer):
1549         * UIProcess/mac/RemoteLayerTreeHost.mm:
1550         (WebKit::RemoteLayerTreeHost::createLayer):
1551         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
1552         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1553         (WebKit::PlatformCALayerRemote::customBehavior): Deleted.
1554         (WebKit::PlatformCALayerRemote::updateCustomBehavior): Deleted.
1555         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1556         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
1557         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1558         (WebKit::RemoteLayerTreeContext::createGraphicsLayer):
1559
1560 2015-02-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1561
1562         [EFL][WK2] Manage failing API tests
1563         https://bugs.webkit.org/show_bug.cgi?id=141250
1564
1565         Reviewed by Csaba Osztrogonác.
1566
1567         * PlatformEfl.cmake: Skip to test test_ewk2_storage_manager.
1568         * UIProcess/API/efl/tests/test_ewk2_view.cpp: Disable 2 unit test functions.
1569         (TEST_F):
1570
1571 2015-02-04  Chris Dumez  <cdumez@apple.com>
1572
1573         Add removeFirst(value) / removeAll(value) methods to WTF::Vector
1574         https://bugs.webkit.org/show_bug.cgi?id=141192
1575
1576         Reviewed by Benjamin Poulain.
1577
1578         Use new Vector::removeFirst(value) / removeAll(value) API to simplify the
1579         code a bit.
1580
1581         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
1582         (WebKit::WebSoupCustomProtocolRequestManager::unregisterSchemeForCustomProtocol):
1583         * UIProcess/PageLoadState.cpp:
1584         (WebKit::PageLoadState::removeObserver):
1585         * UIProcess/WebProcessPool.cpp:
1586         (WebKit::WebProcessPool::~WebProcessPool):
1587         (WebKit::WebProcessPool::disconnectProcess):
1588         * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
1589         (EwkExtension::remove):
1590
1591 2015-02-03  Chris Dumez  <cdumez@apple.com>
1592
1593         Unreviewed attempt to fix GTK/EFL build after r179588.
1594
1595         Add new files to CMakeLists.txt.
1596
1597         * CMakeLists.txt:
1598
1599 2015-02-03  Shivakumar JM  <shiva.jm@samsung.com>
1600
1601         Fix build warning in WebKit2/Platform/IPC module.
1602         https://bugs.webkit.org/show_bug.cgi?id=141229
1603
1604         Reviewed by Chris Dumez.
1605
1606         Fix build warning by using UNUSED_PARAM macro.
1607
1608         * Platform/IPC/Connection.cpp:
1609         (IPC::Connection::sendMessage):
1610
1611 2015-02-03  Tim Horton  <timothy_horton@apple.com>
1612
1613         Add WKPageNavigationClient as C SPI around API::NavigationClient, and adopt in WKTR
1614         https://bugs.webkit.org/show_bug.cgi?id=141217
1615
1616         * UIProcess/API/C/WKPageRenderingProgressEventsInternal.h:
1617         Include, not import.
1618
1619 2015-02-03  Tim Horton  <timothy_horton@apple.com>
1620
1621         Add WKPageNavigationClient as C SPI around API::NavigationClient, and adopt in WKTR
1622         https://bugs.webkit.org/show_bug.cgi?id=141217
1623
1624         Reviewed by Sam Weinig.
1625
1626         * Shared/API/c/WKBase.h:
1627         * UIProcess/API/C/WKAPICast.h:
1628         * UIProcess/API/C/WKFrameInfoRef.cpp: Added.
1629         (WKFrameInfoGetTypeID):
1630         * UIProcess/API/C/WKFrameInfoRef.h: Added.
1631         * UIProcess/API/C/WKNavigationActionRef.cpp: Added.
1632         (WKNavigationActionGetTypeID):
1633         * UIProcess/API/C/WKNavigationActionRef.h: Added.
1634         * UIProcess/API/C/WKNavigationRef.cpp: Added.
1635         (WKNavigationGetTypeID):
1636         * UIProcess/API/C/WKNavigationRef.h: Added.
1637         * UIProcess/API/C/WKNavigationResponseRef.cpp: Added.
1638         (WKNavigationResponseGetTypeID):
1639         (WKNavigationResponseCanShowMIMEType):
1640         * UIProcess/API/C/WKNavigationResponseRef.h: Added.
1641         Add tiny C wrappers around API::{FrameInfo, NavigationAction, Navigation, NavigationResponse}.
1642
1643         * UIProcess/API/APINavigationClient.h:
1644         (API::NavigationClient::decidePolicyForPluginLoad):
1645         Add a default implementation of decidePolicyForPluginLoad.
1646
1647         * UIProcess/API/C/WKPage.cpp:
1648         (WKPageSetPageNavigationClient):
1649         * UIProcess/API/C/WKPage.h:
1650         Add WKPageSetPageNavigationClient, which connects API::NavigationClient to
1651         the new WKPageNavigationClient C SPI.
1652         
1653         * UIProcess/API/C/WKPageNavigationClient.h: Added.
1654         Add WKPageNavigationClient, which one can use in place of WKPageLoaderClient
1655         and WKPagePolicyClient and which has the same semantics as the Modern ObjC API
1656         (including things like API::Navigation as WKNavigationRef, etc.)
1657
1658         * UIProcess/API/C/WKPageLoaderClient.h:
1659         * UIProcess/API/C/WKPageRenderingProgressEvents.h: Added.
1660         * UIProcess/API/C/WKPageRenderingProgressEventsInternal.h: Added.
1661         (pageRenderingProgressEvents):
1662         * UIProcess/API/C/WKPluginLoadPolicy.h: Added.
1663         Pull some enums out into their own files (WKPageRenderingProgressEvents is
1664         duplicated from the Modern ObjC API's _WKRenderingProgressEvents, WKPluginLoadPolicy
1665         is pulled out of WKPageLoaderClient).
1666
1667         * UIProcess/WebPageProxy.cpp:
1668         (WebKit::WebPageProxy::findPlugin):
1669         Add an equivalent of pluginLoadPolicy to the NavigationClient.
1670
1671         * WebKit2.xcodeproj/project.pbxproj:
1672
1673 2015-02-03  Timothy Horton  <timothy_horton@apple.com>
1674
1675         Every PageOverlayClientImpl leaks
1676         https://bugs.webkit.org/show_bug.cgi?id=141224
1677         <rdar://problem/19652939>
1678
1679         Reviewed by Simon Fraser.
1680
1681         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
1682         (WKBundlePageOverlayCreate):
1683         * WebProcess/WebPage/WebPageOverlay.cpp:
1684         (WebKit::WebPageOverlay::create):
1685         (WebKit::WebPageOverlay::WebPageOverlay):
1686         (WebKit::WebPageOverlay::pageOverlayDestroyed):
1687         (WebKit::WebPageOverlay::willMoveToPage):
1688         (WebKit::WebPageOverlay::didMoveToPage):
1689         (WebKit::WebPageOverlay::drawRect):
1690         (WebKit::WebPageOverlay::mouseEvent):
1691         (WebKit::WebPageOverlay::didScrollFrame):
1692         (WebKit::WebPageOverlay::actionContextForResultAtPoint):
1693         (WebKit::WebPageOverlay::dataDetectorsDidPresentUI):
1694         (WebKit::WebPageOverlay::dataDetectorsDidChangeUI):
1695         (WebKit::WebPageOverlay::dataDetectorsDidHideUI):
1696         (WebKit::WebPageOverlay::copyAccessibilityAttributeStringValueForPoint):
1697         (WebKit::WebPageOverlay::copyAccessibilityAttributeBoolValueForPoint):
1698         (WebKit::WebPageOverlay::copyAccessibilityAttributeNames):
1699         * WebProcess/WebPage/WebPageOverlay.h:
1700         (WebKit::WebPageOverlay::client):
1701         Keep the PageOverlayClientImpl as a unique_ptr instead of a leaked reference,
1702         ensuring that it's cleaned up when the WebPageOverlay is torn down.
1703
1704 2015-02-03  Chris Dumez  <cdumez@apple.com>
1705
1706         Drop ResourceLoadPriorityUnresolved resource load priority and use Optional<> instead
1707         https://bugs.webkit.org/show_bug.cgi?id=141186
1708
1709         Reviewed by Antti Koivisto.
1710
1711         Update code now that ResourceLoadPriorityUnresolved is not longer a
1712         ResourceLoadPriority enum value.
1713
1714         * NetworkProcess/cache/NetworkCache.cpp:
1715         (WebKit::NetworkCache::retrieve):
1716         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1717         (WebKit::WebResourceLoadScheduler::scheduleLoad):
1718
1719 2015-02-03  Enrica Casucci  <enrica@apple.com>
1720
1721         [iOS] Add support for deleteFromInputWithFlags.
1722         https://bugs.webkit.org/show_bug.cgi?id=141216
1723         rdar://problem/19130081
1724
1725         Reviewed by Benjamin Poulain.
1726
1727         Adopts the new method as soon as it is available.
1728         The patch also removes some obsolete code used for staging.
1729
1730         * Platform/spi/ios/UIKitSPI.h:
1731         * UIProcess/ios/WKContentViewInteraction.mm:
1732         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
1733
1734 2015-02-03  Joseph Pecoraro  <pecoraro@apple.com>
1735
1736         [iOS] Selection Callout should not immediately disappear on pages with frequent layouts
1737         https://bugs.webkit.org/show_bug.cgi?id=141210
1738
1739         Reviewed by Enrica Casucci.
1740
1741         In iOS WebKit2 in order to keep caret refreshes in sync with WebCore layouts
1742         the selection assistant is told to update whenever WebKit's layer tree
1743         commits. Unfortunately, for pages with JavaScript animation that are
1744         frequently doing a layout / layer tree update, this would trigger very
1745         frequent selection updates that would keep the caret from blinking and
1746         dismiss any selection callouts.
1747
1748         This change tracks the last selection drawing information so that we can
1749         avoid informing the assistant of a selection updates unless it has changed
1750         visually or needs to redraw (zoom).
1751
1752         * Shared/EditorState.cpp:
1753         Remove include already in header.
1754
1755         * UIProcess/ios/WKContentViewInteraction.h:
1756         * UIProcess/ios/WKContentViewInteraction.mm:
1757         (WebKit::WKSelectionDrawingInfo::WKSelectionDrawingInfo):
1758         (WebKit::operator==):
1759         (WebKit::operator!=):
1760         (-[WKContentView observeValueForKeyPath:ofObject:change:context:]):
1761         When zooming, force the selection update, even though the drawing
1762         information hasn't changed, the views will need to be updated.
1763
1764         (-[WKContentView _updateChangedSelection]):
1765         (-[WKContentView _updateChangedSelection:]):
1766         Monitor EditorState for changes in selection drawing and avoid
1767         informing the selection assistant unless necessary.
1768
1769 2015-02-03  Jeremy Jones  <jeremyj@apple.com>
1770
1771         Prevent flicker when exiting fullscreen by synchronizing transactions.
1772         https://bugs.webkit.org/show_bug.cgi?id=140897
1773
1774         Reviewed by Tim Horton.
1775
1776         Flush transactions before removing layerHost. This allows existing transactions to be completed before the hosting layer disappears.
1777
1778         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1779         (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen):
1780
1781 2015-02-03  Brian J. Burg  <burg@cs.washington.edu>
1782
1783         Convert WebInspectorProxy to use WKWebView API for the inspector view
1784         https://bugs.webkit.org/show_bug.cgi?id=141037
1785
1786         Reviewed by Timothy Hatcher.
1787
1788         Use the newer API for PLATFORM(MAC). The main difference is that the
1789         WKWebView's page group cannot be set directly; instead, the group identifier
1790         is passed. Also add some preference setters needed for the inspector.
1791
1792         Refactor some code to not use page groups directly. In a future patch,
1793         the PageGroup-based inspector level system will be simplified. It is
1794         it is no longer necessary to keep a static map of PageGroup instances,
1795         since they are only used to save inspector window preferences. (These used
1796         to prevent all levels of inspector from pausing together when a second-level
1797         inspector hit a breakpoint. This is not necessary with multi-process
1798         web inspectors.)
1799
1800         Also, adjust window resizing behavior when the inspector is docked to
1801         the right. Window width resizes should not affect the width of the inspector
1802         frame. This matches the behavior of height changes when docked to the bottom.
1803
1804         To support 32-bit Mac builds where WKWebView is not defined, share the stub
1805         platformFoo() implementations with PLATFORM(IOS). The stubs are now located
1806         in the platform-independent WebInspectorProxy.cpp.
1807
1808         * UIProcess/API/Cocoa/WKPreferences.mm:
1809         (-[WKPreferences _logsPageMessagesToSystemConsoleEnabled]): Added.
1810         (-[WKPreferences _setLogsPageMessagesToSystemConsoleEnabled:]): Added.
1811         (-[WKPreferences _allowFileAccessFromFileURLs]): Added.
1812         (-[WKPreferences _setAllowFileAccessFromFileURLs:]): Added.
1813         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1814         * UIProcess/WebInspectorProxy.cpp:
1815         (WebKit::WebInspectorProxy::WebInspectorProxy):
1816         (WebKit::WebInspectorProxy::inspectorPagePreferences):
1817         (WebKit::WebInspectorProxy::attach):
1818         (WebKit::WebInspectorProxy::detach):
1819         (WebKit::WebInspectorProxy::setAttachedWindowHeight):
1820         (WebKit::WebInspectorProxy::setAttachedWindowWidth):
1821         (WebKit::WebInspectorProxy::createInspectorPage):
1822         (WebKit::WebInspectorProxy::shouldOpenAttached):
1823         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1824         (WebKit::WebInspectorProxy::platformOpen):
1825         (WebKit::WebInspectorProxy::platformDidClose):
1826         (WebKit::WebInspectorProxy::platformInvalidate):
1827         (WebKit::WebInspectorProxy::platformBringToFront):
1828         (WebKit::WebInspectorProxy::platformHide):
1829         (WebKit::WebInspectorProxy::platformIsFront):
1830         (WebKit::WebInspectorProxy::platformInspectedURLChanged):
1831         (WebKit::WebInspectorProxy::platformSave):
1832         (WebKit::WebInspectorProxy::platformAppend):
1833         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
1834         (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
1835         (WebKit::WebInspectorProxy::platformAttach):
1836         (WebKit::WebInspectorProxy::platformDetach):
1837         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
1838         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
1839         (WebKit::WebInspectorProxy::inspectorPageURL):
1840         (WebKit::WebInspectorProxy::inspectorTestPageURL):
1841         (WebKit::WebInspectorProxy::inspectorBaseURL):
1842         (WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
1843         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
1844         * UIProcess/WebInspectorProxy.h:
1845         * UIProcess/ios/WebInspectorProxyIOS.mm: Removed.
1846         * UIProcess/mac/WebInspectorProxyMac.mm:
1847         (-[WKWebInspectorWKWebView _didRelaunchProcess]):
1848         WKWebView doesn't implement this, so remove the super call.
1849         (WebKit::WebInspectorProxy::closeTimerFired):
1850         (WebKit::createDockButton):
1851         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1852         (WebKit::WebInspectorProxy::platformAttach):
1853         (-[WKWebInspectorWKView _didRelaunchProcess]): Deleted.
1854         * WebKit2.xcodeproj/project.pbxproj:
1855
1856 2015-02-03  Antti Koivisto  <antti@apple.com>
1857
1858         Memory cache for resources pending disk write
1859         https://bugs.webkit.org/show_bug.cgi?id=141159
1860
1861         Reviewed by Andreas Kling.
1862
1863         If a resource was requested from the disk cache before it has been written we ended up
1864         loading it again. Add a short lived memory cache to avoid this.
1865
1866         * NetworkProcess/cache/NetworkCache.cpp:
1867         (WebKit::decodeStorageEntry):
1868         * NetworkProcess/cache/NetworkCacheStorage.h:
1869         (WebKit::NetworkCacheStorage::Data::isMap):
1870
1871             Add a way to know whether a Data is backed by map or not. SharedMemory does not work correctly
1872             if it is not a map.
1873
1874         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1875         (WebKit::NetworkCacheStorage::Data::Data):
1876         (WebKit::NetworkCacheStorage::initialize):
1877
1878             Also do some renaming.
1879
1880         (WebKit::decodeEntry):
1881         (WebKit::NetworkCacheStorage::removeEntry):
1882         (WebKit::NetworkCacheStorage::retrieve):
1883         (WebKit::NetworkCacheStorage::store):
1884         (WebKit::NetworkCacheStorage::clear):
1885         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
1886
1887 2015-02-02  Antti Koivisto  <antti@apple.com>
1888
1889         Update cache header after revalidation without rewriting the body data
1890         https://bugs.webkit.org/show_bug.cgi?id=141182
1891
1892         Reviewed by Andreas Kling.
1893
1894         Currently we just rewrite the entire entry after revalidation.
1895
1896         * NetworkProcess/cache/NetworkCache.cpp:
1897         (WebKit::decodeStorageEntry):
1898
1899             Include the strorage entry to the cache response so we can more easily update it.
1900
1901         (WebKit::NetworkCache::update):
1902
1903             Call the storage update function with the new and the exisiting storage entry.
1904
1905         * NetworkProcess/cache/NetworkCache.h:
1906         * NetworkProcess/cache/NetworkCacheStorage.h:
1907         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1908         (WebKit::openFileForKey):
1909
1910             Added an option for opening a file for writing without creating a new one.
1911             Renamed for clarity.
1912
1913         (WebKit::encodeEntryHeader):
1914
1915             Separate header encoding to a function.
1916
1917         (WebKit::encodeEntry):
1918         (WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
1919         (WebKit::NetworkCacheStorage::store):
1920         (WebKit::NetworkCacheStorage::update):
1921
1922             New update function.
1923             If the page-rounded header size would stay unchanged we can just write the new header over the old one.
1924             In the unlikely event it doesn't we rewrite the whole thing.
1925
1926         (WebKit::createIOChannelForKey): Deleted.
1927
1928 2015-02-02  Commit Queue  <commit-queue@webkit.org>
1929
1930         Unreviewed, rolling out r179540.
1931         https://bugs.webkit.org/show_bug.cgi?id=141190
1932
1933         need further investigation to fix !WK_API_ENABLED (32bit)
1934         build. (Requested by brrian_ on #webkit).
1935
1936         Reverted changeset:
1937
1938         "Convert WebInspectorProxy to use WKWebView API for the
1939         inspector view"
1940         https://bugs.webkit.org/show_bug.cgi?id=141037
1941         http://trac.webkit.org/changeset/179540
1942
1943 2015-02-02  Brian J. Burg  <burg@cs.washington.edu>
1944
1945         Convert WebInspectorProxy to use WKWebView API for the inspector view
1946         https://bugs.webkit.org/show_bug.cgi?id=141037
1947
1948         Reviewed by Timothy Hatcher.
1949
1950         Use the newer API for PLATFORM(MAC). The main difference is that the
1951         WKWebView's page group cannot be set directly; instead, the group identifier
1952         is passed. Also add some preference setters needed for the inspector.
1953
1954         Refactor some code to not use page groups directly. In a future patch,
1955         the PageGroup-based inspector level system will be simplified. It is
1956         it is no longer necessary to keep a static map of PageGroup instances,
1957         since they are only used to save inspector window preferences. (These used
1958         to prevent all levels of inspector from pausing together when a second-level
1959         inspector hit a breakpoint. This is not necessary with multi-process
1960         web inspectors.)
1961
1962         Also, adjust window resizing behavior when the inspector is docked to
1963         the right. Window width resizes should not affect the width of the inspector
1964         frame. This matches the behavior of height changes when docked to the bottom.
1965
1966         * UIProcess/API/Cocoa/WKPreferences.mm:
1967         (-[WKPreferences _logsPageMessagesToSystemConsoleEnabled]): Added.
1968         (-[WKPreferences _setLogsPageMessagesToSystemConsoleEnabled:]): Added.
1969         (-[WKPreferences _allowFileAccessFromFileURLs]): Added.
1970         (-[WKPreferences _setAllowFileAccessFromFileURLs:]): Added.
1971         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1972         * UIProcess/WebInspectorProxy.cpp:
1973         (WebKit::WebInspectorProxy::WebInspectorProxy):
1974         (WebKit::WebInspectorProxy::inspectorPagePreferences): Added.
1975         (WebKit::WebInspectorProxy::attach):
1976         (WebKit::WebInspectorProxy::detach):
1977         (WebKit::WebInspectorProxy::setAttachedWindowHeight):
1978         (WebKit::WebInspectorProxy::setAttachedWindowWidth):
1979         (WebKit::WebInspectorProxy::createInspectorPage):
1980         (WebKit::WebInspectorProxy::shouldOpenAttached):
1981         * UIProcess/WebInspectorProxy.h: Use default member initializers.
1982         * UIProcess/mac/WebInspectorProxyMac.mm:
1983         (-[WKWebInspectorWKWebView _didRelaunchProcess]):
1984         WKWebView doesn't implement this, so remove the super call.
1985         (WebKit::WebInspectorProxy::closeTimerFired):
1986         (WebKit::createDockButton):
1987         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1988         (WebKit::WebInspectorProxy::platformAttach):
1989         (-[WKWebInspectorWKView _didRelaunchProcess]): Deleted.
1990
1991 2015-02-02  Chris Dumez  <cdumez@apple.com>
1992
1993         Make NetworkCache's constructor private
1994         https://bugs.webkit.org/show_bug.cgi?id=141181
1995
1996         Reviewed by Antti Koivisto.
1997
1998         Make NetworkCache's constructor private and mark its destructor as
1999         deleted as it is a singleton class.
2000
2001         * NetworkProcess/cache/NetworkCache.cpp:
2002         (WebKit::NetworkCache::NetworkCache): Deleted.
2003         * NetworkProcess/cache/NetworkCache.h:
2004
2005 2015-02-02  Filip Pizlo  <fpizlo@apple.com>
2006
2007         Revert accidental (and super bad) change in r179490.
2008
2009         * WebProcess/com.apple.WebProcess.sb.in:
2010
2011 2015-02-02  Chris Dumez  <cdumez@apple.com>
2012
2013         Access MemoryCache singleton using MemoryCache::singleton()
2014         https://bugs.webkit.org/show_bug.cgi?id=141104
2015
2016         Reviewed by Andreas Kling.
2017
2018         Access MemoryCache singleton using MemoryCache::singleton() static
2019         member function, instead of a free function, as per the recent
2020         coding style discussion on WebKit-dev.
2021
2022 2015-02-02  Jeremy Jones  <jeremyj@apple.com>
2023
2024         Prevent crash when accessing WebAVPlayerController.delegate.
2025         https://bugs.webkit.org/show_bug.cgi?id=140893
2026
2027         Reviewed by Darin Adler.
2028
2029         Plumb new resetMediaState() through IPC interface WebVideoFullscreenManagerProxy.
2030
2031         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2032         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2033         (WebKit::WebVideoFullscreenManagerProxy::invalidate): remove redundant set to nullptr.
2034         * WebProcess/ios/WebVideoFullscreenManager.h:
2035         * WebProcess/ios/WebVideoFullscreenManager.mm:
2036         (WebKit::WebVideoFullscreenManager::resetMediaState):
2037
2038 2015-02-01  Chris Dumez  <cdumez@apple.com>
2039
2040         Use more references in HistoryItem
2041         https://bugs.webkit.org/show_bug.cgi?id=141133
2042
2043         Reviewed by Andreas Kling.
2044
2045         Use more references in HistoryItem instead of pointers.
2046
2047         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
2048         (WebKit::InjectedBundleBackForwardListItem::children):
2049         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
2050         (WebKit::toFrameState):
2051         (WebKit::applyFrameState):
2052         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2053         (WebKit::WebBackForwardListProxy::addItem):
2054         * WebProcess/WebPage/WebBackForwardListProxy.h:
2055
2056 2015-02-01  Dan Bernstein  <mitz@apple.com>
2057
2058         Remove ViewGestureController tracing
2059         https://bugs.webkit.org/show_bug.cgi?id=141137
2060
2061         Reviewed by Tim Horton.
2062
2063         Remove the tracing added in r176133, now that http://webkit.org/b/138750 is fixed.
2064
2065         * UIProcess/ios/ViewGestureControllerIOS.mm:
2066         (WebKit::ViewGestureController::beginSwipeGesture):
2067         (WebKit::ViewGestureController::endSwipeGesture):
2068         (WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
2069         (WebKit::ViewGestureController::removeSwipeSnapshot):
2070         (WebKit::addLogEntry): Deleted.
2071         (WebKit::dumpLogEntries): Deleted.
2072         * UIProcess/mac/ViewGestureController.h:
2073
2074 2015-01-31  Sam Weinig  <sam@webkit.org>
2075
2076         Remove even more Mountain Lion support
2077         https://bugs.webkit.org/show_bug.cgi?id=141124
2078
2079         Reviewed by Alexey Proskuryakov.
2080
2081         * Configurations/Base.xcconfig:
2082         * Configurations/DebugRelease.xcconfig:
2083         * Configurations/FeatureDefines.xcconfig:
2084         * Configurations/Version.xcconfig:
2085         * Configurations/WebContentService.Development.xcconfig:
2086         * Configurations/WebContentService.xcconfig:
2087         * Configurations/WebKit.xcconfig:
2088         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2089
2090 2015-01-31  Antti Koivisto  <antti@apple.com>
2091
2092         Enable WebKit disk cache on OS X
2093         https://bugs.webkit.org/show_bug.cgi?id=141022
2094
2095         Reviewed by Gavin Barraclough.
2096
2097         * config.h: Flip the switch.
2098
2099 2015-01-31  Antti Koivisto  <antti@apple.com>
2100
2101         Unreviewed, rolling out r179447.
2102
2103         Forgot to include the test.
2104
2105         Reverted changeset:
2106
2107         "Enable WebKit disk cache on OS X"
2108         https://bugs.webkit.org/show_bug.cgi?id=141022
2109         http://trac.webkit.org/changeset/179447
2110
2111 2015-01-31  Antti Koivisto  <antti@apple.com>
2112
2113         Enable WebKit disk cache on OS X
2114         https://bugs.webkit.org/show_bug.cgi?id=141022
2115
2116         Reviewed by Gavin Barraclough.
2117
2118         * config.h: Flip the switch.
2119
2120 2015-01-31  Antti Koivisto  <antti@apple.com>
2121
2122         OSObjectPtr does not work with dispatch_data_t on Maverics
2123         https://bugs.webkit.org/show_bug.cgi?id=141081
2124
2125         Reviewed by Zalan Bujtas.
2126
2127         Previous attempt to special case dispatch_data_t in OSObjectPtr didn't work in all cases
2128         probably due to the context sensitivity of the definition of the dispatch_data_t type.
2129
2130         For now, add DispatchPtr for the cache code and use it.
2131
2132         * NetworkProcess/cache/NetworkCacheStorage.h:
2133         (WebKit::DispatchPtr::DispatchPtr):
2134         (WebKit::DispatchPtr::~DispatchPtr):
2135         (WebKit::DispatchPtr::operator=):
2136         (WebKit::DispatchPtr::get):
2137         (WebKit::DispatchPtr::operator bool):
2138         (WebKit::adoptDispatch):
2139         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2140         (WebKit::NetworkCacheStorage::Data::Data):
2141         (WebKit::NetworkCacheStorage::Data::data):
2142         (WebKit::NetworkCacheStorage::NetworkCacheStorage):
2143         (WebKit::createIOChannelForKey):
2144         (WebKit::decodeEntry):
2145         (WebKit::encodeEntryMetaData):
2146         (WebKit::encodeEntry):
2147
2148 2015-01-30  Tim Horton  <timothy_horton@apple.com>
2149
2150         Add and hook up APINavigationClient
2151         https://bugs.webkit.org/show_bug.cgi?id=140698
2152
2153         Reviewed by Sam Weinig.
2154
2155         Add a single APINavigationClient that NavigationState implements and
2156         WebPageProxy prefers over APILoaderClient and APIPolicyClient.
2157
2158         * UIProcess/API/APILoaderClient.h:
2159         Fix a comment.
2160
2161         * UIProcess/API/APINavigationClient.h: Added.
2162         APINavigationClient is the union of NavigationState's overrides of APILoaderClient and APIPolicyClient.
2163         Names are adjusted to more closely match the Modern API.
2164
2165         * UIProcess/Cocoa/NavigationState.h:
2166         * UIProcess/Cocoa/NavigationState.mm:
2167         Instead of having policy and loader clients, NavigationState has a single navigation client.
2168         Adjust as necessary.
2169
2170         Move as much logic as possible (isMainFrame checks, construction of API objects) out of here
2171         and into WebPageProxy.
2172
2173         * UIProcess/API/Cocoa/WKWebView.mm:
2174         (-[WKWebView initWithFrame:configuration:]):
2175         Install the aforementioned single navigation client.
2176
2177         * UIProcess/WebPageProxy.cpp:
2178         (WebKit::WebPageProxy::setNavigationClient):
2179         Add a navigation client setter.
2180
2181         For all policy and loader client calls, if we have a navigation client, use that;
2182         otherwise, fall back on the policy and loader clients.
2183
2184         * UIProcess/WebPageProxy.h:
2185         * WebKit2.xcodeproj/project.pbxproj:
2186
2187 2015-01-30  Chris Dumez  <cdumez@apple.com>
2188
2189         Update MemoryCache code to use more references instead of pointers
2190         https://bugs.webkit.org/show_bug.cgi?id=141099
2191
2192         Reviewed by Andreas Kling.
2193
2194         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
2195         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
2196
2197 2015-01-30  Chris Dumez  <cdumez@apple.com>
2198
2199         Rename shared() static member functions to singleton() for singleton classes.
2200         https://bugs.webkit.org/show_bug.cgi?id=141088
2201
2202         Reviewed by Ryosuke Niwa and Benjamin Poulain.
2203
2204         Rename shared() static member functions to singleton() for singleton
2205         classes as per the recent coding style change.
2206
2207 2015-01-30  Alexey Proskuryakov  <ap@apple.com>
2208
2209         Build fix.
2210
2211         * Shared/API/c/WKDeprecatedFunctions.cpp:
2212         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2213         The screen font substitution functions still need to be present in the header.
2214
2215 2015-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2216
2217         [GTK] Resize the redirected XComposite again after leaving accelerated compositing mode
2218         https://bugs.webkit.org/show_bug.cgi?id=140935
2219
2220         Reviewed by Sergio Villar Senin.
2221
2222         Since r178414 we don't resize the redirected XComposite window
2223         until we enter accelerated compositing mode, but after leaving it
2224         the redirected window keeps its size. We should resize it to 1x1
2225         again and free the XPixmap and cairo surface to save that memory
2226         while not in accelerated compositing mode.
2227
2228         * UIProcess/API/gtk/PageClientImpl.cpp:
2229         (WebKit::PageClientImpl::enterAcceleratedCompositingMode): Notify
2230         the WebKitWebViewBase.
2231         (WebKit::PageClientImpl::exitAcceleratedCompositingMode): Ditto.
2232         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2233         (webkitWebViewBaseEnterAcceleratedCompositingMode): Resize the
2234         XComposite window to the current drawing area size.
2235         (webkitWebViewBaseExitAcceleratedCompositingMode): Resize the
2236         XComposite window to and empty size.
2237         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2238         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
2239         (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
2240         Do not initialize m_size since we now handle the empty size as a
2241         especial case. Make sure we always create the X window with at
2242         least 1x1 size.
2243         (WebKit::RedirectedXCompositeWindow::resize): Resize the window to
2244         at least 1x1, but when en empty size is given, call
2245         cleanupPixmapAndPixmapSurface() to release those resources.
2246         (WebKit::RedirectedXCompositeWindow::surface): Create the cairo
2247         surface with at least 1x1 size.
2248
2249 2015-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2250
2251         [GTK] Runtime critical warnings sometimes at start up when using the network process
2252         https://bugs.webkit.org/show_bug.cgi?id=140998
2253
2254         Reviewed by Žan Doberšek.
2255
2256         This is caused by the CustomProtocolManager work queue
2257         theread. This WorkQueue is created when the CustomProtocolManager
2258         object is constructed, but destroyed when it's initialized when
2259         the UI process asks to use the network process. In this case,
2260         sometimes happens that the work queue thread that runs the main
2261         loop is executed once the object has been destroyed and the main
2262         loop pointer is nullptr.
2263
2264         * Platform/WorkQueue.h:
2265         * Platform/gtk/WorkQueueGtk.cpp:
2266         (WorkQueue::platformInitialize): Use a lambda function for the
2267         thread body.
2268         (WorkQueue::platformInvalidate): Detach the worker thread before
2269         deleting the main loop object.
2270         (WorkQueue::startWorkQueueThread): Deleted.
2271         (WorkQueue::workQueueThreadBody): Deleted.
2272
2273 2015-01-29  Beth Dakin  <bdakin@apple.com>
2274
2275         Another follow-on, spotted this mistake. This used to be 
2276         #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 , so it should now be 
2277         COCOA.
2278
2279         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2280         (WebKit::registerUserDefaultsIfNeeded):
2281
2282 2015-01-29  Beth Dakin  <bdakin@apple.com>
2283
2284         Follow-on, fixing a bad merge from my last change. 
2285
2286         * Shared/WebPreferencesDefinitions.h:
2287
2288 2015-01-29  Beth Dakin  <bdakin@apple.com>
2289
2290         Remove more Mountain Lion code from WebKit2
2291         https://bugs.webkit.org/show_bug.cgi?id=141052
2292
2293         Reviewed by Tim Horton.
2294
2295         * NetworkProcess/NetworkResourceLoader.cpp:
2296         (WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
2297         * NetworkProcess/NetworkResourceLoader.h:
2298         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2299         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2300         * NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
2301         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2302         (WebKit::NetworkResourceLoader::willCacheResponseAsync):
2303         * Platform/IPC/MessageDecoder.cpp:
2304         * Platform/IPC/MessageDecoder.h:
2305         * Platform/IPC/mac/ConnectionMac.mm:
2306         (IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
2307         (IPC::Connection::open):
2308         (IPC::Connection::receiveSourceEventHandler):
2309         (IPC::Connection::kill):
2310         * Platform/IPC/mac/ImportanceAssertion.h:
2311         * PluginProcess/mac/PluginProcessMac.mm:
2312         (WebKit::PluginProcess::initializeProcessName):
2313         * Shared/WebPreferencesDefinitions.h:
2314         * Shared/mac/ChildProcessMac.mm:
2315         (WebKit::initializeTimerCoalescingPolicy):
2316         (WebKit::ChildProcess::setApplicationIsDaemon):
2317         (WebKit::ChildProcess::platformInitialize):
2318         (WebKit::ChildProcess::setQOS):
2319         * Shared/mac/CookieStorageShim.mm:
2320         (WebKit::CookieStorageShim::initialize):
2321         * UIProcess/API/mac/WKView.mm:
2322         (-[WKView addWindowObserversForWindow:]):
2323         (-[WKView removeWindowObservers]):
2324         (-[WKView _windowDidChangeOcclusionState:]):
2325         * UIProcess/Cocoa/NavigationState.mm:
2326         (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):
2327         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2328         (WebKit::registerUserDefaultsIfNeeded):
2329         (WebKit::WebProcessPool::platformInitializeWebProcess):
2330         (WebKit::WebProcessPool::registerNotificationObservers):
2331         (WebKit::WebProcessPool::unregisterNotificationObservers):
2332         (WebKit::privateBrowsingSession):
2333         (WebKit::WebProcessPool::isURLKnownHSTSHost):
2334         (WebKit::WebProcessPool::resetHSTSHosts):
2335         * UIProcess/Databases/mac/DatabaseProcessProxyMac.mm:
2336         (WebKit::shouldUseXPC):
2337         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2338         (WebKit::shouldUseXPC):
2339         * UIProcess/WebProcessPool.h:
2340         * UIProcess/mac/TextCheckerMac.mm:
2341         (WebKit::shouldAutomaticQuoteSubstitutionBeEnabled):
2342         (WebKit::shouldAutomaticDashSubstitutionBeEnabled):
2343         (WebKit::TextChecker::didChangeAutomaticQuoteSubstitutionEnabled):
2344         (WebKit::TextChecker::didChangeAutomaticDashSubstitutionEnabled):
2345         * UIProcess/mac/ViewGestureControllerMac.mm:
2346         (WebKit::ViewGestureController::applyDebuggingPropertiesToSwipeViews):
2347         * UIProcess/mac/WebProcessProxyMac.mm:
2348         (WebKit::shouldUseXPC):
2349         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2350         (InitWebCoreSystemInterface):
2351         * WebProcess/cocoa/WebProcessCocoa.mm:
2352         (WebKit::WebProcess::updateActivePages):
2353         * WebProcess/com.apple.WebProcess.sb.in:
2354         * config.h:
2355
2356 2015-01-29  Sam Weinig  <sam@webkit.org>
2357
2358         Remove support for screen font substitution
2359         https://bugs.webkit.org/show_bug.cgi?id=141038
2360
2361         Reviewed by Tim Horton.
2362
2363         * Shared/API/c/WKDeprecatedFunctions.cpp:
2364         (WKPreferencesSetScreenFontSubstitutionEnabled):
2365         (WKPreferencesGetScreenFontSubstitutionEnabled):
2366         Move now empty preferences SPI to WKDeprecatedFunctions.
2367         
2368         * Shared/WebPreferencesDefinitions.h:
2369         * Shared/WebProcessCreationParameters.cpp:
2370         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
2371         (WebKit::WebProcessCreationParameters::encode):
2372         (WebKit::WebProcessCreationParameters::decode):
2373         * Shared/WebProcessCreationParameters.h:
2374         * UIProcess/API/C/WKPreferences.cpp:
2375         (WKPreferencesSetScreenFontSubstitutionEnabled): Deleted.
2376         (WKPreferencesGetScreenFontSubstitutionEnabled): Deleted.
2377         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2378         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2379         (WebKit::WebProcessPool::platformInitializeWebProcess):
2380         * WebProcess/WebPage/WebPage.cpp:
2381         (WebKit::WebPage::updatePreferences):
2382         * WebProcess/WebProcess.h:
2383         (WebKit::WebProcess::presenterApplicationPid):
2384         (WebKit::WebProcess::shouldForceScreenFontSubstitution): Deleted.
2385         * WebProcess/cocoa/WebProcessCocoa.mm:
2386         (WebKit::WebProcess::platformInitializeWebProcess):
2387         Stop piping screen font substitution setting to the web process.
2388
2389 2015-01-29  Alexey Proskuryakov  <ap@apple.com>
2390
2391         Frequent kernel panics when running WebKit regression tests
2392         https://bugs.webkit.org/show_bug.cgi?id=141043
2393
2394         Reviewed by Sam Weinig.
2395
2396         Split PluginService.Development into 32-bit and 64-bit variants, to better match
2397         production variant. When building FAT, we'll have the right architecture from
2398         the start now, so no need to re-exec into a different architecture.        
2399
2400         * Configurations/PluginService.Development.xcconfig: Removed.
2401         * Configurations/PluginService.32.Development.xcconfig: Copied from Source/WebKit2/Configurations/PluginService.Development.xcconfig.
2402         * Configurations/PluginService.64.Development.xcconfig: Copied from Source/WebKit2/Configurations/PluginService.Development.xcconfig.
2403         Changed to use ONLY_ACTIVE_ARCH instead of CONFIGURATION, so that we build the
2404         right thing even in debug FAT builds.
2405
2406         * Configurations/PluginService.32.xcconfig:
2407         * Configurations/PluginService.64.xcconfig:
2408         While at it, applied the same changes as in Development variants. This means that
2409         FAT builds will now build only the correct architecture for PluginService.64
2410         (it used to build FAT, unnecessarily).
2411
2412         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
2413         Updated to support multiple product names.
2414
2415         * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): Launch the
2416         right development service.
2417
2418         * WebKit2.xcodeproj/project.pbxproj: Split the Plugin.Development target into two.
2419
2420 2015-01-29  Tim Horton  <timothy_horton@apple.com>
2421
2422         Fix the build with newer Clang
2423
2424         * NetworkProcess/NetworkConnectionToWebProcess.h:
2425         These should be 'override's.
2426
2427 2015-01-29  Chris Dumez  <cdumez@apple.com>
2428
2429         Clean up / modernize PageCache class
2430         https://bugs.webkit.org/show_bug.cgi?id=141009
2431
2432         Reviewed by Darin Adler.
2433
2434         Clean up / modernize PageCache class.
2435
2436         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2437         (WebKit::WebBackForwardListProxy::removeItem):
2438         (WebKit::WebBackForwardListProxy::close):
2439         * WebProcess/WebPage/WebPage.cpp:
2440         (WebKit::WebPage::goForward):
2441         (WebKit::WebPage::goBack):
2442         (WebKit::WebPage::goToBackForwardItem):
2443         * WebProcess/WebProcess.cpp:
2444         (WebKit::WebProcess::releasePageCache):
2445         * WebProcess/cocoa/WebProcessCocoa.mm:
2446         (WebKit::WebProcess::platformSetCacheModel):
2447         * WebProcess/soup/WebProcessSoup.cpp:
2448         (WebKit::WebProcess::platformSetCacheModel):
2449
2450 2015-01-29  Csaba Osztrogonác  <ossy@webkit.org>
2451
2452         [EFL][GTK] Fix the build after r179326
2453         https://bugs.webkit.org/show_bug.cgi?id=141027
2454
2455         Reviewed by Alexey Proskuryakov.
2456
2457         Guard MessageRecorder implementation with USE(DTRACE)
2458         for platforms not supporting DTrace.
2459
2460         Original patch by Carlos Garcia Campos <cgarcia@igalia.com>
2461
2462         * Platform/IPC/ArgumentCoders.cpp:
2463         * Platform/IPC/ArgumentCoders.h:
2464         * Platform/IPC/Connection.cpp:
2465         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
2466         (IPC::Connection::sendMessage):
2467         (IPC::Connection::sendSyncMessage):
2468         (IPC::Connection::sendSyncMessageFromSecondaryThread):
2469         (IPC::Connection::dispatchSyncMessage):
2470         (IPC::Connection::dispatchMessage):
2471         * Platform/IPC/MessageDecoder.cpp:
2472         (IPC::MessageDecoder::MessageDecoder):
2473         * Platform/IPC/MessageDecoder.h:
2474         * Platform/IPC/MessageEncoder.cpp:
2475         (IPC::MessageEncoder::MessageEncoder):
2476         (IPC::MessageEncoder::encodeHeader):
2477         * Platform/IPC/MessageEncoder.h:
2478         * Platform/IPC/MessageRecorder.h:
2479
2480 2015-01-29  Tim Horton  <timothy_horton@apple.com>
2481
2482         Avoid manually handling quickLookWithEvent: if the immediate action gesture recognizer will do Lookup for us
2483         https://bugs.webkit.orgshow_bug.cgi?id=141018
2484         <rdar://problem/19619999>
2485
2486         * UIProcess/API/mac/WKView.mm:
2487         (-[WKView quickLookWithEvent:]):
2488         Yosemite is 101000, not 10100.
2489
2490 2015-01-28  Tim Horton  <timothy_horton@apple.com>
2491
2492         Add API::{FrameInfo, NavigationAction, NavigationResponse} types
2493         https://bugs.webkit.org/show_bug.cgi?id=140982
2494
2495         Reviewed by Sam Weinig.
2496
2497         Make C++ API objects for WK{FrameInfo, NavigationAction, NavigationResponse}
2498         to wrap around, as a step towards moving Modern API logic down into WebPageProxy.
2499
2500         * Shared/API/APIObject.h:
2501         * Shared/Cocoa/APIObject.mm:
2502         (API::Object::newObject):
2503         * UIProcess/API/APIFrameInfo.cpp: Added.
2504         * UIProcess/API/APIFrameInfo.h: Added.
2505         * UIProcess/API/APINavigationAction.h: Added.
2506         * UIProcess/API/APINavigationResponse.h: Added.
2507         Add API::FrameInfo, API::NavigationAction, and API::NavigationResponse.
2508
2509         * UIProcess/API/Cocoa/WKFrameInfo.mm:
2510         * UIProcess/API/Cocoa/WKFrameInfoInternal.h:
2511         Make WKFrameInfo a WKObject, wrapping a API::FrameInfo.
2512
2513         * UIProcess/API/Cocoa/WKNavigationAction.mm:
2514         * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
2515         Make WKNavigationAction a WKObject, wrapping a API::NavigationAction.
2516
2517         * UIProcess/API/Cocoa/WKNavigationResponse.mm:
2518         * UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
2519         Make WKNavigationResponse a WKObject, wrapping a API::NavigationResponse.
2520
2521         * UIProcess/API/Cocoa/WKUserContentController.mm:
2522         Adopt API::FrameInfo.
2523
2524         * UIProcess/Cocoa/NavigationState.mm:
2525         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
2526         Adopt API::FrameInfo, and reorganize the code slightly.
2527         Adopt API::NavigationAction.
2528
2529         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
2530         Adopt API::FrameInfo.
2531         Adopt API::NavigationResponse.
2532
2533         (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
2534         Adopt API::FrameInfo.
2535
2536         * UIProcess/Cocoa/UIDelegate.mm:
2537         (WebKit::UIDelegate::UIClient::createNewPage):
2538         (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
2539         (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
2540         (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
2541         Adopt API::FrameInfo.
2542
2543         * WebKit2.xcodeproj/project.pbxproj:
2544
2545 2015-01-28  Antti Koivisto  <antti@apple.com>
2546
2547         http/tests/xmlhttprequest/workers/methods.html sometimes times out with disk cache enabled
2548         https://bugs.webkit.org/show_bug.cgi?id=140976
2549
2550         Reviewed by Chris Dumez.
2551
2552         The previous fix sometimes invoked the completion handler twice. Explicitly track if we
2553         have called it or not.
2554
2555         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2556         (WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
2557
2558         Also move the error case to the done branch. According to the documentation 'done' is always set on error.
2559
2560 2015-01-28  Timothy Horton  <timothy_horton@apple.com>
2561
2562         Add a WebKitMessageRecorder DTrace provider, exposing IPC details to DTrace
2563         https://bugs.webkit.org/show_bug.cgi?id=140673
2564
2565         Reviewed by Sam Weinig.
2566
2567         * Platform/IPC/ArgumentCoders.cpp:
2568         (IPC::ArgumentCoder<uuid_t>::encode):
2569         (IPC::ArgumentCoder<uuid_t>::decode):
2570         * Platform/IPC/ArgumentCoders.h:
2571         Add a uuid_t (simple) argument coder.
2572         Fix a mis-named header-guard #ifdef.
2573
2574         * Platform/IPC/Connection.cpp:
2575         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
2576         (IPC::Connection::dispatchSyncMessage):
2577         Sync message replies inherit the message UUID from the incoming sync message.
2578
2579         (IPC::Connection::sendMessage):
2580         (IPC::Connection::waitForMessage):
2581         (IPC::Connection::sendSyncMessage):
2582         (IPC::Connection::sendSyncMessageFromSecondaryThread):
2583         Record outgoing messages. Because sendSyncMessage calls sendMessage,
2584         we have to explicitly avoid recording the message twice.
2585
2586         (IPC::Connection::dispatchMessage):
2587         Record the incoming message.
2588
2589         (IPC::Connection::remoteProcessID):
2590         Add remoteProcessID(), which tries to determine the pid of the remote process.
2591
2592         * Platform/IPC/Connection.h:
2593         (IPC::Connection::xpcConnection):
2594         This can be const.
2595
2596         (IPC::Connection::isValid):
2597         Make this public.
2598
2599         * Platform/IPC/MessageDecoder.cpp:
2600         (IPC::MessageDecoder::MessageDecoder):
2601         * Platform/IPC/MessageDecoder.h:
2602         (IPC::MessageDecoder::setMessageProcessingToken):
2603         (IPC::MessageDecoder::UUID):
2604         Decode and store the message UUID.
2605         Store a MessageProcessingToken for the lifetime of the MessageDecoder;
2606         this ensures that all time spent processing the incoming message will be
2607         counted against that message.
2608
2609         * Platform/IPC/MessageEncoder.cpp:
2610         (IPC::MessageEncoder::MessageEncoder):
2611         By default, create a new UUID for the message. Alternatively, allow clients
2612         to pass the message UUID in (used for sync message replies).
2613         Store the messageReceiverName and messageName.
2614
2615         (IPC::MessageEncoder::encodeHeader):
2616         Factor encodeHeader() out of the constructors so most of their code can be shared.
2617
2618         (IPC::MessageEncoder::isSyncMessage):
2619         (IPC::MessageEncoder::shouldDispatchMessageWhenWaitingForSyncReply):
2620         Add getters for these flags.
2621
2622         * Platform/IPC/MessageEncoder.h:
2623         (IPC::MessageEncoder::messageReceiverName):
2624         (IPC::MessageEncoder::messageName):
2625         (IPC::MessageEncoder::destinationID):
2626         (IPC::MessageEncoder::UUID):
2627
2628         * Platform/IPC/MessageRecorder.h: Added.
2629         * Platform/IPC/MessageRecorder.cpp: Added.
2630         (MessageRecorder::MessageRecorder):
2631         Add a class that interfaces with a custom DTrace provider to log incoming and outgoing messages.
2632
2633         (MessageRecorder::shared):
2634         (MessageRecorder::isEnabled):
2635         Determine if either of the message probes are enabled. If not, we'll avoid most of the
2636         work associated with MessageRecorder.
2637
2638         (MessageRecorder::recordOutgoingMessage):
2639         (MessageRecorder::recordIncomingMessage):
2640         Build a WebKitMessageRecord and MessageProcessingToken from the Message(De|En)coder.
2641         Once the MessageProcessingToken is deallocated, the probe will be invoked with the WebKitMessageRecord.
2642
2643         (MessageRecorder::MessageProcessingToken::MessageProcessingToken):
2644         (MessageRecorder::MessageProcessingToken::~MessageProcessingToken):
2645         Keep track of when the token is created and destroyed; these are considered the beginning
2646         and ending "processing" times of the message (and as such the token should be kept alive for
2647         exactly as long as the message is being processed).
2648
2649         * Platform/IPC/MessageRecorderProbes.d: Added.
2650         Add a DTrace provider source file with two probes, message_sent and message_received.
2651         The struct must match the struct in MessageRecorder.h.
2652         
2653         * Platform/IPC/ProcessType.h: Added.
2654         Add an enum of process types.
2655
2656         * WebKit2.xcodeproj/project.pbxproj:
2657
2658         * DatabaseProcess/DatabaseProcess.h:
2659         * DatabaseProcess/DatabaseToWebProcessConnection.h:
2660         * NetworkProcess/NetworkConnectionToWebProcess.h:
2661         * NetworkProcess/NetworkProcess.h:
2662         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
2663         * WebProcess/Network/NetworkProcessConnection.h:
2664         * WebProcess/Plugins/PluginProcessConnection.h:
2665         * WebProcess/WebPage/WebInspector.h:
2666         * WebProcess/WebPage/WebInspectorUI.h:
2667         * WebProcess/WebProcess.h:
2668         * UIProcess/Databases/DatabaseProcessProxy.h:
2669         * UIProcess/Network/NetworkProcessProxy.h:
2670         * UIProcess/Plugins/PluginProcessProxy.h:
2671         * UIProcess/WebProcessProxy.h:
2672         * PluginProcess/PluginProcess.h:
2673         * PluginProcess/WebProcessConnection.h:
2674         Annotate Connection::Clients with process types.
2675         
2676 2015-01-28  Joseph Pecoraro  <pecoraro@apple.com>
2677
2678         Web Inspector: Crash closing inspected page with frequent activity
2679         https://bugs.webkit.org/show_bug.cgi?id=140973
2680
2681         Reviewed by Timothy Hatcher.
2682
2683         * WebProcess/WebPage/WebInspector.h:
2684         (WebKit::WebInspector::disconnectFromPage):        
2685         * WebProcess/WebPage/WebPage.cpp:
2686         (WebKit::WebPage::close):
2687         Be sure to close the WebInspector connection through the page
2688         when the page is closing so that the WebKit::WebInspector is
2689         relinquishes itself as the InspectorFrontendChannel.
2690
2691 2015-01-28  Timothy Horton  <timothy_horton@apple.com>
2692
2693         Avoid manually handling quickLookWithEvent: if the immediate action gesture recognizer will do Lookup for us
2694         https://bugs.webkit.org/show_bug.cgi?id=141018
2695         <rdar://problem/19619999>
2696
2697         Reviewed by Beth Dakin.
2698
2699         * UIProcess/API/mac/WKView.mm:
2700         (-[WKView quickLookWithEvent:]):
2701         If we have an immediate action gesture recognizer, just call super and
2702         avoid WebKit's special quickLookWithEvent: implementation.
2703
2704 2015-01-28  Sungmann Cho  <sungmann.cho@navercorp.com>
2705
2706         Remove remaining PLATFORM(WIN) code blocks from WebKit2.
2707         https://bugs.webkit.org/show_bug.cgi?id=140972
2708
2709         Reviewed by Darin Adler.
2710
2711         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
2712         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
2713
2714 2015-01-28  Beth Dakin  <bdakin@apple.com>
2715
2716         Remove Mountain Lion code from WebKit and WebKit2
2717         https://bugs.webkit.org/show_bug.cgi?id=141010
2718
2719         Reviewed by Sam Weinig.
2720
2721         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2722         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
2723         * Shared/mac/ChildProcessMac.mm:
2724         (WebKit::ChildProcess::initializeSandbox):
2725         * Shared/mac/WebEventFactory.mm:
2726         (WebKit::phaseForEvent):
2727         * UIProcess/API/mac/WKView.mm:
2728         (-[WKView quickLookWithEvent:]):
2729         (-[WKView updateLayer]):
2730         (-[WKView createFullScreenWindow]):
2731         * UIProcess/Network/NetworkProcessProxy.cpp:
2732         (WebKit::NetworkProcessProxy::didFinishLaunching):
2733         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
2734         (WebKit::shouldUseXPC):
2735         * UIProcess/WebProcessProxy.cpp:
2736         (WebKit::WebProcessProxy::didFinishLaunching):
2737         * UIProcess/mac/PageClientImpl.mm:
2738         (WebKit::PageClientImpl::isViewVisible):
2739         * WebKit2Prefix.h:
2740         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2741         (InitWebCoreSystemInterface):
2742         * WebProcess/com.apple.WebProcess.sb.in:
2743
2744 2015-01-28  Joseph Pecoraro  <pecoraro@apple.com>
2745
2746         Web Inspector: Crash when closing inspected page
2747         https://bugs.webkit.org/show_bug.cgi?id=140968
2748
2749         Reviewed by Timothy Hatcher.
2750
2751         Handle cases where the corePage could be null. With the Inspector Process
2752         in its own process, messages may come to the WebContentProcess after
2753         the WebCore::Page has itself been destroyed.
2754
2755         * WebProcess/WebPage/WebInspector.cpp:
2756         (WebKit::WebInspector::show):
2757         (WebKit::WebInspector::close):
2758         (WebKit::WebInspector::openInNewTab):
2759         (WebKit::WebInspector::evaluateScriptForTest):
2760         (WebKit::WebInspector::showConsole):
2761         (WebKit::WebInspector::showResources):
2762         (WebKit::WebInspector::showMainResourceForFrame):
2763         (WebKit::WebInspector::startPageProfiling):
2764         (WebKit::WebInspector::stopPageProfiling):
2765         (WebKit::WebInspector::canAttachWindow):
2766         (WebKit::WebInspector::sendMessageToBackend):
2767         (WebKit::WebInspector::remoteFrontendConnected):
2768         (WebKit::WebInspector::remoteFrontendDisconnected):
2769
2770 2015-01-28  Sam Weinig  <sam@webkit.org>
2771
2772         Convert WebPreferences and VisitedLinkProvider to be bridged API::Objects
2773         https://bugs.webkit.org/show_bug.cgi?id=141002
2774
2775         Reviewed by Tim Horton.
2776
2777         * Shared/API/APIObject.h:
2778         Add VisitedLinkProvider type.
2779         
2780         * Shared/Cocoa/APIObject.mm:
2781         (API::Object::newObject):
2782         Allocate WebPreferences and VisitedLinkProvider as their Objective-C counterpart.
2783         
2784         * UIProcess/API/Cocoa/WKPreferences.mm:
2785         (-[WKPreferences init]):
2786         Switch to constructInWrapper.
2787
2788         (-[WKPreferences dealloc]):
2789         Call the WebPreferences destructor.
2790         
2791         (-[WKPreferences _apiObject]):
2792         Add implementation of the WKObject protocol.
2793
2794         * UIProcess/API/Cocoa/WKPreferencesInternal.h:
2795         Convert to using ObjectStorage.
2796
2797         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
2798         (-[_WKVisitedLinkProvider init]):
2799         Switch to constructInWrapper.
2800
2801         (-[_WKVisitedLinkProvider dealloc]):
2802         Call the VisitedLinkProvider destructor.
2803
2804         (-[_WKVisitedLinkProvider _apiObject]):
2805         Add implementation of the WKObject protocol.
2806
2807         * UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h:
2808         Convert to using ObjectStorage.
2809
2810         * UIProcess/VisitedLinkProvider.cpp:
2811         (WebKit::VisitedLinkProvider::create):
2812         * UIProcess/VisitedLinkProvider.h:
2813         Switch create() to return a Ref.
2814
2815         * UIProcess/WebPreferences.h:
2816         Make the constructor public for use by constructInWrapper.
2817
2818         * UIProcess/WebProcessPool.cpp:
2819         (WebKit::WebProcessPool::createWebPage):
2820         * UIProcess/WebProcessPool.h:
2821         Store the VisitedLinkProvider in a Ref.
2822
2823 2015-01-28  Dana Burkart  <dburkart@apple.com>
2824
2825         Move ASan flag settings from DebugRelease.xcconfig to Base.xcconfig
2826         https://bugs.webkit.org/show_bug.cgi?id=136765
2827
2828         Reviewed by Alexey Proskuryakov.
2829
2830         * Configurations/Base.xcconfig:
2831         * Configurations/DebugRelease.xcconfig:
2832
2833 2015-01-28  Chris Dumez  <cdumez@apple.com>
2834
2835         Fix typo in markPagesForVistedLinkStyleRecalc()
2836         https://bugs.webkit.org/show_bug.cgi?id=140977
2837
2838         Reviewed by Darin Adler.
2839
2840         * WebProcess/WebPage/VisitedLinkTableController.cpp:
2841         (WebKit::VisitedLinkTableController::setVisitedLinkTable):
2842         (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
2843         (WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
2844         (WebKit::VisitedLinkTableController::removeAllVisitedLinks):
2845
2846 2015-01-27  Antti Koivisto  <antti@apple.com>
2847
2848         http/tests/xmlhttprequest/workers/methods.html sometimes times out with disk cache enabled
2849         https://bugs.webkit.org/show_bug.cgi?id=140976
2850
2851         Reviewed by Chris Dumez.
2852
2853         Running
2854
2855             run-webkit-tests --release -2 http/tests/xmlhttprequest/workers/methods.html --iterations=100
2856
2857         would usually time out an iteration.
2858
2859         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2860         (WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
2861
2862         Using dispatch_io_read with an empty file calls the handler block immediately with done boolean set
2863         without it being an error. We failed to call the completion handler and any synchronous xhr would hang.
2864         We may see an empty cache file if we are just in process of writing it.
2865
2866         Fix by handling this case specifically.
2867
2868 2015-01-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2869
2870         Unreviewed. Add missing file to WebInspector compilation for GTK+.
2871
2872         * PlatformGTK.cmake: Add UserInterface/External/ESLint/eslint.js
2873
2874 2015-01-28  Chris Dumez  <cdumez@apple.com>
2875
2876         Rename pageCache() to PageCache::shared() and return a reference
2877         https://bugs.webkit.org/show_bug.cgi?id=140983
2878
2879         Reviewed by Andreas Kling.
2880
2881         Rename pageCache() to PageCache::shared() as this is a singleton class
2882         and have it return a reference instead of a pointer.
2883
2884         * WebProcess/WebPage/VisitedLinkTableController.cpp:
2885         (WebKit::VisitedLinkTableController::setVisitedLinkTable):
2886         (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
2887         (WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
2888         (WebKit::VisitedLinkTableController::removeAllVisitedLinks):
2889         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2890         (WebKit::WebBackForwardListProxy::removeItem):
2891         (WebKit::WebBackForwardListProxy::close):
2892         * WebProcess/WebProcess.cpp:
2893         (WebKit::WebProcess::releasePageCache):
2894         * WebProcess/cocoa/WebProcessCocoa.mm:
2895         (WebKit::WebProcess::platformSetCacheModel):
2896         * WebProcess/soup/WebProcessSoup.cpp:
2897         (WebKit::WebProcess::platformSetCacheModel):
2898
2899 2015-01-27  Alexey Proskuryakov  <ap@apple.com>
2900
2901         More build fixes for newer clang.
2902
2903         Rubber-stamped by Anders Carlsson.
2904
2905         Added missing override keywords, marked some deprecated accessibility methods as such.
2906
2907         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
2908         (WebKit::PluginProcessMainDelegate::doPreInitializationWork): Deleted.
2909         (WebKit::PluginProcessMainDelegate::getExtraInitializationData): Deleted.
2910         (WebKit::PluginProcessMainDelegate::doPostRunWork): Deleted.
2911         * PluginProcess/WebProcessConnection.h:
2912         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2913         (WebKit::WebProcessPool::platformInitializeWebProcess):
2914         * UIProcess/Plugins/PluginProcessProxy.h:
2915         * UIProcess/WebPageProxy.h:
2916         * UIProcess/mac/PageClientImpl.h:
2917         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
2918         (PageOverlayClientImpl::actionContextForResultAtPoint): Deleted.
2919         (PageOverlayClientImpl::dataDetectorsDidPresentUI): Deleted.
2920         (PageOverlayClientImpl::dataDetectorsDidChangeUI): Deleted.
2921         (PageOverlayClientImpl::dataDetectorsDidHideUI): Deleted.
2922         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2923         (WebKit::NetscapePlugin::isBeingAsynchronouslyInitialized): Deleted.
2924         * WebProcess/Plugins/PDF/PDFPlugin.h:
2925         * WebProcess/Plugins/PluginProcessConnection.h:
2926         * WebProcess/Plugins/PluginProxy.h:
2927         (WebKit::PluginProxy::isBeingAsynchronouslyInitialized): Deleted.
2928         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
2929
2930 2015-01-27  Beth Dakin  <bdakin@apple.com>
2931
2932         Immediate action gesture recognizer still doesn't work well with IB
2933         https://bugs.webkit.org/show_bug.cgi?id=140967
2934         -and corresponding-
2935         rdar://problem/19621509
2936
2937         Reviewed by Tim Horton.
2938
2939         We should add (or remove) the gesture recognizer in viewDidMoveToWindow because 
2940         initWithFrame it too early and IB might mess with it.
2941         * UIProcess/API/mac/WKView.mm:
2942         (-[WKView viewDidMoveToWindow]):
2943         (-[WKView initWithFrame:processPool:configuration:webView:]):
2944
2945 2015-01-27  Beth Dakin  <bdakin@apple.com>
2946
2947         Invoking an immediate action on link often dismisses selection
2948         https://bugs.webkit.org/show_bug.cgi?id=140911
2949         -and corresponding-
2950         rdar://problem/19572685
2951
2952         Reviewed by Tim Horton.
2953
2954         Calling _page->setMaintainsInactiveSelection(false) in complete is often 
2955         too soon. Instead, call it in dismissContentRelativeChildWindows. This is more 
2956         similar to the timing for the TextIndicator.
2957         * UIProcess/mac/WKImmediateActionController.mm:
2958         (-[WKImmediateActionController dismissContentRelativeChildWindows]):
2959         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
2960         (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
2961
2962 2015-01-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2963
2964         REGRESSION(r166975): [GTK] Page overlays are not drawn anymore after r166975
2965         https://bugs.webkit.org/show_bug.cgi?id=131433
2966
2967         Reviewed by Žan Doberšek.
2968
2969         Implement page overlays for the GTK+ port.
2970
2971         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2972         Override pure virtual setViewOverlayRootLayer().
2973         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2974         (WebKit::DrawingAreaImpl::display): Remove FIXME and use modern
2975         for loop.
2976         (WebKit::DrawingAreaImpl::attachViewOverlayGraphicsLayer): Remove
2977         ifdefs and use LayerTreeHost::setViewOverlayRootLayer().
2978         * WebProcess/WebPage/LayerTreeHost.h: Add pure virtual setViewOverlayRootLayer().
2979         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2980         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk): Initialize m_viewOverlayRootLayer.
2981         (WebKit::LayerTreeHostGtk::initialize): Remove FIXME.
2982         (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay):
2983         Remove unused old page overlays code.
2984         (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplayInRect): Ditto.
2985         (WebKit::LayerTreeHostGtk::sizeDidChange): Ditto.
2986         (WebKit::LayerTreeHostGtk::paintContents): Remove FIXME.
2987         (WebKit::LayerTreeHostGtk::flushPendingLayerChanges): Flush
2988         compositing state on m_pageOverlayLayers if present.
2989         (WebKit::LayerTreeHostGtk::setViewOverlayRootLayer): Set m_pageOverlayLayers.
2990         (WebKit::LayerTreeHostGtk::createPageOverlayLayer): Deleted.
2991         (WebKit::LayerTreeHostGtk::destroyPageOverlayLayer): Deleted.
2992         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: Remove unused old
2993         page overlays code.
2994
2995 2015-01-27  Sungmann Cho  <sungmann.cho@navercorp.com>
2996
2997         Remove remaining PLUGIN_ARCHITECTURE(WIN) code blocks from WebKit2.
2998         https://bugs.webkit.org/show_bug.cgi?id=140912
2999
3000         Reviewed by Anders Carlsson.
3001
3002         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
3003         (WebKit::NetscapePluginModule::tryLoad):
3004         * Shared/Plugins/PluginQuirks.h:
3005         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3006         (WebKit::NetscapePlugin::userAgent):
3007         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3008
3009 2015-01-26  Simon Fraser  <simon.fraser@apple.com>
3010
3011         [iOS WK2] Fix possible crash when -[WKWebView evaluateJavaScript:completionHandler:] was called then the WKWebView is destroyed
3012         https://bugs.webkit.org/show_bug.cgi?id=140203
3013         rdar://problem/19198492
3014
3015         Reviewed by Sam Weinig.
3016         
3017         When handling the OwnerWasInvalidated case in -[WKWebView evaluateJavaScript:completionHandler:],
3018         the block passed to dispatch_async() needs to be retained. Fix by passing the RefPtr
3019         to the lambda.
3020
3021         * UIProcess/API/Cocoa/WKWebView.mm:
3022         (-[WKWebView evaluateJavaScript:completionHandler:]):
3023
3024 2015-01-26  Chris Dumez  <cdumez@apple.com>
3025
3026         Rename Document::body() to Document::bodyOrFrameset() for clarity
3027         https://bugs.webkit.org/show_bug.cgi?id=140902
3028
3029         Reviewed by Andreas Kling.
3030
3031         Rename Document::body() to Document::bodyOrFrameset() for clarity. This
3032         method does not necessarily return an HTMLBodyElement, it can also
3033         return a frameset as per the specification:
3034         http://www.w3.org/TR/html5/dom.html#dom-tree-accessors
3035
3036         This method is often misused internally (the caller is only interested
3037         in the <body> element). I will fix these instances in a follow-up patch,
3038         this patch is only renaming mechanically.
3039
3040 2015-01-26  Antti Koivisto  <antti@apple.com>
3041
3042         Add a user default for disabling network cache
3043         https://bugs.webkit.org/show_bug.cgi?id=140904
3044
3045         Reviewed by Andreas Kling
3046
3047         defaults write com.apple.Safari WebKitNetworkCacheEnabled -bool YES/NO
3048
3049         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3050         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
3051         * Shared/Network/NetworkProcessCreationParameters.cpp:
3052         (WebKit::NetworkProcessCreationParameters::encode):
3053         (WebKit::NetworkProcessCreationParameters::decode):
3054         * Shared/Network/NetworkProcessCreationParameters.h:
3055         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3056         (WebKit::registerUserDefaultsIfNeeded):
3057         (WebKit::WebProcessPool::platformInitializeWebProcess):
3058         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3059
3060 2015-01-26  Chris Dumez  <cdumez@apple.com>
3061
3062         First argument to DOM traversal functions should be a reference
3063         https://bugs.webkit.org/show_bug.cgi?id=140895
3064
3065         Reviewed by Antti Koivisto.
3066
3067         First argument to DOM traversal functions should be a reference instead
3068         of a pointer as it is dereferenced without null-check.
3069
3070 2015-01-26  Beth Dakin  <bdakin@apple.com>
3071
3072         Blacklist iBooks for WebKit's default immediate actions
3073         https://bugs.webkit.org/show_bug.cgi?id=140854
3074         -and corresponding-
3075         rdar://problem/19489518
3076
3077         Reviewed by Tim Horton.
3078
3079         Blacklist iBooks.
3080         * UIProcess/mac/WKImmediateActionController.mm:
3081         (-[WKImmediateActionController _updateImmediateActionItem]):
3082
3083 2015-01-26  Myles C. Maxfield  <mmaxfield@apple.com>
3084
3085         [iOS] [SVG -> OTF Converter] Flip the switch off on iOS
3086         https://bugs.webkit.org/show_bug.cgi?id=140860
3087
3088         Reviewed by Darin Adler.
3089
3090         The fonts it makes are grotesque. (See what I did there? Typographic
3091         humor is the best humor.)
3092
3093         * Configurations/FeatureDefines.xcconfig:
3094
3095 2015-01-26  Fabien Vallée  <fvallee@connected-labs.com>
3096
3097         AX: crash in accessibilityRootObjectWrapper method (WebPageAccessibilityObjectAtk.cpp)
3098         <https://bugs.webkit.org/show_bug.cgi?id=140618>
3099
3100         Reviewed by Chris Fleizach.
3101
3102         Check if document()->axObjectCache() is nullptr to fix the crash.
3103         Similar patch has been applied on mac port:
3104         <http://trac.webkit.org/changeset/167136>
3105
3106         Crash occured on <http://itv.mit-xperts.com/hbbtvtest/appmanager/>
3107         (this page needs CEHTML / HbbTV extensions, conditions cannot
3108         be reproduced using regression tests)
3109
3110         * WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:
3111         (accessibilityRootObjectWrapper):
3112
3113 2015-01-26  Michael Catanzaro  <mcatanzaro@igalia.com>
3114
3115         [GTK] gtkdoc does not appear in DevHelp
3116         https://bugs.webkit.org/show_bug.cgi?id=139369
3117
3118         Reviewed by Philippe Normand.
3119
3120         * PlatformGTK.cmake: Include the API version in the gtkdoc filenames.
3121         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Renamed from Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt.
3122         * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Renamed from Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk.types.
3123
3124 2015-01-25  Timothy Horton  <timothy_horton@apple.com>
3125
3126         Unresponsive Web processes sometimes throw ObjC exceptions under didPerformActionMenuHitTest:
3127         https://bugs.webkit.org/show_bug.cgi?id=140859
3128         <rdar://problem/19571057>
3129
3130         Reviewed by Darin Adler.
3131
3132         * UIProcess/mac/WKImmediateActionController.mm:
3133         (-[WKImmediateActionController didPerformActionMenuHitTest:userData:]):
3134         If we've already given up on this gesture (either because it was canceled or the
3135         willBeginAnimation timeout expired), we shouldn't build a new animationController for it.
3136         This is true both because it wouldn't look good to swap animationControllers out
3137         from under the gesture, but also because AppKit throws an exception when you do this
3138         and that breaks a lot of things.
3139
3140 2015-01-24  Chris Dumez  <cdumez@apple.com>
3141
3142         [WK2][Cocoa] Drop WKDiagnosticLoggingResultType defines
3143         https://bugs.webkit.org/show_bug.cgi?id=140838
3144
3145         Reviewed by Sam Weinig.
3146
3147         Drop WKDiagnosticLoggingResultType defines in _WKDiagnosticLoggingDelegate.h
3148         header now that the client-side is correctly using
3149         _WKDiagnosticLoggingResultType instead.
3150
3151         * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
3152
3153 2015-01-23  Antti Koivisto  <antti@apple.com>
3154
3155         Implement cache size limit
3156         https://bugs.webkit.org/show_bug.cgi?id=140844
3157
3158         Reviewed by Andreas Kling.
3159
3160         Prevent the cache from growing without bounds. The simple scheme implemented here
3161         estimates the cache size from number of entries. When the estimated size exceeds
3162         the maximum size we randomly clear 1/4 of the entries.
3163
3164         * NetworkProcess/cache/NetworkCacheStorage.h:
3165         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
3166         (WebKit::NetworkCacheStorage::NetworkCacheStorage):
3167         (WebKit::NetworkCacheStorage::initialize):
3168         (WebKit::NetworkCacheStorage::removeEntry):
3169         (WebKit::NetworkCacheStorage::store):
3170         (WebKit::NetworkCacheStorage::setMaximumSize):
3171         (WebKit::NetworkCacheStorage::clear):
3172         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
3173         (WebKit::NetworkCacheStorage::initializeKeyFilter): Deleted.
3174
3175 2015-01-23  Timothy Horton  <timothy_horton@apple.com>
3176
3177         Fix the pre-Yosemite build.
3178
3179         * UIProcess/API/mac/WKView.mm:
3180         (-[WKView _dismissContentRelativeChildWindows]):
3181
3182 2015-01-23  Timothy Horton  <timothy_horton@apple.com>
3183
3184         QLPreviewMenuItem popovers don't close when the page scrolls
3185         https://bugs.webkit.org/show_bug.cgi?id=140806
3186         <rdar://problem/19555618>
3187
3188         Reviewed by Beth Dakin.
3189
3190         Now that QLPreviewMenuItem's popover doesn't eat scrolls, we need to dismiss it if the page scrolls.
3191
3192         * UIProcess/API/mac/WKView.mm:
3193         (-[WKView _dismissContentRelativeChildWindows]):
3194         Send _dismissContentRelativeChildWindows on to WKImmediateActionController.
3195
3196         * UIProcess/mac/WKImmediateActionController.h:
3197         * UIProcess/mac/WKImmediateActionController.mm:
3198         (-[WKImmediateActionController _clearImmediateActionState]):
3199         (-[WKImmediateActionController dismissContentRelativeChildWindows]):
3200         (-[WKImmediateActionController _defaultAnimationController]):
3201         Keep track of the active QLPreviewMenuItem, and close it upon scroll.
3202
3203 2015-01-23  Timothy Horton  <timothy_horton@apple.com>
3204
3205         Infinite recursion in _clearImmediateActionState
3206         https://bugs.webkit.org/show_bug.cgi?id=140807
3207         <rdar://problem/19571601>
3208
3209         Reviewed by Anders Carlsson.
3210
3211         * UIProcess/mac/WKImmediateActionController.mm:
3212         (-[WKImmediateActionController _clearImmediateActionState]):
3213         Clear _hasActivatedActionContext before calling didUseActions, because
3214         didUseActions can call _clearImmediateActionState.
3215
3216 2015-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
3217
3218         [GTK] Add initial database process support
3219         https://bugs.webkit.org/show_bug.cgi?id=139491
3220
3221         Reviewed by Sergio Villar Senin.
3222
3223         Add initial support for DatabaseProcess, disabled by default for
3224         now.
3225
3226         * CMakeLists.txt: Add required files to compilation.
3227         * DatabaseProcess/DatabaseProcess.cpp:
3228         (WebKit::DatabaseProcess::createDatabaseToWebProcessConnection):
3229         Add the unix domain sockets implementation.
3230         * DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp: Added.
3231         (main):
3232         * DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp: Added.
3233         (WebKit::DatabaseProcessMainUnix):
3234         * DatabaseProcess/unix/DatabaseProcessMainUnix.h: Added.
3235         * PlatformGTK.cmake: Add required files to compilation.
3236         * Shared/ProcessExecutablePath.h:
3237         * Shared/gtk/KeyedDecoder.cpp: Added.
3238         (WebKit::KeyedDecoder::KeyedDecoder):
3239         (WebKit::KeyedDecoder::~KeyedDecoder):
3240         (WebKit::KeyedDecoder::buildDictionaryFromGVariant):
3241         (WebKit::KeyedDecoder::decodeBytes):
3242         (WebKit::KeyedDecoder::decodeBool):
3243         (WebKit::KeyedDecoder::decodeUInt32):
3244         (WebKit::KeyedDecoder::decodeInt32):
3245         (WebKit::KeyedDecoder::decodeInt64):
3246         (WebKit::KeyedDecoder::decodeFloat):
3247         (WebKit::KeyedDecoder::decodeDouble):
3248         (WebKit::KeyedDecoder::decodeString):
3249         (WebKit::KeyedDecoder::beginObject):
3250         (WebKit::KeyedDecoder::endObject):
3251         (WebKit::KeyedDecoder::beginArray):
3252         (WebKit::KeyedDecoder::beginArrayElement):
3253         (WebKit::KeyedDecoder::endArrayElement):
3254         (WebKit::KeyedDecoder::endArray):
3255         * Shared/gtk/KeyedDecoder.h: Added.
3256         * Shared/gtk/KeyedEncoder.cpp: Added.
3257         (WebKit::KeyedEncoder::KeyedEncoder):
3258         (WebKit::KeyedEncoder::~KeyedEncoder):
3259         (WebKit::KeyedEncoder::encodeBytes):
3260         (WebKit::KeyedEncoder::encodeBool):
3261         (WebKit::KeyedEncoder::encodeUInt32):
3262         (WebKit::KeyedEncoder::encodeInt32):
3263         (WebKit::KeyedEncoder::encodeInt64):
3264         (WebKit::KeyedEncoder::encodeFloat):
3265         (WebKit::KeyedEncoder::encodeDouble):
3266         (WebKit::KeyedEncoder::encodeString):
3267         (WebKit::KeyedEncoder::beginObject):
3268         (WebKit::KeyedEncoder::endObject):
3269         (WebKit::KeyedEncoder::beginArray):
3270         (WebKit::KeyedEncoder::beginArrayElement):
3271         (WebKit::KeyedEncoder::endArrayElement):
3272         (WebKit::KeyedEncoder::endArray):
3273         (WebKit::KeyedEncoder::finishEncoding):
3274         * Shared/gtk/KeyedEncoder.h: Added.
3275         * Shared/gtk/ProcessExecutablePathGtk.cpp:
3276         (WebKit::executablePathOfDatabaseProcess):
3277         * UIProcess/Databases/DatabaseProcessProxy.cpp:
3278         (WebKit::DatabaseProcessProxy::didCreateDatabaseToWebProcessConnection):
3279         Add the unix domain sockets implementation.
3280         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
3281         (WebKit::ProcessLauncher::launchProcess): Handle the
3282         DatabaseProcess too.
3283         * UIProcess/gtk/WebContextGtk.cpp:
3284         (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory):
3285         * WebProcess/WebProcess.cpp:
3286         (WebKit::WebProcess::ensureWebToDatabaseProcessConnection): Add
3287         the unix domain sockets implementation.
3288
3289 2015-01-22  Benjamin Poulain  <bpoulain@apple.com>
3290
3291         [iOS][WK2] Ignore synthetic click initiated on a previous page
3292         https://bugs.webkit.org/show_bug.cgi?id=139556
3293         rdar://problem/18586008
3294
3295         Reviewed by David Kilzer.
3296
3297         Under the right accumulation of bad luck, a synthetic click could be generated
3298         on a page that never asked for it.
3299
3300         What happened was:
3301         1) Page Foo listen to touch event.
3302         2) In response to touch events, Foo decides to navigate to page Bar
3303            *but* it does not cancel the native gesture recognizers with preventDefault().
3304         3) Page Bar loads.
3305         4) The native gesture recognizer ask us to click, we forward that to the WebProcess
3306            and generate a synthetic mouse event.
3307         -> Bar receives a click.
3308         If you are unlucky enough, it looks like a single tap does a double click.
3309
3310         There are two ways this patch avoids the problem:
3311
3312         First, in the UIProcess, we just cancel the HighlightLongPressGestureRecognizer
3313         on didCommitLoadForMainFrame. This prevents "fast clicks" from accidentally going through.
3314         This is not bullet proof because we get didCommitLoadForMainFrame asynchronously but
3315         killing the timer and gesture seems like a good idea.
3316
3317         Second, we skip any tap command at the WebProcess level when it was issued for
3318         the previous page. This is using the same principle we used for VisibleContentRect:
3319         any input generated before the current layer tree commit is useless for the current page.
3320
3321         We track the commit ID in the UIProcess when we decide to do the tracking or not.
3322         Note that we keep the ID regardless of the tracking state, it does not matter if we have sent
3323         touch events, what matters is what content was on screen when the touch events were handled.
3324
3325         If the user interaction result in a tap, we send the commit ID along the tap commands.
3326         In the WebProcess, we know the actual layer tree commit associated with the current page.
3327         If the tap was generated with a layer ID preceding the current page, we fail the command.
3328
3329         * UIProcess/WebPageProxy.cpp:
3330         (WebKit::WebPageProxy::WebPageProxy):
3331         (WebKit::WebPageProxy::handleTouchEventSynchronously):
3332         (WebKit::WebPageProxy::resetState):
3333         * UIProcess/WebPageProxy.h:
3334         * UIProcess/ios/WKContentView.mm:
3335         (-[WKContentView _didCommitLoadForMainFrame]):
3336         * UIProcess/ios/WKContentViewInteraction.mm:
3337         (-[WKContentView _attemptClickAtLocation:]):
3338         * UIProcess/ios/WebPageProxyIOS.mm:
3339         (WebKit::WebPageProxy::commitPotentialTap):
3340         (WebKit::WebPageProxy::handleTap):
3341         * WebProcess/WebPage/WebPage.cpp:
3342         (WebKit::WebPage::didCommitLoad):
3343         * WebProcess/WebPage/WebPage.h:
3344         * WebProcess/WebPage/WebPage.messages.in:
3345         * WebProcess/WebPage/ios/WebPageIOS.mm:
3346         (WebKit::WebPage::handleTap):
3347         (WebKit::WebPage::commitPotentialTap):
3348
3349 2015-01-22  Chris Dumez  <cdumez@apple.com>
3350
3351         [WK2][Cocoa] Drop WKWebViewConfiguration._featureCounterEnabled SPI.
3352         https://bugs.webkit.org/show_bug.cgi?id=140799
3353
3354         Reviewed by Dan Bernstein.
3355
3356         Drop WKWebViewConfiguration._featureCounterEnabled SPI now that the
3357         client-side has been updated.
3358
3359         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3360         (-[WKWebViewConfiguration _setAllowsAlternateFullscreen:]):
3361         (-[WKWebViewConfiguration _featureCounterEnabled]): Deleted.
3362         (-[WKWebViewConfiguration _setFeatureCounterEnabled:]): Deleted.
3363         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3364
3365 2015-01-22  Antti Koivisto  <antti@apple.com>
3366
3367         Fix ENABLE(NETWORK_CACHE) build
3368
3369         * NetworkProcess/NetworkResourceLoader.cpp:
3370         (WebKit::NetworkResourceLoader::didFinishLoading):
3371
3372 2015-01-22  Timothy Horton  <timothy_horton@apple.com>
3373
3374         UserData decoding of WKTypeRefWrapper always fails
3375         https://bugs.webkit.org/show_bug.cgi?id=140791
3376         <rdar://problem/19438402>
3377
3378         Reviewed by Anders Carlsson.
3379
3380         * Shared/mac/ObjCObjectGraph.mm:
3381         (WebKit::ObjCObjectGraph::decode):
3382         Add a missing break.
3383
3384 2015-01-22  Ryosuke Niwa  <rniwa@webkit.org>
3385
3386         Add a build flag for ES6 class syntax
3387         https://bugs.webkit.org/show_bug.cgi?id=140760
3388
3389         Reviewed by Michael Saboff.
3390
3391         * Configurations/FeatureDefines.xcconfig:
3392
3393 2015-01-22  Chris Dumez  <cdumez@apple.com>
3394
3395         Drop the legacy FeatureCounter class
3396         https://bugs.webkit.org/show_bug.cgi?id=140749
3397
3398         Reviewed by Andreas Kling.
3399
3400         Drop the legacy FeatureCounter class and use DiagnosticLoggingClient
3401         instead.
3402
3403         * Shared/WebPreferencesDefinitions.h:
3404         * UIProcess/API/Cocoa/WKWebView.mm:
3405         (-[WKWebView initWithFrame:configuration:]):
3406         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3407         (-[WKWebViewConfiguration init]):
3408         (-[WKWebViewConfiguration copyWithZone:]):
3409         (-[WKWebViewConfiguration _featureCounterEnabled]):
3410         (-[WKWebViewConfiguration _setFeatureCounterEnabled:]):
3411         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3412         * WebProcess/WebPage/WebPage.cpp:
3413         (WebKit::WebPage::updatePreferences):
3414         * WebProcess/WebPage/ios/WebPageIOS.mm:
3415         (WebKit::WebPage::willStartUserTriggeredZooming):
3416
3417 2015-01-22  Beth Dakin  <bdakin@apple.com>
3418
3419         ibtoold crash below -[WebView close]
3420         https://bugs.webkit.org/show_bug.cgi?id=140782
3421         -and corresponding-
3422         rdar://problem/19558472
3423
3424         Reviewed by Tim Horton.
3425
3426         Retain the NSImmediateActionGestureRecognizer. This should not be necessary, but 
3427         it is because interface builder can mess with our views.
3428         * UIProcess/mac/WKImmediateActionController.h:
3429         * UIProcess/mac/WKImmediateActionController.mm:
3430         (-[WKImmediateActionController willDestroyView:]):
3431         (-[WKImmediateActionController _cancelImmediateAction]):
3432         (-[WKImmediateActionController _cancelImmediateActionIfNeeded]):
3433         (-[WKImmediateActionController _updateImmediateActionItem]):
3434
3435 2015-01-22  David Kilzer  <ddkilzer@apple.com>
3436
3437         [iOS] Fix iphoneos SDK builds for ios-ews queue
3438         <http://webkit.org/b/140748>
3439
3440         Reviewed by Daniel Bates.
3441
3442         * Platform/spi/ios/BKSProcessAssertionSPI.h: Add -invalidate
3443         definition.  Sort @property to the top of BKSProcessAssertion.
3444
3445 2015-01-22  Shivakumar JM  <shiva.jm@samsung.com>
3446
3447         Fix build warning in WebKit2/UIProcess module
3448         https://bugs.webkit.org/show_bug.cgi?id=140758
3449
3450         Reviewed by Csaba Osztrogonác.
3451
3452         Fix build warnings by using UNUSED_PARAM macro
3453
3454         * UIProcess/API/C/WKPageGroup.cpp:
3455         (WKPageGroupAddUserContentFilter):
3456         (WKPageGroupRemoveAllUserContentFilters):
3457
3458 2014-11-06  Carlos Garcia Campos  <cgarcia@igalia.com>
3459
3460         [GTK] Use API::ContextMenuClient and API::InjectedBundle::PageContextMenuClient classes
3461         https://bugs.webkit.org/show_bug.cgi?id=138467
3462
3463         Reviewed by Gustavo Noronha Silva.
3464
3465         * UIProcess/API/gtk/WebKitContextMenu.cpp:
3466         (webkitContextMenuPopulate): Add a version that receives a Vector<WebContextMenuItemData>&.
3467         (webkitContextMenuCreate): Change it to receive a const
3468         Vector<WebContextMenuItemData>& instead of a API::Array* and also
3469         add a another version that receives const Vector<ContextMenuItem>&.
3470         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
3471         (attachContextMenuClientToView): Use a class derived from
3472         API::ContextMenuClient to implement the context menu client.
3473         (getContextMenuFromProposedMenu): Deleted.
3474         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
3475         (webkitContextMenuItemCreate): Change it to receive a const
3476         WebContextMenuItemData& and added another version that receives a
3477         const ContextMenuItem&.
3478         * UIProcess/API/gtk/WebKitContextMenuItemPrivate.h:
3479         * UIProcess/API/gtk/WebKitContextMenuPrivate.h:
3480         * UIProcess/API/gtk/WebKitWebView.cpp:
3481         (webkitWebViewPopulateContextMenu): Remove the creation of a
3482         WebHitTestResult::Data, since it receives it now as parameter.
3483         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
3484         * WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp:
3485         (webkitWebHitTestResultCreate): Change it to receive a const
3486         HitTestResult& instead of const InjectedBundleHitTestResult&.
3487         * WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResultPrivate.h:
3488         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3489         (webkitWebPageCreate): Use a class derived from
3490         API::InjectedBundle::PageContextMenuClient to implement the
3491         context menu client.
3492         (getContextMenuFromDefaultMenu): Deleted.