[GTK] Crash when spell checker returns no guesses
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-07-09  Michael Catanzaro  <mcatanzaro@igalia.com>
2
3         [GTK] Crash when spell checker returns no guesses
4         https://bugs.webkit.org/show_bug.cgi?id=146805
5
6         Reviewed by Martin Robinson.
7
8         Properly handle ContextMenuItemTagNoGuessesFound in the switch statement.
9
10         * UIProcess/API/gtk/WebKitContextMenuActions.cpp:
11         (webkitContextMenuActionGetForContextMenuItem):
12
13 2015-07-09  Alex Christensen  <achristensen@webkit.org>
14
15         [Content Extensions] Add 3 byte jump size.
16         https://bugs.webkit.org/show_bug.cgi?id=146425
17
18         Reviewed by Darin Adler.
19
20         * UIProcess/API/APIUserContentExtensionStore.h:
21         Increment CurrentContentExtensionFileVersion because of change in the bytecode.
22
23 2015-07-09  Anders Carlsson  <andersca@apple.com>
24
25         SafariViewController loads partial webpage or entirely blank webpage
26         https://bugs.webkit.org/show_bug.cgi?id=146815
27         rdar://problem/21734757
28
29         Reviewed by Dan Bernstein.
30
31         * Platform/spi/ios/UIKitSPI.h:
32         Add _hostProcessIdentifier getter.
33
34         * UIProcess/ApplicationStateTracker.h:
35         Change ApplicationStateTracker to hold on to a WKContentView instead of a UIView.
36
37         * UIProcess/ApplicationStateTracker.mm:
38         (WebKit::applicationType):
39         Add a helper function that returns the type of application the web view is hosted by (regular
40         application, view service or extension).
41
42         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
43         Register notifications and update m_isInBackground. For regular applications, just listen for UIApplication notifications.
44         For view services, walk the view controller hierarchy and find the service view controller and listen for notifications and use
45         BKS to find the background state of the host application. For extensions, just use BKSApplicationStateMonitor directly.
46
47         (WebKit::isViewService): Deleted.
48
49         * UIProcess/ios/WKContentView.mm:
50         (-[WKContentView willMoveToWindow:]):
51         If we're moving out of a window, null out the state tracker.
52
53         (-[WKContentView didMoveToWindow]):
54         If we moved to a window, create a new state tracker.
55
56         (-[WKContentView isBackground]):
57         Handle a null application state.
58
59         (-[WKContentView _commonInitializationWithProcessPool:configuration:]): Deleted.
60         Don't create the application state here.
61
62 2015-07-09  Dan Bernstein  <mitz@apple.com>
63
64         [Cocoa] Report the first paint after committing a load as a rendering progress event
65         https://bugs.webkit.org/show_bug.cgi?id=146765
66
67         Reviewed by Tim Horton.
68
69         * Shared/API/Cocoa/_WKRenderingProgressEvents.h: Added _WKRenderingProgressEventFirstPaint.
70
71         * UIProcess/API/Cocoa/WKWebView.mm:
72         (-[WKWebView _didCommitLayerTree:]): If this is the first layer tree commit since the load
73         was committed, and the delegate is observing _WKRenderingProgressEventFirstPaint, call
74         NavigationState::didFirstPaint.
75
76         * UIProcess/Cocoa/NavigationState.h:
77         * UIProcess/Cocoa/NavigationState.mm:
78         (WebKit::NavigationState::didFirstPaint): Added. Calls -_webView:renderingProgressDidChange:
79         with _WKRenderingProgressEventFirstPaint.
80
81 2015-07-08  Jinwoo Song  <jinwoo7.song@samsung.com>
82
83         [EFL] When closing inspector window, EwkView is not released properly.
84         https://bugs.webkit.org/show_bug.cgi?id=146716
85
86         Reviewed by Gyuyoung Kim.
87
88         It's because inspector window could not be deleted by remaining reference
89         from inspector view(evas object). This patch deletes the inspector window
90         after finishing the evas object smart call.
91
92         * UIProcess/efl/WebInspectorProxyEfl.cpp:
93         (WebKit::destroyInspectorWindow):
94         (WebKit::WebInspectorProxy::platformDidClose):
95
96 2015-07-08  Hyungwook Lee  <hyungwook.lee@navercorp.com>
97
98         Fix ASSERTION FAILED: !m_pendingNavigationID in WebPage::reload().
99         https://bugs.webkit.org/show_bug.cgi?id=146546
100
101         Reviewed by Darin Adler.
102
103         We did't reset pendingNavigationID value when request url is empty.
104         Hence we need to ignore ASSERT check in this case.
105
106         * WebProcess/WebPage/WebPage.cpp:
107         (WebKit::WebPage::reload):
108
109 2015-07-08  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
110
111         Use Ref/RefPtr instead of PassRefPtr in WebKit2 - 2
112         https://bugs.webkit.org/show_bug.cgi?id=146591
113
114         Reviewed by Darin Adler.
115
116         Following patch in order to reduce use of PassRefPtr.
117
118         * Shared/BlobDataFileReferenceWithSandboxExtension.h:
119         * Shared/Cocoa/CompletionHandlerCallChecker.h:
120         * Shared/Cocoa/CompletionHandlerCallChecker.mm:
121         (WebKit::CompletionHandlerCallChecker::create):
122         * Shared/Downloads/DownloadAuthenticationClient.h:
123         (WebKit::DownloadAuthenticationClient::create):
124         * Shared/SandboxExtension.h:
125         * Shared/ShareableResource.cpp:
126         (WebKit::ShareableResource::create):
127         * Shared/ShareableResource.h:
128         * Shared/mac/ObjCObjectGraph.h:
129         (WebKit::ObjCObjectGraph::create):
130         * Shared/mac/SandboxExtensionMac.mm:
131         (WebKit::SandboxExtension::create):
132         * UIProcess/API/Cocoa/WKProcessGroup.mm:
133         (getInjectedBundleInitializationUserData):
134         * UIProcess/WebPreferences.cpp:
135         (WebKit::WebPreferences::create):
136         * UIProcess/WebPreferences.h:
137         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
138         (WKBundlePageOverlayCreate):
139         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
140         (WKBundlePageBannerCreateBannerWithCALayer):
141         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
142         (WebKit::InjectedBundleDOMWindowExtension::create):
143         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h:
144         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
145         (WebKit::InjectedBundleHitTestResult::create):
146         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
147         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
148         (WebKit::InjectedBundleNavigationAction::create):
149         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
150         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
151         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
152         (WebKit::InjectedBundlePageContextMenuClient::prepareForImmediateAction):
153         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
154         (WebKit::InjectedBundleScriptWorld::create):
155         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
156         * WebProcess/Network/NetworkProcessConnection.h:
157         (WebKit::NetworkProcessConnection::create):
158         * WebProcess/Network/WebResourceLoader.cpp:
159         (WebKit::WebResourceLoader::create):
160         * WebProcess/Network/WebResourceLoader.h:
161         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
162         (WebKit::NotificationPermissionRequestManager::create):
163         * WebProcess/Notifications/NotificationPermissionRequestManager.h:
164         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
165         (WebKit::NetscapePlugin::create):
166         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
167         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
168         (WebKit::NetscapePluginStream::create):
169         * WebProcess/Plugins/PDF/PDFPlugin.h:
170         * WebProcess/Plugins/PDF/PDFPlugin.mm:
171         (WebKit::PDFPlugin::create):
172         * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
173         (WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::create):
174         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
175         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
176         (WebKit::PDFPluginChoiceAnnotation::create):
177         * WebProcess/Plugins/PDF/PDFPluginPasswordField.h:
178         * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
179         (WebKit::PDFPluginPasswordField::create):
180         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
181         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
182         (WebKit::PDFPluginTextAnnotation::create):
183         * WebProcess/Plugins/PluginProcessConnection.h:
184         (WebKit::PluginProcessConnection::create):
185         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
186         (WebKit::PluginProcessConnectionManager::create):
187         * WebProcess/Plugins/PluginProcessConnectionManager.h:
188         * WebProcess/Plugins/PluginProxy.cpp:
189         (WebKit::PluginProxy::create):
190         * WebProcess/Plugins/PluginProxy.h:
191         * WebProcess/Plugins/PluginView.cpp:
192         (WebKit::PluginView::URLRequest::create):
193         (WebKit::PluginView::Stream::create):
194         (WebKit::PluginView::create):
195         * WebProcess/Plugins/PluginView.h:
196         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
197         (WebKit::RemoteScrollingCoordinator::create):
198         * WebProcess/Storage/StorageAreaImpl.cpp:
199         (WebKit::StorageAreaImpl::create):
200         * WebProcess/Storage/StorageAreaImpl.h:
201         * WebProcess/Storage/StorageAreaMap.cpp:
202         (WebKit::StorageAreaMap::create):
203         * WebProcess/Storage/StorageAreaMap.h:
204         * WebProcess/WebConnectionToUIProcess.cpp:
205         (WebKit::WebConnectionToUIProcess::create):
206         * WebProcess/WebConnectionToUIProcess.h:
207         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
208         (WebKit::WebPopupMenu::create):
209         * WebProcess/WebCoreSupport/WebPopupMenu.h:
210         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
211         (WebKit::WebSearchPopupMenu::create):
212         * WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
213         * WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h:
214         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
215         (WebKit::WebFrameNetworkingContext::create):
216         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
217         (WebKit::WebFrameNetworkingContext::create):
218         * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h:
219         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::create):
220         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
221         (WebKit::CoordinatedLayerTreeHost::create):
222         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
223         (WebKit::ThreadedCoordinatedLayerTreeHost::create):
224         * WebProcess/WebPage/EventDispatcher.cpp:
225         (WebKit::EventDispatcher::create):
226         * WebProcess/WebPage/EventDispatcher.h:
227         * WebProcess/WebPage/PageBanner.h:
228         * WebProcess/WebPage/WebBackForwardListProxy.h:
229         (WebKit::WebBackForwardListProxy::create):
230         * WebProcess/WebPage/WebContextMenu.h:
231         (WebKit::WebContextMenu::create):
232         * WebProcess/WebPage/WebDocumentLoader.h:
233         (WebKit::WebDocumentLoader::create):
234         * WebProcess/WebPage/WebInspector.cpp:
235         (WebKit::WebInspector::create):
236         * WebProcess/WebPage/WebInspector.h:
237         * WebProcess/WebPage/WebInspectorUI.cpp:
238         (WebKit::WebInspectorUI::create):
239         * WebProcess/WebPage/WebInspectorUI.h:
240         * WebProcess/WebPage/WebOpenPanelResultListener.cpp:
241         (WebKit::WebOpenPanelResultListener::create):
242         * WebProcess/WebPage/WebOpenPanelResultListener.h:
243         * WebProcess/WebPage/WebPageOverlay.cpp:
244         (WebKit::WebPageOverlay::create):
245         * WebProcess/WebPage/WebPageOverlay.h:
246         * WebProcess/WebPage/WebUndoStep.cpp:
247         (WebKit::WebUndoStep::create):
248         * WebProcess/WebPage/WebUndoStep.h:
249         * WebProcess/WebPage/mac/PageBannerMac.mm:
250         (WebKit::PageBanner::create):
251         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
252         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
253         (WebKit::PlatformCAAnimationRemote::create):
254         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
255         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
256         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
257         * WebProcess/ios/WebVideoFullscreenManager.h:
258         * WebProcess/ios/WebVideoFullscreenManager.mm:
259         (WebKit::WebVideoFullscreenManager::create):
260
261 2015-07-08  Anders Carlsson  <andersca@apple.com>
262
263         WKSecurityOrigin.h has wrong availability info
264         https://bugs.webkit.org/show_bug.cgi?id=146761
265         rdar://problem/21735802
266
267         Reviewed by Dan Bernstein.
268
269         * UIProcess/API/Cocoa/WKSecurityOrigin.h:
270
271 2015-07-08  Andreas Kling  <akling@apple.com>
272
273         [iOS] Scrolling is laggy when the keyboard is up and a form element is focused.
274         <https://webkit.org/b/146735>
275         <rdar://problem/21151033>
276
277         Reviewed by Enrica Casucci.
278
279         Every touch on the page causes us to call elementDidFocus(), since we may need to bring
280         up a keyboard if the node had previously been programmatically focused. This was causing
281         little lag spikes during scrolling every time you'd put your finger to the screen.
282
283         Have WebPage::elementDidFocus() return early if the node already has focus, and we've
284         started an input session in response to non-programmatic focus already.
285
286         * WebProcess/WebPage/WebPage.h:
287         * WebProcess/WebPage/ios/WebPageIOS.mm:
288         (WebKit::WebPage::elementDidFocus):
289         (WebKit::WebPage::elementDidBlur):
290
291 2015-07-08  Matt Rajca  <mrajca@apple.com>
292
293         Media Session: indicate to clients whether a media session has active media elements
294         https://bugs.webkit.org/show_bug.cgi?id=146742
295
296         Reviewed by Tim Horton.
297
298         * UIProcess/API/C/WKPage.cpp:
299         (WKPageHasMediaSessionWithActiveMediaElements):
300         * UIProcess/API/C/WKPagePrivate.h:
301         * UIProcess/WebPageProxy.cpp:
302         (WebKit::WebPageProxy::hasMediaSessionWithActiveMediaElementsDidChange):
303         * UIProcess/WebPageProxy.h:
304         (WebKit::WebPageProxy::hasMediaSessionWithActiveMediaElementsDidChange):
305         * UIProcess/WebPageProxy.messages.in:
306         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
307         (WebKit::WebChromeClient::hasMediaSessionWithActiveMediaElementsDidChange):
308         * WebProcess/WebCoreSupport/WebChromeClient.h:
309
310 2015-07-07  Matt Rajca  <mrajca@apple.com>
311
312         Media Session: propagate artwork URL with metadata to UI clients
313         https://bugs.webkit.org/show_bug.cgi?id=146698
314
315         Reviewed by Tim Horton.
316
317         * Shared/WebMediaSessionMetadata.h:
318         (WebKit::WebMediaSessionMetadata::artworkURL):
319         * UIProcess/API/C/WKMediaSessionMetadata.cpp:
320         (WKMediaSessionMetadataCopyArtworkURL):
321         * UIProcess/API/C/WKMediaSessionMetadata.h:
322
323 2015-07-08  Yongjun Zhang  <yongjun_zhang@apple.com>
324
325         Don't allow page scroll when previewing a link or image.
326         https://bugs.webkit.org/show_bug.cgi?id=146741
327         rdar://problem/21733053
328
329         Reviewed by Beth Dakin.
330
331         Don't let preview gesture and scroll panning gesture or zooming gesture recognize at the same time.
332
333         * UIProcess/ios/WKContentViewInteraction.mm:
334         (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
335
336 2015-07-08  Tim Horton  <timothy_horton@apple.com>
337
338         Snapshots can be misplaced when custom swipe views are offset from the window origin
339         https://bugs.webkit.org/show_bug.cgi?id=146744
340         <rdar://problem/20942120>
341
342         Reviewed by Dean Jackson.
343
344         * UIProcess/mac/ViewGestureControllerMac.mm:
345         (WebKit::ViewGestureController::beginSwipeGesture):
346         Keep swipeArea in window coordinates; it was already in window coordinates
347         when using custom swipe views, but not in the non-custom case.
348
349         Convert from window coordinates to parent-of-m_swipeLayer coordinates when
350         determining m_swipeLayer's frame.
351
352 2015-07-07  Andy Estes  <aestes@apple.com>
353
354         [iOS][WK2] Ignore synthetic clicks in subframes initiated on a previous page
355         https://bugs.webkit.org/show_bug.cgi?id=146712
356
357         Reviewed by Benjamin Poulain.
358
359         r178980 fixed an issue where, if a main frame navigation occurs in response to a touch event, a synthetic click
360         event could fire on the navigated-to page. This change extends this fix to apply to subframes.
361
362         * WebProcess/WebPage/WebFrame.cpp:
363         (WebKit::WebFrame::WebFrame):
364         * WebProcess/WebPage/WebFrame.h:
365         (WebKit::WebFrame::firstLayerTreeTransactionIDAfterDidCommitLoad):
366         (WebKit::WebFrame::setFirstLayerTreeTransactionIDAfterDidCommitLoad):
367         * WebProcess/WebPage/WebPage.cpp:
368         (WebKit::WebPage::didCommitLoad): Stored the next layer tree transaction ID, and called cancelPotentialTapInFrame(), for the committed frame.
369         * WebProcess/WebPage/WebPage.h:
370         * WebProcess/WebPage/ios/WebPageIOS.mm:
371         (WebKit::WebPage::handleTap): Determined the first post-commit layer tree transaction ID from the tap target node's frame.
372         (WebKit::WebPage::commitPotentialTap): Ditto.
373         (WebKit::WebPage::cancelPotentialTap): Called cancelPotentialTapInFrame(), passing m_mainFrame.
374         (WebKit::WebPage::cancelPotentialTapInFrame): Taught to only cancel a potential tap whose target node is a descendant of the given frame.
375         (WebKit::WebPage::updateVisibleContentRects): Updated to use the main frame's first post-commit layer tree transaction ID.
376
377 2015-07-08  Brady Eidson  <beidson@apple.com>
378
379         Move PingLoaders to the NetworkingProcess.
380         <rdar://problem/18860263> and https://bugs.webkit.org/show_bug.cgi?id=146710
381
382         Reviewed by Tim Horton.
383
384         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
385         (WebKit::NetworkConnectionToWebProcess::loadPing): Create a PingHandle and then return.
386         * NetworkProcess/NetworkConnectionToWebProcess.h:
387         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
388         
389         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
390         (WebKit::WebPlatformStrategies::createPingHandle): If the Network process is enabled,
391           compile the appropriate load parameters and then message to it.
392           Otherwise, use the default in-process PingHandle.
393         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
394
395 2015-07-08  Beth Dakin  <bdakin@apple.com>
396
397         Only support image previews for clients that implement commitPreviewedImageWithURL 
398         delegate
399         https://bugs.webkit.org/show_bug.cgi?id=146739
400         -and corresponding-
401         rdar://problem/21692929
402
403         Reviewed by Tim Horton.
404
405         We should only support image previews for clients that implement 
406         commitPreviewedImageWithURL delegate since there is no default commit action.
407         * UIProcess/ios/WKContentViewInteraction.mm:
408         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
409
410 2015-07-08  Anders Carlsson  <andersca@apple.com>
411
412         Make ApplicationStateTracker be per view instead of being a singleton
413         https://bugs.webkit.org/show_bug.cgi?id=146737
414
415         Reviewed by Andreas Kling.
416
417         * UIProcess/ApplicationStateTracker.h:
418         Update to be per view instead of a singleton.
419
420         * UIProcess/ApplicationStateTracker.mm:
421         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
422         Change to take a view + selectors.
423
424         (WebKit::ApplicationStateTracker::~ApplicationStateTracker):
425         Invalidate the state monitor and remove the listeners.
426
427         (WebKit::ApplicationStateTracker::applicationDidEnterBackground):
428         Just call the single background method.
429
430         (WebKit::ApplicationStateTracker::applicationWillEnterForeground):
431         Just call the single foreground method.
432
433         (WebKit::ApplicationStateTracker::singleton): Deleted.
434         (WebKit::ApplicationStateTracker::addListener): Deleted.
435         (WebKit::ApplicationStateTracker::invokeListeners): Deleted.
436         (WebKit::ApplicationStateTracker::pruneListeners): Deleted.
437
438         * UIProcess/ios/WKContentView.mm:
439         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
440         Create the ApplicationStateTracker here.
441
442         (-[WKContentView isBackground]):
443         Get the ivar instead of the singleton.
444
445 2015-07-08  Beth Dakin  <bdakin@apple.com>
446
447         InteractionInformationAtPosition bounds seem wrong on many sites, affects 
448         apple.com
449         https://bugs.webkit.org/show_bug.cgi?id=146736
450         -and corresponding-
451         rdar://problem/21655549
452
453         Reviewed by Tim Horton.
454
455         http://trac.webkit.org/changeset/186132/ changed the bounds for 
456         InteractionInformationAtPosition. The image-related changes are good, but the 
457         link-related changes feel wrong on many sites. We should revert the change for now 
458         and just use the absoluteBoundingBoxRect() for non-images.
459         * WebProcess/WebPage/ios/WebPageIOS.mm:
460         (WebKit::WebPage::getPositionInformation):
461
462 2015-07-08  Beth Dakin  <bdakin@apple.com>
463
464         Add actions to image previews
465         https://bugs.webkit.org/show_bug.cgi?id=146702
466         -and corresponding-
467         <rdar://problem/21642654>
468
469         Reviewed by Sam Weinig.
470
471         Add an array of actions and _WKActivatedElementInfo in order to properly invoke 
472         the actions.
473         * UIProcess/WKImagePreviewViewController.h:
474         * UIProcess/WKImagePreviewViewController.mm:
475         (-[WKImagePreviewViewController loadView]):
476         (-[WKImagePreviewViewController initWithCGImage:defaultActions:elementInfo:]):
477         (_scaleSizeWithinSize):
478         (-[WKImagePreviewViewController initWithCGImage:]): Deleted.
479
480         Re-factor defaultActionsForImageSheet into a stand-alone function so that it can 
481         be invoked for previews as well as for the action sheet.
482         * UIProcess/ios/WKActionSheetAssistant.h:
483         * UIProcess/ios/WKActionSheetAssistant.mm:
484         (-[WKActionSheetAssistant showImageSheet]):
485         (-[WKActionSheetAssistant defaultActionsForLinkSheet]):
486         (-[WKActionSheetAssistant defaultActionsForImageSheet]):
487         (-[WKActionSheetAssistant showLinkSheet]):
488
489         WKImagePreviewViewController initializer now takes the default actions and 
490         _WKActivatedElementInfo.
491         * UIProcess/ios/WKContentViewInteraction.mm:
492         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
493
494 2015-07-08  Dan Bernstein  <mitz@apple.com>
495
496         <rdar://problem/21669397> [iOS] Keyboard shortcuts that take focus away from the web view end up typing a letter into the newly focused field
497         https://bugs.webkit.org/show_bug.cgi?id=146732
498
499         Reviewed by Sam Weinig.
500
501         * UIProcess/ios/WKContentViewInteraction.mm:
502         (-[WKContentView _interpretKeyEvent:isCharEvent:]): Bail out if we are no longer the first
503         responder.
504
505 2015-07-07  Anders Carlsson  <andersca@apple.com>
506
507         Always begin a background task when needed, not just when we go into the background
508         https://bugs.webkit.org/show_bug.cgi?id=146704
509
510         Reviewed by Gavin Barraclough.
511
512         The system let background code run for the same amount of time regardless of whether the assertion was grabbed
513         when the app is in the foreground or being backgrounded, so remove the background/foreground tracking code.
514
515         * UIProcess/ios/ProcessAssertionIOS.mm:
516         (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
517         (-[WKProcessAssertionBackgroundTaskManager init]): Deleted.
518         (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground]): Deleted.
519         (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground]): Deleted.
520
521 2015-07-08  Antti Koivisto  <antti@apple.com>
522
523         Network Cache: Don't open files in main thread
524         https://bugs.webkit.org/show_bug.cgi?id=146722
525
526         Follow-up.
527
528         * NetworkProcess/cache/NetworkCacheStorage.cpp:
529         (WebKit::NetworkCache::Storage::dispatchReadOperation):
530
531             Accessing m_bodyFilter is technically not thread safe so keep it in main thread.
532
533 2015-07-08  Antti Koivisto  <antti@apple.com>
534
535         Network Cache: Don't open files in main thread
536         https://bugs.webkit.org/show_bug.cgi?id=146722
537
538         Reviewed by Chris Dumez.
539
540         While we use open() with O_NONBLOCK profiling indicates that we still may block up to 5ms under the syscall in some case.
541
542         * NetworkProcess/cache/NetworkCacheStorage.cpp:
543         (WebKit::NetworkCache::Storage::dispatchReadOperation):
544
545             Dispatch read operation to a concurrent queue.
546             With this we can also eliminate the separate dispatch() for body blob read.
547
548 2015-07-08  Sungmann Cho  <sungmann.cho@navercorp.com>
549
550         [Unix] Remove unused local variable from Connection::sendOutgoingMessage().
551         https://bugs.webkit.org/show_bug.cgi?id=146713
552
553         Reviewed by Csaba Osztrogonác.
554
555         * Platform/IPC/unix/ConnectionUnix.cpp:
556         (IPC::Connection::sendOutgoingMessage):
557
558 2015-07-07  Tim Horton  <timothy_horton@apple.com>
559
560         Occasional null deref in the CA callback in flushLayers()
561         https://bugs.webkit.org/show_bug.cgi?id=146700
562         <rdar://problem/21668754>
563
564         Reviewed by Simon Fraser.
565
566         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
567         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
568         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
569         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
570         Make sure we keep the WebPage alive, and null-check the potentially null
571         WebCore objects (Page and Frame).
572
573 2015-07-06  Matt Rajca  <mrajca@apple.com>
574
575         Media Session: propagate metadata changes to UI clients
576         https://bugs.webkit.org/show_bug.cgi?id=146660
577
578         Reviewed by Tim Horton.
579
580         * CMakeLists.txt: Added WebMediaSessionMetadata and WKMediaSessionMetadata.
581         * Shared/API/APIObject.h: Added a media session metadata type.
582         * Shared/API/c/WKBase.h:
583         * Shared/WebMediaSessionMetadata.cpp: Added API adapter for WebCore::MediaSessionMetadata.
584         (WebKit::WebMediaSessionMetadata::create):
585         (WebKit::WebMediaSessionMetadata::WebMediaSessionMetadata):
586         (WebKit::WebMediaSessionMetadata::~WebMediaSessionMetadata):
587         * Shared/WebMediaSessionMetadata.h: Added API adapter for WebCore::MediaSessionMetadata.
588         (WebKit::WebMediaSessionMetadata::title):
589         (WebKit::WebMediaSessionMetadata::artist):
590         (WebKit::WebMediaSessionMetadata::album):
591         * UIProcess/API/APIUIClient.h: Added 'mediaSessionMetadataDidChange' interface.
592         (API::UIClient::mediaSessionMetadataDidChange):
593         * UIProcess/API/C/WKAPICast.h:
594         * UIProcess/API/C/WKMediaSessionMetadata.cpp: Added C wrapper for WebMediaSessionMetadata.
595         (WKMediaSessionMetadataGetTypeID):
596         (WKMediaSessionMetadataCopyTitle):
597         (WKMediaSessionMetadataCopyArtist):
598         (WKMediaSessionMetadataCopyAlbum):
599         * UIProcess/API/C/WKMediaSessionMetadata.h: Added C wrapper for WebMediaSessionMetadata.
600         * UIProcess/API/C/WKPage.cpp: Forward 'mediaSessionMetadataDidChange' to client.
601         (WKPageSetPageUIClient):
602         * UIProcess/API/C/WKPageUIClient.h: Added 'mediaSessionMetadataDidChange' callback.
603         * UIProcess/WebPageProxy.cpp: Forward 'mediaSessionMetadataDidChange' to UI client.
604         (WebKit::WebPageProxy::mediaSessionMetadataDidChange):
605         * WebKit2.xcodeproj/project.pbxproj: Added WebMediaSessionMetadata and WKMediaSessionMetadata.
606
607 2015-07-07  Brady Eidson  <beidson@apple.com>
608
609         HTTP Auth cached after disabling private browsing/reset.
610         <rdar://problem/8293055> and https://bugs.webkit.org/show_bug.cgi?id=146654
611
612         Reviewed by Tim Horton.
613
614         * WebProcess/Plugins/PluginView.cpp:
615         (WebKit::PluginView::getAuthenticationInfo):
616
617 2015-07-07  Anders Carlsson  <andersca@apple.com>
618
619         Make sure to remove the download message receiver before freeing it
620         https://bugs.webkit.org/show_bug.cgi?id=146687
621
622         Reviewed by Simon Fraser.
623
624         * UIProcess/Downloads/DownloadProxyMap.cpp:
625         (WebKit::DownloadProxyMap::downloadFinished):
626
627 2015-07-07  Chris Dumez  <cdumez@apple.com>
628
629         Unreviewed, Fix non-Mac build after r186464.
630
631         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
632         (WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
633
634 2015-07-06  Anders Carlsson  <andersca@apple.com>
635
636         Make sure to remove message receivers before they are deallocated
637         https://bugs.webkit.org/show_bug.cgi?id=146666
638         rdar://problem/21331118
639
640         Reviewed by Tim Horton.
641
642         Add code so we can assert that there are no message receiver maps pointing to a message receiver
643         when it's being destroyed. Fix all the assertions by calling removeMessageReceiver in the right places.
644
645         * Platform/IPC/MessageReceiver.h:
646         (IPC::MessageReceiver::~MessageReceiver):
647         (IPC::MessageReceiver::willBeAddedToMessageReceiverMap):
648         (IPC::MessageReceiver::willBeRemovedFromMessageReceiverMap):
649         * Platform/IPC/MessageReceiverMap.cpp:
650         (IPC::MessageReceiverMap::addMessageReceiver):
651         (IPC::MessageReceiverMap::removeMessageReceiver):
652         (IPC::MessageReceiverMap::invalidate):
653         * Shared/ChildProcess.cpp:
654         (WebKit::ChildProcess::removeMessageReceiver):
655         * Shared/ChildProcess.h:
656         * Shared/ChildProcessProxy.cpp:
657         (WebKit::ChildProcessProxy::removeMessageReceiver):
658         * Shared/ChildProcessProxy.h:
659         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
660         (-[WKBrowsingContextController dealloc]):
661         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
662         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
663         (WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
664         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
665         (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
666         * UIProcess/WebConnectionToWebProcess.cpp:
667         (WebKit::WebConnectionToWebProcess::invalidate):
668         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
669         (-[WKWebProcessPlugInBrowserContextController dealloc]):
670         * WebProcess/WebConnectionToUIProcess.cpp:
671         (WebKit::WebConnectionToUIProcess::invalidate):
672
673 2015-07-06  Brent Fulgham  <bfulgham@apple.com>
674
675         Ensure media playback is stopped during page close
676         https://bugs.webkit.org/show_bug.cgi?id=146554
677         <rdar://problem/18033944>
678
679         Reviewed by Brady Eidson.
680
681         * WebProcess/WebProcess.cpp:
682         (WebKit::WebProcess::didClose): Make sure to clean up any running media sessions when
683         the process is being shut down.
684
685 2015-07-06  Commit Queue  <commit-queue@webkit.org>
686
687         Unreviewed, rolling out r186385.
688         https://bugs.webkit.org/show_bug.cgi?id=146668
689
690         crashes 3 webaudio tests in debug builds (Requested by
691         alexchristensen on #webkit).
692
693         Reverted changeset:
694
695         "Ensure media playback is stopped during page close"
696         https://bugs.webkit.org/show_bug.cgi?id=146554
697         http://trac.webkit.org/changeset/186385
698
699 2015-07-06  Brent Fulgham  <bfulgham@apple.com>
700
701         Ensure media playback is stopped during page close
702         https://bugs.webkit.org/show_bug.cgi?id=146554
703         <rdar://problem/18033944>
704
705         Reviewed by Brady Eidson.
706
707         * WebProcess/WebProcess.cpp:
708         (WebKit::WebProcess::didClose): Make sure to clean up any running media sessions when
709         the process is being shut down.
710
711 2015-07-06  Yongjun Zhang  <yongjun_zhang@apple.com>
712
713         Allow UIDelegate to customize link actions in preview.
714         https://bugs.webkit.org/show_bug.cgi?id=146567
715
716         Add a new UIDelegate method to pass the defaultActions and elementInfo to client to allow
717         the client customize the actions based on the element. Also add a new SPI runActionWithElementInfo:
718         to _WKElementAction and make it aware of the WKActionSheetAssistant that creates it, so that
719         the client can run the action without knowing WKActionSheetAssistant.
720
721         Reviewed by Beth Dakin.
722
723         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add delegate method _webView:previewViewControllerForURL:defaultActions:elementInfo:.
724         * UIProcess/API/Cocoa/_WKElementAction.h: Add a SPI runActionWithElementInfo:.
725         * UIProcess/API/Cocoa/_WKElementAction.mm:
726         (-[_WKElementAction _initWithTitle:actionHandler:type:assistant:]): Modified initializer, also initialize _defaultActionSheetAssistant
727             iVar if the caller provides that.
728         (+[_WKElementAction elementActionWithTitle:actionHandler:]): Use the new initializer.
729         (+[_WKElementAction _elementActionWithType:customTitle:assistant:]): A new helper method to create _WKElementAction with assistant.
730         (+[_WKElementAction _elementActionWithType:assistant:]):
731         (+[_WKElementAction elementActionWithType:customTitle:]):
732         (-[_WKElementAction runActionWithElementInfo:]):
733         * UIProcess/API/Cocoa/_WKElementActionInternal.h:
734         * UIProcess/ios/WKActionSheetAssistant.h: Add a method defaultActionsForLinkSheet.
735         * UIProcess/ios/WKActionSheetAssistant.mm:
736         (-[WKActionSheetAssistant defaultActionsForLinkSheet]): Get default actions for current link that is activated.
737         (-[WKActionSheetAssistant showLinkSheet]): Use defaultActionsForLinkSheet.
738         * UIProcess/ios/WKContentViewInteraction.mm:
739         (-[WKContentView previewViewControllerForPosition:inSourceView:]): Pass defaultActions and elementInfo to UIDelegate when querying
740             for preview view controller.
741         (-[WKContentView didDismissPreviewViewController:committing:]):
742
743 2015-07-06  Brady Eidson  <beidson@apple.com>
744
745         ShouldOpenExternalURLsPolicy should default to "Allow" for WK2 API loads.
746         <rdar://problem/21640050> and https://bugs.webkit.org/show_bug.cgi?id=146563
747
748         Reviewed by Geoff Garen.
749
750         * UIProcess/API/Cocoa/WKWebView.mm:
751         (-[WKWebView loadRequest:]): Move _loadRequest:withOptions: logic back here, just without options.
752         (-[WKWebView _loadRequest:withOptions:]): This SPI is now unneeded, but must remain inactive.
753         * UIProcess/WebPageProxy.h:
754
755 2015-07-06  Csaba Osztrogonác  <ossy@webkit.org>
756
757         URTBF after r186357 to fix non Cocoa platforms.
758
759         * NetworkProcess/NetworkProcess.cpp:
760         (WebKit::NetworkProcess::deleteWebsiteData):
761
762 2015-07-06  Antti Koivisto  <antti@apple.com>
763
764         With multipart/replaced (e.g. motion JPEG), m_bufferedDataForCache grows unbounded in Networking process
765         https://bugs.webkit.org/show_bug.cgi?id=146630
766         <rdar://problem/21677340>
767
768         Follow-up.
769
770         * NetworkProcess/NetworkResourceLoader.cpp:
771         (WebKit::NetworkResourceLoader::didReceiveBuffer):
772
773             Typo 1014 -> 1024
774
775 2015-07-06  Commit Queue  <commit-queue@webkit.org>
776
777         Unreviewed, rolling out r185896.
778         https://bugs.webkit.org/show_bug.cgi?id=146647
779
780         Caused by a refcounting error in GTK+; it's actually legal for
781         the event to be null, just the gi annotations were wrong.
782         (Requested by mcatanzaro on #webkit).
783
784         Reverted changeset:
785
786         "[GTK] Crash performing drag-and-drop"
787         https://bugs.webkit.org/show_bug.cgi?id=146267
788         http://trac.webkit.org/changeset/185896
789
790 2015-07-06  Anders Carlsson  <andersca@apple.com>
791
792         Provide API to clear the HSTS cache
793         https://bugs.webkit.org/show_bug.cgi?id=146565
794         rdar://problem/20023805
795
796         Reviewed by Tim Horton.
797
798         * NetworkProcess/NetworkProcess.cpp:
799         (WebKit::NetworkProcess::deleteWebsiteData):
800         * NetworkProcess/NetworkProcess.h:
801         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
802         (WebKit::NetworkProcess::clearHSTSCache):
803         * Shared/WebsiteData/WebsiteDataTypes.h:
804         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
805         (dataTypesToString):
806         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
807         (WebKit::toWebsiteDataTypes):
808         (WebKit::toWKWebsiteDataTypes):
809         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
810         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
811         (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
812
813 2015-07-06  Antti Koivisto  <antti@apple.com>
814
815         With multipart/replaced (e.g. motion JPEG), m_bufferedDataForCache grows unbounded in Networking process
816         https://bugs.webkit.org/show_bug.cgi?id=146630
817         <rdar://problem/21677340>
818
819         Reviewed by Chris Dumez.
820
821         * NetworkProcess/NetworkResourceLoader.cpp:
822         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
823
824             Don't buffer multipart/x-mixed-replace. We never want to cache these.
825
826         (WebKit::NetworkResourceLoader::didReceiveBuffer):
827
828             Limit the maximum size of the cache buffer to 10MB. This prevents unbounded memory growth if the resource
829             keeps streaming. It also prevents giant entries from pushing other data out of the cache.
830
831         (WebKit::NetworkResourceLoader::didFinishLoading):
832
833 2015-07-06  Zan Dobersek  <zdobersek@igalia.com>
834
835         [GTK] Guard X11-specific code in webkitWebViewBaseDidRelaunchWebProcess()
836         https://bugs.webkit.org/show_bug.cgi?id=146627
837
838         Reviewed by Carlos Garcia Campos.
839
840         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
841         (webkitWebViewBaseDidRelaunchWebProcess):
842         Guard calls to DrawingAreaImpl::setNativeSurfaceHandleForCompositing()
843         that pass in an X11 Window ID with the PLATFORM(X11) build guards.
844
845 2015-07-05  Chris Dumez  <cdumez@apple.com>
846
847         [WK2] Current page's scroll position is lost when transferring sessionState from one view to another
848         https://bugs.webkit.org/show_bug.cgi?id=146625
849         <rdar://problem/21585268>
850
851         Reviewed by Gavin Barraclough.
852
853         The current page's scroll position was lost when transferring the
854         sessionState from one view to another. This is because we only update
855         the current WebBackForwardListItem after navigating away.
856         However, when the client swaps WebViews for navigating, we don't detect
857         this as navigating away and the current WebBackForwardListItem is not
858         updated with the current page's state (including the scroll position).
859         This means that the information is not transferred via the sessionState
860         and the scroll position (among other things) ends up being lost when
861         navigating back in the new WebView.
862
863         Retrieving the session state is a synchronous API and we want to avoid
864         doing a synchronous IPC between the UIProcess and the WebProcess to
865         retrieve the current page's state. Therefore, the approach chosen in
866         this patch is to detect when the user is done scrolling the main frame
867         (using a HystererisActivity) and then update the scroll position on the
868         current HistoryItem. This way, the current WebBackForwardListItem
869         normally has an up-to-date scroll position for the main frame when the
870         sessionState is queried by the client.
871
872         The solution is not perfect as we don't keep the whole page state
873         up-to-date for the current WebBackForwardListItem, only the main frame
874         state. However, the proposed solution is cheap, avoid synchronous IPC
875         and provides a much better user experience in most cases.
876
877         * WebProcess/WebPage/WebPage.cpp:
878         (WebKit::WebPage::WebPage):
879         (WebKit::WebPage::pageDidScroll):
880         (WebKit::WebPage::pageStoppedScrolling):
881         * WebProcess/WebPage/WebPage.h:
882
883 2015-07-05  Timothy Hatcher  <timothy@apple.com>
884
885         Crash when closing the web inspector
886         https://bugs.webkit.org/show_bug.cgi?id=146620
887
888         Reviewed by Darin Adler.
889
890         * WebProcess/WebPage/WebInspectorUI.cpp:
891         (WebKit::WebInspectorUI::closeWindow): Null check the connection, like it is
892         in other places where it is used.
893
894 2015-07-04  Chris Dumez  <cdumez@apple.com>
895
896         Drop RefPtr::clear() method
897         https://bugs.webkit.org/show_bug.cgi?id=146556
898
899         Reviewed by Brady Eidson.
900
901         Drop RefPtr::clear() method in favor of "= nullptr;" pattern.        
902
903 2015-07-03  Dan Bernstein  <mitz@apple.com>
904
905         [Xcode] Update some build settings as recommended by Xcode 7
906         https://bugs.webkit.org/show_bug.cgi?id=146597
907
908         Reviewed by Sam Weinig.
909
910         * Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE and
911         GCC_NO_COMMON_BLOCKS. Removed GCC_MODEL_TUNING.
912
913         * WebKit2.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.
914
915 2015-07-03  Carlos Garcia Campos  <cgarcia@igalia.com>
916
917         REGRESSION(r186025): [SOUP] NetworkCache gets blocked in traverse since r186025
918         https://bugs.webkit.org/show_bug.cgi?id=146545
919
920         Reviewed by Sergio Villar Senin.
921
922         In r186025 the readSync method used when traversing the cache
923         files was removed in favor of using parallel async reads to speed
924         up the traverse. The approach used doesn't work for soup, because
925         the IO operations are async, but run their callbacks in the
926         current thread. The network cache now runs up to 5 async reads in
927         the io work queue thread, and waits for them to finish, and those
928         asycn reads never finish for the soup backend because the thread
929         is blocked waiting for them. We need to use a different thread to
930         run those reads.
931
932         * NetworkProcess/cache/NetworkCacheIOChannel.h: Add
933         readSyncInThread private method.
934         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
935         (WebKit::NetworkCache::IOChannel::read): When not called in the
936         main thread, call readSyncInThread() instead.
937         (WebKit::NetworkCache::IOChannel::readSyncInThread): Run the read
938         operation synchronously in a different thread, since the current
939         thread might be blocked waiting for us.
940
941 2015-07-02  Przemek Piorkowski  <piorkowskiprzemyslaw@gmail.com>
942
943         [EFL] test_ewk2_application_cache_manager has been failed since r185527
944         https://bugs.webkit.org/show_bug.cgi?id=146016
945
946         Reviewed by Gyuyoung Kim.
947
948         In order to handle properly WebApplicationCacheManagerProxy implementation which use
949         WebsiteDataRecord it is necessary to enable PUBLIC_SUFFIX_LIST for EFL.
950         Implementation of PUBLIC_SUFFIX_LIST already exists for soup so EFL can use it as well.
951
952         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
953         (TEST_F): enable ewk_application_cache_manager as it is passing now.
954
955 2015-07-02  Commit Queue  <commit-queue@webkit.org>
956
957         Unreviewed, rolling out r186247 and r186250.
958         https://bugs.webkit.org/show_bug.cgi?id=146572
959
960         Broke the build on Mavericks bots (Requested by cdumez on
961         #webkit).
962
963         Reverted changesets:
964
965         "Provide API to clear the HSTS cache"
966         https://bugs.webkit.org/show_bug.cgi?id=146565
967         http://trac.webkit.org/changeset/186247
968
969         "Unreviewed build fix for non-COCOA ports after r186247."
970         http://trac.webkit.org/changeset/186250
971
972 2015-07-02  Jinwoo Song  <jinwoo7.song@samsung.com>
973
974         Unreviewed build fix for non-COCOA ports after r186247.
975
976         * NetworkProcess/NetworkProcess.cpp:
977         (WebKit::NetworkProcess::deleteWebsiteData): Add PLATFORM(COCOA) guard.
978
979 2015-07-02  Anders Carlsson  <andersca@apple.com>
980
981         Provide API to clear the HSTS cache
982         https://bugs.webkit.org/show_bug.cgi?id=146565
983         rdar://problem/20023805
984
985         Reviewed by Tim Horton.
986
987         * NetworkProcess/NetworkProcess.cpp:
988         (WebKit::NetworkProcess::deleteWebsiteData):
989         * NetworkProcess/NetworkProcess.h:
990         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
991         (WebKit::NetworkProcess::clearHSTSCache):
992         * Shared/WebsiteData/WebsiteDataTypes.h:
993         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
994         (dataTypesToString):
995         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
996         (WebKit::toWebsiteDataTypes):
997         (WebKit::toWKWebsiteDataTypes):
998         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
999         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1000         (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
1001
1002 2015-07-02  Mark Lam  <mark.lam@apple.com>
1003
1004         Gardening: fix broken 32-bit build..
1005         https://bugs.webkit.org/show_bug.cgi?id=146416
1006
1007         Not reviewed.
1008
1009         * UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:
1010         (API::SerializedScriptValue::deserialize):
1011
1012 2015-07-02  Brent Fulgham  <bfulgham@apple.com>
1013
1014         Correct *another* typo in r186238.
1015
1016         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Fix parameter name scrolView -> scrollView.
1017
1018 2015-07-02  Brent Fulgham  <bfulgham@apple.com>
1019
1020         Correct typo in r186238.
1021
1022         * UIProcess/API/Cocoa/WKWebView.mm:
1023         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
1024
1025 2015-07-02  Brent Fulgham  <bfulgham@apple.com>
1026
1027         Provide delegate SPI for clients to notify WebKit about content inset changes
1028         https://bugs.webkit.org/show_bug.cgi?id=146482
1029         <rdar://problem/21602741>
1030
1031         Reviewed by Darin Adler.
1032
1033         Provide a new SPI for WebKit client applications to use to inform WebKit of planned
1034         adjustments to the edge insets of the view.
1035
1036         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add new optional delegate method.
1037         * UIProcess/API/Cocoa/WKWebView.mm:
1038         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): If the new delegate
1039         method exists, use the specified content insets, rather than the current state of the view.
1040
1041 2015-07-02  Beth Dakin  <bdakin@apple.com>
1042
1043         Allow the UIDelegate to customize an image preview
1044         https://bugs.webkit.org/show_bug.cgi?id=146557
1045         -and corresponding-
1046         rdar://problem/21657424
1047
1048         Reviewed by Tim Horton.
1049
1050         Add imageURL to InteractionInformationAtPosition.
1051         * Shared/InteractionInformationAtPosition.cpp:
1052         (WebKit::InteractionInformationAtPosition::encode):
1053         (WebKit::InteractionInformationAtPosition::decode):
1054         * Shared/InteractionInformationAtPosition.h:
1055
1056         Two new delegate methods.
1057         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1058
1059         Call the delegate methods at the appropriate time.
1060         * UIProcess/ios/WKContentViewInteraction.mm:
1061         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
1062         (-[WKContentView commitPreviewViewController:]):
1063
1064         Include the imageURL in InteractionInformationAtPosition.
1065         * WebProcess/WebPage/ios/WebPageIOS.mm:
1066         (WebKit::WebPage::getPositionInformation):
1067
1068 2015-07-02  Anders Carlsson  <andersca@apple.com>
1069
1070         Instead of requiring ToT UIKIt, check that UI_WEB_TOUCH_EVENT_HAS_IS_POTENTIAL_TAP is defined to 1
1071         https://bugs.webkit.org/show_bug.cgi?id=146558
1072
1073         Reviewed by Beth Dakin.
1074
1075         * Shared/ios/NativeWebTouchEventIOS.mm:
1076         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
1077
1078 2015-07-02  Brady Eidson  <beidson@apple.com>
1079
1080         Remove change I accidentally committed in r186232
1081
1082         * UIProcess/WebsiteData/WebsiteDataStore.h:
1083
1084 2015-07-02  Alex Christensen  <achristensen@webkit.org>
1085
1086         Fix EWS build after r186182.
1087
1088         * WebProcess/WebPage/WebPage.h:
1089         (WebKit::WebPage::userMediaPermissionRequestManager):
1090         Don't export a function defined in a header, or it will generate a weak external symbol.
1091
1092 2015-07-02  Brady Eidson  <beidson@apple.com>
1093
1094         Add preference to disable all http-equiv.
1095         <rdar://problem/9091261> and https://bugs.webkit.org/show_bug.cgi?id=146553
1096
1097         Reviewed by Sam Weinig.
1098
1099         * Shared/WebPreferencesDefinitions.h:
1100         
1101         * UIProcess/API/C/WKPreferences.cpp:
1102         (WKPreferencesSetMetaRefreshEnabled): Still expose this SPI, but have it affect
1103           the "httpEquivEnabled" setting.
1104         (WKPreferencesGetMetaRefreshEnabled): Ditto
1105         (WKPreferencesSetHTTPEquivEnabled):
1106         (WKPreferencesGetHTTPEquivEnabled):
1107         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1108         
1109         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1110         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1111         
1112         * WebProcess/WebPage/WebPage.cpp:
1113         (WebKit::WebPage::updatePreferences):
1114
1115 2015-07-02  Mark Lam  <mark.lam@apple.com>
1116
1117         WKWebView evaluateJavaScript:completionHandler: should reuse its JSContext instance.
1118         https://bugs.webkit.org/show_bug.cgi?id=146416
1119
1120         Reviewed by Anders Carlsson.
1121
1122         The core issue here is that we need to be able to deserialized an
1123         API::SerializedScriptValue instance into an ObjC object graph.  We'll solve this
1124         by introducing a API::SerializedScriptValue::deserialize() functions that does
1125         the job.  The deserialize() function will will use a SharedJSContext to provide
1126         the needed JSContext for doing this work.
1127
1128         Also updated ScriptMessageHandlerDelegate::didPostMessage() to use this new
1129         deserialize() function.
1130
1131         * Shared/API/APISerializedScriptValue.h:
1132         (API::SerializedScriptValue::deserialize):
1133         (API::SerializedScriptValue::internalRepresentation):
1134         - Changed to return a WebCore::SerializedScriptValue*.  This makes it friendlier
1135           to use in the 2 places that need it.
1136
1137         * UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm: Added.
1138         (API::SharedJSContext::SharedJSContext):
1139         (API::SharedJSContext::ensureContext):
1140         (API::SharedJSContext::releaseContext):
1141         (API::SerializedScriptValue::deserialize):
1142         * UIProcess/API/Cocoa/WKUserContentController.mm:
1143         * UIProcess/API/Cocoa/WKWebView.mm:
1144         (-[WKWebView evaluateJavaScript:completionHandler:]):
1145         * UIProcess/API/gtk/WebKitWebView.cpp:
1146         (webkitWebViewRunJavaScriptCallback):
1147         - Removed a now unnecessary cast.
1148         * WebKit2.xcodeproj/project.pbxproj:
1149
1150 2015-07-02  Dan Bernstein  <mitz@apple.com>
1151
1152         <rdar://problem/21429613> [iOS] Stop making symlinks from PrivateFrameworks to Frameworks
1153         https://bugs.webkit.org/show_bug.cgi?id=146542
1154
1155         Reviewed by Sam Weinig.
1156
1157         * WebKit2.xcodeproj/project.pbxproj: Removed the build phase that makes the directory of
1158         symlinks.
1159
1160 2015-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1161
1162         [GTK] WebSQL doesn't work because openDatabase always fails with DOM Exception 18
1163         https://bugs.webkit.org/show_bug.cgi?id=146234
1164
1165         Reviewed by Sergio Villar Senin.
1166
1167         This is because we don't provide any quota, and 0 is used by
1168         default, so there's never enough quota and openDatabase fails. We
1169         should expose this in the API, but for now, we could use a default
1170         quota of 5MB like WTR does.
1171
1172         * UIProcess/API/gtk/WebKitUIClient.cpp: Override
1173         exceededDatabaseQuota and return always the default quota.
1174         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1175         (WebKit::exceededDatabaseQuota): Return the quota based on the
1176         expected usage and current database usabe like mac does.
1177         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Add
1178         custom UI client to implement exceededDatabaseQuota.
1179
1180 2015-07-02  Commit Queue  <commit-queue@webkit.org>
1181
1182         Unreviewed, rolling out r185704.
1183         https://bugs.webkit.org/show_bug.cgi?id=146544
1184
1185         Didn't fix the problem (Requested by anttik on #webkit).
1186
1187         Reverted changeset:
1188
1189         "~4% Membuster regression after WebKit r185452"
1190         https://bugs.webkit.org/show_bug.cgi?id=146112
1191         http://trac.webkit.org/changeset/185704
1192
1193 2015-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1194
1195         [GTK] Accelerated Compositing stops working after a web process crash
1196         https://bugs.webkit.org/show_bug.cgi?id=146508
1197
1198         Reviewed by Martin Robinson.
1199
1200         The problem is that we don't send the window ID again to the new
1201         web process.
1202
1203         * UIProcess/API/gtk/PageClientImpl.cpp:
1204         (WebKit::PageClientImpl::didRelaunchProcess): Call
1205         webkitWebViewBaseDidRelaunchWebProcess().
1206         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1207         (webkitWebViewBaseDidRelaunchWebProcess): Set the window ID to
1208         the new drawing area.
1209         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
1210
1211 2015-07-01  Joseph Pecoraro  <pecoraro@apple.com>
1212
1213         Web Inspector: [Mac] InspectorFrontendHost.beep() doesn't play a sound, sandbox warnings
1214         https://bugs.webkit.org/show_bug.cgi?id=146525
1215
1216         Reviewed by Timothy Hatcher.
1217
1218         * WebProcess/com.apple.WebProcess.sb.in:
1219         Get NSBeep working without any sandbox warnings.
1220
1221 2015-07-01  Anders Carlsson  <andersca@apple.com>
1222
1223         Remove code to recompute rounded window corners
1224         https://bugs.webkit.org/show_bug.cgi?id=146534
1225
1226         Reviewed by Simon Fraser.
1227
1228         This code is no longer needed since we're always layer-backed now.
1229
1230         * UIProcess/API/mac/WKView.mm:
1231         (-[WKView displayIfNeeded]): Deleted.
1232         (-[WKView _cacheWindowBottomCornerRect]): Deleted.
1233         * UIProcess/API/mac/WKViewInternal.h:
1234
1235 2015-07-01  Yongjun Zhang  <yongjun_zhang@apple.com>
1236
1237         Web page doesn't update its loading state when web process becomes suspended if there are pending network requests (XHR).
1238         https://bugs.webkit.org/show_bug.cgi?id=146439
1239
1240         When web page is loading, we hold a background activity token in NavigationState and we release the token when the page done
1241         loading. A web page can start loading subresources (like XHR) after the page is loaded, and WebPageProxy will update its
1242         _networkRequestsInProgress state which will notify the client there is network actvity on-going. Since we don't hold
1243         the background activity token after page is loaded, the WebContent process could become suspended without notifying the client
1244         and the client will lose track of the loading state.
1245
1246         The first thought was to hold another background activity when _networkRequestsInProgress flag is set in NavigationState.
1247         However, this could result in side-effect that a WebContent process can stay active for too long if there is a long lasting
1248         XHR resquest.
1249         
1250         This patch fix this by notifying the client that network activity is stopped when WebContent process is going to be suspended.
1251         We also cache the networkRequestsInProgress state for suspended process, so that when it becomes foreground, we can tell
1252         the client the correct state of network activity.
1253
1254         Reviewed by Dan Bernstein.
1255
1256         * UIProcess/WebPageProxy.cpp:
1257         (WebKit::WebPageProxy::WebPageProxy): Initialize m_hasNetworkRequestsOnSuspended.
1258         (WebKit::WebPageProxy::processWillBecomeSuspended): If there is pending requests on suspend, cache the network activity state
1259             and notify the client.
1260         (WebKit::WebPageProxy::processWillBecomeForground): Restore the network activity state when the process becomes foreground. 
1261         (WebKit::WebPageProxy::resetState):
1262         * UIProcess/WebPageProxy.h: Add a data member m_hasNetworkRequestsOnSuspended to cache the network activity state on process
1263             suspend.
1264         * UIProcess/WebProcessProxy.cpp:
1265         (WebKit::WebProcessProxy::didSetAssertionState):
1266
1267 2015-07-01  Dean Jackson  <dino@apple.com>
1268
1269         Disable the experimental WebGL2 implementation
1270         https://bugs.webkit.org/show_bug.cgi?id=146526
1271         <rdar://problem/21641235>
1272
1273         Reviewed by Myles Maxfield.
1274
1275         Add (and disable) an ENABLE_WEBGL2 flag.
1276
1277         * Configurations/FeatureDefines.xcconfig:
1278
1279 2015-07-01  Brady Eidson  <beidson@apple.com>
1280
1281         Never try to pass URLs to LaunchServices when they're the same domain as the current URL.
1282         <rdar://problem/20731429> and https://bugs.webkit.org/show_bug.cgi?id=146521
1283
1284         Reviewed by Alex Christensen.
1285
1286         * UIProcess/Cocoa/NavigationState.mm:
1287         (WebKit::tryAppLink): Compare the proposed URL to the current URL to see if they’re in the same domain.
1288         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1289
1290 2015-07-01  Tim Horton  <timothy_horton@apple.com>
1291
1292         WKWebView snapshots have the wrong scale after rotation
1293         https://bugs.webkit.org/show_bug.cgi?id=146476
1294         <rdar://problem/18345247>
1295
1296         Reviewed by Anders Carlsson.
1297
1298         * UIProcess/API/Cocoa/WKWebView.mm:
1299         (-[WKWebView _didCommitLayerTree:]):
1300         "Coordinate" -> "Coordinates".
1301
1302         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
1303         Defer any snapshotting that happens during a resize until after
1304         the resize completes. This will ensure that (in the case of an IOSurface
1305         snapshot) the tiles are up to date, and (in the case of a software snapshot)
1306         that our understanding of the scale and scroll offset of the WKContentView
1307         are up to date, so that we can correctly convert from view to content coordinates
1308         in the UI process.
1309
1310         (-[WKWebView _endAnimatedResize]):
1311         Perform the deferred snapshotting after the resize completes.
1312
1313 2015-07-01  Beth Dakin  <bdakin@apple.com>
1314
1315         This is a quick follow-on to http://trac.webkit.org/changeset/186132
1316
1317         Rubber-stamped by Darin Adler.
1318
1319         Make this a one-liner.
1320         * WebProcess/WebPage/ios/WebPageIOS.mm:
1321         (WebKit::WebPage::getPositionInformation):
1322
1323 2015-07-01  Matthew Daiter  <mdaiter@apple.com>
1324
1325         Enable MEDIA_STREAM flag
1326         https://bugs.webkit.org/show_bug.cgi?id=145947
1327         <rdar://problem/21365829>
1328
1329         Reviewed by Eric Carlson.
1330
1331         * Configurations/FeatureDefines.xcconfig: Add MEDIA_STREAM flag
1332         * WebKit2.xcodeproj/project.pbxproj: Changed some project to private
1333         declarations of headers
1334         * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
1335         * WebProcess/WebPage/WebPage.h:
1336         (WebKit::WebPage::userMediaPermissionRequestManager):
1337
1338 2015-07-01  Brady Eidson  <beidson@apple.com>
1339
1340         Check shouldOpenExternalURLs instead of isProcessingUserGesture before passing URL to LaunchServices.
1341         <rdar://problem/20577859> and https://bugs.webkit.org/show_bug.cgi?id=146513
1342
1343         Reviewed by Darin Adler.
1344
1345         * UIProcess/Cocoa/NavigationState.mm:
1346         (WebKit::tryAppLink): The expected value of isProcessingUserGesture is lost over redirects.
1347           shouldOpenExternalURLs actually fits this role perfectly.
1348
1349 2015-07-01  Michael Catanzaro  <mcatanzaro@igalia.com>
1350
1351         [GTK] [Wayland] Build broken with ENABLE_WAYLAND_TARGET=ON
1352         https://bugs.webkit.org/show_bug.cgi?id=146512
1353
1354         Unreviewed, fix build with ENABLE_WAYLAND_TARGET=ON after r185949.
1355
1356         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1357         (webkitWebViewBaseCreateWebPage):
1358
1359 2015-06-30  Martin Robinson  <mrobinson@igalia.com>
1360
1361         [GTK] REGRESSION(r183936): Test /webkit2/WebKitWebContext/spell-checker fails since r183936
1362         https://bugs.webkit.org/show_bug.cgi?id=144828
1363
1364         Reviewed by Carlos Garcia Campos.
1365
1366         Instead of setting spell checking languages unconditionally when building int
1367         developer mode, add some C API that allows setting them in WebKitTestRunner.
1368
1369         * PlatformGTK.cmake: Add the new C API file to the source list.
1370         * UIProcess/API/C/gtk/WKTextCheckerGtk.cpp:
1371         (WKTextCheckerSetSpellCheckingLanguages): Added this function which allows settings
1372         the spell checking languages from the C API.
1373         * UIProcess/API/C/gtk/WKTextCheckerGtk.h: Added.
1374         * UIProcess/gtk/TextCheckerGtk.cpp:
1375         (WebKit::enchantTextChecker): Remove the hack which sets the spell checking languages automatically
1376         for development builds.
1377
1378 2015-07-01  Joseph Pecoraro  <pecoraro@apple.com>
1379
1380         [Mac] Numerous CGColor leaks in swipe gestures
1381         https://bugs.webkit.org/show_bug.cgi?id=146501
1382
1383         Reviewed by Tim Horton.
1384
1385         * UIProcess/mac/ViewGestureControllerMac.mm:
1386         (WebKit::ViewGestureController::beginSwipeGesture):
1387
1388 2015-07-01  Joseph Pecoraro  <pecoraro@apple.com>
1389
1390         [Mac] Confusing RetainPtr use in TiledCoreAnimationDrawingArea
1391         https://bugs.webkit.org/show_bug.cgi?id=146503
1392
1393         Reviewed by Tim Horton.
1394
1395         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1396         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
1397         Simplify adoption into a new RetainPtr.
1398
1399 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
1400
1401         Fix CoordinatedGraphics.
1402
1403         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1404         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
1405
1406 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
1407
1408         More Gtk/EFL fixing.
1409
1410         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1411         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
1412         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1413         (WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
1414
1415 2015-06-30  Andy VanWagoner  <thetalecrafter@gmail.com>
1416
1417         Implement ECMAScript Internationalization API
1418         https://bugs.webkit.org/show_bug.cgi?id=90906
1419
1420         Reviewed by Benjamin Poulain.
1421
1422         * Configurations/FeatureDefines.xcconfig: add ENABLE_INTL flag
1423
1424 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
1425
1426         Fix Mac and Windows builds.
1427
1428         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1429         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1430
1431 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
1432
1433         [iOS] Missing tiles inside position:fixed on scrolling
1434         https://bugs.webkit.org/show_bug.cgi?id=146485
1435         rdar://problem/21226861
1436
1437         Reviewed by Tim Horton.
1438
1439         Layer flushing adjusts the coverage rect for tiled layers, but does so at times
1440         when position:fixed layers are moved around by the scrolling tree. The computed
1441         coverage rect then doesn't reflect the layer's on-screen position, causing missing
1442         tiles.
1443
1444         Fix by pushing the notion of being in a "stable state" onto FrameView, and passing
1445         that state into the layer flush. When not in a stable state, flushing doesn't change
1446         the visible and coverage rects for layers that are viewport-constrained.
1447
1448         * WebProcess/WebPage/ios/WebPageIOS.mm:
1449         (WebKit::WebPage::updateVisibleContentRects):
1450         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1451         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1452
1453 2015-06-30  Hyungwook Lee  <hyungwook.lee@navercorp.com>
1454
1455         [EFL] Implement ewk_favicon_database_clear() API.
1456         https://bugs.webkit.org/show_bug.cgi?id=146337
1457
1458         Reviewed by Gyuyoung Kim.
1459
1460         We need to provide way to clear favicon data.
1461
1462         * UIProcess/API/efl/ewk_favicon_database.cpp:
1463         (EwkFaviconDatabase::getIconSurfaceSynchronously):
1464         (EwkFaviconDatabase::clearFaviconDatabase):
1465         (EwkFaviconDatabase::iconDataReadyForPageURL):
1466         (ewk_favicon_database_icon_change_callback_del):
1467         (ewk_favicon_database_clear):
1468         * UIProcess/API/efl/ewk_favicon_database.h:
1469         * UIProcess/API/efl/ewk_favicon_database_private.h:
1470         * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
1471         (TEST_F):
1472
1473 2015-06-30  Andreas Kling  <akling@apple.com>
1474
1475         [iOS] Ignore viewport rect changes during zoom bouncing.
1476         <https://webkit.org/b/146480>
1477
1478         Reviewed by Benjamin Poulain.
1479
1480         When the user has pinch-zoomed past the maximum zoom scale and lets go of the screen,
1481         we animate a bounce back to the maximum scale.
1482
1483         Suppress viewport rect updates during this bounce animation since we don't need them
1484         anyway. This fixes an issue where we'd sometimes get a weird rect during the animation
1485         and if could send that to the web process, causing it to generate tiles for a part of
1486         the page that's not actually exposed.
1487
1488         * UIProcess/API/Cocoa/WKWebView.mm:
1489         (-[WKWebView _updateVisibleContentRects]):
1490
1491 2015-06-30  Enrica Casucci  <enrica@apple.com>
1492
1493         <rdar://problem/20655729> WebKit should heuristically exclude scrolling touch events from the user gesture category
1494
1495         Reviewed by Benjamin Poulain.
1496
1497         * Platform/spi/ios/UIKitSPI.h:
1498         * Shared/WebEvent.h:
1499         (WebKit::WebTouchEvent::WebTouchEvent):
1500         (WebKit::WebTouchEvent::position):
1501         (WebKit::WebTouchEvent::isPotentialTap):
1502         (WebKit::WebTouchEvent::isGesture):
1503         (WebKit::WebTouchEvent::gestureScale):
1504         (WebKit::WebTouchEvent::gestureRotation):
1505         * Shared/WebEventConversion.cpp:
1506         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
1507         * Shared/ios/NativeWebTouchEventIOS.mm:
1508         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
1509         * Shared/ios/WebTouchEventIOS.cpp:
1510         (WebKit::WebTouchEvent::encode):
1511         (WebKit::WebTouchEvent::decode):
1512         Pipe isPotentialTap through.
1513
1514 2015-06-30  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1515
1516         [GTK] [EFL] Unreviewed build fix after r186118.
1517
1518         Add if PLATFORM(COCOA) back.
1519
1520         * WebProcess/WebProcess.cpp:
1521         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
1522         * WebProcess/WebProcess.h:
1523
1524 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
1525
1526         Crash under _layoutForNodeHighlight: when inspecting espn.com
1527         https://bugs.webkit.org/show_bug.cgi?id=146422
1528
1529         Reviewed by Joseph Pecoraro.
1530         
1531         When inspecting espn.com, MobileSafari sometimes crashes, because
1532         highlight.quads is empty. I was not able to quickly determine why.
1533
1534         Fix by bailing in this case.
1535
1536         * UIProcess/WKInspectorHighlightView.mm:
1537         (-[WKInspectorHighlightView _layoutForNodeHighlight:]):
1538
1539 2015-06-30  Matt Baker  <mattbaker@apple.com>
1540
1541         Web Inspector: Reduce rendering frames "Other" time by instrumenting compositing
1542         https://bugs.webkit.org/show_bug.cgi?id=146168
1543
1544         Reviewed by Brian Burg.
1545
1546         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1547         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1548         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1549         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1550         Added CA transaction post-commit handlers to instrument end of composite.
1551
1552 2015-06-30  Beth Dakin  <bdakin@apple.com>
1553
1554         The bounds on InteractionInformationAtPosition should be more precise
1555         https://bugs.webkit.org/show_bug.cgi?id=146468
1556         -and corresponding-
1557         rdar://problem/20739834
1558
1559         Reviewed by Enrica Casucci and Simon Fraser.
1560
1561         For links, get the TextQuads from the Range, and for images, look at the 
1562         absoluteContentQuad(). All other items can continue to use absoluteBoundingBox.
1563         * WebProcess/WebPage/ios/WebPageIOS.mm:
1564         (WebKit::WebPage::getPositionInformation):
1565
1566 2015-06-30  Anders Carlsson  <andersca@apple.com>
1567
1568         Disable Spintracer when getting the list of plug-ins
1569         https://bugs.webkit.org/show_bug.cgi?id=146467
1570         rdar://problem/21616640
1571
1572         Reviewed by Tim Horton.
1573
1574         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1575         (WebKit::WebPlatformStrategies::populatePluginCache):
1576
1577 2015-06-30  Anders Carlsson  <andersca@apple.com>
1578
1579         Java Plugin cannot launch JavaUpdater.app after renaming
1580         https://bugs.webkit.org/show_bug.cgi?id=146464
1581         rdar://problem/19747153
1582
1583         Reviewed by Tim Horton.
1584
1585         Check for both "JavaUpdater.app" and "Java Updater.app".
1586
1587         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1588         (WebKit::isJavaUpdaterURL):
1589
1590 2015-06-30  Chris Dumez  <cdumez@apple.com>
1591
1592         [WK2] Avoid taking a useless / blank navigation snapshot when navigating after restoring sessionState
1593         https://bugs.webkit.org/show_bug.cgi?id=146446
1594         <rdar://problem/21584231>
1595
1596         Reviewed by Darin Adler.
1597
1598         We currently take a useless / blank navigation snapshot when navigating
1599         after restoring the back / forward list from a sessionState object.
1600         This is because we get a current HistoryItem from the sessionState
1601         which we have never really navigated to. We then take a navigation
1602         snapshot for the current HistoryItem when navigating away as we usually
1603         do. However, in this case, the HistoryItem was imported and there is
1604         nothing to snapshot.
1605
1606         Taking this snapshot is not only wasteful, it can also potentially
1607         overwrite the snapshot that was set by the client using
1608         WKWebView._saveBackForwardSnapshotForItem() SPI.
1609
1610         To address the problem, this patch suppresses navigation snapshotting
1611         after restoring the back / forward list from a session state and until
1612         the next load is committed.
1613
1614         * UIProcess/WebPageProxy.cpp:
1615         (WebKit::WebPageProxy::recordNavigationSnapshot):
1616         (WebKit::WebPageProxy::restoreFromSessionState):
1617         (WebKit::WebPageProxy::didCommitLoadForFrame):
1618         * UIProcess/WebPageProxy.h:
1619
1620 2015-06-29  Anders Carlsson  <andersca@apple.com>
1621
1622         Get rid of unused WKSI functions
1623         https://bugs.webkit.org/show_bug.cgi?id=146443
1624
1625         Reviewed by Tim Horton.
1626
1627         * UIProcess/API/Cocoa/WKWebView.mm:
1628         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1629         (InitWebCoreSystemInterface): Deleted.
1630         * WebProcess/WebProcess.cpp:
1631         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
1632         * WebProcess/WebProcess.h:
1633         * WebProcess/cocoa/WebProcessCocoa.mm:
1634         (WebKit::WebProcess::destroyRenderingResources):
1635
1636 2015-06-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1637
1638         [GTK] Unreviewed GTK build fix since r186088 and r186095.
1639         https://bugs.webkit.org/show_bug.cgi?id=146449
1640
1641         * PlatformGTK.cmake:
1642         * UIProcess/API/gtk/PageClientImpl.h:
1643
1644 2015-06-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1645
1646         Unreviewed EFL build fix since r186088 and r186095.
1647
1648         * CMakeLists.txt: Remove ConnectionStack.cpp.
1649         * UIProcess/CoordinatedGraphics/WebView.h: Override virtual didFailLoadForMainFrame().
1650
1651 2015-06-29  Brady Eidson  <beidson@apple.com>
1652
1653         Flag sync XHRs from the network process so they can be handled appropriately.
1654         <rdar://problem/21579162> and https://bugs.webkit.org/show_bug.cgi?id=146441
1655
1656         Reviewed by Darin Adler.
1657
1658         * NetworkProcess/NetworkResourceLoader.h:
1659         (WebKit::NetworkResourceLoader::loadingSynchronousXHR): Return isSynchronous().
1660
1661 2015-06-29  Anders Carlsson  <andersca@apple.com>
1662
1663         Remove an empty group from the Xcode project.
1664
1665         * WebKit2.xcodeproj/project.pbxproj:
1666
1667 2015-06-29  Anders Carlsson  <andersca@apple.com>
1668
1669         Get rid of ConnectionStack
1670         https://bugs.webkit.org/show_bug.cgi?id=146437
1671
1672         Reviewed by Andreas Kling.
1673
1674         Just use a TemporaryChange and a static variable instead.
1675
1676         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1677         * PluginProcess/WebProcessConnection.cpp:
1678         (WebKit::WebProcessConnection::setGlobalException):
1679         (WebKit::WebProcessConnection::didReceiveMessage):
1680         (WebKit::WebProcessConnection::didReceiveSyncMessage):
1681         * Shared/ConnectionStack.cpp: Removed.
1682         (WebKit::ConnectionStack::singleton): Deleted.
1683         * Shared/ConnectionStack.h: Removed.
1684         (WebKit::ConnectionStack::current): Deleted.
1685         (WebKit::ConnectionStack::CurrentConnectionPusher::CurrentConnectionPusher): Deleted.
1686         (WebKit::ConnectionStack::CurrentConnectionPusher::~CurrentConnectionPusher): Deleted.
1687         * WebKit2.xcodeproj/project.pbxproj:
1688
1689 2015-06-29  Tim Horton  <timothy_horton@apple.com>
1690
1691         Fix the build.
1692
1693         * UIProcess/API/Cocoa/WKWebView.mm:
1694         (-[WKWebView _didFailLoadForMainFrame]):
1695         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1696         * UIProcess/ios/PageClientImplIOS.h:
1697         * UIProcess/ios/PageClientImplIOS.mm:
1698         (WebKit::PageClientImpl::didFailLoadForMainFrame):
1699
1700 2015-06-29  Dean Jackson  <dino@apple.com>
1701
1702         Temporarily disable PICTURE_SIZES
1703         https://bugs.webkit.org/show_bug.cgi?id=146435
1704         <rdar://problem/21087013>
1705
1706         Temporarily disable PICTURE_SIZES because it causes problems with out
1707         of date <picture> polyfills.
1708
1709         Temporarily disable PICTURE_SIZES until Safari branches.
1710
1711         * Configurations/FeatureDefines.xcconfig:
1712
1713 2015-06-29  Anders Carlsson  <andersca@apple.com>
1714
1715         Don't try to access a possibly deallocated WebFrameProxy object
1716         https://bugs.webkit.org/show_bug.cgi?id=146428
1717         rdar://problem/21446364
1718
1719         Reviewed by Tim Horton.
1720
1721         Make sure to call isMainFrame before calling out to the client inside
1722         WebPageProxy::didFailLoadForFrame, matching what we do for WebPageProxy::didFinishLoadForFrame.
1723
1724         Also, add a ViewGestureController::didFailLoadForMainFrame function and call that instead of
1725         calling didFinishLoadForMainFrame in the failure case.
1726
1727         * UIProcess/API/mac/WKView.mm:
1728         (-[WKView _didFailLoadForMainFrame]):
1729         * UIProcess/API/mac/WKViewInternal.h:
1730         * UIProcess/PageClient.h:
1731         * UIProcess/WebPageProxy.cpp:
1732         (WebKit::WebPageProxy::didFailLoadForFrame):
1733         * UIProcess/ios/ViewGestureControllerIOS.mm:
1734         (WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState):
1735         (WebKit::ViewGestureController::didFinishLoadForMainFrame): Deleted.
1736         * UIProcess/mac/PageClientImpl.h:
1737         * UIProcess/mac/PageClientImpl.mm:
1738         (WebKit::PageClientImpl::didFailLoadForMainFrame):
1739         * UIProcess/mac/ViewGestureController.h:
1740         (WebKit::ViewGestureController::didFinishLoadForMainFrame):
1741         (WebKit::ViewGestureController::didFailLoadForMainFrame):
1742         * UIProcess/mac/ViewGestureControllerMac.mm:
1743         (WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState):
1744         (WebKit::ViewGestureController::didFinishLoadForMainFrame): Deleted.
1745
1746 2015-06-29  Yongjun Zhang  <yongjun_zhang@apple.com>
1747
1748         Disable default gesture recognizers on preview.
1749         https://bugs.webkit.org/show_bug.cgi?id=146424
1750         rdar://problem/21572828
1751
1752         We should disable default gesture recognizers on preview, to avoid activating links or
1753         triggering touch events accidentally. We can enable them after preview finishes.
1754
1755         Reviewed by Beth Dakin.
1756
1757         * UIProcess/ios/WKContentViewInteraction.mm:
1758         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
1759         (-[WKContentView didDismissPreviewViewController:committing:]):
1760
1761 2015-06-27  Ryosuke Niwa  <rniwa@webkit.org>
1762
1763         Font panel doesn't get updated when bolding text via cmd+b in Mail on OS X
1764         https://bugs.webkit.org/show_bug.cgi?id=146379
1765
1766         Reviewed by Darin Adler.
1767
1768         Since font panel doesn't open in WebKit2 at the moment, just add an empty implementation of didApplyStyle
1769
1770         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1771         (WebKit::WebEditorClient::didApplyStyle):
1772         * WebProcess/WebCoreSupport/WebEditorClient.h:
1773         * WebProcess/WebPage/WebPage.h:
1774
1775 2015-06-29  Dean Jackson  <dino@apple.com>
1776
1777         Setting to enable/disable media controls sizing on page zoom
1778         https://bugs.webkit.org/show_bug.cgi?id=146423
1779         <rdar://problem/18379634>
1780
1781         Reviewed by Eric Carlson.
1782
1783         Add a new setting "MediaControlsScaleWithPageZoom" that can disable
1784         the behaviour we currently implement on iOS, where the media controls
1785         attempt to remain at a fixed size independent of page zoom.
1786
1787         * Shared/WebPreferencesDefinitions.h: Initialize to false on iOS, true otherwise.
1788         * UIProcess/API/C/WKPreferences.cpp:
1789         (WKPreferencesSetMediaControlsScaleWithPageZoom):
1790         (WKPreferencesGetMediaControlsScaleWithPageZoom):
1791         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1792         * WebProcess/WebPage/WebPage.cpp:
1793         (WebKit::WebPage::updatePreferences):
1794
1795 2015-06-29  Chris Dumez  <cdumez@apple.com>
1796
1797         [WK2][iOS] Swipe gesture snapshot stays up for 3 seconds when swiping back after top-hit navigation
1798         https://bugs.webkit.org/show_bug.cgi?id=146415
1799         <rdar://problem/21595801>
1800
1801         Reviewed by Tim Horton.
1802
1803         Swipe gesture snapshot previously stayed up for 3 seconds when swiping
1804         back after a top-hit navigation. This is because we do not restore the
1805         scroll position in this case and the ViewGestureController was waiting
1806         for the scroll position to be restored before taking down the snapshot.
1807
1808         This patch adds a fail-safe mechanism so that the WebProcess can let
1809         the UIProcess know (via a CouldNotRestorePageState IPC) that the page
1810         state (including scroll position) could not be restored so that it can
1811         let the ViewGestureController it should not wait for the scroll
1812         position to be restored.
1813
1814         * UIProcess/API/Cocoa/WKWebView.mm:
1815         (-[WKWebView _couldNotRestorePageState]):
1816         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1817         * UIProcess/PageClient.h:
1818         * UIProcess/WebPageProxy.h:
1819         * UIProcess/WebPageProxy.messages.in:
1820         * UIProcess/ios/PageClientImplIOS.h:
1821         * UIProcess/ios/PageClientImplIOS.mm:
1822         (WebKit::PageClientImpl::couldNotRestorePageState):
1823         * UIProcess/ios/WebPageProxyIOS.mm:
1824         (WebKit::WebPageProxy::couldNotRestorePageState):
1825         * WebProcess/WebPage/ios/WebPageIOS.mm:
1826         (WebKit::WebPage::restorePageState):
1827
1828 2015-06-29  Chris Dumez  <cdumez@apple.com>
1829
1830         [WK2][iOS] Add WKWebView private API to save a back/forward snapshot
1831         https://bugs.webkit.org/show_bug.cgi?id=146398
1832         <rdar://problem/21584231>
1833
1834         Reviewed by Dan Bernstein.
1835
1836         Add WKWebView private API to save a back/forward snapshot so that the
1837         client can make sure a back/forward snapshot is available even when
1838         swapping WKWebView upon navigation.
1839
1840         This matches the WKView.saveBackForwardSnapshotForItem API we have on
1841         Mac.
1842
1843         * UIProcess/API/Cocoa/WKWebView.mm:
1844         (-[WKWebView saveBackForwardSnapshotForItem:]):
1845         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1846
1847 2015-06-29  Anders Carlsson  <andersca@apple.com>
1848
1849         Use DISPATCH_SOURCE_TYPE_MEMORYPRESSURE instead of DISPATCH_SOURCE_TYPE_MEMORYSTATUS
1850         https://bugs.webkit.org/show_bug.cgi?id=146413
1851
1852         Reviewed by Andreas Kling.
1853
1854         Replace SPI with API.
1855
1856         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
1857         (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
1858         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1859         (InitWebCoreSystemInterface): Deleted.
1860
1861 2015-06-29  Enrica Casucci  <enrica@apple.com>
1862
1863         [iOS] Hardware Keyboard: All combinations of arrow keys and space key do not scroll the view.
1864         https://bugs.webkit.org/show_bug.cgi?id=146290
1865         rdar://problem/18466015
1866
1867         We don't normally get called by the keyboard to handle the event if we are not
1868         interacting with editable content. In order to receive all the hardware keyboard events
1869         we need to implement _handleKeyUIEvent which is called for every key event
1870         when the view is first responder. This gives us the opportunity to send each keystroke
1871         to the WebProcess to let any Javascript handler intercept it and then perform the default
1872         action for the key combination.
1873         Unfortunately this mechanism does not provide key repeat, which is implemented in the
1874         keyboard layer. In order to have it at least for the arrow keys, we use the keyCommands
1875         mechanism only for those.
1876
1877         Reviewed by Darin Adler.
1878
1879         * Platform/spi/ios/UIKitSPI.h:
1880         * UIProcess/API/Cocoa/WKWebView.mm:
1881         (-[WKWebView _scrollByOffset:]):
1882         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1883         * UIProcess/ios/WKContentViewInteraction.mm:
1884         (-[WKContentView canPerformAction:withSender:]):
1885         (-[WKContentView keyCommands]):
1886         (-[WKContentView _arrowKey:]):
1887         (-[WKContentView _handleKeyUIEvent:]):
1888         (-[WKContentView handleKeyEvent:]):
1889         (-[WKContentView handleKeyWebEvent:]):
1890         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
1891
1892 2015-06-28  Dan Bernstein  <mitz@apple.com>
1893
1894         Fixed the iOS 8.x build after r186066.
1895
1896         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1897         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1898         (WebKit::WebVideoFullscreenManagerProxy::create):
1899
1900 2015-06-28  Dan Bernstein  <mitz@apple.com>
1901
1902         Fixed the iOS build after r186059.
1903
1904         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1905
1906 2015-06-28  Chris Fleizach  <cfleizach@apple.com>
1907
1908         AX: iOS: Crash at accessibilityObjectForMainFramePlugin()
1909         https://bugs.webkit.org/show_bug.cgi?id=146399
1910
1911         Reviewed by Darin Adler.
1912
1913         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
1914         it has not been initialized.
1915
1916         * WebProcess/WebPage/ios/WebPageIOS.mm:
1917         (WebKit::WebPage::accessibilityObjectForMainFramePlugin):
1918
1919 2015-06-28  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1920
1921         Use Ref/RefPtr instead of PassRefPtr in WebKit2
1922         https://bugs.webkit.org/show_bug.cgi?id=146190
1923
1924         Reviewed by Darin Adler.
1925
1926         As a step to remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
1927
1928         * Shared/API/c/WKContextMenuItem.cpp:
1929         (WKContextMenuItemCreateAsAction):
1930         (WKContextMenuItemCreateAsCheckableAction):
1931         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
1932         (WebKit::WebCoordinatedSurface::create):
1933         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
1934         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
1935         (WebKit::ThreadSafeCoordinatedSurface::create):
1936         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h:
1937         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1938         (WebKit::ThreadedCompositor::create):
1939         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
1940         * Shared/Plugins/NPRemoteObjectMap.cpp:
1941         (WebKit::NPRemoteObjectMap::create):
1942         * Shared/Plugins/NPRemoteObjectMap.h:
1943         * Shared/WebBatteryStatus.h:
1944         (WebKit::WebBatteryStatus::create):
1945         * Shared/WebCertificateInfo.h:
1946         (WebKit::WebCertificateInfo::create):
1947         * Shared/WebContextMenuItem.h:
1948         (WebKit::WebContextMenuItem::create):
1949         * Shared/WebRenderObject.cpp:
1950         (WebKit::WebRenderObject::create):
1951         * Shared/WebRenderObject.h:
1952         (WebKit::WebRenderObject::create):
1953         * UIProcess/API/APINavigationData.h:
1954         (API::NavigationData::create):
1955         * UIProcess/API/APISession.cpp:
1956         (API::Session::createEphemeral):
1957         * UIProcess/API/APISession.h:
1958         * UIProcess/API/APISessionState.cpp:
1959         (API::SessionState::create):
1960         * UIProcess/API/APISessionState.h:
1961         * UIProcess/API/APIUserScript.h:
1962         * UIProcess/API/APIWebsiteDataStore.cpp:
1963         (API::WebsiteDataStore::createNonPersistentDataStore):
1964         (API::WebsiteDataStore::create):
1965         * UIProcess/API/APIWebsiteDataStore.h:
1966         * UIProcess/API/C/WKCredential.cpp:
1967         (WKCredentialCreate):
1968         (WKCredentialCreateWithCertificateInfo):
1969         * UIProcess/API/C/WKPage.cpp:
1970         (WKPageCopySessionState):
1971         (WKPageSetPageContextMenuClient):
1972         * UIProcess/API/C/WKSessionStateRef.cpp:
1973         (WKSessionStateCreateFromData):
1974         * UIProcess/API/C/WKUserScriptRef.cpp:
1975         (WKUserScriptCreateWithSource):
1976         * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
1977         (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]):
1978         * UIProcess/API/Cocoa/WKProcessGroup.mm:
1979         (-[WKProcessGroup _setAllowsSpecificHTTPSCertificate:forHost:]):
1980         * UIProcess/API/Cocoa/WKProcessPool.mm:
1981         (-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]):
1982         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1983         (+[WKWebsiteDataStore nonPersistentDataStore]):
1984         * UIProcess/API/efl/ewk_auth_request_private.h:
1985         (EwkAuthRequest::create):
1986         * UIProcess/API/efl/ewk_back_forward_list_item_private.h:
1987         (EwkBackForwardListItem::create):
1988         * UIProcess/API/efl/ewk_context.cpp:
1989         (EwkContext::create):
1990         * UIProcess/API/efl/ewk_context_menu_private.h:
1991         (EwkContextMenu::create):
1992         * UIProcess/API/efl/ewk_download_job_private.h:
1993         (EwkDownloadJob::create):
1994         * UIProcess/API/efl/ewk_file_chooser_request_private.h:
1995         (EwkFileChooserRequest::create):
1996         * UIProcess/API/efl/ewk_form_submission_request_private.h:
1997         (EwkFormSubmissionRequest::create):
1998         * UIProcess/API/efl/ewk_navigation_data_private.h:
1999         (EwkNavigationData::create):
2000         * UIProcess/API/efl/ewk_security_origin_private.h:
2001         (EwkSecurityOrigin::create):
2002         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
2003         (WebKit::AuthenticationChallengeProxy::create):
2004         * UIProcess/Authentication/AuthenticationDecisionListener.h:
2005         (WebKit::AuthenticationDecisionListener::create):
2006         * UIProcess/Authentication/WebCredential.h:
2007         (WebKit::WebCredential::create):
2008         * UIProcess/Authentication/WebProtectionSpace.h:
2009         (WebKit::WebProtectionSpace::create):
2010         * UIProcess/Cocoa/NavigationState.mm:
2011         (WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
2012         * UIProcess/Databases/DatabaseProcessProxy.cpp:
2013         (WebKit::DatabaseProcessProxy::create):
2014         * UIProcess/Databases/DatabaseProcessProxy.h:
2015         * UIProcess/Launcher/ProcessLauncher.h:
2016         (WebKit::ProcessLauncher::create):
2017         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2018         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2019         (WebKit::WebNotificationManagerProxy::create):
2020         * UIProcess/Notifications/WebNotificationManagerProxy.h:
2021         * UIProcess/Plugins/PluginProcessProxy.cpp:
2022         (WebKit::PluginProcessProxy::create):
2023         * UIProcess/Plugins/PluginProcessProxy.h:
2024         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
2025         (WebKit::RemoteScrollingTree::create):
2026         * UIProcess/Scrolling/RemoteScrollingTree.h:
2027         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2028         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::create):
2029         * UIProcess/WebProcessPool.cpp:
2030         (WebKit::WebProcessPool::WebProcessPool):
2031         * UIProcess/efl/WebPopupMenuListenerEfl.h:
2032         (WebKit::WebPopupMenuListenerEfl::create):
2033         * UIProcess/efl/WebViewEfl.cpp:
2034         (WebKit::WebView::create):
2035         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2036         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2037         (WebKit::WebVideoFullscreenManagerProxy::create):
2038
2039 2015-06-28  Dan Bernstein  <mitz@apple.com>
2040
2041         [Cocoa] Remove _WKSecurityOrigin.{h,mm}
2042         https://bugs.webkit.org/show_bug.cgi?id=146402
2043
2044         Reviewed by Sam Weinig.
2045
2046         * UIProcess/API/Cocoa/WKSecurityOrigin.mm: Declare and define _WKSecurityOrigin here.
2047         (-[WKSecurityOrigin methodSignatureForSelector:]): Moved into a WKBinaryCompatibility
2048         category.
2049         (-[WKSecurityOrigin forwardInvocation:]): Ditto.
2050         * UIProcess/API/Cocoa/_WKSecurityOrigin.h: Removed.
2051         * UIProcess/API/Cocoa/_WKSecurityOrigin.mm: Removed.
2052         * WebKit2.xcodeproj/project.pbxproj: Removed references to _WKSecurityOrigin.{h,mm}.
2053
2054 2015-06-28  Dan Bernstein  <mitz@apple.com>
2055
2056         Tried to fix the EFL buid after r186046.
2057
2058         * UIProcess/efl/PageUIClientEfl.cpp:
2059         (WebKit::PageUIClientEfl::PageUIClientEfl):
2060
2061 2015-06-28  Dan Bernstein  <mitz@apple.com>
2062
2063         <rdar://problem/21581792> REGRESSION (r185915): Source-incompatible change in WKPageUIClient
2064         https://bugs.webkit.org/show_bug.cgi?id=146396
2065
2066         Reviewed by Anders Carlsson.
2067
2068         * UIProcess/API/C/WKPageUIClient.h: Renamed
2069         runJavaScript{Alert,Confirm,Prompt}_deprecatedForUseWithV0 back to runJavaScript{Alert,Confirm,Prompt}
2070         in client versions prior to V5.
2071
2072 2015-06-28  Tim Horton  <timothy_horton@apple.com>
2073
2074         REGRESSION: Page footers are displayed above the bottom of the WebView due to tiled scaling
2075         https://bugs.webkit.org/show_bug.cgi?id=146393
2076         <rdar://problem/21113217>
2077
2078         Reviewed by Sam Weinig.
2079
2080         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2081         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
2082         Don't include the top content inset in the layout size.
2083
2084 2015-06-26  Antti Koivisto  <antti@apple.com>
2085
2086         Make NetworkCache::traverse faster
2087         https://bugs.webkit.org/show_bug.cgi?id=146354
2088
2089         Reviewed by Anders Carlsson.
2090
2091         * NetworkProcess/cache/NetworkCacheIOChannel.h:
2092         (WebKit::NetworkCache::IOChannel::path):
2093         (WebKit::NetworkCache::IOChannel::type):
2094         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
2095         (WebKit::NetworkCache::IOChannel::open):
2096         (WebKit::NetworkCache::IOChannel::read):
2097         (WebKit::NetworkCache::IOChannel::write):
2098         (WebKit::NetworkCache::IOChannel::readSync): Deleted.
2099
2100             Not needed anymore.
2101
2102         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2103         (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
2104         (WebKit::NetworkCache::Storage::TraverseOperation::TraverseOperation):
2105
2106             Add TraverseOperation, similar to Read/Write.
2107
2108         (WebKit::NetworkCache::Storage::open):
2109         (WebKit::NetworkCache::Storage::traverse):
2110
2111             Use async I/O.
2112             Use condition variable to allow maximum 5 parallel file reads.
2113
2114         * NetworkProcess/cache/NetworkCacheStorage.h:
2115
2116 2015-06-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2117
2118         [SOUP] NetworkCache: Make NetworkProcess::clearDiskCache actually clear the the resources depending on the date
2119         https://bugs.webkit.org/show_bug.cgi?id=146316
2120
2121         Reviewed by Sergio Villar Senin.
2122
2123         And make sure the completion handler is called, as well. This
2124         functionality is already implemented in Storage::clear(), so we
2125         just need to pass the time point and completion handler to Cache::clear().
2126
2127         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2128         (WebKit::NetworkProcess::clearDiskCache):
2129
2130 2015-06-26  Beth Dakin  <bdakin@apple.com>
2131
2132         Rubber-stamped by Tim Horton.
2133
2134         As Dan pointed out in https://bugs.webkit.org/show_bug.cgi?id=146350 , this way of  
2135         getting the screen size was problematic on multiple counts. Fixed here by using 
2136         UIScreen. 
2137         * UIProcess/WKImagePreviewViewController.mm:
2138         (-[WKImagePreviewViewController initWithCGImage:]):
2139
2140 2015-06-26  Beth Dakin  <bdakin@apple.com>
2141
2142         WebPage::getPositionInformation() should not copy an image that is larger than the  
2143         screen
2144         https://bugs.webkit.org/show_bug.cgi?id=146367
2145
2146         Reviewed by Tim Horton.
2147
2148         Maintain aspectRatio, but scale down the buffer size if the image is larger than 
2149         the screen.
2150         * WebProcess/WebPage/ios/WebPageIOS.mm:
2151         (WebKit::WebPage::getPositionInformation):
2152
2153 2015-06-26  Mark Lam  <mark.lam@apple.com>
2154
2155         Re-instating the #import and assertion removed in r186014.
2156         https://bugs.webkit.org/show_bug.cgi?id=146358
2157
2158         Not reviewed.
2159
2160         * UIProcess/API/Cocoa/WKUserContentController.mm:
2161         - Speculative fix: should have used <wtf/MainThread.h> instead of <WTF/MainThread.h>.
2162
2163 2015-06-26  Mark Lam  <mark.lam@apple.com>
2164
2165         Gardening: remove an assertion and a #import to green the bot.
2166         https://bugs.webkit.org/show_bug.cgi?id=146358
2167
2168         Not reviewed.
2169
2170         * UIProcess/API/Cocoa/WKUserContentController.mm:
2171         - Not sure why the <WTF/MainThread.h> cannot be found on some bots, but I'm
2172           removing it (and the assertion that needed it) for now while I investigate
2173           further.
2174
2175 2015-06-26  Mark Lam  <mark.lam@apple.com>
2176
2177         ScriptMessageHandlerDelegate::didPostMessage() should reuse its JSContext instance.
2178         https://bugs.webkit.org/show_bug.cgi?id=146358
2179
2180         Reviewed by Anders Carlsson.
2181
2182         Currently, ScriptMessageHandlerDelegate::didPostMessage() creates a new JSContext each
2183         time it is called.  This JSContext is used only once to deserialized a JSON object
2184         and then destroyed.  We will change ScriptMessageHandlerDelegate to cache the JSContext
2185         and reuse it in all subsequent calls to didPostMessage().
2186
2187         Also added a @autoreleasepool scope in didPostMessage() so that transient ObjC objects
2188         will be release sooner.
2189
2190         * UIProcess/API/Cocoa/WKUserContentController.mm:
2191
2192 2015-06-26  Beth Dakin  <bdakin@apple.com>
2193
2194         Add support for image previews
2195         https://bugs.webkit.org/show_bug.cgi?id=146350
2196         -and corresponding-
2197         rdar://problem/20640234
2198
2199         Reviewed by Tim Horton.
2200
2201         For images, use the actual image instead of a snapshot.
2202         * WebProcess/WebPage/ios/WebPageIOS.mm:
2203         (WebKit::WebPage::getPositionInformation):
2204
2205         ViewController for image preview.
2206         * UIProcess/WKImagePreviewViewController.h: Added.
2207         * UIProcess/WKImagePreviewViewController.mm: Added.
2208         (-[WKImagePreviewViewController loadView]):
2209         (-[WKImagePreviewViewController initWithCGImage:]):
2210         (-[WKImagePreviewViewController viewDidLayoutSubviews]):
2211         (_scaleSizeWithinSize):
2212
2213         New enum and member variable to keep track of preview type.
2214         * UIProcess/ios/WKContentViewInteraction.h:
2215         * UIProcess/ios/WKContentViewInteraction.mm:
2216
2217         Only apply the http restriction to non-image links since we can still preview the 
2218         image of a non-http image link.
2219         (-[WKContentView gestureRecognizerShouldBegin:]):
2220
2221         Handle links and images.
2222         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
2223
2224         Return early for non-link previews.
2225         (-[WKContentView commitPreviewViewController:]):
2226
2227         New files.
2228         * WebKit2.xcodeproj/project.pbxproj:
2229
2230         Just use the actual image in the PositionInformation for image elements rather 
2231         than taking a screen shot.
2232         * WebProcess/WebPage/ios/WebPageIOS.mm:
2233         (WebKit::WebPage::getPositionInformation):
2234
2235 2015-06-26  Matt Rajca  <mrajca@apple.com>
2236
2237         Wireless Playback Target-related #import should be a #include
2238         https://bugs.webkit.org/show_bug.cgi?id=146283
2239
2240         Reviewed by Eric Carlson.
2241
2242         * Shared/WebCoreArgumentCoders.cpp:
2243
2244 2015-06-25  Joseph Pecoraro  <pecoraro@apple.com>
2245
2246         Web Inspector: Add Support for OS X Full Screen Mode
2247         https://bugs.webkit.org/show_bug.cgi?id=123510
2248
2249         Reviewed by Timothy Hatcher.
2250
2251         * UIProcess/mac/WebInspectorProxyMac.mm:
2252         (WebKit::WebInspectorProxy::createInspectorWindow):
2253         Allow full screen.
2254
2255 2015-06-25  Hyungwook Lee  <hyungwook.lee@navercorp.com>
2256
2257         [EFL] Make send / receive messages to communicate the Web and UI Processes using Injected Bundle.
2258         https://bugs.webkit.org/show_bug.cgi?id=145685
2259
2260         Reviewed by Gyuyoung Kim.
2261
2262         To have extensible port specific API facility using Injected Bundle,
2263         we need to load libewebkit_extension_manager.so in default that is same as what gtk port does.
2264
2265         * UIProcess/API/efl/ewk_context.cpp:
2266         (EwkContext::EwkContext):
2267         (EwkContext::findOrCreateWrapper):
2268         (bundlePathForExtension):
2269         (EwkContext::create):
2270         (EwkContext::allowSpecificHTTPSCertificateForHost):
2271         (EwkContext::isDefaultBundle):
2272         (ewk_context_default_get):
2273         * UIProcess/API/efl/ewk_context_private.h:
2274         * WebProcess/efl/ExtensionManagerEfl.cpp:
2275         (WebKit::ExtensionManagerEfl::initialize):
2276
2277 2015-06-25  Simon Fraser  <simon.fraser@apple.com>
2278
2279         [iOS WK2] Swiping back just after scrolling can cause some tiles to disappear
2280         https://bugs.webkit.org/show_bug.cgi?id=146329
2281         rdar://problem/21233010
2282
2283         Reviewed by Tim Horton.
2284         
2285         When doing a back swipe, views interposed between the WKWebView and the WKContentView
2286         get positions and animations for the swipe. This -_updateVisibleContentRects to
2287         compute bad visible and unobscured rects, so we lose tiles.
2288         
2289         Fix by "freezing" the visible and unobscured content rects in the view being
2290         swiped for the duration of the navigation gesture. When swiping the main view,
2291         we just plumb through navigationGestureDidEnd(). When Reader is showing and the
2292         swiped view is different from the navigating view, use the new navigationGestureDidEnd()
2293         override which takes no arguments.
2294
2295         * UIProcess/API/Cocoa/WKWebView.mm:
2296         (-[WKWebView _updateVisibleContentRects]):
2297         (-[WKWebView _navigationGestureDidBegin]):
2298         (-[WKWebView _navigationGestureDidEnd]):
2299         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2300         * UIProcess/API/gtk/PageClientImpl.cpp:
2301         (WebKit::PageClientImpl::navigationGestureDidEnd):
2302         * UIProcess/API/gtk/PageClientImpl.h:
2303         * UIProcess/CoordinatedGraphics/WebView.h:
2304         * UIProcess/PageClient.h:
2305         * UIProcess/WebPageProxy.cpp:
2306         (WebKit::WebPageProxy::navigationGestureDidEnd):
2307         * UIProcess/WebPageProxy.h:
2308         * UIProcess/ios/PageClientImplIOS.h:
2309         * UIProcess/ios/PageClientImplIOS.mm:
2310         (WebKit::PageClientImpl::navigationGestureDidBegin):
2311         (WebKit::PageClientImpl::navigationGestureDidEnd):
2312         * UIProcess/ios/ViewGestureControllerIOS.mm:
2313         (WebKit::ViewGestureController::beginSwipeGesture):
2314         (WebKit::ViewGestureController::endSwipeGesture):
2315         * UIProcess/mac/PageClientImpl.h:
2316         * UIProcess/mac/PageClientImpl.mm:
2317         (WebKit::PageClientImpl::navigationGestureDidEnd):
2318
2319 2015-06-25  Joseph Pecoraro  <pecoraro@apple.com>
2320
2321         [Mac] Web Inspector: Window dragging on toolbar should behave more like native window dragging
2322         https://bugs.webkit.org/show_bug.cgi?id=146324
2323
2324         Reviewed by Timothy Hatcher.
2325
2326         * UIProcess/API/mac/WKViewInternal.h:
2327         * UIProcess/API/mac/WKView.mm:
2328         (-[WKView _startWindowDrag]):
2329         Add a way to start a window drag from a WKView using the most
2330         recent mouse down event.
2331
2332         * WebProcess/WebPage/WebInspectorUI.h:
2333         * WebProcess/WebPage/WebInspectorUI.cpp:
2334         (WebKit::WebInspectorUI::startWindowDrag):
2335         Send a message that we should start a window drag.
2336
2337         * UIProcess/WebInspectorProxy.messages.in:
2338         * UIProcess/WebInspectorProxy.h:
2339         * UIProcess/WebInspectorProxy.cpp:
2340         (WebKit::WebInspectorProxy::startWindowDrag):
2341         (WebKit::WebInspectorProxy::platformStartWindowDrag):
2342         * UIProcess/efl/WebInspectorProxyEfl.cpp:
2343         (WebKit::WebInspectorProxy::platformStartWindowDrag):
2344         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2345         (WebKit::WebInspectorProxy::platformStartWindowDrag):
2346         * UIProcess/mac/WebInspectorProxyMac.mm:
2347         (WebKit::WebInspectorProxy::platformStartWindowDrag):
2348         Let the platform start a window drag. Only implemented by Mac.
2349
2350 2015-06-25  Tim Horton  <timothy_horton@apple.com>
2351
2352         [iOS] When using the back swipe gesture in Safari, the previous webpage will flash for a second
2353         https://bugs.webkit.org/show_bug.cgi?id=146326
2354         <rdar://problem/17811304>
2355
2356         Reviewed by Dean Jackson.
2357
2358         * UIProcess/DrawingAreaProxy.h:
2359         (WebKit::DrawingAreaProxy::hideContentUntilPendingUpdate):
2360         (WebKit::DrawingAreaProxy::hideContentUntilAnyUpdate):
2361         (WebKit::DrawingAreaProxy::hideContentUntilNextUpdate): Deleted.
2362         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2363         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2364         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2365         (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilPendingUpdate):
2366         (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilAnyUpdate):
2367         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): Deleted.
2368         (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate): Deleted.
2369         Make it possible to distinguish between hiding the content until *any* commit
2370         comes in (for example, when we're coming back from being suspended and don't want
2371         to show anything until we are sure all the layers are valid) and hiding the content
2372         until the currently pending commit corresponding to the current state in the UI process
2373         has arrived (which is what we want when e.g. hiding content after a gesture navigation
2374         and not showing it until the commit including the navigation lands).
2375
2376         * UIProcess/API/Cocoa/WKWebView.mm:
2377         (-[WKWebView _hideContentUntilNextUpdate]):
2378         * UIProcess/ios/WKContentView.mm:
2379         (-[WKContentView _applicationWillEnterForeground]):
2380         Make use of "hideContentUntilAnyUpdate".
2381
2382         * UIProcess/ios/ViewGestureControllerIOS.mm:
2383         (WebKit::ViewGestureController::endSwipeGesture):
2384         Make use of "hideContentUntilPendingUpdate".
2385
2386 2015-06-25  Tim Horton  <timothy_horton@apple.com>
2387
2388         Viewport units are wrong when scaled in 2-up mode, cause content to hop around on apple.com/music
2389         https://bugs.webkit.org/show_bug.cgi?id=146322
2390         <rdar://problem/21413884>
2391
2392         Reviewed by Simon Fraser.
2393
2394         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2395         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
2396         Inflate the fixed layout height (by the viewScale) so that it's the size of the view.
2397
2398 2015-06-25  Chris Dumez  <cdumez@apple.com>
2399
2400         [WK2][iOS] Drop WebKitNetworkCacheTemporarilyDisabledForTesting NSUserDefaults
2401         https://bugs.webkit.org/show_bug.cgi?id=146323
2402         <rdar://problem/21552370>
2403
2404         Reviewed by Antti Koivisto.
2405
2406         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2407         (WebKit::WebProcessPool::isNetworkCacheEnabled):
2408
2409 2015-06-25  Tim Horton  <timothy_horton@apple.com>
2410
2411         Crash in ViewGestureController::didRestoreScrollPosition() running WKWebView.LoadAlternateHTMLStringFromProvisionalLoadError test
2412         https://bugs.webkit.org/show_bug.cgi?id=146309
2413         <rdar://problem/21476651>
2414
2415         Reviewed by Dan Bernstein.
2416
2417         * UIProcess/API/Cocoa/WKWebView.mm:
2418         (-[WKWebView _didCommitLayerTree:]):
2419         Null-check. _gestureController can be null if allowsBackForwardNavigationGestures is NO.
2420
2421 2015-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2422
2423         [GTK] Add initial WebKitWebsiteDataManager API for process configuration options
2424         https://bugs.webkit.org/show_bug.cgi?id=146149
2425
2426         Reviewed by Sergio Villar Senin.
2427
2428         Add WebKitWebsiteDataManager to replace the different ways we have
2429         to configure data store
2430         directories. WebKitWebContext:indexed-db-directory property has
2431         been removed, since it was added only in trunk, and
2432         WebKitWebContext:local-storage-directory has been deprecated. The
2433         method webkit_web_context_set_disk_cache_directory() has been
2434         deprecated too in favor of WebKitWebsiteDataManager.
2435
2436         * PlatformGTK.cmake: Add new files to compilation.
2437         * UIProcess/API/gtk/WebKitPrivate.h: Move networkCacheSubdirectory
2438         definition here.
2439         * UIProcess/API/gtk/WebKitWebContext.cpp:
2440         (webkitWebContextGetProperty): Replace indexed-db-directory getter
2441         with website-data-manager one.
2442         (webkitWebContextSetProperty): Replace indexed-db-directory setter
2443         with website-data-manager one.
2444         (webkitWebContextConstructed): Use the user provided
2445         WebKitWebsiteDataManager to configure the context or create a
2446         default WebKitWebsiteDataManager if not provided.
2447         (webkit_web_context_class_init): Replace indexed-db-directory
2448         property with website-data-manager.
2449         (webkit_web_context_new_with_website_data_manager):
2450         (webkit_web_context_get_website_data_manager):
2451         (webkitWebContextCreatePageForWebView): Get the WebsiteDataStore
2452         from the WebKitWebsiteDataManager.
2453         * UIProcess/API/gtk/WebKitWebContext.h:
2454         * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp: Added.
2455         (webkitWebsiteDataManagerGetProperty):
2456         (webkitWebsiteDataManagerSetProperty):
2457         (webkit_website_data_manager_class_init):
2458         (webkitWebsiteDataManagerCreate):
2459         (webkitWebsiteDataManagerGetDataStore):
2460         (webkit_website_data_manager_new):
2461         (webkit_website_data_manager_get_local_storage_directory):
2462         (webkit_website_data_manager_get_disk_cache_directory):
2463         (webkit_website_data_manager_get_offline_application_cache_directory):
2464         (webkit_website_data_manager_get_indexeddb_directory):
2465         (webkit_website_data_manager_get_websql_directory):
2466         * UIProcess/API/gtk/WebKitWebsiteDataManager.h: Added.
2467         * UIProcess/API/gtk/WebKitWebsiteDataManagerPrivate.h: Added.
2468         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
2469         * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Add webkit_website_data_manager_get_type.
2470         * UIProcess/API/gtk/webkit2.h: Include WebKitWebsiteDataManager.h.
2471
2472 2015-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2473
2474         [GTK] Do not use legacy data store options in WebKit2 GTK+ API
2475         https://bugs.webkit.org/show_bug.cgi?id=146145
2476
2477         Reviewed by Gustavo Noronha Silva.
2478
2479         Use a custom WebsiteDataStore in WebKitWebContext, configured with
2480         the context options, and passed to every page created. This is in
2481         preparation for exposing WebsiteDataStore in the public API.
2482
2483         * PlatformGTK.cmake: Add APIWebsiteDataStore.cpp to compilation.
2484         * UIProcess/API/APIWebsiteDataStore.cpp:
2485         * UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp:
2486         (API::WebsiteDataStore::defaultApplicationCacheDirectory):
2487         (API::WebsiteDataStore::defaultNetworkCacheDirectory):
2488         (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
2489         (API::WebsiteDataStore::defaultLocalStorageDirectory):
2490         (API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
2491         (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
2492         (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
2493         (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
2494         (API::WebsiteDataStore::defaultDataStoreConfiguration):
2495         * UIProcess/API/gtk/WebKitWebContext.cpp:
2496         (websiteDataStoreConfigurationForWebProcessPoolConfiguration):
2497         Helper function to create the WebsiteDataStore configuration with
2498         the WebProcessPool configuration options.
2499         (webkitWebContextConstructed): Do not create a
2500         WebProcessPoolConfiguration with legacy options and create a WebsiteDataStore.
2501         (webkitWebContextCreatePageForWebView): Set the WebsiteDataStore
2502         and session ID in web page configuration.
2503         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2504         (webkitWebViewBaseCreate): Create a WebPageConfiguration for the
2505         given options and pass it to webkitWebViewBaseCreateWebPage.
2506         (webkitWebViewBaseCreateWebPage): It receives now a
2507         WebPageConfiguration, instead of creating it based on the given parameters.
2508         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2509         * UIProcess/gtk/WebProcessPoolGtk.cpp: Use WebsiteDataStore default configuration.
2510         (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
2511         (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
2512         (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
2513         (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
2514         (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
2515         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
2516
2517 2015-06-24  Anders Carlsson  <andersca@apple.com>
2518
2519         Detect view services by using the "com.apple.UIKit.vends-view-services" entitlement
2520         https://bugs.webkit.org/show_bug.cgi?id=146301
2521
2522         Reviewed by Tim Horton.
2523
2524         * UIProcess/ApplicationStateTracker.mm:
2525         (WebKit::hasEntitlement):
2526         (WebKit::isViewService):
2527
2528 2015-06-24  Anders Carlsson  <andersca@apple.com>
2529
2530         WebContent process is unreponsive/idle when WKWebView is inside a view service.
2531         https://bugs.webkit.org/show_bug.cgi?id=146296
2532
2533         Reviewed by Tim Horton.
2534
2535         * Platform/spi/ios/AssertionServicesSPI.h: Renamed from Source/WebKit2/Platform/spi/ios/BKSProcessAssertionSPI.h.
2536         Rename this and add SPI for BKSApplicationStateMonitor.
2537
2538         * Platform/spi/ios/UIKitSPI.h:
2539         Add _UIApplicationIsExtension SPI.
2540
2541         * UIProcess/ApplicationStateTracker.mm:
2542         (WebKit::isViewService):
2543         Return whether we're an extension or the safari view controller service.
2544
2545         (WebKit::isBackgroundState):
2546         Helper function that returns whether a given BKSApplicationState is a background state.
2547
2548         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
2549         If we're a view service, create a BKSApplicationStateMonitor and listen for state changes for our pid.
2550
2551         * UIProcess/ios/ProcessAssertionIOS.mm:
2552         Update #import.
2553
2554         * WebKit2.xcodeproj/project.pbxproj:
2555         Update for rename.
2556
2557 2015-06-24  Matt Rajca  <mrajca@apple.com>
2558
2559         MediaSession: propagate MediaSessionMetadata to WebPageProxy
2560         https://bugs.webkit.org/show_bug.cgi?id=146282
2561
2562         Reviewed by Darin Adler and Tim Horton.
2563
2564         * Shared/WebCoreArgumentCoders.cpp: Added ArgumentEncoder support for MediaSessionMetadata so we can send it
2565           through the web page proxy.
2566         (IPC::ArgumentCoder<MediaSessionMetadata>::encode):
2567         (IPC::ArgumentCoder<MediaSessionMetadata>::decode):
2568         * Shared/WebCoreArgumentCoders.h:
2569         * UIProcess/WebPageProxy.cpp:
2570         (WebKit::WebPageProxy::mediaSessionMetadataDidChange):
2571         * UIProcess/WebPageProxy.h: Receive mediaSessionMetadataDidChange in the web page proxy.
2572         * UIProcess/WebPageProxy.messages.in: Added a new MediaSessionMetadataDidChange message.
2573         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2574         (WebKit::WebChromeClient::mediaSessionMetadataDidChange): Push a mediaSessionMetadataDidChange message through the web page proxy.
2575         * WebProcess/WebCoreSupport/WebChromeClient.h:
2576
2577 2015-06-24  Said Abou-Hallawa  <sabouhallawa@apple.com>
2578
2579         [Mac] A checkmark is briefly visible next to the webpage context menu items when they're clicked
2580         https://bugs.webkit.org/show_bug.cgi?id=146284
2581         <rdar://problem/20297182>
2582
2583         Reviewed by Darin Adler.
2584         
2585         The default value of [NSPopUpButtonCell altersStateOfSelectedItem] is YES.
2586         This makes the popup menu items checkable by default. We need to change the
2587         value of this attribute to NO when creating the popup menu, so the items
2588         are uncheckable. The value of this property needs to change back to YES
2589         if context menu is about selecting an option and not executing a command.
2590         
2591         * UIProcess/mac/WebContextMenuProxyMac.mm:
2592         (WebKit::WebContextMenuProxyMac::populate):
2593
2594 2015-06-24  Brady Eidson  <beidson@apple.com>
2595
2596         Update JavaScript dialog delegates to include a WKSecurityOriginRef argument.
2597         <rdar://problem/21269187> and https://bugs.webkit.org/show_bug.cgi?id=146249
2598
2599         Reviewed by Alex Christensen.
2600
2601         * UIProcess/API/C/WKPage.cpp:
2602         (WKPageSetPageUIClient): Call the new signature if the client has it set.
2603           Otherwise fall back to the old signature.
2604         * UIProcess/API/C/WKPageUIClient.h: Deprecate the old method signature, and add the new
2605           one to the newest V5 client structure.
2606
2607 2015-06-24  Ryuan Choi  <ryuan.choi@navercorp.com>
2608
2609         Remove some dead code from Download
2610         https://bugs.webkit.org/show_bug.cgi?id=146268
2611
2612         Reviewed by Darin Adler.
2613
2614         retrieveDestinationWithSuggestedFilename() was introduced for DownloadCFNetWin.cpp since r77585.
2615         didDecideDestination and others are also introduced for WebKit2 Windows port since r77055.
2616         Since WebKit2 Windows port is dropped, no one uses them now.
2617
2618         * Shared/Downloads/Download.cpp:
2619         (WebKit::Download::decideDestinationWithSuggestedFilename):
2620         (WebKit::Download::retrieveDestinationWithSuggestedFilename): Deleted.
2621         * Shared/Downloads/Download.h:
2622         (WebKit::Download::destination): Deleted.
2623         * Shared/Downloads/ios/DownloadIOS.mm:
2624         (WebKit::Download::didDecideDestination): Deleted.
2625         * Shared/Downloads/mac/DownloadMac.mm:
2626         (WebKit::Download::didDecideDestination): Deleted.
2627         * Shared/Downloads/soup/DownloadSoup.cpp:
2628         (WebKit::Download::didDecideDestination): Deleted.
2629
2630 2015-06-23  Anders Carlsson  <andersca@apple.com>
2631
2632         Fix build.
2633
2634         * UIProcess/ios/ProcessAssertionIOS.mm:
2635         (-[WKProcessAssertionBackgroundTaskManager init]):
2636
2637 2015-06-23  Michael Catanzaro  <mcatanzaro@igalia.com>
2638
2639         [GTK] Crash performing drag-and-drop
2640         https://bugs.webkit.org/show_bug.cgi?id=146267
2641
2642         Reviewed by Darin Adler.
2643
2644         Return early if gtk_get_current_event() returns null to avoid a crash. Note that this does
2645         not fix drag-and-drop. Note also this prevents the web process from forcing the UI process
2646         to crash by sending fake startDrag messages.
2647
2648         * UIProcess/gtk/DragAndDropHandler.cpp:
2649         (WebKit::DragAndDropHandler::startDrag):
2650
2651 2015-06-23  Anders Carlsson  <andersca@apple.com>
2652
2653         Add a class that tracks whether we're a background or foreground application
2654         https://bugs.webkit.org/show_bug.cgi?id=146259
2655         rdar://problem/19833808
2656
2657         Reviewed by Darin Adler.
2658
2659         First step towards being able to send out these notifications for view services.
2660
2661         * UIProcess/ApplicationStateTracker.h: Added.
2662         (WebKit::ApplicationStateTracker::isInBackground):
2663         * UIProcess/ApplicationStateTracker.mm: Added.
2664         (WebKit::ApplicationStateTracker::singleton):
2665         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
2666         (WebKit::ApplicationStateTracker::addListener):
2667         (WebKit::ApplicationStateTracker::applicationDidEnterBackground):
2668         (WebKit::ApplicationStateTracker::applicationWillEnterForeground):
2669         (WebKit::ApplicationStateTracker::invokeListeners):
2670         (WebKit::ApplicationStateTracker::pruneListeners):
2671         * UIProcess/ios/ProcessAssertionIOS.mm:
2672         (-[WKProcessAssertionBackgroundTaskManager init]):
2673         (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
2674         (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground]):
2675         (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground]):
2676         (-[WKProcessAssertionBackgroundTaskManager dealloc]): Deleted.
2677         (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground:]): Deleted.
2678         (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground:]): Deleted.
2679         * UIProcess/ios/WKContentView.h:
2680         * UIProcess/ios/WKContentView.mm:
2681         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
2682         (-[WKContentView isBackground]):
2683         (-[WKContentView _applicationDidEnterBackground]):
2684         (-[WKContentView _applicationWillEnterForeground]):
2685         (-[WKContentView _applicationDidEnterBackground:]): Deleted.
2686         (-[WKContentView _applicationWillEnterForeground:]): Deleted.
2687         * WebKit2.xcodeproj/project.pbxproj:
2688
2689 2015-06-23  Anders Carlsson  <andersca@apple.com>
2690
2691         Remove windowResizerRect code, nobody is using it anymore
2692         https://bugs.webkit.org/show_bug.cgi?id=146265
2693
2694         Reviewed by Beth Dakin.
2695
2696         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2697         (WebKit::WebChromeClient::windowResizerRect): Deleted.
2698         * WebProcess/WebCoreSupport/WebChromeClient.h:
2699         * WebProcess/WebPage/WebPage.cpp:
2700         (WebKit::WebPage::windowResizerRect): Deleted.
2701         * WebProcess/WebPage/WebPage.h:
2702
2703 2015-06-23  Dan Bernstein  <mitz@apple.com>
2704
2705         Restore binary compatibility with iOS 8 Safari after r185877
2706         https://bugs.webkit.org/show_bug.cgi?id=146263
2707
2708         Reviewed by Anders Carlsson.
2709
2710         * Platform/spi/Cocoa: Added.
2711         * Platform/spi/Cocoa/NSInvocationSPI.h: Added.
2712
2713         * UIProcess/API/Cocoa/WKSecurityOrigin.mm:
2714         (-[WKSecurityOrigin methodSignatureForSelector:]): Override to check _WKSecurityOrigin for
2715         possible category methods with the specified selector.
2716         (-[WKSecurityOrigin forwardInvocation:]): Invoke using the implementation of the
2717         _WKSecurityOrigin category method.
2718
2719         * WebKit2.xcodeproj/project.pbxproj:
2720
2721 2015-06-23  Anders Carlsson  <andersca@apple.com>
2722
2723         Add operator! and copy/move constructors to WeakObjCPtr
2724         https://bugs.webkit.org/show_bug.cgi?id=146255
2725
2726         Reviewed by Andreas Kling.
2727
2728         * Shared/mac/WeakObjCPtr.h:
2729         (WebKit::WeakObjCPtr::WeakObjCPtr):
2730         (WebKit::WeakObjCPtr::operator!):
2731
2732 2015-06-23  Antti Koivisto  <antti@apple.com>
2733
2734         CrashTracer: com.apple.WebKit.Networking at JavaScriptCore: WTF::String::isolatedCopy const &
2735         https://bugs.webkit.org/show_bug.cgi?id=146236
2736         rdar://problem/21380700
2737
2738         Reviewed by Andreas Kling.
2739
2740         * NetworkProcess/cache/NetworkCache.cpp:
2741         (WebKit::NetworkCache::Cache::clear):
2742
2743             Don't crash if this is called with network cache disabled.
2744
2745 2015-06-23  Simon Fraser  <simon.fraser@apple.com>
2746
2747         Expose some more rendering progress events, and have MiniBrowser log for each of them
2748         https://bugs.webkit.org/show_bug.cgi?id=146227
2749
2750         Reviewed by Darin Adler.
2751
2752         Add _WKRenderingProgressEventFirstLayoutAfterSuppressedIncrementalRendering and 
2753         _WKRenderingProgressEventFirstPaintAfterSuppressedIncrementalRendering to the private
2754         header, and convert them to/from WebCore milestones.
2755
2756         * Shared/API/Cocoa/_WKRenderingProgressEvents.h:
2757         * Shared/API/Cocoa/_WKRenderingProgressEventsInternal.h:
2758         (renderingProgressEvents):
2759         * UIProcess/API/Cocoa/WKWebView.mm:
2760         (layoutMilestones):
2761
2762 2015-06-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2763
2764         Unreviewed. Fix GTK+ build after r185876 and r185877.
2765
2766         * UIProcess/API/gtk/WebKitUIClient.cpp:
2767         * UIProcess/API/gtk/WebKitUserContentManager.cpp:
2768         * UIProcess/API/gtk/WebKitWebView.cpp:
2769
2770 2015-06-23  Anders Carlsson  <andersca@apple.com>
2771
2772         Get rid of the window resizer size
2773         https://bugs.webkit.org/show_bug.cgi?id=146240
2774
2775         Reviewed by Darin Adler.
2776
2777         This code was only used by older versions of GTK+, so get rid of it.
2778
2779         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2780         (webkitWebViewBaseNotifyResizerSize): Deleted.
2781         (toplevelWindowResizeGripVisibilityChanged): Deleted.
2782         (webkitWebViewBaseSetToplevelOnScreenWindow): Deleted.
2783         (resizeWebKitWebViewBaseFromAllocation): Deleted.
2784         * UIProcess/WebPageProxy.cpp:
2785         (WebKit::WebPageProxy::setWindowResizerSize): Deleted.
2786         * UIProcess/WebPageProxy.h:
2787         * WebProcess/WebPage/WebPage.cpp:
2788         (WebKit::WebPage::windowResizerRect):
2789         (WebKit::WebPage::setWindowResizerSize): Deleted.
2790         * WebProcess/WebPage/WebPage.h:
2791         * WebProcess/WebPage/WebPage.messages.in:
2792
2793 2015-06-23  Brady Eidson  <beidson@apple.com>
2794
2795         WKFrameInfo should have an accessor for the Frame's current security origin.
2796         https://bugs.webkit.org/show_bug.cgi?id=146162
2797
2798         Reviewed by Dan Bernstein.
2799
2800         This patch:
2801         - Promotes _WKSecurityOrigin to API.
2802         - Makes the WKSecurityOrigin Cocoa API object work with API::SecurityOrigin.
2803         - Adds a WKSecurityOrigin accessor to WKFrameInfo.
2804         - Changes IPC messaging so every handler that calls out with a WKFrameInfo object
2805           gets a relevant SecurityOrigin to wrap.
2806
2807         * Shared/API/APISecurityOrigin.h:
2808         (API::SecurityOrigin::create):
2809         (API::SecurityOrigin::SecurityOrigin):
2810
2811         * Shared/API/Cocoa/WebKit.h:
2812
2813         * Shared/API/c/WKSharedAPICast.h:
2814         (WebKit::toCopiedAPI):
2815
2816         * Shared/Cocoa/APIObject.mm:
2817         (API::Object::newObject):
2818
2819         * Shared/SecurityOriginData.cpp:
2820         (WebKit::SecurityOriginData::fromFrame):
2821         * Shared/SecurityOriginData.h:
2822
2823         * UIProcess/API/APIFrameInfo.cpp:
2824         (API::FrameInfo::FrameInfo):
2825         * UIProcess/API/APIFrameInfo.h:
2826
2827         * UIProcess/API/APINavigationClient.h:
2828         (API::NavigationClient::didFailProvisionalLoadInSubframeWithError):
2829
2830         * UIProcess/API/APIUIClient.h:
2831         (API::UIClient::createNewPage):
2832         (API::UIClient::runJavaScriptAlert):
2833         (API::UIClient::runJavaScriptConfirm):
2834         (API::UIClient::runJavaScriptPrompt):
2835
2836         * UIProcess/API/C/WKApplicationCacheManager.cpp:
2837         (WKApplicationCacheManagerGetApplicationCacheOrigins):
2838
2839         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
2840         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
2841
2842         * UIProcess/API/C/WKOriginDataManager.cpp:
2843         (WKOriginDataManagerGetOrigins):
2844
2845         * UIProcess/API/C/WKPage.cpp:
2846         (WKPageSetPageUIClient):
2847         (WKPageSetPageNavigationClient):
2848
2849         * UIProcess/API/C/WKResourceCacheManager.cpp:
2850         (WKResourceCacheManagerGetCacheOrigins):
2851
2852         * UIProcess/API/Cocoa/WKFrameInfo.h:
2853         * UIProcess/API/Cocoa/WKFrameInfo.mm:
2854         (-[WKFrameInfo securityOrigin]):
2855
2856         * UIProcess/API/Cocoa/WKSecurityOrigin.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKSecurityOrigin.h.
2857         * UIProcess/API/Cocoa/WKSecurityOrigin.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKSecurityOrigin.mm.
2858         (-[WKSecurityOrigin dealloc]):
2859         (-[WKSecurityOrigin description]):
2860         (-[WKSecurityOrigin protocol]):
2861         (-[WKSecurityOrigin host]):
2862         (-[WKSecurityOrigin port]):
2863         (-[WKSecurityOrigin _apiObject]):
2864         * UIProcess/API/Cocoa/WKSecurityOriginInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKSecurityOriginInternal.h.
2865         (API::wrapper):
2866
2867         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2868
2869         * UIProcess/API/Cocoa/WKUserContentController.mm:
2870
2871         * UIProcess/API/Cocoa/_WKSecurityOrigin.h:
2872         * UIProcess/API/Cocoa/_WKSecurityOrigin.mm:
2873         (-[_WKSecurityOrigin _initWithSecurityOrigin:]): Deleted.
2874         (-[_WKSecurityOrigin protocol]): Deleted.
2875         (-[_WKSecurityOrigin host]): Deleted.
2876         (-[_WKSecurityOrigin port]): Deleted.
2877
2878         * UIProcess/Cocoa/NavigationState.h:
2879         * UIProcess/Cocoa/NavigationState.mm:
2880         (WebKit::NavigationState::NavigationClient::didFailProvisionalLoadInSubframeWithError):
2881
2882         * UIProcess/Cocoa/UIDelegate.h:
2883         * UIProcess/Cocoa/UIDelegate.mm:
2884         (WebKit::UIDelegate::UIClient::createNewPage):
2885         (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
2886         (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
2887         (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
2888         (WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
2889         (WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):
2890
2891         * UIProcess/UserContent/WebScriptMessageHandler.h:
2892
2893         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
2894         (WebKit::WebUserContentControllerProxy::didPostMessage):
2895         * UIProcess/UserContent/WebUserContentControllerProxy.h:
2896         * UIProcess/UserContent/WebUserContentControllerProxy.messages.in:
2897
2898         * UIProcess/WebPageProxy.cpp:
2899         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
2900         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2901         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
2902         (WebKit::WebPageProxy::decidePolicyForResponse):
2903         (WebKit::WebPageProxy::decidePolicyForResponseSync):
2904         (WebKit::WebPageProxy::createNewPage):
2905         (WebKit::WebPageProxy::runJavaScriptAlert):
2906         (WebKit::WebPageProxy::runJavaScriptConfirm):
2907         (WebKit::WebPageProxy::runJavaScriptPrompt):
2908         * UIProcess/WebPageProxy.h:
2909         * UIProcess/WebPageProxy.messages.in:
2910
2911         * WebKit2.xcodeproj/project.pbxproj:
2912
2913         * WebProcess/UserContent/WebUserContentController.cpp:
2914         (WebKit::WebUserMessageHandlerDescriptorProxy::didPostMessage):
2915
2916         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2917         (WebKit::WebChromeClient::createWindow):
2918         (WebKit::WebChromeClient::runJavaScriptAlert):
2919         (WebKit::WebChromeClient::runJavaScriptConfirm):
2920         (WebKit::WebChromeClient::runJavaScriptPrompt):
2921
2922         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2923         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
2924         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2925         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2926         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2927
2928 2015-06-23  Dan Bernstein  <mitz@apple.com>
2929
2930         <rdar://problem/21342465> Make -[WKWebView _certificateChain] public.
2931         https://bugs.webkit.org/show_bug.cgi?id=145886
2932
2933         Reviewed by Sam Weinig.
2934
2935         * Shared/WebCertificateInfo.h:
2936         (WebKit::WebCertificateInfo::create): Changed to return a Ref rather than a PassRefPtr.
2937
2938         * UIProcess/API/Cocoa/WKBrowsingContextController.mm: Added no-op overrides of new
2939         PageLoadState::Observer functions to PageLoadStateObserver.
2940
2941         * UIProcess/API/Cocoa/WKProcessGroup.mm:
2942         (-[WKProcessGroup _setAllowsSpecificHTTPSCertificate:forHost:]): Updated for change to
2943         WebCertificateInfo::create.
2944
2945         * UIProcess/API/Cocoa/WKProcessPool.mm:
2946         (-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]): Ditto.
2947
2948         * UIProcess/API/Cocoa/WKWebView.h: Declared new certificateChain property on WKWebView.
2949
2950         * UIProcess/API/Cocoa/WKWebView.mm:
2951         (-[WKWebView certificateChain]): Added. Returns the certificate chain from the page load
2952         state, or an empty array if there is no certificate chain.
2953
2954         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Deprecated _certificateChain.
2955
2956         * UIProcess/Cocoa/NavigationState.h: Declared overrides of new PageLoadState::Observer
2957         functions.
2958         * UIProcess/Cocoa/NavigationState.mm:
2959         (WebKit::NavigationState::willChangeCertificateInfo): Override to call
2960         -willChangeValueForKey:.
2961         (WebKit::NavigationState::didChangeCertificateInfo): Override to call
2962         -didChangeValueForKey:.
2963
2964         * UIProcess/PageLoadState.cpp:
2965         (WebKit::PageLoadState::commitChanges): Call the new observer functions
2966         willChangeCertificateInfo and didChangeCertificateInfo.
2967         (WebKit::PageLoadState::didCommitLoad): Added new certificateInfo parameter, which is stored
2968         in the uncommitted state.
2969         * UIProcess/PageLoadState.h:
2970         (WebKit::PageLoadState::certificateInfo): Added this getter.
2971
2972         * UIProcess/WebFrameProxy.cpp:
2973         (WebKit::WebFrameProxy::didCommitLoad): Changed the parameter type from
2974         WebCore::CertificateInfo to WebCertificateInfo.
2975         * UIProcess/WebFrameProxy.h:
2976
2977         * UIProcess/WebPageProxy.cpp:
2978         (WebKit::WebPageProxy::didCommitLoadForFrame): Pass the certificate info to
2979         PageLoadState::didCommitLoad.
2980
2981 2015-06-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2982
2983         [EFL][CustomProtocol] Do not add duplicated custom scheme
2984         https://bugs.webkit.org/show_bug.cgi?id=146199
2985
2986         Reviewed by Carlos Garcia Campos.
2987
2988         WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol generates
2989         a crash when duplicated scheme is registered on debug mode, or just registers it on release mode.
2990         However application can register duplicate scheme by mistake or on purpose. Thus it would be good
2991         if we don't register it instead of registering it or generating a crash when trying to regiseter
2992         duplicated scheme.
2993
2994         EFL port want to allow user to change registered callback, thus EWK2ContextTest::ewk_context_url_scheme_register()
2995         is modified to test it.
2996
2997         Test: ewk_context_url_scheme_register() in test_ewk2_context.cpp.
2998
2999         * UIProcess/API/efl/ewk_context.h: Added a comment to replace registered callback.
3000         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
3001         (EWK2ContextTest::schemeRequestCallback1):
3002         (EWK2ContextTest::schemeRequestCallback2):
3003         (TEST_F):
3004         (EWK2ContextTest::schemeRequestCallback): Deleted.
3005         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
3006         (WebKit::WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol):
3007
3008 2015-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>
3009
3010         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.3 release.
3011
3012         * gtk/NEWS: Add release notes for 2.9.3.
3013
3014 2015-06-22  Dan Bernstein  <mitz@apple.com>
3015
3016         Part 2 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox Profiles target
3017         https://bugs.webkit.org/show_bug.cgi?id=146197
3018
3019         Rubber-stamped by Anders Carlsson.
3020
3021         * WebKit2.xcodeproj/project.pbxproj: Deleted the WebKit2SandboxProfiles-IOSOverride target.
3022
3023 2015-06-22  Dean Jackson  <dino@apple.com>
3024
3025         Rename PlatformCA*Mac to PlatformCA*Cocoa
3026         https://bugs.webkit.org/show_bug.cgi?id=146224
3027         <rdar://problem/21497182>
3028
3029         Reviewed by Simon Fraser.
3030
3031         Rename PlatformCALayerMac and related files in platform/graphics/ca/mac
3032         to the more accurate Cocoa suffix.
3033
3034         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
3035         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3036         (WebKit::PlatformCALayerRemote::filtersCanBeComposited):
3037         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
3038         (WebKit::PlatformCALayerRemoteCustom::create):
3039         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
3040         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3041         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
3042
3043 2015-06-22  Anders Carlsson  <andersca@apple.com>
3044
3045         Simplify Connection::SyncMessageState
3046         https://bugs.webkit.org/show_bug.cgi?id=146213
3047
3048         Reviewed by Andreas Kling.
3049
3050         Since we no longer support Connections dispatching to multiple threads, we can make SyncMessageState
3051         into a singleton and get rid of the RunLoop -> SyncMessageState hash map.
3052
3053         * Platform/IPC/Connection.cpp:
3054         (IPC::Connection::SyncMessageState::singleton):
3055         (IPC::Connection::SyncMessageState::SyncMessageState):
3056         (IPC::Connection::SyncMessageState::processIncomingMessage):
3057         (IPC::Connection::SyncMessageState::dispatchMessages):
3058         (IPC::Connection::waitForSyncReply):
3059         (IPC::Connection::processIncomingSyncReply):
3060         (IPC::Connection::processIncomingMessage):
3061         (IPC::Connection::connectionDidClose):
3062         (IPC::Connection::SyncMessageState::syncMessageStateMap): Deleted.
3063         (IPC::Connection::SyncMessageState::syncMessageStateMapMutex): Deleted.
3064         (IPC::Connection::SyncMessageState::getOrCreate): Deleted.
3065         (IPC::Connection::SyncMessageState::~SyncMessageState): Deleted.
3066         (IPC::Connection::Connection): Deleted.
3067         * Platform/IPC/Connection.h:
3068
3069 2015-06-20  Alex Christensen  <achristensen@webkit.org>
3070
3071         [Content Extensions] Add SPI to reload without content blocking.
3072         https://bugs.webkit.org/show_bug.cgi?id=146128
3073         rdar://problem/20351903
3074
3075         Reviewed by Sam Weinig.
3076
3077         * Shared/WebPageCreationParameters.cpp:
3078         (WebKit::WebPageCreationParameters::encode):
3079         (WebKit::WebPageCreationParameters::decode):
3080         * Shared/WebPageCreationParameters.h:
3081         * UIProcess/API/C/WKPage.cpp:
3082         (WKPageSetCustomUserAgent):
3083         (WKPageSetUserContentExtensionsEnabled):
3084         (WKPageSupportsTextEncoding):
3085         * UIProcess/API/C/WKPage.h:
3086         * UIProcess/API/Cocoa/WKWebView.mm:
3087         (-[WKWebView _customUserAgent]):
3088         (-[WKWebView _setUserContentExtensionsEnabled:]):
3089         (-[WKWebView _userContentExtensionsEnabled]):
3090         (-[WKWebView _setCustomUserAgent:]):
3091         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3092         * UIProcess/WebPageProxy.cpp:
3093         (WebKit::WebPageProxy::creationParameters):
3094         (WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
3095         (WebKit::WebPageProxy::setUserContentExtensionsEnabled):
3096         * UIProcess/WebPageProxy.h:
3097         (WebKit::WebPageProxy::userContentExtensionsEnabled):
3098         * WebProcess/WebPage/WebPage.cpp:
3099         (WebKit::WebPage::WebPage):
3100         (WebKit::WebPage::reinitializeWebPage):
3101         (WebKit::WebPage::setShouldScaleViewToFitDocument):
3102         (WebKit::WebPage::setUserContentExtensionsEnabled):
3103         * WebProcess/WebPage/WebPage.h:
3104         * WebProcess/WebPage/WebPage.messages.in:
3105         Pass a boolean from the API to WebCore.
3106
3107 2015-06-22  Anders Carlsson  <andersca@apple.com>
3108
3109         Remove m_clientRunLoop from IPC::Connection
3110         https://bugs.webkit.org/show_bug.cgi?id=146212
3111
3112         Reviewed by Sam Weinig.
3113
3114         We only ever create connections whose messages are dispatched to the main run loop, so we can 
3115         vastly simplify the code by only allowing messages to be dispatched there.
3116
3117         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
3118         (WebKit::DatabaseToWebProcessConnection::DatabaseToWebProcessConnection):
3119         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3120         (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
3121         * Platform/IPC/Connection.cpp:
3122         (IPC::Connection::createServerConnection):
3123         (IPC::Connection::createClientConnection):
3124         (IPC::Connection::Connection):
3125         (IPC::Connection::addWorkQueueMessageReceiver):
3126         (IPC::Connection::removeWorkQueueMessageReceiver):
3127         (IPC::Connection::waitForMessage):
3128         (IPC::Connection::sendSyncMessage):
3129         (IPC::Connection::sendSyncMessageFromSecondaryThread):
3130         (IPC::Connection::processIncomingMessage):
3131         (IPC::Connection::connectionDidClose):
3132         (IPC::Connection::dispatchDidReceiveInvalidMessage):
3133         (IPC::Connection::enqueueIncomingMessage):
3134         (IPC::Connection::wakeUpRunLoop):
3135         * Platform/IPC/Connection.h:
3136         * Platform/IPC/mac/ConnectionMac.mm:
3137         (IPC::Connection::receiveSourceEventHandler):
3138         * PluginProcess/WebProcessConnection.cpp:
3139         (WebKit::WebProcessConnection::WebProcessConnection):
3140         * Shared/ChildProcess.cpp:
3141         (WebKit::ChildProcess::initialize):
3142         * Shared/ChildProcessProxy.cpp:
3143         (WebKit::ChildProcessProxy::didFinishLaunching):
3144         * UIProcess/Plugins/PluginProcessProxy.cpp:
3145         (WebKit::PluginProcessProxy::didFinishLaunching):
3146         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
3147         (WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection):
3148         * WebProcess/Network/NetworkProcessConnection.cpp:
3149         (WebKit::NetworkProcessConnection::NetworkProcessConnection):
3150         * WebProcess/Plugins/PluginProcessConnection.cpp:
3151         (WebKit::PluginProcessConnection::PluginProcessConnection):
3152         * WebProcess/WebPage/WebInspector.cpp:
3153         (WebKit::WebInspector::createInspectorPage):
3154         * WebProcess/WebPage/WebInspectorUI.cpp:
3155         (WebKit::WebInspectorUI::establishConnection):
3156
3157 2015-06-22  Anders Carlsson  <andersca@apple.com>
3158
3159         Crashes in hit testing under WebPage::acceptsFirstMouse() while handling sync message in plug-in teardown
3160         https://bugs.webkit.org/show_bug.cgi?id=146211
3161         rdar://problem/17180615
3162
3163         Reviewed by Sam Weinig.
3164
3165         If we're inside a sendSync message when we're being called, just bail.
3166
3167         * WebProcess/WebPage/mac/WebPageMac.mm:
3168         (WebKit::WebPage::acceptsFirstMouse):
3169
3170 2015-06-22  Dan Bernstein  <mitz@apple.com>
3171
3172         Part 1 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox Profiles target
3173         https://bugs.webkit.org/show_bug.cgi?id=146197
3174
3175         Reviewed by Anders Carlsson.
3176
3177         * Configurations/SandboxProfiles.xcconfig: Added. Defines INSTALL_PATH based on the value
3178         of WK_INSTALL_OVERRIDE_SANDBOX_PROFILES.
3179         * WebKit2.xcodeproj/project.pbxproj: Use SandboxProfiles.xcconfig for the Sandbox Profiles
3180         target, and change the destination path in its Copy Files build phase to INSTALL_PATH.
3181
3182 2015-06-22  Antti Koivisto  <antti@apple.com>
3183
3184         Crash replacing TabDocument in MobileSafari at WebKit: -[WKWebView(WKPrivate) _beginAnimatedResizeWithUpdates:]
3185         https://bugs.webkit.org/show_bug.cgi?id=146201
3186
3187         Reviewed by Dan Bernstein.
3188
3189         * UIProcess/API/Cocoa/WKWebView.mm:
3190         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3191
3192         No repro but if for some reason [_contentView bounds] width is zero we'll compute +Inf targetScale
3193         and then NaN contentOffset.x. Verified in lldb that this gives the exact crash signature seen.
3194
3195         Fix by checking that [_contentView bounds] is not empty like is done with other inputs.
3196
3197 2015-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>
3198
3199         REGRESSION(r182303): [GTK] Context menu API is broken since r182303
3200         https://bugs.webkit.org/show_bug.cgi?id=146202
3201
3202         Reviewed by Žan Doberšek.
3203
3204         The problem is that ContextMenuclient API changed in r182303, but
3205         we didn't notice it either, and the default handler for
3206         getContextMenuFromProposedMenu was executed. An override keyword
3207         would have caught this.
3208
3209         * UIProcess/API/gtk/WebKitContextMenuClient.cpp: Build a Vector of
3210         WebContextMenuItemData as expected by our API, and add add
3211         override keyword to ensure this doesn't happen again.
3212
3213 2015-06-22  Zan Dobersek  <zdobersek@igalia.com>
3214
3215         [WK2] ConnectionUnix should use FastMalloc to allocate on-heap resources
3216         https://bugs.webkit.org/show_bug.cgi?id=146143
3217
3218         Reviewed by Carlos Garcia Campos.
3219
3220         IPC handling in Unix-specific IPC::Connection implementation should use
3221         FastMalloc to allocate on-heap resources, instead of allocating via the
3222         system allocator.
3223
3224         The AttachmentInfo class is marked as allocatable through FastMalloc.
3225         That way it can be allocated through FastMalloc while still handled
3226         through std::unique_ptr<>.
3227
3228         The char[] arrays in readBytesFromSocket() and Connection::sendOutgoingMessage()
3229         are now handled through a MallocPtr<> object.
3230
3231         In Connection::sendOutgoingMessage(), both the AttachmentInfo[] and char[]
3232         arrays are now only allocated if there are actual attachments contained
3233         in the message. The code that's conditioned with a non-empty attachments
3234         Vector is now also grouped together, in a single branch.
3235
3236         * Platform/IPC/unix/ConnectionUnix.cpp:
3237         (IPC::readBytesFromSocket):
3238         (IPC::Connection::sendOutgoingMessage):
3239
3240 2015-06-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3241
3242         [EFL] test_ewk2_application_cache_manager has been failed since r185527
3243         https://bugs.webkit.org/show_bug.cgi?id=146016
3244
3245         Reviewed by Csaba Osztrogonác.
3246
3247         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
3248         (TEST_F): Disable this test for now. This test will be enabled again.
3249
3250 2015-06-16  Gavin Barraclough  <barraclough@apple.com>
3251
3252         Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
3253         https://bugs.webkit.org/show_bug.cgi?id=146198
3254
3255         Unreviewed rollout.
3256
3257         * UIProcess/API/gtk/WebKitWebContext.cpp:
3258         (webkit_web_context_prefetch_dns):
3259
3260 2015-06-21  Hyungwook Lee  <hyungwook.lee@navercorp.com>
3261
3262         WKApplicationCacheManagerDeleteEntriesForOrigin() has wrong WebsiteDataTypes.
3263         https://bugs.webkit.org/show_bug.cgi?id=146180
3264
3265         Reviewed by Sam Weinig.
3266
3267         Modify to use correct WebsiteDataTypes in WKApplicationCacheManagerDeleteEntriesForOrigin()
3268
3269         * UIProcess/API/C/WKApplicationCacheManager.cpp:
3270         (WKApplicationCacheManagerDeleteEntriesForOrigin):
3271
3272 2015-06-21  Dan Bernstein  <mitz@apple.com>
3273
3274         <rdar://problem/21444762> REGRESSION (r184215): Plug-in services crash on launch on Yosemite
3275         https://bugs.webkit.org/show_bug.cgi?id=146195
3276
3277         Reviewed by Sam Weinig.
3278
3279         * Configurations/PluginService.32.xcconfig: Changed the Yosemite definition of
3280         INFOPLIST_FILE such that it would also apply to the macosx10.10.internal SDK.
3281         * Configurations/PluginService.64.xcconfig: Ditto.
3282
3283 2015-06-21  Dan Bernstein  <mitz@apple.com>
3284
3285         Build fix.
3286
3287         * Shared/API/Cocoa/WKFoundation.h: Don’t use generics if the SDK doesn’t support them.
3288
3289 2015-06-21  Michael Catanzaro  <mcatanzaro@igalia.com>
3290
3291         [SOUP] Use GTask in WebKitSoupRequestInputStream
3292         https://bugs.webkit.org/show_bug.cgi?id=146184
3293
3294         Reviewed by Carlos Garcia Campos.
3295
3296         Replace deprecated use of GSimpleAsyncResult with GTask.
3297
3298         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
3299         (AsyncReadData::AsyncReadData):
3300         (webkitSoupRequestInputStreamReadAsyncResultComplete):
3301         (webkitSoupRequestInputStreamPendingReadAsyncComplete):
3302         (webkitSoupRequestInputStreamReadAsync):
3303         (webkitSoupRequestInputStreamReadFinish):
3304
3305 2015-06-21  Michael Catanzaro  <mcatanzaro@igalia.com>
3306
3307         Fix format strings in NetworkCache.cpp and NetworkCacheStatistics.cpp and WebIDBServerConnection.cpp
3308         https://bugs.webkit.org/show_bug.cgi?id=146172
3309
3310         Reviewed by Darin Adler.
3311
3312         Use the correct %"PRIu64" and %"PRIi64" for uint64_t and int64_t, instead of %llu and %lli.
3313
3314         * NetworkProcess/cache/NetworkCache.cpp:
3315         (WebKit::NetworkCache::Cache::retrieve):
3316         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
3317         (WebKit::NetworkCache::Statistics::initialize):
3318         (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
3319         (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
3320         (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
3321         (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
3322         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
3323         (WebKit::WebIDBServerConnection::deleteDatabase):
3324         (WebKit::WebIDBServerConnection::didDeleteDatabase):
3325         (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
3326         (WebKit::WebIDBServerConnection::didGetOrEstablishIDBDatabaseMetadata):
3327         (WebKit::WebIDBServerConnection::openTransaction):
3328         (WebKit::WebIDBServerConnection::didOpenTransaction):
3329         (WebKit::WebIDBServerConnection::beginTransaction):
3330         (WebKit::WebIDBServerConnection::didBeginTransaction):
3331         (WebKit::WebIDBServerConnection::commitTransaction):
3332         (WebKit::WebIDBServerConnection::didCommitTransaction):
3333         (WebKit::WebIDBServerConnection::resetTransaction):
3334         (WebKit::WebIDBServerConnection::didResetTransaction):
3335         (WebKit::WebIDBServerConnection::rollbackTransaction):
3336         (WebKit::WebIDBServerConnection::didRollbackTransaction):
3337         (WebKit::WebIDBServerConnection::createObjectStore):
3338         (WebKit::WebIDBServerConnection::didCreateObjectStore):
3339         (WebKit::WebIDBServerConnection::createIndex):
3340         (WebKit::WebIDBServerConnection::didCreateIndex):
3341         (WebKit::WebIDBServerConnection::deleteIndex):
3342         (WebKit::WebIDBServerConnection::didDeleteIndex):
3343         (WebKit::WebIDBServerConnection::get):
3344         (WebKit::WebIDBServerConnection::put):
3345         (WebKit::WebIDBServerConnection::didPutRecord):
3346         (WebKit::WebIDBServerConnection::didGetRecord):
3347         (WebKit::WebIDBServerConnection::didOpenCursor):
3348         (WebKit::WebIDBServerConnection::didAdvanceCursor):
3349         (WebKit::WebIDBServerConnection::didIterateCursor):
3350         (WebKit::WebIDBServerConnection::count):
3351         (WebKit::WebIDBServerConnection::didCount):
3352         (WebKit::WebIDBServerConnection::deleteRange):
3353         (WebKit::WebIDBServerConnection::didDeleteRange):
3354         (WebKit::WebIDBServerConnection::clearObjectStore):
3355         (WebKit::WebIDBServerConnection::didClearObjectStore):
3356         (WebKit::WebIDBServerConnection::deleteObjectStore):
3357         (WebKit::WebIDBServerConnection::didDeleteObjectStore):
3358         (WebKit::WebIDBServerConnection::changeDatabaseVersion):
3359         (WebKit::WebIDBServerConnection::didChangeDatabaseVersion):
3360         (WebKit::WebIDBServerConnection::openCursor):
3361         (WebKit::WebIDBServerConnection::cursorAdvance):
3362         (WebKit::WebIDBServerConnection::cursorIterate):
3363
3364 2015-06-20  Tim Horton  <timothy_horton@apple.com>
3365
3366         Deselection of text causes a noticeable jump on force touch machines
3367         https://bugs.webkit.org/show_bug.cgi?id=146173
3368         <rdar://problem/20992842>
3369
3370         Reviewed by Sam Weinig.
3371
3372         * Shared/WebCoreArgumentCoders.cpp:
3373         (IPC::ArgumentCoder<TextIndicatorData>::encode):
3374         (IPC::ArgumentCoder<TextIndicatorData>::decode):
3375         Encode/decode wantsMargin.
3376
3377         * WebProcess/WebPage/mac/WebPageMac.mm:
3378         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
3379         (WebKit::textIndicatorTransitionForImmediateAction): Deleted.
3380         Get rid of TextIndicatorPresentationTransition::Crossfade.
3381
3382 2015-06-20  Dan Bernstein  <mitz@apple.com>
3383
3384         [Cocoa] Actually use Objective-C lightweight generics when the compiler supports them
3385         https://bugs.webkit.org/show_bug.cgi?id=146183
3386
3387         Reviewed by Sam Weinig.
3388
3389         * Shared/API/Cocoa/WKFoundation.h: When the compiler supports Objective-C generics, define
3390         WK_ARRAY and WK_SET to use them. Also added a definition of WK_DICTIONARY.
3391
3392         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Use WK_DICTIONARY for the options dictionary of
3393         -_loadRequest:withOptions:.
3394
3395         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3396         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]): Made the completion
3397         halder type match the declaration, now that NSArray and WK_ARRAY(WKWebsiteDataRecord *) are
3398         not the same.
3399
3400         * mac/postprocess-framework-headers.sh: Also rewrite WK_DICTIONARY.
3401
3402 2015-06-20  Chris Dumez  <cdumez@apple.com>
3403
3404         [WK2][iOS] Avoid synchronous IPC on view state change when the content is not visible
3405         https://bugs.webkit.org/show_bug.cgi?id=146179
3406         <rdar://problem/20923432>
3407
3408         Reviewed by Tim Horton.
3409
3410         After r170787, viewStateChange() would cause a synchronous IPC between
3411         the UIProcess and the WebProcess when the view becomes visible. This
3412         was to avoid painting empty / black tiles when unsuspending the
3413         WebProcess on tab switch, in the event volatile IOSurfaces were purged.
3414
3415         However, this sync IPC can have performance implications and is not
3416         needed when the content is not actually visible yet (e.g.
3417         hideContentUntilNextUpdate() was called, or the tab was killed).
3418
3419         This patch avoids the synchronous IPC when the content is hidden and
3420         exposes a private API on WKWebView so that clients can ask for the
3421         content to be hidden until the next update. This would allow for
3422         clients to avoid the synchronous IPC if they don't need the content
3423         to be displayed synchronously (e.g. the view is obscured).
3424
3425         * UIProcess/API/Cocoa/WKWebView.mm:
3426         (-[WKWebView _hideContentUntilNextUpdate]):
3427         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3428         * UIProcess/DrawingAreaProxy.h:
3429         (WebKit::DrawingAreaProxy::hasVisibleContent):
3430         * UIProcess/WebPageProxy.cpp:
3431         (WebKit::WebPageProxy::dispatchViewStateChange):
3432         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3433         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3434         (WebKit::RemoteLayerTreeDrawingAreaProxy::isContentHidden):
3435
3436 2015-06-20  Michael Catanzaro  <mcatanzaro@igalia.com>
3437
3438         Check for SHA1 certificates ignores subresources
3439         https://bugs.webkit.org/show_bug.cgi?id=146159
3440
3441         Reviewed by Dan Bernstein.
3442
3443         * UIProcess/WebPageProxy.cpp:
3444         (WebKit::WebPageProxy::didCommitLoadForFrame): Call
3445         PageLoadState::didDisplayOrRunInsecureContent if a certificate chain contains a non-root
3446         SHA1 certificate when the frame is not the main frame.
3447
3448 2015-06-20  Dan Bernstein  <mitz@apple.com>
3449
3450         Added availability information to a recently-added delegate method.
3451
3452         Suggested by Alexey Proskuryakov and Anders Carlsson.
3453
3454         * UIProcess/API/Cocoa/WKUIDelegate.h: Annotated -webViewDidClose:.
3455
3456 2015-06-20  Ryuan Choi  <ryuan.choi@navercorp.com>
3457
3458         [EFL] Do not consider test directories when DEVELOPER_MODE is OFF
3459         https://bugs.webkit.org/show_bug.cgi?id=146171
3460
3461         Reviewed by Gyuyoung Kim.
3462
3463         * PlatformEfl.cmake:
3464         Do not define SOURCE_DIR when DEVELOPER_MODE is OFF for seccomp filter
3465         not to allow jhbuild directory.
3466         * Shared/efl/ProcessExecutablePathEfl.cpp:
3467         (WebKit::findProcessPath): Guard test code to ENABLE(DEVELOPER_MODE).
3468
3469 2015-06-18  Myles C. Maxfield  <mmaxfield@apple.com>
3470
3471         REGRESSION(r185475): [Mac] ASSERT() when clicking on text using web fonts with force touch trackpad
3472         https://bugs.webkit.org/show_bug.cgi?id=145890
3473         <rdar://problem/21390877>
3474
3475         Reviewed by Darin Adler and Tim Horton.
3476
3477         The best place to stop the serialization of unserializable fonts is inside WebKit2's IPC code. We want
3478         this logic to occur when encoding an NSAttributedString, rather than when encoding an NSDictionary,
3479         because changing the shape of an NSAttributedString is less likely to result in problems rather than
3480         changing the shape of an NSDictionary.
3481
3482         * Shared/mac/ArgumentCodersMac.mm:
3483         (IPC::fontIsSerializable):
3484         (IPC::filterUnserializableValues):
3485         (IPC::encode):
3486
3487 2015-06-19  Michael Catanzaro  <mcatanzaro@igalia.com>
3488
3489         [SOUP] Fix return-type-c-linkage warning after r185553
3490         https://bugs.webkit.org/show_bug.cgi?id=146014
3491
3492      &nb