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