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