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