[EFL][CustomProtocol] Do not add duplicated custom scheme
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-06-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2
3         [EFL][CustomProtocol] Do not add duplicated custom scheme
4         https://bugs.webkit.org/show_bug.cgi?id=146199
5
6         Reviewed by Carlos Garcia Campos.
7
8         WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol generates
9         a crash when duplicated scheme is registered on debug mode, or just registers it on release mode.
10         However application can register duplicate scheme by mistake or on purpose. Thus it would be good
11         if we don't register it instead of registering it or generating a crash when trying to regiseter
12         duplicated scheme.
13
14         EFL port want to allow user to change registered callback, thus EWK2ContextTest::ewk_context_url_scheme_register()
15         is modified to test it.
16
17         Test: ewk_context_url_scheme_register() in test_ewk2_context.cpp.
18
19         * UIProcess/API/efl/ewk_context.h: Added a comment to replace registered callback.
20         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
21         (EWK2ContextTest::schemeRequestCallback1):
22         (EWK2ContextTest::schemeRequestCallback2):
23         (TEST_F):
24         (EWK2ContextTest::schemeRequestCallback): Deleted.
25         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
26         (WebKit::WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol):
27
28 2015-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>
29
30         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.3 release.
31
32         * gtk/NEWS: Add release notes for 2.9.3.
33
34 2015-06-22  Dan Bernstein  <mitz@apple.com>
35
36         Part 2 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox Profiles target
37         https://bugs.webkit.org/show_bug.cgi?id=146197
38
39         Rubber-stamped by Anders Carlsson.
40
41         * WebKit2.xcodeproj/project.pbxproj: Deleted the WebKit2SandboxProfiles-IOSOverride target.
42
43 2015-06-22  Dean Jackson  <dino@apple.com>
44
45         Rename PlatformCA*Mac to PlatformCA*Cocoa
46         https://bugs.webkit.org/show_bug.cgi?id=146224
47         <rdar://problem/21497182>
48
49         Reviewed by Simon Fraser.
50
51         Rename PlatformCALayerMac and related files in platform/graphics/ca/mac
52         to the more accurate Cocoa suffix.
53
54         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
55         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
56         (WebKit::PlatformCALayerRemote::filtersCanBeComposited):
57         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
58         (WebKit::PlatformCALayerRemoteCustom::create):
59         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
60         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
61         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
62
63 2015-06-22  Anders Carlsson  <andersca@apple.com>
64
65         Simplify Connection::SyncMessageState
66         https://bugs.webkit.org/show_bug.cgi?id=146213
67
68         Reviewed by Andreas Kling.
69
70         Since we no longer support Connections dispatching to multiple threads, we can make SyncMessageState
71         into a singleton and get rid of the RunLoop -> SyncMessageState hash map.
72
73         * Platform/IPC/Connection.cpp:
74         (IPC::Connection::SyncMessageState::singleton):
75         (IPC::Connection::SyncMessageState::SyncMessageState):
76         (IPC::Connection::SyncMessageState::processIncomingMessage):
77         (IPC::Connection::SyncMessageState::dispatchMessages):
78         (IPC::Connection::waitForSyncReply):
79         (IPC::Connection::processIncomingSyncReply):
80         (IPC::Connection::processIncomingMessage):
81         (IPC::Connection::connectionDidClose):
82         (IPC::Connection::SyncMessageState::syncMessageStateMap): Deleted.
83         (IPC::Connection::SyncMessageState::syncMessageStateMapMutex): Deleted.
84         (IPC::Connection::SyncMessageState::getOrCreate): Deleted.
85         (IPC::Connection::SyncMessageState::~SyncMessageState): Deleted.
86         (IPC::Connection::Connection): Deleted.
87         * Platform/IPC/Connection.h:
88
89 2015-06-20  Alex Christensen  <achristensen@webkit.org>
90
91         [Content Extensions] Add SPI to reload without content blocking.
92         https://bugs.webkit.org/show_bug.cgi?id=146128
93         rdar://problem/20351903
94
95         Reviewed by Sam Weinig.
96
97         * Shared/WebPageCreationParameters.cpp:
98         (WebKit::WebPageCreationParameters::encode):
99         (WebKit::WebPageCreationParameters::decode):
100         * Shared/WebPageCreationParameters.h:
101         * UIProcess/API/C/WKPage.cpp:
102         (WKPageSetCustomUserAgent):
103         (WKPageSetUserContentExtensionsEnabled):
104         (WKPageSupportsTextEncoding):
105         * UIProcess/API/C/WKPage.h:
106         * UIProcess/API/Cocoa/WKWebView.mm:
107         (-[WKWebView _customUserAgent]):
108         (-[WKWebView _setUserContentExtensionsEnabled:]):
109         (-[WKWebView _userContentExtensionsEnabled]):
110         (-[WKWebView _setCustomUserAgent:]):
111         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
112         * UIProcess/WebPageProxy.cpp:
113         (WebKit::WebPageProxy::creationParameters):
114         (WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
115         (WebKit::WebPageProxy::setUserContentExtensionsEnabled):
116         * UIProcess/WebPageProxy.h:
117         (WebKit::WebPageProxy::userContentExtensionsEnabled):
118         * WebProcess/WebPage/WebPage.cpp:
119         (WebKit::WebPage::WebPage):
120         (WebKit::WebPage::reinitializeWebPage):
121         (WebKit::WebPage::setShouldScaleViewToFitDocument):
122         (WebKit::WebPage::setUserContentExtensionsEnabled):
123         * WebProcess/WebPage/WebPage.h:
124         * WebProcess/WebPage/WebPage.messages.in:
125         Pass a boolean from the API to WebCore.
126
127 2015-06-22  Anders Carlsson  <andersca@apple.com>
128
129         Remove m_clientRunLoop from IPC::Connection
130         https://bugs.webkit.org/show_bug.cgi?id=146212
131
132         Reviewed by Sam Weinig.
133
134         We only ever create connections whose messages are dispatched to the main run loop, so we can 
135         vastly simplify the code by only allowing messages to be dispatched there.
136
137         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
138         (WebKit::DatabaseToWebProcessConnection::DatabaseToWebProcessConnection):
139         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
140         (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
141         * Platform/IPC/Connection.cpp:
142         (IPC::Connection::createServerConnection):
143         (IPC::Connection::createClientConnection):
144         (IPC::Connection::Connection):
145         (IPC::Connection::addWorkQueueMessageReceiver):
146         (IPC::Connection::removeWorkQueueMessageReceiver):
147         (IPC::Connection::waitForMessage):
148         (IPC::Connection::sendSyncMessage):
149         (IPC::Connection::sendSyncMessageFromSecondaryThread):
150         (IPC::Connection::processIncomingMessage):
151         (IPC::Connection::connectionDidClose):
152         (IPC::Connection::dispatchDidReceiveInvalidMessage):
153         (IPC::Connection::enqueueIncomingMessage):
154         (IPC::Connection::wakeUpRunLoop):
155         * Platform/IPC/Connection.h:
156         * Platform/IPC/mac/ConnectionMac.mm:
157         (IPC::Connection::receiveSourceEventHandler):
158         * PluginProcess/WebProcessConnection.cpp:
159         (WebKit::WebProcessConnection::WebProcessConnection):
160         * Shared/ChildProcess.cpp:
161         (WebKit::ChildProcess::initialize):
162         * Shared/ChildProcessProxy.cpp:
163         (WebKit::ChildProcessProxy::didFinishLaunching):
164         * UIProcess/Plugins/PluginProcessProxy.cpp:
165         (WebKit::PluginProcessProxy::didFinishLaunching):
166         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
167         (WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection):
168         * WebProcess/Network/NetworkProcessConnection.cpp:
169         (WebKit::NetworkProcessConnection::NetworkProcessConnection):
170         * WebProcess/Plugins/PluginProcessConnection.cpp:
171         (WebKit::PluginProcessConnection::PluginProcessConnection):
172         * WebProcess/WebPage/WebInspector.cpp:
173         (WebKit::WebInspector::createInspectorPage):
174         * WebProcess/WebPage/WebInspectorUI.cpp:
175         (WebKit::WebInspectorUI::establishConnection):
176
177 2015-06-22  Anders Carlsson  <andersca@apple.com>
178
179         Crashes in hit testing under WebPage::acceptsFirstMouse() while handling sync message in plug-in teardown
180         https://bugs.webkit.org/show_bug.cgi?id=146211
181         rdar://problem/17180615
182
183         Reviewed by Sam Weinig.
184
185         If we're inside a sendSync message when we're being called, just bail.
186
187         * WebProcess/WebPage/mac/WebPageMac.mm:
188         (WebKit::WebPage::acceptsFirstMouse):
189
190 2015-06-22  Dan Bernstein  <mitz@apple.com>
191
192         Part 1 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox Profiles target
193         https://bugs.webkit.org/show_bug.cgi?id=146197
194
195         Reviewed by Anders Carlsson.
196
197         * Configurations/SandboxProfiles.xcconfig: Added. Defines INSTALL_PATH based on the value
198         of WK_INSTALL_OVERRIDE_SANDBOX_PROFILES.
199         * WebKit2.xcodeproj/project.pbxproj: Use SandboxProfiles.xcconfig for the Sandbox Profiles
200         target, and change the destination path in its Copy Files build phase to INSTALL_PATH.
201
202 2015-06-22  Antti Koivisto  <antti@apple.com>
203
204         Crash replacing TabDocument in MobileSafari at WebKit: -[WKWebView(WKPrivate) _beginAnimatedResizeWithUpdates:]
205         https://bugs.webkit.org/show_bug.cgi?id=146201
206
207         Reviewed by Dan Bernstein.
208
209         * UIProcess/API/Cocoa/WKWebView.mm:
210         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
211
212         No repro but if for some reason [_contentView bounds] width is zero we'll compute +Inf targetScale
213         and then NaN contentOffset.x. Verified in lldb that this gives the exact crash signature seen.
214
215         Fix by checking that [_contentView bounds] is not empty like is done with other inputs.
216
217 2015-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>
218
219         REGRESSION(r182303): [GTK] Context menu API is broken since r182303
220         https://bugs.webkit.org/show_bug.cgi?id=146202
221
222         Reviewed by Žan Doberšek.
223
224         The problem is that ContextMenuclient API changed in r182303, but
225         we didn't notice it either, and the default handler for
226         getContextMenuFromProposedMenu was executed. An override keyword
227         would have caught this.
228
229         * UIProcess/API/gtk/WebKitContextMenuClient.cpp: Build a Vector of
230         WebContextMenuItemData as expected by our API, and add add
231         override keyword to ensure this doesn't happen again.
232
233 2015-06-22  Zan Dobersek  <zdobersek@igalia.com>
234
235         [WK2] ConnectionUnix should use FastMalloc to allocate on-heap resources
236         https://bugs.webkit.org/show_bug.cgi?id=146143
237
238         Reviewed by Carlos Garcia Campos.
239
240         IPC handling in Unix-specific IPC::Connection implementation should use
241         FastMalloc to allocate on-heap resources, instead of allocating via the
242         system allocator.
243
244         The AttachmentInfo class is marked as allocatable through FastMalloc.
245         That way it can be allocated through FastMalloc while still handled
246         through std::unique_ptr<>.
247
248         The char[] arrays in readBytesFromSocket() and Connection::sendOutgoingMessage()
249         are now handled through a MallocPtr<> object.
250
251         In Connection::sendOutgoingMessage(), both the AttachmentInfo[] and char[]
252         arrays are now only allocated if there are actual attachments contained
253         in the message. The code that's conditioned with a non-empty attachments
254         Vector is now also grouped together, in a single branch.
255
256         * Platform/IPC/unix/ConnectionUnix.cpp:
257         (IPC::readBytesFromSocket):
258         (IPC::Connection::sendOutgoingMessage):
259
260 2015-06-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
261
262         [EFL] test_ewk2_application_cache_manager has been failed since r185527
263         https://bugs.webkit.org/show_bug.cgi?id=146016
264
265         Reviewed by Csaba Osztrogonác.
266
267         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
268         (TEST_F): Disable this test for now. This test will be enabled again.
269
270 2015-06-16  Gavin Barraclough  <barraclough@apple.com>
271
272         Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
273         https://bugs.webkit.org/show_bug.cgi?id=146198
274
275         Unreviewed rollout.
276
277         * UIProcess/API/gtk/WebKitWebContext.cpp:
278         (webkit_web_context_prefetch_dns):
279
280 2015-06-21  Hyungwook Lee  <hyungwook.lee@navercorp.com>
281
282         WKApplicationCacheManagerDeleteEntriesForOrigin() has wrong WebsiteDataTypes.
283         https://bugs.webkit.org/show_bug.cgi?id=146180
284
285         Reviewed by Sam Weinig.
286
287         Modify to use correct WebsiteDataTypes in WKApplicationCacheManagerDeleteEntriesForOrigin()
288
289         * UIProcess/API/C/WKApplicationCacheManager.cpp:
290         (WKApplicationCacheManagerDeleteEntriesForOrigin):
291
292 2015-06-21  Dan Bernstein  <mitz@apple.com>
293
294         <rdar://problem/21444762> REGRESSION (r184215): Plug-in services crash on launch on Yosemite
295         https://bugs.webkit.org/show_bug.cgi?id=146195
296
297         Reviewed by Sam Weinig.
298
299         * Configurations/PluginService.32.xcconfig: Changed the Yosemite definition of
300         INFOPLIST_FILE such that it would also apply to the macosx10.10.internal SDK.
301         * Configurations/PluginService.64.xcconfig: Ditto.
302
303 2015-06-21  Dan Bernstein  <mitz@apple.com>
304
305         Build fix.
306
307         * Shared/API/Cocoa/WKFoundation.h: Don’t use generics if the SDK doesn’t support them.
308
309 2015-06-21  Michael Catanzaro  <mcatanzaro@igalia.com>
310
311         [SOUP] Use GTask in WebKitSoupRequestInputStream
312         https://bugs.webkit.org/show_bug.cgi?id=146184
313
314         Reviewed by Carlos Garcia Campos.
315
316         Replace deprecated use of GSimpleAsyncResult with GTask.
317
318         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
319         (AsyncReadData::AsyncReadData):
320         (webkitSoupRequestInputStreamReadAsyncResultComplete):
321         (webkitSoupRequestInputStreamPendingReadAsyncComplete):
322         (webkitSoupRequestInputStreamReadAsync):
323         (webkitSoupRequestInputStreamReadFinish):
324
325 2015-06-21  Michael Catanzaro  <mcatanzaro@igalia.com>
326
327         Fix format strings in NetworkCache.cpp and NetworkCacheStatistics.cpp and WebIDBServerConnection.cpp
328         https://bugs.webkit.org/show_bug.cgi?id=146172
329
330         Reviewed by Darin Adler.
331
332         Use the correct %"PRIu64" and %"PRIi64" for uint64_t and int64_t, instead of %llu and %lli.
333
334         * NetworkProcess/cache/NetworkCache.cpp:
335         (WebKit::NetworkCache::Cache::retrieve):
336         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
337         (WebKit::NetworkCache::Statistics::initialize):
338         (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
339         (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
340         (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
341         (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
342         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
343         (WebKit::WebIDBServerConnection::deleteDatabase):
344         (WebKit::WebIDBServerConnection::didDeleteDatabase):
345         (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
346         (WebKit::WebIDBServerConnection::didGetOrEstablishIDBDatabaseMetadata):
347         (WebKit::WebIDBServerConnection::openTransaction):
348         (WebKit::WebIDBServerConnection::didOpenTransaction):
349         (WebKit::WebIDBServerConnection::beginTransaction):
350         (WebKit::WebIDBServerConnection::didBeginTransaction):
351         (WebKit::WebIDBServerConnection::commitTransaction):
352         (WebKit::WebIDBServerConnection::didCommitTransaction):
353         (WebKit::WebIDBServerConnection::resetTransaction):
354         (WebKit::WebIDBServerConnection::didResetTransaction):
355         (WebKit::WebIDBServerConnection::rollbackTransaction):
356         (WebKit::WebIDBServerConnection::didRollbackTransaction):
357         (WebKit::WebIDBServerConnection::createObjectStore):
358         (WebKit::WebIDBServerConnection::didCreateObjectStore):
359         (WebKit::WebIDBServerConnection::createIndex):
360         (WebKit::WebIDBServerConnection::didCreateIndex):
361         (WebKit::WebIDBServerConnection::deleteIndex):
362         (WebKit::WebIDBServerConnection::didDeleteIndex):
363         (WebKit::WebIDBServerConnection::get):
364         (WebKit::WebIDBServerConnection::put):
365         (WebKit::WebIDBServerConnection::didPutRecord):
366         (WebKit::WebIDBServerConnection::didGetRecord):
367         (WebKit::WebIDBServerConnection::didOpenCursor):
368         (WebKit::WebIDBServerConnection::didAdvanceCursor):
369         (WebKit::WebIDBServerConnection::didIterateCursor):
370         (WebKit::WebIDBServerConnection::count):
371         (WebKit::WebIDBServerConnection::didCount):
372         (WebKit::WebIDBServerConnection::deleteRange):
373         (WebKit::WebIDBServerConnection::didDeleteRange):
374         (WebKit::WebIDBServerConnection::clearObjectStore):
375         (WebKit::WebIDBServerConnection::didClearObjectStore):
376         (WebKit::WebIDBServerConnection::deleteObjectStore):
377         (WebKit::WebIDBServerConnection::didDeleteObjectStore):
378         (WebKit::WebIDBServerConnection::changeDatabaseVersion):
379         (WebKit::WebIDBServerConnection::didChangeDatabaseVersion):
380         (WebKit::WebIDBServerConnection::openCursor):
381         (WebKit::WebIDBServerConnection::cursorAdvance):
382         (WebKit::WebIDBServerConnection::cursorIterate):
383
384 2015-06-20  Tim Horton  <timothy_horton@apple.com>
385
386         Deselection of text causes a noticeable jump on force touch machines
387         https://bugs.webkit.org/show_bug.cgi?id=146173
388         <rdar://problem/20992842>
389
390         Reviewed by Sam Weinig.
391
392         * Shared/WebCoreArgumentCoders.cpp:
393         (IPC::ArgumentCoder<TextIndicatorData>::encode):
394         (IPC::ArgumentCoder<TextIndicatorData>::decode):
395         Encode/decode wantsMargin.
396
397         * WebProcess/WebPage/mac/WebPageMac.mm:
398         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
399         (WebKit::textIndicatorTransitionForImmediateAction): Deleted.
400         Get rid of TextIndicatorPresentationTransition::Crossfade.
401
402 2015-06-20  Dan Bernstein  <mitz@apple.com>
403
404         [Cocoa] Actually use Objective-C lightweight generics when the compiler supports them
405         https://bugs.webkit.org/show_bug.cgi?id=146183
406
407         Reviewed by Sam Weinig.
408
409         * Shared/API/Cocoa/WKFoundation.h: When the compiler supports Objective-C generics, define
410         WK_ARRAY and WK_SET to use them. Also added a definition of WK_DICTIONARY.
411
412         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Use WK_DICTIONARY for the options dictionary of
413         -_loadRequest:withOptions:.
414
415         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
416         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]): Made the completion
417         halder type match the declaration, now that NSArray and WK_ARRAY(WKWebsiteDataRecord *) are
418         not the same.
419
420         * mac/postprocess-framework-headers.sh: Also rewrite WK_DICTIONARY.
421
422 2015-06-20  Chris Dumez  <cdumez@apple.com>
423
424         [WK2][iOS] Avoid synchronous IPC on view state change when the content is not visible
425         https://bugs.webkit.org/show_bug.cgi?id=146179
426         <rdar://problem/20923432>
427
428         Reviewed by Tim Horton.
429
430         After r170787, viewStateChange() would cause a synchronous IPC between
431         the UIProcess and the WebProcess when the view becomes visible. This
432         was to avoid painting empty / black tiles when unsuspending the
433         WebProcess on tab switch, in the event volatile IOSurfaces were purged.
434
435         However, this sync IPC can have performance implications and is not
436         needed when the content is not actually visible yet (e.g.
437         hideContentUntilNextUpdate() was called, or the tab was killed).
438
439         This patch avoids the synchronous IPC when the content is hidden and
440         exposes a private API on WKWebView so that clients can ask for the
441         content to be hidden until the next update. This would allow for
442         clients to avoid the synchronous IPC if they don't need the content
443         to be displayed synchronously (e.g. the view is obscured).
444
445         * UIProcess/API/Cocoa/WKWebView.mm:
446         (-[WKWebView _hideContentUntilNextUpdate]):
447         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
448         * UIProcess/DrawingAreaProxy.h:
449         (WebKit::DrawingAreaProxy::hasVisibleContent):
450         * UIProcess/WebPageProxy.cpp:
451         (WebKit::WebPageProxy::dispatchViewStateChange):
452         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
453         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
454         (WebKit::RemoteLayerTreeDrawingAreaProxy::isContentHidden):
455
456 2015-06-20  Michael Catanzaro  <mcatanzaro@igalia.com>
457
458         Check for SHA1 certificates ignores subresources
459         https://bugs.webkit.org/show_bug.cgi?id=146159
460
461         Reviewed by Dan Bernstein.
462
463         * UIProcess/WebPageProxy.cpp:
464         (WebKit::WebPageProxy::didCommitLoadForFrame): Call
465         PageLoadState::didDisplayOrRunInsecureContent if a certificate chain contains a non-root
466         SHA1 certificate when the frame is not the main frame.
467
468 2015-06-20  Dan Bernstein  <mitz@apple.com>
469
470         Added availability information to a recently-added delegate method.
471
472         Suggested by Alexey Proskuryakov and Anders Carlsson.
473
474         * UIProcess/API/Cocoa/WKUIDelegate.h: Annotated -webViewDidClose:.
475
476 2015-06-20  Ryuan Choi  <ryuan.choi@navercorp.com>
477
478         [EFL] Do not consider test directories when DEVELOPER_MODE is OFF
479         https://bugs.webkit.org/show_bug.cgi?id=146171
480
481         Reviewed by Gyuyoung Kim.
482
483         * PlatformEfl.cmake:
484         Do not define SOURCE_DIR when DEVELOPER_MODE is OFF for seccomp filter
485         not to allow jhbuild directory.
486         * Shared/efl/ProcessExecutablePathEfl.cpp:
487         (WebKit::findProcessPath): Guard test code to ENABLE(DEVELOPER_MODE).
488
489 2015-06-18  Myles C. Maxfield  <mmaxfield@apple.com>
490
491         REGRESSION(r185475): [Mac] ASSERT() when clicking on text using web fonts with force touch trackpad
492         https://bugs.webkit.org/show_bug.cgi?id=145890
493         <rdar://problem/21390877>
494
495         Reviewed by Darin Adler and Tim Horton.
496
497         The best place to stop the serialization of unserializable fonts is inside WebKit2's IPC code. We want
498         this logic to occur when encoding an NSAttributedString, rather than when encoding an NSDictionary,
499         because changing the shape of an NSAttributedString is less likely to result in problems rather than
500         changing the shape of an NSDictionary.
501
502         * Shared/mac/ArgumentCodersMac.mm:
503         (IPC::fontIsSerializable):
504         (IPC::filterUnserializableValues):
505         (IPC::encode):
506
507 2015-06-19  Michael Catanzaro  <mcatanzaro@igalia.com>
508
509         [SOUP] Fix return-type-c-linkage warning after r185553
510         https://bugs.webkit.org/show_bug.cgi?id=146014
511
512         Reviewed by Martin Robinson.
513
514         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
515         (WebKit::CustomProtocolManagerImpl::start): webkitSoupRequestGenericGetRequest now returns
516         a pointer rather than a reference.
517
518 2015-06-19  Brady Eidson  <beidson@apple.com>
519
520         Rename WKSecurityOrigin.h/cpp to WKSecurityOriginRef.h/cpp.
521         https://bugs.webkit.org/show_bug.cgi?id=146152
522
523         Reviewed by Dan Bernstein.
524
525         * CMakeLists.txt:
526
527         * Shared/API/c/WKSecurityOriginRef.cpp: Renamed from Source/WebKit2/Shared/API/c/WKSecurityOrigin.cpp.
528         * Shared/API/c/WKSecurityOriginRef.h: Renamed from Source/WebKit2/Shared/API/c/WKSecurityOrigin.h.
529
530         * UIProcess/API/efl/ewk_security_origin.cpp:
531         * UIProcess/API/efl/ewk_storage_manager.cpp:
532
533         * WebKit2.xcodeproj/project.pbxproj:
534
535 2015-06-18  Brent Fulgham  <bfulgham@apple.com>
536
537         [iOS] scrollIntoViewIfNeeded is not working with scroll-snap points
538         https://bugs.webkit.org/show_bug.cgi?id=145318
539         <rdar://problem/21081501>
540
541         Reviewed by Simon Fraser.
542
543         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
544         (ArgumentCoder<ScrollingStateScrollingNode>::encode): Handle scroll snap point offset indices.
545         (ArgumentCoder<ScrollingStateScrollingNode>::decode): Ditto.
546         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
547         (WebKit::RemoteScrollingCoordinatorProxy::currentSnapPointIndicesDidChange): Added. Send message
548         to WebProcess when scroll snap indices have changed.
549         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
550         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
551         (WebKit::RemoteScrollingTree::currentSnapPointIndicesDidChange): Added. Notify the
552         RemoteScrollingCoordinatorProxy when scroll snap indices have changed.
553         * UIProcess/Scrolling/RemoteScrollingTree.h:
554         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
555         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
556         (-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Revised.
557         Identify changes in the current scroll snap point offset index (in either the horizontal or vertical
558         directions), and send a notification when this happens.
559         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::currentSnapPointIndicesDidChange): Added. Notify the
560         Scrolling Tree when indices changed.
561         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
562         (WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Revised. Always compute
563         the new scroll snap offset index (even when we will rubber band).
564         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
565         * WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in: Add a new message to relay changes in scroll
566         snap index.
567         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
568         (WebKit::RemoteScrollingCoordinator::currentSnapPointIndicesChangedForNode): Added.
569
570 2015-06-19  Jeremy Jones  <jeremyj@apple.com>
571
572         Revert switch to _synchronizedDrawingFence.
573         https://bugs.webkit.org/show_bug.cgi?id=146136
574         <rdar://problem/21227992>
575
576         Reviewed by Simon Fraser.
577
578         Revert _synchronizedDrawingFence code path that leaks a port.
579
580         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
581         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
582
583 2015-06-19  Anders Carlsson  <andersca@apple.com>
584
585         Address review feedback from Darin.
586
587         * Shared/mac/HangDetectionDisablerMac.mm:
588         (WebKit::clientsMayIgnoreEvents):
589
590 2015-06-19  Anders Carlsson  <andersca@apple.com>
591
592         Disable SpinTracer detection while loading sync XHR
593         https://bugs.webkit.org/show_bug.cgi?id=146150
594         rdar://problem/21462023
595
596         Reviewed by Dan Bernstein.
597
598         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
599         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
600
601 2015-06-19  Anders Carlsson  <andersca@apple.com>
602
603         Spintracer treats the web process as hung when it's showing JavaScript dialogs in the UI process
604         https://bugs.webkit.org/show_bug.cgi?id=146124
605         rdar://problem/21449395
606
607         Reviewed by Geoffrey Garen.
608
609         Add a HangDetectionDisabler RAII object and use it for JavaScript panels.
610
611         * Shared/HangDetectionDisabler.h: Added.
612         (WebKit::HangDetectionDisabler::HangDetectionDisabler):
613         (WebKit::HangDetectionDisabler::~HangDetectionDisabler):
614         * Shared/mac/HangDetectionDisablerMac.mm: Added.
615         (WebKit::clientsMayIgnoreEvents):
616         (WebKit::setClientsMayIgnoreEvents):
617         (WebKit::HangDetectionDisabler::HangDetectionDisabler):
618         (WebKit::HangDetectionDisabler::~HangDetectionDisabler):
619         * WebKit2.xcodeproj/project.pbxproj:
620         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
621         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
622         (WebKit::WebChromeClient::runJavaScriptAlert):
623         (WebKit::WebChromeClient::runJavaScriptConfirm):
624         (WebKit::WebChromeClient::runJavaScriptPrompt):
625
626 2015-06-19  Dan Bernstein  <mitz@apple.com>
627
628         Fixed the build for platforms that don’t have SafariServices.
629
630         * UIProcess/ios/WKContentViewInteraction.mm:
631         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
632         (-[WKContentView commitPreviewViewController:]):
633         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
634
635 2015-06-19  Csaba Osztrogonác  <ossy@webkit.org>
636
637         Remove unnecessary svn:executable flags
638         https://bugs.webkit.org/show_bug.cgi?id=146107
639
640         Reviewed by Alexey Proskuryakov.
641
642         * UIProcess/API/efl/EwkView.cpp: Removed property svn:executable.
643
644 2015-06-19  Csaba Osztrogonác  <ossy@webkit.org>
645
646         [WK2] Fix unused-private-field warning in WebProcess/Plugins/PluginView.<h|cpp>
647         https://bugs.webkit.org/show_bug.cgi?id=145252
648
649         Reviewed by Tim Horton.
650
651         * WebProcess/Plugins/PluginView.cpp:
652         (WebKit::PluginView::PluginView): Added the necessary ifdef guard.
653         * WebProcess/Plugins/PluginView.h: Added the necessary ifdef guard.
654         * WebProcess/WebPage/WebPage.h: Moved the definition of ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC to WTF.
655
656 2015-06-18  Carlos Garcia Campos  <cgarcia@igalia.com>
657
658         Do not store configuration parameters twice in WebProcessPool
659         https://bugs.webkit.org/show_bug.cgi?id=146102
660
661         Reviewed by Sam Weinig.
662
663         Since we are copying the given WebProcessPoolConfiguration and
664         keeping it as a member, we don't need to keep an additional copy
665         of its contents as extra members. This also prevents
666         inconsistencies between the values in the configuration and the
667         members when any of them are modified by WebProcessPool API.
668
669         * UIProcess/API/APIProcessPoolConfiguration.h: Return a const
670         reference instead of a temporary in methods returning a String.
671         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
672         (WebKit::WebProcessPool::updateProcessSuppressionState):
673         (WebKit::WebProcessPool::platformInitializeWebProcess):
674         * UIProcess/WebProcessPool.cpp:
675         (WebKit::WebProcessPool::setProcessModel):
676         (WebKit::WebProcessPool::setMaximumNumberOfProcesses):
677         (WebKit::WebProcessPool::networkingProcessConnection):
678         (WebKit::WebProcessPool::languageChanged):
679         (WebKit::WebProcessPool::setUsesNetworkProcess):
680         (WebKit::WebProcessPool::usesNetworkProcess):
681         (WebKit::WebProcessPool::ensureNetworkProcess):
682         (WebKit::WebProcessPool::ensureDatabaseProcess):
683         (WebKit::WebProcessPool::ensureSharedWebProcess):
684         (WebKit::WebProcessPool::createNewWebProcess):
685         (WebKit::WebProcessPool::warmInitialProcess):
686         (WebKit::WebProcessPool::disconnectProcess):
687         (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
688         (WebKit::WebProcessPool::createWebPage):
689         (WebKit::WebProcessPool::postMessageToInjectedBundle):
690         (WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation):
691         (WebKit::WebProcessPool::setCacheModel):
692         (WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost):
693         (WebKit::WebProcessPool::requestWebContentStatistics):
694         (WebKit::WebProcessPool::requestNetworkingStatistics):
695         * UIProcess/WebProcessPool.h:
696         (WebKit::WebProcessPool::sendToNetworkingProcess):
697         (WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary):
698         (WebKit::WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary):
699         (WebKit::WebProcessPool::sendToOneProcess):
700         * UIProcess/gtk/WebProcessPoolGtk.cpp:
701         (WebKit::WebProcessPool::platformInitializeWebProcess):
702
703 2015-06-18  Jon Lee  <jonlee@apple.com>
704
705         Update AVKit usage of pip
706         https://bugs.webkit.org/show_bug.cgi?id=146095
707         <rdar://problem/21386853>
708
709         Reviewed by Eric Carlson.
710
711         - Rename preference key
712         - Rename shouldAllowAlternateFullscreen to shouldAllowPictureInPictureMediaPlayback
713
714         * Shared/WebPreferencesDefinitions.h:
715         * UIProcess/API/C/WKPreferences.cpp: Remove unused preference calls.
716         (WKPreferencesSetAllowsAlternateFullscreen): Deleted.
717         (WKPreferencesGetAllowsAlternateFullscreen): Deleted.
718         * UIProcess/API/C/WKPreferencesRefPrivate.h:
719         * UIProcess/API/Cocoa/WKWebView.mm:
720         (-[WKWebView _isShowingVideoPictureInPicture]): Renamed.
721         (-[WKWebView _isShowingVideoOptimized]): Deleted.
722         (-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]): Renamed.
723         (-[WKWebView _mayAutomaticallyShowVideoOptimized]): Deleted.
724         (shouldAllowPictureInPictureMediaPlayback): Renamed.
725         (shouldAllowAlternateFullscreen): Deleted.
726         * UIProcess/API/Cocoa/WKWebViewInternal.h:
727         * UIProcess/ios/PageClientImplIOS.mm:
728         * UIProcess/ios/WebVideoFullscreenManagerProxy.h: Rename local variables.
729         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
730         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
731         (WebKit::WebVideoFullscreenManagerProxy::mayAutomaticallyShowVideoPictureInPicture): Renamed.
732         (WebKit::WebVideoFullscreenManagerProxy::mayAutomaticallyShowVideoOptimized): Deleted.
733         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
734         * WebProcess/WebPage/WebPage.cpp:
735         * WebProcess/ios/WebVideoFullscreenManager.mm:
736
737 2015-06-18  Jeremy Jones  <jeremyj@apple.com>
738
739         Fix crash when entering fullscreen during exit fullscreen animation.
740         https://bugs.webkit.org/show_bug.cgi?id=146117
741
742         Reviewed by Simon Fraser.
743
744         A partial teardown left the LayerHostingContext in a bad state when attempting to reuse the model and interface
745         objects. Instead, complete the teardown and don't reuse the objects.
746
747         * WebProcess/ios/WebVideoFullscreenManager.mm:
748         (WebKit::WebVideoFullscreenManager::didEnterFullscreen): WebThreadRun is a no-op in WK2. Use dispatch_async.
749         (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Do complete teardown before entering fullscreen again.
750
751 2015-06-18  Anders Carlsson  <andersca@apple.com>
752
753         Remove shouldInterruptJavaScript
754         https://bugs.webkit.org/show_bug.cgi?id=146118
755
756         Reviewed by Antti Koivisto.
757
758         * UIProcess/API/APIUIClient.h:
759         (API::UIClient::shouldInterruptJavaScript): Deleted.
760         * UIProcess/API/C/WKPage.cpp:
761         (WKPageSetPageUIClient): Deleted.
762         * UIProcess/API/C/WKPageUIClient.h:
763         * UIProcess/WebPageProxy.cpp:
764         (WebKit::WebPageProxy::shouldInterruptJavaScript): Deleted.
765         * UIProcess/WebPageProxy.h:
766         * UIProcess/WebPageProxy.messages.in:
767         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
768         (WebKit::WebChromeClient::shouldInterruptJavaScript): Deleted.
769         * WebProcess/WebCoreSupport/WebChromeClient.h:
770
771 2015-06-18  Tim Horton  <timothy_horton@apple.com>
772
773         Use SFSafariViewController for previews
774         https://bugs.webkit.org/show_bug.cgi?id=146092
775
776         Reviewed by Darin Adler.
777
778         * UIProcess/ios/WKContentViewInteraction.mm:
779         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
780         (-[WKContentView commitPreviewViewController:]):
781         * WebKit2.xcodeproj/project.pbxproj:
782         * Source/WebKit2/Platform/spi/ios/SafariServicesSPI.h:
783
784 2015-06-18  Antti Koivisto  <antti@apple.com>
785
786         ~4% Membuster regression after WebKit r185452
787         https://bugs.webkit.org/show_bug.cgi?id=146112
788         rdar://problem/21406677
789
790         Reviewed by Chris Dumez.
791
792         Clear the cache write queue on critical memory pressure. There can be substantial amount of memory there and we
793         don't know how long writing it out will take. System is often under I/O pressure too in low memory situations.
794
795         This also makes sense for process suspension where we send simulated critical memory event.
796
797         * NetworkProcess/NetworkProcess.cpp:
798         (WebKit::NetworkProcess::lowMemoryHandler):
799         * NetworkProcess/cache/NetworkCache.cpp:
800         (WebKit::NetworkCache::Cache::handleMemoryPressureNotification):
801         * NetworkProcess/cache/NetworkCache.h:
802         * NetworkProcess/cache/NetworkCacheStorage.cpp:
803         (WebKit::NetworkCache::Storage::clearWriteQueue):
804         * NetworkProcess/cache/NetworkCacheStorage.h:
805
806 2015-06-18  Csaba Osztrogonác  <ossy@webkit.org>
807
808         Fix missing braces and deprecated declarations warnings in WebKitNotificationProvider.cpp
809         https://bugs.webkit.org/show_bug.cgi?id=145921
810
811         Reviewed by Carlos Garcia Campos.
812
813         * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
814         (WebKitNotificationProvider::WebKitNotificationProvider):
815
816 2015-06-18  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
817
818         [EFL] test_ewk2_context has been failed since r185529
819         https://bugs.webkit.org/show_bug.cgi?id=146046
820
821         Reviewed by Csaba Osztrogonác.
822
823         ewk_context_network_process_model test has been failed since r185529.
824         This patch modifies the test which is similar to ewk_context_network_process_model
825         based on multiple process model to fix the failure. Besides ewk_context_network_process_model
826         seems to be fixed indirectly. So we enable it again.
827
828         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
829         (TEST_F):
830
831 2015-06-17  Yongjun Zhang  <yongjun_zhang@apple.com>
832
833         Also turn off long press on link preview.
834         https://bugs.webkit.org/show_bug.cgi?id=146084
835
836         Also turn off long presss gesture when previewing. Turn that back on when preview is completed.
837
838         Reviewed by Tim Horton.
839
840         * UIProcess/ios/WKContentViewInteraction.mm:
841         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
842         (-[WKContentView didDismissPreviewViewController:committing:]):
843
844 2015-06-17  Brent Fulgham  <bfulgham@apple.com>
845
846         Overflow regions with scroll snap points are not reliably rubber banding
847         https://bugs.webkit.org/show_bug.cgi?id=142522
848         <rdar://problem/20100726>
849
850         Reviewed by Darin Adler.
851
852         Make sure we don't block rubberbanding behavior when a scroll gesture should take us past
853         the end of the scroll container.
854
855         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
856         (-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Don't adjust
857         target point if we were going to scroll past the edges of the scroll container.
858
859 2015-06-17  Anders Carlsson  <andersca@apple.com>
860
861         Would like a way, in the API, to get notified about a web process crash
862         https://bugs.webkit.org/show_bug.cgi?id=146085
863         rdar://problem/17358828
864
865         Reviewed by Darin Adler.
866
867         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
868         * UIProcess/Cocoa/NavigationState.h:
869         * UIProcess/Cocoa/NavigationState.mm:
870         (WebKit::NavigationState::setNavigationDelegate):
871         (WebKit::NavigationState::NavigationClient::processDidCrash):
872
873 2015-06-17  Tim Horton  <timothy_horton@apple.com>
874
875         Swipe gesture can get stuck, preventing scrolling and other gestures
876         https://bugs.webkit.org/show_bug.cgi?id=146088
877         <rdar://problem/16056087>
878
879         Reviewed by Darin Adler.
880
881         * UIProcess/mac/ViewGestureControllerMac.mm:
882         (WebKit::ViewGestureController::trackSwipeGesture):
883         Ignore mouse events that come in while we're doing a swipe.
884         This prevents potentially problematic mouse events (especially context menus)
885         won't be processed during a swipe, avoiding situations that can cause
886         the swipe gesture to get stuck.
887
888 2015-06-17  Sungmann Cho  <sungmann.cho@navercorp.com>
889
890         Remove willSendEventToPlugin() from PluginController.h.
891         https://bugs.webkit.org/show_bug.cgi?id=146054
892
893         Reviewed by Darin Adler.
894
895         PluginController::willSendEventToPlugin() was introduced by http://webkit.org/b/59124.
896         This method had been used only for WebKit2 on Windows, and no one uses it now.
897         So we can remove it.
898
899         No new tests, no behavior change.
900
901         * PluginProcess/PluginControllerProxy.cpp:
902         (WebKit::PluginControllerProxy::willSendEventToPlugin): Deleted.
903         * PluginProcess/PluginControllerProxy.h:
904         * WebProcess/Plugins/PluginController.h:
905         * WebProcess/Plugins/PluginView.cpp:
906         (WebKit::PluginView::willSendEventToPlugin): Deleted.
907         * WebProcess/Plugins/PluginView.h:
908
909 2015-06-17  Tim Horton  <timothy_horton@apple.com>
910
911         Repro crash when swiping back from a NY Times article @ WebPageProxy::navigationGestureDidEnd
912         https://bugs.webkit.org/show_bug.cgi?id=146083
913         <rdar://problem/20974232>
914
915         Reviewed by Darin Adler.
916
917         * UIProcess/ios/ViewGestureControllerIOS.mm:
918         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
919         (WebKit::ViewGestureController::activeLoadMonitoringTimerFired):
920         It is possible to get didSameDocumentNavigationForMainFrame *before*
921         endSwipeGesture, while the user is still interactively swiping. We
922         cannot remove the snapshot in this case, nor should we start the active
923         load monitoring timer; all of these things should happen only after the
924         swipe is completed and we've performed the navigation.
925
926         This was particularly bad (a crash instead of just a disappearing snapshot)
927         because removing the snapshot also causes m_webPageProxyForBackForwardListForCurrentSwipe
928         to be nulled out, but then it is dereferenced during endSwipeGesture.
929
930         Make sure that we never call removeSwipeSnapshotIfReady unless we were actually
931         waiting to remove the swipe snapshot (because the gesture had completed).
932         Most callers already did ensure this, but these two did not.
933
934 2015-06-17  Joseph Pecoraro  <pecoraro@apple.com>
935
936         Web Inspector: Improve Full Screen support for Web Inspector windows
937         https://bugs.webkit.org/show_bug.cgi?id=146036
938
939         Reviewed by Timothy Hatcher.
940
941         * UIProcess/WebInspectorProxy.h:
942         * UIProcess/mac/WebInspectorProxyMac.mm:
943         (-[WKWebInspectorProxyObjCAdapter windowDidEnterFullScreen:]):
944         (-[WKWebInspectorProxyObjCAdapter windowDidExitFullScreen:]):
945         (WebKit::WebInspectorProxy::platformCanAttach):
946         (WebKit::WebInspectorProxy::windowFullScreenDidChange):
947         When entering / leaving full screen update attach availability to
948         potentially show / hide the frontend's docking buttons.
949
950         (WebKit::WebInspectorProxy::createInspectorWindow):
951         Allow a Web Inspector window to be a full screen auxillary window,
952         so that if the application with a WebView opens a detached inspector
953         window it can be shown on the same desktop as the full screen app.
954         Also, reduce the minimum window size requirements for full screen tiling.
955
956 2015-06-17  Tim Horton  <timothy_horton@apple.com>
957
958         Safari tabs still have shrunken content after coming out of fullscreen
959         https://bugs.webkit.org/show_bug.cgi?id=146037
960         <rdar://problem/21105960>
961
962         Reviewed by Simon Fraser and Darin Adler.
963
964         * UIProcess/WebPageProxy.h:
965         (WebKit::WebPageProxy::useFixedLayoutDidChange):
966         (WebKit::WebPageProxy::fixedLayoutSizeDidChange):
967         * UIProcess/WebPageProxy.messages.in:
968         * WebProcess/WebPage/WebPage.cpp:
969         (WebKit::WebPage::setUseFixedLayout):
970         (WebKit::WebPage::setFixedLayoutSize):
971         Keep the UI process up-to-date when fixed layout is enabled or the size changes.
972         This is important because these things can change from the Web process side too,
973         and the UI process uses its (potentially stale) version to do some short-circuiting.
974         This was causing us to fail to turn off fixed layout when it was turned
975         on from the Web process side (by TiledCoreAnimationDrawingArea).
976
977         * UIProcess/mac/WKViewLayoutStrategy.mm:
978         (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy willChangeLayoutStrategy]):
979         Reset the view scale, which WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy
980         makes heavy use of, just like the others.
981
982 2015-06-17  Dan Bernstein  <mitz@apple.com>
983
984         [Cocoa] Expose UIDelegate::UIClient::close via WKUIDelegate
985         https://bugs.webkit.org/show_bug.cgi?id=145957
986
987         Reviewed by Darin Adler.
988
989         * UIProcess/API/Cocoa/WKUIDelegate.h: Added -webViewDidClose: to the protocol.
990         * UIProcess/Cocoa/UIDelegate.h: Added a webViewDidClose boolean to the delegate methods struct.
991         * UIProcess/Cocoa/UIDelegate.mm:
992         (WebKit::UIDelegate::setDelegate): Initialize the webViewDidClose boolean.
993         (WebKit::UIDelegate::UIClient::close): Changed to call the new delegate method. Left behind
994         code that calls the old private method if it’s implemented.
995
996 2015-06-17  Carlos Garcia Campos  <cgarcia@igalia.com>
997
998         [GTK] WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER doesn't disable memory cache when set before the web process is launched
999         https://bugs.webkit.org/show_bug.cgi?id=146053
1000
1001         Reviewed by Martin Robinson.
1002
1003         The cache is disabled in WebProcess::platformSetCacheModel() when
1004         the cache model is CacheModelDocumentViewer, but it's enabled
1005         again by WebProcess::setMemoryCacheDisabled() when
1006         memoryCacheDisabled creation parameter is processed. We need to
1007         make sure the cache model and memoryCacheDisabled parameters are consistent.
1008
1009         * UIProcess/gtk/WebProcessPoolGtk.cpp:
1010         (WebKit::WebProcessPool::platformInitializeWebProcess): Initialize
1011         memoryCacheDisabled parameter to true if memory cache was
1012         explicitly disabled or cache model is CacheModelDocumentViewer.
1013
1014 2015-06-17  Zan Dobersek  <zdobersek@igalia.com>
1015
1016         [WK2] valueForKey() shouldn't copy the defaults map
1017         https://bugs.webkit.org/show_bug.cgi?id=146050
1018
1019         Reviewed by Sam Weinig.
1020
1021         * Shared/WebPreferencesStore.cpp:
1022         (WebKit::valueForKey): Avoid copying the defaults HashMap by binding the return value to a reference.
1023
1024 2015-06-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1025
1026         [GTK] Inhibit screen saver when playing full screen video
1027         https://bugs.webkit.org/show_bug.cgi?id=145795
1028
1029         Reviewed by Gustavo Noronha Silva.
1030
1031         Use Freedesktop.org DBus API to inhibit/unhinibit the screen saver
1032         when entering/leaving fullscreen.
1033
1034         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1035         (screenSaverInhibitedCallback):
1036         (webkitWebViewBaseSendInhibitMessageToScreenSaver):
1037         (screenSaverProxyCreatedCallback):
1038         (webkitWebViewBaseInhibitScreenSaver):
1039         (webkitWebViewBaseUninhibitScreenSaver):
1040         (webkitWebViewBaseEnterFullScreen):
1041         (webkitWebViewBaseExitFullScreen):
1042
1043 2015-06-16  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1044
1045         Purge PassRefPtr with Ref or RefPtr
1046         https://bugs.webkit.org/show_bug.cgi?id=146001
1047
1048         Reviewed by Darin Adler.
1049
1050         As step to remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
1051         If function can't return nullptr, PassRefPtr is changed with Ref. If not, the function
1052         returns RefPtr.
1053
1054         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
1055         (WebKit::DatabaseToWebProcessConnection::create):
1056         * DatabaseProcess/DatabaseToWebProcessConnection.h:
1057         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
1058         (WebKit::DatabaseProcessIDBConnection::create):
1059         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1060         (WebKit::UniqueIDBDatabase::create):
1061         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1062         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1063         (WebKit::NetworkConnectionToWebProcess::create):
1064         * NetworkProcess/NetworkConnectionToWebProcess.h:
1065         * NetworkProcess/RemoteNetworkingContext.h:
1066         * PluginProcess/WebProcessConnection.cpp:
1067         (WebKit::WebProcessConnection::create):
1068         * PluginProcess/WebProcessConnection.h:
1069         * Shared/API/APINumber.h:
1070         (API::Number::create):
1071         * Shared/API/APISecurityOrigin.h:
1072         (API::SecurityOrigin::createFromString):
1073         (API::SecurityOrigin::create):
1074         * Shared/API/APISerializedScriptValue.h:
1075         (API::SerializedScriptValue::create):
1076         (API::SerializedScriptValue::adopt):
1077         * Shared/APIWebArchive.h:
1078         * Shared/APIWebArchive.mm:
1079         (API::WebArchive::create):
1080         * Shared/APIWebArchiveResource.h:
1081         * Shared/APIWebArchiveResource.mm:
1082         (API::WebArchiveResource::create):
1083         * Shared/AsyncRequest.h:
1084         * UIProcess/API/efl/ewk_url_request_private.h:
1085         (EwkUrlRequest::create):
1086         * UIProcess/API/efl/ewk_url_response_private.h:
1087         (EwkUrlResponse::create):
1088         * UIProcess/API/efl/ewk_url_scheme_request_private.h:
1089         (EwkUrlSchemeRequest::create):
1090         * UIProcess/API/efl/ewk_window_features_private.h:
1091         (EwkWindowFeatures::create):
1092         * UIProcess/API/efl/tests/test_ewk2_object.cpp:
1093         (TestEwkObject1::create):
1094         (TestEwkObject2::create):
1095         * UIProcess/API/gtk/WebKitBatteryProvider.cpp:
1096         (WebKitBatteryProvider::create):
1097         * UIProcess/API/gtk/WebKitBatteryProvider.h:
1098         * UIProcess/API/gtk/WebKitColorChooser.cpp:
1099         (WebKit::WebKitColorChooser::create):
1100         * UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
1101         (WebKitGeolocationProvider::create):
1102         * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
1103         (WebKitNotificationProvider::create):
1104         * UIProcess/API/gtk/WebKitNotificationProvider.h:
1105         * UIProcess/GeolocationPermissionRequestProxy.h:
1106         (WebKit::GeolocationPermissionRequestProxy::create):
1107         * UIProcess/InspectorServer/HTTPRequest.h:
1108         (WebKit::HTTPRequest::create):
1109         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
1110         (WebKit::WebSoupCustomProtocolRequestManager::create):
1111         * UIProcess/Network/NetworkProcessProxy.cpp:
1112         (WebKit::NetworkProcessProxy::create):
1113         * UIProcess/Network/NetworkProcessProxy.h:
1114         * UIProcess/Notifications/NotificationPermissionRequest.cpp:
1115         (WebKit::NotificationPermissionRequest::create):
1116         * UIProcess/Notifications/NotificationPermissionRequest.h:
1117         * UIProcess/Notifications/WebNotification.h:
1118         (WebKit::WebNotification::create):
1119         * UIProcess/WebPageProxy.cpp:
1120         (WebKit::WebPageProxy::scriptValueCallback):
1121         * UIProcess/WebVibrationProxy.cpp:
1122         (WebKit::WebVibrationProxy::create):
1123         * UIProcess/WebVibrationProxy.h:
1124         * UIProcess/WebViewportAttributes.h:
1125         (WebKit::WebViewportAttributes::create):
1126         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1127         (WebKit::WebsiteDataStore::createNonPersistent):
1128         (WebKit::WebsiteDataStore::create):
1129         * UIProcess/WebsiteData/WebsiteDataStore.h:
1130         * UIProcess/gtk/WebColorPickerGtk.cpp:
1131         (WebKit::WebColorPickerGtk::create):
1132         * UIProcess/gtk/WebColorPickerGtk.h:
1133         * UIProcess/gtk/WebContextMenuProxyGtk.h:
1134         (WebKit::WebContextMenuProxyGtk::create):
1135         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
1136         (WebKit::WebPopupMenuProxyGtk::create):
1137         * UIProcess/mac/ViewSnapshotStore.h:
1138         * UIProcess/mac/ViewSnapshotStore.mm:
1139         (WebKit::ViewSnapshot::create):
1140         * UIProcess/mac/WebColorPickerMac.h:
1141         * UIProcess/mac/WebColorPickerMac.mm:
1142         (WebKit::WebColorPickerMac::create):
1143         * UIProcess/mac/WebContextMenuProxyMac.h:
1144         (WebKit::WebContextMenuProxyMac::create):
1145         * UIProcess/mac/WebPopupMenuProxyMac.h:
1146         (WebKit::WebPopupMenuProxyMac::create):
1147         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
1148         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
1149         (WebKit::WebToDatabaseProcessConnection::create):
1150         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1151         (WebKit::WebFullScreenManager::create):
1152         * WebProcess/FullScreen/WebFullScreenManager.h:
1153         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1154         (WebKit::InjectedBundleRangeHandle::create):
1155         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
1156         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
1157         (WebKit::InjectedBundleBackForwardList::create):
1158
1159 2015-06-16  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1160
1161         Unreviewed build fix after r185615.
1162
1163         * UIProcess/API/gtk/WebKitWebContext.cpp:
1164         (webkit_web_context_clear_cache): Comment the call to the code
1165         removed and write down the bugzilla link for reimplementation.
1166
1167 2015-06-16  Anders Carlsson  <andersca@apple.com>
1168
1169         Get rid of performAPICallbackWithSecurityOriginDataVector
1170         https://bugs.webkit.org/show_bug.cgi?id=146039
1171
1172         Reviewed by Andreas Kling.
1173
1174         Get rid of performAPICallbackWithSecurityOriginDataVector since it's now no longer used
1175         and add a bunch of includes to make up for SecurityOriginData.h no longer including GenericCallback.h.
1176         * DatabaseProcess/DatabaseProcess.cpp:
1177         * DatabaseProcess/DatabaseProcess.h:
1178         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1179         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1180         * Shared/SecurityOriginData.cpp:
1181         (WebKit::performAPICallbackWithSecurityOriginDataVector): Deleted.
1182         * Shared/SecurityOriginData.h:
1183         * Shared/WebsiteData/WebsiteData.cpp:
1184         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1185         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
1186
1187 2015-06-16  Ryuan Choi  <ryuan.choi@navercorp.com>
1188
1189         Unreviewed build fix attempt on CMake based port after r185623.
1190
1191         * CMakeLists.txt:
1192
1193 2015-06-16  Anders Carlsson  <andersca@apple.com>
1194
1195         Move LocalStorageDetails into the local storage database tracker
1196         https://bugs.webkit.org/show_bug.cgi?id=146034
1197
1198         Reviewed by Andreas Kling.
1199
1200         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1201         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
1202         (WKKeyValueStorageManagerDeleteAllEntries):
1203         * UIProcess/LocalStorageDetails.h: Removed.
1204         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1205         (WebKit::LocalStorageDatabaseTracker::originDetails):
1206         (WebKit::LocalStorageDatabaseTracker::details): Deleted.
1207         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
1208         * UIProcess/Storage/StorageManager.cpp:
1209         (WebKit::StorageManager::getLocalStorageOriginDetails):
1210         (WebKit::StorageManager::getLocalStorageDetailsByOrigin): Deleted.
1211         (WebKit::StorageManager::deleteAllLocalStorageEntries): Deleted.
1212         * UIProcess/Storage/StorageManager.h:
1213         * WebKit2.xcodeproj/project.pbxproj:
1214
1215 2015-06-16  Dan Bernstein  <mitz@apple.com>
1216
1217         Removed the WebKit2SandboxProfiles target.
1218
1219         Rubber-stamped by Anders Carlsson.
1220
1221         WebKit2SandboxProfiles was just an alias for the Sandbox Profiles target, and it’s not
1222         needed anymore.
1223
1224         * WebKit2.xcodeproj/project.pbxproj:
1225
1226 2015-06-16  Anders Carlsson  <andersca@apple.com>
1227
1228         Fold WebKeyValueStorageManager into WKKeyValueStorageManager
1229         https://bugs.webkit.org/show_bug.cgi?id=146030
1230
1231         Reviewed by Andreas Kling.
1232
1233         * UIProcess/API/C/WKAPICast.h:
1234         * UIProcess/API/C/WKContext.cpp:
1235         (WKContextGetKeyValueStorageManager):
1236         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1237         (WKKeyValueStorageManagerGetTypeID):
1238         (WKKeyValueStorageManagerGetOriginKey):
1239         (WKKeyValueStorageManagerGetCreationTimeKey):
1240         (WKKeyValueStorageManagerGetModificationTimeKey):
1241         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
1242         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
1243         (WKKeyValueStorageManagerDeleteEntriesForOrigin):
1244         (WKKeyValueStorageManagerDeleteAllEntries):
1245         * UIProcess/WebKeyValueStorageManager.cpp: Removed.
1246         (WebKit::WebKeyValueStorageManager::supplementName): Deleted.
1247         (WebKit::WebKeyValueStorageManager::originKey): Deleted.
1248         (WebKit::WebKeyValueStorageManager::creationTimeKey): Deleted.
1249         (WebKit::WebKeyValueStorageManager::modificationTimeKey): Deleted.
1250         (WebKit::WebKeyValueStorageManager::create): Deleted.
1251         (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager): Deleted.
1252         (WebKit::WebKeyValueStorageManager::~WebKeyValueStorageManager): Deleted.
1253         (WebKit::WebKeyValueStorageManager::refWebContextSupplement): Deleted.
1254         (WebKit::WebKeyValueStorageManager::derefWebContextSupplement): Deleted.
1255         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins): Deleted.
1256         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin): Deleted.
1257         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin): Deleted.
1258         (WebKit::WebKeyValueStorageManager::deleteAllEntries): Deleted.
1259         * UIProcess/WebKeyValueStorageManager.h: Removed.
1260         * UIProcess/WebProcessPool.cpp:
1261         * WebKit2.xcodeproj/project.pbxproj:
1262
1263 2015-06-16  Alex Christensen  <achristensen@webkit.org>
1264
1265         CMake build fix after r185615.
1266
1267         * CMakeLists.txt:
1268         Remove WebResourceCacheManager from CMake build system.
1269
1270 2015-06-16  Alex Christensen  <achristensen@webkit.org>
1271
1272         [Content Extensions] Implement branch compaction for DFA bytecode.
1273         https://bugs.webkit.org/show_bug.cgi?id=145619
1274
1275         Reviewed by Benjamin Poulain.
1276
1277         * UIProcess/API/APIUserContentExtensionStore.h:
1278         Increment version number to reflect changes to bytecode.
1279
1280 2015-06-16  Anders Carlsson  <andersca@apple.com>
1281
1282         WebResourceCacheManager is unused, get rid of it
1283         https://bugs.webkit.org/show_bug.cgi?id=146027
1284
1285         Reviewed by Sam Weinig.
1286
1287         * DerivedSources.make:
1288         * UIProcess/API/C/WKAPICast.h:
1289         * UIProcess/API/C/WKContext.cpp:
1290         * UIProcess/WebProcessPool.cpp:
1291         * UIProcess/WebResourceCacheManagerProxy.cpp: Removed.
1292         (WebKit::WebResourceCacheManagerProxy::supplementName): Deleted.
1293         (WebKit::WebResourceCacheManagerProxy::create): Deleted.
1294         (WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy): Deleted.
1295         (WebKit::WebResourceCacheManagerProxy::~WebResourceCacheManagerProxy): Deleted.
1296         (WebKit::WebResourceCacheManagerProxy::processPoolDestroyed): Deleted.
1297         (WebKit::WebResourceCacheManagerProxy::processDidClose): Deleted.
1298         (WebKit::WebResourceCacheManagerProxy::shouldTerminate): Deleted.
1299         (WebKit::WebResourceCacheManagerProxy::refWebContextSupplement): Deleted.
1300         (WebKit::WebResourceCacheManagerProxy::derefWebContextSupplement): Deleted.
1301         (WebKit::WebResourceCacheManagerProxy::getCacheOrigins): Deleted.
1302         (WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Deleted.
1303         (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin): Deleted.
1304         (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins): Deleted.
1305         * UIProcess/WebResourceCacheManagerProxy.h: Removed.
1306         * UIProcess/WebResourceCacheManagerProxy.messages.in: Removed.
1307         * WebKit2.xcodeproj/project.pbxproj:
1308         * WebProcess/ResourceCache/WebResourceCacheManager.cpp: Removed.
1309         (WebKit::WebResourceCacheManager::supplementName): Deleted.
1310         (WebKit::WebResourceCacheManager::WebResourceCacheManager): Deleted.
1311         (WebKit::WebResourceCacheManager::getCacheOrigins): Deleted.
1312         (WebKit::WebResourceCacheManager::returnCacheOrigins): Deleted.
1313         (WebKit::WebResourceCacheManager::clearCacheForOrigin): Deleted.
1314         (WebKit::WebResourceCacheManager::clearCacheForAllOrigins): Deleted.
1315         * WebProcess/ResourceCache/WebResourceCacheManager.h: Removed.
1316         * WebProcess/ResourceCache/WebResourceCacheManager.messages.in: Removed.
1317         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm: Removed.
1318         (WebKit::partitionName): Deleted.
1319         (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback): Deleted.
1320         (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames): Deleted.
1321         * WebProcess/WebProcess.cpp:
1322         (WebKit::WebProcess::WebProcess): Deleted.
1323
1324 2015-06-16  Alex Christensen  <achristensen@webkit.org>
1325
1326         CMake build fix after r185601.
1327
1328         * CMakeLists.txt:
1329         Remove application cache manager classes.
1330
1331 2015-06-16  Anders Carlsson  <andersca@apple.com>
1332
1333         Stop calling into WebResourceCacheManager
1334         https://bugs.webkit.org/show_bug.cgi?id=146026
1335
1336         Reviewed by Andreas Kling.
1337
1338         Copy the cache clearing code into NetworkProcessCocoa in preparation of getting rid of
1339         the WebResourceCacheManager code.
1340
1341         * NetworkProcess/NetworkProcess.cpp:
1342         (WebKit::fetchDiskCacheEntries):
1343         (WebKit::clearDiskCacheEntries):
1344         (WebKit::cfURLCacheOrigins): Deleted.
1345         * NetworkProcess/NetworkProcess.h:
1346         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1347         (WebKit::partitionName):
1348         (WebKit::NetworkProcess::cfURLCacheOrigins):
1349         (WebKit::NetworkProcess::clearCFURLCacheForOrigins):
1350
1351 2015-06-16  Anders Carlsson  <andersca@apple.com>
1352
1353         Get rid of the application cache manager classes, they are no longer used
1354         https://bugs.webkit.org/show_bug.cgi?id=146024
1355
1356         Reviewed by Sam Weinig.
1357
1358         * DerivedSources.make:
1359         * UIProcess/API/C/WKAPICast.h:
1360         * UIProcess/API/C/WKContext.cpp:
1361         * UIProcess/WebApplicationCacheManagerProxy.cpp: Removed.
1362         (WebKit::WebApplicationCacheManagerProxy::supplementName): Deleted.
1363         (WebKit::WebApplicationCacheManagerProxy::create): Deleted.
1364         (WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy): Deleted.
1365         (WebKit::WebApplicationCacheManagerProxy::~WebApplicationCacheManagerProxy): Deleted.
1366         (WebKit::WebApplicationCacheManagerProxy::processPoolDestroyed): Deleted.
1367         (WebKit::WebApplicationCacheManagerProxy::processDidClose): Deleted.
1368         (WebKit::WebApplicationCacheManagerProxy::shouldTerminate): Deleted.
1369         (WebKit::WebApplicationCacheManagerProxy::refWebContextSupplement): Deleted.
1370         (WebKit::WebApplicationCacheManagerProxy::derefWebContextSupplement): Deleted.
1371         (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins): Deleted.
1372         (WebKit::WebApplicationCacheManagerProxy::didGetApplicationCacheOrigins): Deleted.
1373         (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin): Deleted.
1374         (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries): Deleted.
1375         * UIProcess/WebApplicationCacheManagerProxy.h: Removed.
1376         * UIProcess/WebApplicationCacheManagerProxy.messages.in: Removed.
1377         * UIProcess/WebProcessPool.cpp:
1378         * WebKit2.xcodeproj/project.pbxproj:
1379         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: Removed.
1380         (WebKit::WebApplicationCacheManager::supplementName): Deleted.
1381         (WebKit::WebApplicationCacheManager::WebApplicationCacheManager): Deleted.
1382         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins): Deleted.
1383         (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin): Deleted.
1384         (WebKit::WebApplicationCacheManager::deleteAllEntries): Deleted.
1385         (WebKit::WebApplicationCacheManager::setAppCacheMaximumSize): Deleted.
1386         * WebProcess/ApplicationCache/WebApplicationCacheManager.h: Removed.
1387         * WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in: Removed.
1388         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1389         (WebKit::InjectedBundle::clearApplicationCache):
1390         (WebKit::InjectedBundle::setAppCacheMaximumSize):
1391         * WebProcess/WebProcess.cpp:
1392         (WebKit::WebProcess::WebProcess): Deleted.
1393
1394 2015-06-16  Brady Eidson  <beidson@apple.com>
1395
1396         IDB: Records table migration doesn't work with all versions of SQLite.
1397         https://bugs.webkit.org/show_bug.cgi?id=145993
1398
1399         Reviewed by Darin Adler, provisionally reviewed by Jon Lee.
1400
1401         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1402         (WebKit::v1RecordsTableSchema):
1403         (WebKit::v1RecordsTableSchemaAlternate):
1404         (WebKit::v2RecordsTableSchema):
1405         (WebKit::v2RecordsTableSchemaAlternate):
1406         (WebKit::createOrMigrateRecordsTableIfNecessary): Check both v1 and v1 Alternate whenever we check for the v1 schema.
1407           Ditto for the v2 schema. Crash all builds if the current schema is none of these.
1408
1409 2015-06-16  Dan Bernstein  <mitz@apple.com>
1410
1411         Build fix.
1412
1413         * mac/postprocess-framework-headers.sh:
1414
1415 2015-06-16  Commit Queue  <commit-queue@webkit.org>
1416
1417         Unreviewed, rolling out r185552.
1418         https://bugs.webkit.org/show_bug.cgi?id=146015
1419
1420          It broke some WK2 API tests on EFL bots (Requested by
1421         gyuyoung on #webkit).
1422
1423         Reverted changeset:
1424
1425         "[EFL] Make send/receive messages to communicate the Web and
1426         UI Processes using Injected Bundle."
1427         https://bugs.webkit.org/show_bug.cgi?id=145685
1428         http://trac.webkit.org/changeset/185552
1429
1430 2015-06-16  Ryuan Choi  <ryuan.choi@navercorp.com>
1431
1432         [EFL] Add API tests for ewk_page
1433         https://bugs.webkit.org/show_bug.cgi?id=146004
1434
1435         Reviewed by Gyuyoung Kim.
1436
1437         Add unit test for load_started/load_finished callbacks of ewk_page.
1438
1439         * PlatformEfl.cmake:
1440         * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
1441         * UIProcess/API/efl/tests/test_ewk2_page.cpp: Added.
1442         (EWK2PageTest::messageReceivedCallback):
1443         (EWK2PageTest::EWK2PageTest):
1444         (TEST_F):
1445
1446 2015-06-15  Simon Fraser  <simon.fraser@apple.com>
1447
1448         [iOS WK2] position:fixed elements sometimes truncated on scroll view bouncing
1449         https://bugs.webkit.org/show_bug.cgi?id=146000
1450         rdar://problem/19448439
1451
1452         Reviewed by Benjamin Poulain.
1453         
1454         When in the middle of a rubber-band (UIScrollView bounce), we could send a bad 
1455         fixed position rect down to WebCore, causing 100% height elements to get laid out
1456         at the wrong height, possible too short. This occurred when -_updateVisibleContentRects
1457         said we were in a stable state, but the rubber-band offset caused WebPageProxy::computeCustomFixedPositionRect()
1458         to compute a bad rect via constrainedUnobscuredRect.intersect(documentRect).
1459         
1460         Fix by not claiming to be in a stable state during rubber-banding. Added _scrollViewIsRubberBanding
1461         to compute that, taking care with floating point comparisons for 3x devices.
1462
1463         * UIProcess/API/Cocoa/WKWebView.mm:
1464         (isGreaterInDevicePixels):
1465         (-[WKWebView _scrollViewIsRubberBanding]):
1466         (-[WKWebView _updateVisibleContentRects]):
1467
1468 2015-06-15  Ryuan Choi  <ryuan.choi@navercorp.com>
1469
1470         Fix build break when ENABLE_SECCOMP_FILTERS is ON
1471         https://bugs.webkit.org/show_bug.cgi?id=145967
1472
1473         Reviewed by Carlos Garcia Campos.
1474
1475         Since r183189, ArgumentEncoder::addAttachment requires rvalue reference.
1476
1477         * Shared/linux/SeccompFilters/OpenSyscall.cpp:
1478         (WebKit::OpenSyscallResult::encode): Use WTF::move().
1479
1480 2015-06-15  Chris Dumez  <cdumez@apple.com>
1481
1482         [WK2] BrowsingContextController.loadData API is leaking Navigation objects
1483         https://bugs.webkit.org/show_bug.cgi?id=145977
1484         <rdar://problem/21305706>
1485
1486         Reviewed by Darin Adler.
1487
1488         BrowsingContextController.loadData API was leaking Navigation objects.
1489         The issue was due to WebPageProxy::loadData() creating a Navigation
1490         object but not passing along the navigationID to the WebProcess when
1491         sending the Messages::WebPage::LoadData IPC. As a result, the
1492         WebProcess would use 0 as navigationID and we would end up creating a
1493         new Navigation object later on for the same navigation.
1494
1495         * UIProcess/WebPageProxy.cpp:
1496         (WebKit::WebPageProxy::loadData):
1497         * WebProcess/WebPage/WebPage.cpp:
1498         (WebKit::WebPage::loadData):
1499         * WebProcess/WebPage/WebPage.h:
1500         * WebProcess/WebPage/WebPage.messages.in:
1501
1502 2015-06-15  Dan Bernstein  <mitz@apple.com>
1503
1504         REGRESSION (r185298): Databases service has Web Content service’s entitlements
1505         https://bugs.webkit.org/show_bug.cgi?id=145980
1506
1507         Reviewed by Darin Adler.
1508
1509         * Configurations/DatabaseService.xcconfig: Set WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE to
1510         Databases-iOS.
1511
1512 2015-06-11  Jon Lee  <jonlee@apple.com>
1513
1514         [WK2] Add allowsPictureInPictureMediaPlayback
1515         https://bugs.webkit.org/show_bug.cgi?id=145901
1516         rdar://problem/21349851
1517
1518         Reviewed by Anders Carlsson.
1519
1520         Replace _allowsAlternateFullscreen with allowsPictureInPictureMediaPlayback.
1521
1522         * UIProcess/API/Cocoa/WKWebViewConfiguration.h: Add allowsPictureInPictureMediaPlayback.
1523         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1524         (-[WKWebViewConfiguration init]): Remove _allowsAlternateFullscreen.
1525         (-[WKWebViewConfiguration copyWithZone:]): Replace the variable.
1526         (-[WKWebViewConfiguration _allowsAlternateFullscreen]): Deleted.
1527         (-[WKWebViewConfiguration _setAllowsAlternateFullscreen:]): Deleted.
1528         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Remove the SPI.
1529
1530         * UIProcess/API/Cocoa/WKWebView.mm:
1531         (-[WKWebView initWithFrame:configuration:]): Update to use the new API.
1532
1533 2015-06-12  Alexey Proskuryakov  <ap@apple.com>
1534
1535         -[WKWebView evaluateJavaScript] provides a misleading error when the return cannot be serialized
1536         https://bugs.webkit.org/show_bug.cgi?id=145900
1537
1538         Reviewed by Sam Weinig.
1539
1540         We used to conflate to cases: (1) when there was a JavaScript exception, and
1541         (2) when the result could not be serialized for IPC. Turns out that it was quite
1542         misleading!
1543
1544         * UIProcess/API/C/WKPage.cpp:
1545         (WKPageRunJavaScriptInMainFrame):
1546         * UIProcess/API/Cocoa/WKError.h:
1547         * UIProcess/API/Cocoa/WKError.mm:
1548         (localizedDescriptionForErrorCode):
1549         * UIProcess/API/Cocoa/WKWebView.mm:
1550         (-[WKWebView evaluateJavaScript:completionHandler:]):
1551         * UIProcess/WebPageProxy.cpp:
1552         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
1553         (WebKit::WebPageProxy::scriptValueCallback):
1554         * UIProcess/WebPageProxy.h:
1555         * UIProcess/WebPageProxy.messages.in:
1556         * WebProcess/WebPage/WebPage.cpp:
1557         (WebKit::WebPage::runJavaScriptInMainFrame):
1558         * UIProcess/API/gtk/WebKitWebView.cpp:
1559         (webkit_web_view_run_javascript):
1560         (resourcesStreamReadCallback):
1561
1562 2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1563
1564         [SOUP] Custom URI schemes don't work for requests containing a fragment identifier
1565         https://bugs.webkit.org/show_bug.cgi?id=145969
1566
1567         Reviewed by Sergio Villar Senin.
1568
1569         Use the WebKitSoupRequestGeneric request instead of creating a new one
1570         from the SoupRequest URI, since that is the network one and doesn't
1571         contain the fragment identifier part.
1572
1573         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
1574         (WebKit::CustomProtocolManagerImpl::start):
1575
1576 2015-06-15  Hyungwook Lee  <hyungwook.lee@navercorp.com>
1577
1578         [EFL] Make send/receive messages to communicate the Web and UI Processes using Injected Bundle.
1579         https://bugs.webkit.org/show_bug.cgi?id=145685
1580
1581         Reviewed by Gyuyoung Kim.
1582
1583         To have extensible port specific API facility using Injected Bundle,
1584         we need to load libewebkit_extension_manager.so in default that is same as what gtk port does.
1585
1586         * UIProcess/API/efl/ewk_context.cpp:
1587         (EwkContext::EwkContext):
1588         (EwkContext::~EwkContext):
1589         (EwkContext::findOrCreateWrapper):
1590         (bundlePathForExtension):
1591         (EwkContext::create): Deleted.
1592         * UIProcess/API/efl/ewk_context_private.h:
1593         * WebProcess/efl/ExtensionManagerEfl.cpp:
1594         (WebKit::ExtensionManagerEfl::initialize):
1595
1596 2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1597
1598         [SOUP] Move WebKitSoupRequestGeneric to platform layer
1599         https://bugs.webkit.org/show_bug.cgi?id=145968
1600
1601         Reviewed by Sergio Villar Senin.
1602
1603         * PlatformEfl.cmake: Remove WebKitSoupRequestGeneric.
1604         * PlatformGTK.cmake: Ditto.
1605         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
1606         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:
1607
1608 2015-06-15  Csaba Osztrogonác  <ossy@webkit.org>
1609
1610         Fix unused private field warning in PageBanner.h
1611         https://bugs.webkit.org/show_bug.cgi?id=145925
1612
1613         Reviewed by Darin Adler.
1614
1615         * WebProcess/WebPage/PageBanner.cpp:
1616         (WebKit::PageBanner::~PageBanner):
1617         * WebProcess/WebPage/PageBanner.h: Initialize m_type, m_webPage, m_mouseDownInBanner, and m_isHidden here instead of in the constructor.
1618         * WebProcess/WebPage/mac/PageBannerMac.mm: Use PLATFORM(MAC) instead of !PLATFORM(IOS), they are same in objc files.
1619
1620 2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1621
1622         [SOUP] Make WebKitSoupRequestGeneric independent from CustomProtocolManagerImpl
1623         https://bugs.webkit.org/show_bug.cgi?id=145966
1624
1625         Reviewed by Sergio Villar Senin.
1626
1627         Add WebKitSoupRequestGenericClient with start and finish methods,
1628         that are implemented by WebKitSoupRequestGeneric.
1629         This allows us to move WebKitSoupRequestGeneric to platform layer.
1630
1631         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
1632         (WebKit::CustomProtocolManagerImpl::registerScheme):
1633         (WebKit::CustomProtocolManagerImpl::start):
1634         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:
1635         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
1636         (webkitSoupRequestGenericSendAsync):
1637         (webkitSoupRequestGenericSendFinish):
1638         * WebProcess/soup/WebKitSoupRequestGeneric.h:
1639         * WebProcess/soup/WebKitSoupRequestGenericClient.h: Added.
1640
1641 2015-06-14  Dan Bernstein  <mitz@apple.com>
1642
1643         Fixed the build.
1644
1645         * mac/postprocess-framework-headers.sh:
1646
1647 2015-06-14  Michael Catanzaro  <mcatanzaro@igalia.com>
1648
1649         Format string misuse in DatabaseProcessIDBConnection.cpp and UniqueIDBDatabaseBackingStoreSQLite.cpp
1650         https://bugs.webkit.org/show_bug.cgi?id=145960
1651
1652         Reviewed by Darin Adler.
1653
1654         Use PRIu64 and PRIi64 to print uint64_t and int64_t, respectively. These things are
1655         different types on x86_64 Linux (unsigned long) and on Mac (unsigned long long).
1656
1657         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1658         (WebKit::DatabaseProcessIDBConnection::getOrEstablishIDBDatabaseMetadata):
1659         (WebKit::DatabaseProcessIDBConnection::deleteDatabase):
1660         (WebKit::DatabaseProcessIDBConnection::openTransaction):
1661         (WebKit::DatabaseProcessIDBConnection::beginTransaction):
1662         (WebKit::DatabaseProcessIDBConnection::commitTransaction):
1663         (WebKit::DatabaseProcessIDBConnection::resetTransaction):
1664         (WebKit::DatabaseProcessIDBConnection::rollbackTransaction):
1665         (WebKit::DatabaseProcessIDBConnection::changeDatabaseVersion):
1666         (WebKit::DatabaseProcessIDBConnection::createObjectStore):
1667         (WebKit::DatabaseProcessIDBConnection::deleteObjectStore):
1668         (WebKit::DatabaseProcessIDBConnection::clearObjectStore):
1669         (WebKit::DatabaseProcessIDBConnection::createIndex):
1670         (WebKit::DatabaseProcessIDBConnection::deleteIndex):
1671         (WebKit::DatabaseProcessIDBConnection::putRecord):
1672         (WebKit::DatabaseProcessIDBConnection::getRecord):
1673         (WebKit::DatabaseProcessIDBConnection::count):
1674         (WebKit::DatabaseProcessIDBConnection::deleteRange):
1675         (WebKit::DatabaseProcessIDBConnection::openCursor):
1676         (WebKit::DatabaseProcessIDBConnection::cursorAdvance):
1677         (WebKit::DatabaseProcessIDBConnection::cursorIterate):
1678         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1679         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
1680         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore):
1681         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
1682         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKeyNumber):
1683         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
1684         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
1685         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::uncheckedPutIndexRecord):
1686         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord):
1687         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
1688         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
1689         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::advanceCursor):
1690
1691 2015-06-14  Dan Bernstein  <mitz@apple.com>
1692
1693         [Cocoa] Clean up postprocess-framework-headers.sh
1694         https://bugs.webkit.org/show_bug.cgi?id=145962
1695
1696         Reviewed by Darin Adler.
1697
1698         * mac/postprocess-framework-headers.sh: Gather all the sed options in a variable, and then
1699         run sed only once on each header. Also, correctly exit with the sed return value if it
1700         fails.
1701
1702 2015-06-13  Chris Dumez  <cdumez@apple.com>
1703
1704         [WK2] API::Navigation objects are leaked on history navigation to HistoryItems in PageCache
1705         https://bugs.webkit.org/show_bug.cgi?id=145948
1706
1707         Reviewed by Darin Adler.
1708
1709         API::Navigation objects were leaked on history navigation to
1710         HistoryItems in PageCache. In such case, we would create 2 Navigation
1711         objects instead of 1 and the first one would be leaked. The reason
1712         we create the second one is because we fail to pass along the
1713         navigationID from the UIProcess to the WebProcess and then back to the
1714         UIProcess. On the IPC back to the UIProcess, the navigationID ends up
1715         being 0 so the UIProcess creates a new Navigation object, thinking that
1716         the load was triggered by the WebContent process.
1717
1718         We now pass along the navigationID, even if the HistoryItem is in the
1719         PageCache and we end up reusing the cached DocumentLoader, instead of
1720         creating a new one. A new updateCachedDocumentLoader() delegate is
1721         added to the FrameLoaderClient, similarly to the pre-existing
1722         createDocumentLoader() but for the case where the DocumentLoader gets
1723         reused.
1724
1725         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1726         (WebKit::WebFrameLoaderClient::updateCachedDocumentLoader):
1727         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1728         * WebProcess/WebPage/WebPage.cpp:
1729         (WebKit::WebPage::goForward):
1730         (WebKit::WebPage::goBack):
1731         (WebKit::WebPage::goToBackForwardItem):
1732         (WebKit::WebPage::updateCachedDocumentLoader):
1733         * WebProcess/WebPage/WebPage.h:
1734
1735 2015-06-12  Gavin Barraclough  <barraclough@apple.com>
1736
1737         Add private API to force page to always run at foreground priority
1738         https://bugs.webkit.org/show_bug.cgi?id=145946
1739         <rdar://problem/21267221>
1740
1741         Reviewed by Anders Carlsson.
1742
1743         * UIProcess/API/Cocoa/WKWebView.mm:
1744         (-[WKWebView initWithFrame:configuration:]):
1745             - copy _alwaysRunsAtForegroundPriority to WebPageConfiguration.
1746         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1747         (-[WKWebViewConfiguration copyWithZone:]):
1748         (-[WKWebViewConfiguration _alwaysRunsAtForegroundPriority]):
1749         (-[WKWebViewConfiguration _setAlwaysRunsAtForegroundPriority:]):
1750             - added _alwaysRunsAtForegroundPriority.
1751         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1752             - added _alwaysRunsAtForegroundPriority.
1753         * UIProcess/WebPageProxy.cpp:
1754         (WebKit::WebPageProxy::WebPageProxy):
1755             - initialize m_alwaysRunsAtForegroundPriority.
1756         (WebKit::WebPageProxy::updateActivityToken):
1757             - if m_alwaysRunsAtForegroundPriority is set always take the foreground activity token.
1758         * UIProcess/WebPageProxy.h:
1759             - added m_alwaysRunsAtForegroundPriority, alwaysRunsAtForegroundPriority.
1760
1761 2015-06-12  Anders Carlsson  <andersca@apple.com>
1762
1763         Reimplement WKResourceCacheManagerRef on top of WKWebsiteDataStoreRef
1764         https://bugs.webkit.org/show_bug.cgi?id=145951
1765
1766         Reviewed by Darin Adler.
1767
1768         * UIProcess/API/C/WKContext.cpp:
1769         (WKContextGetResourceCacheManager):
1770         * UIProcess/API/C/WKResourceCacheManager.cpp:
1771         (WKResourceCacheManagerGetTypeID):
1772         (toWebsiteDataTypes):
1773         (WKResourceCacheManagerGetCacheOrigins):
1774         (WKResourceCacheManagerClearCacheForOrigin):
1775         (WKResourceCacheManagerClearCacheForAllOrigins):
1776
1777 2015-06-12  Anders Carlsson  <andersca@apple.com>
1778
1779         Reimplement WKApplicationCacheManagerRef as WKWebsiteDataStoreRef
1780         https://bugs.webkit.org/show_bug.cgi?id=145950
1781
1782         Reviewed by Dan Bernstein.
1783
1784         * UIProcess/API/C/WKAPICast.h:
1785         * UIProcess/API/C/WKApplicationCacheManager.cpp:
1786         (WKApplicationCacheManagerGetTypeID):
1787         (WKApplicationCacheManagerGetApplicationCacheOrigins):
1788         (WKApplicationCacheManagerDeleteEntriesForOrigin):
1789         (WKApplicationCacheManagerDeleteAllEntries):
1790         * UIProcess/API/C/WKContext.cpp:
1791         (WKContextGetApplicationCacheManager):
1792         (WKContextGetPluginSiteDataManager):
1793
1794 2015-06-12  Anders Carlsson  <andersca@apple.com>
1795
1796         Clean up IndexedDB website data retrieval and removal
1797         https://bugs.webkit.org/show_bug.cgi?id=145941
1798
1799         Reviewed by Andreas Kling.
1800
1801         - Use SecurityOrigin instead of SecurityOriginData; It's not possible to pass SecurityOriginData
1802         safely between threads.
1803         
1804         - Use std::chrono instead of double for modification times.
1805         
1806         - Get rid of endTime since it's not used.
1807         
1808         - Change deleteIndexedDatabaseEntriesForOrigin to deleteIndexedDatabaseEntriesForOrigins and make it take
1809         a vector of origins instead of a single one.
1810
1811         - Get rid of deleteAllIndexedDatabaseEntries.
1812
1813         - Change SecurityOriginData::securityOrigin to call isolatedCopy on the origin components, since it's common
1814         to pass origins to other threads and we want that to be safe.
1815
1816         * DatabaseProcess/DatabaseProcess.cpp:
1817         (WebKit::DatabaseProcess::fetchWebsiteData):
1818         (WebKit::DatabaseProcess::deleteWebsiteData):
1819         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
1820         (WebKit::DatabaseProcess::indexedDatabaseOrigins):
1821         (WebKit::removeAllDatabasesForOriginPath):
1822         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigins):
1823         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedSince):
1824         (WebKit::DatabaseProcess::getIndexedDatabaseOrigins): Deleted.
1825         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin): Deleted.
1826         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates): Deleted.
1827         (WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries): Deleted.
1828         * DatabaseProcess/DatabaseProcess.h:
1829         * Shared/SecurityOriginData.cpp:
1830         (WebKit::SecurityOriginData::securityOrigin):
1831
1832 2015-06-12  Antti Koivisto  <antti@apple.com>
1833
1834         Network Cache: Use SHA1 for header checksum
1835         https://bugs.webkit.org/show_bug.cgi?id=145928
1836
1837         Reviewed by Chris Dumez.
1838
1839         Use SHA1 everywhere for consistency and robustness.
1840
1841         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1842         (WebKit::NetworkCache::Storage::bodyPathForKey):
1843         (WebKit::NetworkCache::RecordMetaData::RecordMetaData):
1844         (WebKit::NetworkCache::decodeRecordMetaData):
1845         (WebKit::NetworkCache::decodeRecordHeader):
1846         (WebKit::NetworkCache::encodeRecordMetaData):
1847         (WebKit::NetworkCache::Storage::encodeRecord):
1848         (WebKit::NetworkCache::hashData): Deleted.
1849
1850             This was the last user of 32 bit hashes in cache code.
1851
1852         * NetworkProcess/cache/NetworkCacheStorage.h:
1853
1854             Also bump the cache version number as recent changes have changed the format.
1855             Old caches would transition fine but this makes it easier to identify which version user has.
1856
1857 2015-06-12  Simon Fraser  <simon.fraser@apple.com>
1858
1859         [iOS WK2] Video with reflection crashes WebKit and Safari
1860         https://bugs.webkit.org/show_bug.cgi?id=145905
1861         rdar://problem/18364939
1862
1863         Reviewed by Anders Carlsson.
1864         
1865         On iOS, AVPlayerLayers are contained inside a WebVideoContainerLayer, but
1866         the layer type is still LayerTypeAVPlayerLayer.
1867         
1868         Avoid throwing exceptions when cloning such layers by checking the layer class.
1869
1870         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
1871         (WebKit::PlatformCALayerRemoteCustom::clone):
1872
1873 2015-06-12  Csaba Osztrogonác  <ossy@webkit.org>
1874
1875         [EFL] Fix unused private field warning in WebContextMenuProxyEfl.cpp
1876         https://bugs.webkit.org/show_bug.cgi?id=145911
1877
1878         Reviewed by Darin Adler.
1879
1880         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
1881         (WebKit::WebContextMenuProxyEfl::WebContextMenuProxyEfl): Deleted.
1882         * UIProcess/efl/WebContextMenuProxyEfl.h:
1883
1884 2015-06-12  Zan Dobersek  <zdobersek@igalia.com>
1885
1886         Unreviewed build fix after r185502.
1887
1888         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
1889         GRefPtr.h header has been moved to a different place.
1890
1891 2015-06-12  Zan Dobersek  <zdobersek@igalia.com>
1892
1893         [GLib] Move files under Source/WTF/wtf/gobject to Source/WTF/wtf/glib
1894         https://bugs.webkit.org/show_bug.cgi?id=145799
1895
1896         Reviewed by Carlos Garcia Campos.
1897
1898         Update header inclusions for headers that have been moved
1899         to Source/WTF/wtf/glib/.
1900
1901         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
1902         * NetworkProcess/cache/NetworkCacheIOChannel.h:
1903         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1904         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1905         * PlatformEfl.cmake:
1906         * PlatformGTK.cmake:
1907         * Shared/Downloads/soup/DownloadSoup.cpp:
1908         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:
1909         * Shared/PrintInfo.h:
1910         * Shared/gtk/ArgumentCodersGtk.cpp:
1911         * Shared/gtk/ArgumentCodersGtk.h:
1912         * Shared/gtk/KeyedDecoder.h:
1913         * Shared/gtk/KeyedEncoder.h:
1914         * Shared/gtk/ProcessExecutablePathGtk.cpp:
1915         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
1916         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
1917         * UIProcess/API/gtk/WebKitColorChooser.h:
1918         * UIProcess/API/gtk/WebKitContextMenu.cpp:
1919         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
1920         * UIProcess/API/gtk/WebKitCookieManager.cpp:
1921         * UIProcess/API/gtk/WebKitDownload.cpp:
1922         * UIProcess/API/gtk/WebKitDownloadClient.cpp:
1923         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
1924         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
1925         * UIProcess/API/gtk/WebKitFindController.cpp:
1926         * UIProcess/API/gtk/WebKitFormClient.cpp:
1927         * UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
1928         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
1929         * UIProcess/API/gtk/WebKitJavascriptResult.cpp:
1930         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
1931         * UIProcess/API/gtk/WebKitMimeInfo.cpp:
1932         * UIProcess/API/gtk/WebKitNavigationAction.cpp:
1933         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
1934         * UIProcess/API/gtk/WebKitPolicyClient.cpp:
1935         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
1936         * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
1937         * UIProcess/API/gtk/WebKitUIClient.cpp:
1938         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
1939         * UIProcess/API/gtk/WebKitUserContentManager.cpp:
1940         * UIProcess/API/gtk/WebKitWebContext.cpp:
1941         * UIProcess/API/gtk/WebKitWebInspector.cpp:
1942         * UIProcess/API/gtk/WebKitWebResource.cpp:
1943         * UIProcess/API/gtk/WebKitWebView.cpp:
1944         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1945         * UIProcess/InspectorServer/WebSocketServer.h:
1946         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
1947         * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
1948         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1949         * UIProcess/Plugins/gtk/PluginInfoCache.h:
1950         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
1951         * UIProcess/gtk/DragAndDropHandler.cpp:
1952         * UIProcess/gtk/GestureController.h:
1953         * UIProcess/gtk/InputMethodFilter.cpp:
1954         * UIProcess/gtk/InputMethodFilter.h:
1955         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1956         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
1957         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
1958         * UIProcess/gtk/WebProcessPoolGtk.cpp:
1959         * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
1960         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
1961         * WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp:
1962         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1963         * WebProcess/WebPage/WebPage.h:
1964         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
1965         * WebProcess/WebPage/gtk/PrinterListGtk.h:
1966         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1967         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
1968         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
1969         * WebProcess/gtk/WebGtkExtensionManager.h:
1970         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
1971         * WebProcess/soup/WebProcessSoup.cpp:
1972         * WebProcess/soup/WebSoupRequestManager.h:
1973
1974 2015-06-12  Antti Koivisto  <antti@apple.com>
1975
1976         Network Cache: Use SHA1 for key hash
1977         https://bugs.webkit.org/show_bug.cgi?id=143829
1978
1979         Reviewed by Anders Carlsson.
1980
1981         For consistency with blobs, use SHA1 instead of MD5.
1982
1983         * NetworkProcess/cache/NetworkCacheCoders.cpp:
1984         (WebKit::NetworkCache::Coder<MD5::Digest>::encode): Deleted.
1985         (WebKit::NetworkCache::Coder<MD5::Digest>::decode): Deleted.
1986
1987             No longer needed.
1988
1989         * NetworkProcess/cache/NetworkCacheCoders.h:
1990         * NetworkProcess/cache/NetworkCacheKey.cpp:
1991         (WebKit::NetworkCache::hashString):
1992         (WebKit::NetworkCache::Key::computeHash):
1993         * NetworkProcess/cache/NetworkCacheKey.h:
1994
1995 2015-06-12  Csaba Osztrogonác  <ossy@webkit.org>
1996
1997         Fix mismatched-tags warning in Source/WebKit2/UIProcess/gtk/InputMethodFilter.h
1998         https://bugs.webkit.org/show_bug.cgi?id=145923
1999
2000         Reviewed by Carlos Garcia Campos.
2001
2002         * UIProcess/gtk/InputMethodFilter.h:
2003
2004 2015-06-12  Antti Koivisto  <antti@apple.com>
2005
2006         Use SHA1 for cache coder checksums
2007         https://bugs.webkit.org/show_bug.cgi?id=145880
2008
2009         Reviewed by Anders Carlsson.
2010
2011         Make cache data error detection more robust by using SHA1 for checksums.
2012
2013         * NetworkProcess/cache/NetworkCacheDecoder.cpp:
2014         (WebKit::NetworkCache::Decoder::Decoder):
2015         (WebKit::NetworkCache::Decoder::decodeFixedLengthData):
2016         (WebKit::NetworkCache::Decoder::decodeNumber):
2017         (WebKit::NetworkCache::Decoder::verifyChecksum):
2018         * NetworkProcess/cache/NetworkCacheDecoder.h:
2019         * NetworkProcess/cache/NetworkCacheEncoder.cpp:
2020         (WebKit::NetworkCache::Encoder::Encoder):
2021         (WebKit::NetworkCache::Encoder::grow):
2022         (WebKit::NetworkCache::Encoder::updateChecksumForData):
2023         (WebKit::NetworkCache::Encoder::encodeFixedLengthData):
2024         (WebKit::NetworkCache::Encoder::encodeNumber):
2025         (WebKit::NetworkCache::Encoder::encodeChecksum):
2026         * NetworkProcess/cache/NetworkCacheEncoder.h:
2027         (WebKit::NetworkCache::Encoder::buffer):
2028         (WebKit::NetworkCache::Encoder::bufferSize):
2029         (WebKit::NetworkCache::Encoder::updateChecksumForNumber):
2030
2031 2015-06-12  Csaba Osztrogonác  <ossy@webkit.org>
2032
2033         [EFL] Fix deprecated declarations warnings related to WK2 versioned structs
2034         https://bugs.webkit.org/show_bug.cgi?id=145913
2035
2036         Reviewed by Gyuyoung Kim.
2037
2038         * UIProcess/API/efl/ewk_favicon_database.cpp:
2039         (EwkFaviconDatabase::EwkFaviconDatabase):
2040         * UIProcess/efl/ContextHistoryClientEfl.cpp:
2041         (WebKit::ContextHistoryClientEfl::ContextHistoryClientEfl):
2042         * UIProcess/efl/ContextMenuClientEfl.cpp:
2043         (ContextMenuClientEfl::ContextMenuClientEfl):
2044         * UIProcess/efl/DownloadManagerEfl.cpp:
2045         (WebKit::DownloadManagerEfl::DownloadManagerEfl):
2046         * UIProcess/efl/FindClientEfl.cpp:
2047         (WebKit::FindClientEfl::FindClientEfl):
2048         * UIProcess/efl/FormClientEfl.cpp:
2049         (WebKit::FormClientEfl::FormClientEfl):
2050         * UIProcess/efl/PageUIClientEfl.cpp:
2051         (WebKit::PageUIClientEfl::PageUIClientEfl):
2052
2053 2015-06-11  Mark Lam  <mark.lam@apple.com>
2054
2055         WebCore::reportException() needs to be able to accept a raw thrown value in addition to Exception objects.
2056         https://bugs.webkit.org/show_bug.cgi?id=145872
2057
2058         Reviewed by Michael Saboff.
2059
2060         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2061         (WebKit::InjectedBundle::reportException):
2062         - Don't assume we have an Exception object.  Let WebCore::reportException() take
2063           care of it.
2064
2065 2015-06-11  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2066
2067         [CMake] Unreviewed build fix after r185479.
2068
2069         * CMakeLists.txt: Unlist the files that r185479 deleted.
2070
2071 2015-06-11  Anders Carlsson  <andersca@apple.com>
2072
2073         Get rid of WebOriginDataManager
2074         https://bugs.webkit.org/show_bug.cgi?id=145896
2075
2076         Reviewed by Andreas Kling.
2077
2078         * DatabaseProcess/DatabaseProcess.cpp:
2079         (WebKit::DatabaseProcess::DatabaseProcess): Deleted.
2080         (WebKit::DatabaseProcess::getOrigins): Deleted.
2081         (WebKit::DatabaseProcess::deleteEntriesForOrigin): Deleted.
2082         (WebKit::DatabaseProcess::deleteEntriesModifiedBetweenDates): Deleted.
2083         (WebKit::DatabaseProcess::deleteAllEntries): Deleted.
2084         * DatabaseProcess/DatabaseProcess.h:
2085         * DerivedSources.make:
2086         * UIProcess/API/C/WKAPICast.h:
2087         * UIProcess/API/C/WKContext.cpp:
2088         * UIProcess/Databases/DatabaseProcessProxy.cpp:
2089         (WebKit::DatabaseProcessProxy::didReceiveMessage): Deleted.
2090         * UIProcess/WebOriginDataManagerProxy.cpp: Removed.
2091         (WebKit::WebOriginDataManagerProxy::supplementName): Deleted.
2092         (WebKit::WebOriginDataManagerProxy::create): Deleted.
2093         (WebKit::WebOriginDataManagerProxy::WebOriginDataManagerProxy): Deleted.
2094         (WebKit::WebOriginDataManagerProxy::~WebOriginDataManagerProxy): Deleted.
2095         (WebKit::WebOriginDataManagerProxy::processPoolDestroyed): Deleted.
2096         (WebKit::WebOriginDataManagerProxy::processDidClose): Deleted.
2097         (WebKit::WebOriginDataManagerProxy::shouldTerminate): Deleted.
2098         (WebKit::WebOriginDataManagerProxy::refWebContextSupplement): Deleted.
2099         (WebKit::WebOriginDataManagerProxy::derefWebContextSupplement): Deleted.
2100         (WebKit::CallbackSynchronizer::create): Deleted.
2101         (WebKit::CallbackSynchronizer::~CallbackSynchronizer): Deleted.
2102         (WebKit::CallbackSynchronizer::taskStarted): Deleted.
2103         (WebKit::CallbackSynchronizer::taskCompleted): Deleted.
2104         (WebKit::CallbackSynchronizer::CallbackSynchronizer): Deleted.
2105         (WebKit::createSynchronizedCallback): Deleted.
2106         (WebKit::sendMessageToAllProcessesInProcessPool): Deleted.
2107         (WebKit::WebOriginDataManagerProxy::getOrigins): Deleted.
2108         (WebKit::WebOriginDataManagerProxy::didGetOrigins): Deleted.
2109         (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin): Deleted.
2110         (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates): Deleted.
2111         (WebKit::WebOriginDataManagerProxy::didDeleteEntries): Deleted.
2112         (WebKit::WebOriginDataManagerProxy::deleteAllEntries): Deleted.
2113         (WebKit::WebOriginDataManagerProxy::didDeleteAllEntries): Deleted.
2114         * UIProcess/WebOriginDataManagerProxy.h: Removed.
2115         * UIProcess/WebOriginDataManagerProxy.messages.in: Removed.
2116         * UIProcess/WebProcessPool.cpp:
2117         * WebKit2.xcodeproj/project.pbxproj:
2118         * WebProcess/OriginData/WebOriginDataManager.cpp: Removed.
2119         (WebKit::WebOriginDataManager::WebOriginDataManager): Deleted.
2120         (WebKit::WebOriginDataManager::getOrigins): Deleted.
2121         (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Deleted.
2122         (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Deleted.
2123         (WebKit::WebOriginDataManager::deleteAllEntries): Deleted.
2124         * WebProcess/OriginData/WebOriginDataManager.h: Removed.
2125         * WebProcess/OriginData/WebOriginDataManager.messages.in: Removed.
2126         * WebProcess/OriginData/WebOriginDataManagerSupplement.h: Removed.
2127         (WebKit::WebOriginDataManagerSupplement::WebOriginDataManagerSupplement): Deleted.
2128         (WebKit::WebOriginDataManagerSupplement::~WebOriginDataManagerSupplement): Deleted.
2129         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2130         * WebProcess/WebPage/WebPage.cpp:
2131         * WebProcess/WebProcess.cpp:
2132         (WebKit::WebProcess::~WebProcess):
2133         (WebKit::WebProcess::WebProcess): Deleted.
2134         (WebKit::WebProcess::getOrigins): Deleted.
2135         (WebKit::WebProcess::deleteEntriesForOrigin): Deleted.
2136         (WebKit::WebProcess::deleteEntriesModifiedBetweenDates): Deleted.
2137         (WebKit::WebProcess::deleteAllEntries): Deleted.
2138         * WebProcess/WebProcess.h:
2139         * WebProcess/cocoa/WebProcessCocoa.mm:
2140
2141 2015-06-11  Matt Rajca  <mrajca@apple.com>
2142
2143         Media Session: Add plumbing for media control event delivery.
2144         https://bugs.webkit.org/show_bug.cgi?id=145859
2145
2146         Reviewed by Anders Carlsson.
2147
2148         * UIProcess/API/C/WKPage.cpp:
2149         (WKPageHandleMediaEvent):
2150         * UIProcess/API/C/WKPagePrivate.h:
2151         * UIProcess/WebPageProxy.cpp:
2152         (WebKit::WebPageProxy::handleMediaEvent):
2153         * UIProcess/WebPageProxy.h:
2154         * WebProcess/WebPage/WebPage.cpp:
2155         (WebKit::WebPage::handleMediaEvent):
2156         * WebProcess/WebPage/WebPage.h:
2157         * WebProcess/WebPage/WebPage.messages.in:
2158
2159 2015-06-11  Myles C. Maxfield  <mmaxfield@apple.com>
2160
2161         [OS X] Decoding fonts may return nil when using force click
2162         https://bugs.webkit.org/show_bug.cgi?id=145890
2163
2164         Reviewed by Beth Dakin.
2165
2166         [NSFontDescriptor fontDescriptorWithFontAttributes] might return nil, which
2167         causes the encoding of an NSFont to erroneously return true.
2168
2169         * Shared/mac/ArgumentCodersMac.mm:
2170         (IPC::decode):
2171
2172 2015-06-11  Anders Carlsson  <andersca@apple.com>
2173
2174         Reimplement WKOriginDataManager in terms of API::WebsiteDataStore
2175         https://bugs.webkit.org/show_bug.cgi?id=145889
2176
2177         Reviewed by Dan Bernstein.
2178
2179         * UIProcess/API/C/WKAPICast.h:
2180         * UIProcess/API/C/WKContext.cpp:
2181         (WKContextGetOriginDataManager):
2182         * UIProcess/API/C/WKOriginDataManager.cpp:
2183         (WKOriginDataManagerGetTypeID):
2184         (WKOriginDataManagerGetOrigins):
2185         (WKOriginDataManagerDeleteEntriesForOrigin):
2186         (WKOriginDataManagerDeleteEntriesModifiedBetweenDates):
2187         (WKOriginDataManagerDeleteAllEntries):
2188
2189 2015-06-11  Brent Fulgham  <bfulgham@apple.com>
2190
2191         Full screen video space can be resized to 1pt wide
2192         https://bugs.webkit.org/show_bug.cgi?id=145895
2193         <rdar://problem/20907914>
2194
2195         Reviewed by Simon Fraser.
2196
2197         Prior to the upcoming OS X, full screen mode was not resizable. Now that it is,
2198         we need to set a minimum window width that is large enough to hold the media
2199         controls. This makes our full-screen video behave the same as the QuickTimeX player.
2200
2201         * UIProcess/mac/WKFullScreenWindowController.mm:
2202         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Active that new
2203         kWKLayoutModeDynamicSizeWithMinimumViewSize style, and set the minimum view size to
2204         be the width of our media controls, with 20 pixels of padding on either side.
2205         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Set the layout
2206         mode back to the default style.
2207
2208 2015-06-11  Jon Lee  <jonlee@apple.com>
2209
2210         Update media controls JS and CSS to use picture-in-picture
2211         https://bugs.webkit.org/show_bug.cgi?id=145827
2212         <rdar://problem/21311576>
2213
2214         Reviewed by Dean Jackson.
2215
2216         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2217         (InitWebCoreSystemInterface): Deleted GetMediaUIImageData.
2218
2219 2015-06-11  Alex Christensen  <achristensen@webkit.org>
2220
2221         Speculative build fix for GTK after r185463.
2222
2223         * CMakeLists.txt:
2224         Remove WebPluginSiteDataManager.cpp from CMake build.
2225
2226 2015-06-11  Anders Carlsson  <andersca@apple.com>
2227
2228         Remove WebPluginSiteDataManager
2229         https://bugs.webkit.org/show_bug.cgi?id=145884
2230
2231         Reviewed by Andreas Kling.
2232
2233         * PluginProcess/PluginProcess.cpp:
2234         (WebKit::PluginProcess::clearSiteData): Deleted.
2235         * PluginProcess/PluginProcess.h:
2236         * PluginProcess/PluginProcess.messages.in:
2237         * UIProcess/API/C/WKAPICast.h:
2238         * UIProcess/API/C/WKContext.cpp:
2239         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
2240         * UIProcess/Plugins/PluginProcessManager.cpp:
2241         (WebKit::PluginProcessManager::clearSiteData): Deleted.
2242         * UIProcess/Plugins/PluginProcessManager.h:
2243         * UIProcess/Plugins/PluginProcessProxy.cpp:
2244         (WebKit::PluginProcessProxy::clearSiteData): Deleted.
2245         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch): Deleted.
2246         (WebKit::PluginProcessProxy::didFinishLaunching): Deleted.
2247         (WebKit::PluginProcessProxy::didClearSiteData): Deleted.
2248         * UIProcess/Plugins/PluginProcessProxy.h:
2249         * UIProcess/Plugins/PluginProcessProxy.messages.in:
2250         * UIProcess/Plugins/WebPluginSiteDataManager.cpp: Removed.
2251         (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::GetSitesWithDataState): Deleted.
2252         (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::getSitesWithDataForNextPlugin): Deleted.
2253         (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::didGetSitesWithDataForSinglePlugin): Deleted.
2254         (WebKit::WebPluginSiteDataManager::ClearSiteDataState::ClearSiteDataState): Deleted.
2255         (WebKit::WebPluginSiteDataManager::ClearSiteDataState::clearSiteDataForNextPlugin): Deleted.
2256         (WebKit::WebPluginSiteDataManager::ClearSiteDataState::didClearSiteDataForSinglePlugin): Deleted.
2257         (WebKit::WebPluginSiteDataManager::create): Deleted.
2258         (WebKit::WebPluginSiteDataManager::WebPluginSiteDataManager): Deleted.
2259         (WebKit::WebPluginSiteDataManager::~WebPluginSiteDataManager): Deleted.
2260         (WebKit::WebPluginSiteDataManager::invalidate): Deleted.
2261         (WebKit::WebPluginSiteDataManager::getSitesWithData): Deleted.
2262         (WebKit::WebPluginSiteDataManager::didGetSitesWithData): Deleted.
2263         (WebKit::WebPluginSiteDataManager::clearSiteData): Deleted.
2264         (WebKit::WebPluginSiteDataManager::didClearSiteData): Deleted.
2265         (WebKit::WebPluginSiteDataManager::didGetSitesWithDataForSinglePlugin): Deleted.
2266         (WebKit::WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins): Deleted.
2267         (WebKit::WebPluginSiteDataManager::didClearSiteDataForSinglePlugin): Deleted.
2268         (WebKit::WebPluginSiteDataManager::didClearSiteDataForAllPlugins): Deleted.
2269         * UIProcess/Plugins/WebPluginSiteDataManager.h: Removed.
2270         (WebKit::WebPluginSiteDataManager::processPool): Deleted.
2271         (WebKit::WebPluginSiteDataManager::clearProcessPool): Deleted.
2272         * UIProcess/WebProcessPool.cpp:
2273         (WebKit::WebProcessPool::~WebProcessPool): Deleted.
2274         * UIProcess/WebProcessPool.h:
2275         * UIProcess/WebProcessProxy.cpp:
2276         * WebKit2.xcodeproj/project.pbxproj:
2277
2278 2015-06-11  Anders Carlsson  <andersca@apple.com>
2279
2280         Make WKWebsiteDataStoreRef backed by an API::WebsiteDataStore
2281         https://bugs.webkit.org/show_bug.cgi?id=145882
2282
2283         Reviewed by Dan Bernstein.
2284
2285         * UIProcess/API/C/WKAPICast.h:
2286         * UIProcess/API/C/WKContext.cpp:
2287         (WKContextGetPluginSiteDataManager):
2288         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
2289         (WKPluginSiteDataManagerGetTypeID):
2290         (WKPluginSiteDataManagerGetSitesWithData):
2291         (WKPluginSiteDataManagerClearSiteData):
2292         (WKPluginSiteDataManagerClearAllSiteData):
2293
2294 2015-06-11  Antti Koivisto  <antti@apple.com>
2295
2296         Network process crashes decoding invalid cache entry on 32bit system
2297         https://bugs.webkit.org/show_bug.cgi?id=145842
2298         rdar://problem/21228334
2299
2300         Reviewed by Anders Carlsson.
2301
2302         After cache scheme changes we may end up decoding invalid cache entries. This is by design,
2303         we should just fail decoding and delete these entries.
2304
2305         However Decoder::bufferIsLargeEnoughToContain test in some cases would allow corrupted large
2306         sizes due to overflow in 32bit pointer math and we would crash when allocating a string.
2307
2308         * NetworkProcess/cache/NetworkCacheCoders.cpp:
2309         (WebKit::NetworkCache::Coder<CString>::decode):
2310         (WebKit::NetworkCache::decodeStringText):
2311         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode):
2312         (WebKit::NetworkCache::Coder<MD5::Digest>::encode):
2313         * NetworkProcess/cache/NetworkCacheCoders.h:
2314         * NetworkProcess/cache/NetworkCacheDecoder.cpp:
2315         (WebKit::NetworkCache::Decoder::Decoder):
2316         (WebKit::NetworkCache::Decoder::bufferIsLargeEnoughToContain):
2317
2318             Reshuffle to avoid sum.
2319
2320         (WebKit::NetworkCache::Decoder::decodeFixedLengthData):
2321         * NetworkProcess/cache/NetworkCacheDecoder.h:
2322         (WebKit::NetworkCache::Decoder::bufferSize):
2323         (WebKit::NetworkCache::Decoder::currentOffset):
2324         (WebKit::NetworkCache::Decoder::length): Deleted.
2325         (WebKit::NetworkCache::Decoder::isInvalid): Deleted.
2326         (WebKit::NetworkCache::Decoder::markInvalid): Deleted.
2327
2328             Remove these, they are not really used or needed.
2329
2330 2015-06-10  Anders Carlsson  <andersca@apple.com>
2331
2332         Rewrite WKPluginSiteDataManager using WebsiteDataStore functions
2333         https://bugs.webkit.org/show_bug.cgi?id=145868
2334
2335         Reviewed by Antti Koivisto.
2336
2337         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
2338         (WKPluginSiteDataManagerGetSitesWithData):
2339         (WKPluginSiteDataManagerClearSiteData):
2340         (WKPluginSiteDataManagerClearAllSiteData):
2341         (toNPClearSiteDataFlags): Deleted.
2342         * UIProcess/Plugins/WebPluginSiteDataManager.h:
2343         (WebKit::WebPluginSiteDataManager::processPool):
2344
2345 2015-06-11  Antti Koivisto  <antti@apple.com>
2346
2347         3% cold PLT regression from network cache on iOS
2348         https://bugs.webkit.org/show_bug.cgi?id=145694
2349         rdar://problem/21158245
2350
2351         Reviewed by Chris Dumez.
2352
2353         Cache does not help in cold page loads but it shouldn't' be hurting either. Write I/O needs to be toned down a bit.
2354
2355         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
2356         (WebKit::NetworkCache::IOChannel::IOChannel):
2357         (WebKit::NetworkCache::IOChannel::open):
2358
2359             Dispatch channels inherit their I/O priority from the target queue. Use background queue for write I/O.
2360
2361         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2362         (WebKit::NetworkCache::Storage::Storage):
2363         (WebKit::NetworkCache::Storage::dispatchPendingReadOperations):
2364         (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
2365
2366             Only write one file at a time instead of maximum of three.
2367
2368         (WebKit::NetworkCache::Storage::retrieve):
2369
2370             For consistency with store prepend new entries here too.
2371
2372         (WebKit::NetworkCache::Storage::store):
2373
2374             Delay start of the first write operation by 1s.
2375             Prepend instead of append to the pending write deque so retrieveFromMemory lookup finds newest entries first in case of duplicates
2376
2377         (WebKit::NetworkCache::Storage::traverse):
2378         * NetworkProcess/cache/NetworkCacheStorage.h:
2379
2380 2015-06-10  Yongjun Zhang  <yongjun_zhang@apple.com>
2381
2382         Don't send touch events on link preview.
2383         https://bugs.webkit.org/show_bug.cgi?id=145863
2384
2385         Disable web touch event recognizer on link preview. We do the same when finding nodes in inspector or when long press gesture
2386         is recognized (by _cancelAllTouches). 
2387
2388         Reviewed by Beth Dakin.
2389
2390         * UIProcess/ios/WKContentViewInteraction.mm:
2391         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]): Remove touch event gesture recognizer on preview start.
2392         (-[WKContentView didDismissPreviewViewController:committing:]): Add the gesture recognizer back on dismiss.
2393
2394 2015-06-10  Anders Carlsson  <andersca@apple.com>
2395
2396         WKWebsiteDataStore should handle removing plug-in data for individual records
2397         https://bugs.webkit.org/show_bug.cgi?id=145864
2398
2399         Reviewed by Beth Dakin.
2400
2401         * PluginProcess/PluginProcess.cpp:
2402         (WebKit::PluginProcess::deleteWebsiteDataForHostNames):
2403         * PluginProcess/PluginProcess.h:
2404         * PluginProcess/PluginProcess.messages.in:
2405         * UIProcess/Plugins/PluginProcessManager.cpp:
2406         (WebKit::PluginProcessManager::deleteWebsiteDataForHostNames):
2407         * UIProcess/Plugins/PluginProcessManager.h:
2408         * UIProcess/Plugins/PluginProcessProxy.cpp:
2409         (WebKit::PluginProcessProxy::deleteWebsiteDataForHostNames):
2410         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
2411         (WebKit::PluginProcessProxy::didFinishLaunching):
2412         (WebKit::PluginProcessProxy::didDeleteWebsiteDataForHostNames):
2413         * UIProcess/Plugins/PluginProcessProxy.h:
2414         * UIProcess/Plugins/PluginProcessProxy.messages.in:
2415         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2416         (WebKit::WebsiteDataStore::removeData):
2417
2418 2015-06-10  Anders Carlsson  <andersca@apple.com>
2419
2420         WKWebsiteDataStore should handle removing plug-in data
2421         https://bugs.webkit.org/show_bug.cgi?id=145862
2422
2423         Reviewed by Sam Weinig.
2424
2425         * PluginProcess/PluginProcess.cpp:
2426         (WebKit::PluginProcess::deleteWebsiteData):
2427         * PluginProcess/PluginProcess.h:
2428         * PluginProcess/PluginProcess.messages.in:
2429         * UIProcess/Plugins/PluginProcessManager.cpp:
2430         (WebKit::PluginProcessManager::deleteWebsiteData):
2431         * UIProcess/Plugins/PluginProcessManager.h:
2432         * UIProcess/Plugins/PluginProcessProxy.cpp:
2433         (WebKit::PluginProcessProxy::~PluginProcessProxy):
2434         (WebKit::PluginProcessProxy::deleteWebsiteData):
2435         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
2436         (WebKit::PluginProcessProxy::didFinishLaunching):
2437         (WebKit::PluginProcessProxy::didDeleteWebsiteData):
2438         * UIProcess/Plugins/PluginProcessProxy.h:
2439         * UIProcess/Plugins/PluginProcessProxy.messages.in:
2440         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2441         (WebKit::WebsiteDataStore::removeData):
2442
2443 2015-06-10  Brent Fulgham  <bfulgham@apple.com>
2444
2445         [WK2] Do not indicate Media Keys are present when they are not
2446         https://bugs.webkit.org/show_bug.cgi?id=145713
2447         <rdar://problem/19752566>
2448
2449         Reviewed by Dean Jackson.
2450
2451         Correct the reporting of Media Key presence by checking for the actual
2452         media key file, not just the directory. Sometimes the directory will exist
2453         with no media key files (e.g., if a user navigates to the directory using
2454         the Finder).
2455
2456         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2457         (WebKit::computeMediaKeyFile): Moved earlier in file so it could be used by
2458         the 'mediaKeyOrigins' method.
2459         (WebKit::WebsiteDataStore::mediaKeyOrigins): Only indicate we have a media key
2460         origin if the folder actually contains the media key file.
2461         (WebKit::WebsiteDataStore::removeMediaKeys): Use the existing 'computeMediaKeyFile',
2462         rather than manually building the file from strings.
2463
2464 2015-06-09  Anders Carlsson  <andersca@apple.com>
2465
2466         Support fetching website data
2467         https://bugs.webkit.org/show_bug.cgi?id=145828
2468
2469         Reviewed by Darin Adler.
2470
2471         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2472         (WebKit::WebsiteDataStore::fetchData):
2473         (WebKit::WebsiteDataStore::plugins):
2474         * UIProcess/WebsiteData/WebsiteDataStore.h:
2475
2476 2015-06-10  Zan Dobersek  <zdobersek@igalia.com>
2477
2478         Unreviewed. Fixing the build for the GTK port with Clang.
2479
2480         * UIProcess/gtk/InputMethodFilter.h: Add the <functional> header inclusion
2481         to avoid compilation errors due to missing std::function<>.
2482
2483 2015-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2484
2485         [GTK] Move KeyBindingTranslator from platform to WebKit2 layer
2486         https://bugs.webkit.org/show_bug.cgi?id=145840
2487
2488         Reviewed by Martin Robinson.
2489
2490         It's currently used only by WebKit2 in the UI process and it's
2491         another file built twice because of the GTK2 plugin process.
2492
2493         * PlatformGTK.cmake:
2494         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2495         * UIProcess/gtk/KeyBindingTranslator.cpp: Renamed from Source/WebCore/platform/gtk/KeyBindingTranslator.cpp.
2496         (WebKit::backspaceCallback):
2497         (WebKit::selectAllCallback):
2498         (WebKit::cutClipboardCallback):
2499         (WebKit::copyClipboardCallback):
2500         (WebKit::pasteClipboardCallback):
2501         (WebKit::toggleOverwriteCallback):
2502         (WebKit::popupMenuCallback):
2503         (WebKit::showHelpCallback):
2504         (WebKit::deleteFromCursorCallback):
2505         (WebKit::moveCursorCallback):
2506         (WebKit::KeyBindingTranslator::KeyBindingTranslator):
2507         (WebKit::KeyBindingTranslator::commandsForKeyEvent):
2508         * UIProcess/gtk/KeyBindingTranslator.h: Renamed from Source/WebCore/platform/gtk/KeyBindingTranslator.h.
2509         (WebKit::KeyBindingTranslator::addPendingEditorCommand):
2510
2511 2015-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2512
2513         [GTK] Get rid of GetEditorCommandsForKeyEvent sync message
2514         https://bugs.webkit.org/show_bug.cgi?id=145598
2515
2516         Reviewed by Žan Doberšek.
2517
2518         We are sending GetEditorCommandsForKeyEvent sync message from web
2519         process to the UI process for every key pressed. And if the
2520         keydown event doesn't handle the key, the message is sent again
2521         for the keypress event, so in many cases it happens twice per
2522         keypress. We can get the list of commands when the key press event
2523         happens in the web view, and send it to the web process as part of
2524         the keyboard event like mac port does. In the web process,
2525         commands not inserting text will be handled by keydown and the
2526         rest in keypress without having to use any other IPC message for that.
2527
2528         * Shared/NativeWebKeyboardEvent.h: Add command list parameter to
2529         the constructor.
2530         * Shared/WebEvent.h: Add GTK specific constructor that receives a
2531         list of commands and whether the event was handled by input methods.
2532         (WebKit::WebKeyboardEvent::commands): Returns the list of commands.
2533         * Shared/WebEventConversion.cpp:
2534         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
2535         Also copy the commands and handledByInputMethod member.
2536         * Shared/WebKeyboardEvent.cpp:
2537         (WebKit::WebKeyboardEvent::WebKeyboardEvent): Implement GTK
2538         specific constructor that receives a list of commands and whether
2539         the event was handled by input methods.
2540         (WebKit::WebKeyboardEvent::encode): Encode commands and handledByInputMethod.
2541         (WebKit::WebKeyboardEvent::decode): Decode commands and handledByInputMethod.
2542         * Shared/gtk/NativeWebKeyboardEventGtk.cpp:
2543         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): Add
2544         command list parameter to the constructor.
2545         * Shared/gtk/WebEventFactory.cpp:
2546         (WebKit::WebEventFactory::createWebKeyboardEvent): Use the new
2547         WebKeyboardEvent constructor and simplify the code. We don't need
2548         to explicitly set VK_PROCESSKEY as windows virtual key code when
2549         the event was handled by input methods. The WebCore event handler
2550         already does that.
2551         * Shared/gtk/WebEventFactory.h:
2552         * UIProcess/API/gtk/PageClientImpl.cpp:
2553         (WebKit::PageClientImpl::getEditorCommandsForKeyEvent): Deleted.
2554         * UIProcess/API/gtk/PageClientImpl.h:
2555         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Add a
2556         KeyBindingTranslator member.
2557         (webkitWebViewBaseKeyPressEvent): Use the new
2558         InputMethodFilter::filterKeyEvent() API and get the list of
2559         commands for the key when events was not handled by input methods.
2560         (webkitWebViewBaseKeyReleaseEvent): Use the new
2561         InputMethodFilter::filterKeyEvent() API.
2562         * UIProcess/PageClient.h:
2563         * UIProcess/WebPageProxy.messages.in: Remove GetEditorCommandsForKeyEvent message.
2564         * UIProcess/gtk/InputMethodFilter.cpp:
2565         (WebKit::InputMethodFilter::handleKeyboardEvent): Call the
2566         completation handler.
2567         (WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults): Ditto.
2568         (WebKit::InputMethodFilter::filterKeyEvent): Use a completion
2569         handler for the task, so that the caller (the web view) can handle
2570         the keyboard event.
2571         * UIProcess/gtk/InputMethodFilter.h:
2572         * UIProcess/gtk/WebPageProxyGtk.cpp:
2573         (WebKit::WebPageProxy::getEditorCommandsForKeyEvent): Deleted.
2574         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
2575         (WebKit::WebEditorClient::handleKeyboardEvent): Return earlier if
2576         the event was handled by input methods. And get the list of
2577         commands from the PlatformKeyboardEvent instead of sending a sync
2578         message to the UI process.
2579         (WebKit::WebEditorClient::handleInputMethodKeydown): If the event
2580         was handled by inpout methods, set the event as default handled so
2581         that the WebCore event handler sets VK_PROCESSKEY as windows
2582         virtual key code.
2583         (WebKit::WebEditorClient::getEditorCommandsForKeyEvent): Deleted.
2584
2585 2015-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2586
2587         Unreviewed. Fix GTK build after r185412.
2588
2589         Add missing include.
2590
2591         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
2592
2593 2015-06-10  Antti Koivisto  <antti@apple.com>
2594
2595         NetworkCache: Delete old cache versions
2596         https://bugs.webkit.org/show_bug.cgi?id=145800
2597
2598         Reviewed by Darin Adler.
2599
2600         * CMakeLists.txt:
2601         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
2602         (WebKit::NetworkCache::BlobStorage::synchronize):
2603         * NetworkProcess/cache/NetworkCacheFileSystem.cpp: Added.
2604         (WebKit::NetworkCache::directoryEntryType):
2605         (WebKit::NetworkCache::traverseDirectory):
2606
2607             Pass entry type as callback argument.
2608
2609         (WebKit::NetworkCache::deleteDirectoryRecursively):
2610
2611             Add helper.
2612
2613         (WebKit::NetworkCache::fileTimes):
2614         (WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
2615         * NetworkProcess/cache/NetworkCacheFileSystem.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h.
2616
2617             Move code to cpp.
2618
2619         (WebKit::NetworkCache::traverseDirectory): Deleted.
2620         (WebKit::NetworkCache::traverseCacheFiles): Deleted.
2621         (WebKit::NetworkCache::fileTimes): Deleted.
2622         (WebKit::NetworkCache::updateFileModificationTimeIfNeeded): Deleted.
2623         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h: Removed.
2624         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
2625         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2626         (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
2627         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2628         (WebKit::NetworkCache::makeBlobDirectoryPath):
2629         (WebKit::NetworkCache::traverseRecordsFiles):
2630
2631             Move cache hierarchy aware traversal code here from NetworkCacheFileSystem (for better layering).
2632             Rename for clarity.
2633
2634         (WebKit::NetworkCache::deleteEmptyRecordsDirectories):
2635
2636             Factor to a function.
2637
2638         (WebKit::NetworkCache::Storage::Storage):
2639         (WebKit::NetworkCache::Storage::synchronize):
2640         (WebKit::NetworkCache::Storage::traverse):
2641         (WebKit::NetworkCache::Storage::clear):
2642
2643             Use traverseRecordsFiles for traversal.
2644
2645         (WebKit::NetworkCache::Storage::shrink):
2646         (WebKit::NetworkCache::Storage::deleteOldVersions):
2647
2648             Delete version subdirectories with version number less than the current version.
2649             Remove code for clearing unversioned V1 caches. No one should have them.
2650
2651         * NetworkProcess/cache/NetworkCacheStorage.h:
2652         * UIProcess/API/APIUserContentExtensionStore.cpp:
2653         * WebKit2.xcodeproj/project.pbxproj:
2654
2655 2015-06-10  Zan Dobersek  <zdobersek@igalia.com>
2656
2657         [GTK] Web Inspector is broken
2658         https://bugs.webkit.org/show_bug.cgi?id=145836
2659
2660         Reviewed by Carlos Garcia Campos.
2661
2662         * PlatformGTK.cmake: Thread the InspectorBackendCommands.js file as a separate
2663         dependency of InspectorGResourceBundle.xml. It can't be listed under the InspectorFiles
2664         variable and then searched via the CMake glob command because it probably won't exist
2665         at the time the command is run (since it's copied into the specified path), so it won't
2666         be listed among the dependencies at all.
2667
2668 2015-06-09  Anders Carlsson  <andersca@apple.com>
2669
2670         Fix build.
2671
2672         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
2673         (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::getSitesWithDataForNextPlugin):
2674
2675 2015-06-09  Anders Carlsson  <andersca@apple.com>
2676
2677         Change the PluginProcessManager data fetching function to take a completion handler
2678         https://bugs.webkit.org/show_bug.cgi?id=145821
2679
2680         Reviewed by Sam Weinig.
2681
2682         * UIProcess/Plugins/PluginProcessManager.cpp:
2683         (WebKit::PluginProcessManager::fetchWebsiteData):
2684         (WebKit::PluginProcessManager::getSitesWithData): Deleted.
2685         * UIProcess/Plugins/PluginProcessManager.h:
2686         * UIProcess/Plugins/PluginProcessProxy.cpp:
2687         (WebKit::generateCallbackID):
2688         (WebKit::PluginProcessProxy::~PluginProcessProxy):
2689         (WebKit::PluginProcessProxy::fetchWebsiteData):
2690         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
2691         (WebKit::PluginProcessProxy::didFinishLaunching):
2692         (WebKit::PluginProcessProxy::didGetSitesWithData):
2693         (WebKit::PluginProcessProxy::getSitesWithData): Deleted.
2694         * UIProcess/Plugins/PluginProcessProxy.h:
2695         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
2696         (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::getSitesWithDataForNextPlugin):
2697
2698 2015-06-09  Anders Carlsson  <andersca@apple.com>
2699
2700         Add code to keep track of plug-in data host names in website data records
2701         https://bugs.webkit.org/show_bug.cgi?id=145818
2702
2703         Reviewed by Andreas Kling.
2704
2705         * Shared/WebsiteData/WebsiteData.cpp:
2706         (WebKit::WebsiteData::encode):
2707         (WebKit::WebsiteData::decode):
2708         * Shared/WebsiteData/WebsiteData.h:
2709         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
2710         (WebKit::WebsiteDataRecord::displayNameForPluginDataHostName):
2711         (WebKit::WebsiteDataRecord::addPluginDataHostName):
2712         (WebKit::WebsiteDataRecord::displayNameForCookieHostName): Deleted.
2713         * UIProcess/WebsiteData/WebsiteDataRecord.h:
2714         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2715         (WebKit::WebsiteDataStore::fetchData):
2716
2717 2015-06-09  Anders Carlsson  <andersca@apple.com>
2718
2719         Add Plug-in type declarations to WKWebsiteDataRecord and friends
2720         https://bugs.webkit.org/show_bug.cgi?id=145816
2721
2722         Reviewed by Andreas Kling.
2723
2724         * Shared/WebsiteData/WebsiteDataTypes.h:
2725         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
2726         (dataTypesToString):
2727         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
2728         (WebKit::toWebsiteDataTypes):
2729         (WebKit::toWKWebsiteDataTypes):
2730         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
2731
2732 2015-06-09  Antti Koivisto  <antti@apple.com>
2733
2734         REGRESSION(r185262): NetworkCache is in wrong location on OS X
2735         https://bugs.webkit.org/show_bug.cgi?id=145812
2736
2737         Reviewed by Anders Carlsson.
2738
2739         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2740         (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
2741         (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
2742         (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
2743         (WebKit::WebProcessPool::isNetworkCacheEnabled):
2744
2745             Make sure static functions that use NSUserDefaults call registerUserDefaultsIfNeeded() first.
2746
2747 2015-06-09  Yusuke Suzuki  <utatane.tea@gmail.com>
2748
2749         Crash when passing Symbol to NPAPI plugin objects
2750         https://bugs.webkit.org/show_bug.cgi?id=145798
2751
2752         Reviewed by Darin Adler.
2753
2754         When the symbol is passed, `propertyName.publicName()` becomes nullptr.
2755         So dereferencing it causes null dereference errors.
2756         At first, this bug appears in the https://bugs.webkit.org/show_bug.cgi?id=145556,
2757         plugin[@@toStringTag] ("string" + plugin) causes SEGV in plugins/embed-inside-object.html test.
2758
2759         This patch avoids it by early returning when the symbols are passed.
2760         Methods for symbols are not implemented in the NPObject side, so it works correctly.
2761
2762         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2763         (WebKit::npIdentifierFromIdentifier):
2764         (WebKit::JSNPObject::callMethod):
2765         (WebKit::JSNPObject::getOwnPropertySlot):
2766         (WebKit::JSNPObject::put):
2767         (WebKit::JSNPObject::deleteProperty):
2768         (WebKit::JSNPObject::propertyGetter):
2769         (WebKit::JSNPObject::methodGetter):
2770
2771 2015-06-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2772
2773         [SOUP] Network Cache: Give more priority to reads over writes in IO WorkQueue
2774         https://bugs.webkit.org/show_bug.cgi?id=145791
2775
2776         Reviewed by Sergio Villar Senin.
2777
2778         Keep using G_PRIORITY_DEFAULT for reads, but use
2779         G_PRIORITY_DEFAULT_IDLE for writes now.
2780
2781         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
2782         (WebKit::NetworkCache::outputStreamWriteReadyCallback): Use
2783         G_PRIORITY_DEFAULT_IDLE for write async operations.
2784         (WebKit::NetworkCache::IOChannel::write): Pass
2785         G_PRIORITY_DEFAULT_IDLE to runTaskInQueue().
2786
2787 2015-06-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2788
2789         [SOUP] Network Cache: run the IO completion handler in the given queue instead of the whole operation
2790         https://bugs.webkit.org/show_bug.cgi?id=145797
2791
2792         Reviewed by Žan Doberšek.
2793
2794         I misunderstood what the WorkQueue parameter meant in the IO
2795         channel operations. It's the queue where the completion handler
2796         should be run, not the whole operation. Since our operations are
2797         already non-blocking, we can just run the read/writes in the main
2798         thread, and schedule the completion handler in the given work
2799         queue when the operation finishes.
2800
2801         * NetworkProcess/cache/NetworkCacheIOChannel.h:
2802         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
2803         (WebKit::NetworkCache::inputStreamReadReadyCallback):
2804         (WebKit::NetworkCache::IOChannel::read):
2805         (WebKit::NetworkCache::IOChannel::readSync):
2806         (WebKit::NetworkCache::outputStreamWriteReadyCallback):
2807         (WebKit::NetworkCache::IOChannel::write):
2808
2809 2015-06-09  David Kilzer  <ddkilzer@apple.com>
2810
2811         REGRESSION (r185357): Fix build for iOS 8.x
2812
2813         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2814         (fallbackIconForFile): Add cast prior to iOS 9.
2815
2816 2015-06-09  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2817
2818         [EFL] Fix a crash on MiniBrowser when running on debug mode
2819         https://bugs.webkit.org/show_bug.cgi?id=145793
2820
2821         Reviewed by Carlos Garcia Campos.
2822
2823         r185314 missed to initialize parameters.diskCacheDirectory with configuration's one.
2824
2825         * UIProcess/efl/WebProcessPoolEfl.cpp:
2826         (WebKit::WebProcessPool::platformInitializeWebProcess):
2827
2828 2015-06-09  Csaba Osztrogonác  <ossy@webkit.org>
2829
2830         [cmake] Fix the style issues in cmake project files
2831         https://bugs.webkit.org/show_bug.cgi?id=145755
2832
2833         Reviewed by Darin Adler.
2834
2835         * CMakeLists.txt:
2836         * PlatformGTK.cmake:
2837         * PlatformMac.cmake:
2838
2839 2015-06-02  Jon Honeycutt  <jhoneycutt@apple.com>
2840
2841         [iOS] UI process memory spike, hang when uploading a very large JPEG
2842
2843         <https://bugs.webkit.org/show_bug.cgi?id=145567>
2844         <rdar://problem/21206699>
2845
2846         When uploading an image, we generate a thumbnail to use for an icon
2847         that sits next to the control. To do this, we load the image and draw
2848         it into a thumbnail-sized canvas. This can be very expensive for large
2849         images.
2850
2851         To fix this, we'll use CGImageSource API, which will allow us to get
2852         any existing thumbnail that exists in the source file.
2853
2854         Reviewed by Darin Adler.
2855
2856         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2857         (squareCropRectForSize):
2858         Use std::round, based on Darin's review feedback that a) rintf is
2859         incorrect in 64-bit systems where CGFloat is a double, b) rintf uses a
2860         variable rounding mode, which is undesirable.
2861         (squareImage):
2862         Changed to take a CGImageRef.
2863         Use RetainPtr and +[UIImage imageWithCGImage:] to match other code in
2864         this file.
2865         (thumbnailSizedImageForImage):
2866         Changed to take a CGImageRef and to use iconSideLength.
2867         (iconForImageFile):
2868         Create an image source for the file, then use CGImageSource API to
2869         generate a thumbnail.
2870         (-[_WKImageFileUploadItem initWithFileURL:originalImage:]): Deleted.
2871         (-[_WKImageFileUploadItem displayImage]):
2872         Use iconForImageFile() rather than trying to generate an icon from the
2873         UIImage.
2874         (-[WKFileUploadPanel _uploadItemForImageData:imageName:successBlock:failureBlock:]):
2875         Removed originalImage parameter; _WKImageFileUploadItem no longer uses
2876         it.
2877         (-[WKFileUploadPanel _uploadItemForJPEGRepresentationOfImage:successBlock:failureBlock:]):
2878         (-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]):
2879
2880 2015-06-08  Dan Bernstein  <mitz@apple.com>
2881
2882         [Cocoa] Use generics in framework headers
2883         https://bugs.webkit.org/show_bug.cgi?id=145781
2884
2885         Reviewed by Sam Weinig.
2886
2887         * mac/postprocess-framework-headers.sh: Use the parameter to WK_ARRAY and WK_SET.
2888
2889 2015-06-08  Chris Dumez  <cdumez@apple.com>
2890
2891         Access GCController instance via GCController::singleton() instead of a free function
2892         https://bugs.webkit.org/show_bug.cgi?id=145776
2893
2894         Reviewed by Darin Adler.
2895
2896         Access GCController instance via GCController::singleton() instead of a
2897         free function as per coding style and for consistency with other
2898         singleton classes in the codebase.
2899
2900         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2901         (WebKit::InjectedBundle::garbageCollectJavaScriptObjects):
2902         (WebKit::InjectedBundle::garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging):
2903         * WebProcess/WebProcess.cpp:
2904         (WebKit::WebProcess::terminate):
2905         (WebKit::WebProcess::didClose):
2906         (WebKit::WebProcess::garbageCollectJavaScriptObjects):
2907         (WebKit::WebProcess::setJavaScriptGarbageCollectorTimerEnabled):
2908
2909 2015-06-08  Anders Carlsson  <andersca@apple.com>
2910
2911         Include IndexedDB databases in -[WKWebsiteDataStore allWebsiteDataTypes]
2912         https://bugs.webkit.org/show_bug.cgi?id=145775
2913
2914         Reviewed by Simon Fraser.
2915
2916         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2917         (+[WKWebsiteDataStore allWebsiteDataTypes]):
2918
2919 2015-06-08  Anders Carlsson  <andersca@apple.com>
2920
2921         Move the snapshot layer contents SPI to the web view
2922         https://bugs.webkit.org/show_bug.cgi?id=145771
2923
2924         Reviewed by Geoffrey Garen.
2925
2926         We need to potentially ask the web page to take a snapshot of the current item,
2927         so move the SPI to WKWebView and name it appropriately.
2928
2929         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
2930         (-[WKBackForwardListItem _snapshotLayerContents]): Deleted.
2931         * UIProcess/API/Cocoa/WKBackForwardListItemPrivate.h: Removed.
2932         * UIProcess/API/Cocoa/WKWebView.mm:
2933         (-[WKWebView _snapshotLayerContentsForBackForwardListItem:]):
2934         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2935         * WebKit2.xcodeproj/project.pbxproj:
2936
2937 2015-06-08  Brady Eidson  <beidson@apple.com>
2938
2939         Completely remove all IDB properties/constructors when it is disabled at runtime.
2940         rdar://problem/18429374 and https://bugs.webkit.org/show_bug.cgi?id=137034
2941
2942         Reviewed by Geoffrey Garen.
2943
2944         * WebProcess/WebProcess.cpp:
2945         (WebKit::WebProcess::WebProcess): Enable IDB at runtime if it's enabled at compile time.
2946
2947 2015-06-08  Michael Catanzaro  <mcatanzaro@igalia.com>
2948
2949         [SOUP] Performs DNS prefetch when a proxy is configured (information leak)
2950         https://bugs.webkit.org/show_bug.cgi?id=145542
2951
2952         Reviewed by Alexey Proskuryakov.
2953
2954         Add documentation to webkit_web_context_prefetch_dns to indicate that the function does
2955         nothing if the system configuration indicates we should use a proxy to resolve the host.
2956
2957         * UIProcess/API/gtk/WebKitWebContext.cpp:
2958
2959 2015-06-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2960
2961         REGRESSION(r185251): [GTK] webkit_web_context_set_disk_cache_directory() doesn't work when using shared secondary process model after r185251
2962         https://bugs.webkit.org/show_bug.cgi?id=145751
2963
2964         Reviewed by Darin Adler.
2965
2966         In r185251 the CFNetwork cache was disabled in the web process,
2967         but it also removed the disk cache directory web process
2968         initialization parameter. While we support networking in the web
2969         process when shared secondary process model is used, the network
2970         cache should still work. We can remove this if we eventually
2971         switch to use the network process unconditionally.
2972
2973         * Shared/WebProcessCreationParameters.cpp:
2974         (WebKit::WebProcessCreationParameters::encode): Encode disk cache directory.
2975         (WebKit::WebProcessCreationParameters::decode): Decode disk cache directory.
2976         * Shared/WebProcessCreationParameters.h: Bring back disk cache directory only for soup.
2977         * UIProcess/gtk/WebProcessPoolGtk.cpp:
2978         (WebKit::WebProcessPool::platformInitializeWebProcess): Initialize disk cache directory parameter.
2979         * WebProcess/soup/WebProcessSoup.cpp:
2980         (WebKit::WebProcess::platformInitializeWebProcess): Use the disck cache directory parameter again.
2981
2982 2015-06-08  Csaba Osztrogonác  <ossy@webkit.org>
2983
2984         [GTK] Remove the unused scroll function from WebPageGtk.cpp
2985         https://bugs.webkit.org/show_bug.cgi?id=145756
2986
2987         Reviewed by Carlos Garcia Campos.
2988
2989         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2990         (WebKit::scroll): Deleted.
2991
2992 2015-06-08  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2993
2994         REGRESSION(r185262): [EFL] Modify legacyPlatformDefaultNetworkCacheDirectory() according to network cache
2995         https://bugs.webkit.org/show_bug.cgi?id=145752
2996
2997         Reviewed by Carlos Garcia Campos.
2998
2999         EFL port needs to add different prefix for network cache directory since r185262.
3000         Modify it basedon GTK port fix.
3001
3002         * UIProcess/efl/WebProcessPoolEfl.cpp:
3003         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
3004
3005 2015-06-07  Carlos Garcia Campos  <cgarcia@igalia.com>
3006
3007         REGRESSION(r185262): [GTK] webkit_web_context_set_disk_cache_directory() doesn't work after r185262
3008         https://bugs.webkit.org/show_bug.cgi?id=145735
3009
3010         Reviewed by Darin Adler.
3011
3012         * NetworkProcess/soup/NetworkProcessSoup.cpp:
3013         (WebKit::NetworkProcess::platformInitializeNetworkProcess): Use
3014         the directory name to clear the old cache, since the disk cache
3015         subdirectory is now added in the UI process.
3016         * UIProcess/API/gtk/WebKitWebContext.cpp:
3017         (webkit_web_context_set_disk_cache_directory): Update the
3018         WebProcessPool configuration to override the disk cache directory.
3019         * UIProcess/WebProcessPool.cpp:
3020         (WebKit::WebProcessPool::ensureNetworkProcess): Use the
3021         configuration to get the disk cache directory.
3022         (WebKit::WebProcessPool::WebProcessPool): Remove
3023         m_diskCacheDirectory member initialization.
3024         * UIProcess/WebProcessPool.h: Remove m_diskCacheDirectory member.
3025         * UIProcess/gtk/WebProcessPoolGtk.cpp:
3026         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
3027         Append the disk cache subdirectory.
3028
3029 2015-06-07  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3030
3031         [EFL][GTK] Fix build  break since r185262
3032         https://bugs.webkit.org/show_bug.cgi?id=145724
3033
3034         Unreviewed, fix build break for EFL and GTK ports.
3035
3036         * UIProcess/API/APIWebsiteDataStore.cpp:
3037         (API::WebsiteDataStore::defaultLocalStorageDirectory):
3038         (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
3039         (API::WebsiteDataStore::defaultNetworkCacheDirectory):
3040         (API::WebsiteDataStore::defaultApplicationCacheDirectory):
3041         (API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
3042         (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
3043         * UIProcess/efl/WebProcessPoolEfl.cpp:
3044         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
3045         (WebKit::WebProcessPool::platformDefaultDiskCacheDirectory): Deleted.
3046         * WebProcess/soup/WebProcessSoup.cpp:
3047         (WebKit::WebProcess::platformInitializeWebProcess):
3048
3049 2015-06-06  Dan Bernstein  <mitz@apple.com>
3050
3051         Don’t enable manual sandboxing in the iOS Simulator. This should fix all the tests timing out.
3052
3053         * Configurations/DebugRelease.xcconfig:
3054
3055 2015-06-06  Dan Bernstein  <mitz@apple.com>
3056
3057         [iOS] Can’t debug with Development XPC services due to automatic sandboxing
3058         https://bugs.webkit.org/show_bug.cgi?id=145731
3059
3060         Rubber-stamped by Darin Adler.
3061
3062         In iOS, the XPC services are automatically sandboxed based on their entitlements. The
3063         sandbox doesn’t allow them to re-exec, which is necessary for linking against engineering
3064         builds of the WebKit frameworks placed in a non-system location.
3065
3066         The solution is to opt Engineering builds into manual sandboxing.
3067
3068         * Configurations/BaseTarget.xcconfig:
3069         - Add ENABLE_MANUAL_SANDBOXING to
3070           GCC_PREPROCESSOR_DEFINITIONS when WK_MANUAL_SANDBOXING_ENABLED is YES.
3071         - Set WK_MANUAL_SANDBOXING_ENABLED to YES for OS X, because we always use manual
3072           sandboxing on that platform.
3073
3074         * Configurations/DebugRelease.xcconfig: Removed unused definition of DEBUG_OR_RELEASE. Set
3075           WK_MANUAL_SANDBOXING_ENABLED to YES for all engineering builds.
3076
3077         * Configurations/BaseXPCService.xcconfig: Define CODE_SIGN_ENTITLEMENTS for iOS to be empty
3078           if the service is not installed; to use the base entitlements file from Configurations if
3079           manual sandboxing is not enabled; and to use a derived entitlements file, which doesn’t
3080           specify a sandbox profile, if manual sandboxing is enabled.
3081
3082         * Configurations/DatabaseService.Development.xcconfig: Define
3083           WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE and let BaseXPCService.xcconfig define
3084           CODE_SIGN_ENTITLEMENTS for iOS.
3085
3086         * Configurations/DatabaseService.xcconfig: Ditto.
3087         * Configurations/NetworkService.Development.xcconfig: Ditto.
3088         * Configurations/NetworkService.xcconfig: Ditto.
3089         * Configurations/WebContentService.Development.xcconfig: Ditto.
3090         * Configurations/WebContentService.xcconfig: Ditto.
3091
3092         * WebKit2.xcodeproj/project.pbxproj:
3093         - In the Derived Sources target, added a Derive Entitlements for Manual Sandboxing script
3094           build phase. When building for iOS with manual sandboxing enabled, it creates copies of
3095           the iOS entitlements files with a -no-sandbox suffix and the seatbelt-profiles key
3096           removed.
3097         - In the WebKit target, added a Copy iOS Sandbox Profiles for Manual Sandboxing script build
3098           phase. When building for iOS with manual sandboxing enabled, it copies the iOS sandbox
3099           profiles into the framework, so that the services can apply them to themselves at runtime.
3100
3101         * Shared/ios/ChildProcessIOS.mm:
3102         (WebKit::ChildProcess::initializeSandbox): Use ENABLE(MANUAL_SANDBOXING) and don’t define it
3103         here.
3104
3105         * WebProcess/cocoa/WebProcessCocoa.mm:
3106         (WebKit::WebProcess::initializeSandbox): Use ENABLE(MANUAL_SANDBOXING) instead of defining
3107         and using ENABLE_MANUAL_WEBPROCESS_SANDBOXING here.
3108
3109 2015-06-06  Anders Carlsson  <andersca@apple.com>
3110
3111         Remove support from getting plug-in information from Carbon resources
3112         https://bugs.webkit.org/show_bug.cgi?id=145730
3113
3114         Reviewed by Dan Bernstein.
3115
3116         No current plug-in versions use this feature, and both Chrome and Mozilla for
3117         Mac stopped looking at Carbon resources years ago.
3118
3119         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
3120         (WebKit::NetscapePluginModule::getPluginInfo):
3121         (WebKit::ResourceMap::ResourceMap): Deleted.
3122         (WebKit::ResourceMap::~ResourceMap): Deleted.
3123         (WebKit::ResourceMap::isValid): Deleted.
3124         (WebKit::getStringListResource): Deleted.
3125         (WebKit::getPluginInfoFromCarbonResources): Deleted.
3126
3127 2015-06-05  Anders Carlsson  <andersca@apple.com>
3128
3129         Only allow plug-ins to create custom MIME property lists on older versions of OS X
3130         https://bugs.webkit.org/show_bug.cgi?id=145716
3131
3132         Reviewed by Dan Bernstein.
3133
3134         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
3135         * Shared/Plugins/Netscape/NetscapePluginModule.h:
3136         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
3137         (WebKit::getMIMETypesFromPluginBundle):
3138         * UIProcess/Plugins/PluginProcessProxy.h:
3139         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3140
3141 2015-06-05  Chris Dumez  <cdumez@apple.com>
3142
3143         [WK2][iOS] Limit the number of vnodes used by the WebContent processes
3144         https://bugs.webkit.org/show_bug.cgi?id=145672
3145         <rdar://problem/21126637>
3146
3147         Reviewed by Antti Koivisto.
3148
3149         Have the WebContent process register a vnode pressure handler on iOS,
3150         which calls the memory pressure handler.
3151
3152         On non-critical pressure, it will prune dead resources from the memory
3153         cache, which should free up some vnodes. On critical pressure, the
3154         handler will clear the PageCache and do a JS GC, which should free even
3155         more vnodes.
3156
3157         * WebProcess/cocoa/WebProcessCocoa.mm:
3158         (WebKit::WebProcess::platformInitializeWebProcess):
3159
3160 2015-06-05  Anders Carlsson  <andersca@apple.com>
3161
3162         Fix refacto, don't put IndexedDB databases in the cache directory
3163         https://bugs.webkit.org/show_bug.cgi?id=145714
3164
3165         Reviewed by Antti Koivisto.
3166
3167         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
3168         (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
3169
3170 2015-06-05  Anders Carlsson  <andersca@apple.com>
3171
3172         Make the network cache directory part of WKContextConfigurationRef
3173         https://bugs.webkit.org/show_bug.cgi?id=145711
3174
3175         Reviewed by Antti Koivisto.
3176
3177         Also, make the UI process be in control of where we place the new network cache.
3178         When using the Modern WebKit API, put the cache in ~/Library/Caches/<Bundle ID>/WebKit/NetworkCache,
3179         and put the cache in ~/Library/Caches/<Bundle ID>/WebKitCache otherwise (this is just for Safari).
3180
3181         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3182         (WebKit::NetworkCache::Storage::open):
3183         * UIProcess/API/APIProcessPoolConfiguration.cpp:
3184         (API::ProcessPoolConfiguration::createWithLegacyOptions):
3185         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
3186         (API::ProcessPoolConfiguration::copy):
3187         * UIProcess/API/APIProcessPoolConfiguration.h:
3188         * UIProcess/API/C/WKContext.cpp:
3189         (WKContextSetDiskCacheDirectory): Deleted.
3190         * UIProcess/API/C/WKContextConfigurationRef.cpp:
3191         (WKContextConfigurationCopyDiskCacheDirectory):
3192         (WKContextConfigurationSetDiskCacheDirectory):
3193         * UIProcess/API/C/WKContextConfigurationRef.h:
3194         * UIProcess/API/C/WKContextPrivate.h:
3195         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3196         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3197         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
3198         (WebKit::WebProcessPool::isNetworkCacheEnabled):
3199         (WebKit::WebProcessPool::platformDefaultDiskCacheDirectory): Deleted.
3200         * UIProcess/WebProcessPool.cpp:
3201         (WebKit::legacyWebsiteDataStoreConfiguration):
3202         (WebKit::WebProcessPool::WebProcessPool):
3203         (WebKit::WebProcessPool::ensureNetworkProcess):
3204         (WebKit::WebProcessPool::diskCacheDirectory): Deleted.
3205         * UIProcess/WebProcessPool.h:
3206
3207 2015-06-05  Anders Carlsson  <andersca@apple.com>
3208
3209         Make the application cache directory part of WKContextConfigurationRef
3210         https://bugs.webkit.org/show_bug.cgi?id=145704
3211
3212         Reviewed by Geoffrey Garen.
3213
3214         * UIProcess/API/APIProcessPoolConfiguration.cpp:
3215         (API::ProcessPoolConfiguration::createWithLegacyOptions):
3216         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
3217         (API::ProcessPoolConfiguration::copy):
3218         * UIProcess/API/APIProcessPoolConfiguration.h:
3219         * UIProcess/API/C/WKContext.cpp:
3220         (WKContextSetApplicationCacheDirectory): Deleted.
3221         * UIProcess/API/C/WKContextConfigurationRef.cpp:
3222         (WKContextConfigurationCopyApplicationCacheDirectory):
3223         (WKContextConfigurationSetApplicationCacheDirectory):
3224         * UIProcess/API/C/WKContextConfigurationRef.h:
3225         * UIProcess/API/C/WKContextPrivate.h:
3226         * UIProcess/WebProcessPool.cpp:
3227         (WebKit::WebProcessPool::WebProcessPool):
3228         (WebKit::WebProcessPool::createNewWebProcess):
3229         (WebKit::WebProcessPool::applicationCacheDirectory): Deleted.
3230         * UIProcess/WebProcessPool.h:
3231
3232 2015-06-05  Mark Lam  <mark.lam@apple.com>
3233
3234         finally blocks should not set the exception stack trace when re-throwing the exception.
3235         https://bugs.webkit.org/show_bug.cgi?id=145525
3236
3237         Reviewed by Geoffrey Garen.
3238
3239         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3240         (WebKit::InjectedBundle::reportException):
3241         - Changed to use the new Exception object.
3242
3243 2015-06-05  Anders Carlsson  <andersca@apple.com>
3244
3245         Disable the CFNetwork cache in the web process
3246         https://bugs.webkit.org/show_bug.cgi?id=145700
3247         rdar://problem/20243343
3248
3249         Reviewed by Geoffrey Garen.
3250
3251         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3252         (WebKit::NetworkCache::Storage::open):
3253         * Shared/WebProcessCreationParameters.cpp:
3254         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
3255         (WebKit::WebProcessCreationParameters::encode): Deleted.
3256         (WebKit::WebProcessCreationParameters::decode): Deleted.
3257         * Shared/WebProcessCreationParameters.h:
3258         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3259         (WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
3260         * UIProcess/WebProcessPool.cpp:
3261         (WebKit::WebProcessPool::createNewWebProcess): Deleted.
3262         * WebProcess/WebProcess.cpp:
3263         (WebKit::WebProcess::WebProcess): Deleted.
3264         (WebKit::WebProcess::initializeWebProcess): Deleted.
3265         * WebProcess/WebProcess.h:
3266         * WebProcess/cocoa/WebProcessCocoa.mm:
3267         (WebKit::WebProcess::platformClearResourceCaches):
3268         (WebKit::WebProcess::platformInitializeWebProcess):
3269         (WebKit::WebProcess::platformSetCacheModel): Deleted.
3270         (WebKit::WebProcess::platformTerminate): Deleted.
3271
3272 2015-06-05  Anders Carlsson  <andersca@apple.com>
3273
3274         Consolidate default website data directory computations
3275         https://bugs.webkit.org/show_bug.cgi?id=145698
3276
3277         Reviewed by Andreas Kling.
3278
3279         * UIProcess/API/APIProcessPoolConfiguration.cpp:
3280         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
3281         * UIProcess/API/APIWebsiteDataStore.h:
3282         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
3283         (API::WebsiteDataStore::defaultApplicationCacheDirectory):
3284         (API::WebsiteDataStore::defaultNetworkCacheDirectory):
3285         (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
3286         (API::WebsiteDataStore::defaultLocalStorageDirectory):
3287         (API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
3288         (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
3289         (API::WebsiteDataStore::defaultDataStoreConfiguration):
3290         (API::applicationCacheDirectory): Deleted.
3291
3292 2015-06-01  Jon Honeycutt  <jhoneycutt@apple.com>
3293
3294         [iOS] Uploading an animated GIF from the photo library uploads a JPEG
3295
3296         <https://bugs.webkit.org/show_bug.cgi?id=145539>
3297         <rdar://problem/19760877
3298
3299         Selecting a photo from the photo library using UIImagePickerController
3300         results in an NSDictionary with image info and a UIImage with the
3301         image. It's not possible to get the original image data from the
3302         UIImage, only a PNG or JPEG representation, so we were getting a JPEG
3303         representation and uploading that to the server. For animated GIFs,
3304         this meant a JPEG representation of the first frame.
3305
3306         To fix this, we'll get the asset URL, if available, and use the Photos
3307         API to query for the original image data.
3308
3309         Reviewed by Andy Estes and Joe Pecoraro.
3310
3311         * UIProcess/ios/forms/WKFileUploadPanel.mm:
3312         Soft link the Photos framework.
3313
3314         (-[WKFileUploadPanel _uploadItemForImageData:originalImage:imageName:successBlock:failureBlock:]):
3315         Save the image's data to a temporary location, and create a
3316         _WKImageFileUploadItem. Code moved from
3317         -_uploadItemFromMediaInfo:successBlock:failureBlock:.
3318
3319         (-[WKFileUploadPanel _uploadItemForJPEGRepresentationOfImage:successBlock:failureBlock:]):
3320         Get a JPEG representation of the UIImage, and create an upload item
3321         from that data.
3322
3323         (uploadImageNameFromUTI):
3324         Return a filename for the uploaded image based on the UTI.
3325
3326         (-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]):
3327         Fetch the photo asset with the given asset URL. Create an image manager
3328         object, and request the image data for the photo asset. Create an
3329         upload item from that data. If we fail, fall back to a JPEG
3330         representation.
3331
3332         (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
3333         Return early if the media item is not an image type. If it is, and we
3334         have an asset URL, try to create an upload item for the native image.
3335         If we don't have an asset URL, use a JPEG representation of the image.
3336
3337 2015-06-04  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3338
3339         REGRESSION(r185091): Crash happens on indexdb tests
3340         https://bugs.webkit.org/show_bug.cgi?id=145549
3341
3342         Reviewed by Darin Adler.
3343
3344         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp: Remove leakRef() use.
3345         (WebKit::WebIDBServerConnection::didCreateObjectStore):
3346         (WebKit::WebIDBServerConnection::didCreateIndex):
3347         (WebKit::WebIDBServerConnection::didDeleteIndex):
3348         (WebKit::WebIDBServerConnection::didPutRecord):
3349         (WebKit::WebIDBServerConnection::didGetRecord):
3350         (WebKit::WebIDBServerConnection::didOpenCursor):
3351         (WebKit::WebIDBServerConnection::didAdvanceCursor):
3352         (WebKit::WebIDBServerConnection::didIterateCursor):
3353         (WebKit::WebIDBServerConnection::didCount):
3354         (WebKit::WebIDBServerConnection::didDeleteRange):
3355         (WebKit::WebIDBServerConnection::didClearObjectStore):
3356         (WebKit::WebIDBServerConnection::didDeleteObjectStore):
3357         (WebKit::WebIDBServerConnection::didChangeDatabaseVersion):
3358
3359 2015-06-04  Joseph Pecoraro  <pecoraro@apple.com>
3360
3361         Web Inspector: REGRESSION: dragged node in the DOM Tree isn't positioned correctly
3362         https://bugs.webkit.org/show_bug.cgi?id=143912
3363
3364         Reviewed by Simon Fraser.
3365
3366         * UIProcess/mac/PageClientImpl.mm:
3367         (WebKit::PageClientImpl::setDragImage):
3368         When using the WKWebView, convert the position from the WKView's
3369         coordinate system to the WKWebView's.
3370
3371         * UIProcess/API/Cocoa/WKWebView.mm:
3372         (-[WKWebView draggingUpdated:]):
3373         * UIProcess/API/mac/WKView.mm:
3374         (-[WKView _dragImageForView:withImage:at:linkDrag:]):
3375         Whitespace cleanup in original drag code.
3376
3377 2015-06-04  Dan Bernstein  <mitz@apple.com>
3378
3379         Fixed the build.
3380
3381         * UIProcess/API/Cocoa/WKErrorPrivate.h:
3382
3383 2015-06-04  Dan Bernstein  <mitz@apple.com>
3384
3385         Renamed the WebKit2SandboxProfiles target to Sandbox Profiles.
3386
3387         Rubber-stamped by Anders Carlsson.
3388
3389         * WebKit2.xcodeproj/project.pbxproj: Renamed the target. For now, added an aggregate
3390         target with the old name that depends on the renamed target. We can remove it once the build
3391         system doesn’t reference to old name.
3392
3393 2015-06-03  Dan Bernstein  <mitz@apple.com>
3394
3395         [Cocoa] Expose interruptedForPolicyChangeError
3396         https://bugs.webkit.org/show_bug.cgi?id=145627
3397
3398         Reviewed by Anders Carlsson.
3399
3400         * UIProcess/API/Cocoa/WKErrorPrivate.h: Added WKErrorCodeFrameLoadInterruptedByPolicyChange with the same value as
3401         kWKErrorCodeFrameLoadInterruptedByPolicyChange.
3402
3403 2015-06-04  Chris Dumez  <cdumez@apple.com>
3404
3405         [WK2] Prune more resources from the MemoryCache before process suspension
3406         https://bugs.webkit.org/show_bug.cgi?id=145633
3407
3408         Reviewed by Andreas Kling.
3409
3410         * NetworkProcess/NetworkProcess.cpp:
3411         (WebKit::NetworkProcess::lowMemoryHandler):
3412         (WebKit::NetworkProcess::initializeNetworkProcess):
3413         (WebKit::NetworkProcess::processWillSuspendImminently):
3414         (WebKit::NetworkProcess::prepareToSuspend):
3415         * NetworkProcess/NetworkProcess.h:
3416         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3417         (WebKit::NetworkProcess::platformLowMemoryHandler):
3418         * PluginProcess/PluginProcess.cpp:
3419         (WebKit::PluginProcess::initializeProcess):
3420
3421         Update low memory handler prototype to match WebCore changes.
3422
3423         * WebProcess/WebProcess.cpp:
3424         (WebKit::WebProcess::actualPrepareToSuspend):
3425
3426         Pass Synchronous::Yes argument to MemoryPressureHandler::releaseMemory()
3427         to request that the memory is free up synchronously (e.g. synchronous
3428         JS garbage collection) as the process is about to be suspended.
3429         Previously, the memory pressure handler was trying to detect this case
3430         by checking if the system was really under memory pressure but this was
3431         a bit hackish and it wouldn't work if the process happened to get
3432         suspended while the system was under memory pressure.
3433
3434 2015-06-03  Carlos Alberto Lopez Perez  <clopez@igalia.com>
3435
3436         [GTK] [Wayland] Build is broken on trunk
3437         https://bugs.webkit.org/show_bug.cgi?id=142879
3438
3439         Reviewed by Carlos Garcia Campos.
3440
3441         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3442         (WebKit::LayerTreeHostGtk::makeContextCurrent): When Wayland target
3443         is enabled GLNativeWindowType is not an u_int64 type.
3444         Cast contextID to avoid a build failure.
3445
3446 2015-06-03  Dan Bernstein  <mitz@apple.com>
3447
3448         Made WKBackForwardListItemPrivate.h a private header after it was added as internal in r185183.
3449
3450         * WebKit2.xcodeproj/project.pbxproj:
3451
3452 2015-06-03  Hyungwook Lee  <hyungwook.lee@navercorp.com>
3453
3454         [EFL] Implement window_object_cleared callback in EwkPageClient.
3455         https://bugs.webkit.org/show_bug.cgi?id=145603
3456
3457         Reviewed by Gyuyoung Kim.
3458
3459         We need to provide right timing for custom JS API that may need to work at the beginning of the page.
3460
3461         * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
3462         * WebProcess/InjectedBundle/API/efl/ewk_page.cpp:
3463         (EwkPage::EwkPage):
3464         (EwkPage::didStartProvisionalLoadForFrame):