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