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