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