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