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