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