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