[GTK] Add seccomp filters support
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-07-19  Michael Catanzaro  <mcatanzaro@igalia.com>
2
3         [GTK] Add seccomp filters support
4         https://bugs.webkit.org/show_bug.cgi?id=110014
5
6         Reviewed by Žan Doberšek.
7
8         Allow building with ENABLE_SECCOMP_FILTERS=ON. Based on work by Thiago Marcos P. Santos.
9
10         * PlatformGTK.cmake: Support ENABLE_SECCOMP_FILTERS build option.
11         * WebProcess/gtk/SeccompFiltersWebProcessGtk.cpp: Added.
12         (WebKit::SeccompFiltersWebProcessGtk::SeccompFiltersWebProcessGtk):
13         (WebKit::SeccompFiltersWebProcessGtk::platformInitialize):
14         * WebProcess/gtk/SeccompFiltersWebProcessGtk.h: Added.
15         * WebProcess/soup/WebProcessSoup.cpp:
16         (WebKit::WebProcess::platformInitializeWebProcess): Initialize default
17         GTK+ web process seccomp filters.
18
19 2015-07-18  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
20
21         Reduce PassRefPtr in WebKit2 - 3
22         https://bugs.webkit.org/show_bug.cgi?id=146995
23
24         Reviewed by Daniel Bates.
25
26         To remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
27         Because some uses depend on WebCore, WebCore, WK1 ports are modified as well.
28
29         * DatabaseProcess/DatabaseProcess.cpp:
30         (WebKit::DatabaseProcess::getOrCreateUniqueIDBDatabase):
31         * DatabaseProcess/DatabaseProcess.h:
32         * PluginProcess/PluginControllerProxy.cpp:
33         (WebKit::PluginControllerProxy::takeInitializationReply):
34         * PluginProcess/PluginControllerProxy.h:
35         * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
36         (WebKit::CoordinatedBackingStore::texture):
37         * Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
38         (WebKit::CoordinatedBackingStore::create):
39         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
40         (WebKit::WebCoordinatedSurface::create):
41         (WebKit::WebCoordinatedSurface::createWithSurface):
42         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
43         * UIProcess/API/APILoaderClient.h:
44         (API::LoaderClient::webCryptoMasterKey):
45         * UIProcess/API/APINavigationClient.h:
46         (API::NavigationClient::webCryptoMasterKey):
47         * UIProcess/API/C/WKPage.cpp:
48         (WKPageSetPageLoaderClient):
49         (WKPageSetPageNavigationClient):
50         * UIProcess/API/gtk/PageClientImpl.cpp:
51         (WebKit::PageClientImpl::createPopupMenuProxy):
52         (WebKit::PageClientImpl::createContextMenuProxy):
53         (WebKit::PageClientImpl::createColorPicker):
54         * UIProcess/API/gtk/PageClientImpl.h:
55         * UIProcess/Authentication/WebCredential.h:
56         * UIProcess/Authentication/WebProtectionSpace.h:
57         * UIProcess/AutoCorrectionCallback.h:
58         * UIProcess/Cocoa/NavigationState.h:
59         * UIProcess/Cocoa/NavigationState.mm:
60         (WebKit::NavigationState::NavigationClient::webCryptoMasterKey):
61         * UIProcess/CoordinatedGraphics/WebView.cpp:
62         (WebKit::WebView::createPopupMenuProxy):
63         (WebKit::WebView::createContextMenuProxy):
64         (WebKit::WebView::createColorPicker):
65         * UIProcess/CoordinatedGraphics/WebView.h:
66         * UIProcess/PageClient.h:
67         * UIProcess/WebPageProxy.h:
68         * UIProcess/efl/WebViewEfl.cpp:
69         (WebKit::WebViewEfl::createPopupMenuProxy):
70         (WebKit::WebViewEfl::createContextMenuProxy):
71         (WebKit::WebViewEfl::createColorPicker):
72         * UIProcess/efl/WebViewEfl.h:
73         * UIProcess/ios/PageClientImplIOS.h:
74         * UIProcess/ios/PageClientImplIOS.mm:
75         (WebKit::PageClientImpl::createPopupMenuProxy):
76         (WebKit::PageClientImpl::createContextMenuProxy):
77         * UIProcess/ios/WebPageProxyIOS.mm:
78         (WebKit::WebPageProxy::dataSelectionForPasteboard):
79         * UIProcess/mac/PageClientImpl.h:
80         * UIProcess/mac/PageClientImpl.mm:
81         (WebKit::PageClientImpl::createPopupMenuProxy):
82         (WebKit::PageClientImpl::createContextMenuProxy):
83         (WebKit::PageClientImpl::createColorPicker):
84         * UIProcess/mac/WebPageProxyMac.mm:
85         (WebKit::WebPageProxy::dataSelectionForPasteboard):
86         * WebProcess/Network/WebResourceLoadScheduler.cpp:
87         (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad):
88         (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad):
89         * WebProcess/Network/WebResourceLoadScheduler.h:
90         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
91         (WebKit::NetscapePlugin::fromNPP):
92         (WebKit::NetscapePlugin::snapshot):
93         (WebKit::NetscapePlugin::liveResourceData):
94         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
95         * WebProcess/Plugins/Plugin.h:
96         * WebProcess/Plugins/PluginProxy.cpp:
97         (WebKit::PluginProxy::snapshot):
98         (WebKit::PluginProxy::liveResourceData):
99         * WebProcess/Plugins/PluginProxy.h:
100         * WebProcess/Storage/StorageNamespaceImpl.cpp:
101         (WebKit::StorageNamespaceImpl::storageArea):
102         (WebKit::StorageNamespaceImpl::copy):
103         * WebProcess/Storage/StorageNamespaceImpl.h:
104         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
105         (WebKit::toHistoryItem):
106         * WebProcess/WebCoreSupport/SessionStateConversion.h:
107         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
108         (WebKit::WebChromeClient::createPopupMenu):
109         (WebKit::WebChromeClient::createSearchPopupMenu):
110         * WebProcess/WebCoreSupport/WebChromeClient.h:
111         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
112         (WebKit::WebFrameLoaderClient::createDocumentLoader):
113         (WebKit::WebFrameLoaderClient::createFrame):
114         (WebKit::WebFrameLoaderClient::createPlugin):
115         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
116         * WebProcess/WebPage/WebPage.cpp:
117         (WebKit::WebPage::create):
118         (WebKit::WebPage::createDocumentLoader):
119         * WebProcess/WebPage/WebPage.h:
120         * WebProcess/WebPage/mac/WebPageMac.mm:
121         (WebKit::WebPage::lookupTextAtLocation):
122
123 2015-07-18  Simon Fraser  <simon.fraser@apple.com>
124
125         Scroll position jumps when scrolling scaling pages down in split view
126         https://bugs.webkit.org/show_bug.cgi?id=147072
127         rdar://problem/21769577
128
129         Reviewed by Sam Weinig.
130         
131         When apple.com/music is in Split View at a reduced scale, scrolling the page
132         can cause unwanted scroll jumps. This happened because we'd enter
133         TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded() with a pending
134         layout, so run the autosizing logic. When scrolled near the bottom, the unconstrained
135         layout resulted in a shorter document, which truncated the scroll position. The
136         scaled layout then restored the longer document, but it also restored that
137         truncated scroll position.
138         
139         Forcing a layout is sufficient to fix the bug for this page, and doing a single
140         layout (which will happen anyway) is preferable to running the autosize logic
141         if layout happens to be dirty.
142
143         I was not able to make a test to reproduce the problem. Entering
144         scaleViewToFitDocumentIfNeeded() with pending layout was triggerable
145         using a transform transition, but I was not able to reproduce incorrect
146         scroll position restoration.
147
148         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
149         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
150
151 2015-07-17  Andy Estes  <aestes@apple.com>
152
153         [iOS] Further tighten the sandbox around pages fetched with Content-Disposition: attachment
154         https://bugs.webkit.org/show_bug.cgi?id=147044
155         rdar://problem/21567820
156
157         Reviewed by Brady Eidson.
158
159         * WebProcess/WebPage/WebPage.cpp:
160         (WebKit::WebPage::WebPage): Enabled Content-Disposition: attachment sandbox on iOS.
161
162 2015-07-17  Tim Horton  <timothy_horton@apple.com>
163
164         [iOS] TextIndicator has a large forehead when line-height > 1
165         https://bugs.webkit.org/show_bug.cgi?id=147058
166         <rdar://problem/21643094>
167
168         Reviewed by Dean Jackson.
169
170         * WebProcess/WebPage/ios/WebPageIOS.mm:
171         (WebKit::WebPage::getPositionInformation):
172         Apply a review comment that I left myself and then forgot about.
173
174 2015-07-17  Enrica Casucci  <enrica@apple.com>
175
176         [iOS] Implement selectionInteractionAssistant accessor.
177         https://bugs.webkit.org/show_bug.cgi?id=147054
178         rdar://problem/20864286
179
180         Reviewed by Tim Horton.
181
182         One more change to adopt the new selection interaction
183         model on iOS.
184
185         * UIProcess/ios/WKContentViewInteraction.mm:
186         (-[WKContentView selectionInteractionAssistant]):
187
188 2015-07-17  Dan Bernstein  <mitz@apple.com>
189
190         REGRESSION (r186964): Crash in WebKit2.CloseFromWithinCreatePage
191         https://bugs.webkit.org/show_bug.cgi?id=147055
192
193         Reviewed by Alex Christensen.
194
195         * UIProcess/WebPageProxy.cpp:
196         (WebKit::WebPageProxy::createNewPage): Grab the main frame’s URL before calling out to the
197         client, who may destroy the frame.
198
199 2015-07-17  Dan Bernstein  <mitz@apple.com>
200
201         WebKit2 part of <rdar://problem/21803781> The external URL policy is not reported correctly in navigation actions that create new windows
202         https://bugs.webkit.org/show_bug.cgi?id=147040
203
204         Reviewed by Dean Jackson.
205
206         * UIProcess/Cocoa/UIDelegate.mm:
207         (WebKit::UIDelegate::UIClient::createNewPage): Disallow App Links if the new page is for the
208         same protocol, host and port as the main frame of this page.
209
210         * UIProcess/WebPageProxy.cpp:
211         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Disallow App Links if
212         m_shouldSuppressAppLinksInNextNavigationPolicyDecision is set, and reset it. See below for
213         when we set it.
214         (WebKit::WebPageProxy::decidePolicyForNewWindowAction): Disallow App Links if the new window
215         is for the same protocol, host and port as the main frame of this page.
216         (WebKit::WebPageProxy::createNewPage): Make the new page disallow App Links in the first
217         policy decision if it is for the same protocol, host and port as the main frame of this
218         page.
219         * UIProcess/WebPageProxy.h: Added m_shouldSuppressAppLinksInNextNavigationPolicyDecision
220         member variable.
221
222         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
223         (WebKit::WebChromeClient::createWindow): Pass the shouldOpenExternalURLsPolicy.
224
225         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
226         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.
227
228 2015-07-17  Tim Horton  <timothy_horton@apple.com>
229
230         iOS TextIndicators include text that is not supposed to be indicated
231         https://bugs.webkit.org/show_bug.cgi?id=147028
232         <rdar://problem/21643094>
233
234         Reviewed by Sam Weinig.
235
236         * WebProcess/Plugins/PluginView.cpp:
237         (WebKit::PluginView::shouldCreateTransientPaintingSnapshot):
238
239 2015-07-17  Carlos Garcia Campos  <cgarcia@igalia.com>
240
241         [GTK] Cleanup PasteboardHelper
242         https://bugs.webkit.org/show_bug.cgi?id=147035
243
244         Reviewed by Žan Doberšek.
245
246         Use PasteboardHelper::singleton() instead of
247         PasteboardHelper::defaultPasteboardHelper().
248
249         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
250         (webkitWebViewBaseConstructed):
251         * UIProcess/gtk/DragAndDropHandler.cpp:
252         (WebKit::DragAndDropHandler::startDrag):
253         (WebKit::DragAndDropHandler::fillDragData):
254         (WebKit::DragAndDropHandler::dataObjectForDropData):
255         (WebKit::DragAndDropHandler::requestDragData):
256
257 2015-07-16  Matt Baker  <mattbaker@apple.com>
258
259         [Mac] Web Inspector toolbar can be covered by the Safari tab bar when docked to the right
260         https://bugs.webkit.org/show_bug.cgi?id=146994
261
262         Reviewed by Timothy Hatcher.
263
264         WebInspectorProxy contained logic which ignored the next frame change notification from the inspected view,
265         whenever it updated the frames of both the Inspector view and inspected view. This patch removes that logic,
266         as it prevented the Inspector's frame from being adjusted after changes to the browser's top content inset.
267
268         * UIProcess/mac/WebInspectorProxyMac.mm:
269         (-[WKWebInspectorProxyObjCAdapter ignoreNextInspectedViewFrameDidChange]): Deleted.
270         (-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]): Deleted.
271         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Deleted.
272
273 2015-07-16  Joseph Pecoraro  <pecoraro@apple.com>
274
275         Web Inspector: [Mac] Save dialog not working when inspector is docked
276         https://bugs.webkit.org/show_bug.cgi?id=146991
277
278         Reviewed by Sam Weinig.
279
280         * UIProcess/mac/WebInspectorProxyMac.mm:
281         (WebKit::runOpenPanel):
282         (WebKit::WebInspectorProxy::platformSave):
283         When the window is nil (docked) use a non-window version of running the dialog.
284
285 2015-07-16  Tim Horton  <timothy_horton@apple.com>
286
287         Add shrink-wrapped link highlights
288         https://bugs.webkit.org/show_bug.cgi?id=147021
289         <rdar://problem/21643094>
290
291         Reviewed by Enrica Casucci.
292
293         * Shared/InteractionInformationAtPosition.cpp:
294         (WebKit::InteractionInformationAtPosition::encode):
295         (WebKit::InteractionInformationAtPosition::decode):
296         * Shared/InteractionInformationAtPosition.h:
297         Add a TextIndicator to InteractionInformationAtPosition.
298         Make use of some new C++ features.
299
300         * UIProcess/ios/WKContentViewInteraction.h:
301         * UIProcess/ios/WKContentViewInteraction.mm:
302         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
303         (-[WKContentView didDismissPreviewViewController:committing:]):
304         Make use of the TextIndicator (if we have one) to show a shrink-wrapped
305         snapshot of the link.
306
307         * WebProcess/WebPage/ios/WebPageIOS.mm:
308         (WebKit::WebPage::getPositionInformation):
309         Build a TextIndicator for the link if possible.
310
311 2015-07-16  Matt Rajca  <mrajca@apple.com>
312
313         Media Session: remove plumbing for delivering start/end-of-interruption events
314         https://bugs.webkit.org/show_bug.cgi?id=147005
315
316         Reviewed by Eric Carlson.
317
318         Instead of receiving interruptions through WebKit, we will provide platform-specific implementations in WebCore
319         so the same behavior is available to all clients.
320
321         * UIProcess/API/C/WKPage.cpp:
322         * UIProcess/API/C/WKPagePrivate.h:
323         * UIProcess/WebPageProxy.cpp:
324         * UIProcess/WebPageProxy.h:
325         * WebProcess/WebPage/WebPage.cpp:
326         * WebProcess/WebPage/WebPage.h:
327         * WebProcess/WebPage/WebPage.messages.in:
328
329 2015-07-16  Michael Catanzaro  <mcatanzaro@igalia.com>
330
331         REGRESSION(r186464): [SOUP] ASSERTION FAILED: !m_messageReceiverMapCount when closing any tab
332         https://bugs.webkit.org/show_bug.cgi?id=147006
333
334         Reviewed by Anders Carlsson.
335
336         Remove the message receiver before it is deallocated.
337
338         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
339         (WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
340
341 2015-07-16  Brady Eidson  <beidson@apple.com>
342
343         Review feedback followup for:
344         REGRESSION(r186088): Crash under WebKit::WebPageProxy::didFailLoadForFrame
345         <rdar://problem/21692212> and https://bugs.webkit.org/show_bug.cgi?id=146988
346
347         * UIProcess/mac/PageClientImpl.mm:
348         (WebKit::PageClientImpl::refView): CFRetain instead of Obj-C retain.
349         (WebKit::PageClientImpl::derefView): CFRelease instead of Obj-C release.
350
351
352 2015-07-16  Michael Catanzaro  <mcatanzaro@igalia.com>
353
354         [Linux] Seccomp: fix -Wmismatched-tags
355         https://bugs.webkit.org/show_bug.cgi?id=146990
356
357         Reviewed by Žan Doberšek.
358
359         WebProcessCreationParameters is a struct nowadays, not a class, so declare it appropriately.
360
361         * Shared/linux/SeccompFilters/SyscallPolicy.h:
362
363 2015-07-16  Carlos Garcia Campos  <cgarcia@igalia.com>
364
365         REGRESSION(r185415): [GTK] Browsers crash when an input method is enabled
366         https://bugs.webkit.org/show_bug.cgi?id=146639
367
368         Reviewed by Žan Doberšek.
369
370         In r185415 I assumed that preedit signals were always emitted
371         after a keypress was handled by the WebView. However, some input
372         methods handle the keyboard events before the WebView, and preedit
373         signals are emitted but no key event has been handled by the
374         WebView. So, instead of asserting when filter key event completion
375         handler is nullptr, we should check whether the current event was
376         generated for a WebView filter request or not. In case the
377         completion handler is nullptr, we send the event directly to the
378         page, instead of going through the WebView, since there won't be
379         editing commands for those events anyway.
380
381         * UIProcess/gtk/InputMethodFilter.cpp:
382         (WebKit::InputMethodFilter::handleKeyboardEvent):
383         (WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults):
384
385 2015-07-15  Carlos Garcia Campos  <cgarcia@igalia.com>
386
387         Unreviewed. Follow up to r186887 for GTK+.
388
389         Add GTK+ implementation of PageClientImpl::refView/derefView.
390
391         * UIProcess/API/gtk/PageClientImpl.cpp:
392         (WebKit::PageClientImpl::refView):
393         (WebKit::PageClientImpl::derefView):
394         * UIProcess/API/gtk/PageClientImpl.h:
395
396 2015-07-15  Carlos Garcia Campos  <cgarcia@igalia.com>
397
398         [GTK] Input method filter is always enabled when the view is focused
399         https://bugs.webkit.org/show_bug.cgi?id=146965
400
401         Reviewed by Martin Robinson.
402
403         It should only be enabled when the view is focused and there's an
404         editable element focused. In r138544, when input methods were
405         implemented, the message SetInputMethodState was added, but it was
406         never used. Instead, the notifyFocusIn method of the IM filter
407         enables the input method unconditionally. We should actually use
408         the SetInputMethodState message to enable/disable input methods
409         when editable elements are focused/unfocused.
410
411         * UIProcess/gtk/InputMethodFilter.cpp:
412         (WebKit::InputMethodFilter::setEnabled): Call notifyFocusedIn/Out
413         when inputs methods are enabled/disabled instead of notifying the
414         IM context directly.
415         (WebKit::InputMethodFilter::setCursorRect): Do not update the
416         cursor position if input methods are didabled.
417         (WebKit::InputMethodFilter::notifyFocusedIn): Do nothing when
418         input methods are disabled. Do not enable input methods
419         uncontionally here.
420         (WebKit::InputMethodFilter::notifyFocusedOut): Do not disable
421         input methods uncontionally here.
422         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
423         (WebKit::WebEditorClient::setInputMethodState): Call
424         WebPage::setInputMethodState() for GTK platform.
425         * WebProcess/WebPage/WebPage.h: Add setInputMethodState() for GTK platform.
426         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
427         (WebKit::WebPage::setInputMethodState): Update input method state
428         and send SetInputMethodState message to the UI process if state changed.
429
430 2015-07-15  Brady Eidson  <beidson@apple.com>
431
432         REGRESSION(r186088): Crash under WebKit::WebPageProxy::didFailLoadForFrame
433         <rdar://problem/21692212> and https://bugs.webkit.org/show_bug.cgi?id=146988
434
435         Reviewed by Sam Weinig.
436
437         When a loader delegate callback results in the WKView getting deallocated, then the PageClient
438         is also destroyed.
439
440         WebPageProxy then (often) turns around and uses the PageClient anyways.
441
442         Tried to write a TestWebKitAPI test for this, but only didFailLoadForFrame appears to obviously 
443         be vulnerable, and there seems to be no way to reproduce that failure case under TestWebKitAPI.
444
445         * UIProcess/PageClient.h: Add ref/derefView.
446
447         * UIProcess/API/gtk/PageClientImpl.h: Stub them out.
448         * UIProcess/efl/WebViewEfl.h: Stub them out.
449
450         * UIProcess/mac/PageClientImpl.h:
451         * UIProcess/mac/PageClientImpl.mm:
452         (WebKit::PageClientImpl::refView): [m_wkView retain]
453         (WebKit::PageClientImpl::derefView): [m_wkView release]
454
455         * UIProcess/ios/PageClientImplIOS.h:
456         * UIProcess/ios/PageClientImplIOS.mm:
457         (WebKit::PageClientImpl::refView): Retain all 3 views.
458         (WebKit::PageClientImpl::derefView): Release all 3 views.
459
460         * UIProcess/WebPageProxy.cpp:
461         (WebKit::PageClientProtector::PageClientProtector): Calls refView() on the PageClient.
462         (WebKit::PageClientProtector::~PageClientProtector): Calls derefView() on the PageClient.
463         (WebKit::WebPageProxy::didChangeBackForwardList): All methods that make m_loaderClient or
464           m_pageClient callouts get a protector at their head.
465         (WebKit::WebPageProxy::willGoToBackForwardListItem):
466         (WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
467         (WebKit::WebPageProxy::findPlugin):
468         (WebKit::WebPageProxy::didCreateMainFrame):
469         (WebKit::WebPageProxy::didCreateSubframe):
470         (WebKit::WebPageProxy::didStartProgress):
471         (WebKit::WebPageProxy::didChangeProgress):
472         (WebKit::WebPageProxy::didFinishProgress):
473         (WebKit::WebPageProxy::didDestroyNavigation):
474         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
475         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
476         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
477         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
478         (WebKit::WebPageProxy::didCommitLoadForFrame):
479         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
480         (WebKit::WebPageProxy::didFinishLoadForFrame):
481         (WebKit::WebPageProxy::didFailLoadForFrame):
482         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
483         (WebKit::WebPageProxy::didReceiveTitleForFrame):
484         (WebKit::WebPageProxy::didFirstLayoutForFrame):
485         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
486         (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
487         (WebKit::WebPageProxy::didLayout):
488         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
489         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
490         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
491         (WebKit::WebPageProxy::didDetectXSSForFrame):
492         (WebKit::WebPageProxy::frameDidBecomeFrameSet):
493         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
494         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
495         (WebKit::WebPageProxy::decidePolicyForResponse):
496         (WebKit::WebPageProxy::decidePolicyForResponseSync):
497         (WebKit::WebPageProxy::unableToImplementPolicy):
498         (WebKit::WebPageProxy::didNavigateWithNavigationData):
499         (WebKit::WebPageProxy::didPerformClientRedirect):
500         (WebKit::WebPageProxy::didPerformServerRedirect):
501         (WebKit::WebPageProxy::didUpdateHistoryTitle):
502         (WebKit::WebPageProxy::wrapCryptoKey):
503         (WebKit::WebPageProxy::unwrapCryptoKey):
504         (WebKit::WebPageProxy::navigationGestureDidBegin):
505         (WebKit::WebPageProxy::navigationGestureWillEnd):
506         (WebKit::WebPageProxy::navigationGestureDidEnd):
507         (WebKit::WebPageProxy::willRecordNavigationSnapshot):
508
509 2015-07-15  Sam Weinig  <sam@webkit.org>
510
511         Color match plug-ins
512         <rdar://problem/21758722>
513         https://bugs.webkit.org/show_bug.cgi?id=146987
514
515         Reviewed by Dean Jackson.
516
517         * Platform/mac/LayerHostingContext.h:
518         * Platform/mac/LayerHostingContext.mm:
519         (WebKit::LayerHostingContext::setColorMatchUntaggedContent):
520         (WebKit::LayerHostingContext::colorMatchUntaggedContent):
521         Add setter/getter for color matching untagged content.
522
523         * PluginProcess/mac/PluginControllerProxyMac.mm:
524         (WebKit::PluginControllerProxy::updateLayerHostingContext):
525         Have plug-ins CAContext's color match untagged colors into sRGB.
526
527 2015-07-15  Michael Catanzaro  <mcatanzaro@igalia.com>
528
529         [GTK] Rename PACKAGE_LOCALE_DIR to LOCALEDIR
530         https://bugs.webkit.org/show_bug.cgi?id=146975
531
532         Reviewed by Martin Robinson.
533
534         * PlatformGTK.cmake:
535         * UIProcess/API/gtk/WebKitWebContext.cpp:
536         (webkit_web_context_class_init):
537         * WebProcess/gtk/WebProcessMainGtk.cpp:
538
539 2015-07-15  Michael Catanzaro  <mcatanzaro@igalia.com>
540
541         [GTK] Rename LIBEXECDIR to PKGLIBEXECDIR
542         https://bugs.webkit.org/show_bug.cgi?id=140070
543
544         Reviewed by Martin Robinson.
545
546         The path that's currently stored in LIBEXECDIR is one level lower than
547         the real LIBEXECDIR, which we are going to need. Introduce PKGLIBEXECDIR
548         so that we can use LIBEXECDIR for the real LIBEXECDIR in the future.
549
550         * PlatformGTK.cmake:
551         * Shared/gtk/ProcessExecutablePathGtk.cpp:
552         (WebKit::findWebKitProcess):
553
554 2015-07-15  Daniel Bates  <dabates@apple.com>
555
556         [Mac][WK2] Videos should only have access to cookies when -[NSURLRequest HTTPShouldHandleCookies] is YES
557         https://bugs.webkit.org/show_bug.cgi?id=146763
558         <rdar://problem/21736994>
559
560         Reviewed by Darin Adler.
561
562         We should only fetch cookies from the Network process when -[NSURLRequest HTTPShouldHandleCookies] is YES.
563         This makes us more closely match the behavior of the CFNetwork implementation of
564         -[__NSURLSessionLocal {_copyCookiesForRequestUsingAllAppropriateStorageSemantics, _getCookieHeadersForTask:completionHandler}].
565
566         * Shared/mac/CookieStorageShim.mm:
567         (-[WKNSURLSessionLocal _copyCookiesForRequestUsingAllAppropriateStorageSemantics:]):
568         (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
569
570 2015-07-14  Enrica Casucci  <enrica@apple.com>
571
572         [iOS] Add support for updateSelectionWithExtentPoint:withBoundary.
573         https://bugs.webkit.org/show_bug.cgi?id=146951
574         rdar://problem/20864286
575
576         Reviewed by Tim Horton.
577
578         Add implementation for new method used by text selection
579         engine on iOS. The new function modifies the selection near the given point
580         and snaps it at the boundary of the specified granularity.
581
582         * UIProcess/WebPageProxy.h:
583         * UIProcess/ios/WKContentViewInteraction.mm:
584         (-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
585         (-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]):
586         (-[WKContentView _characterBeforeCaretSelection]):
587         * UIProcess/ios/WebPageProxyIOS.mm:
588         (WebKit::WebPageProxy::updateSelectionWithExtentPoint):
589         (WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
590         (WebKit::WebPageProxy::requestDictationContext):
591         * WebProcess/WebPage/WebPage.h:
592         * WebProcess/WebPage/WebPage.messages.in:
593         * WebProcess/WebPage/ios/WebPageIOS.mm:
594         (WebKit::WebPage::rangeForGranularityAtPoint):
595         (WebKit::WebPage::selectTextWithGranularityAtPoint):
596         (WebKit::WebPage::updateSelectionWithExtentPointAndBoundary):
597
598 2015-07-15  Michael Catanzaro  <mcatanzaro@igalia.com>
599
600         [Linux] SeccompBrokerClient should cache arbitrary file descriptors
601         https://bugs.webkit.org/show_bug.cgi?id=140068
602
603         Reviewed by Žan Doberšek.
604
605         If malloc() attempts to open /proc/sys/vm/overcommit_memory in a SIGSYS
606         signal handler, the SeccompBroker will attempt to recursively broker the
607         open() syscall. Generalize the existing code that already handles the
608         similar case where malloc() opens /sys/devices/system/cpu/online to
609         handle this situation as well.
610
611         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
612         (WebKit::SIGSYSHandler):
613         (WebKit::SeccompBrokerClient::SeccompBrokerClient):
614         (WebKit::SeccompBrokerClient::~SeccompBrokerClient):
615         (WebKit::SeccompBrokerClient::handleIfOpeningCachedFile):
616         (WebKit::SeccompBrokerClient::cacheFile):
617         (WebKit::SeccompBrokerClient::handleIfOpeningOnlineCPUCount): Deleted.
618
619 2015-07-15  ChangSeok Oh  <changseok.oh@collabora.com>
620
621         [GTK] Accelerated compositing is enabled by MiniBrowser in Wayland
622         https://bugs.webkit.org/show_bug.cgi?id=146827
623
624         Reviewed by Žan Doberšek.
625
626         WebKit2Gtk+ does not currently support accelerated compositing. For the reason,
627         we forcedly disable it in webkitWebViewBaseCreateWebPage. However, when we launch
628         MiniBrowser in wayland, the unsupported feature is re-enabled since the existing
629         setting is overwritten by a newly created one. Here the default value for
630         accelerated compositing is true. We can fix this by moving the code disabling
631         accelerated composition to WebPreferences::platformInitializeStore() so that
632         we make sure the accelerated compositing is always disabled for wayland.
633
634         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
635         (webkitWebViewBaseCreateWebPage): Deleted.
636         * UIProcess/gtk/WebPreferencesGtk.cpp:
637         (WebKit::WebPreferences::platformInitializeStore):
638
639 2015-07-15  Dan Bernstein  <mitz@apple.com>
640
641         Fixed build fix.
642
643         * Platform/spi/ios/SafariServicesSPI.h:
644
645 2015-07-14  Ryuan Choi  <ryuan.choi@navercorp.com>
646
647         [CoordinatedGraphics] Possible wrong rendering with scrolling
648         https://bugs.webkit.org/show_bug.cgi?id=146958
649
650         Reviewed by Gyuyoung Kim.
651
652         While r174261 fixing build break, there is some mistake that flushes contents layer
653         instead of overlay layer.
654
655         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
656         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
657
658 2015-07-14  Dan Bernstein  <mitz@apple.com>
659
660         Attempted build fixes.
661
662         * Platform/spi/ios/SafariServicesSPI.h:
663
664 2015-07-14  Dan Bernstein  <mitz@apple.com>
665
666         Attempted build fixes.
667
668         * Platform/spi/ios/SafariServicesSPI.h:
669
670 2015-07-14  Anders Carlsson  <andersca@apple.com>
671
672         Remove wkPopupMenu from WebCoreSystemInterface; it's not called from WebCore
673         https://bugs.webkit.org/show_bug.cgi?id=146945
674
675         Reviewed by Tim Horton.
676
677         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
678         (InitWebCoreSystemInterface): Deleted.
679
680 2015-07-14  Anders Carlsson  <andersca@apple.com>
681
682         Release assert under StyleResolver::loadPendingImages() caused by MemoryPressureHandler
683         https://bugs.webkit.org/show_bug.cgi?id=146940
684         rdar://problem/21605505
685
686         Reviewed by Sam Weinig.
687
688         * WebProcess/WebProcess.cpp:
689         (WebKit::WebProcess::processWillSuspendImminently):
690
691 2015-07-14  Sam Weinig  <sam@webkit.org>
692
693         WebKit needs to serialize numeric values in NSError userInfo
694         <rdar://problem/21818117>
695         https://bugs.webkit.org/show_bug.cgi?id=146936
696
697         Reviewed by Anders Carlsson.
698
699         * Shared/mac/WebCoreArgumentCodersMac.mm:
700         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
701         Encode userInfo values that are NSNumbers in addition to NSStrings and NSURLs. Decoding 
702         is already handled.
703
704 2015-07-14  Michael Catanzaro  <mcatanzaro@igalia.com>
705
706         [Linux] SeccompFilters: whitelist all NPAPI plugin directories
707         https://bugs.webkit.org/show_bug.cgi?id=140067
708
709         Reviewed by Žan Doberšek.
710
711         * PlatformEfl.cmake: Build PluginSearchPath.cpp
712         * PlatformGTK.cmake: Build PluginSearchPath.cpp
713         * Shared/Plugins/unix/PluginSearchPath.cpp: Added.
714         (WebKit::pluginsDirectories): Moved from PluginInfoStoreUnix.cpp.
715         * Shared/Plugins/unix/PluginSearchPath.h: Added.
716         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
717         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy): Add the entire
718         plugin search path to the whitelist.
719         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
720         (WebKit::PluginInfoStore::pluginsDirectories): Now gets plugins
721         directories from PluginSearchPath.cpp
722
723 2015-07-14  Yongjun Zhang  <yongjun_zhang@apple.com>
724
725         https://bugs.webkit.org/show_bug.cgi?id=146917
726         iOS WebKit doesn't build.
727         rdar://problem/21801544
728
729         Fix the build - don't use deprecated methods.
730
731         Reviewed by Dan Bernstein.
732
733         * UIProcess/ios/WKContentViewInteraction.h:
734         * UIProcess/ios/WKContentViewInteraction.mm:
735         (-[WKContentView _registerPreviewInWindow:]):
736         (-[WKContentView _unregisterPreviewInWindow:]):
737
738 2015-07-14  Yongjun Zhang  <yongjun_zhang@apple.com>
739
740         https://bugs.webkit.org/show_bug.cgi?id=146909
741         Add actions for default link preview that uses SFSafariViewController.
742
743         Use the new private properties to prepare actions for the default link preview controller.
744
745         Reviewed by Dan Bernstein.
746
747         * UIProcess/ios/WKContentViewInteraction.mm:
748         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
749
750 2015-07-14  Michael Catanzaro  <mcatanzaro@igalia.com>
751
752         [Linux] SeccompFilters: whitelist source directory on all ports
753         https://bugs.webkit.org/show_bug.cgi?id=140066
754
755         Reviewed by Žan Doberšek.
756
757         Move this from EFL to port-independent code.
758
759         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
760         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
761         * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp:
762         (WebKit::SeccompFiltersWebProcessEfl::platformInitialize):
763
764 2015-07-14  Zan Dobersek  <zdobersek@igalia.com>
765
766         [GTK] Add a runtime check for X11 display in webkitWebViewBaseExitAcceleratedCompositingMode()
767         https://bugs.webkit.org/show_bug.cgi?id=146711
768
769         Reviewed by Carlos Garcia Campos.
770
771         webkitWebViewBaseExitAcceleratedCompositingMode() is already guarded with
772         X11 build guards, but it should also do a runtime check that the program
773         is running under an X11 display before proceeding.
774
775         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
776         (webkitWebViewBaseDidRelaunchWebProcess):
777
778 2015-07-13  Matt Rajca  <mrajca@apple.com>
779
780         Media Session: add plumbing for delivering start/end-of-interruption events
781         https://bugs.webkit.org/show_bug.cgi?id=146837
782
783         Reviewed by Tim Horton.
784
785         * UIProcess/API/C/WKPage.cpp:
786         (WKPageHandleMediaSessionInterruptionEvent):
787         * UIProcess/API/C/WKPagePrivate.h:
788         * UIProcess/WebPageProxy.cpp:
789         (WebKit::WebPageProxy::handleMediaSessionInterruptionEvent):
790         * UIProcess/WebPageProxy.h:
791         * WebProcess/WebPage/WebPage.cpp:
792         (WebKit::WebPage::handleMediaSessionInterruptionEvent):
793         * WebProcess/WebPage/WebPage.h:
794         * WebProcess/WebPage/WebPage.messages.in:
795
796 2015-07-13  Simon Fraser  <simon.fraser@apple.com>
797
798         [iOS WK2] When choosing an initial viewport scale, take overflow on the <body> into account
799         https://bugs.webkit.org/show_bug.cgi?id=146918
800         rdar://problem/9222837
801
802         Reviewed by Tim Horton.
803
804         Use as input to the viewport scaling algorithm a contents size from the FrameView
805         that takes overflow on the viewport renderer into account. This prevents unexpected
806         viewports scaling on pages that have content that overflows their expressed contents size,
807         but apply overflow to the <body>.
808
809         * WebProcess/WebPage/WebPage.cpp:
810         (WebKit::WebPage::mainFrameDidLayout): Use contentsSizeRespectingOverflow(),
811         rather than raw contentsSize(), to determine scaling.
812
813 2015-07-13  Dan Bernstein  <mitz@apple.com>
814
815         Fixed the build.
816
817         * UIProcess/ios/WKContentViewInteraction.mm:
818         (-[WKContentView _registerPreviewInWindow:]):
819         (-[WKContentView _unregisterPreviewInWindow:]):
820
821 2015-07-13  Dan Bernstein  <mitz@apple.com>
822
823         Removed now-unused SPI -[WKWebView _loadRequest:withOptions:].
824
825         Rubber-stamped by Anders Carlsson.
826
827         * UIProcess/API/Cocoa/WKWebView.mm:
828         (-[WKWebView _loadRequest:withOptions:]): Deleted.
829         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
830
831 2015-07-13  Anders Carlsson  <andersca@apple.com>
832
833         Apps linked with a deployment target of iOS 7.x or earlier crash when using modern WebKit API
834         https://bugs.webkit.org/show_bug.cgi?id=146913
835         rdar://problem/21789252
836
837         Reviewed by Dan Bernstein.
838
839         Make a top-level symlink from /System/Library/PrivateFrameworks/WebKit.framework to
840         /System/Library/Frameworks/WebKit.framework.
841
842         * WebKit2.xcodeproj/project.pbxproj:
843
844 2015-07-13  Anders Carlsson  <andersca@apple.com>
845
846         Silverlight causes tabs to hang
847         https://bugs.webkit.org/show_bug.cgi?id=146912
848         rdar://problem/21686508
849
850         Reviewed by Sam Weinig.
851
852         Make sure to link production builds of the legacy plug-in process against the shim on 10.11 and newer.
853
854         * Configurations/PluginProcess.xcconfig:
855
856 2015-07-13  Michael Catanzaro  <mcatanzaro@igalia.com>
857
858         [Linux] SeccompFilters: handle alternate install prefixes
859         https://bugs.webkit.org/show_bug.cgi?id=140065
860
861         Reviewed by Žan Doberšek.
862
863         If the install prefix is something other than /usr, e.g. /usr/local or
864         ~/jhbuild/install, then we want to make sure to allow libraries and data
865         from that prefix.
866
867         * PlatformEfl.cmake:
868         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
869         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
870
871 2015-07-13  Carlos Garcia Campos  <cgarcia@igalia.com>
872
873         [GTK] Contents not correctly laid out when the web view is not realized
874         https://bugs.webkit.org/show_bug.cgi?id=142532
875
876         Reviewed by Darin Adler.
877
878         The problem is that we are not reporting any size until the web
879         view is realized, so any web view loaded in a separate tab in the
880         browser, will report 0x0 as the window.innerWidth,
881         window.innerHeight until the view is realized. Websites that use
882         the window.innerWidth/innerHeight during the page load to decide
883         how to lay out the contents will be rendered wrongly.
884         I haven't been able to reproduce this with unit tests, as this
885         requires the particular case of same window but different web
886         views using tabs for example.
887
888         * UIProcess/API/gtk/PageClientImpl.cpp:
889         (WebKit::PageClientImpl::viewSize): Always report the drawing area
890         size to make usre it's in sync with the WebProcess page size.
891         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
892         (webkitWebViewBaseSizeAllocate): Remove the optimization of only
893         report the size when it has changed, since both the redirected
894         window and the drawing area already do that check. Also remove the
895         optimization of waiting until the view is mapped to report its
896         size, since that's often too late for websites using the window
897         size during load.
898         (webkitWebViewBaseMap): Never report size on map, it should have
899         already been reported by size-allocate.
900
901 2015-07-11  Nikita Vasilyev  <nvasilyev@apple.com>
902
903         Web Inspector: Inspector should be able to be docked to the bottom of a narrow window
904         https://bugs.webkit.org/show_bug.cgi?id=146871
905
906         Reviewed by Timothy Hatcher.
907
908         * UIProcess/WebInspectorProxy.cpp:
909         * UIProcess/mac/WebInspectorProxyMac.mm:
910         (WebKit::WebInspectorProxy::platformCanAttach):
911         * WebProcess/WebPage/WebInspector.cpp:
912
913 2015-07-11  Joseph Pecoraro  <pecoraro@apple.com>
914
915         Allow clients to opt-out of default app link link actions
916         https://bugs.webkit.org/show_bug.cgi?id=146883
917         <rdar://problem/21221902>
918
919         Reviewed by Dan Bernstein.
920
921         * UIProcess/API/APIUIClient.h:
922         (API::UIClient::shouldIncludeAppLinkActionsForElement):
923         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
924         * UIProcess/Cocoa/UIDelegate.h:
925         * UIProcess/Cocoa/UIDelegate.mm:
926         (WebKit::UIDelegate::setDelegate):
927         (WebKit::UIDelegate::UIClient::shouldIncludeAppLinkActionsForElement):
928         Plumbing for a new delegate message to ask the client if they
929         would like app link actions or not. Default is yes.
930
931         * UIProcess/ios/WKActionSheetAssistant.h:
932         * UIProcess/ios/WKActionSheetAssistant.mm:
933         (-[WKActionSheetAssistant showImageSheet]):
934         (-[WKActionSheetAssistant showLinkSheet]):
935         (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
936         (-[WKActionSheetAssistant defaultActionsForImageSheet:]):
937         Pass elementInfo into methods generating default actions.
938         
939         (-[WKActionSheetAssistant _appendOpenActionsForURL:actions:elementInfo:]):
940         When generating open actions, if the process has AppLink capabilities
941         ask the client if they want to include AppLink actions or fall back
942         to the basic Open action.
943
944         * UIProcess/ios/WKContentViewInteraction.mm:
945         (-[WKContentView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
946         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
947         * UIProcess/ios/WKPDFView.mm:
948         (-[WKPDFView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
949         Assistant delegate implementations forward to the UIDelegate.
950
951 2015-07-11  Joseph Pecoraro  <pecoraro@apple.com>
952
953         Update default link action sheets for app links
954         https://bugs.webkit.org/show_bug.cgi?id=146658
955         <rdar://problem/21221902>
956
957         Reviewed by Dan Bernstein.
958
959         * Shared/mac/SandboxUtilities.h:
960         * Shared/mac/SandboxUtilities.mm: Renamed from Source/WebKit2/Shared/mac/SandboxUtilities.cpp.
961         (WebKit::processHasEntitlement):
962         * UIProcess/ApplicationStateTracker.mm:
963         (WebKit::applicationType):
964         (WebKit::hasEntitlement): Deleted.
965         * WebKit2.xcodeproj/project.pbxproj:
966         Share a helper for checking if the current process has an entitlement.
967
968         * UIProcess/API/Cocoa/_WKElementAction.h:
969         * UIProcess/API/Cocoa/_WKElementAction.mm:
970         (+[_WKElementAction _elementActionWithType:title:actionHandler:]):
971         (+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
972         * UIProcess/API/Cocoa/_WKElementActionInternal.h:
973         Add an internal way to make an element action with a standard type and regular handler.
974         We use this for the new standard types that don't have a default implementation.
975
976         * UIProcess/ios/WKActionSheetAssistant.mm:
977         (applicationHasAppLinkEntitlements):
978         (appLinkForURL):
979         Helpers checking access to app links and fetching app links.
980
981         (-[WKActionSheetAssistant _appendOpenActionsForURL:actions:]):
982         (-[WKActionSheetAssistant defaultActionsForLinkSheet]):
983         (-[WKActionSheetAssistant defaultActionsForImageSheet]):
984         Create "Open in Safari" and "Open in 'App'" default actions for AppLinks,
985         otherwise add the normal default "Open" action.
986
987 2015-07-11  Enrica Casucci  <enrica@apple.com>
988
989         Remove incorrect overriding of inputAssistantItem in WKContentView.
990         https://bugs.webkit.org/show_bug.cgi?id=146863
991         rdar://problem/21507154
992
993         Reviewed by Sam Weinig.
994
995         Correction to the patch in r186713.
996         We need to provide the inputAssistantItem from the responder.
997
998         * UIProcess/ios/WKContentViewInteraction.mm:
999         (-[WKContentView inputAccessoryView]):
1000
1001 2015-07-11  Commit Queue  <commit-queue@webkit.org>
1002
1003         Unreviewed, rolling out r186689 and r186710.
1004         https://bugs.webkit.org/show_bug.cgi?id=146880
1005
1006         May have caused a PLT regression and broken a layout test
1007         (Requested by cdumez on #webkit).
1008
1009         Reverted changesets:
1010
1011         "[WK2] Increase the QoS of some of our WorkQueues to match the
1012         one of our processes"
1013         https://bugs.webkit.org/show_bug.cgi?id=146855
1014         http://trac.webkit.org/changeset/186689
1015
1016         "REGRESSION (r186689?): fast/frames/frame-limit.html timeout
1017         on Mavericks {Release,Debug} WK2 bots"
1018         https://bugs.webkit.org/show_bug.cgi?id=146876
1019         http://trac.webkit.org/changeset/186710
1020
1021 2015-07-10  Enrica Casucci  <enrica@apple.com>
1022
1023         Remove incorrect overriding of inputAssistantItem in WKContentView.
1024         https://bugs.webkit.org/show_bug.cgi?id=146863
1025         rdar://problem/21507154
1026
1027         Reviewed by Dan Bernstein.
1028
1029         Removing implementation of inputAssistantItem and moving initialization
1030         of formAccessoryView to inputAccessoryView to avoid interfering with
1031         the keyboard handling of the assistant bar.
1032
1033         * UIProcess/ios/WKContentViewInteraction.mm:
1034         (-[WKContentView inputAccessoryView]):
1035         (-[WKContentView inputAssistantItem]): Deleted.
1036         (-[WKContentView _inputAssistantItem]): Deleted.
1037
1038 2015-07-10  Simon Fraser  <simon.fraser@apple.com>
1039
1040         [iOS WK2] Scrolling issues on horizontally scrollable RTL pages
1041         https://bugs.webkit.org/show_bug.cgi?id=146872
1042         rdar://problem/7569416
1043
1044         Reviewed by Sam Weinig.
1045
1046         Horizontally scrollable RTL pages in WebKit2 had a variety of issues: they had
1047         a gap down the right edge, and unreachable content on the left side, focussing
1048         form fields scrolled to the wrong location, and programmatic scrolls scrolled
1049         to the wrong place.
1050         
1051         Fix by plumbing the WebCore notion of scrollOrigin through to the UI process,
1052         and using it in various places. There are three main aspects to the patch:
1053         
1054         1. scroll origin is included in RemoteLayerTreeTransaction, and plumbed through
1055            to -[WKWebView _scrollToContentOffset:] for correct programmatic scrolling,
1056            including zooming to focused form elements. The WKContentView's boundsOrigin
1057            is set to the scroll origin so that the view coordinates match document coordinates.
1058         2. WebPageProxy::computeCustomFixedPositionRect() uses the actual documentRect()
1059            rather than just conjuring up a rect with a zero origin, which makes position:fixed
1060            work correctly.
1061         3. _interactionViewsContainerView (which hosts tap highlights) is positioned to 
1062            coincide with the origin of the documentRect (i.e. at the scroll origin, which
1063            may not be top-left). This allows tap highlights to show in the correct location.
1064         4. ScrollView::unobscuredContentRect() is fixed to take scroll origin into account;
1065            if the returned rect is wrong, RenderLayer::hitTest() incorrectly clips the hit
1066            testing area.
1067
1068         * Shared/mac/RemoteLayerTreeTransaction.h:
1069         (WebKit::RemoteLayerTreeTransaction::scrollOrigin):
1070         (WebKit::RemoteLayerTreeTransaction::setScrollOrigin):
1071         * Shared/mac/RemoteLayerTreeTransaction.mm:
1072         (WebKit::RemoteLayerTreeTransaction::encode):
1073         (WebKit::RemoteLayerTreeTransaction::decode):
1074         (WebKit::RemoteLayerTreeTransaction::description): Dump some more info.
1075         * UIProcess/API/Cocoa/WKWebView.mm:
1076         (-[WKWebView _scrollToContentOffset:scrollOrigin:]):
1077         (-[WKWebView _scrollToContentOffset:]): Deleted.
1078         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1079         * UIProcess/API/gtk/PageClientImpl.cpp:
1080         (WebKit::PageClientImpl::requestScroll):
1081         * UIProcess/API/gtk/PageClientImpl.h:
1082         * UIProcess/CoordinatedGraphics/WebView.cpp:
1083         (WebKit::WebView::requestScroll):
1084         * UIProcess/CoordinatedGraphics/WebView.h:
1085         * UIProcess/PageClient.h:
1086         * UIProcess/WebPageProxy.cpp:
1087         (WebKit::WebPageProxy::requestScroll):
1088         * UIProcess/WebPageProxy.h:
1089         * UIProcess/ios/PageClientImplIOS.h:
1090         * UIProcess/ios/PageClientImplIOS.mm:
1091         (WebKit::PageClientImpl::requestScroll):
1092         (WebKit::PageClientImpl::documentRect):
1093         (WebKit::PageClientImpl::contentsSize): Deleted.
1094         * UIProcess/ios/WKContentView.mm:
1095         (-[WKContentView _didCommitLayerTree:]):
1096         * UIProcess/ios/WebPageProxyIOS.mm:
1097         (WebKit::WebPageProxy::computeCustomFixedPositionRect):
1098         * UIProcess/mac/PageClientImpl.h:
1099         * UIProcess/mac/PageClientImpl.mm:
1100         (WebKit::PageClientImpl::requestScroll):
1101         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1102         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1103         * WebProcess/WebPage/WebPage.cpp:
1104         (WebKit::WebPage::willCommitLayerTree):
1105
1106 2015-07-10  Chris Dumez  <cdumez@apple.com>
1107
1108         [WK2] Diagnostic logging messages are causing too much IPC
1109         https://bugs.webkit.org/show_bug.cgi?id=146873
1110         <rdar://problem/21779205>
1111
1112         Reviewed by Ryosuke Niwa.
1113
1114         Diagnostic logging messages are causing too much IPC. To address the
1115         problem, we now do the sampling of the senders' side (WebContent
1116         process and Networking process) instead of the receiver's side
1117         (UIProcess).
1118
1119         * NetworkProcess/NetworkProcess.cpp:
1120         (WebKit::NetworkProcess::logDiagnosticMessage):
1121         (WebKit::NetworkProcess::logDiagnosticMessageWithResult):
1122         (WebKit::NetworkProcess::logDiagnosticMessageWithValue):
1123         * UIProcess/Network/NetworkProcessProxy.cpp:
1124         (WebKit::NetworkProcessProxy::logSampledDiagnosticMessage):
1125         (WebKit::NetworkProcessProxy::logSampledDiagnosticMessageWithResult):
1126         (WebKit::NetworkProcessProxy::logSampledDiagnosticMessageWithValue):
1127         * UIProcess/Network/NetworkProcessProxy.h:
1128         * UIProcess/Network/NetworkProcessProxy.messages.in:
1129         * UIProcess/WebPageProxy.cpp:
1130         (WebKit::WebPageProxy::logDiagnosticMessage):
1131         (WebKit::WebPageProxy::logDiagnosticMessageWithResult):
1132         (WebKit::WebPageProxy::logDiagnosticMessageWithValue):
1133         (WebKit::WebPageProxy::logSampledDiagnosticMessage):
1134         (WebKit::WebPageProxy::logSampledDiagnosticMessageWithResult):
1135         (WebKit::WebPageProxy::logSampledDiagnosticMessageWithValue):
1136         * UIProcess/WebPageProxy.h:
1137         * UIProcess/WebPageProxy.messages.in:
1138         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
1139         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
1140         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
1141         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
1142
1143 2015-07-10  Dean Jackson  <dino@apple.com>
1144
1145         Airplay button and placeholder are missing in inline controls
1146         https://bugs.webkit.org/show_bug.cgi?id=146869
1147         <rdar://problem/21555051>
1148
1149         Reviewed by Simon Fraser.
1150
1151         Fix a typo in the ENABLE that was causing the Airplay
1152         setting (allowsAirPlayForMediaPlayback, which becomes
1153         webkitWirelessVideoPlaybackDisabled) to default to false.
1154
1155         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1156         (-[WKWebViewConfiguration init]): Change WIRELESS_TARGET_PLAYBACK
1157         to WIRELESS_PLAYBACK_TARGET.
1158
1159 2015-07-10  Tim Horton  <timothy_horton@apple.com>
1160
1161         Use CoreAnimation fences instead of synchronous IPC to synchronize resize
1162         https://bugs.webkit.org/show_bug.cgi?id=146294
1163         <rdar://problem/21090193>
1164
1165         Reviewed by Anders Carlsson.
1166
1167         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1168         (WebKit::TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate):
1169         Tiny followup; don't touch Connection if the connection isn't valid.
1170
1171 2015-07-10  Chris Dumez  <cdumez@apple.com>
1172
1173         [WK2] Increase the QoS of some of our WorkQueues to match the one of our processes
1174         https://bugs.webkit.org/show_bug.cgi?id=146855
1175
1176         Reviewed by Anders Carlsson.
1177
1178         Increase the QoS of some of our WorkQueues to match the one of our processes. For
1179         e.g., even though the WebContent and the Networking processes have USER_UNITIATED
1180         QoS, the IPC between them is using a WorkQueue with DEFAULT QoS. Similarly, the
1181         WorkQueue used for network cache reads has DEFAULT QoS.
1182
1183         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1184         (WebKit::NetworkCache::Storage::Storage):
1185         * Platform/IPC/Connection.cpp:
1186         (IPC::Connection::Connection):
1187
1188 2015-07-10  Zalan Bujtas  <zalan@apple.com>
1189
1190         Crash at WebCore::WebPage::innerFrameQuad.
1191         https://bugs.webkit.org/show_bug.cgi?id=146843
1192         rdar://problem/21501819
1193
1194         Reviewed by Andreas Kling.
1195
1196         We may end up with a null rootEditableElement() after calling Document::updateLayout().
1197
1198         Speculative fix. Not reproducible.
1199
1200         * WebProcess/WebPage/WebPage.h: Some const cleanup.
1201         * WebProcess/WebPage/ios/WebPageIOS.mm:
1202         (WebKit::innerFrameQuad): null check assistedNode.rootEditableElement()
1203         (WebKit::constrainPoint):
1204         (WebKit::WebPage::selectWithGesture):
1205         (WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
1206         (WebKit::WebPage::selectPositionAtPoint):
1207         (WebKit::WebPage::selectPositionAtBoundaryWithDirection):
1208         (WebKit::WebPage::selectTextWithGranularityAtPoint):
1209         (WebKit::WebPage::updateSelectionWithExtentPoint):
1210         (WebKit::WebPage::getPositionInformation):
1211
1212 2015-07-09  Jon Honeycutt  <jhoneycutt@apple.com>
1213
1214         [iOS] Document picker has overlapping icons on iPad
1215         https://bugs.webkit.org/show_bug.cgi?id=146808
1216         <rdar://problem/21251875>
1217
1218         Reviewed by Sam Weinig.
1219
1220         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1221         (-[WKFileUploadPanel documentMenu:didPickDocumentPicker:]):
1222         Don't show this UI as a popover on iPad; the default is a full screen
1223         form sheet.
1224
1225 2015-07-09  Dan Bernstein  <mitz@apple.com>
1226
1227         WebKit2 part of Track and expose policies for external URL schemes and App Links separately
1228         https://bugs.webkit.org/show_bug.cgi?id=146822
1229
1230         Reviewed by Anders Carlsson.
1231
1232         * Shared/NavigationActionData.cpp:
1233         (WebKit::NavigationActionData::encode):
1234         (WebKit::NavigationActionData::decode):
1235         * Shared/NavigationActionData.h:
1236           Replaced the shouldOpenExternalURLsPolicy boolean member with a
1237           shouldOpenExternalURLsPolicy member whose type is ShouldOpenExternalURLsPolicy, and
1238           updated encoding and decoding:
1239
1240         * UIProcess/API/APINavigationAction.h:
1241           Added shouldOpenAppLinks boolean to NavigationAction::create and the constructor. It
1242           augments the policy in the NavigationActionData with a valude decided in the UI process.
1243           Replaced shouldOpenExternalURLs() with shouldOpenExternalSchemes() and
1244           shouldOpenAppLinks() which check the policy and the new m_shouldOpenAppLinks boolean.
1245
1246         * UIProcess/API/Cocoa/WKNavigationAction.mm:
1247         (-[WKNavigationAction _shouldOpenExternalSchemes]): Getter for new property, calls through
1248           to the NavigationAction.
1249         (-[WKNavigationAction _shouldOpenAppLinks]): Ditto.
1250         (-[WKNavigationAction _shouldOpenExternalURLs]): Now deprecated and returns the
1251           _shouldOpenExternalSchemes value.
1252         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h: Declared new properties for the two
1253           policies and deprecated old property.
1254
1255         * UIProcess/Cocoa/NavigationState.mm:
1256         (WebKit::tryAppLink): Changed to use NavigationAction::shouldOpenAppLinks, which
1257           encapsulates logic that used to be here.
1258
1259         * UIProcess/Cocoa/UIDelegate.mm:
1260         (WebKit::UIDelegate::UIClient::createNewPage): Allow App Links (if already allowed by policy).
1261
1262         * UIProcess/WebPageProxy.cpp:
1263         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Moved logic from tryAppLink in
1264           NavigationState.mm here and pass the result to NavigationAction::create.
1265         (WebKit::WebPageProxy::decidePolicyForNewWindowAction): Allow App Links (if already allowed
1266           by policy).
1267         * UIProcess/WebPageProxy.h:
1268         (WebKit::WebPageProxy::loadRequest): Changed the default policy to not allow App Links (but
1269           still allow external schemes).
1270
1271         * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
1272         (WKBundleNavigationActionGetShouldTryAppLinks): Added this getter.
1273         * WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h:
1274
1275         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
1276         (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
1277         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
1278           Added m_shouldTryAppLinks boolean member, initialized from the policy. Updated the
1279           initialization of m_shouldOpenExternalURLs to account for the new policy.
1280
1281         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1282         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Pass the policy
1283           in the navigation data.
1284
1285 2015-07-09  Tim Horton  <timothy_horton@apple.com>
1286
1287         Use CoreAnimation fences instead of synchronous IPC to synchronize resize
1288         https://bugs.webkit.org/show_bug.cgi?id=146294
1289         <rdar://problem/21090193>
1290
1291         Reviewed by Anders Carlsson.
1292
1293         Because of changes in underlying frameworks, we can no longer depend on
1294         blocking the UI process main thread to be sufficient to synchronize
1295         UI process CA commits with commits coming from the Web process.
1296
1297         Instead, we have to use CoreAnimation fences to perform this synchronization.
1298         Instead of blocking inside waitForAndDispatchImmediately, we'll end up
1299         blocking during the CA commit.
1300
1301         * Platform/mac/LayerHostingContext.mm:
1302         Use HAVE(COREANIMATION_FENCES).
1303
1304         * Platform/IPC/Connection.cpp:
1305         (IPC::Connection::Connection):
1306         (IPC::Connection::processIncomingMessage):
1307         (IPC::Connection::installIncomingSyncMessageCallback):
1308         (IPC::Connection::uninstallIncomingSyncMessageCallback):
1309         Keep track of a set of incoming sync message callbacks, and fire them
1310         (on another queue) when a sync message arrives.
1311
1312         (IPC::Connection::hasIncomingSyncMessage):
1313         * Platform/IPC/Connection.h:
1314         Add a way to check if there are any sync messages in the queue.
1315
1316         * UIProcess/API/mac/WKView.mm:
1317         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
1318         (-[WKView waitForAsyncDrawingAreaSizeUpdate]):
1319         These are no longer used; do nothing on 10.10+.
1320
1321         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1322         (WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
1323         * WebProcess/WebPage/DrawingArea.h:
1324         (WebKit::DrawingArea::updateGeometry):
1325         * WebProcess/WebPage/DrawingArea.messages.in:
1326         * WebProcess/WebPage/WebPage.cpp:
1327         (WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
1328         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1329         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1330         (WebKit::RemoteLayerTreeDrawingArea::updateGeometry):
1331         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1332         Add a MachSendRight parameter to UpdateGeometry, so that we can send along
1333         a fence port with the geometry update if needed.
1334
1335         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1336         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
1337         Apply the incoming fence so that geometry changes will be synchronized between processes.
1338
1339         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1340         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
1341         Don't wait for DidUpdateGeometry to come in if we're using fences to achieve the same thing.
1342
1343         (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
1344         Create and block us on a fence and send it along with the geometry update.
1345         If a sync message is in the incoming message queue, don't create the fence;
1346         if a sync message comes in at any point after we've installed the fence (but
1347         before the relevant commit completes), invalidate the fence, so that we won't
1348         end up temorarily deadlocked waiting for the fence timeout.
1349
1350 2015-07-09  Michael Catanzaro  <mcatanzaro@igalia.com>
1351
1352         [GTK] Crash when spell checker returns no guesses
1353         https://bugs.webkit.org/show_bug.cgi?id=146805
1354
1355         Reviewed by Martin Robinson.
1356
1357         Properly handle ContextMenuItemTagNoGuessesFound in the switch statement.
1358
1359         * UIProcess/API/gtk/WebKitContextMenuActions.cpp:
1360         (webkitContextMenuActionGetForContextMenuItem):
1361
1362 2015-07-09  Alex Christensen  <achristensen@webkit.org>
1363
1364         [Content Extensions] Add 3 byte jump size.
1365         https://bugs.webkit.org/show_bug.cgi?id=146425
1366
1367         Reviewed by Darin Adler.
1368
1369         * UIProcess/API/APIUserContentExtensionStore.h:
1370         Increment CurrentContentExtensionFileVersion because of change in the bytecode.
1371
1372 2015-07-09  Anders Carlsson  <andersca@apple.com>
1373
1374         SafariViewController loads partial webpage or entirely blank webpage
1375         https://bugs.webkit.org/show_bug.cgi?id=146815
1376         rdar://problem/21734757
1377
1378         Reviewed by Dan Bernstein.
1379
1380         * Platform/spi/ios/UIKitSPI.h:
1381         Add _hostProcessIdentifier getter.
1382
1383         * UIProcess/ApplicationStateTracker.h:
1384         Change ApplicationStateTracker to hold on to a WKContentView instead of a UIView.
1385
1386         * UIProcess/ApplicationStateTracker.mm:
1387         (WebKit::applicationType):
1388         Add a helper function that returns the type of application the web view is hosted by (regular
1389         application, view service or extension).
1390
1391         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
1392         Register notifications and update m_isInBackground. For regular applications, just listen for UIApplication notifications.
1393         For view services, walk the view controller hierarchy and find the service view controller and listen for notifications and use
1394         BKS to find the background state of the host application. For extensions, just use BKSApplicationStateMonitor directly.
1395
1396         (WebKit::isViewService): Deleted.
1397
1398         * UIProcess/ios/WKContentView.mm:
1399         (-[WKContentView willMoveToWindow:]):
1400         If we're moving out of a window, null out the state tracker.
1401
1402         (-[WKContentView didMoveToWindow]):
1403         If we moved to a window, create a new state tracker.
1404
1405         (-[WKContentView isBackground]):
1406         Handle a null application state.
1407
1408         (-[WKContentView _commonInitializationWithProcessPool:configuration:]): Deleted.
1409         Don't create the application state here.
1410
1411 2015-07-09  Dan Bernstein  <mitz@apple.com>
1412
1413         [Cocoa] Report the first paint after committing a load as a rendering progress event
1414         https://bugs.webkit.org/show_bug.cgi?id=146765
1415
1416         Reviewed by Tim Horton.
1417
1418         * Shared/API/Cocoa/_WKRenderingProgressEvents.h: Added _WKRenderingProgressEventFirstPaint.
1419
1420         * UIProcess/API/Cocoa/WKWebView.mm:
1421         (-[WKWebView _didCommitLayerTree:]): If this is the first layer tree commit since the load
1422         was committed, and the delegate is observing _WKRenderingProgressEventFirstPaint, call
1423         NavigationState::didFirstPaint.
1424
1425         * UIProcess/Cocoa/NavigationState.h:
1426         * UIProcess/Cocoa/NavigationState.mm:
1427         (WebKit::NavigationState::didFirstPaint): Added. Calls -_webView:renderingProgressDidChange:
1428         with _WKRenderingProgressEventFirstPaint.
1429
1430 2015-07-08  Jinwoo Song  <jinwoo7.song@samsung.com>
1431
1432         [EFL] When closing inspector window, EwkView is not released properly.
1433         https://bugs.webkit.org/show_bug.cgi?id=146716
1434
1435         Reviewed by Gyuyoung Kim.
1436
1437         It's because inspector window could not be deleted by remaining reference
1438         from inspector view(evas object). This patch deletes the inspector window
1439         after finishing the evas object smart call.
1440
1441         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1442         (WebKit::destroyInspectorWindow):
1443         (WebKit::WebInspectorProxy::platformDidClose):
1444
1445 2015-07-08  Hyungwook Lee  <hyungwook.lee@navercorp.com>
1446
1447         Fix ASSERTION FAILED: !m_pendingNavigationID in WebPage::reload().
1448         https://bugs.webkit.org/show_bug.cgi?id=146546
1449
1450         Reviewed by Darin Adler.
1451
1452         We did't reset pendingNavigationID value when request url is empty.
1453         Hence we need to ignore ASSERT check in this case.
1454
1455         * WebProcess/WebPage/WebPage.cpp:
1456         (WebKit::WebPage::reload):
1457
1458 2015-07-08  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1459
1460         Use Ref/RefPtr instead of PassRefPtr in WebKit2 - 2
1461         https://bugs.webkit.org/show_bug.cgi?id=146591
1462
1463         Reviewed by Darin Adler.
1464
1465         Following patch in order to reduce use of PassRefPtr.
1466
1467         * Shared/BlobDataFileReferenceWithSandboxExtension.h:
1468         * Shared/Cocoa/CompletionHandlerCallChecker.h:
1469         * Shared/Cocoa/CompletionHandlerCallChecker.mm:
1470         (WebKit::CompletionHandlerCallChecker::create):
1471         * Shared/Downloads/DownloadAuthenticationClient.h:
1472         (WebKit::DownloadAuthenticationClient::create):
1473         * Shared/SandboxExtension.h:
1474         * Shared/ShareableResource.cpp:
1475         (WebKit::ShareableResource::create):
1476         * Shared/ShareableResource.h:
1477         * Shared/mac/ObjCObjectGraph.h:
1478         (WebKit::ObjCObjectGraph::create):
1479         * Shared/mac/SandboxExtensionMac.mm:
1480         (WebKit::SandboxExtension::create):
1481         * UIProcess/API/Cocoa/WKProcessGroup.mm:
1482         (getInjectedBundleInitializationUserData):
1483         * UIProcess/WebPreferences.cpp:
1484         (WebKit::WebPreferences::create):
1485         * UIProcess/WebPreferences.h:
1486         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
1487         (WKBundlePageOverlayCreate):
1488         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
1489         (WKBundlePageBannerCreateBannerWithCALayer):
1490         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
1491         (WebKit::InjectedBundleDOMWindowExtension::create):
1492         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h:
1493         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
1494         (WebKit::InjectedBundleHitTestResult::create):
1495         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
1496         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
1497         (WebKit::InjectedBundleNavigationAction::create):
1498         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
1499         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
1500         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
1501         (WebKit::InjectedBundlePageContextMenuClient::prepareForImmediateAction):
1502         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
1503         (WebKit::InjectedBundleScriptWorld::create):
1504         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
1505         * WebProcess/Network/NetworkProcessConnection.h:
1506         (WebKit::NetworkProcessConnection::create):
1507         * WebProcess/Network/WebResourceLoader.cpp:
1508         (WebKit::WebResourceLoader::create):
1509         * WebProcess/Network/WebResourceLoader.h:
1510         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
1511         (WebKit::NotificationPermissionRequestManager::create):
1512         * WebProcess/Notifications/NotificationPermissionRequestManager.h:
1513         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1514         (WebKit::NetscapePlugin::create):
1515         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1516         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1517         (WebKit::NetscapePluginStream::create):
1518         * WebProcess/Plugins/PDF/PDFPlugin.h:
1519         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1520         (WebKit::PDFPlugin::create):
1521         * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
1522         (WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::create):
1523         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
1524         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
1525         (WebKit::PDFPluginChoiceAnnotation::create):
1526         * WebProcess/Plugins/PDF/PDFPluginPasswordField.h:
1527         * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
1528         (WebKit::PDFPluginPasswordField::create):
1529         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
1530         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
1531         (WebKit::PDFPluginTextAnnotation::create):
1532         * WebProcess/Plugins/PluginProcessConnection.h:
1533         (WebKit::PluginProcessConnection::create):
1534         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1535         (WebKit::PluginProcessConnectionManager::create):
1536         * WebProcess/Plugins/PluginProcessConnectionManager.h:
1537         * WebProcess/Plugins/PluginProxy.cpp:
1538         (WebKit::PluginProxy::create):
1539         * WebProcess/Plugins/PluginProxy.h:
1540         * WebProcess/Plugins/PluginView.cpp:
1541         (WebKit::PluginView::URLRequest::create):
1542         (WebKit::PluginView::Stream::create):
1543         (WebKit::PluginView::create):
1544         * WebProcess/Plugins/PluginView.h:
1545         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
1546         (WebKit::RemoteScrollingCoordinator::create):
1547         * WebProcess/Storage/StorageAreaImpl.cpp:
1548         (WebKit::StorageAreaImpl::create):
1549         * WebProcess/Storage/StorageAreaImpl.h:
1550         * WebProcess/Storage/StorageAreaMap.cpp:
1551         (WebKit::StorageAreaMap::create):
1552         * WebProcess/Storage/StorageAreaMap.h:
1553         * WebProcess/WebConnectionToUIProcess.cpp:
1554         (WebKit::WebConnectionToUIProcess::create):
1555         * WebProcess/WebConnectionToUIProcess.h:
1556         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
1557         (WebKit::WebPopupMenu::create):
1558         * WebProcess/WebCoreSupport/WebPopupMenu.h:
1559         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
1560         (WebKit::WebSearchPopupMenu::create):
1561         * WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
1562         * WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h:
1563         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
1564         (WebKit::WebFrameNetworkingContext::create):
1565         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
1566         (WebKit::WebFrameNetworkingContext::create):
1567         * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h:
1568         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::create):
1569         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1570         (WebKit::CoordinatedLayerTreeHost::create):
1571         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
1572         (WebKit::ThreadedCoordinatedLayerTreeHost::create):
1573         * WebProcess/WebPage/EventDispatcher.cpp:
1574         (WebKit::EventDispatcher::create):
1575         * WebProcess/WebPage/EventDispatcher.h:
1576         * WebProcess/WebPage/PageBanner.h:
1577         * WebProcess/WebPage/WebBackForwardListProxy.h:
1578         (WebKit::WebBackForwardListProxy::create):
1579         * WebProcess/WebPage/WebContextMenu.h:
1580         (WebKit::WebContextMenu::create):
1581         * WebProcess/WebPage/WebDocumentLoader.h:
1582         (WebKit::WebDocumentLoader::create):
1583         * WebProcess/WebPage/WebInspector.cpp:
1584         (WebKit::WebInspector::create):
1585         * WebProcess/WebPage/WebInspector.h:
1586         * WebProcess/WebPage/WebInspectorUI.cpp:
1587         (WebKit::WebInspectorUI::create):
1588         * WebProcess/WebPage/WebInspectorUI.h:
1589         * WebProcess/WebPage/WebOpenPanelResultListener.cpp:
1590         (WebKit::WebOpenPanelResultListener::create):
1591         * WebProcess/WebPage/WebOpenPanelResultListener.h:
1592         * WebProcess/WebPage/WebPageOverlay.cpp:
1593         (WebKit::WebPageOverlay::create):
1594         * WebProcess/WebPage/WebPageOverlay.h:
1595         * WebProcess/WebPage/WebUndoStep.cpp:
1596         (WebKit::WebUndoStep::create):
1597         * WebProcess/WebPage/WebUndoStep.h:
1598         * WebProcess/WebPage/mac/PageBannerMac.mm:
1599         (WebKit::PageBanner::create):
1600         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
1601         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1602         (WebKit::PlatformCAAnimationRemote::create):
1603         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1604         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1605         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
1606         * WebProcess/ios/WebVideoFullscreenManager.h:
1607         * WebProcess/ios/WebVideoFullscreenManager.mm:
1608         (WebKit::WebVideoFullscreenManager::create):
1609
1610 2015-07-08  Anders Carlsson  <andersca@apple.com>
1611
1612         WKSecurityOrigin.h has wrong availability info
1613         https://bugs.webkit.org/show_bug.cgi?id=146761
1614         rdar://problem/21735802
1615
1616         Reviewed by Dan Bernstein.
1617
1618         * UIProcess/API/Cocoa/WKSecurityOrigin.h:
1619
1620 2015-07-08  Andreas Kling  <akling@apple.com>
1621
1622         [iOS] Scrolling is laggy when the keyboard is up and a form element is focused.
1623         <https://webkit.org/b/146735>
1624         <rdar://problem/21151033>
1625
1626         Reviewed by Enrica Casucci.
1627
1628         Every touch on the page causes us to call elementDidFocus(), since we may need to bring
1629         up a keyboard if the node had previously been programmatically focused. This was causing
1630         little lag spikes during scrolling every time you'd put your finger to the screen.
1631
1632         Have WebPage::elementDidFocus() return early if the node already has focus, and we've
1633         started an input session in response to non-programmatic focus already.
1634
1635         * WebProcess/WebPage/WebPage.h:
1636         * WebProcess/WebPage/ios/WebPageIOS.mm:
1637         (WebKit::WebPage::elementDidFocus):
1638         (WebKit::WebPage::elementDidBlur):
1639
1640 2015-07-08  Matt Rajca  <mrajca@apple.com>
1641
1642         Media Session: indicate to clients whether a media session has active media elements
1643         https://bugs.webkit.org/show_bug.cgi?id=146742
1644
1645         Reviewed by Tim Horton.
1646
1647         * UIProcess/API/C/WKPage.cpp:
1648         (WKPageHasMediaSessionWithActiveMediaElements):
1649         * UIProcess/API/C/WKPagePrivate.h:
1650         * UIProcess/WebPageProxy.cpp:
1651         (WebKit::WebPageProxy::hasMediaSessionWithActiveMediaElementsDidChange):
1652         * UIProcess/WebPageProxy.h:
1653         (WebKit::WebPageProxy::hasMediaSessionWithActiveMediaElementsDidChange):
1654         * UIProcess/WebPageProxy.messages.in:
1655         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1656         (WebKit::WebChromeClient::hasMediaSessionWithActiveMediaElementsDidChange):
1657         * WebProcess/WebCoreSupport/WebChromeClient.h:
1658
1659 2015-07-07  Matt Rajca  <mrajca@apple.com>
1660
1661         Media Session: propagate artwork URL with metadata to UI clients
1662         https://bugs.webkit.org/show_bug.cgi?id=146698
1663
1664         Reviewed by Tim Horton.
1665
1666         * Shared/WebMediaSessionMetadata.h:
1667         (WebKit::WebMediaSessionMetadata::artworkURL):
1668         * UIProcess/API/C/WKMediaSessionMetadata.cpp:
1669         (WKMediaSessionMetadataCopyArtworkURL):
1670         * UIProcess/API/C/WKMediaSessionMetadata.h:
1671
1672 2015-07-08  Yongjun Zhang  <yongjun_zhang@apple.com>
1673
1674         Don't allow page scroll when previewing a link or image.
1675         https://bugs.webkit.org/show_bug.cgi?id=146741
1676         rdar://problem/21733053
1677
1678         Reviewed by Beth Dakin.
1679
1680         Don't let preview gesture and scroll panning gesture or zooming gesture recognize at the same time.
1681
1682         * UIProcess/ios/WKContentViewInteraction.mm:
1683         (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
1684
1685 2015-07-08  Tim Horton  <timothy_horton@apple.com>
1686
1687         Snapshots can be misplaced when custom swipe views are offset from the window origin
1688         https://bugs.webkit.org/show_bug.cgi?id=146744
1689         <rdar://problem/20942120>
1690
1691         Reviewed by Dean Jackson.
1692
1693         * UIProcess/mac/ViewGestureControllerMac.mm:
1694         (WebKit::ViewGestureController::beginSwipeGesture):
1695         Keep swipeArea in window coordinates; it was already in window coordinates
1696         when using custom swipe views, but not in the non-custom case.
1697
1698         Convert from window coordinates to parent-of-m_swipeLayer coordinates when
1699         determining m_swipeLayer's frame.
1700
1701 2015-07-07  Andy Estes  <aestes@apple.com>
1702
1703         [iOS][WK2] Ignore synthetic clicks in subframes initiated on a previous page
1704         https://bugs.webkit.org/show_bug.cgi?id=146712
1705
1706         Reviewed by Benjamin Poulain.
1707
1708         r178980 fixed an issue where, if a main frame navigation occurs in response to a touch event, a synthetic click
1709         event could fire on the navigated-to page. This change extends this fix to apply to subframes.
1710
1711         * WebProcess/WebPage/WebFrame.cpp:
1712         (WebKit::WebFrame::WebFrame):
1713         * WebProcess/WebPage/WebFrame.h:
1714         (WebKit::WebFrame::firstLayerTreeTransactionIDAfterDidCommitLoad):
1715         (WebKit::WebFrame::setFirstLayerTreeTransactionIDAfterDidCommitLoad):
1716         * WebProcess/WebPage/WebPage.cpp:
1717         (WebKit::WebPage::didCommitLoad): Stored the next layer tree transaction ID, and called cancelPotentialTapInFrame(), for the committed frame.
1718         * WebProcess/WebPage/WebPage.h:
1719         * WebProcess/WebPage/ios/WebPageIOS.mm:
1720         (WebKit::WebPage::handleTap): Determined the first post-commit layer tree transaction ID from the tap target node's frame.
1721         (WebKit::WebPage::commitPotentialTap): Ditto.
1722         (WebKit::WebPage::cancelPotentialTap): Called cancelPotentialTapInFrame(), passing m_mainFrame.
1723         (WebKit::WebPage::cancelPotentialTapInFrame): Taught to only cancel a potential tap whose target node is a descendant of the given frame.
1724         (WebKit::WebPage::updateVisibleContentRects): Updated to use the main frame's first post-commit layer tree transaction ID.
1725
1726 2015-07-08  Brady Eidson  <beidson@apple.com>
1727
1728         Move PingLoaders to the NetworkingProcess.
1729         <rdar://problem/18860263> and https://bugs.webkit.org/show_bug.cgi?id=146710
1730
1731         Reviewed by Tim Horton.
1732
1733         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1734         (WebKit::NetworkConnectionToWebProcess::loadPing): Create a PingHandle and then return.
1735         * NetworkProcess/NetworkConnectionToWebProcess.h:
1736         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1737         
1738         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1739         (WebKit::WebPlatformStrategies::createPingHandle): If the Network process is enabled,
1740           compile the appropriate load parameters and then message to it.
1741           Otherwise, use the default in-process PingHandle.
1742         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1743
1744 2015-07-08  Beth Dakin  <bdakin@apple.com>
1745
1746         Only support image previews for clients that implement commitPreviewedImageWithURL 
1747         delegate
1748         https://bugs.webkit.org/show_bug.cgi?id=146739
1749         -and corresponding-
1750         rdar://problem/21692929
1751
1752         Reviewed by Tim Horton.
1753
1754         We should only support image previews for clients that implement 
1755         commitPreviewedImageWithURL delegate since there is no default commit action.
1756         * UIProcess/ios/WKContentViewInteraction.mm:
1757         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
1758
1759 2015-07-08  Anders Carlsson  <andersca@apple.com>
1760
1761         Make ApplicationStateTracker be per view instead of being a singleton
1762         https://bugs.webkit.org/show_bug.cgi?id=146737
1763
1764         Reviewed by Andreas Kling.
1765
1766         * UIProcess/ApplicationStateTracker.h:
1767         Update to be per view instead of a singleton.
1768
1769         * UIProcess/ApplicationStateTracker.mm:
1770         (WebKit::ApplicationStateTracker::ApplicationStateTracker):
1771         Change to take a view + selectors.
1772
1773         (WebKit::ApplicationStateTracker::~ApplicationStateTracker):
1774         Invalidate the state monitor and remove the listeners.
1775
1776         (WebKit::ApplicationStateTracker::applicationDidEnterBackground):
1777         Just call the single background method.
1778
1779         (WebKit::ApplicationStateTracker::applicationWillEnterForeground):
1780         Just call the single foreground method.
1781
1782         (WebKit::ApplicationStateTracker::singleton): Deleted.
1783         (WebKit::ApplicationStateTracker::addListener): Deleted.
1784         (WebKit::ApplicationStateTracker::invokeListeners): Deleted.
1785         (WebKit::ApplicationStateTracker::pruneListeners): Deleted.
1786
1787         * UIProcess/ios/WKContentView.mm:
1788         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
1789         Create the ApplicationStateTracker here.
1790
1791         (-[WKContentView isBackground]):
1792         Get the ivar instead of the singleton.
1793
1794 2015-07-08  Beth Dakin  <bdakin@apple.com>
1795
1796         InteractionInformationAtPosition bounds seem wrong on many sites, affects 
1797         apple.com
1798         https://bugs.webkit.org/show_bug.cgi?id=146736
1799         -and corresponding-
1800         rdar://problem/21655549
1801
1802         Reviewed by Tim Horton.
1803
1804         http://trac.webkit.org/changeset/186132/ changed the bounds for 
1805         InteractionInformationAtPosition. The image-related changes are good, but the 
1806         link-related changes feel wrong on many sites. We should revert the change for now 
1807         and just use the absoluteBoundingBoxRect() for non-images.
1808         * WebProcess/WebPage/ios/WebPageIOS.mm:
1809         (WebKit::WebPage::getPositionInformation):
1810
1811 2015-07-08  Beth Dakin  <bdakin@apple.com>
1812
1813         Add actions to image previews
1814         https://bugs.webkit.org/show_bug.cgi?id=146702
1815         -and corresponding-
1816         <rdar://problem/21642654>
1817
1818         Reviewed by Sam Weinig.
1819
1820         Add an array of actions and _WKActivatedElementInfo in order to properly invoke 
1821         the actions.
1822         * UIProcess/WKImagePreviewViewController.h:
1823         * UIProcess/WKImagePreviewViewController.mm:
1824         (-[WKImagePreviewViewController loadView]):
1825         (-[WKImagePreviewViewController initWithCGImage:defaultActions:elementInfo:]):
1826         (_scaleSizeWithinSize):
1827         (-[WKImagePreviewViewController initWithCGImage:]): Deleted.
1828
1829         Re-factor defaultActionsForImageSheet into a stand-alone function so that it can 
1830         be invoked for previews as well as for the action sheet.
1831         * UIProcess/ios/WKActionSheetAssistant.h:
1832         * UIProcess/ios/WKActionSheetAssistant.mm:
1833         (-[WKActionSheetAssistant showImageSheet]):
1834         (-[WKActionSheetAssistant defaultActionsForLinkSheet]):
1835         (-[WKActionSheetAssistant defaultActionsForImageSheet]):
1836         (-[WKActionSheetAssistant showLinkSheet]):
1837
1838         WKImagePreviewViewController initializer now takes the default actions and 
1839         _WKActivatedElementInfo.
1840         * UIProcess/ios/WKContentViewInteraction.mm:
1841         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
1842
1843 2015-07-08  Dan Bernstein  <mitz@apple.com>
1844
1845         <rdar://problem/21669397> [iOS] Keyboard shortcuts that take focus away from the web view end up typing a letter into the newly focused field
1846         https://bugs.webkit.org/show_bug.cgi?id=146732
1847
1848         Reviewed by Sam Weinig.
1849
1850         * UIProcess/ios/WKContentViewInteraction.mm:
1851         (-[WKContentView _interpretKeyEvent:isCharEvent:]): Bail out if we are no longer the first
1852         responder.
1853
1854 2015-07-07  Anders Carlsson  <andersca@apple.com>
1855
1856         Always begin a background task when needed, not just when we go into the background
1857         https://bugs.webkit.org/show_bug.cgi?id=146704
1858
1859         Reviewed by Gavin Barraclough.
1860
1861         The system let background code run for the same amount of time regardless of whether the assertion was grabbed
1862         when the app is in the foreground or being backgrounded, so remove the background/foreground tracking code.
1863
1864         * UIProcess/ios/ProcessAssertionIOS.mm:
1865         (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
1866         (-[WKProcessAssertionBackgroundTaskManager init]): Deleted.
1867         (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground]): Deleted.
1868         (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground]): Deleted.
1869
1870 2015-07-08  Antti Koivisto  <antti@apple.com>
1871
1872         Network Cache: Don't open files in main thread
1873         https://bugs.webkit.org/show_bug.cgi?id=146722
1874
1875         Follow-up.
1876
1877         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1878         (WebKit::NetworkCache::Storage::dispatchReadOperation):
1879
1880             Accessing m_bodyFilter is technically not thread safe so keep it in main thread.
1881
1882 2015-07-08  Antti Koivisto  <antti@apple.com>
1883
1884         Network Cache: Don't open files in main thread
1885         https://bugs.webkit.org/show_bug.cgi?id=146722
1886
1887         Reviewed by Chris Dumez.
1888
1889         While we use open() with O_NONBLOCK profiling indicates that we still may block up to 5ms under the syscall in some case.
1890
1891         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1892         (WebKit::NetworkCache::Storage::dispatchReadOperation):
1893
1894             Dispatch read operation to a concurrent queue.
1895             With this we can also eliminate the separate dispatch() for body blob read.
1896
1897 2015-07-08  Sungmann Cho  <sungmann.cho@navercorp.com>
1898
1899         [Unix] Remove unused local variable from Connection::sendOutgoingMessage().
1900         https://bugs.webkit.org/show_bug.cgi?id=146713
1901
1902         Reviewed by Csaba Osztrogonác.
1903
1904         * Platform/IPC/unix/ConnectionUnix.cpp:
1905         (IPC::Connection::sendOutgoingMessage):
1906
1907 2015-07-07  Tim Horton  <timothy_horton@apple.com>
1908
1909         Occasional null deref in the CA callback in flushLayers()
1910         https://bugs.webkit.org/show_bug.cgi?id=146700
1911         <rdar://problem/21668754>
1912
1913         Reviewed by Simon Fraser.
1914
1915         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1916         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1917         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1918         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1919         Make sure we keep the WebPage alive, and null-check the potentially null
1920         WebCore objects (Page and Frame).
1921
1922 2015-07-06  Matt Rajca  <mrajca@apple.com>
1923
1924         Media Session: propagate metadata changes to UI clients
1925         https://bugs.webkit.org/show_bug.cgi?id=146660
1926
1927         Reviewed by Tim Horton.
1928
1929         * CMakeLists.txt: Added WebMediaSessionMetadata and WKMediaSessionMetadata.
1930         * Shared/API/APIObject.h: Added a media session metadata type.
1931         * Shared/API/c/WKBase.h:
1932         * Shared/WebMediaSessionMetadata.cpp: Added API adapter for WebCore::MediaSessionMetadata.
1933         (WebKit::WebMediaSessionMetadata::create):
1934         (WebKit::WebMediaSessionMetadata::WebMediaSessionMetadata):
1935         (WebKit::WebMediaSessionMetadata::~WebMediaSessionMetadata):
1936         * Shared/WebMediaSessionMetadata.h: Added API adapter for WebCore::MediaSessionMetadata.
1937         (WebKit::WebMediaSessionMetadata::title):
1938         (WebKit::WebMediaSessionMetadata::artist):
1939         (WebKit::WebMediaSessionMetadata::album):
1940         * UIProcess/API/APIUIClient.h: Added 'mediaSessionMetadataDidChange' interface.
1941         (API::UIClient::mediaSessionMetadataDidChange):
1942         * UIProcess/API/C/WKAPICast.h:
1943         * UIProcess/API/C/WKMediaSessionMetadata.cpp: Added C wrapper for WebMediaSessionMetadata.
1944         (WKMediaSessionMetadataGetTypeID):
1945         (WKMediaSessionMetadataCopyTitle):
1946         (WKMediaSessionMetadataCopyArtist):
1947         (WKMediaSessionMetadataCopyAlbum):
1948         * UIProcess/API/C/WKMediaSessionMetadata.h: Added C wrapper for WebMediaSessionMetadata.
1949         * UIProcess/API/C/WKPage.cpp: Forward 'mediaSessionMetadataDidChange' to client.
1950         (WKPageSetPageUIClient):
1951         * UIProcess/API/C/WKPageUIClient.h: Added 'mediaSessionMetadataDidChange' callback.
1952         * UIProcess/WebPageProxy.cpp: Forward 'mediaSessionMetadataDidChange' to UI client.
1953         (WebKit::WebPageProxy::mediaSessionMetadataDidChange):
1954         * WebKit2.xcodeproj/project.pbxproj: Added WebMediaSessionMetadata and WKMediaSessionMetadata.
1955
1956 2015-07-07  Brady Eidson  <beidson@apple.com>
1957
1958         HTTP Auth cached after disabling private browsing/reset.
1959         <rdar://problem/8293055> and https://bugs.webkit.org/show_bug.cgi?id=146654
1960
1961         Reviewed by Tim Horton.
1962
1963         * WebProcess/Plugins/PluginView.cpp:
1964         (WebKit::PluginView::getAuthenticationInfo):
1965
1966 2015-07-07  Anders Carlsson  <andersca@apple.com>
1967
1968         Make sure to remove the download message receiver before freeing it
1969         https://bugs.webkit.org/show_bug.cgi?id=146687
1970
1971         Reviewed by Simon Fraser.
1972
1973         * UIProcess/Downloads/DownloadProxyMap.cpp:
1974         (WebKit::DownloadProxyMap::downloadFinished):
1975
1976 2015-07-07  Chris Dumez  <cdumez@apple.com>
1977
1978         Unreviewed, Fix non-Mac build after r186464.
1979
1980         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
1981         (WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
1982
1983 2015-07-06  Anders Carlsson  <andersca@apple.com>
1984
1985         Make sure to remove message receivers before they are deallocated
1986         https://bugs.webkit.org/show_bug.cgi?id=146666
1987         rdar://problem/21331118
1988
1989         Reviewed by Tim Horton.
1990
1991         Add code so we can assert that there are no message receiver maps pointing to a message receiver
1992         when it's being destroyed. Fix all the assertions by calling removeMessageReceiver in the right places.
1993
1994         * Platform/IPC/MessageReceiver.h:
1995         (IPC::MessageReceiver::~MessageReceiver):
1996         (IPC::MessageReceiver::willBeAddedToMessageReceiverMap):
1997         (IPC::MessageReceiver::willBeRemovedFromMessageReceiverMap):
1998         * Platform/IPC/MessageReceiverMap.cpp:
1999         (IPC::MessageReceiverMap::addMessageReceiver):
2000         (IPC::MessageReceiverMap::removeMessageReceiver):
2001         (IPC::MessageReceiverMap::invalidate):
2002         * Shared/ChildProcess.cpp:
2003         (WebKit::ChildProcess::removeMessageReceiver):
2004         * Shared/ChildProcess.h:
2005         * Shared/ChildProcessProxy.cpp:
2006         (WebKit::ChildProcessProxy::removeMessageReceiver):
2007         * Shared/ChildProcessProxy.h:
2008         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2009         (-[WKBrowsingContextController dealloc]):
2010         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
2011         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
2012         (WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
2013         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
2014         (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
2015         * UIProcess/WebConnectionToWebProcess.cpp:
2016         (WebKit::WebConnectionToWebProcess::invalidate):
2017         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2018         (-[WKWebProcessPlugInBrowserContextController dealloc]):
2019         * WebProcess/WebConnectionToUIProcess.cpp:
2020         (WebKit::WebConnectionToUIProcess::invalidate):
2021
2022 2015-07-06  Brent Fulgham  <bfulgham@apple.com>
2023
2024         Ensure media playback is stopped during page close
2025         https://bugs.webkit.org/show_bug.cgi?id=146554
2026         <rdar://problem/18033944>
2027
2028         Reviewed by Brady Eidson.
2029
2030         * WebProcess/WebProcess.cpp:
2031         (WebKit::WebProcess::didClose): Make sure to clean up any running media sessions when
2032         the process is being shut down.
2033
2034 2015-07-06  Commit Queue  <commit-queue@webkit.org>
2035
2036         Unreviewed, rolling out r186385.
2037         https://bugs.webkit.org/show_bug.cgi?id=146668
2038
2039         crashes 3 webaudio tests in debug builds (Requested by
2040         alexchristensen on #webkit).
2041
2042         Reverted changeset:
2043
2044         "Ensure media playback is stopped during page close"
2045         https://bugs.webkit.org/show_bug.cgi?id=146554
2046         http://trac.webkit.org/changeset/186385
2047
2048 2015-07-06  Brent Fulgham  <bfulgham@apple.com>
2049
2050         Ensure media playback is stopped during page close
2051         https://bugs.webkit.org/show_bug.cgi?id=146554
2052         <rdar://problem/18033944>
2053
2054         Reviewed by Brady Eidson.
2055
2056         * WebProcess/WebProcess.cpp:
2057         (WebKit::WebProcess::didClose): Make sure to clean up any running media sessions when
2058         the process is being shut down.
2059
2060 2015-07-06  Yongjun Zhang  <yongjun_zhang@apple.com>
2061
2062         Allow UIDelegate to customize link actions in preview.
2063         https://bugs.webkit.org/show_bug.cgi?id=146567
2064
2065         Add a new UIDelegate method to pass the defaultActions and elementInfo to client to allow
2066         the client customize the actions based on the element. Also add a new SPI runActionWithElementInfo:
2067         to _WKElementAction and make it aware of the WKActionSheetAssistant that creates it, so that
2068         the client can run the action without knowing WKActionSheetAssistant.
2069
2070         Reviewed by Beth Dakin.
2071
2072         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add delegate method _webView:previewViewControllerForURL:defaultActions:elementInfo:.
2073         * UIProcess/API/Cocoa/_WKElementAction.h: Add a SPI runActionWithElementInfo:.
2074         * UIProcess/API/Cocoa/_WKElementAction.mm:
2075         (-[_WKElementAction _initWithTitle:actionHandler:type:assistant:]): Modified initializer, also initialize _defaultActionSheetAssistant
2076             iVar if the caller provides that.
2077         (+[_WKElementAction elementActionWithTitle:actionHandler:]): Use the new initializer.
2078         (+[_WKElementAction _elementActionWithType:customTitle:assistant:]): A new helper method to create _WKElementAction with assistant.
2079         (+[_WKElementAction _elementActionWithType:assistant:]):
2080         (+[_WKElementAction elementActionWithType:customTitle:]):
2081         (-[_WKElementAction runActionWithElementInfo:]):
2082         * UIProcess/API/Cocoa/_WKElementActionInternal.h:
2083         * UIProcess/ios/WKActionSheetAssistant.h: Add a method defaultActionsForLinkSheet.
2084         * UIProcess/ios/WKActionSheetAssistant.mm:
2085         (-[WKActionSheetAssistant defaultActionsForLinkSheet]): Get default actions for current link that is activated.
2086         (-[WKActionSheetAssistant showLinkSheet]): Use defaultActionsForLinkSheet.
2087         * UIProcess/ios/WKContentViewInteraction.mm:
2088         (-[WKContentView previewViewControllerForPosition:inSourceView:]): Pass defaultActions and elementInfo to UIDelegate when querying
2089             for preview view controller.
2090         (-[WKContentView didDismissPreviewViewController:committing:]):
2091
2092 2015-07-06  Brady Eidson  <beidson@apple.com>
2093
2094         ShouldOpenExternalURLsPolicy should default to "Allow" for WK2 API loads.
2095         <rdar://problem/21640050> and https://bugs.webkit.org/show_bug.cgi?id=146563
2096
2097         Reviewed by Geoff Garen.
2098
2099         * UIProcess/API/Cocoa/WKWebView.mm:
2100         (-[WKWebView loadRequest:]): Move _loadRequest:withOptions: logic back here, just without options.
2101         (-[WKWebView _loadRequest:withOptions:]): This SPI is now unneeded, but must remain inactive.
2102         * UIProcess/WebPageProxy.h:
2103
2104 2015-07-06  Csaba Osztrogonác  <ossy@webkit.org>
2105
2106         URTBF after r186357 to fix non Cocoa platforms.
2107
2108         * NetworkProcess/NetworkProcess.cpp:
2109         (WebKit::NetworkProcess::deleteWebsiteData):
2110
2111 2015-07-06  Antti Koivisto  <antti@apple.com>
2112
2113         With multipart/replaced (e.g. motion JPEG), m_bufferedDataForCache grows unbounded in Networking process
2114         https://bugs.webkit.org/show_bug.cgi?id=146630
2115         <rdar://problem/21677340>
2116
2117         Follow-up.
2118
2119         * NetworkProcess/NetworkResourceLoader.cpp:
2120         (WebKit::NetworkResourceLoader::didReceiveBuffer):
2121
2122             Typo 1014 -> 1024
2123
2124 2015-07-06  Commit Queue  <commit-queue@webkit.org>
2125
2126         Unreviewed, rolling out r185896.
2127         https://bugs.webkit.org/show_bug.cgi?id=146647
2128
2129         Caused by a refcounting error in GTK+; it's actually legal for
2130         the event to be null, just the gi annotations were wrong.
2131         (Requested by mcatanzaro on #webkit).
2132
2133         Reverted changeset:
2134
2135         "[GTK] Crash performing drag-and-drop"
2136         https://bugs.webkit.org/show_bug.cgi?id=146267
2137         http://trac.webkit.org/changeset/185896
2138
2139 2015-07-06  Anders Carlsson  <andersca@apple.com>
2140
2141         Provide API to clear the HSTS cache
2142         https://bugs.webkit.org/show_bug.cgi?id=146565
2143         rdar://problem/20023805
2144
2145         Reviewed by Tim Horton.
2146
2147         * NetworkProcess/NetworkProcess.cpp:
2148         (WebKit::NetworkProcess::deleteWebsiteData):
2149         * NetworkProcess/NetworkProcess.h:
2150         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2151         (WebKit::NetworkProcess::clearHSTSCache):
2152         * Shared/WebsiteData/WebsiteDataTypes.h:
2153         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
2154         (dataTypesToString):
2155         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
2156         (WebKit::toWebsiteDataTypes):
2157         (WebKit::toWKWebsiteDataTypes):
2158         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
2159         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2160         (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
2161
2162 2015-07-06  Antti Koivisto  <antti@apple.com>
2163
2164         With multipart/replaced (e.g. motion JPEG), m_bufferedDataForCache grows unbounded in Networking process
2165         https://bugs.webkit.org/show_bug.cgi?id=146630
2166         <rdar://problem/21677340>
2167
2168         Reviewed by Chris Dumez.
2169
2170         * NetworkProcess/NetworkResourceLoader.cpp:
2171         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2172
2173             Don't buffer multipart/x-mixed-replace. We never want to cache these.
2174
2175         (WebKit::NetworkResourceLoader::didReceiveBuffer):
2176
2177             Limit the maximum size of the cache buffer to 10MB. This prevents unbounded memory growth if the resource
2178             keeps streaming. It also prevents giant entries from pushing other data out of the cache.
2179
2180         (WebKit::NetworkResourceLoader::didFinishLoading):
2181
2182 2015-07-06  Zan Dobersek  <zdobersek@igalia.com>
2183
2184         [GTK] Guard X11-specific code in webkitWebViewBaseDidRelaunchWebProcess()
2185         https://bugs.webkit.org/show_bug.cgi?id=146627
2186
2187         Reviewed by Carlos Garcia Campos.
2188
2189         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2190         (webkitWebViewBaseDidRelaunchWebProcess):
2191         Guard calls to DrawingAreaImpl::setNativeSurfaceHandleForCompositing()
2192         that pass in an X11 Window ID with the PLATFORM(X11) build guards.
2193
2194 2015-07-05  Chris Dumez  <cdumez@apple.com>
2195
2196         [WK2] Current page's scroll position is lost when transferring sessionState from one view to another
2197         https://bugs.webkit.org/show_bug.cgi?id=146625
2198         <rdar://problem/21585268>
2199
2200         Reviewed by Gavin Barraclough.
2201
2202         The current page's scroll position was lost when transferring the
2203         sessionState from one view to another. This is because we only update
2204         the current WebBackForwardListItem after navigating away.
2205         However, when the client swaps WebViews for navigating, we don't detect
2206         this as navigating away and the current WebBackForwardListItem is not
2207         updated with the current page's state (including the scroll position).
2208         This means that the information is not transferred via the sessionState
2209         and the scroll position (among other things) ends up being lost when
2210         navigating back in the new WebView.
2211
2212         Retrieving the session state is a synchronous API and we want to avoid
2213         doing a synchronous IPC between the UIProcess and the WebProcess to
2214         retrieve the current page's state. Therefore, the approach chosen in
2215         this patch is to detect when the user is done scrolling the main frame
2216         (using a HystererisActivity) and then update the scroll position on the
2217         current HistoryItem. This way, the current WebBackForwardListItem
2218         normally has an up-to-date scroll position for the main frame when the
2219         sessionState is queried by the client.
2220
2221         The solution is not perfect as we don't keep the whole page state
2222         up-to-date for the current WebBackForwardListItem, only the main frame
2223         state. However, the proposed solution is cheap, avoid synchronous IPC
2224         and provides a much better user experience in most cases.
2225
2226         * WebProcess/WebPage/WebPage.cpp:
2227         (WebKit::WebPage::WebPage):
2228         (WebKit::WebPage::pageDidScroll):
2229         (WebKit::WebPage::pageStoppedScrolling):
2230         * WebProcess/WebPage/WebPage.h:
2231
2232 2015-07-05  Timothy Hatcher  <timothy@apple.com>
2233
2234         Crash when closing the web inspector
2235         https://bugs.webkit.org/show_bug.cgi?id=146620
2236
2237         Reviewed by Darin Adler.
2238
2239         * WebProcess/WebPage/WebInspectorUI.cpp:
2240         (WebKit::WebInspectorUI::closeWindow): Null check the connection, like it is
2241         in other places where it is used.
2242
2243 2015-07-04  Chris Dumez  <cdumez@apple.com>
2244
2245         Drop RefPtr::clear() method
2246         https://bugs.webkit.org/show_bug.cgi?id=146556
2247
2248         Reviewed by Brady Eidson.
2249
2250         Drop RefPtr::clear() method in favor of "= nullptr;" pattern.        
2251
2252 2015-07-03  Dan Bernstein  <mitz@apple.com>
2253
2254         [Xcode] Update some build settings as recommended by Xcode 7
2255         https://bugs.webkit.org/show_bug.cgi?id=146597
2256
2257         Reviewed by Sam Weinig.
2258
2259         * Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE and
2260         GCC_NO_COMMON_BLOCKS. Removed GCC_MODEL_TUNING.
2261
2262         * WebKit2.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.
2263
2264 2015-07-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2265
2266         REGRESSION(r186025): [SOUP] NetworkCache gets blocked in traverse since r186025
2267         https://bugs.webkit.org/show_bug.cgi?id=146545
2268
2269         Reviewed by Sergio Villar Senin.
2270
2271         In r186025 the readSync method used when traversing the cache
2272         files was removed in favor of using parallel async reads to speed
2273         up the traverse. The approach used doesn't work for soup, because
2274         the IO operations are async, but run their callbacks in the
2275         current thread. The network cache now runs up to 5 async reads in
2276         the io work queue thread, and waits for them to finish, and those
2277         asycn reads never finish for the soup backend because the thread
2278         is blocked waiting for them. We need to use a different thread to
2279         run those reads.
2280
2281         * NetworkProcess/cache/NetworkCacheIOChannel.h: Add
2282         readSyncInThread private method.
2283         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
2284         (WebKit::NetworkCache::IOChannel::read): When not called in the
2285         main thread, call readSyncInThread() instead.
2286         (WebKit::NetworkCache::IOChannel::readSyncInThread): Run the read
2287         operation synchronously in a different thread, since the current
2288         thread might be blocked waiting for us.
2289
2290 2015-07-02  Przemek Piorkowski  <piorkowskiprzemyslaw@gmail.com>
2291
2292         [EFL] test_ewk2_application_cache_manager has been failed since r185527
2293         https://bugs.webkit.org/show_bug.cgi?id=146016
2294
2295         Reviewed by Gyuyoung Kim.
2296
2297         In order to handle properly WebApplicationCacheManagerProxy implementation which use
2298         WebsiteDataRecord it is necessary to enable PUBLIC_SUFFIX_LIST for EFL.
2299         Implementation of PUBLIC_SUFFIX_LIST already exists for soup so EFL can use it as well.
2300
2301         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
2302         (TEST_F): enable ewk_application_cache_manager as it is passing now.
2303
2304 2015-07-02  Commit Queue  <commit-queue@webkit.org>
2305
2306         Unreviewed, rolling out r186247 and r186250.
2307         https://bugs.webkit.org/show_bug.cgi?id=146572
2308
2309         Broke the build on Mavericks bots (Requested by cdumez on
2310         #webkit).
2311
2312         Reverted changesets:
2313
2314         "Provide API to clear the HSTS cache"
2315         https://bugs.webkit.org/show_bug.cgi?id=146565
2316         http://trac.webkit.org/changeset/186247
2317
2318         "Unreviewed build fix for non-COCOA ports after r186247."
2319         http://trac.webkit.org/changeset/186250
2320
2321 2015-07-02  Jinwoo Song  <jinwoo7.song@samsung.com>
2322
2323         Unreviewed build fix for non-COCOA ports after r186247.
2324
2325         * NetworkProcess/NetworkProcess.cpp:
2326         (WebKit::NetworkProcess::deleteWebsiteData): Add PLATFORM(COCOA) guard.
2327
2328 2015-07-02  Anders Carlsson  <andersca@apple.com>
2329
2330         Provide API to clear the HSTS cache
2331         https://bugs.webkit.org/show_bug.cgi?id=146565
2332         rdar://problem/20023805
2333
2334         Reviewed by Tim Horton.
2335
2336         * NetworkProcess/NetworkProcess.cpp:
2337         (WebKit::NetworkProcess::deleteWebsiteData):
2338         * NetworkProcess/NetworkProcess.h:
2339         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2340         (WebKit::NetworkProcess::clearHSTSCache):
2341         * Shared/WebsiteData/WebsiteDataTypes.h:
2342         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
2343         (dataTypesToString):
2344         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
2345         (WebKit::toWebsiteDataTypes):
2346         (WebKit::toWKWebsiteDataTypes):
2347         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
2348         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2349         (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
2350
2351 2015-07-02  Mark Lam  <mark.lam@apple.com>
2352
2353         Gardening: fix broken 32-bit build..
2354         https://bugs.webkit.org/show_bug.cgi?id=146416
2355
2356         Not reviewed.
2357
2358         * UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:
2359         (API::SerializedScriptValue::deserialize):
2360
2361 2015-07-02  Brent Fulgham  <bfulgham@apple.com>
2362
2363         Correct *another* typo in r186238.
2364
2365         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Fix parameter name scrolView -> scrollView.
2366
2367 2015-07-02  Brent Fulgham  <bfulgham@apple.com>
2368
2369         Correct typo in r186238.
2370
2371         * UIProcess/API/Cocoa/WKWebView.mm:
2372         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
2373
2374 2015-07-02  Brent Fulgham  <bfulgham@apple.com>
2375
2376         Provide delegate SPI for clients to notify WebKit about content inset changes
2377         https://bugs.webkit.org/show_bug.cgi?id=146482
2378         <rdar://problem/21602741>
2379
2380         Reviewed by Darin Adler.
2381
2382         Provide a new SPI for WebKit client applications to use to inform WebKit of planned
2383         adjustments to the edge insets of the view.
2384
2385         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add new optional delegate method.
2386         * UIProcess/API/Cocoa/WKWebView.mm:
2387         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): If the new delegate
2388         method exists, use the specified content insets, rather than the current state of the view.
2389
2390 2015-07-02  Beth Dakin  <bdakin@apple.com>
2391
2392         Allow the UIDelegate to customize an image preview
2393         https://bugs.webkit.org/show_bug.cgi?id=146557
2394         -and corresponding-
2395         rdar://problem/21657424
2396
2397         Reviewed by Tim Horton.
2398
2399         Add imageURL to InteractionInformationAtPosition.
2400         * Shared/InteractionInformationAtPosition.cpp:
2401         (WebKit::InteractionInformationAtPosition::encode):
2402         (WebKit::InteractionInformationAtPosition::decode):
2403         * Shared/InteractionInformationAtPosition.h:
2404
2405         Two new delegate methods.
2406         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2407
2408         Call the delegate methods at the appropriate time.
2409         * UIProcess/ios/WKContentViewInteraction.mm:
2410         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
2411         (-[WKContentView commitPreviewViewController:]):
2412
2413         Include the imageURL in InteractionInformationAtPosition.
2414         * WebProcess/WebPage/ios/WebPageIOS.mm:
2415         (WebKit::WebPage::getPositionInformation):
2416
2417 2015-07-02  Anders Carlsson  <andersca@apple.com>
2418
2419         Instead of requiring ToT UIKIt, check that UI_WEB_TOUCH_EVENT_HAS_IS_POTENTIAL_TAP is defined to 1
2420         https://bugs.webkit.org/show_bug.cgi?id=146558
2421
2422         Reviewed by Beth Dakin.
2423
2424         * Shared/ios/NativeWebTouchEventIOS.mm:
2425         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
2426
2427 2015-07-02  Brady Eidson  <beidson@apple.com>
2428
2429         Remove change I accidentally committed in r186232
2430
2431         * UIProcess/WebsiteData/WebsiteDataStore.h:
2432
2433 2015-07-02  Alex Christensen  <achristensen@webkit.org>
2434
2435         Fix EWS build after r186182.
2436
2437         * WebProcess/WebPage/WebPage.h:
2438         (WebKit::WebPage::userMediaPermissionRequestManager):
2439         Don't export a function defined in a header, or it will generate a weak external symbol.
2440
2441 2015-07-02  Brady Eidson  <beidson@apple.com>
2442
2443         Add preference to disable all http-equiv.
2444         <rdar://problem/9091261> and https://bugs.webkit.org/show_bug.cgi?id=146553
2445
2446         Reviewed by Sam Weinig.
2447
2448         * Shared/WebPreferencesDefinitions.h:
2449         
2450         * UIProcess/API/C/WKPreferences.cpp:
2451         (WKPreferencesSetMetaRefreshEnabled): Still expose this SPI, but have it affect
2452           the "httpEquivEnabled" setting.
2453         (WKPreferencesGetMetaRefreshEnabled): Ditto
2454         (WKPreferencesSetHTTPEquivEnabled):
2455         (WKPreferencesGetHTTPEquivEnabled):
2456         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2457         
2458         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2459         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2460         
2461         * WebProcess/WebPage/WebPage.cpp:
2462         (WebKit::WebPage::updatePreferences):
2463
2464 2015-07-02  Mark Lam  <mark.lam@apple.com>
2465
2466         WKWebView evaluateJavaScript:completionHandler: should reuse its JSContext instance.
2467         https://bugs.webkit.org/show_bug.cgi?id=146416
2468
2469         Reviewed by Anders Carlsson.
2470
2471         The core issue here is that we need to be able to deserialized an
2472         API::SerializedScriptValue instance into an ObjC object graph.  We'll solve this
2473         by introducing a API::SerializedScriptValue::deserialize() functions that does
2474         the job.  The deserialize() function will will use a SharedJSContext to provide
2475         the needed JSContext for doing this work.
2476
2477         Also updated ScriptMessageHandlerDelegate::didPostMessage() to use this new
2478         deserialize() function.
2479
2480         * Shared/API/APISerializedScriptValue.h:
2481         (API::SerializedScriptValue::deserialize):
2482         (API::SerializedScriptValue::internalRepresentation):
2483         - Changed to return a WebCore::SerializedScriptValue*.  This makes it friendlier
2484           to use in the 2 places that need it.
2485
2486         * UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm: Added.
2487         (API::SharedJSContext::SharedJSContext):
2488         (API::SharedJSContext::ensureContext):
2489         (API::SharedJSContext::releaseContext):
2490         (API::SerializedScriptValue::deserialize):
2491         * UIProcess/API/Cocoa/WKUserContentController.mm:
2492         * UIProcess/API/Cocoa/WKWebView.mm:
2493         (-[WKWebView evaluateJavaScript:completionHandler:]):
2494         * UIProcess/API/gtk/WebKitWebView.cpp:
2495         (webkitWebViewRunJavaScriptCallback):
2496         - Removed a now unnecessary cast.
2497         * WebKit2.xcodeproj/project.pbxproj:
2498
2499 2015-07-02  Dan Bernstein  <mitz@apple.com>
2500
2501         <rdar://problem/21429613> [iOS] Stop making symlinks from PrivateFrameworks to Frameworks
2502         https://bugs.webkit.org/show_bug.cgi?id=146542
2503
2504         Reviewed by Sam Weinig.
2505
2506         * WebKit2.xcodeproj/project.pbxproj: Removed the build phase that makes the directory of
2507         symlinks.
2508
2509 2015-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2510
2511         [GTK] WebSQL doesn't work because openDatabase always fails with DOM Exception 18
2512         https://bugs.webkit.org/show_bug.cgi?id=146234
2513
2514         Reviewed by Sergio Villar Senin.
2515
2516         This is because we don't provide any quota, and 0 is used by
2517         default, so there's never enough quota and openDatabase fails. We
2518         should expose this in the API, but for now, we could use a default
2519         quota of 5MB like WTR does.
2520
2521         * UIProcess/API/gtk/WebKitUIClient.cpp: Override
2522         exceededDatabaseQuota and return always the default quota.
2523         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2524         (WebKit::exceededDatabaseQuota): Return the quota based on the
2525         expected usage and current database usabe like mac does.
2526         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Add
2527         custom UI client to implement exceededDatabaseQuota.
2528
2529 2015-07-02  Commit Queue  <commit-queue@webkit.org>
2530
2531         Unreviewed, rolling out r185704.
2532         https://bugs.webkit.org/show_bug.cgi?id=146544
2533
2534         Didn't fix the problem (Requested by anttik on #webkit).
2535
2536         Reverted changeset:
2537
2538         "~4% Membuster regression after WebKit r185452"
2539         https://bugs.webkit.org/show_bug.cgi?id=146112
2540         http://trac.webkit.org/changeset/185704
2541
2542 2015-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2543
2544         [GTK] Accelerated Compositing stops working after a web process crash
2545         https://bugs.webkit.org/show_bug.cgi?id=146508
2546
2547         Reviewed by Martin Robinson.
2548
2549         The problem is that we don't send the window ID again to the new
2550         web process.
2551
2552         * UIProcess/API/gtk/PageClientImpl.cpp:
2553         (WebKit::PageClientImpl::didRelaunchProcess): Call
2554         webkitWebViewBaseDidRelaunchWebProcess().
2555         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2556         (webkitWebViewBaseDidRelaunchWebProcess): Set the window ID to
2557         the new drawing area.
2558         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2559
2560 2015-07-01  Joseph Pecoraro  <pecoraro@apple.com>
2561
2562         Web Inspector: [Mac] InspectorFrontendHost.beep() doesn't play a sound, sandbox warnings
2563         https://bugs.webkit.org/show_bug.cgi?id=146525
2564
2565         Reviewed by Timothy Hatcher.
2566
2567         * WebProcess/com.apple.WebProcess.sb.in:
2568         Get NSBeep working without any sandbox warnings.
2569
2570 2015-07-01  Anders Carlsson  <andersca@apple.com>
2571
2572         Remove code to recompute rounded window corners
2573         https://bugs.webkit.org/show_bug.cgi?id=146534
2574
2575         Reviewed by Simon Fraser.
2576
2577         This code is no longer needed since we're always layer-backed now.
2578
2579         * UIProcess/API/mac/WKView.mm:
2580         (-[WKView displayIfNeeded]): Deleted.
2581         (-[WKView _cacheWindowBottomCornerRect]): Deleted.
2582         * UIProcess/API/mac/WKViewInternal.h:
2583
2584 2015-07-01  Yongjun Zhang  <yongjun_zhang@apple.com>
2585
2586         Web page doesn't update its loading state when web process becomes suspended if there are pending network requests (XHR).
2587         https://bugs.webkit.org/show_bug.cgi?id=146439
2588
2589         When web page is loading, we hold a background activity token in NavigationState and we release the token when the page done
2590         loading. A web page can start loading subresources (like XHR) after the page is loaded, and WebPageProxy will update its
2591         _networkRequestsInProgress state which will notify the client there is network actvity on-going. Since we don't hold
2592         the background activity token after page is loaded, the WebContent process could become suspended without notifying the client
2593         and the client will lose track of the loading state.
2594
2595         The first thought was to hold another background activity when _networkRequestsInProgress flag is set in NavigationState.
2596         However, this could result in side-effect that a WebContent process can stay active for too long if there is a long lasting
2597         XHR resquest.
2598         
2599         This patch fix this by notifying the client that network activity is stopped when WebContent process is going to be suspended.
2600         We also cache the networkRequestsInProgress state for suspended process, so that when it becomes foreground, we can tell
2601         the client the correct state of network activity.
2602
2603         Reviewed by Dan Bernstein.
2604
2605         * UIProcess/WebPageProxy.cpp:
2606         (WebKit::WebPageProxy::WebPageProxy): Initialize m_hasNetworkRequestsOnSuspended.
2607         (WebKit::WebPageProxy::processWillBecomeSuspended): If there is pending requests on suspend, cache the network activity state
2608             and notify the client.
2609         (WebKit::WebPageProxy::processWillBecomeForground): Restore the network activity state when the process becomes foreground. 
2610         (WebKit::WebPageProxy::resetState):
2611         * UIProcess/WebPageProxy.h: Add a data member m_hasNetworkRequestsOnSuspended to cache the network activity state on process
2612             suspend.
2613         * UIProcess/WebProcessProxy.cpp:
2614         (WebKit::WebProcessProxy::didSetAssertionState):
2615
2616 2015-07-01  Dean Jackson  <dino@apple.com>
2617
2618         Disable the experimental WebGL2 implementation
2619         https://bugs.webkit.org/show_bug.cgi?id=146526
2620         <rdar://problem/21641235>
2621
2622         Reviewed by Myles Maxfield.
2623
2624         Add (and disable) an ENABLE_WEBGL2 flag.
2625
2626         * Configurations/FeatureDefines.xcconfig:
2627
2628 2015-07-01  Brady Eidson  <beidson@apple.com>
2629
2630         Never try to pass URLs to LaunchServices when they're the same domain as the current URL.
2631         <rdar://problem/20731429> and https://bugs.webkit.org/show_bug.cgi?id=146521
2632
2633         Reviewed by Alex Christensen.
2634
2635         * UIProcess/Cocoa/NavigationState.mm:
2636         (WebKit::tryAppLink): Compare the proposed URL to the current URL to see if they’re in the same domain.
2637         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
2638
2639 2015-07-01  Tim Horton  <timothy_horton@apple.com>
2640
2641         WKWebView snapshots have the wrong scale after rotation
2642         https://bugs.webkit.org/show_bug.cgi?id=146476
2643         <rdar://problem/18345247>
2644
2645         Reviewed by Anders Carlsson.
2646
2647         * UIProcess/API/Cocoa/WKWebView.mm:
2648         (-[WKWebView _didCommitLayerTree:]):
2649         "Coordinate" -> "Coordinates".
2650
2651         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2652         Defer any snapshotting that happens during a resize until after
2653         the resize completes. This will ensure that (in the case of an IOSurface
2654         snapshot) the tiles are up to date, and (in the case of a software snapshot)
2655         that our understanding of the scale and scroll offset of the WKContentView
2656         are up to date, so that we can correctly convert from view to content coordinates
2657         in the UI process.
2658
2659         (-[WKWebView _endAnimatedResize]):
2660         Perform the deferred snapshotting after the resize completes.
2661
2662 2015-07-01  Beth Dakin  <bdakin@apple.com>
2663
2664         This is a quick follow-on to http://trac.webkit.org/changeset/186132
2665
2666         Rubber-stamped by Darin Adler.
2667
2668         Make this a one-liner.
2669         * WebProcess/WebPage/ios/WebPageIOS.mm:
2670         (WebKit::WebPage::getPositionInformation):
2671
2672 2015-07-01  Matthew Daiter  <mdaiter@apple.com>
2673
2674         Enable MEDIA_STREAM flag
2675         https://bugs.webkit.org/show_bug.cgi?id=145947
2676         <rdar://problem/21365829>
2677
2678         Reviewed by Eric Carlson.
2679
2680         * Configurations/FeatureDefines.xcconfig: Add MEDIA_STREAM flag
2681         * WebKit2.xcodeproj/project.pbxproj: Changed some project to private
2682         declarations of headers
2683         * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
2684         * WebProcess/WebPage/WebPage.h:
2685         (WebKit::WebPage::userMediaPermissionRequestManager):
2686
2687 2015-07-01  Brady Eidson  <beidson@apple.com>
2688
2689         Check shouldOpenExternalURLs instead of isProcessingUserGesture before passing URL to LaunchServices.
2690         <rdar://problem/20577859> and https://bugs.webkit.org/show_bug.cgi?id=146513
2691
2692         Reviewed by Darin Adler.
2693
2694         * UIProcess/Cocoa/NavigationState.mm:
2695         (WebKit::tryAppLink): The expected value of isProcessingUserGesture is lost over redirects.
2696           shouldOpenExternalURLs actually fits this role perfectly.
2697
2698 2015-07-01  Michael Catanzaro  <mcatanzaro@igalia.com>
2699
2700         [GTK] [Wayland] Build broken with ENABLE_WAYLAND_TARGET=ON
2701         https://bugs.webkit.org/show_bug.cgi?id=146512
2702
2703         Unreviewed, fix build with ENABLE_WAYLAND_TARGET=ON after r185949.
2704
2705         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2706         (webkitWebViewBaseCreateWebPage):
2707
2708 2015-06-30  Martin Robinson  <mrobinson@igalia.com>
2709
2710         [GTK] REGRESSION(r183936): Test /webkit2/WebKitWebContext/spell-checker fails since r183936
2711         https://bugs.webkit.org/show_bug.cgi?id=144828
2712
2713         Reviewed by Carlos Garcia Campos.
2714
2715         Instead of setting spell checking languages unconditionally when building int
2716         developer mode, add some C API that allows setting them in WebKitTestRunner.
2717
2718         * PlatformGTK.cmake: Add the new C API file to the source list.
2719         * UIProcess/API/C/gtk/WKTextCheckerGtk.cpp:
2720         (WKTextCheckerSetSpellCheckingLanguages): Added this function which allows settings
2721         the spell checking languages from the C API.
2722         * UIProcess/API/C/gtk/WKTextCheckerGtk.h: Added.
2723         * UIProcess/gtk/TextCheckerGtk.cpp:
2724         (WebKit::enchantTextChecker): Remove the hack which sets the spell checking languages automatically
2725         for development builds.
2726
2727 2015-07-01  Joseph Pecoraro  <pecoraro@apple.com>
2728
2729         [Mac] Numerous CGColor leaks in swipe gestures
2730         https://bugs.webkit.org/show_bug.cgi?id=146501
2731
2732         Reviewed by Tim Horton.
2733
2734         * UIProcess/mac/ViewGestureControllerMac.mm:
2735         (WebKit::ViewGestureController::beginSwipeGesture):
2736
2737 2015-07-01  Joseph Pecoraro  <pecoraro@apple.com>
2738
2739         [Mac] Confusing RetainPtr use in TiledCoreAnimationDrawingArea
2740         https://bugs.webkit.org/show_bug.cgi?id=146503
2741
2742         Reviewed by Tim Horton.
2743
2744         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2745         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
2746         Simplify adoption into a new RetainPtr.
2747
2748 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
2749
2750         Fix CoordinatedGraphics.
2751
2752         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2753         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
2754
2755 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
2756
2757         More Gtk/EFL fixing.
2758
2759         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2760         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
2761         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2762         (WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
2763
2764 2015-06-30  Andy VanWagoner  <thetalecrafter@gmail.com>
2765
2766         Implement ECMAScript Internationalization API
2767         https://bugs.webkit.org/show_bug.cgi?id=90906
2768
2769         Reviewed by Benjamin Poulain.
2770
2771         * Configurations/FeatureDefines.xcconfig: add ENABLE_INTL flag
2772
2773 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
2774
2775         Fix Mac and Windows builds.
2776
2777         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2778         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2779
2780 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
2781
2782         [iOS] Missing tiles inside position:fixed on scrolling
2783         https://bugs.webkit.org/show_bug.cgi?id=146485
2784         rdar://problem/21226861
2785
2786         Reviewed by Tim Horton.
2787
2788         Layer flushing adjusts the coverage rect for tiled layers, but does so at times
2789         when position:fixed layers are moved around by the scrolling tree. The computed
2790         coverage rect then doesn't reflect the layer's on-screen position, causing missing
2791         tiles.
2792
2793         Fix by pushing the notion of being in a "stable state" onto FrameView, and passing
2794         that state into the layer flush. When not in a stable state, flushing doesn't change
2795         the visible and coverage rects for layers that are viewport-constrained.
2796
2797         * WebProcess/WebPage/ios/WebPageIOS.mm:
2798         (WebKit::WebPage::updateVisibleContentRects):
2799         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2800         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2801
2802 2015-06-30  Hyungwook Lee  <hyungwook.lee@navercorp.com>
2803
2804         [EFL] Implement ewk_favicon_database_clear() API.
2805         https://bugs.webkit.org/show_bug.cgi?id=146337
2806
2807         Reviewed by Gyuyoung Kim.
2808
2809         We need to provide way to clear favicon data.
2810
2811         * UIProcess/API/efl/ewk_favicon_database.cpp:
2812         (EwkFaviconDatabase::getIconSurfaceSynchronously):
2813         (EwkFaviconDatabase::clearFaviconDatabase):
2814         (EwkFaviconDatabase::iconDataReadyForPageURL):
2815         (ewk_favicon_database_icon_change_callback_del):
2816         (ewk_favicon_database_clear):
2817         * UIProcess/API/efl/ewk_favicon_database.h:
2818         * UIProcess/API/efl/ewk_favicon_database_private.h:
2819         * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
2820         (TEST_F):
2821
2822 2015-06-30  Andreas Kling  <akling@apple.com>
2823
2824         [iOS] Ignore viewport rect changes during zoom bouncing.
2825         <https://webkit.org/b/146480>
2826
2827         Reviewed by Benjamin Poulain.
2828
2829         When the user has pinch-zoomed past the maximum zoom scale and lets go of the screen,
2830         we animate a bounce back to the maximum scale.
2831
2832         Suppress viewport rect updates during this bounce animation since we don't need them
2833         anyway. This fixes an issue where we'd sometimes get a weird rect during the animation
2834         and if could send that to the web process, causing it to generate tiles for a part of
2835         the page that's not actually exposed.
2836
2837         * UIProcess/API/Cocoa/WKWebView.mm:
2838         (-[WKWebView _updateVisibleContentRects]):
2839
2840 2015-06-30  Enrica Casucci  <enrica@apple.com>
2841
2842         <rdar://problem/20655729> WebKit should heuristically exclude scrolling touch events from the user gesture category
2843
2844         Reviewed by Benjamin Poulain.
2845
2846         * Platform/spi/ios/UIKitSPI.h:
2847         * Shared/WebEvent.h:
2848         (WebKit::WebTouchEvent::WebTouchEvent):
2849         (WebKit::WebTouchEvent::position):
2850         (WebKit::WebTouchEvent::isPotentialTap):
2851         (WebKit::WebTouchEvent::isGesture):
2852         (WebKit::WebTouchEvent::gestureScale):
2853         (WebKit::WebTouchEvent::gestureRotation):
2854         * Shared/WebEventConversion.cpp:
2855         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
2856         * Shared/ios/NativeWebTouchEventIOS.mm:
2857         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
2858         * Shared/ios/WebTouchEventIOS.cpp:
2859         (WebKit::WebTouchEvent::encode):
2860         (WebKit::WebTouchEvent::decode):
2861         Pipe isPotentialTap through.
2862
2863 2015-06-30  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2864
2865         [GTK] [EFL] Unreviewed build fix after r186118.
2866
2867         Add if PLATFORM(COCOA) back.
2868
2869         * WebProcess/WebProcess.cpp:
2870         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
2871         * WebProcess/WebProcess.h:
2872
2873 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
2874
2875         Crash under _layoutForNodeHighlight: when inspecting espn.com
2876         https://bugs.webkit.org/show_bug.cgi?id=146422
2877
2878         Reviewed by Joseph Pecoraro.
2879         
2880         When inspecting espn.com, MobileSafari sometimes crashes, because
2881         highlight.quads is empty. I was not able to quickly determine why.
2882
2883         Fix by bailing in this case.
2884
2885         * UIProcess/WKInspectorHighlightView.mm:
2886         (-[WKInspectorHighlightView _layoutForNodeHighlight:]):
2887
2888 2015-06-30  Matt Baker  <mattbaker@apple.com>
2889
2890         Web Inspector: Reduce rendering frames "Other" time by instrumenting compositing
2891         https://bugs.webkit.org/show_bug.cgi?id=146168
2892
2893         Reviewed by Brian Burg.
2894
2895         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2896         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2897         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2898         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2899         Added CA transaction post-commit handlers to instrument end of composite.
2900
2901 2015-06-30  Beth Dakin  <bdakin@apple.com>
2902
2903         The bounds on InteractionInformationAtPosition should be more precise
2904         https://bugs.webkit.org/show_bug.cgi?id=146468
2905         -and corresponding-
2906         rdar://problem/20739834
2907
2908         Reviewed by Enrica Casucci and Simon Fraser.
2909
2910         For links, get the TextQuads from the Range, and for images, look at the 
2911         absoluteContentQuad(). All other items can continue to use absoluteBoundingBox.
2912         * WebProcess/WebPage/ios/WebPageIOS.mm:
2913         (WebKit::WebPage::getPositionInformation):
2914
2915 2015-06-30  Anders Carlsson  <andersca@apple.com>
2916
2917         Disable Spintracer when getting the list of plug-ins
2918         https://bugs.webkit.org/show_bug.cgi?id=146467
2919         rdar://problem/21616640
2920
2921         Reviewed by Tim Horton.
2922
2923         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2924         (WebKit::WebPlatformStrategies::populatePluginCache):
2925
2926 2015-06-30  Anders Carlsson  <andersca@apple.com>
2927
2928         Java Plugin cannot launch JavaUpdater.app after renaming
2929         https://bugs.webkit.org/show_bug.cgi?id=146464
2930         rdar://problem/19747153
2931
2932         Reviewed by Tim Horton.
2933
2934         Check for both "JavaUpdater.app" and "Java Updater.app".
2935
2936         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2937         (WebKit::isJavaUpdaterURL):
2938
2939 2015-06-30  Chris Dumez  <cdumez@apple.com>
2940
2941         [WK2] Avoid taking a useless / blank navigation snapshot when navigating after restoring sessionState
2942         https://bugs.webkit.org/show_bug.cgi?id=146446
2943         <rdar://problem/21584231>
2944
2945         Reviewed by Darin Adler.
2946
2947         We currently take a useless / blank navigation snapshot when navigating
2948         after restoring the back / forward list from a sessionState object.
2949         This is because we get a current HistoryItem from the sessionState
2950         which we have never really navigated to. We then take a navigation
2951         snapshot for the current HistoryItem when navigating away as we usually
2952         do. However, in this case, the HistoryItem was imported and there is
2953         nothing to snapshot.
2954
2955         Taking this snapshot is not only wasteful, it can also potentially
2956         overwrite the snapshot that was set by the client using
2957         WKWebView._saveBackForwardSnapshotForItem() SPI.
2958
2959         To address the problem, this patch suppresses navigation snapshotting
2960         after restoring the back / forward list from a session state and until
2961         the next load is committed.
2962
2963         * UIProcess/WebPageProxy.cpp:
2964         (WebKit::WebPageProxy::recordNavigationSnapshot):
2965         (WebKit::WebPageProxy::restoreFromSessionState):
2966         (WebKit::WebPageProxy::didCommitLoadForFrame):
2967         * UIProcess/WebPageProxy.h:
2968
2969 2015-06-29  Anders Carlsson  <andersca@apple.com>
2970
2971         Get rid of unused WKSI functions
2972         https://bugs.webkit.org/show_bug.cgi?id=146443
2973
2974         Reviewed by Tim Horton.
2975
2976         * UIProcess/API/Cocoa/WKWebView.mm:
2977         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2978         (InitWebCoreSystemInterface): Deleted.
2979         * WebProcess/WebProcess.cpp:
2980         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
2981         * WebProcess/WebProcess.h:
2982         * WebProcess/cocoa/WebProcessCocoa.mm:
2983         (WebKit::WebProcess::destroyRenderingResources):
2984
2985 2015-06-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2986
2987         [GTK] Unreviewed GTK build fix since r186088 and r186095.
2988         https://bugs.webkit.org/show_bug.cgi?id=146449
2989
2990         * PlatformGTK.cmake:
2991         * UIProcess/API/gtk/PageClientImpl.h:
2992
2993 2015-06-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2994
2995         Unreviewed EFL build fix since r186088 and r186095.
2996
2997         * CMakeLists.txt: Remove ConnectionStack.cpp.
2998         * UIProcess/CoordinatedGraphics/WebView.h: Override virtual didFailLoadForMainFrame().
2999
3000 2015-06-29  Brady Eidson  <beidson@apple.com>
3001
3002         Flag sync XHRs from the network process so they can be handled appropriately.
3003         <rdar://problem/21579162> and https://bugs.webkit.org/show_bug.cgi?id=146441
3004
3005         Reviewed by Darin Adler.
3006
3007         * NetworkProcess/NetworkResourceLoader.h:
3008         (WebKit::NetworkResourceLoader::loadingSynchronousXHR): Return isSynchronous().
3009
3010 2015-06-29  Anders Carlsson  <andersca@apple.com>
3011
3012         Remove an empty group from the Xcode project.
3013
3014         * WebKit2.xcodeproj/project.pbxproj:
3015
3016 2015-06-29  Anders Carlsson  <andersca@apple.com>
3017
3018         Get rid of ConnectionStack
3019         https://bugs.webkit.org/show_bug.cgi?id=146437
3020
3021         Reviewed by Andreas Kling.
3022
3023         Just use a TemporaryChange and a static variable instead.
3024
3025         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3026         * PluginProcess/WebProcessConnection.cpp:
3027         (WebKit::WebProcessConnection::setGlobalException):
3028         (WebKit::WebProcessConnection::didReceiveMessage):
3029         (WebKit::WebProcessConnection::didReceiveSyncMessage):
3030         * Shared/ConnectionStack.cpp: Removed.
3031         (WebKit::ConnectionStack::singleton): Deleted.
3032         * Shared/ConnectionStack.h: Removed.
3033         (WebKit::ConnectionStack::current): Deleted.
3034         (WebKit::ConnectionStack::CurrentConnectionPusher::CurrentConnectionPusher): Deleted.
3035         (WebKit::ConnectionStack::CurrentConnectionPusher::~CurrentConnectionPusher): Deleted.
3036         * WebKit2.xcodeproj/project.pbxproj:
3037
3038 2015-06-29  Tim Horton  <timothy_horton@apple.com>
3039
3040         Fix the build.
3041
3042         * UIProcess/API/Cocoa/WKWebView.mm:
3043         (-[WKWebView _didFailLoadForMainFrame]):
3044         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3045         * UIProcess/ios/PageClientImplIOS.h:
3046         * UIProcess/ios/PageClientImplIOS.mm:
3047         (WebKit::PageClientImpl::didFailLoadForMainFrame):
3048
3049 2015-06-29  Dean Jackson  <dino@apple.com>
3050
3051         Temporarily disable PICTURE_SIZES
3052         https://bugs.webkit.org/show_bug.cgi?id=146435
3053         <rdar://problem/21087013>
3054
3055         Temporarily disable PICTURE_SIZES because it causes problems with out
3056         of date <picture> polyfills.
3057
3058         Temporarily disable PICTURE_SIZES until Safari branches.
3059
3060         * Configurations/FeatureDefines.xcconfig:
3061
3062 2015-06-29  Anders Carlsson  <andersca@apple.com>
3063
3064         Don't try to access a possibly deallocated WebFrameProxy object
3065         https://bugs.webkit.org/show_bug.cgi?id=146428
3066         rdar://problem/21446364
3067
3068         Reviewed by Tim Horton.
3069
3070         Make sure to call isMainFrame before calling out to the client inside
3071         WebPageProxy::didFailLoadForFrame, matching what we do for WebPageProxy::didFinishLoadForFrame.
3072
3073         Also, add a ViewGestureController::didFailLoadForMainFrame function and call that instead of
3074         calling didFinishLoadForMainFrame in the failure case.
3075
3076         * UIProcess/API/mac/WKView.mm:
3077         (-[WKView _didFailLoadForMainFrame]):
3078         * UIProcess/API/mac/WKViewInternal.h:
3079         * UIProcess/PageClient.h:
3080         * UIProcess/WebPageProxy.cpp:
3081         (WebKit::WebPageProxy::didFailLoadForFrame):
3082         * UIProcess/ios/ViewGestureControllerIOS.mm:
3083         (WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState):
3084         (WebKit::ViewGestureController::didFinishLoadForMainFrame): Deleted.
3085         * UIProcess/mac/PageClientImpl.h:
3086         * UIProcess/mac/PageClientImpl.mm:
3087         (WebKit::PageClientImpl::didFailLoadForMainFrame):
3088         * UIProcess/mac/ViewGestureController.h:
3089         (WebKit::ViewGestureController::didFinishLoadForMainFrame):
3090         (WebKit::ViewGestureController::didFailLoadForMainFrame):
3091         * UIProcess/mac/ViewGestureControllerMac.mm:
3092         (WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState):
3093         (WebKit::ViewGestureController::didFinishLoadForMainFrame): Deleted.
3094
3095 2015-06-29  Yongjun Zhang  <yongjun_zhang@apple.com>
3096
3097         Disable default gesture recognizers on preview.
3098         https://bugs.webkit.org/show_bug.cgi?id=146424
3099         rdar://problem/21572828
3100
3101         We should disable default gesture recognizers on preview, to avoid activating links or
3102         triggering touch events accidentally. We can enable them after preview finishes.
3103
3104         Reviewed by Beth Dakin.
3105
3106         * UIProcess/ios/WKContentViewInteraction.mm:
3107         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
3108         (-[WKContentView didDismissPreviewViewController:committing:]):
3109
3110 2015-06-27  Ryosuke Niwa  <rniwa@webkit.org>
3111
3112         Font panel doesn't get updated when bolding text via cmd+b in Mail on OS X
3113         https://bugs.webkit.org/show_bug.cgi?id=146379
3114
3115         Reviewed by Darin Adler.
3116
3117         Since font panel doesn't open in WebKit2 at the moment, just add an empty implementation of didApplyStyle
3118
3119         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3120         (WebKit::WebEditorClient::didApplyStyle):
3121         * WebProcess/WebCoreSupport/WebEditorClient.h:
3122         * WebProcess/WebPage/WebPage.h:
3123
3124 2015-06-29  Dean Jackson  <dino@apple.com>
3125
3126         Setting to enable/disable media controls sizing on page zoom
3127         https://bugs.webkit.org/show_bug.cgi?id=146423
3128         <rdar://problem/18379634>
3129
3130         Reviewed by Eric Carlson.
3131
3132         Add a new setting "MediaControlsScaleWithPageZoom" that can disable
3133         the behaviour we currently implement on iOS, where the media controls
3134         attempt to remain at a fixed size independent of page zoom.
3135
3136         * Shared/WebPreferencesDefinitions.h: Initialize to false on iOS, true otherwise.
3137         * UIProcess/API/C/WKPreferences.cpp:
3138         (WKPreferencesSetMediaControlsScaleWithPageZoom):
3139         (WKPreferencesGetMediaControlsScaleWithPageZoom):
3140         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3141         * WebProcess/WebPage/WebPage.cpp:
3142         (WebKit::WebPage::updatePreferences):
3143
3144 2015-06-29  Chris Dumez  <cdumez@apple.com>
3145
3146         [WK2][iOS] Swipe gesture snapshot stays up for 3 seconds when swiping back after top-hit navigation
3147         https://bugs.webkit.org/show_bug.cgi?id=146415
3148         <rdar://problem/21595801>
3149
3150         Reviewed by Tim Horton.
3151
3152         Swipe gesture snapshot previously stayed up for 3 seconds when swiping
3153         back after a top-hit navigation. This is because we do not restore the
3154         scroll position in this case and the ViewGestureController was waiting
3155         for the scroll position to be restored before taking down the snapshot.
3156
3157         This patch adds a fail-safe mechanism so that the WebProcess can let
3158         the UIProcess know (via a CouldNotRestorePageState IPC) that the page
3159         state (including scroll position) could not be restored so that it can
3160         let the ViewGestureController it should not wait for the scroll
3161         position to be restored.
3162
3163         * UIProcess/API/Cocoa/WKWebView.mm:
3164         (-[WKWebView _couldNotRestorePageState]):
3165         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3166         * UIProcess/PageClient.h:
3167         * UIProcess/WebPageProxy.h:
3168         * UIProcess/WebPageProxy.messages.in:
3169         * UIProcess/ios/PageClientImplIOS.h:
3170         * UIProcess/ios/PageClientImplIOS.mm:
3171         (WebKit::PageClientImpl::couldNotRestorePageState):
3172         * UIProcess/ios/WebPageProxyIOS.mm:
3173         (WebKit::WebPageProxy::couldNotRestorePageState):
3174         * WebProcess/WebPage/ios/WebPageIOS.mm:
3175         (WebKit::WebPage::restorePageState):
3176
3177 2015-06-29  Chris Dumez  <cdumez@apple.com>
3178
3179         [WK2][iOS] Add WKWebView private API to save a back/forward snapshot
3180         https://bugs.webkit.org/show_bug.cgi?id=146398
3181         <rdar://problem/21584231>
3182
3183         Reviewed by Dan Bernstein.
3184
3185         Add WKWebView private API to save a back/forward snapshot so that the
3186         client can make sure a back/forward snapshot is available even when
3187         swapping WKWebView upon navigation.
3188
3189         This matches the WKView.saveBackForwardSnapshotForItem API we have on
3190         Mac.
3191
3192         * UIProcess/API/Cocoa/WKWebView.mm:
3193         (-[WKWebView saveBackForwardSnapshotForItem:]):
3194         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3195
3196 2015-06-29  Anders Carlsson  <andersca@apple.com>
3197
3198         Use DISPATCH_SOURCE_TYPE_MEMORYPRESSURE instead of DISPATCH_SOURCE_TYPE_MEMORYSTATUS
3199         https://bugs.webkit.org/show_bug.cgi?id=146413
3200
3201         Reviewed by Andreas Kling.
3202
3203         Replace SPI with API.
3204
3205         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
3206         (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
3207         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3208         (InitWebCoreSystemInterface): Deleted.
3209
3210 2015-06-29  Enrica Casucci  <enrica@apple.com>
3211
3212         [iOS] Hardware Keyboard: All combinations of arrow keys and space key do not scroll the view.
3213         https://bugs.webkit.org/show_bug.cgi?id=146290
3214         rdar://problem/18466015
3215
3216         We don't normally get called by the keyboard to handle the event if we are not
3217         interacting with editable content. In order to receive all the hardware keyboard events
3218         we need to implement _handleKeyUIEvent which is called for every key event
3219         when the view is first responder. This gives us the opportunity to send each keystroke
3220         to the WebProcess to let any Javascript handler intercept it and then perform the default
3221         action for the key combination.
3222         Unfortunately this mechanism does not provide key repeat, which is implemented in the
3223         keyboard layer. In order to have it at least for the arrow keys, we use the keyCommands
3224         mechanism only for those.
3225
3226         Reviewed by Darin Adler.
3227
3228         * Platform/spi/ios/UIKitSPI.h:
3229         * UIProcess/API/Cocoa/WKWebView.mm:
3230         (-[WKWebView _scrollByOffset:]):
3231         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3232         * UIProcess/ios/WKContentViewInteraction.mm:
3233         (-[WKContentView canPerformAction:withSender:]):
3234         (-[WKContentView keyCommands]):
3235         (-[WKContentView _arrowKey:]):
3236         (-[WKContentView _handleKeyUIEvent:]):
3237         (-[WKContentView handleKeyEvent:]):
3238         (-[WKContentView handleKeyWebEvent:]):
3239         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
3240
3241 2015-06-28  Dan Bernstein  <mitz@apple.com>
3242
3243         Fixed the iOS 8.x build after r186066.
3244
3245         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3246         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3247         (WebKit::WebVideoFullscreenManagerProxy::create):
3248
3249 2015-06-28  Dan Bernstein  <mitz@apple.com>
3250
3251         Fixed the iOS build after r186059.
3252
3253         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3254
3255 2015-06-28  Chris Fleizach  <cfleizach@apple.com>
3256
3257         AX: iOS: Crash at accessibilityObjectForMainFramePlugin()
3258         https://bugs.webkit.org/show_bug.cgi?id=146399
3259
3260         Reviewed by Darin Adler.
3261
3262         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
3263         it has not been initialized.
3264
3265         * WebProcess/WebPage/ios/WebPageIOS.mm:
3266         (WebKit::WebPage::accessibilityObjectForMainFramePlugin):
3267
3268 2015-06-28  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3269
3270         Use Ref/RefPtr instead of PassRefPtr in WebKit2
3271         https://bugs.webkit.org/show_bug.cgi?id=146190
3272
3273         Reviewed by Darin Adler.
3274
3275         As a step to remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
3276
3277         * Shared/API/c/WKContextMenuItem.cpp:
3278         (WKContextMenuItemCreateAsAction):
3279         (WKContextMenuItemCreateAsCheckableAction):
3280         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
3281         (WebKit::WebCoordinatedSurface::create):
3282         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
3283         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
3284         (WebKit::ThreadSafeCoordinatedSurface::create):
3285         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h:
3286         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
3287         (WebKit::ThreadedCompositor::create):
3288         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
3289         * Shared/Plugins/NPRemoteObjectMap.cpp:
3290         (WebKit::NPRemoteObjectMap::create):
3291         * Shared/Plugins/NPRemoteObjectMap.h:
3292         * Shared/WebBatteryStatus.h:
3293         (WebKit::WebBatteryStatus::create):
3294         * Shared/WebCertificateInfo.h:
3295         (WebKit::WebCertificateInfo::create):
3296         * Shared/WebContextMenuItem.h:
3297         (WebKit::WebContextMenuItem::create):
3298         * Shared/WebRenderObject.cpp:
3299         (WebKit::WebRenderObject::create):
3300         * Shared/WebRenderObject.h:
3301         (WebKit::WebRenderObject::create):
3302         * UIProcess/API/APINavigationData.h:
3303         (API::NavigationData::create):
3304         * UIProcess/API/APISession.cpp:
3305         (API::Session::createEphemeral):
3306         * UIProcess/API/APISession.h:
3307         * UIProcess/API/APISessionState.cpp:
3308         (API::SessionState::create):
3309         * UIProcess/API/APISessionState.h:
3310         * UIProcess/API/APIUserScript.h:
3311         * UIProcess/API/APIWebsiteDataStore.cpp:
3312         (API::WebsiteDataStore::createNonPersistentDataStore):
3313         (API::WebsiteDataStore::create):
3314         * UIProcess/API/APIWebsiteDataStore.h:
3315         * UIProcess/API/C/WKCredential.cpp:
3316         (WKCredentialCreate):
3317         (WKCredentialCreateWithCertificateInfo):
3318         * UIProcess/API/C/WKPage.cpp:
3319         (WKPageCopySessionState):
3320         (WKPageSetPageContextMenuClient):
3321         * UIProcess/API/C/WKSessionStateRef.cpp:
3322         (WKSessionStateCreateFromData):
3323         * UIProcess/API/C/WKUserScriptRef.cpp:
3324         (WKUserScriptCreateWithSource):
3325         * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
3326         (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]):
3327         * UIProcess/API/Cocoa/WKProcessGroup.mm:
3328         (-[WKProcessGroup _setAllowsSpecificHTTPSCertificate:forHost:]):
3329         * UIProcess/API/Cocoa/WKProcessPool.mm:
3330         (-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]):
3331         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3332         (+[WKWebsiteDataStore nonPersistentDataStore]):
3333         * UIProcess/API/efl/ewk_auth_request_private.h:
3334         (EwkAuthRequest::create):
3335         * UIProcess/API/efl/ewk_back_forward_list_item_private.h:
3336         (EwkBackForwardListItem::create):
3337         * UIProcess/API/efl/ewk_context.cpp:
3338         (EwkContext::create):
3339         * UIProcess/API/efl/ewk_context_menu_private.h:
3340         (EwkContextMenu::create):
3341         * UIProcess/API/efl/ewk_download_job_private.h:
3342         (EwkDownloadJob::create):
3343         * UIProcess/API/efl/ewk_file_chooser_request_private.h:
3344         (EwkFileChooserRequest::create):
3345         * UIProcess/API/efl/ewk_form_submission_request_private.h:
3346         (EwkFormSubmissionRequest::create):
3347         * UIProcess/API/efl/ewk_navigation_data_private.h:
3348         (EwkNavigationData::create):
3349         * UIProcess/API/efl/ewk_security_origin_private.h:
3350         (EwkSecurityOrigin::create):
3351         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
3352         (WebKit::AuthenticationChallengeProxy::create):
3353         * UIProcess/Authentication/AuthenticationDecisionListener.h:
3354         (WebKit::AuthenticationDecisionListener::create):
3355         * UIProcess/Authentication/WebCredential.h:
3356         (WebKit::WebCredential::create):
3357         * UIProcess/Authentication/WebProtectionSpace.h:
3358         (WebKit::WebProtectionSpace::create):
3359         * UIProcess/Cocoa/NavigationState.mm:
3360         (WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
3361         * UIProcess/Databases/DatabaseProcessProxy.cpp:
3362         (WebKit::DatabaseProcessProxy::create):
3363         * UIProcess/Databases/DatabaseProcessProxy.h:
3364         * UIProcess/Launcher/ProcessLauncher.h:
3365         (WebKit::ProcessLauncher::create):
3366         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3367         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
3368         (WebKit::WebNotificationManagerProxy::create):
3369         * UIProcess/Notifications/WebNotificationManagerProxy.h:
3370         * UIProcess/Plugins/PluginProcessProxy.cpp:
3371         (WebKit::PluginProcessProxy::create):
3372         * UIProcess/Plugins/PluginProcessProxy.h:
3373         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
3374         (WebKit::RemoteScrollingTree::create):
3375         * UIProcess/Scrolling/RemoteScrollingTree.h:
3376         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
3377         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::create):
3378         * UIProcess/WebProcessPool.cpp:
3379         (WebKit::WebProcessPool::WebProcessPool):
3380         * UIProcess/efl/WebPopupMenuListenerEfl.h:
3381         (WebKit::WebPopupMenuListenerEfl::create):
3382         * UIProcess/efl/WebViewEfl.cpp:
3383         (WebKit::WebView::create):
3384         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3385         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3386         (WebKit::WebVideoFullscreenManagerProxy::create):
3387
3388 2015-06-28  Dan Bernstein  <mitz@apple.com>
3389
3390         [Cocoa] Remove _WKSecurityOrigin.{h,mm}
3391         https://bugs.webkit.org/show_bug.cgi?id=146402
3392
3393         Reviewed by Sam Weinig.
3394
3395         * UIProcess/API/Cocoa/WKSecurityOrigin.mm: Declare and define _WKSecurityOrigin here.
3396         (-[WKSecurityOrigin methodSignatureForSelector:]): Moved into a WKBinaryCompatibility
3397         category.
3398         (-[WKSecurityOrigin forwardInvocation:]): Ditto.
3399         * UIProcess/API/Cocoa/_WKSecurityOrigin.h: Removed.
3400         * UIProcess/API/Cocoa/_WKSecurityOrigin.mm: Removed.
3401         * WebKit2.xcodeproj/project.pbxproj: Removed references to _WKSecurityOrigin.{h,mm}.
3402
3403 2015-06-28  Dan Bernstein  <mitz@apple.com>
3404
3405         Tried to fix the EFL buid after r186046.
3406
3407         * UIProcess/efl/PageUIClientEfl.cpp:
3408         (WebKit::PageUIClientEfl::PageUIClientEfl):
3409
3410 2015-06-28  Dan Bernstein  <mitz@apple.com>
3411
3412         <rdar://problem/21581792> REGRESSION (r185915): Source-incompatible change in WKPageUIClient
3413         https://bugs.webkit.org/show_bug.cgi?id=146396
3414
3415         Reviewed by Anders Carlsson.
3416
3417         * UIProcess/API/C/WKPageUIClient.h: Renamed
3418         runJavaScript{Alert,Confirm,Prompt}_deprecatedForUseWithV0 back to runJavaScript{Alert,Confirm,Prompt}
3419         in client versions prior to V5.
3420
3421 2015-06-28  Tim Horton  <timothy_horton@apple.com>
3422
3423         REGRESSION: Page footers are displayed above the bottom of the WebView due to tiled scaling
3424         https://bugs.webkit.org/show_bug.cgi?id=146393
3425         <rdar://problem/21113217>
3426
3427         Reviewed by Sam Weinig.
3428
3429         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3430         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
3431         Don't include the top content inset in the layout size.
3432
3433 2015-06-26  Antti Koivisto  <antti@apple.com>
3434
3435         Make NetworkCache::traverse faster
3436         https://bugs.webkit.org/show_bug.cgi?id=146354
3437
3438         Reviewed by Anders Carlsson.
3439
3440         * NetworkProcess/cache/NetworkCacheIOChannel.h:
3441         (WebKit::NetworkCache::IOChannel::path):
3442         (WebKit::NetworkCache::IOChannel::type):
3443         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
3444         (WebKit::NetworkCache::IOChannel::open):
3445         (WebKit::NetworkCache::IOChannel::read):
3446         (WebKit::NetworkCache::IOChannel::write):
3447         (WebKit::NetworkCache::IOChannel::readSync): Deleted.
3448
3449             Not needed anymore.
3450
3451         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3452         (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
3453         (WebKit::NetworkCache::Storage::TraverseOperation::TraverseOperation):
3454
3455             Add TraverseOperation, similar to Read/Write.
3456
3457         (WebKit::NetworkCache::Storage::open):
3458         (WebKit::NetworkCache::Storage::traverse):
3459
3460             Use async I/O.
3461             Use condition variable to allow maximum 5 parallel file reads.
3462
3463         * NetworkProcess/cache/NetworkCacheStorage.h:
3464
3465 2015-06-27  Carlos Garcia Campos  <cgarcia@igalia.com>
3466
3467         [SOUP] NetworkCache: Make NetworkProcess::clearDiskCache actually clear the the resources depending on the date
3468         https://bugs.webkit.org/show_bug.cgi?id=146316
3469
3470         Reviewed by Sergio Villar Senin.
3471
3472         And make sure the completion handler is called, as well. This
3473         functionality is already implemented in Storage::clear(), so we
3474         just need to pass the time point and completion handler to Cache::clear().
3475
3476         * NetworkProcess/soup/NetworkProcessSoup.cpp:
3477         (WebKit::NetworkProcess::clearDiskCache):
3478
3479 2015-06-26  Beth Dakin  <bdakin@apple.com>
3480
3481         Rubber-stamped by Tim Horton.
3482
3483