[Content Filtering] Determine navigation and content policy before continuing to...
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-08-26  Andy Estes  <aestes@apple.com>
2
3         [Content Filtering] Determine navigation and content policy before continuing to filter a load
4         https://bugs.webkit.org/show_bug.cgi?id=148506
5
6         Reviewed by Brady Eidson.
7
8         Deleted parts of r188486 and r188851.
9
10         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
11         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
12         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
13         * WebProcess/WebPage/WebFrame.cpp:
14         (WebKit::WebFrame::convertMainResourceLoadToDownload):
15
16 2015-08-31  Chris Dumez  <cdumez@apple.com>
17
18         Range.detach() / NodeIterator.detach() should be no-ops as per the latest DOM specification
19         https://bugs.webkit.org/show_bug.cgi?id=148454
20
21         Reviewed by Ryosuke Niwa.
22
23         Update Range API call sites to reflect changes.
24
25         * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
26         (-[WKDOMRange collapse:]):
27         (-[WKDOMRange startContainer]):
28         (-[WKDOMRange startOffset]):
29         (-[WKDOMRange endContainer]):
30         (-[WKDOMRange endOffset]):
31         (-[WKDOMRange isCollapsed]):
32         (-[WKDOMRange text]): Deleted.
33         * WebProcess/WebPage/FindController.cpp:
34         (WebKit::FindController::getImageForFindMatch):
35         (WebKit::FindController::selectFindMatch):
36         * WebProcess/WebPage/WebPage.cpp:
37         (WebKit::targetFrameForEditing):
38         (WebKit::WebPage::firstRectForCharacterRangeAsync): Deleted.
39         * WebProcess/WebPage/efl/WebPageEfl.cpp:
40         (WebKit::targetFrameForEditing):
41         * WebProcess/WebPage/ios/WebPageIOS.mm:
42         (WebKit::WebPage::rangeForWebSelectionAtPosition):
43         (WebKit::WebPage::rangeForBlockAtPoint):
44         (WebKit::containsRange):
45         (WebKit::unionDOMRanges):
46         (WebKit::WebPage::contractedRangeFromHandle):
47         * WebProcess/WebPage/mac/WebPageMac.mm:
48         (WebKit::WebPage::dictionaryPopupInfoForRange):
49         (WebKit::WebPage::firstRectForCharacterRange): Deleted.
50
51 2015-08-31  Tim Horton  <timothy_horton@apple.com>
52
53         iOS WebKit2 find-in-page doesn't support multi-line results, is often blank
54         https://bugs.webkit.org/show_bug.cgi?id=148599
55         <rdar://problem/17914031>
56
57         Reviewed by Beth Dakin.
58
59         * WebProcess/WebPage/FindController.cpp:
60         (WebKit::FindController::findString):
61         (WebKit::FindController::didFindString):
62         * WebProcess/WebPage/FindController.h:
63         Add didFindString() for FindControllerIOS.
64
65         * WebProcess/WebPage/ios/FindControllerIOS.mm:
66         (WebKit::FindIndicatorOverlayClientIOS::drawRect):
67         (WebKit::FindController::updateFindIndicator):
68         (WebKit::setCompositionSelectionChangeEnabledInAllFrames):
69         (WebKit::FindController::willFindString):
70         (WebKit::FindController::didFindString):
71         (WebKit::FindController::didFailToFindString):
72         (WebKit::FindController::didHideFindIndicator):
73         * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
74         (WebKit::FindIndicatorOverlayClientIOS::FindIndicatorOverlayClientIOS):
75         Adopt TextIndicator and shrink-wrapping.
76
77         We'll re-create the indicator if the device/page scale factor change;
78         this is the only case in which a TextIndicator sticks around when
79         page scale changes -- we should come up with a better model!
80
81 2015-08-31  Antti Koivisto  <antti@apple.com>
82
83         Network Cache: Stale content after back navigation
84         https://bugs.webkit.org/show_bug.cgi?id=148634
85
86         Reviewed by Chris Dumez.
87
88         It is possible to get an older version of the previous page when navigating back. This can happen
89         if the main resource load has not completed before navigating away from the page.
90
91         Network cache entry is normally updated when the load completes. In case of cancellation we would leave
92         any existing entry as-is. However we render incrementally and user might have seen some content from
93         the partial load already. Navigating back to the cached page could show older version of the content.
94
95         * NetworkProcess/NetworkResourceLoader.cpp:
96         (WebKit::NetworkResourceLoader::abort):
97
98             If a network load is canceled by the client after receiving response but before the load has completed
99             remove any existing cache entry for it.
100
101 2015-08-28  Myles C. Maxfield  <mmaxfield@apple.com>
102
103         Migrate GraphicsContexts from pointers to references
104         https://bugs.webkit.org/show_bug.cgi?id=148561
105
106         Reviewed by Tim Horton.
107
108         * PluginProcess/PluginControllerProxy.cpp:
109         (WebKit::PluginControllerProxy::paint):
110         * Shared/cairo/ShareableBitmapCairo.cpp:
111         (WebKit::ShareableBitmap::paint):
112         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
113         (WebKit::imageForRect):
114         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
115         (WebKit::InjectedBundleRangeHandle::renderedImage):
116         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
117         (WebKit::NetscapePlugin::paint):
118         (WebKit::NetscapePlugin::snapshot):
119         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
120         * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
121         (WebKit::NetscapePlugin::platformPaint):
122         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
123         (WebKit::NetscapePlugin::platformPaint):
124         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
125         (WebKit::NetscapePlugin::platformPaint):
126         * WebProcess/Plugins/PDF/PDFPlugin.h:
127         * WebProcess/Plugins/PDF/PDFPlugin.mm:
128         (WebKit::PDFPlugin::updateControlTints):
129         (WebKit::PDFPlugin::paintControlForLayerInContext):
130         * WebProcess/Plugins/Plugin.cpp:
131         (WebKit::Plugin::updateControlTints):
132         * WebProcess/Plugins/Plugin.h:
133         * WebProcess/Plugins/PluginProxy.cpp:
134         (WebKit::PluginProxy::paint):
135         * WebProcess/Plugins/PluginProxy.h:
136         * WebProcess/Plugins/PluginView.cpp:
137         (WebKit::PluginView::paint):
138         * WebProcess/Plugins/PluginView.h:
139         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
140         (WebKit::convertCairoSurfaceToShareableBitmap):
141         * WebProcess/WebPage/WebPage.cpp:
142         (WebKit::WebPage::drawRect):
143         (WebKit::WebPage::snapshotAtSize):
144         (WebKit::WebPage::snapshotNode):
145         * WebProcess/WebPage/ios/FindControllerIOS.mm:
146         (WebKit::FindIndicatorOverlayClientIOS::drawRect):
147
148 2015-08-28  Eric Carlson  <eric.carlson@apple.com>
149
150         [Mac] Restructure WebMediaSessionManager for testing
151         https://bugs.webkit.org/show_bug.cgi?id=148593
152
153         Reviewed by Jer Noble.
154
155         * UIProcess/mac/PageClientImpl.mm:
156         (WebKit::PageClientImpl::mediaSessionManager): Call WebMediaSessionManager::singleton, not
157           WebMediaSessionManagerMac::singleton.
158
159 2015-08-28  Jer Noble  <jer.noble@apple.com>
160
161         [iOS] Add WebKit/WebKit2 settings to control automatic data loading
162         https://bugs.webkit.org/show_bug.cgi?id=148579
163
164         Reviewed by Anders Carlsson.
165
166         Add a property to WKWebViewConfiguration to control whether clients are allowed
167         to load media data automatically.  Pass this configuration on through to WebCore.
168
169         * Shared/WebPreferencesDefinitions.h:
170         * UIProcess/API/Cocoa/WKWebView.mm:
171         (-[WKWebView initWithFrame:configuration:]):
172         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
173         (-[WKWebViewConfiguration init]):
174         (-[WKWebViewConfiguration copyWithZone:]):
175         (-[WKWebViewConfiguration _mediaDataLoadsAutomatically]):
176         (-[WKWebViewConfiguration _setMediaDataLoadsAutomatically:]):
177         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
178         * WebProcess/WebPage/WebPage.cpp:
179         (WebKit::WebPage::updatePreferences):
180
181 2015-08-28  Jer Noble  <jer.noble@apple.com>
182
183         [iOS] Make the AllowsInlineMediaPlayback preference work in WebKit / WebKit2.
184         https://bugs.webkit.org/show_bug.cgi?id=147512
185
186         Reviewed by Anders Carlsson.
187
188         Default the value of allowsInlineMediaPlayback to YES on iPad and NO on iPhone and iPod.
189         Add a new configuration property, _inlineMediaPlaybackRequiresPlaysInlineAttribute, which
190         defaults to NO on iPad and YES on iPhone and iPad.
191
192         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
193         (-[WKWebViewConfiguration init]):
194         * Shared/WebPreferencesDefinitions.h:
195         * UIProcess/API/C/WKPreferences.cpp:
196         (WKPreferencesSetInlineMediaPlaybackRequiresPlaysInlineAttribute):
197         (WKPreferencesGetInlineMediaPlaybackRequiresPlaysInlineAttribute):
198         * UIProcess/API/C/WKPreferencesRefPrivate.h:
199         * UIProcess/API/Cocoa/WKWebView.mm:
200         (-[WKWebView initWithFrame:configuration:]):
201         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
202         (-[WKWebViewConfiguration init]):
203         (-[WKWebViewConfiguration copyWithZone:]):
204         (-[WKWebViewConfiguration _inlineMediaPlaybackRequiresPlaysInlineAttribute]):
205         (-[WKWebViewConfiguration _setInlineMediaPlaybackRequiresPlaysInlineAttribute:]):
206         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
207         * WebProcess/WebPage/WebPage.cpp:
208         (WebKit::WebPage::updatePreferences):
209
210 2015-08-28  Timothy Horton  <timothy_horton@apple.com>
211
212         Add navigation gesture callbacks to WKPageNavigationClient
213         https://bugs.webkit.org/show_bug.cgi?id=148568
214         <rdar://problem/22371346>
215
216         Reviewed by Anders Carlsson.
217
218         * UIProcess/API/APINavigationClient.h:
219         (API::NavigationClient::didBeginNavigationGesture):
220         (API::NavigationClient::willEndNavigationGesture):
221         (API::NavigationClient::didEndNavigationGesture):
222         * UIProcess/API/C/WKPage.cpp:
223         (WKPageSetPageNavigationClient):
224         * UIProcess/API/C/WKPageNavigationClient.h:
225         * UIProcess/WebPageProxy.cpp:
226         (WebKit::WebPageProxy::navigationGestureDidBegin):
227         (WebKit::WebPageProxy::navigationGestureWillEnd):
228         (WebKit::WebPageProxy::navigationGestureDidEnd):
229
230 2015-08-28  Timothy Horton  <timothy_horton@apple.com>
231
232         Get rid of the DynamicSizeWithMinimumViewSize layout mode
233         https://bugs.webkit.org/show_bug.cgi?id=148554
234
235         Reviewed by Anders Carlsson.
236
237         * UIProcess/API/C/WKLayoutMode.h:
238         * UIProcess/API/Cocoa/WKViewPrivate.h:
239         * UIProcess/API/Cocoa/WKWebView.mm:
240         (-[WKWebView _layoutMode]):
241         (-[WKWebView _setLayoutMode:]):
242         (-[WKWebView _setMinimumViewSize:]): Deleted.
243         (-[WKWebView _minimumViewSize]): Deleted.
244         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
245         * UIProcess/API/Cocoa/_WKLayoutMode.h:
246         * UIProcess/API/mac/WKView.mm:
247         (-[WKView _setMinimumViewSize:]): Deleted.
248         (-[WKView _minimumViewSize]): Deleted.
249         * UIProcess/WebPageProxy.cpp:
250         (WebKit::WebPageProxy::scaleViewAndUpdateGeometryFenced): Deleted.
251         * UIProcess/WebPageProxy.h:
252         * UIProcess/mac/WKViewLayoutStrategy.mm:
253         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
254         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
255         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy _updateTransientScale:]): Deleted.
256         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]): Deleted.
257         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeMinimumViewSize]): Deleted.
258         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willStartLiveResize]): Deleted.
259         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didEndLiveResize]): Deleted.
260         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeFrameSize]): Deleted.
261         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]): Deleted.
262         * WebProcess/WebPage/DrawingArea.h:
263         (WebKit::DrawingArea::replyWithFenceAfterNextFlush): Deleted.
264         * WebProcess/WebPage/WebPage.cpp:
265         (WebKit::WebPage::scaleViewAndUpdateGeometryFenced): Deleted.
266         * WebProcess/WebPage/WebPage.h:
267         * WebProcess/WebPage/WebPage.messages.in:
268         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
269         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
270         (WebKit::TiledCoreAnimationDrawingArea::replyWithFenceAfterNextFlush): Deleted.
271
272 2015-08-28  Timothy Horton  <timothy_horton@apple.com>
273
274         [Mac] Right-clicking on GIFs spins the UI process for a while
275         https://bugs.webkit.org/show_bug.cgi?id=148566
276         <rdar://problem/22460854>
277
278         Reviewed by Brady Eidson.
279
280         * UIProcess/WebPageProxy.cpp:
281         (WebKit::WebPageProxy::internalShowContextMenu):
282         (WebKit::WebPageProxy::platformInitializeShareMenuItem):
283         * UIProcess/WebPageProxy.h:
284         * UIProcess/mac/WebPageProxyMac.mm:
285         (WebKit::WebPageProxy::platformInitializeShareMenuItem):
286         Move all of the code to make a Share menuitem into platformInitializeShareMenuItem.
287         Make an NSImage directly from the image data if possible.
288
289 2015-08-28  Michael Catanzaro  <mcatanzaro@igalia.com>
290
291         [CMake] LIBSECCOMP_INCLUDE_DIRS should be added to WebKit2_SYSTEM_INCLUDE_DIRECTORIES
292         https://bugs.webkit.org/show_bug.cgi?id=148552
293
294         Reviewed by Žan Doberšek.
295
296         LIBSECCOMP_INCLUDE_DIRS should be added to WebKit2_SYSTEM_INCLUDE_DIRECTORIES, not
297         WebKit2_INCLUDE_DIRECTORIES. (So that warnings from libseccomp headers are suppressed. Not
298         that there are any right now.)
299
300         * PlatformGTK.cmake:
301
302 2015-08-28  Michael Catanzaro  <mcatanzaro@igalia.com>
303
304         Minor fixes in reportUnexpectedSyscall
305         https://bugs.webkit.org/show_bug.cgi?id=148551
306
307         Reviewed by Žan Doberšek.
308
309         There is an off-by-one in the static assert.
310
311         Also, an unsigned long long is passed in, but the parameter is an int. Then it's passed to
312         writeUnsignedInt, which takes an unsigned int. Let's use unsigned int instead. (The value
313         is a syscall number, so it's safe to truncate regardless -- it never be anywhere near as
314         large as an int, unless the input is malicious, in which case truncating it is the right
315         thing to do anyway -- so this is just a matter of style.)
316
317         * Shared/linux/SeccompFilters/Syscall.cpp:
318         (WebKit::reportUnexpectedSyscall):
319
320 2015-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
321
322         [GTK] Simplify the internal API to create a WebView
323         https://bugs.webkit.org/show_bug.cgi?id=148570
324
325         Reviewed by Žan Doberšek.
326
327         Now that all the information required to create a WebView is in
328         API::PageConfiguration, we can simplify the internal API to
329         receive only the configuration instead of receiving a long list of
330         parameters that we use to build a new API::PageConfiguration.
331
332         * UIProcess/API/C/gtk/WKView.cpp:
333         (WKViewCreate):
334         * UIProcess/API/C/gtk/WKView.h:
335         * UIProcess/API/gtk/WebKitWebContext.cpp:
336         (webkitWebContextCreatePageForWebView):
337         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
338         (webkitWebViewBaseCreate):
339         (webkitWebViewBaseCreateWebPage):
340         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
341         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
342         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
343
344 2015-08-27  Timothy Horton  <timothy_horton@apple.com>
345
346         Video full-screen shouldn't use the DynamicSizeWithMinimumViewSize layout mode
347         https://bugs.webkit.org/show_bug.cgi?id=148553
348
349         Reviewed by Zalan Bujtas.
350
351         * UIProcess/API/mac/WKView.mm:
352         (-[WKView _supportsArbitraryLayoutModes]):
353         (-[WKView _updateSupportsArbitraryLayoutModes]):
354         (-[WKView _didCommitLoadForMainFrame]):
355         * UIProcess/API/mac/WKViewInternal.h:
356         * UIProcess/mac/PageClientImpl.mm:
357         (WebKit::PageClientImpl::beganEnterFullScreen):
358         (WebKit::PageClientImpl::beganExitFullScreen):
359         * UIProcess/mac/WKFullScreenWindowController.mm:
360         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Deleted.
361         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Deleted.
362         It's not OK to just randomly change the layout mode, because the client
363         can change it or its properties out from under us, and also because we
364         weren't resetting it to whatever the client had specified.
365
366         I recently implemented a better way to override layout modes, for PDF,
367         so use that here. Also, we shouldn't use DynamicSizeWithMinimumViewSize,
368         we should just use the "normal" mode (ViewSize), since we've already ensured
369         a minimum size by setting contentMinSize.
370
371 2015-08-27  Alexey Proskuryakov  <ap@apple.com>
372
373         pluginInfo.clientLoadPolicy is used uninitialized in WebContent process
374         https://bugs.webkit.org/show_bug.cgi?id=148550
375
376         Reviewed by Tim Horton.
377
378         This fixes flakiness on plugins/plugin-javascript-access.html.
379
380         * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<PluginInfo>::decode):
381
382 2015-08-27  Timothy Horton  <timothy_horton@apple.com>
383
384         Factor out Lookup invocation
385         https://bugs.webkit.org/show_bug.cgi?id=148509
386
387         Reviewed by Anders Carlsson.
388
389         * Shared/DictionaryPopupInfo.cpp: Removed.
390         * Shared/DictionaryPopupInfo.h: Removed.
391         Moved to WebCore.
392
393         * Shared/WebCoreArgumentCoders.cpp:
394         (IPC::ArgumentCoder<DictionaryPopupInfo>::encode):
395         (IPC::ArgumentCoder<DictionaryPopupInfo>::decode):
396         Add encode/decoders for DictionaryPopupInfo now that it's in WebCore.
397
398         * Shared/WebCoreArgumentCoders.h:
399         * Shared/WebHitTestResult.h:
400         * Shared/mac/ArgumentCodersMac.h:
401         * UIProcess/API/mac/WKView.mm:
402         (+[WKView hideWordDefinitionWindow]):
403         (-[WKView _dismissContentRelativeChildWindows]):
404         * UIProcess/PageClient.h:
405         * UIProcess/WebPageProxy.h:
406         * UIProcess/WebPageProxy.messages.in:
407         * UIProcess/mac/PageClientImpl.h:
408         * UIProcess/mac/PageClientImpl.mm:
409         (WebKit::PageClientImpl::didPerformDictionaryLookup):
410         * UIProcess/mac/WKImmediateActionController.mm:
411         (-[WKImmediateActionController _animationControllerForText]):
412         * UIProcess/mac/WebPageProxyMac.mm:
413         * WebKit2.xcodeproj/project.pbxproj:
414         * WebProcess/Plugins/PDF/PDFPlugin.mm:
415         (WebKit::PDFPlugin::showDefinitionForAttributedString):
416         (WebKit::PDFPlugin::lookupTextAtLocation):
417         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
418         * WebProcess/WebPage/WebPage.h:
419         * WebProcess/WebPage/mac/WebPageMac.mm:
420         (WebKit::WebPage::performDictionaryLookupAtLocation):
421         (WebKit::WebPage::performDictionaryLookupForSelection):
422         (WebKit::WebPage::dictionaryPopupInfoForRange):
423         (WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin):
424         (WebKit::WebPage::lookupTextAtLocation):
425         Adjust to new names and move stuff to WebCore.
426
427 2015-08-27  Brian Burg  <bburg@apple.com>
428
429         Web Inspector: FrontendChannel should know its own connection type
430         https://bugs.webkit.org/show_bug.cgi?id=148482
431
432         Reviewed by Joseph Pecoraro.
433
434         * WebProcess/WebPage/WebInspector.h: add connectionType().
435
436 2015-08-27  Csaba Osztrogonác  <ossy@webkit.org>
437
438         [EFL] REGRESSION: 50+ layout tests crash
439         https://bugs.webkit.org/show_bug.cgi?id=148471
440
441         Reviewed by Gyuyoung Kim.
442
443         * UIProcess/CoordinatedGraphics/WebView.cpp:
444         (WebKit::WebView::WebView):
445
446 2015-08-27  Zan Dobersek  <zdobersek@igalia.com>
447
448         Fix WKMutableArray creations in WKUserMediaPermissionRequest
449         https://bugs.webkit.org/show_bug.cgi?id=148489
450
451         Reviewed by Carlos Garcia Campos.
452
453         Call WKMutableArrayCreate() to create the WKMutableArray objects.
454         WKMutableArrayRef type is a pointer, so calling 'WKMutableArrayRef()' 
455         just sets a null value to the variable that is then returned and
456         queried for size in WebKitTestRunner's TestController, resulting
457         in a crash.
458
459         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
460         (WKUserMediaPermissionRequestDeviceNamesVideo):
461         (WKUserMediaPermissionRequestDeviceNamesAudio):
462
463 2015-08-26  Emanuele Aina  <emanuele.aina@collabora.com>
464
465         [ThreadedCompositor] Use WTF::Condition together with WTF::Lock
466         https://bugs.webkit.org/show_bug.cgi?id=148493
467
468         Reviewed by Gyuyoung Kim.
469
470         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
471         Replace ThreadCondition::signal() calls with Condition::notifyOne().
472         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
473         Replace ThreadCondition usage with Condition.
474
475 2015-08-26  Wenson Hsieh  <wenson_hsieh@apple.com>
476
477         Fix crash due to animationDidEnd called on deallocated RemoteLayerTreeHost
478         https://bugs.webkit.org/show_bug.cgi?id=148442
479         <rdar://problem/21609257>
480
481         Reviewed by Tim Horton.
482
483         A PlatformCAAnimationRemote's backpointer to a deallocated RemoteLayerTreeHost is not
484         invalidated when its host removes its reference to it.
485
486         * UIProcess/mac/RemoteLayerTreeHost.mm:
487         (WebKit::RemoteLayerTreeHost::layerWillBeRemoved): Invalidate a backpointer from the
488             PlatformCAAnimationRemotes to the RemoteLayerTreeHost.
489
490 2015-08-26  Beth Dakin  <bdakin@apple.com>
491
492         REGRESSION: Safari navigates after a cancelled force click
493         https://bugs.webkit.org/show_bug.cgi?id=148491
494         -and corresponding-
495         rdar://problem/22394323
496
497         Reviewed by Tim Horton.
498
499         Use the current stage to determine which type of cancel this is.
500         * WebProcess/WebPage/mac/WebPageMac.mm:
501         (WebKit::WebPage::immediateActionDidCancel):
502
503 2015-08-26  Eric Carlson  <eric.carlson@apple.com>
504
505         Media Session: make MediaSessionMetadata a class
506         https://bugs.webkit.org/show_bug.cgi?id=148486
507
508         Reviewed by Jer Noble.
509
510         * Shared/WebCoreArgumentCoders.h: struct MediaSessionMetadata -> class MediaSessionMetadata.
511         * UIProcess/WebPageProxy.h: Ditto.
512
513 2015-08-26  Zan Dobersek  <zdobersek@igalia.com>
514
515         Unreviewed.
516
517         Fix the crashes in GTK+'s WebKitTestRunner by setting the process pool
518         on the API::PageConfiguration object in webkitWebViewBaseCreate().
519
520         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
521         (webkitWebViewBaseCreate):
522
523 2015-08-25  Beth Dakin  <bdakin@apple.com>
524
525         Speculative build fix.
526
527         * UIProcess/ios/WKContentViewInteraction.mm:
528         (-[WKContentView setupInteraction]):
529
530 2015-08-25  Beth Dakin  <bdakin@apple.com>
531
532         Long press gesture recognizer should adjust delay based on other recognizers
533         https://bugs.webkit.org/show_bug.cgi?id=148402
534         -and corresponding-
535         rdar://problem/22278723
536
537         Reviewed by Tim Horton.
538
539         Call _setAdjustsDelayBasedOnOtherRecognizers with a value of YES.
540         * UIProcess/ios/WKContentViewInteraction.mm:
541         (-[WKContentView setupInteraction]):
542
543 2015-08-24  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
544
545         Unreviewed, EFL and GTK build fix since r188895.
546
547         * CMakeLists.txt: Rename Rename VisitedLinkProvider to VisitedLinkStore.
548
549 2015-08-24  Anders Carlsson  <andersca@apple.com>
550
551         Rename VisitedLinkProvider to VisitedLinkStore
552         https://bugs.webkit.org/show_bug.cgi?id=148406
553
554         Reviewed by Tim Horton.
555
556         * DerivedSources.make:
557         * Shared/API/APIObject.h:
558         * Shared/Cocoa/APIObject.mm:
559         (API::Object::newObject):
560         * UIProcess/API/APIPageConfiguration.cpp:
561         (API::PageConfiguration::copy):
562         (API::PageConfiguration::visitedLinkStore):
563         (API::PageConfiguration::setVisitedLinkStore):
564         (API::PageConfiguration::visitedLinkProvider): Deleted.
565         (API::PageConfiguration::setVisitedLinkProvider): Deleted.
566         * UIProcess/API/APIPageConfiguration.h:
567         * UIProcess/API/C/WKContext.cpp:
568         (WKContextAddVisitedLink):
569         (WKContextClearVisitedLinks):
570         * UIProcess/API/Cocoa/WKWebView.mm:
571         (-[WKWebView initWithFrame:configuration:]):
572         * UIProcess/API/Cocoa/_WKVisitedLinkStore.mm:
573         (-[_WKVisitedLinkStore init]):
574         (-[_WKVisitedLinkStore dealloc]):
575         (-[_WKVisitedLinkStore addVisitedLinkWithURL:]):
576         (-[_WKVisitedLinkStore removeAll]):
577         (-[_WKVisitedLinkStore _apiObject]):
578         * UIProcess/API/Cocoa/_WKVisitedLinkStoreInternal.h:
579         (WebKit::wrapper):
580         * UIProcess/VisitedLinkProvider.cpp:
581         (WebKit::generateIdentifier): Deleted.
582         (WebKit::VisitedLinkProvider::create): Deleted.
583         (WebKit::VisitedLinkProvider::~VisitedLinkProvider): Deleted.
584         (WebKit::VisitedLinkProvider::VisitedLinkProvider): Deleted.
585         (WebKit::VisitedLinkProvider::addProcess): Deleted.
586         (WebKit::VisitedLinkProvider::removeProcess): Deleted.
587         (WebKit::VisitedLinkProvider::addVisitedLinkHash): Deleted.
588         (WebKit::VisitedLinkProvider::removeAll): Deleted.
589         (WebKit::VisitedLinkProvider::webProcessWillOpenConnection): Deleted.
590         (WebKit::VisitedLinkProvider::webProcessDidCloseConnection): Deleted.
591         (WebKit::VisitedLinkProvider::addVisitedLinkHashFromPage): Deleted.
592         (WebKit::nextPowerOf2): Deleted.
593         (WebKit::tableSizeForKeyCount): Deleted.
594         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired): Deleted.
595         (WebKit::VisitedLinkProvider::resizeTable): Deleted.
596         (WebKit::VisitedLinkProvider::sendTable): Deleted.
597         * UIProcess/VisitedLinkStore.cpp: Renamed from Source/WebKit2/UIProcess/VisitedLinkProvider.cpp.
598         (WebKit::generateIdentifier):
599         (WebKit::VisitedLinkStore::create):
600         (WebKit::VisitedLinkStore::~VisitedLinkStore):
601         (WebKit::VisitedLinkStore::VisitedLinkStore):
602         (WebKit::VisitedLinkStore::addProcess):
603         (WebKit::VisitedLinkStore::removeProcess):
604         (WebKit::VisitedLinkStore::addVisitedLinkHash):
605         (WebKit::VisitedLinkStore::removeAll):
606         (WebKit::VisitedLinkStore::webProcessWillOpenConnection):
607         (WebKit::VisitedLinkStore::webProcessDidCloseConnection):
608         (WebKit::VisitedLinkStore::addVisitedLinkHashFromPage):
609         (WebKit::nextPowerOf2):
610         (WebKit::tableSizeForKeyCount):
611         (WebKit::VisitedLinkStore::pendingVisitedLinksTimerFired):
612         (WebKit::VisitedLinkStore::resizeTable):
613         (WebKit::VisitedLinkStore::sendTable):
614         * UIProcess/VisitedLinkStore.h: Renamed from Source/WebKit2/UIProcess/VisitedLinkProvider.h.
615         * UIProcess/VisitedLinkStore.messages.in: Renamed from Source/WebKit2/UIProcess/VisitedLinkProvider.messages.in.
616         * UIProcess/WebPageProxy.cpp:
617         (WebKit::WebPageProxy::WebPageProxy):
618         (WebKit::WebPageProxy::processDidFinishLaunching):
619         (WebKit::WebPageProxy::creationParameters):
620         * UIProcess/WebPageProxy.h:
621         * UIProcess/WebProcessPool.cpp:
622         (WebKit::WebProcessPool::WebProcessPool):
623         (WebKit::WebProcessPool::createWebPage):
624         * UIProcess/WebProcessPool.h:
625         * UIProcess/WebProcessProxy.cpp:
626         (WebKit::WebProcessProxy::shutDown):
627         (WebKit::WebProcessProxy::addVisitedLinkStore):
628         (WebKit::WebProcessProxy::didDestroyVisitedLinkStore):
629         (WebKit::WebProcessProxy::addVisitedLinkProvider): Deleted.
630         (WebKit::WebProcessProxy::didDestroyVisitedLinkProvider): Deleted.
631         * UIProcess/WebProcessProxy.h:
632         * WebKit2.xcodeproj/project.pbxproj:
633         * WebProcess/WebPage/VisitedLinkTableController.cpp:
634         (WebKit::VisitedLinkTableController::addVisitedLink):
635
636 2015-08-24  Tim Horton  <timothy_horton@apple.com>
637
638         (Finally...) get rid of WKViewIOS
639         https://bugs.webkit.org/show_bug.cgi?id=148404
640
641         Reviewed by Anders Carlsson.
642
643         * UIProcess/API/Cocoa/WKView.h:
644         * UIProcess/API/ios/WKViewIOS.mm: Removed.
645         * UIProcess/ios/PageClientImplIOS.h:
646         * UIProcess/ios/PageClientImplIOS.mm:
647         (WebKit::PageClientImpl::PageClientImpl): Deleted.
648         (WebKit::PageClientImpl::didRelaunchProcess): Deleted.
649         (WebKit::PageClientImpl::refView): Deleted.
650         (WebKit::PageClientImpl::derefView): Deleted.
651         * UIProcess/ios/WKContentView.h:
652         * UIProcess/ios/WKContentView.mm:
653         (-[WKContentView initWithFrame:processPool:configuration:wkView:]): Deleted.
654         * WebKit2.xcodeproj/project.pbxproj:
655         Get rid of WKViewIOS and references to it.
656
657         * DatabaseProcess/ios/DatabaseProcessIOS.mm:
658         (WebKit::DatabaseProcess::initializeSandbox):
659         * NetworkProcess/ios/NetworkProcessIOS.mm:
660         (WebKit::NetworkProcess::initializeSandbox):
661         * Shared/Plugins/mac/PluginSandboxProfile.mm:
662         (WebKit::pluginSandboxProfileDirectory):
663         * Shared/ios/ChildProcessIOS.mm:
664         (WebKit::ChildProcess::initializeSandbox):
665         * WebProcess/cocoa/WebProcessCocoa.mm:
666         (WebKit::WebProcess::initializeSandbox):
667         Look for WKWebView instead of WKView if we have it.
668
669 2015-08-24  Anders Carlsson  <andersca@apple.com>
670
671         Rename _WKVisitedLinkProvider to _WKVisitedLinkStore for consistency
672         https://bugs.webkit.org/show_bug.cgi?id=148398
673
674         Reviewed by Tim Horton.
675
676         We'd like to call the abstract classes providers and the concrete classes stores in WebKit. Begin by renaming
677         _WKVisitedLinkProvider to _WKVisitedLinkStore, but keep the former around as a deprecated class.
678
679         * Shared/API/Cocoa/WebKitPrivate.h:
680         * Shared/Cocoa/APIObject.mm:
681         (API::Object::newObject):
682         * UIProcess/API/Cocoa/WKWebView.mm:
683         (-[WKWebView initWithFrame:configuration:]):
684         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
685         (-[WKWebViewConfiguration copyWithZone:]):
686         (-[WKWebViewConfiguration _visitedLinkStore]):
687         (-[WKWebViewConfiguration _setVisitedLinkStore:]):
688         (-[WKWebViewConfiguration _visitedLinkProvider]):
689         (-[WKWebViewConfiguration _setVisitedLinkProvider:]):
690         (-[WKWebViewConfiguration _validate]):
691         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
692         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
693         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
694         (-[_WKVisitedLinkProvider init]): Deleted.
695         (-[_WKVisitedLinkProvider dealloc]): Deleted.
696         (-[_WKVisitedLinkProvider addVisitedLinkWithURL:]): Deleted.
697         (-[_WKVisitedLinkProvider removeAll]): Deleted.
698         (-[_WKVisitedLinkProvider _apiObject]): Deleted.
699         * UIProcess/API/Cocoa/_WKVisitedLinkStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProvider.h.
700         * UIProcess/API/Cocoa/_WKVisitedLinkStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm.
701         (-[_WKVisitedLinkStore init]):
702         (-[_WKVisitedLinkStore dealloc]):
703         (-[_WKVisitedLinkStore addVisitedLinkWithURL:]):
704         (-[_WKVisitedLinkStore removeAll]):
705         (-[_WKVisitedLinkStore _apiObject]):
706         * UIProcess/API/Cocoa/_WKVisitedLinkStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h.
707         (WebKit::wrapper):
708         * WebKit2.xcodeproj/project.pbxproj:
709
710 2015-08-24  Wenson Hsieh  <wenson_hsieh@apple.com>
711
712         Use _NSScrollingPredominantAxisFilter for wheel event filtering on Mac
713         https://bugs.webkit.org/show_bug.cgi?id=147320
714
715         Reviewed by Simon Fraser.
716
717         Refactored to use a predominant axis filter instead of a predominant axis tracker. This allows us to
718         employ AppKit's _NSScrollingPredominantAxisFilter when possible, and use the wheel event delta tracker
719         as a fallback. Here, we refactor EventDispatcher to use the new filters for mainframe scrolling.
720
721         No new tests, since this change does not add new functionality.
722
723         * WebProcess/WebPage/EventDispatcher.cpp: Include WheelEventDeltaFilterMac.h when necessary.
724         (WebKit::EventDispatcher::EventDispatcher): Initialize a WheelEventDeltaFilterMac when possible. Otherwise,
725             fall back to a BasicWheelEventDeltaFilter.
726         (WebKit::EventDispatcher::wheelEvent): Use filtered deltas to initialize the platform wheel event instead
727             of zeroing out non-predominant axes.
728         * WebProcess/WebPage/EventDispatcher.h: Replace m_recentWheelEventDeltaTracker with m_recentWheelEventDeltaFilter.
729
730 2015-08-23  Andy Estes  <aestes@apple.com>
731
732         [Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveServerRedirectForProvisionalLoadForFrame when Content Filtering is enabled
733         https://bugs.webkit.org/show_bug.cgi?id=147872
734         rdar://problem/22044000
735
736         Reviewed by Dan Bernstein.
737         
738         The provisional DocumentLoader request URL does not reflect redirects when content filtering is enabled, but
739         the URL argument passed to dispatchDidReceiveServerRedirectForProvisionalLoad() does, so use it intead.
740
741         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
742         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
743         Sent DidReceiveServerRedirectForProvisionalLoadForFrame using the URL argument.
744         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
745
746 2015-08-23  Csaba Osztrogonác  <ossy@webkit.org>
747
748         Typo fix after r188842.
749
750         * CMakeLists.txt:
751
752 2015-08-23  Csaba Osztrogonác  <ossy@webkit.org>
753
754         Speculative buildfix after r188828.
755
756         * CMakeLists.txt:
757
758 2015-08-22  Tim Horton  <timothy_horton@apple.com>
759
760         Factor out and add logging to swipe-start hysteresis code
761         https://bugs.webkit.org/show_bug.cgi?id=148361
762
763         Reviewed by Darin Adler.
764
765         * UIProcess/ViewGestureController.cpp:
766         (WebKit::ViewGestureController::ViewGestureController):
767         * UIProcess/mac/ViewGestureController.h:
768         (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
769         (WebKit::ViewGestureController::shouldIgnorePinnedState):
770         (WebKit::ViewGestureController::setShouldIgnorePinnedState):
771         (WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
772         (WebKit::ViewGestureController::PendingSwipeTracker::shouldIgnorePinnedState):
773         (WebKit::ViewGestureController::PendingSwipeTracker::setShouldIgnorePinnedState):
774         Move pending-swipe members into PendingSwipeTracker.
775
776         * UIProcess/mac/ViewGestureControllerMac.mm:
777         (WebKit::scrollEventCanInfluenceSwipe):
778         (WebKit::deltaShouldCancelSwipe):
779         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
780         (WebKit::ViewGestureController::handleScrollWheelEvent):
781         (WebKit::ViewGestureController::PendingSwipeTracker::handleEvent):
782         (WebKit::ViewGestureController::PendingSwipeTracker::eventWasNotHandledByWebCore):
783         (WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
784         (WebKit::ViewGestureController::PendingSwipeTracker::reset):
785         (WebKit::ViewGestureController::trackSwipeGesture):
786         (WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
787         Move pending-swipe methods into PendingSwipeTracker.
788         Clean up the logic a bit.
789         Add some logging.
790
791 2015-08-22  Timothy Horton  <timothy_horton@apple.com>
792
793         WebKitTestRunner should use WKWebView on OS X and iOS
794         https://bugs.webkit.org/show_bug.cgi?id=143743
795         <rdar://problem/16947123>
796
797         Reviewed by Anders Carlsson.
798         Patch by Enrica Casucci and myself.
799
800         * UIProcess/API/Cocoa/WKWebView.mm:
801         (-[WKWebView _windowOcclusionDetectionEnabled]):
802         (-[WKWebView _setWindowOcclusionDetectionEnabled:]):
803         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
804         Add SPI to disable window occlusion detection, for WebKitTestRunner's use.
805
806         * Shared/WebPreferencesDefinitions.h:
807         Remove a completely unused WebPreference. It is a WebCore Setting,
808         but in the API it's exposed as a WKPage setter and WKView and WKWebView property
809         instead of as a WKPreference, so there's no need for the WebPreference.
810
811         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
812         (WKBundlePageAddUserScript):
813         (WKBundlePageAddUserStyleSheet):
814         (WKBundlePageRemoveAllUserContent):
815         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
816         * WebProcess/WebPage/WebPage.cpp:
817         (WebKit::WebPage::addUserScript):
818         (WebKit::WebPage::addUserStyleSheet):
819         (WebKit::WebPage::removeAllUserContent):
820         * WebProcess/WebPage/WebPage.h:
821         Add WKBundlePage functions for user script and style sheet manipulation.
822         These use the WebPage's WebUserContentController instead of the WebPageGroupProxy's
823         (used by the WKBundle functions), so they work correctly with the modern API.
824
825 2015-08-22  Michael Catanzaro  <mcatanzaro@igalia.com>
826
827         Unreviewed, attempt to fix GTK build after r188718
828
829         * CMakeLists.txt: Build WKPageConfigurationRef.cpp
830         * PlatformEfl.cmake: Don't build WKPageConfigurationRef.cpp
831
832 2015-08-22  Antti Koivisto  <antti@apple.com>
833
834         Decode data URLs in web process
835         https://bugs.webkit.org/show_bug.cgi?id=148128
836
837         Reviewed by Darin Adler.
838
839         * WebProcess/Network/WebResourceLoadScheduler.cpp:
840         (WebKit::WebResourceLoadScheduler::scheduleLoad):
841
842             Don't send data: loads to the network process, handle them locally.
843
844         (WebKit::WebResourceLoadScheduler::startLocalLoad):
845
846             Call ResourceLoder::start() directly.
847
848 2015-08-21  Commit Queue  <commit-queue@webkit.org>
849
850         Unreviewed, rolling out r188807, r188813, and r188815.
851         https://bugs.webkit.org/show_bug.cgi?id=148349
852
853         lots of 32-bit build problems, better to resolve separately
854         and try again (Requested by thorton on #webkit).
855
856         Reverted changesets:
857
858         "WebKitTestRunner should use WKWebView on OS X and iOS"
859         https://bugs.webkit.org/show_bug.cgi?id=143743
860         http://trac.webkit.org/changeset/188807
861
862         "Stop building WebKitTestRunner for 32-bit platforms"
863         https://bugs.webkit.org/show_bug.cgi?id=143743
864         http://trac.webkit.org/changeset/188813
865
866         "Stop building WebKitTestRunner for 32-bit platforms"
867         https://bugs.webkit.org/show_bug.cgi?id=143743
868         http://trac.webkit.org/changeset/188815
869
870 2015-08-21  Timothy Horton  <timothy_horton@apple.com>
871
872         WebKitTestRunner should use WKWebView on OS X and iOS
873         https://bugs.webkit.org/show_bug.cgi?id=143743
874         <rdar://problem/16947123>
875
876         Reviewed by Anders Carlsson.
877         Patch by Enrica Casucci and myself.
878
879         * UIProcess/API/Cocoa/WKWebView.mm:
880         (-[WKWebView _windowOcclusionDetectionEnabled]):
881         (-[WKWebView _setWindowOcclusionDetectionEnabled:]):
882         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
883         Add SPI to disable window occlusion detection, for WebKitTestRunner's use.
884
885         * Shared/WebPreferencesDefinitions.h:
886         Remove a completely unused WebPreference. It is a WebCore Setting,
887         but in the API it's exposed as a WKPage setter and WKView and WKWebView property
888         instead of as a WKPreference, so there's no need for the WebPreference.
889
890         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
891         (WKBundlePageAddUserScript):
892         (WKBundlePageAddUserStyleSheet):
893         (WKBundlePageRemoveAllUserContent):
894         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
895         * WebProcess/WebPage/WebPage.cpp:
896         (WebKit::WebPage::addUserScript):
897         (WebKit::WebPage::addUserStyleSheet):
898         (WebKit::WebPage::removeAllUserContent):
899         * WebProcess/WebPage/WebPage.h:
900         Add WKBundlePage functions for user script and style sheet manipulation.
901         These use the WebPage's WebUserContentController instead of the WebPageGroupProxy's
902         (used by the WKBundle functions), so they work correctly with the modern API.
903
904 2015-08-21  Alexey Proskuryakov  <ap@apple.com>
905
906         Improve how UI events are dispatched by WebKitTestRunner
907         https://bugs.webkit.org/show_bug.cgi?id=148326
908
909         Reviewed by Anders Carlsson.
910
911         Added "fully synchronous mode for testing", in which all messages are dispatched
912         synchronously.
913
914         When an async message is sent in this mode, it is wrapped into a sync one automatically.
915
916         A client must opt in, either by using WKBundlePagePostSynchronousMessageForTesting(),
917         or by calling WKContextConfigurationAllowFullySynchronousModeForTesting().
918         This makes sure that we don't increase potential for IPC misuse.
919
920         * WebProcess/WebPage/WebPage.messages.in: Yay, fewer messages!
921
922         * UIProcess/API/C/WKPage.cpp:
923         (WKPageSetShouldSendEventsSynchronously): Deleted.
924         * UIProcess/API/C/WKPagePrivate.h:
925         We no longer need WKPageSetShouldSendEventsSynchronously and associated custom messages.
926
927         * WebProcess/WebPage/EventDispatcher.cpp:
928         (WebKit::EventDispatcher::wheelEvent):
929         (WebKit::updateWheelEventTestTriggersIfNeeded): Deleted.
930         Removed code that was only needed to support pseudo-syncronous scrolling in tests.
931
932         * Platform/IPC/Connection.cpp:
933         (IPC::Connection::sendMessage):
934         (IPC::Connection::dispatchSyncMessage):
935         (IPC::Connection::dispatchMessage):
936         * Platform/IPC/Connection.h:
937         (IPC::Connection::allowFullySynchronousModeForTesting):
938         (IPC::Connection::sendSync):
939         * Platform/IPC/MessageDecoder.cpp:
940         (IPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply):
941         (IPC::MessageDecoder::shouldUseFullySynchronousModeForTesting):
942         (IPC::MessageDecoder::setImportanceAssertion):
943         (IPC::MessageDecoder::unwrapForTesting):
944         * Platform/IPC/MessageDecoder.h:
945         (IPC::MessageDecoder::UUID):
946         * Platform/IPC/MessageEncoder.cpp:
947         (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply):
948         (IPC::MessageEncoder::setFullySynchronousModeForTesting):
949         (IPC::MessageEncoder::wrapForTesting):
950         * Platform/IPC/MessageEncoder.h:
951         (IPC::MessageEncoder::UUID):
952         * Platform/IPC/MessageFlags.h:
953         * UIProcess/API/APIProcessPoolConfiguration.cpp:
954         (API::ProcessPoolConfiguration::copy):
955         * UIProcess/API/APIProcessPoolConfiguration.h:
956         * UIProcess/API/C/WKContextConfigurationRef.cpp:
957         (WKContextConfigurationSetMediaKeysStorageDirectory):
958         (WKContextConfigurationAllowFullySynchronousModeForTesting):
959         * UIProcess/API/C/WKContextConfigurationRef.h:
960
961         * UIProcess/WebPageProxy.cpp:
962         (WebKit::WebPageProxy::WebPageProxy):
963         (WebKit::WebPageProxy::handleMouseEvent):
964         (WebKit::WebPageProxy::sendWheelEvent):
965         (WebKit::WebPageProxy::handleKeyboardEvent):
966         (WebKit::WebPageProxy::handleTouchEvent):
967         * UIProcess/WebPageProxy.h:
968         (WebKit::WebPageProxy::renderTreeSize):
969         (WebKit::WebPageProxy::setShouldSendEventsSynchronously): Deleted.
970         * UIProcess/WebProcessPool.cpp:
971         (WebKit::WebProcessPool::processDidFinishLaunching):
972         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
973         (WKBundlePagePostMessage):
974         (WKBundlePagePostSynchronousMessageForTesting):
975         (WKBundlePagePostSynchronousMessage): Deleted.
976         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
977         * WebProcess/WebPage/WebPage.cpp:
978         (WebKit::WebPage::mouseEvent):
979         (WebKit::handleWheelEvent):
980         (WebKit::WebPage::wheelEvent):
981         (WebKit::handleKeyEvent):
982         (WebKit::WebPage::keyEvent):
983         (WebKit::WebPage::validateCommand):
984         (WebKit::WebPage::touchEvent):
985         (WebKit::WebPage::scroll):
986         (WebKit::WebPage::postMessage):
987         (WebKit::WebPage::postSynchronousMessageForTesting):
988         (WebKit::WebPage::mouseEventSyncForTesting): Deleted.
989         (WebKit::WebPage::wheelEventSyncForTesting): Deleted.
990         (WebKit::WebPage::keyEventSyncForTesting): Deleted.
991         (WebKit::WebPage::touchEventSyncForTesting): Deleted.
992         (WebKit::WebPage::postSynchronousMessage): Deleted.
993         * WebProcess/WebPage/WebPage.h:
994
995 2015-08-20  Matt Rajca  <mrajca@apple.com>
996
997         Media Session: let UI clients change the volume of the focused media element
998         https://bugs.webkit.org/show_bug.cgi?id=148289
999
1000         Reviewed by Tim Horton.
1001
1002         * UIProcess/API/C/WKMediaSessionFocusManager.cpp:
1003         (WKMediaSessionFocusManagerSetVolumeOfFocusedMediaElement):
1004         * UIProcess/API/C/WKMediaSessionFocusManager.h:
1005         * UIProcess/WebMediaSessionFocusManager.cpp:
1006         (WebKit::WebMediaSessionFocusManager::updatePlaybackAttribute):
1007         (WebKit::WebMediaSessionFocusManager::setVolumeOfFocusedMediaElement):
1008         * UIProcess/WebMediaSessionFocusManager.h:
1009         * UIProcess/WebPageProxy.cpp:
1010         (WebKit::WebPageProxy::setVolumeOfMediaElement):
1011         * UIProcess/WebPageProxy.h:
1012         * WebProcess/WebPage/WebPage.cpp:
1013         (WebKit::WebPage::setVolumeOfMediaElement):
1014         * WebProcess/WebPage/WebPage.h:
1015         * WebProcess/WebPage/WebPage.messages.in:
1016
1017 2015-08-21  Anders Carlsson  <andersca@apple.com>
1018
1019         Get rid of uses of the old callOnMainThread function that takes a function ptr + context
1020         https://bugs.webkit.org/show_bug.cgi?id=148324
1021
1022         Reviewed by Tim Horton.
1023
1024         * UIProcess/mac/WKPrintingView.mm:
1025         (prepareDataForPrintingOnSecondaryThread):
1026         (-[WKPrintingView knowsPageRange:]):
1027
1028 2015-08-21  Chris Dumez  <cdumez@apple.com>
1029
1030         Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
1031         https://bugs.webkit.org/show_bug.cgi?id=148205
1032
1033         Reviewed by Antti Koivisto.
1034
1035         After r188640, successful revalidation of resources in the memory cache
1036         would cause us to drop the corresponding resource in the disk cache.
1037         This patch addresses the issue by not removing the cache entry if the
1038         response is a successful revalidation (i.e. status code == 304).
1039
1040         Longer term, we should probably update the entry in the disk cache (if
1041         it exists) when it is revalidated by the memory cache. Currently,
1042         revalidation by the memory cache bypasses the disk cache and goes
1043         straight to the network. Then, when the response comes back as a 304,
1044         we try and store the response in the cache. However, a 304 status code
1045         is not cacheable so the cache rejects it.
1046
1047         * NetworkProcess/cache/NetworkCache.cpp:
1048         (WebKit::NetworkCache::Cache::store):
1049
1050 2015-08-20  Joonghun Park  <jh718.park@samsung.com>
1051
1052         [EFL] Revise PlatformWebView ctor according to r188718
1053         https://bugs.webkit.org/show_bug.cgi?id=148282
1054
1055         Reviewed by Gyuyoung Kim.
1056
1057         * PlatformEfl.cmake:
1058
1059 2015-08-20  Alex Christensen  <achristensen@webkit.org>
1060
1061         GTK build fix after r188693.
1062
1063         * UIProcess/API/gtk/PageClientImpl.h:
1064         Delete mediaDocumentNaturalSizeChanged which could be renamed to imageOrMediaDocumentSizeChanged, 
1065         but there's no reason to have an empty function overriding another virtual function that is also empty.
1066
1067 2015-08-20  Joonghun Park  <jh718.park@samsung.com>
1068
1069         [EFL] Fix build error since r188693
1070         https://bugs.webkit.org/show_bug.cgi?id=148279
1071
1072         Reviewed by Gyuyoung Kim.
1073
1074         * UIProcess/efl/WebViewEfl.h:
1075
1076 2015-08-20  Anders Carlsson  <andersca@apple.com>
1077
1078         Use WKPageConfigurationRef in WebKitTestRunner
1079         https://bugs.webkit.org/show_bug.cgi?id=147996
1080
1081         Reviewed by Tim Horton.
1082
1083         * UIProcess/API/ios/WKViewIOS.mm:
1084         (-[WKView _commonInitializationWithConfigurationRef:]):
1085         (-[WKView initWithFrame:configurationRef:]):
1086         * UIProcess/API/mac/WKView.mm:
1087         (-[WKView initWithFrame:configurationRef:]):
1088         Make sure to copy the configuration, matching what we do in the modern API.
1089         
1090 2015-08-20  Beth Dakin  <bdakin@apple.com>
1091
1092         Standalone image documents should send their size to the UIClient just like 
1093         standalone media documents
1094         https://bugs.webkit.org/show_bug.cgi?id=148195
1095         -and corresponding-
1096         rdar://problem/21951253
1097
1098         Reviewed by Tim Horton.
1099
1100         This patch re-names mediaDocumentNaturalSizeChanged() to 
1101         imageOrMediaDocumentSizeChanged(), and, as the new name implies, uses the 
1102         function for both media documents and images.
1103
1104         * UIProcess/API/APIUIClient.h:
1105         (API::UIClient::didClickAutoFillButton):
1106         (API::UIClient::imageOrMediaDocumentSizeChanged):
1107         (API::UIClient::mediaDocumentNaturalSizeChanged): Deleted.
1108         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1109
1110         The WKWebView and PageClient implementations of this function were actually 
1111         not being used, so this patch removes them and just keeps the UIClient stuff.
1112         * UIProcess/API/Cocoa/WKWebView.mm:
1113         (-[WKWebView performDragOperation:]):
1114         (-[WKWebView _mediaDocumentNaturalSizeChanged:]): Deleted.
1115         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1116
1117         More re-naming.
1118         * UIProcess/Cocoa/UIDelegate.h:
1119         * UIProcess/Cocoa/UIDelegate.mm:
1120         (WebKit::UIDelegate::setDelegate):
1121         (WebKit::UIDelegate::UIClient::UIClient):
1122         (WebKit::UIDelegate::UIClient::didNotHandleTapAsClick):
1123         (WebKit::UIDelegate::UIClient::imageOrMediaDocumentSizeChanged):
1124         (WebKit::UIDelegate::UIClient::mediaDocumentNaturalSizeChanged): Deleted.
1125         * UIProcess/PageClient.h:
1126         * UIProcess/WebPageProxy.cpp:
1127         (WebKit::WebPageProxy::installViewStateChangeCompletionHandler):
1128         (WebKit::WebPageProxy::imageOrMediaDocumentSizeChanged):
1129         (WebKit::WebPageProxy::setShouldDispatchFakeMouseMoveEvents):
1130         (WebKit::WebPageProxy::mediaDocumentNaturalSizeChanged): Deleted.
1131         * UIProcess/WebPageProxy.h:
1132         (WebKit::WebPageProxy::useFixedLayoutDidChange):
1133         (WebKit::WebPageProxy::fixedLayoutSizeDidChange):
1134         * UIProcess/WebPageProxy.messages.in:
1135
1136         The WKWebView and PageClient implementations of this function were actually 
1137         not being used, so this patch removes them and just keeps the UIClient stuff.
1138         * UIProcess/ios/PageClientImplIOS.h:
1139         * UIProcess/ios/PageClientImplIOS.mm:
1140         (WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged): Deleted.
1141         * UIProcess/mac/PageClientImpl.h:
1142         * UIProcess/mac/PageClientImpl.mm:
1143         (WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged): Deleted.
1144
1145         More re-naming.
1146         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1147         (WebKit::WebChromeClient::imageOrMediaDocumentSizeChanged):
1148         (WebKit::WebChromeClient::mediaDocumentNaturalSizeChanged): Deleted.
1149         * WebProcess/WebCoreSupport/WebChromeClient.h:
1150         * WebProcess/WebPage/WebPage.cpp:
1151         (WebKit::WebPage::imageOrMediaDocumentSizeChanged):
1152         (WebKit::WebPage::mediaDocumentNaturalSizeChanged): Deleted.
1153         * WebProcess/WebPage/WebPage.h:
1154
1155 2015-08-19  Eric Carlson  <eric.carlson@apple.com>
1156
1157         Remove ENABLE_WEBVTT_REGIONS
1158         https://bugs.webkit.org/show_bug.cgi?id=148184
1159
1160         Reviewed by Jer Noble.
1161
1162         * Configurations/FeatureDefines.xcconfig: Remove ENABLE_WEBVTT_REGIONS.
1163
1164 2015-08-18  Dean Jackson  <dino@apple.com>
1165
1166         Support CSS filters without webkit prefix
1167         https://bugs.webkit.org/show_bug.cgi?id=148138
1168         <rdar://problem/22331434>
1169
1170         Reviewed by Sam Weinig.
1171
1172         Rename WebkitFilter to Filter.
1173
1174         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1175         (IPC::ArgumentCoder<TextureMapperAnimation>::encode):
1176         (IPC::ArgumentCoder<TextureMapperAnimation>::decode):
1177
1178 2015-08-19  Alex Christensen  <achristensen@webkit.org>
1179
1180         Build TestWTF on Mac with CMake.
1181         https://bugs.webkit.org/show_bug.cgi?id=147972
1182
1183         Reviewed by Tim Horton.
1184
1185         * PlatformMac.cmake:
1186         Make more forwarding headers.
1187
1188 2015-08-18  Filip Pizlo  <fpizlo@apple.com>
1189
1190         Replace all uses of std::mutex/std::condition_variable with WTF::Lock/WTF::Condition
1191         https://bugs.webkit.org/show_bug.cgi?id=148140
1192
1193         Reviewed by Geoffrey Garen.
1194
1195         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1196         (WebKit::NetworkCache::Storage::traverse):
1197         * Platform/IPC/Connection.cpp:
1198         (IPC::Connection::SyncMessageState::processIncomingMessage):
1199         (IPC::Connection::SyncMessageState::dispatchMessages):
1200         (IPC::Connection::SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesForConnection):
1201         (IPC::Connection::sendMessage):
1202         (IPC::Connection::waitForMessage):
1203         (IPC::Connection::processIncomingMessage):
1204         (IPC::Connection::installIncomingSyncMessageCallback):
1205         (IPC::Connection::uninstallIncomingSyncMessageCallback):
1206         (IPC::Connection::hasIncomingSyncMessage):
1207         (IPC::Connection::connectionDidClose):
1208         (IPC::Connection::sendOutgoingMessages):
1209         (IPC::Connection::enqueueIncomingMessage):
1210         (IPC::Connection::dispatchOneMessage):
1211         * Platform/IPC/Connection.h:
1212         * Shared/BlockingResponseMap.h:
1213         (BlockingResponseMap::waitForResponse):
1214         (BlockingResponseMap::didReceiveResponse):
1215         (BlockingResponseMap::cancel):
1216         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
1217         (WebKit::PluginInfoCache::saveToFile):
1218         (WebKit::PluginInfoCache::updatePluginInfo):
1219         * UIProcess/Plugins/gtk/PluginInfoCache.h:
1220         * UIProcess/mac/WKPrintingView.h:
1221         * UIProcess/mac/WKPrintingView.mm:
1222         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
1223         (prepareDataForPrintingOnSecondaryThread):
1224         (-[WKPrintingView knowsPageRange:]):
1225
1226 2015-08-19  Chris Dumez  <cdumez@apple.com>
1227
1228         WebKit may keep outdated entry in the disk cache after a reload
1229         https://bugs.webkit.org/show_bug.cgi?id=148137
1230         <rdar://problem/22299547>
1231
1232         Reviewed by Antti Koivisto.
1233
1234         WebKit would keep outdated entry in the disk cache after a reload
1235         in the following scenario:
1236         1. We have an entry in the cache
1237         2. The user reloads
1238         3. We get a fresh resource from the network but this one is not cacheable
1239
1240         In this case, we now remove the stale entry from the cache to make sure
1241         it is not served to following requests (e.g. history navigations).
1242
1243         * NetworkProcess/NetworkResourceLoader.cpp:
1244         (WebKit::NetworkResourceLoader::didFinishLoading):
1245         Remove the entry from the cache if its redirection is no longer
1246         cacheable.
1247
1248         * NetworkProcess/cache/NetworkCache.cpp:
1249         (WebKit::NetworkCache::Cache::store):
1250         If we make the decision not to store the response, then remove the
1251         entry in the cache for this resource if it exists.
1252
1253         (WebKit::NetworkCache::Cache::remove):
1254         * NetworkProcess/cache/NetworkCache.h:
1255         Add new remove() overload taking a ResourceRequest argument so the
1256         call site does not have the compute the key.
1257
1258         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1259         (WebKit::NetworkCache::Storage::removeFromPendingWriteOperations):
1260         (WebKit::NetworkCache::Storage::remove):
1261         * NetworkProcess/cache/NetworkCacheStorage.h:
1262         When we're asked to remove an entry with a given key, also remove
1263         it from the pending write operations. This pre-existing bug would
1264         prevent the new layout test from passing.
1265
1266 2015-08-18  Zan Dobersek  <zdobersek@igalia.com>
1267
1268         [GLib] GMainLoopSource should receive the std::function<> objects through rvalue references
1269         https://bugs.webkit.org/show_bug.cgi?id=147981
1270
1271         Reviewed by Carlos Garcia Campos.
1272
1273         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1274         (WebKit::NetworkCache::runTaskInQueue): Move the std::function<> into the scheduling call.
1275
1276 2015-08-18  Dan Bernstein  <mitz@apple.com>
1277
1278         [iOS] Safari’s Web Content process crashes when decoding an NSError containing an identity
1279         https://bugs.webkit.org/show_bug.cgi?id=148135
1280
1281         Reviewed by Sam Weinig.
1282
1283         * Configurations/WebContent-iOS.entitlements: Added the com.apple.identities keychain
1284           access group. The Networking process already has it since r169655.
1285
1286         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1287         (WebKit::WebProcessPool::platformInitialize): Always allow the UI process to decode keys.
1288
1289 2015-08-18  Jincheol Jo  <jincheol.jo@navercorp.com>
1290
1291         [EFL] Web Inspector: make to use StringBuilder in inspectorBaseURL
1292         https://bugs.webkit.org/show_bug.cgi?id=148126
1293
1294         Reviewed by Gyuyoung Kim.
1295
1296         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1297         (WebKit::WebInspectorProxy::inspectorBaseURL):
1298         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
1299
1300 2015-08-18  Anders Carlsson  <andersca@apple.com>
1301
1302         Fix build, and fix the version check.
1303
1304         * UIProcess/API/C/WKPage.cpp:
1305         (WKPageSetPageUIClient):
1306
1307 2015-08-18  Anders Carlsson  <andersca@apple.com>
1308
1309         REGRESSION: Playing audio causes near-instant crash
1310         https://bugs.webkit.org/show_bug.cgi?id=148059
1311         rdar://problem/22282680
1312
1313         Reviewed by Sam Weinig.
1314
1315         The version of WebKit that Safari 6.2.8, 7.1.8 and 8.0.8 built against
1316         had an ABI incompatible WKPageUIClientV4 struct. Thankfully we're not going to ship any
1317         versions of Safari that use the "normal" WKPageUIClientV4 struct so just assume that it's always the
1318         broken one and fix it up by converting it to a WKPageUIClientV5 struct and setting that as the page UI client.
1319
1320         * UIProcess/API/C/WKPage.cpp:
1321         (fixUpBotchedPageUIClient):
1322         (WKPageSetPageUIClient):
1323
1324 2015-08-17  Filip Pizlo  <fpizlo@apple.com>
1325
1326         Replace all remaining uses of WTF::Mutex with WTF::Lock
1327         https://bugs.webkit.org/show_bug.cgi?id=148089
1328
1329         Reviewed by Geoffrey Garen.
1330
1331         * DatabaseProcess/DatabaseProcess.cpp:
1332         (WebKit::DatabaseProcess::postDatabaseTask):
1333         (WebKit::DatabaseProcess::performNextDatabaseTask):
1334         * DatabaseProcess/DatabaseProcess.h:
1335         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1336         (WebKit::UniqueIDBDatabase::shutdown):
1337         (WebKit::UniqueIDBDatabase::postMainThreadTask):
1338         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
1339         (WebKit::UniqueIDBDatabase::postDatabaseTask):
1340         (WebKit::UniqueIDBDatabase::performNextDatabaseTask):
1341         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1342         * Platform/IPC/Connection.cpp:
1343         (IPC::Connection::sendSyncMessage):
1344         (IPC::Connection::sendSyncMessageFromSecondaryThread):
1345         (IPC::Connection::waitForSyncReply):
1346         (IPC::Connection::processIncomingSyncReply):
1347         (IPC::Connection::connectionDidClose):
1348         * Platform/IPC/Connection.h:
1349         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
1350         (WebKit::CoordinatedGraphicsScene::appendUpdate):
1351         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
1352         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1353         (WebKit::ThreadedCompositor::createCompositingThread):
1354         (WebKit::ThreadedCompositor::runCompositingThread):
1355         (WebKit::ThreadedCompositor::terminateCompositingThread):
1356         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
1357         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
1358         (WebKit::CustomProtocolManager::addCustomProtocol):
1359         (WebKit::CustomProtocolManager::removeCustomProtocol):
1360         (WebKit::CustomProtocolManager::registerScheme):
1361         (WebKit::CustomProtocolManager::unregisterScheme):
1362         (WebKit::CustomProtocolManager::supportsScheme):
1363         (WebKit::CustomProtocolManager::protocolForID):
1364         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
1365         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
1366         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1367         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1368         (WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
1369         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
1370         * WebProcess/Plugins/PluginProcessConnectionManager.h:
1371         * WebProcess/WebPage/EventDispatcher.cpp:
1372         (WebKit::EventDispatcher::addScrollingTreeForPage):
1373         (WebKit::EventDispatcher::removeScrollingTreeForPage):
1374         (WebKit::EventDispatcher::wheelEvent):
1375         * WebProcess/WebPage/EventDispatcher.h:
1376         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
1377         (webkitSoupRequestInputStreamReadAsync):
1378         (webkitSoupRequestInputStreamAddData):
1379
1380 2015-08-17  Alex Christensen  <achristensen@webkit.org>
1381
1382         Speculative GTK build fix after r188553
1383
1384         * CMakeLists.txt:
1385         Added new files.
1386
1387 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
1388
1389         Implement IntegerHasher
1390         https://bugs.webkit.org/show_bug.cgi?id=147866
1391
1392         Reviewed by Darin Adler and Anders Carlsson.
1393
1394         Use new #include.
1395
1396         * DatabaseProcess/IndexedDB/IDBIdentifier.h:
1397         * Platform/IPC/StringReference.cpp:
1398
1399 2015-08-13  Anders Carlsson  <andersca@apple.com>
1400
1401         Add WKWindowFeaturesRef and a new modern createNewPage UI client callback
1402         https://bugs.webkit.org/show_bug.cgi?id=147989
1403
1404         Reviewed by Tim Horton.
1405
1406         Re-land this and make sure we actually allocate a WKWindowFeatures object.
1407
1408         * Platform/IPC/mac/ConnectionMac.mm:
1409         * Shared/API/APIObject.h:
1410         * Shared/API/c/WKBase.h:
1411         * UIProcess/API/APIWindowFeatures.cpp: Added.
1412         * UIProcess/API/APIWindowFeatures.h: Added.
1413         * UIProcess/API/C/WKAPICast.h:
1414         * UIProcess/API/C/WKPage.cpp:
1415         (WKPageSetPageUIClient):
1416         * UIProcess/API/C/WKPageUIClient.h:
1417         * UIProcess/API/C/WKWindowFeaturesRef.cpp: Added.
1418         (WKWindowFeaturesGetTypeID):
1419         * UIProcess/API/C/WKWindowFeaturesRef.h: Added.
1420         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
1421         (-[WKWindowFeatures dealloc]):
1422         (-[WKWindowFeatures menuBarVisibility]):
1423         (-[WKWindowFeatures statusBarVisibility]):
1424         (-[WKWindowFeatures toolbarsVisibility]):
1425         (-[WKWindowFeatures allowsResizing]):
1426         (-[WKWindowFeatures x]):
1427         (-[WKWindowFeatures y]):
1428         (-[WKWindowFeatures width]):
1429         (-[WKWindowFeatures height]):
1430         (-[WKWindowFeatures _apiObject]):
1431         (-[WKWindowFeatures _initWithWindowFeatures:]): Deleted.
1432         * UIProcess/API/Cocoa/WKWindowFeaturesInternal.h:
1433         (WebKit::wrapper):
1434         * UIProcess/Cocoa/UIDelegate.mm:
1435         (WebKit::UIDelegate::UIClient::createNewPage):
1436         * WebKit2.xcodeproj/project.pbxproj:
1437
1438 2015-08-17  Sam Weinig  <sam@webkit.org>
1439
1440         API::PageConfiguration's sessionID needs to be set whenever the API::WebsiteDataStore is set
1441         https://bugs.webkit.org/show_bug.cgi?id=148097
1442
1443         Reviewed by Anders Carlsson.
1444
1445         We were getting an empty SessionID set on the WebPageProxy (and crashing asserting down the line)
1446         when using a WKPageConfiguration with a WKWebsiteDataStore set on it.
1447
1448         Tests:
1449             WebKit2.WKPageConfigurationBasicWithDataStore
1450             WebKit2.WKPageConfigurationBasicWithNonPersistentDataStore
1451
1452         * UIProcess/API/APIPageConfiguration.cpp:
1453         (API::PageConfiguration::setWebsiteDataStore):
1454         Set the sessionID member whenever changing the WebsiteDataStore.
1455
1456         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1457         (WKWebsiteDataStoreGetDefaultDataStore):
1458         (WKWebsiteDataStoreCreateNonPersistentDataStore):
1459         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
1460         Expose functions for getting default and new non-persistent data stores via the C-SPI. Useful
1461         for testing and transitioning users of the C-SPI to the new model.
1462
1463         * UIProcess/API/Cocoa/WKWebView.mm:
1464         (-[WKWebView initWithFrame:configuration:]):
1465         Remove explicit setting of the sessionID. This is handled by the above call to setWebsiteDataStore().
1466
1467 2015-08-17  Wenson Hsieh  <wenson_hsieh@apple.com>
1468
1469         Cannot change WKWebView scrollView deceleration rate
1470         https://bugs.webkit.org/show_bug.cgi?id=148086
1471         <rdar://problem/21893685>
1472
1473         Reviewed by Simon Fraser.
1474
1475         Updates the preferred scroll deceleration factor when the scrollView's decelerationRate is explicitly set by the
1476         user, so when snap scrolling is inactive and [WKWebView scrollViewWillBeginDragging] sets its scrollView's
1477         decelerationRate to the preferred decelerationRate, it will be set to the updated value.
1478
1479         * UIProcess/ios/WKScrollView.mm:
1480         (-[WKScrollView setDecelerationRate:]): Overrides setDecelerationRate to update _preferredScrollDecelerationFactor.
1481
1482 2015-08-17  Timothy Horton  <timothy_horton@apple.com>
1483
1484         Adopt shrink-wrapping for TextIndicators on Mac
1485         https://bugs.webkit.org/show_bug.cgi?id=148064
1486
1487         Reviewed by Beth Dakin.
1488
1489         * Shared/WebCoreArgumentCoders.cpp:
1490         (IPC::ArgumentCoder<TextIndicatorData>::encode): Deleted.
1491         (IPC::ArgumentCoder<TextIndicatorData>::decode): Deleted.
1492         * WebProcess/WebPage/FindController.cpp:
1493         (WebKit::FindController::updateFindIndicator):
1494         * WebProcess/WebPage/ios/WebPageIOS.mm:
1495         (WebKit::WebPage::getPositionInformation):
1496         Use the new option, TextIndicatorOptionIncludeMarginIfRangeMatchesSelection,
1497         for iOS and FindController, because we can keep the margins in these cases
1498         because we don't have to animate to/from the blue highlight.
1499
1500 2015-08-16  Timothy Horton  <timothy_horton@apple.com>
1501
1502         Refactor ViewGestureController swipe snapshot removal to be more platform-independent
1503         https://bugs.webkit.org/show_bug.cgi?id=148062
1504
1505         Reviewed by Dan Bernstein.
1506
1507         * Platform/Logging.h:
1508         Add a ViewGestures logging channel.
1509
1510         * UIProcess/ViewGestureController.cpp: Added.
1511         (viewGestureControllersForAllPages):
1512         (WebKit::ViewGestureController::ViewGestureController):
1513         (WebKit::ViewGestureController::~ViewGestureController):
1514         (WebKit::ViewGestureController::gestureControllerForPage):
1515         (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
1516         (WebKit::ViewGestureController::didRepaintAfterNavigation):
1517         (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
1518         (WebKit::ViewGestureController::didRestoreScrollPosition):
1519         (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
1520         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
1521         (WebKit::ViewGestureController::checkForActiveLoads):
1522         (WebKit::ViewGestureController::SnapshotRemovalTracker::eventsDescription):
1523         (WebKit::ViewGestureController::SnapshotRemovalTracker::SnapshotRemovalTracker):
1524         (WebKit::ViewGestureController::SnapshotRemovalTracker::log):
1525         (WebKit::ViewGestureController::SnapshotRemovalTracker::start):
1526         (WebKit::ViewGestureController::SnapshotRemovalTracker::reset):
1527         (WebKit::ViewGestureController::SnapshotRemovalTracker::eventOccurred):
1528         (WebKit::ViewGestureController::SnapshotRemovalTracker::cancelOutstandingEvent):
1529         (WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackIfPossible):
1530         (WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackImmediately):
1531         (WebKit::ViewGestureController::SnapshotRemovalTracker::watchdogTimerFired):
1532         (WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
1533         Build a platform-independent SnapshotRemovalTracker, which keeps track of
1534         various events that we wait for before removing the snapshot. This
1535         is constructed from the union of ViewGestureController{IOS, Mac}'s snapshot
1536         removal code, and each platform ViewGestureController can specify which
1537         events to wait for (because this currently differs slightly).
1538
1539         Add logging to SnapshotRemovalTracker to make debugging snapshot removal
1540         issues much easier.
1541
1542         * UIProcess/mac/ViewGestureController.h:
1543         (WebKit::ViewGestureController::backgroundColorForCurrentSnapshot):
1544         (WebKit::ViewGestureController::didFinishLoadForMainFrame):
1545         (WebKit::ViewGestureController::didFailLoadForMainFrame):
1546
1547         * UIProcess/ios/ViewGestureControllerIOS.mm:
1548         (WebKit::ViewGestureController::platformTeardown):
1549         (WebKit::ViewGestureController::beginSwipeGesture):
1550         (WebKit::ViewGestureController::endSwipeGesture):
1551         (WebKit::ViewGestureController::setRenderTreeSize):
1552         (WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
1553         (WebKit::ViewGestureController::removeSwipeSnapshot):
1554         (viewGestureControllersForAllPages): Deleted.
1555         (WebKit::ViewGestureController::ViewGestureController): Deleted.
1556         (WebKit::ViewGestureController::~ViewGestureController): Deleted.
1557         (WebKit::ViewGestureController::didRestoreScrollPosition): Deleted.
1558         (WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState): Deleted.
1559         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame): Deleted.
1560         (WebKit::ViewGestureController::activeLoadMonitoringTimerFired): Deleted.
1561         (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired): Deleted.
1562         (WebKit::ViewGestureController::removeSwipeSnapshotIfReady): Deleted.
1563         * UIProcess/mac/ViewGestureControllerMac.mm:
1564         (WebKit::ViewGestureController::platformTeardown):
1565         (WebKit::ViewGestureController::endSwipeGesture):
1566         (WebKit::ViewGestureController::forceRepaintIfNeeded):
1567         (WebKit::ViewGestureController::removeSwipeSnapshot):
1568         (WebKit::ViewGestureController::ViewGestureController): Deleted.
1569         (WebKit::ViewGestureController::~ViewGestureController): Deleted.
1570         (WebKit::ViewGestureController::beginSwipeGesture): Deleted.
1571         (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold): Deleted.
1572         (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame): Deleted.
1573         (WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState): Deleted.
1574         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame): Deleted.
1575         (WebKit::ViewGestureController::activeLoadMonitoringTimerFired): Deleted.
1576         (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired): Deleted.
1577         (WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint): Deleted.
1578         Move shareable snapshot removal code to a new platform-independent ViewGestureController file.
1579         Move the ViewGestureController constructor/destructor to the platform-independent file.
1580
1581         * UIProcess/mac/ViewGestureController.messages.in:
1582         * WebKit2.xcodeproj/project.pbxproj:
1583
1584 2015-08-11  Andy Estes  <aestes@apple.com>
1585
1586         [Cocoa] Add redirect support to CustomProtocolManager
1587         https://bugs.webkit.org/show_bug.cgi?id=147871
1588
1589         Reviewed by Dan Bernstein.
1590         
1591         NSURLProtocols have the ability to generate redirect responses. This change teaches CustomProtocolManager how to handle them.
1592
1593         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
1594         (WebKit::CustomProtocolManager::wasRedirectedToRequest): Called -URLProtocol:wasRedirectedToRequest:redirectResponse: on the NSURLProtocolClient.
1595         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
1596         * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: Defined WasRedirectedToRequest.
1597         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
1598         (WebKit::CustomProtocolManager::wasRedirectedToRequest): Defined empty function.
1599         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
1600         (-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]): If a redirect response is received, send WasRedirectedToRequest and return nil to ignore the redirect.
1601
1602 2015-08-13  Andy Estes  <aestes@apple.com>
1603
1604         [Cocoa] Downloads do not start if policy decision is made asynchronously
1605         https://bugs.webkit.org/show_bug.cgi?id=147985
1606
1607         Reviewed by Brady Eidson.
1608
1609         * WebProcess/Network/WebResourceLoader.cpp: Updated to include SubresourceLoader.h.
1610         * WebProcess/WebPage/WebFrame.cpp:
1611         (WebKit::WebFrame::convertMainResourceLoadToDownload): Started a new download if the main resource loader is not calling didReceiveResponse.
1612
1613 2015-08-14  Simon Fraser  <simon.fraser@apple.com>
1614
1615         Speculative fix for iOS build failure.
1616
1617         * Shared/mac/RemoteLayerTreeTransaction.h:
1618
1619 2015-08-14  Philippe Normand  <pnormand@igalia.com>
1620
1621         Unreviewed, remove dead code after r188385.
1622
1623         * UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
1624         (webkitUserMediaPermissionRequestAllow): Deleted.
1625
1626 2015-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1627
1628         Unreviewed. Fix the build with !ENABLE(MEDIA_STREAM) after r188385.
1629
1630         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
1631         (WKUserMediaPermissionRequestDeviceNamesVideo):
1632         (WKUserMediaPermissionRequestDeviceNamesAudio):
1633
1634 2015-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1635
1636         Unreviewed. Fix GTK+ build after r188386.
1637
1638         * UIProcess/API/gtk/WebKitWindowProperties.cpp:
1639         (webkitWindowPropertiesUpdateFromWebWindowFeatures):
1640
1641 2015-08-13  Tim Horton  <timothy_horton@apple.com>
1642
1643         Performing a Lookup on wrapped text puts the popover arrow in the wrong place (off to the right)
1644         https://bugs.webkit.org/show_bug.cgi?id=148012
1645         <rdar://problem/19238094>
1646
1647         Reviewed by Simon Fraser.
1648
1649         * UIProcess/mac/PageClientImpl.mm:
1650         (WebKit::PageClientImpl::didPerformDictionaryLookup):
1651         * UIProcess/mac/WKImmediateActionController.mm:
1652         (-[WKImmediateActionController _animationControllerForText]):
1653         Adopt the new SPI, handing it the first text rect, instead of having it
1654         guess where to put the popover.
1655
1656 2015-08-13  Commit Queue  <commit-queue@webkit.org>
1657
1658         Unreviewed, rolling out r188418.
1659         https://bugs.webkit.org/show_bug.cgi?id=148017
1660
1661         Fix EFL after the rollout of r188404 (Requested by smfr on
1662         #webkit).
1663
1664         Reverted changeset:
1665
1666         "[CMake] Unreviewed build fix after r188404"
1667         http://trac.webkit.org/changeset/188418
1668
1669 2015-08-13  Commit Queue  <commit-queue@webkit.org>
1670
1671         Unreviewed, rolling out r188404.
1672         https://bugs.webkit.org/show_bug.cgi?id=148014
1673
1674         Broke 4 API tests (Requested by smfr on #webkit).
1675
1676         Reverted changeset:
1677
1678         "Add WKWindowFeaturesRef and a new modern createNewPage UI
1679         client callback"
1680         https://bugs.webkit.org/show_bug.cgi?id=147989
1681         http://trac.webkit.org/changeset/188404
1682
1683 2015-08-13  Tim Horton  <timothy_horton@apple.com>
1684
1685         Try to fix the Gtk/EFL build.
1686
1687         * WebProcess/WebPage/FindController.cpp:
1688         (WebKit::FindController::updateFindIndicator):
1689
1690 2015-08-13  Tim Horton  <timothy_horton@apple.com>
1691
1692         Refactor and improve TextIndicator to prepare for tests
1693         https://bugs.webkit.org/show_bug.cgi?id=147622
1694
1695         Reviewed by Simon Fraser.
1696
1697         * Shared/WebCoreArgumentCoders.cpp:
1698         (IPC::encodeOptionalImage):
1699         (IPC::decodeOptionalImage):
1700         (IPC::ArgumentCoder<TextIndicatorData>::encode):
1701         (IPC::ArgumentCoder<TextIndicatorData>::decode):
1702         Move encode/decodeOptionalImage to their own functions to avoid duplication.
1703
1704         * UIProcess/API/mac/WKView.mm:
1705         (-[WKView _dictionaryLookupPopoverWillClose:]):
1706         (-[WKView _setTextIndicator:]):
1707         (-[WKView _setTextIndicator:withLifetime:]):
1708         (-[WKView _clearTextIndicatorWithAnimation:]):
1709         (-[WKView _dismissContentRelativeChildWindows]):
1710         (-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
1711         * UIProcess/API/mac/WKViewInternal.h:
1712         * UIProcess/PageClient.h:
1713         * UIProcess/WebPageProxy.cpp:
1714         (WebKit::WebPageProxy::setTextIndicator):
1715         * UIProcess/WebPageProxy.h:
1716         * UIProcess/ios/PageClientImplIOS.h:
1717         * UIProcess/ios/PageClientImplIOS.mm:
1718         (WebKit::PageClientImpl::setTextIndicator):
1719         (WebKit::PageClientImpl::clearTextIndicator):
1720         * UIProcess/mac/PageClientImpl.h:
1721         * UIProcess/mac/PageClientImpl.mm:
1722         (WebKit::PageClientImpl::setTextIndicator):
1723         (WebKit::PageClientImpl::clearTextIndicator):
1724         (WebKit::PageClientImpl::didPerformDictionaryLookup):
1725         * UIProcess/mac/WKImmediateActionController.mm:
1726         (-[WKImmediateActionController _animationControllerForText]):
1727         * WebProcess/WebPage/FindController.cpp:
1728         (WebKit::FindController::updateFindIndicator):
1729         * WebProcess/WebPage/ios/WebPageIOS.mm:
1730         (WebKit::WebPage::getPositionInformation):
1731         (WebKit::shouldUseTextIndicatorForLink): Deleted.
1732         * WebProcess/WebPage/mac/WebPageMac.mm:
1733         (WebKit::WebPage::dictionaryPopupInfoForRange):
1734         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
1735         Adopt TextIndicatorOptions.
1736         Adjust to Range method renames.
1737
1738 2015-08-13  Jaehun Lim  <ljaehun.lim@samsung.com>
1739
1740         [CMake] Unreviewed build fix after r188404
1741
1742         * CMakeLists.txt: Add UIProcess/API/APIWindowFeatures.cpp, UIProcess/API/C/WKWindowFeaturesRef.cpp
1743
1744 2015-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
1745
1746         A focused node should not be assisted when handling touch events synchronously
1747         https://bugs.webkit.org/show_bug.cgi?id=147836
1748         <rdar://problem/22204108>
1749
1750         Reviewed by Enrica Casucci.
1751
1752         Makes interaction with touch handlers no longer assist the currently focused element in the
1753         general case. Added plumbing to reassist a currently focused node when dispatching touch events,
1754         so that an input that programmatically focuses itself and prevents default on a touch event will
1755         be properly assisted when it has been programmatically focused (either through Javascript or the
1756         autofocus attribute) prior to receiving the touch event. This patch also removes the now
1757         unnecessary special-casing of the Gmail settings app that currently makes the keyboard deploy
1758         upon autofocus.
1759
1760         * UIProcess/ios/WKContentViewInteraction.mm:
1761         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Removed
1762             special case to avoid the early return for Gmail Add Account.
1763         * WebProcess/WebCoreSupport/WebChromeClient.h: Added a handler for refocusing an element.
1764         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
1765         (WebKit::WebChromeClient::elementDidRefocus): Makes refocusing an element trigger input
1766             assistance on iOS.
1767         * WebProcess/WebPage/WebPage.cpp:
1768         (WebKit::WebPage::dispatchTouchEvent): Removes logic to focus the currently focused element upon
1769             receiving a touch event.
1770
1771 2015-08-13  Anders Carlsson  <andersca@apple.com>
1772
1773         Add WKWindowFeaturesRef and a new modern createNewPage UI client callback
1774         https://bugs.webkit.org/show_bug.cgi?id=147989
1775
1776         Reviewed by Tim Horton.
1777
1778         * Platform/IPC/mac/ConnectionMac.mm:
1779         * Shared/API/APIObject.h:
1780         * Shared/API/c/WKBase.h:
1781         * UIProcess/API/APIWindowFeatures.cpp: Added.
1782         * UIProcess/API/APIWindowFeatures.h: Added.
1783         * UIProcess/API/C/WKAPICast.h:
1784         * UIProcess/API/C/WKPage.cpp:
1785         (WKPageSetPageUIClient):
1786         * UIProcess/API/C/WKPageUIClient.h:
1787         * UIProcess/API/C/WKWindowFeaturesRef.cpp: Added.
1788         (WKWindowFeaturesGetTypeID):
1789         * UIProcess/API/C/WKWindowFeaturesRef.h: Added.
1790         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
1791         (-[WKWindowFeatures dealloc]):
1792         (-[WKWindowFeatures menuBarVisibility]):
1793         (-[WKWindowFeatures statusBarVisibility]):
1794         (-[WKWindowFeatures toolbarsVisibility]):
1795         (-[WKWindowFeatures allowsResizing]):
1796         (-[WKWindowFeatures x]):
1797         (-[WKWindowFeatures y]):
1798         (-[WKWindowFeatures width]):
1799         (-[WKWindowFeatures height]):
1800         (-[WKWindowFeatures _apiObject]):
1801         (-[WKWindowFeatures _initWithWindowFeatures:]): Deleted.
1802         * UIProcess/API/Cocoa/WKWindowFeaturesInternal.h:
1803         (WebKit::wrapper):
1804         * UIProcess/Cocoa/UIDelegate.mm:
1805         (WebKit::UIDelegate::UIClient::createNewPage):
1806         * WebKit2.xcodeproj/project.pbxproj:
1807
1808 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
1809
1810         FilterOperation.h should not include FilterEffect.h
1811         https://bugs.webkit.org/show_bug.cgi?id=147970
1812
1813         Reviewed by Daniel Bates.
1814
1815         FilterEffect.h pulls in lots of JSC goop via runtime/Uint8ClampedArray.h,
1816         so move its include to FilterOperation.cpp.
1817         
1818         Causes include bloat because FilterOperation.h is pulled in via RenderStyle.h.
1819
1820         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1821
1822 2015-08-12  Anders Carlsson  <andersca@apple.com>
1823
1824         Use WTF::Optional in WindowFeatures
1825         https://bugs.webkit.org/show_bug.cgi?id=147956
1826
1827         Reviewed by Sam Weinig.
1828
1829         * Shared/WebCoreArgumentCoders.cpp:
1830         (IPC::ArgumentCoder<WindowFeatures>::encode): Deleted.
1831         (IPC::ArgumentCoder<WindowFeatures>::decode): Deleted.
1832         * UIProcess/API/C/WKPage.cpp:
1833         (WKPageSetPageUIClient):
1834         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
1835         (-[WKWindowFeatures _initWithWindowFeatures:]):
1836
1837 2015-08-13  Matthew Daiter  <mdaiter@apple.com>
1838
1839         Linking device query ability from WebKit2 to clients
1840         https://bugs.webkit.org/show_bug.cgi?id=147263
1841         <rdar://problem/21983345>
1842
1843         Reviewed by Jer Noble.
1844
1845         * Platform/mac/LayerHostingContext.mm:
1846         (WebKit::LayerHostingContext::setColorMatchUntaggedContent):
1847         (WebKit::LayerHostingContext::colorMatchUntaggedContent):
1848         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
1849         (WKUserMediaPermissionRequestAllow):
1850         (WKUserMediaPermissionRequestDeviceNamesVideo):
1851         (WKUserMediaPermissionRequestDeviceNamesAudio):
1852         * UIProcess/API/C/WKUserMediaPermissionRequest.h:
1853         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1854         (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Deleted.
1855         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
1856         * UIProcess/UserMediaPermissionRequestProxy.cpp:
1857         (WebKit::UserMediaPermissionRequestProxy::allow):
1858         (WebKit::UserMediaPermissionRequestProxy::deny):
1859         * UIProcess/UserMediaPermissionRequestProxy.h:
1860         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1861         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision):
1862
1863
1864 2015-08-12  Alexey Proskuryakov  <ap@apple.com>
1865
1866         [Mac] WebKit processes should have access to com.apple.nesessionmanager.flow-divert-token
1867         https://bugs.webkit.org/show_bug.cgi?id=147949
1868         rdar://problem/22254920
1869
1870         Reviewed by Anders Carlsson.
1871
1872         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1873         * WebProcess/com.apple.WebProcess.sb.in:
1874
1875 2015-08-12  Brian Burg  <bburg@apple.com>
1876
1877         Web Inspector: CRASH under WebInspector::closeFrontend for some protocol tests
1878         https://bugs.webkit.org/show_bug.cgi?id=147948
1879
1880         Reviewed by Joseph Pecoraro.
1881
1882         * WebProcess/WebPage/WebInspector.cpp:
1883         (WebKit::WebInspector::closeFrontend): Don't invalidate the channel if it's null.
1884         * WebProcess/WebPage/WebInspector.h: Add default member variable values.
1885
1886 2015-08-12  Joseph Pecoraro  <pecoraro@apple.com>
1887
1888         Web Inspector: Not receiving responses for async request IndexedDB.requestDatabaseNames
1889         https://bugs.webkit.org/show_bug.cgi?id=147844
1890
1891         Reviewed by Brian Burg.
1892
1893         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
1894         (WebKit::WebIDBFactoryBackend::getDatabaseNames):
1895         This method should not return without calling either the success
1896         or error callbacks. In this case, it can succeed with an empty list.
1897
1898 2015-08-12  Enrica Casucci  <enrica@apple.com>
1899
1900         Element interaction should not be canceled when the menu is already being shown.
1901         https://bugs.webkit.org/show_bug.cgi?id=147945
1902         rdar://problem/22206433
1903
1904         Reviewed by Beth Dakin.
1905
1906         When preview is canceled by the action menu gesture, we should not stop interacting
1907         with the element, since the information about the element is used for the menu actions.
1908         We now expose a new method in the action sheet assistant to know if the action sheed is
1909         being shown and we use this as an indication that we should not stop the interaction
1910         with the element.
1911
1912         * UIProcess/ios/WKActionSheetAssistant.h:
1913         * UIProcess/ios/WKActionSheetAssistant.mm:
1914         (-[WKActionSheetAssistant isShowingSheet]): Added.
1915         * UIProcess/ios/WKContentViewInteraction.mm:
1916         (-[WKContentView _interactionStoppedFromPreviewItemController:]): Do not stop
1917         the interaction if the sheet is being shown.
1918
1919 2015-08-12  Matt Rajca  <mrajca@apple.com>
1920
1921         Fixed the Release build when MEDIA_SESSION is enabled.
1922
1923         * UIProcess/API/C/WKPage.cpp:
1924         (WKPageHandleMediaEvent):
1925
1926 2015-08-07  Matt Rajca  <mrajca@apple.com>
1927
1928         Media Session: notify the UI process when media controls are enabled/disabled
1929         https://bugs.webkit.org/show_bug.cgi?id=147802
1930
1931         Reviewed by Eric Carlson.
1932
1933         * UIProcess/WebMediaSessionFocusManager.cpp:
1934         (WebKit::WebMediaSessionFocusManager::playbackAttributeDidChange): Generalized to take different attributes.
1935         (WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange): Deleted.
1936         * UIProcess/WebMediaSessionFocusManager.h:
1937         * UIProcess/WebPageProxy.cpp:
1938         (WebKit::WebPageProxy::isPlayingMediaDidChange): Process new attributes for enabling/disabling media controls.
1939
1940 2015-08-12  Devin Rousso  <drousso@apple.com>
1941
1942         Web Inspector: Implement selector highlighting for iOS
1943         https://bugs.webkit.org/show_bug.cgi?id=147919
1944
1945         Reviewed by Timothy Hatcher.
1946
1947         * UIProcess/WKInspectorHighlightView.mm:
1948         (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]):
1949         Added offset parameter to start drawing the highlight at that index of the highlight quad list.
1950
1951         (-[WKInspectorHighlightView _layoutForNodeListHighlight:]):
1952         Loops through the highlight quads and draws a new highlight for every 4 highlight quad objects.
1953
1954         (-[WKInspectorHighlightView update:]):
1955         Now uses the light highlighting for both nodes and lists of nodes.
1956
1957 2015-08-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1958
1959         NetworkProcess: DNS prefetch happens in the Web Process
1960         https://bugs.webkit.org/show_bug.cgi?id=147824
1961
1962         Reviewed by Alexey Proskuryakov.
1963
1964         DNS prefetch requests started in the WebProcess should be sent to
1965         the network process when it's enabled.
1966
1967         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1968         (WebKit::NetworkConnectionToWebProcess::prefetchDNS): Do the
1969         actual DNS prefetch.
1970         * NetworkProcess/NetworkConnectionToWebProcess.h:
1971         * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Add
1972         PrefetchDNS message.
1973         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
1974         (webkitWebExtensionDidReceiveMessage): Use WebProcess::prefetchDNS().
1975         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1976         (WebKit::WebFrameLoaderClient::prefetchDNS): Ditto.
1977         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1978         * WebProcess/WebPage/ios/WebPageIOS.mm:
1979         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Use
1980         FrameLoaderClient to do the DNS prefetch.
1981         * WebProcess/WebProcess.cpp:
1982         (WebKit::WebProcess::prefetchDNS): Send the request to the network
1983         process if it's enabled, otherwise do the actual DNS prefetch.
1984         * WebProcess/WebProcess.h:
1985
1986 2015-08-11  Hunseop Jeong  <hs85.jeong@samsung.com>
1987
1988         Try to fix the EFL build after r188279
1989         https://bugs.webkit.org/show_bug.cgi?id=147917
1990
1991         Reviewed by Gyuyoung Kim.
1992
1993         Replaced the WKPageLoaderClient with variable name because it is removed in r188279.
1994
1995         * UIProcess/efl/PageLoadClientEfl.cpp:
1996         (WebKit::PageLoadClientEfl::PageLoadClientEfl):
1997         * UIProcess/efl/PagePolicyClientEfl.cpp:
1998         (WebKit::PagePolicyClientEfl::PagePolicyClientEfl):
1999
2000 2015-08-11  Andy Estes  <aestes@apple.com>
2001
2002         Tried again to fix the iOS build.
2003
2004         * UIProcess/ios/WKGeolocationProviderIOS.mm:
2005         (-[WKGeolocationProviderIOS initWithProcessPool:]):
2006
2007 2015-08-11  Dan Bernstein  <mitz@apple.com>
2008
2009         Tried to fix the iOS build.
2010
2011         * UIProcess/ios/WKGeolocationProviderIOS.mm:
2012         (-[WKGeolocationProviderIOS initWithProcessPool:]):
2013
2014 2015-08-11  Andy Estes  <aestes@apple.com>
2015
2016         WebFrameLoaderClient::dispatchDecidePolicyForResponse() calls an std::function after it's been moved from
2017         https://bugs.webkit.org/show_bug.cgi?id=147873
2018
2019         Reviewed by Alexey Proskuryakov.
2020         
2021         I noticed during code inspection that we were calling an std::function after WTF::move() has been called on it.
2022         Calling an empty std::function results in a C++ exception being thrown. I don't know how to make a sync IPC
2023         message fail, so I'm not sure how to test this.
2024
2025         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2026         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): Called didReceivePolicyDecision instead.
2027
2028 2015-08-11  Beth Dakin  <bdakin@apple.com>
2029
2030         REGRESSION (r188053): Sometimes unable to save an image from Google Search/
2031         imgur via long press
2032         https://bugs.webkit.org/show_bug.cgi?id=147896
2033
2034         Reviewed by Enrica Casucci.
2035
2036         http://trac.webkit.org/changeset/188053 added code to call cleanupSheet when 
2037         the long press gesture is cancelled. However, the gesture will be called with 
2038         the cancelled state when then user taps an item in the action sheet (such as 
2039         “save image”), and sometimes the “cancel” comes in before the image has been 
2040         saved. That is a problem because we need to avoid cleaning up the sheet until 
2041         after the image is saved. Before that patch, we never cleaned up the sheet on 
2042         cancel, so this patch goes back to that behavior. We also have to remove some 
2043         assertions that assume that everything will be totally cleaned up when a new 
2044         sheet is created, but that is not necessarily true due to interactions 
2045         between the preview gesture and the long press gesture. 
2046
2047         Remove assertions.
2048         * UIProcess/ios/WKActionSheetAssistant.mm:
2049         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
2050         (-[WKActionSheetAssistant showImageSheet]):
2051         (-[WKActionSheetAssistant showLinkSheet]):
2052         (-[WKActionSheetAssistant showDataDetectorsSheet]):
2053
2054         Revert the part of Enrica’s patch that called cleanupSheet when the gesture 
2055         is cancelled.
2056         * UIProcess/ios/WKContentViewInteraction.mm:
2057         (-[WKContentView _longPressRecognized:]):
2058
2059 2015-08-11  Anders Carlsson  <andersca@apple.com>
2060
2061         Remove unversioned client structs from the C SPI
2062         https://bugs.webkit.org/show_bug.cgi?id=147894
2063
2064         Reviewed by Dan Bernstein.
2065
2066         * Shared/API/c/WKConnectionRef.h:
2067         * UIProcess/API/C/WKContext.h:
2068         * UIProcess/API/C/WKContextConnectionClient.h:
2069         * UIProcess/API/C/WKContextDownloadClient.h:
2070         * UIProcess/API/C/WKContextHistoryClient.h:
2071         * UIProcess/API/C/WKContextInjectedBundleClient.h:
2072         * UIProcess/API/C/WKCookieManager.h:
2073         * UIProcess/API/C/WKDatabaseManager.h:
2074         * UIProcess/API/C/WKGeolocationManager.h:
2075         * UIProcess/API/C/WKIconDatabase.h:
2076         * UIProcess/API/C/WKNotificationProvider.h:
2077         * UIProcess/API/C/WKPageContextMenuClient.h:
2078         * UIProcess/API/C/WKPageDiagnosticLoggingClient.h:
2079         * UIProcess/API/C/WKPageFindClient.h:
2080         * UIProcess/API/C/WKPageFindMatchesClient.h:
2081         * UIProcess/API/C/WKPageFormClient.h:
2082         * UIProcess/API/C/WKPageLoaderClient.h:
2083         * UIProcess/API/C/WKPagePolicyClient.h:
2084         * UIProcess/API/C/WKPageUIClient.h:
2085         * WebProcess/InjectedBundle/API/c/WKBundle.h:
2086         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h:
2087         * WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
2088         * WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
2089         * WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
2090         * WebProcess/InjectedBundle/API/c/WKBundlePageFormClient.h:
2091         * WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h:
2092         * WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
2093         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
2094         * WebProcess/InjectedBundle/API/c/WKBundlePagePolicyClient.h:
2095         * WebProcess/InjectedBundle/API/c/WKBundlePageResourceLoadClient.h:
2096         * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
2097
2098 2015-08-11  Dan Bernstein  <mitz@apple.com>
2099
2100         Reverted r188255, because it turned out that delegates do nonot need this information.
2101
2102         * UIProcess/API/APIUIClient.h:
2103         (API::UIClient::footerHeight):
2104         (API::UIClient::drawHeader):
2105         (API::UIClient::drawFooter):
2106         (API::UIClient::printFrame):
2107         (API::UIClient::canRunModal):
2108         (API::UIClient::runModal):
2109         * UIProcess/API/C/WKPage.cpp:
2110         (WKPageSetPageUIClient):
2111         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2112         * UIProcess/Cocoa/UIDelegate.h:
2113         * UIProcess/Cocoa/UIDelegate.mm:
2114         (WebKit::UIDelegate::UIDelegate):
2115         (WebKit::UIDelegate::setDelegate):
2116         (WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):
2117         (WebKit::UIDelegate::UIClient::printFrame):
2118         (WebKit::UIDelegate::UIClient::close):
2119         * UIProcess/WebPageProxy.cpp:
2120         (WebKit::WebPageProxy::runOpenPanel):
2121         (WebKit::WebPageProxy::printFrame):
2122         (WebKit::WebPageProxy::printMainFrame):
2123         (WebKit::WebPageProxy::setMediaVolume):
2124         * UIProcess/WebPageProxy.h:
2125         (WebKit::WebPageProxy::setShouldSendEventsSynchronously):
2126         * UIProcess/WebPageProxy.messages.in:
2127         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2128         (WebKit::WebChromeClient::print):
2129         (WebKit::WebChromeClient::exceededDatabaseQuota):
2130
2131 2015-08-11  Dan Bernstein  <mitz@apple.com>
2132
2133         [Cocoa] The UI delegate can't tell if printing was user-initiated
2134         https://bugs.webkit.org/show_bug.cgi?id=147869
2135
2136         Reviewed by Sam Weinig.
2137
2138         * UIProcess/API/APIUIClient.h:
2139         (API::UIClient::printFrame): Added processingUserGesture argument.
2140
2141         * UIProcess/API/C/WKPage.cpp:
2142         (WKPageSetPageUIClient): Updated for new client function signature.
2143
2144         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added userInitiated boolean argument to
2145           -_webView:printFrame:.
2146
2147         * UIProcess/Cocoa/UIDelegate.h: Added bool to m_delegateMethods for the new method.
2148         * UIProcess/Cocoa/UIDelegate.mm:
2149         (WebKit::UIDelegate::UIDelegate):
2150         (WebKit::UIDelegate::setDelegate): Initialized new bool.
2151         (WebKit::UIDelegate::UIClient::printFrame): Pass processingUserGesture as the delegate’s
2152           userInitiated argument.
2153
2154         * UIProcess/WebPageProxy.cpp:
2155         (WebKit::WebPageProxy::printFrame): Added processingUserGesture argument, passing it along
2156           to the client.
2157         * UIProcess/WebPageProxy.h:
2158
2159         * UIProcess/WebPageProxy.messages.in: Added processingUserGesture argument to printFrame.
2160
2161         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2162         (WebKit::WebChromeClient::print): Pass new argument.
2163
2164 2015-08-10  Matthew Daiter  <mdaiter@apple.com>
2165
2166         Add MediaDeviceIdentifier to WebsiteDataTypes
2167         https://bugs.webkit.org/show_bug.cgi?id=147853
2168
2169         Reviewed by Jer Noble.
2170
2171         * Shared/WebsiteData/WebsiteDataTypes.h:
2172
2173 2015-08-10  Sam Weinig  <sam@webkit.org>
2174
2175         Try to fix the 32-bit build.
2176
2177         * UIProcess/API/mac/WKViewInternal.h:
2178
2179 2015-08-08  Sam Weinig  <sam@webkit.org>
2180
2181         Replace WebPageConfiguration with API::PageConfiguration and expose a C-SPI accessor for it
2182         https://bugs.webkit.org/show_bug.cgi?id=147811
2183
2184         Reviewed by Darin Adler.
2185
2186         - Adds the missing pieces from WebPageConfiguration into API::PageConfiguration.
2187         - Adds C-SPI to set and get the WebsiteDataStore on the WKPageConfigurationRef.
2188         - Uses API::PageConfiguration to pass configuration information from WKWebView/WKView 
2189           to WebPageProxy.
2190         - Stores the API::PageConfiguration on the WebPageProxy and exposes a new C-SPI function,
2191           WKPageCopyPageConfiguration, to get a copy of it.
2192
2193         * UIProcess/API/APIPageConfiguration.cpp:
2194         (API::PageConfiguration::create):
2195         (API::PageConfiguration::PageConfiguration):
2196         (API::PageConfiguration::~PageConfiguration):
2197         (API::PageConfiguration::copy):
2198         (API::PageConfiguration::processPool):
2199         (API::PageConfiguration::setRelatedPage):
2200         (API::PageConfiguration::visitedLinkProvider):
2201         (API::PageConfiguration::setVisitedLinkProvider):
2202         (API::PageConfiguration::websiteDataStore):
2203         (API::PageConfiguration::setWebsiteDataStore):
2204         (API::PageConfiguration::sessionID):
2205         (API::PageConfiguration::setSessionID):
2206         (API::PageConfiguration::webPageConfiguration): Deleted.
2207         * UIProcess/API/APIPageConfiguration.h:
2208         (API::PageConfiguration::preferenceValues):
2209         (API::PageConfiguration::treatsSHA1SignedCertificatesAsInsecure):
2210         (API::PageConfiguration::setTreatsSHA1SignedCertificatesAsInsecure):
2211         (API::PageConfiguration::alwaysRunsAtForegroundPriority):
2212         (API::PageConfiguration::setAlwaysRunsAtForegroundPriority):
2213         (API::PageConfiguration::create): Deleted.
2214         * UIProcess/API/C/WKPage.cpp:
2215         (WKPageGetPageGroup):
2216         (WKPageCopyPageConfiguration):
2217         (WKPageLoadURL):
2218         * UIProcess/API/C/WKPage.h:
2219         * UIProcess/API/C/WKPageConfigurationRef.cpp:
2220         (WKPageConfigurationSetRelatedPage):
2221         (WKPageConfigurationGetWebsiteDataStore):
2222         (WKPageConfigurationSetWebsiteDataStore):
2223         * UIProcess/API/C/WKPageConfigurationRef.h:
2224         * UIProcess/API/Cocoa/WKWebView.mm:
2225         (-[WKWebView initWithFrame:configuration:]):
2226         * UIProcess/API/ios/WKViewIOS.mm:
2227         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
2228         * UIProcess/API/mac/WKView.mm:
2229         (-[WKView _setPrimaryTrackingArea:]):
2230         (-[WKView initWithFrame:processPool:configuration:webView:]):
2231         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
2232         (-[WKView initWithFrame:configurationRef:]):
2233         (-[WKView wantsUpdateLayer]):
2234         * UIProcess/API/mac/WKViewInternal.h:
2235         * UIProcess/WebPageProxy.cpp:
2236         (WebKit::WebPageProxy::create):
2237         (WebKit::WebPageProxy::WebPageProxy):
2238         (WebKit::WebPageProxy::~WebPageProxy):
2239         (WebKit::WebPageProxy::configuration):
2240         (WebKit::WebPageProxy::processIdentifier):
2241         * UIProcess/WebPageProxy.h:
2242         (WebKit::WebPageProxy::pageID):
2243         (WebKit::WebPageProxy::sessionID):
2244         * UIProcess/WebProcessPool.cpp:
2245         (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
2246         (WebKit::WebProcessPool::createWebPage):
2247         (WebKit::WebProcessPool::download):
2248         * UIProcess/WebProcessPool.h:
2249         * UIProcess/WebProcessProxy.cpp:
2250         (WebKit::WebProcessProxy::webPage):
2251         (WebKit::WebProcessProxy::createWebPage):
2252         * UIProcess/WebProcessProxy.h:
2253         (WebKit::WebProcessProxy::processPool):
2254         * UIProcess/ios/WKContentView.h:
2255         * UIProcess/ios/WKContentView.mm:
2256         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
2257         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
2258         (-[WKContentView initWithFrame:processPool:configuration:wkView:]):
2259         (-[WKContentView dealloc]):
2260
2261 2015-08-10  Commit Queue  <commit-queue@webkit.org>
2262
2263         Unreviewed, rolling out r187131 and r187286.
2264         https://bugs.webkit.org/show_bug.cgi?id=147839
2265
2266          Causing mroe frequent crashes with invalid layer bounds
2267         (rdar://problem/21465328) (Requested by smfr on #webkit).
2268
2269         Reverted changesets:
2270
2271         "[iOS] Menu drop down such as on nike.com does not stay"
2272         https://bugs.webkit.org/show_bug.cgi?id=147047
2273         http://trac.webkit.org/changeset/187131
2274
2275         "[iOS] REGRESSION (187131): Loading CuteOverload zooms in to
2276         the top left corner."
2277         https://bugs.webkit.org/show_bug.cgi?id=147251
2278         http://trac.webkit.org/changeset/187286
2279
2280 2015-08-07  Matt Rajca  <mrajca@apple.com>
2281
2282         Media Session: generalize isFocusedContentMediaElementPlaying so it works with other playback attributes
2283         https://bugs.webkit.org/show_bug.cgi?id=147797
2284
2285         Reviewed by Simon Fraser.
2286
2287         * UIProcess/API/C/WKMediaSessionFocusManager.cpp:
2288         (WKMediaSessionFocusManagerValueForPlaybackAttribute):
2289         (WKMediaSessionFocusManagerIsFocusedContentMediaElementPlaying): Deleted.
2290         * UIProcess/API/C/WKMediaSessionFocusManager.h:
2291         * UIProcess/WebMediaSessionFocusManager.cpp:
2292         (WebKit::WebMediaSessionFocusManager::valueForPlaybackAttribute):
2293         (WebKit::WebMediaSessionFocusManager::mediaControlIsEnabledDidChange):
2294         (WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPlaying): Deleted.
2295         (WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange): Deleted.
2296         * UIProcess/WebMediaSessionFocusManager.h:
2297
2298 2015-08-10  Zan Dobersek  <zdobersek@igalia.com>
2299
2300         [CoordinatedGraphics] Fix forward declarations of CoordinatedGraphicsLayerState, ViewportAttributes
2301         https://bugs.webkit.org/show_bug.cgi?id=147823
2302
2303         Reviewed by Carlos Garcia Campos.
2304
2305         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
2306         * WebProcess/WebPage/LayerTreeHost.h:
2307
2308 2015-08-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2309
2310         [GTK] Crash when the web view is destroyed while the screensaver DBUs proxy is being created
2311         https://bugs.webkit.org/show_bug.cgi?id=147780
2312
2313         Reviewed by Sergio Villar Senin.
2314
2315         We should cancel the screenSaverInhibitCancellable on
2316         dispose. Also use adoptGRef() when creating the cancellable object
2317         to not leak it.
2318
2319         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2320         (webkitWebViewBaseDispose):
2321         (webkitWebViewBaseSendInhibitMessageToScreenSaver):
2322         (webkitWebViewBaseInhibitScreenSaver):
2323
2324 2015-08-09  Chris Dumez  <cdumez@apple.com>
2325
2326         Follow-up nit fixes after r187691.
2327         https://bugs.webkit.org/show_bug.cgi?id=128006
2328
2329         Reviewed by Gavin Barraclough.
2330
2331         Use modern for-loops instead of explicit iterators.
2332
2333         * Shared/Authentication/AuthenticationManager.cpp:
2334         (WebKit::AuthenticationManager::shouldCoalesceChallenge):
2335         (WebKit::AuthenticationManager::coalesceChallengesMatching):
2336
2337 2015-08-07  Filip Pizlo  <fpizlo@apple.com>
2338
2339         Lightweight locks should be adaptive
2340         https://bugs.webkit.org/show_bug.cgi?id=147545
2341
2342         Reviewed by Geoffrey Garen.
2343
2344         * WebProcess/WebPage/EventDispatcher.cpp:
2345         (WebKit::EventDispatcher::clearQueuedTouchEventsForPage):
2346         (WebKit::EventDispatcher::getQueuedTouchEventsForPage):
2347         (WebKit::EventDispatcher::touchEvent):
2348         (WebKit::EventDispatcher::dispatchTouchEvents):
2349         * WebProcess/WebPage/EventDispatcher.h:
2350         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
2351         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
2352         (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
2353         * WebProcess/WebPage/ViewUpdateDispatcher.h:
2354
2355 2015-08-07  Wenson Hsieh  <wenson_hsieh@apple.com>
2356
2357         Temporarily allow programmatic input assistance for adding Gmail account
2358         https://bugs.webkit.org/show_bug.cgi?id=147792
2359
2360         Reviewed by Enrica Casucci.
2361         <rdar://problem/22126518>
2362
2363         Temporary fix for keyboard input sliding out and immediately back in upon user interaction
2364         in the Gmail 2-factor authentication page.
2365
2366         * UIProcess/ios/WKContentViewInteraction.mm:
2367         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Early
2368             return no longer triggers due to lack of user interaction when adding a new Gmail account
2369             through Settings.
2370
2371 2015-08-07  Brady Eidson  <beidson@apple.com>
2372
2373         Move concrete KeyedDecoder/Encoder implementations to WebCore.
2374         https://bugs.webkit.org/show_bug.cgi?id=147757.
2375
2376         Rubberstamped by Andy Estes.
2377
2378         * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
2379         (WebKit::serializeIDBKeyPath):
2380         (WebKit::deserializeIDBKeyPath):
2381         (WebKit::serializeIDBKeyData):
2382         (WebKit::deserializeIDBKeyData):
2383         
2384         * PlatformEfl.cmake:
2385         * PlatformGTK.cmake:
2386         * WebKit2.xcodeproj/project.pbxproj:
2387
2388 2015-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2389
2390         Unreviewed. Fix GTK+ compile warning also introduced in r188121.
2391
2392         * UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp:
2393         (webkit_install_missing_media_plugins_permission_request_get_description):
2394
2395 2015-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2396
2397         Unreviewed. Fix GTK+ debug build after r188121.
2398
2399         * UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp:
2400         (webkit_install_missing_media_plugins_permission_request_get_description):
2401
2402 2015-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2403
2404         [GStreamer] Do not automatically show PackageKit codec installation notifications
2405         https://bugs.webkit.org/show_bug.cgi?id=135973
2406
2407         Reviewed by Philippe Normand.
2408
2409         Add InstallMissingMediaPluginsPermissionRequest to ask the API
2410         layer whether to allow or deny the installation of missing media
2411         plugins. And add a GTK+ implementation based on current permission
2412         request API. Replace the
2413         PageClientImpl::createGstInstallPluginsContext() with
2414         decicePolicyForInstallMissingMediaPluginsPermissionRequest() that
2415         passes the InstallMissingMediaPluginsPermissionRequest object to
2416         the API layer. The allow method receives the
2417         GstInstallPluginsContext now, so that it can be created by the API implementation.
2418
2419         * PlatformEfl.cmake:
2420         * PlatformGTK.cmake:
2421         * UIProcess/API/gtk/PageClientImpl.cpp:
2422         (WebKit::PageClientImpl::decicePolicyForInstallMissingMediaPluginsPermissionRequest):
2423         * UIProcess/API/gtk/PageClientImpl.h:
2424         * UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp: Added.
2425         (createGstInstallPluginsContext):
2426         (webkitInstallMissingMediaPluginsPermissionRequestAllow):
2427         (webkitInstallMissingMediaPluginsPermissionRequestDeny):
2428         (webkit_permission_request_interface_init):
2429         (webkitInstallMissingMediaPluginsPermissionRequestDispose):
2430         (webkit_install_missing_media_plugins_permission_request_class_init):
2431         (webkitInstallMissingMediaPluginsPermissionRequestCreate):
2432         (webkit_install_missing_media_plugins_permission_request_get_description):
2433         * UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.h: Added.
2434         * UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequestPrivate.h: Added.
2435         * UIProcess/API/gtk/WebKitWebView.cpp:
2436         (webkitWebViewRequestInstallMissingMediaPlugins):
2437         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
2438         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2439         * UIProcess/API/gtk/docs/webkit2gtk-4.0.types:
2440         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
2441         * UIProcess/API/gtk/webkit2.h:
2442         * UIProcess/PageClient.h:
2443         * UIProcess/WebPageProxy.h:
2444         * UIProcess/WebPageProxy.messages.in:
2445         * UIProcess/efl/WebViewEfl.h:
2446         * UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp: Copied from Source/WebKit2/UIProcess/gstreamer/WebPageProxyGStreamer.cpp.
2447         (WebKit::InstallMissingMediaPluginsPermissionRequest::InstallMissingMediaPluginsPermissionRequest):
2448         (WebKit::InstallMissingMediaPluginsPermissionRequest::~InstallMissingMediaPluginsPermissionRequest):
2449         (WebKit::InstallMissingMediaPluginsPermissionRequest::allow):
2450         (WebKit::InstallMissingMediaPluginsPermissionRequest::deny):
2451         (WebKit::InstallMissingMediaPluginsPermissionRequest::didEndRequestInstallMissingMediaPlugins):
2452         * UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.h: Copied from Source/WebKit2/WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp.
2453         (WebKit::InstallMissingMediaPluginsPermissionRequest::create):
2454         (WebKit::InstallMissingMediaPluginsPermissionRequest::page):
2455         (WebKit::InstallMissingMediaPluginsPermissionRequest::details):
2456         (WebKit::InstallMissingMediaPluginsPermissionRequest::description):
2457         * UIProcess/gstreamer/WebPageProxyGStreamer.cpp:
2458         (WebKit::WebPageProxy::requestInstallMissingMediaPlugins):
2459         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2460         (WebKit::WebChromeClient::requestInstallMissingMediaPlugins):
2461         * WebProcess/WebCoreSupport/WebChromeClient.h:
2462         * WebProcess/WebPage/WebPage.h:
2463         * WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp:
2464         (WebKit::WebPage::requestInstallMissingMediaPlugins):
2465
2466 2015-08-06  Beth Dakin  <bdakin@apple.com>
2467
2468         TextIndicator can have stale contentImage data and crash
2469         https://bugs.webkit.org/show_bug.cgi?id=147770
2470         -and corresponding-
2471         rdar://problem/22181735
2472
2473         Reviewed by Tim Horton.
2474
2475         If there is no contentImage or contentImageWithHighlight, set them to 
2476         nullptr.
2477         * Shared/WebCoreArgumentCoders.cpp:
2478         (IPC::ArgumentCoder<TextIndicatorData>::decode):
2479
2480 2015-08-06  Dan Bernstein  <mitz@apple.com>
2481
2482         Fixed all the builds after trying to fix the non-HAVE(LINK_PREVIEW) build.
2483
2484         * UIProcess/ios/WKContentViewInteraction.mm:
2485
2486 2015-08-06  Dan Bernstein  <mitz@apple.com>
2487
2488         Fixed the non-HAVE(LINK_PREVIEW) build.
2489
2490         * UIProcess/ios/WKContentViewInteraction.mm:
2491
2492 2015-08-06  Enrica Casucci  <enrica@apple.com>
2493
2494         Cleanup action sheet only when long press is canceled (non ended).
2495         https://bugs.webkit.org/show_bug.cgi?id=147766
2496         rdar://problem/22181842
2497
2498         Reviewed by Tim Horton.
2499
2500         * UIProcess/ios/WKContentViewInteraction.mm:
2501         (-[WKContentView _longPressRecognized:]):
2502
2503 2015-08-06  Matt Rajca  <mrajca@apple.com>
2504
2505         Media Session: notify focus manager clients when the playing state of the focused media element changes
2506         https://bugs.webkit.org/show_bug.cgi?id=147745
2507
2508         Reviewed by Tim Horton.
2509
2510         Added plumbing to allow focus manager's clients to be notified when the focused Content media element begins
2511         playing or is paused.
2512
2513         * UIProcess/API/C/WKMediaSessionFocusManager.cpp:
2514         (WKMediaSessionFocusManagerSetClient):
2515         * UIProcess/API/C/WKMediaSessionFocusManager.h:
2516         * UIProcess/WebMediaSessionFocusManager.cpp:
2517         (WebKit::WebMediaSessionFocusManager::initializeClient):
2518         (WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange):
2519         * UIProcess/WebMediaSessionFocusManager.h:
2520         * UIProcess/WebMediaSessionFocusManagerClient.cpp:
2521         (WebKit::WebMediaSessionFocusManagerClient::didChangePlaybackAttribute):
2522         * UIProcess/WebMediaSessionFocusManagerClient.h:
2523         * WebKit2.xcodeproj/project.pbxproj:
2524
2525 2015-08-06  Alex Christensen  <achristensen@webkit.org>
2526
2527         Make CMake usable on Mac.
2528         https://bugs.webkit.org/show_bug.cgi?id=147756
2529
2530         Reviewed by Tim Horton.
2531
2532         * PlatformMac.cmake:
2533         DatabaseProcess_SOURCES needs something in order to not have errors when generating build systems from CMake.
2534         This doesn't fix everything, but it can now be used to build jsc again.
2535
2536 2015-08-06  Enrica Casucci  <enrica@apple.com>
2537
2538         Build fix for iOS after http://trac.webkit.org/changeset/188053.
2539
2540         Unreviewed.
2541
2542         * UIProcess/ios/WKContentViewInteraction.mm:
2543         (-[WKContentView _registerPreview]):
2544
2545 2015-08-06  Enrica Casucci  <enrica@apple.com>
2546
2547         Allow long press to cancel link preview.
2548         https://bugs.webkit.org/show_bug.cgi?id=147743
2549         rdar://problem/22128839
2550
2551         Reviewed by Tim Horton.
2552
2553         We should be able to show the context menu at the beginnig of link preview.
2554
2555         * UIProcess/ios/WKContentViewInteraction.h:
2556         * UIProcess/ios/WKContentViewInteraction.mm:
2557         (-[WKContentView _removeDefaultGestureRecognizers]):
2558         (-[WKContentView _addDefaultGestureRecognizers]):
2559         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
2560         (-[WKContentView _longPressRecognized:]):
2561         (-[WKContentView _singleTapRecognized:]):
2562         (-[WKContentView _registerPreview]):
2563         (-[WKContentView _unregisterPreview]):
2564
2565 2015-08-06  Matt Rajca  <mrajca@apple.com>
2566
2567         Media Session: rename isFocusedContentMediaElementPaused and get rid of callback
2568         https://bugs.webkit.org/show_bug.cgi?id=147726
2569
2570         Reviewed by Simon Fraser.
2571
2572         - isFocusedContentMediaElementPaused should be renamed to isFocusedContentMediaElementPlaying to match recent
2573           refactoring work.
2574         - isFocusedContentMediaElementPlaying itself does not need a callback anymore because the value can be returned
2575           directly.
2576
2577         * UIProcess/API/C/WKMediaSessionFocusManager.cpp:
2578         (WKMediaSessionFocusManagerIsFocusedContentMediaElementPlaying): Removed callback and renamed from...
2579         (WKMediaSessionFocusManagerIsFocusedContentMediaElementPaused): Deleted.
2580         * UIProcess/API/C/WKMediaSessionFocusManager.h:
2581         * UIProcess/WebMediaSessionFocusManager.cpp:
2582         (WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPlaying): Removed callback and renamed from...
2583         (WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPaused): Deleted.
2584         * UIProcess/WebMediaSessionFocusManager.h:
2585
2586 2015-08-06  Csaba Osztrogonác  <ossy@webkit.org>
2587
2588         [EFL] Bump EFL version to 1.15.0
2589         https://bugs.webkit.org/show_bug.cgi?id=147450
2590
2591         Reviewed by Gyuyoung Kim.
2592
2593         * PlatformEfl.cmake:
2594
2595 2015-08-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2596
2597         [GTK] Crash closing a page when a context menu is open
2598         https://bugs.webkit.org/show_bug.cgi?id=147682
2599
2600         Reviewed by Sergio Villar Senin.
2601
2602         Implement WebContextMenuProxy::cancelTracking() to clear the
2603         internal menu when the web page is closed.
2604
2605         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2606         (WebKit::WebContextMenuProxyGtk::cancelTracking):
2607         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): Deleted.
2608         * UIProcess/gtk/WebContextMenuProxyGtk.h:
2609
2610 2015-08-04  Matt Rajca  <mrajca@apple.com>
2611
2612         Media Session: push paused state to the media session focus manager instead of polling
2613         https://bugs.webkit.org/show_bug.cgi?id=147633
2614
2615         Reviewed by Simon Fraser.
2616
2617         * UIProcess/WebMediaSessionFocusManager.cpp:
2618         (WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPaused): Report whether the focused media
2619          element is currently playing. The callback is no longer necessary and will be removed in a future patch in
2620          favor of returning a value directly.
2621         (WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange): Keep track of whether the focused media
2622          element is currently playing.
2623         * UIProcess/WebMediaSessionFocusManager.h:
2624         * UIProcess/WebPageProxy.cpp:
2625         (WebKit::WebPageProxy::isPlayingMediaDidChange): If the focused media element begins/ends playing, keep track
2626          of its playing state.
2627         (WebKit::WebPageProxy::isMediaElementPaused): Deleted. We now push media playback state changes instead of
2628          polling.
2629         * UIProcess/WebPageProxy.h: isPlayingMediaDidChange is now passed the ID of the media element that triggered
2630          the 'playing' state change. This can be used in conjunction with the IsSourcePlaying media flag to identify
2631          whether the source element begin/ended playing.
2632         * UIProcess/WebPageProxy.messages.in: Ditto.
2633         * WebProcess/Plugins/PluginView.cpp:
2634         (WebKit::PluginView::setPluginIsPlayingAudio): Since a media element did not trigger this, pass in 0 for the
2635          source media element.
2636         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2637         (WebKit::WebChromeClient::isPlayingMediaDidChange): isPlayingMediaDidChange is now passed the ID of the media
2638          element that triggered the 'playing' state change.
2639         * WebProcess/WebCoreSupport/WebChromeClient.h: Ditto.
2640         * WebProcess/WebPage/WebPage.cpp:
2641         (WebKit::WebPage::isMediaElementPaused): Deleted. We now push media playback state changes instead of polling.
2642         * WebProcess/WebPage/WebPage.h: Ditto.
2643         * WebProcess/WebPage/WebPage.messages.in: Ditto.
2644
2645 2015-08-05  Tim Horton  <timothy_horton@apple.com>
2646
2647         PDFPlugins are clipped in link previews (and remain so when opened)
2648         https://bugs.webkit.org/show_bug.cgi?id=147708
2649         <rdar://problem/22055130>
2650
2651         Reviewed by Simon Fraser.
2652
2653         * UIProcess/API/mac/WKView.mm:
2654         (-[WKView initWithFrame:processPool:configuration:webView:]):
2655         (-[WKView _supportsArbitraryLayoutModes]):
2656         (-[WKView _didCommitLoadForMainFrame]):
2657         (-[WKView _setLayoutMode:]):
2658         (-[WKView _setViewScale:]):
2659         Avoid using any layout mode other than "ViewSize" for main frame PluginDocuments,
2660         because they will often end up behaving incorrectly (especially with PDFPlugin,
2661         which is even more special in that it takes over application of page scale).
2662
2663         Save any incoming changes to the viewScale and layoutMode, and re-apply
2664         them once we load something in the main frame that is *not* a PluginDocument.
2665
2666         * UIProcess/API/mac/WKViewInternal.h:
2667         * WebProcess/WebPage/WebPage.cpp:
2668         (WebKit::WebPage::scalePage):
2669         Make sure to reset WebCore's page scale if the main frame contains a 
2670         PluginDocument that takes care of page scale itself.
2671
2672         (WebKit::WebPage::didCommitLoad):
2673         Do the same thing as what we do in WKView _didCommitLoadForMainFrame,
2674         but without the UI process round-trip, to avoid an ugly flash.
2675
2676         * UIProcess/WebFrameProxy.cpp:
2677         (WebKit::WebFrameProxy::didCommitLoad):
2678         * UIProcess/WebFrameProxy.h:
2679         (WebKit::WebFrameProxy::containsPluginDocument):
2680         * UIProcess/WebPageProxy.cpp:
2681         (WebKit::WebPageProxy::didCommitLoadForFrame):
2682         * UIProcess/WebPageProxy.h:
2683         * UIProcess/WebPageProxy.messages.in:
2684         * UIProcess/mac/PageClientImpl.mm:
2685         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
2686         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2687         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
2688         Plumb and keep track of whether the main frame contains a PluginDocument or not.
2689
2690 2015-08-05  Filip Pizlo  <fpizlo@apple.com>
2691
2692         Unreviewed, roll out http://trac.webkit.org/changeset/187972.
2693
2694         * DatabaseProcess/DatabaseProcess.cpp:
2695         (WebKit::DatabaseProcess::postDatabaseTask):
2696         (WebKit::DatabaseProcess::performNextDatabaseTask):
2697         * DatabaseProcess/DatabaseProcess.h:
2698         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2699         (WebKit::UniqueIDBDatabase::shutdown):
2700         (WebKit::UniqueIDBDatabase::postMainThreadTask):
2701         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
2702         (WebKit::UniqueIDBDatabase::postDatabaseTask):
2703         (WebKit::UniqueIDBDatabase::performNextDatabaseTask):
2704         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2705         * Platform/IPC/Connection.cpp:
2706         (IPC::Connection::sendSyncMessage):
2707         (IPC::Connection::sendSyncMessageFromSecondaryThread):
2708         (IPC::Connection::waitForSyncReply):
2709         (IPC::Connection::processIncomingSyncReply):
2710         (IPC::Connection::connectionDidClose):
2711         * Platform/IPC/Connection.h:
2712         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2713         (WebKit::CoordinatedGraphicsScene::appendUpdate):
2714         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2715         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2716         (WebKit::ThreadedCompositor::createCompositingThread):
2717         (WebKit::ThreadedCompositor::runCompositingThread):
2718         (WebKit::ThreadedCompositor::terminateCompositingThread):
2719         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
2720         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
2721         (WebKit::CustomProtocolManager::addCustomProtocol):
2722         (WebKit::CustomProtocolManager::removeCustomProtocol):
2723         (WebKit::CustomProtocolManager::registerScheme):
2724         (WebKit::CustomProtocolManager::unregisterScheme):
2725         (WebKit::CustomProtocolManager::supportsScheme):
2726         (WebKit::CustomProtocolManager::protocolForID):
2727         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
2728         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
2729         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2730         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
2731         (WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
2732         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
2733         * WebProcess/Plugins/PluginProcessConnectionManager.h:
2734         * WebProcess/WebPage/EventDispatcher.cpp:
2735         (WebKit::EventDispatcher::addScrollingTreeForPage):
2736         (WebKit::EventDispatcher::removeScrollingTreeForPage):
2737         (WebKit::EventDispatcher::wheelEvent):
2738         * WebProcess/WebPage/EventDispatcher.h:
2739         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
2740         (webkitSoupRequestInputStreamReadAsync):
2741         (webkitSoupRequestInputStreamAddData):
2742
2743 2015-08-05  Ryosuke Niwa  <rniwa@webkit.org>
2744
2745         WebInspectorProxy should make WKWebView first responder
2746         https://bugs.webkit.org/show_bug.cgi?id=147676
2747
2748         Reviewed by Timothy Hatcher.
2749
2750         Revert r181927 now that WKWebView forwards the first responder role to WKView as needed.
2751
2752         * UIProcess/mac/WebInspectorProxyMac.mm:
2753         (WebKit::WebInspectorProxy::platformBringToFront):
2754         (WebKit::WebInspectorProxy::platformAttach):
2755
2756 2015-08-04  Filip Pizlo  <fpizlo@apple.com>
2757
2758         Rename Mutex to DeprecatedMutex
2759         https://bugs.webkit.org/show_bug.cgi?id=147675
2760
2761         Reviewed by Geoffrey Garen.
2762
2763         * DatabaseProcess/DatabaseProcess.cpp:
2764         (WebKit::DatabaseProcess::postDatabaseTask):
2765         (WebKit::DatabaseProcess::performNextDatabaseTask):
2766         * DatabaseProcess/DatabaseProcess.h:
2767         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2768         (WebKit::UniqueIDBDatabase::shutdown):
2769         (WebKit::UniqueIDBDatabase::postMainThreadTask):
2770         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
2771         (WebKit::UniqueIDBDatabase::postDatabaseTask):
2772         (WebKit::UniqueIDBDatabase::performNextDatabaseTask):
2773         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2774         * Platform/IPC/Connection.cpp:
2775         (IPC::Connection::sendSyncMessage):
2776         (IPC::Connection::sendSyncMessageFromSecondaryThread):
2777         (IPC::Connection::waitForSyncReply):
2778         (IPC::Connection::processIncomingSyncReply):
2779         (IPC::Connection::connectionDidClose):
2780         * Platform/IPC/Connection.h:
2781         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2782         (WebKit::CoordinatedGraphicsScene::appendUpdate):
2783         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2784         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2785         (WebKit::ThreadedCompositor::createCompositingThread):
2786         (WebKit::ThreadedCompositor::runCompositingThread):
2787         (WebKit::ThreadedCompositor::terminateCompositingThread):
2788         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
2789         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
2790         (WebKit::CustomProtocolManager::addCustomProtocol):
2791         (WebKit::CustomProtocolManager::removeCustomProtocol):
2792         (WebKit::CustomProtocolManager::registerScheme):
2793         (WebKit::CustomProtocolManager::unregisterScheme):
2794         (WebKit::CustomProtocolManager::supportsScheme):
2795         (WebKit::CustomProtocolManager::protocolForID):
2796         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
2797         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
2798         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2799         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
2800         (WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
2801         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
2802         * WebProcess/Plugins/PluginProcessConnectionManager.h:
2803         * WebProcess/WebPage/EventDispatcher.cpp:
2804         (WebKit::EventDispatcher::addScrollingTreeForPage):
2805         (WebKit::EventDispatcher::removeScrollingTreeForPage):
2806         (WebKit::EventDispatcher::wheelEvent):
2807         * WebProcess/WebPage/EventDispatcher.h:
2808         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
2809         (webkitSoupRequestInputStreamReadAsync):
2810         (webkitSoupRequestInputStreamAddData):
2811
2812 2015-08-05  Daniel Bates  <dabates@apple.com>
2813
2814         REGRESSION (r185111): Clicking phone numbers doesn't prompt to call sometimes
2815         https://bugs.webkit.org/show_bug.cgi?id=147678
2816         <rdar://problem/21827815>
2817
2818         Reviewed by Brady Eidson.
2819
2820         Teach WebKit to save and restore the "should open external URLs" policy.
2821
2822         * Shared/SessionState.cpp:
2823         (WebKit::isValidEnum): Added.
2824         (WebKit::PageState::encode): Modified to encode the "should open external URLs" policy.
2825         (WebKit::PageState::decode): Modified to decode the "should open external URLs" policy.
2826         * Shared/SessionState.h: Added ShouldOpenExternalURLsPolicy to PageState (defaults to WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow).
2827         * UIProcess/API/Cocoa/WKWebView.mm:
2828         (-[WKWebView _killWebContentProcessAndResetState]): Added; used in the unit test TestWebKitAPI/Tests/WebKit2Cocoa/ShouldOpenExternalURLsInNewWindowActions.mm.
2829         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declare -[WKWebView _killWebContentProcessAndResetState].
2830         * UIProcess/mac/LegacySessionStateCoding.cpp: Defined constant sessionHistoryEntryShouldOpenExternalURLsPolicyKey.
2831         (WebKit::encodeSessionHistory): Modified to encode the "should open external URLs" policy.
2832         (WebKit::decodeSessionHistoryEntry): Modified to decode the "should open external URLs" policy.
2833         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
2834         (WebKit::toPageState): Copy "should open external URLs" policy from specified history item.
2835         (WebKit::toHistoryItem): Apply "should open external URLs" policy from PageState to HistoryItem.
2836
2837 2015-08-04  Antti Koivisto  <antti@apple.com>
2838
2839         Network cache fetches should have timeout
2840         https://bugs.webkit.org/show_bug.cgi?id=147631
2841
2842         Reviewed by Andreas Kling.
2843
2844         System might be under heavy I/O pressure. If it takes long time to get data from disk we should load from network instead.
2845
2846         This patch introduces 1.5s timeout for disk reads. If the last dispatched cache read takes longer than that we cancel all
2847         active and pending reads and just load those resources from network.
2848
2849         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2850         (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
2851         (WebKit::NetworkCache::Storage::ReadOperation::cancel):
2852         (WebKit::NetworkCache::Storage::ReadOperation::finish):
2853
2854             Factor to functions.
2855
2856         (WebKit::NetworkCache::Storage::Storage):
2857         (WebKit::NetworkCache::Storage::updateFileModificationTime):
2858         (WebKit::NetworkCache::Storage::dispatchReadOperation):
2859         (WebKit::NetworkCache::Storage::finishReadOperation):
2860         (WebKit::NetworkCache::Storage::cancelAllReadOperations):
2861         (WebKit::NetworkCache::Storage::dispatchPendingReadOperations):
2862         (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
2863
2864             Also make dispatch functions transfer the operation ownership.
2865
2866         (WebKit::NetworkCache::shouldStoreBodyAsBlob):
2867         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2868         * NetworkProcess/cache/NetworkCacheStorage.h:
2869
2870 2015-08-04  Matt Rajca  <mrajca@apple.com>
2871
2872         Media Session: add a focus manager that WebKit clients can use to access the focused media element
2873         https://bugs.webkit.org/show_bug.cgi?id=147629
2874
2875         Reviewed by Tim Horton.
2876
2877         * Shared/API/APIObject.h: Added a new type for the focus manager.
2878         * Shared/API/c/WKBase.h: Added a new type for the focus manager.
2879         * UIProcess/API/C/WKAPICast.h: Added a new type for the focus manager.
2880         * UIProcess/API/C/WKContext.cpp: The "global" focus manager is accessed via WKContext.
2881         (WKContextGetMediaSessionFocusManager):
2882         * UIProcess/API/C/WKContext.h:
2883         * UIProcess/API/C/WKMediaSessionFocusManager.cpp: Added C wrapper for WebMediaSessionFocusManager.
2884         (WKMediaSessionFocusManagerGetTypeID):
2885         (WKMediaSessionFocusManagerIsFocusedContentMediaElementPaused):
2886         * UIProcess/API/C/WKMediaSessionFocusManager.h: Added C wrapper for WebMediaSessionFocusManager.
2887         * UIProcess/WebMediaSessionFocusManager.cpp: Added to keep track of the focused media element in the UI process and let clients query this state.
2888         (WebKit::WebMediaSessionFocusManager::supplementName):
2889         (WebKit::WebMediaSessionFocusManager::create):
2890         (WebKit::WebMediaSessionFocusManager::WebMediaSessionFocusManager):
2891         (WebKit::WebMediaSessionFocusManager::refWebContextSupplement):
2892         (WebKit::WebMediaSessionFocusManager::derefWebContextSupplement):
2893         (WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPaused): Check if the media element on the focused page is paused.
2894         (WebKit::WebMediaSessionFocusManager::setFocusedMediaElement): Keep track of the focused page / media element pair.
2895         (WebKit::WebMediaSessionFocusManager::clearFocusedMediaElement): Reset the focused page / media element pair.
2896         * UIProcess/WebMediaSessionFocusManager.h: Added.
2897         * UIProcess/WebPageProxy.cpp:
2898         (WebKit::WebPageProxy::isMediaElementPaused): Updated to take a UnsignedCallback.
2899         (WebKit::WebPageProxy::focusedContentMediaElementDidChange): Store the focused media element in the focus manager.
2900         * UIProcess/WebPageProxy.h:
2901         * UIProcess/WebProcessPool.cpp: Added WebMediaSessionFocusManager as a supplement.
2902         * UIProcess/WebProcessPool.h: WebMediaSessionFocusManager is a supplement, so include its header.
2903         * WebKit2.xcodeproj/project.pbxproj: Added new sources and ran sort-xcode-project.
2904
2905 2015-08-04  Anders Carlsson  <andersca@apple.com>
2906
2907         Get rid of ReasonForCallingAllowPlugins since it's not used anywhere
2908         https://bugs.webkit.org/show_bug.cgi?id=147648
2909
2910         Reviewed by Andreas Kling.
2911
2912         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2913         (WebKit::WebFrameLoaderClient::objectContentType):
2914         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2915         (WebKit::WebPlatformStrategies::getPluginInfo):
2916         * WebProcess/WebPage/WebPage.cpp:
2917         (WebKit::WebPage::createPlugin):
2918         (WebKit::WebPage::canPluginHandleResponse):
2919         (WebKit::WebPage::canShowMIMEType):
2920
2921 2015-08-04  Alexey Proskuryakov  <ap@apple.com>
2922
2923         Implement NPAPI redirect handling
2924         https://bugs.webkit.org/show_bug.cgi?id=138675
2925         rdar://problem/15779101
2926
2927         Patch by Jeffrey Pfau, updated and tweaked by me.
2928
2929         Reviewed by Anders Carlsson.
2930
2931         * PluginProcess/PluginControllerProxy.cpp:
2932         (WebKit::PluginControllerProxy::loadURL):
2933         (WebKit::PluginControllerProxy::continueStreamLoad):
2934         (WebKit::PluginControllerProxy::cancelStreamLoad):
2935         (WebKit::PluginControllerProxy::didEvaluateJavaScript):
2936         (WebKit::PluginControllerProxy::streamWillSendRequest):
2937         (WebKit::PluginControllerProxy::streamDidReceiveResponse):
2938         * PluginProcess/PluginControllerProxy.h:
2939         * PluginProcess/PluginControllerProxy.messages.in:
2940         * WebProcess/Network/WebResourceLoader.cpp:
2941         (WebKit::WebResourceLoader::willSendRequest):
2942         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2943         (WebKit::NPN_ConvertPoint):
2944         (WebKit::NPN_URLRedirectResponse):
2945         (WebKit::initializeBrowserFuncs):
2946         (WebKit::netscapeBrowserFuncs):
2947         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2948         (WebKit::NetscapePlugin::getAuthenticationInfo):
2949         (WebKit::NetscapePlugin::registerRedirect):
2950         (WebKit::NetscapePlugin::urlRedirectResponse):
2951         (WebKit::NetscapePlugin::setIsPlayingAudio):
2952         (WebKit::NetscapePlugin::NPP_URLNotify):
2953         (WebKit::NetscapePlugin::NPP_URLRedirectNotify):
2954         (WebKit::NetscapePlugin::NPP_GetValue):
2955         (WebKit::NetscapePlugin::didEvaluateJavaScript):
2956         (WebKit::NetscapePlugin::streamWillSendRequest):
2957         (WebKit::NetscapePlugin::streamDidReceiveResponse):
2958         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2959         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
2960         (WebKit::NetscapePluginStream::~NetscapePluginStream):
2961         (WebKit::NetscapePluginStream::willSendRequest):
2962         (WebKit::NetscapePluginStream::didReceiveResponse):
2963         (WebKit::NetscapePluginStream::stop):
2964         (WebKit::NetscapePluginStream::setURL):
2965         (WebKit::NetscapePluginStream::cancel):
2966         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
2967         (WebKit::NetscapePluginStream::streamID):
2968         (WebKit::NetscapePluginStream::npStream):
2969         * WebProcess/Plugins/PDF/PDFPlugin.h:
2970         * WebProcess/Plugins/Plugin.h:
2971         * WebProcess/Plugins/PluginController.h:
2972         * WebProcess/Plugins/PluginProxy.cpp:
2973         (WebKit::PluginProxy::didEvaluateJavaScript):
2974         (WebKit::PluginProxy::streamWillSendRequest):
2975         (WebKit::PluginProxy::streamDidReceiveResponse):
2976         (WebKit::PluginProxy::setPluginIsPlayingAudio):
2977         (WebKit::PluginProxy::continueStreamLoad):
2978         (WebKit::PluginProxy::cancelStreamLoad):
2979         * WebProcess/Plugins/PluginProxy.h:
2980         * WebProcess/Plugins/PluginProxy.messages.in:
2981         * WebProcess/Plugins/PluginView.cpp:
2982         (WebKit::PluginView::Stream::streamID):
2983         (WebKit::PluginView::Stream::Stream):
2984         (WebKit::PluginView::Stream::cancel):
2985         (WebKit::PluginView::Stream::continueLoad):
2986         (WebKit::buildHTTPHeaders):
2987         (WebKit::lastModifiedDateMS):
2988         (WebKit::PluginView::Stream::willSendRequest):
2989         (WebKit::PluginView::Stream::didReceiveResponse):
2990         (WebKit::PluginView::cancelStreamLoad):
2991         (WebKit::PluginView::continueStreamLoad):
2992         (WebKit::PluginView::cancelManualStreamLoad):
2993         * WebProcess/Plugins/PluginView.h:
2994
2995 2015-08-04  Chris Dumez  <cdumez@apple.com>
2996
2997         Unreviewed, rolling out r187812.
2998
2999         This is not safe
3000
3001         Reverted changeset:
3002
3003         "[WK2] Reserve Vector capacity in VectorArgumentCoder<false,
3004         T, inlineCapacity>::decode()"
3005         https://bugs.webkit.org/show_bug.cgi?id=147619
3006         http://trac.webkit.org/changeset/187812
3007
3008 2015-08-03  Chris Dumez  <cdumez@apple.com>
3009
3010         [WK2] Reserve Vector capacity in VectorArgumentCoder<false, T, inlineCapacity>::decode()
3011         https://bugs.webkit.org/show_bug.cgi?id=147619
3012
3013         Reviewed by Andreas Kling.
3014
3015         Reserve Vector capacity in VectorArgumentCoder<false, T, inlineCapacity>::decode()
3016         as we know the size of the Vector in advance.
3017
3018         * Platform/IPC/ArgumentCoders.h:
3019
3020 2015-08-03  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3021
3022         [CoordinatedGraphics] Rearrange uses of USE_COORDINATED_GRAPHICS_MULTIPROCESS
3023         https://bugs.webkit.org/show_bug.cgi?id=147256
3024
3025         Reviewed by Benjamin Poulain.
3026
3027         Reduce uses of USE_COORDINATED_GRAPHICS_MULTIPROCESS guard in order to fix build
3028         breaks when USE_COORDINATED_GRAPHICS_MULTIPROCESS is off. This is first step to switch
3029         between multiprocess model to thread model.
3030
3031         * PlatformEfl.cmake:
3032         * Shared/DrawingAreaInfo.h:
3033         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
3034         (WKViewFindZoomableAreaForRect):
3035         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
3036         (WebKit::CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy):
3037         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
3038         (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
3039         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
3040         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
3041         (WebKit::PageViewportController::pageTransitionViewportReady):
3042         * UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp:
3043         * UIProcess/CoordinatedGraphics/WebView.cpp:
3044         * UIProcess/CoordinatedGraphics/WebView.h:
3045         * UIProcess/WebPageProxy.cpp:
3046         (WebKit::WebPageProxy::commitPageTransitionViewport):
3047         * UIProcess/WebPageProxy.h:
3048         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
3049         (WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):
3050         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
3051         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
3052         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3053         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
3054         * WebProcess/WebPage/DrawingAreaImpl.h:
3055         * WebProcess/WebPage/LayerTreeHost.cpp:
3056         (WebKit::LayerTreeHost::create):
3057         * WebProcess/WebPage/WebPage.cpp:
3058         (WebKit::WebPage::sendViewportAttributesChanged):
3059         (WebKit::WebPage::pageDidRequestScroll):
3060         * WebProcess/WebPage/WebPage.h:
3061         * WebProcess/WebPage/WebPage.messages.in:
3062
3063 2015-08-03  Matt Rajca  <mrajca@apple.com>
3064
3065         Media Session: let UI clients query whether a media element is paused
3066         https://bugs.webkit.org/show_bug.cgi?id=147588
3067
3068         Reviewed by Tim Horton.
3069
3070         Added plumbing to determine if a page's media element is paused.
3071
3072         * UIProcess/WebPageProxy.cpp:
3073         (WebKit::WebPageProxy::isMediaElementPaused):
3074         * UIProcess/WebPageProxy.h:
3075         * WebProcess/WebPage/WebPage.cpp:
3076         (WebKit::WebPage::isMediaElementPaused):
3077         * WebProcess/WebPage/WebPage.h:
3078         * WebProcess/WebPage/WebPage.messages.in:
3079
3080 2015-08-03  Chris Dumez  <cdumez@apple.com>
3081
3082         Make sure error handling code APIUserContentExtensionStore closes open file descriptors
3083         https://bugs.webkit.org/show_bug.cgi?id=147562
3084
3085         Reviewed by Alex Christensen.
3086
3087         Make sure error handling code APIUserContentExtensionStore closes open
3088         file descriptors to avoid leaking them.
3089
3090         * NetworkProcess/cache/NetworkCacheData.cpp:
3091         (WebKit::NetworkCache::adoptAndMapFile):
3092         * UIProcess/API/APIUserContentExtensionStore.cpp:
3093         (API::compiledToFile):
3094
3095 2015-08-03  Beth Dakin  <bdakin@apple.com>
3096
3097         Need WKWebView API to enable/disable link preview
3098         https://bugs.webkit.org/show_bug.cgi?id=147573
3099         -and corresponding-
3100         rdar://problem/22077836
3101
3102         Reviewed by Dan Bernstein.
3103
3104         WKView implementation.
3105         * UIProcess/API/Cocoa/WKViewPrivate.h:
3106
3107         New API. Call into WKView to handle Mac.
3108         * UIProcess/API/Cocoa/WKWebView.h:
3109         * UIProcess/API/Cocoa/WKWebView.mm:
3110         (-[WKWebView initWithFrame:configuration:]):
3111         (-[WKWebView allowsLinkPreview]):
3112         (-[WKWebView setAllowsLinkPreview:]):
3113
3114         Remove the SPI declaration from WKWebViewPrivate in order to make this API.
3115         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3116
3117         Handle the Mac side.
3118         * UIProcess/API/mac/WKView.mm:
3119         (-[WKView viewDidMoveToWindow]):
3120         (-[WKView initWithFrame:processPool:configuration:webView:]):
3121         (-[WKView allowsBackForwardNavigationGestures]):
3122         (-[WKView allowsLinkPreview]):
3123         (-[WKView setAllowsLinkPreview:]):
3124
3125         Don’t register previews when link preview is prevented.
3126         * UIProcess/ios/WKContentViewInteraction.mm:
3127         (-[WKContentView _registerPreview]):
3128
3129 2015-08-03  Tim Horton  <timothy_horton@apple.com>
3130
3131         [iOS] Link previews sometimes don't hide the link highlight
3132         https://bugs.webkit.org/show_bug.cgi?id=147585
3133         <rdar://problem/22119648>
3134
3135         Reviewed by Beth Dakin.
3136
3137         * UIProcess/ios/WKContentViewInteraction.mm:
3138         (-[WKContentView _interactionStartedFromPreviewItemController:]):
3139         (-[WKContentView _interactionStoppedFromPreviewItemController:]):
3140         (-[WKContentView _previewItemController:didDismissPreview:committing:]):
3141         (-[WKContentView _previewItemController:willPresentPreview:forPosition:inSourceView:]): Deleted.
3142         Use interactionStarted/Stopped, which are always called, instead of didDismiss/willPresent,
3143         which are only called if we return a custom view controller from _presentedViewControllerForPreviewItemController.
3144         We continue using didDismiss to inform clients of dismissal because they'll
3145         only care if they customized the view controller.
3146
3147 2015-08-03  Chris Dumez  <cdumez@apple.com>
3148
3149         [WK2][NetworkCache] Do not munmap() on the main thread
3150         https://bugs.webkit.org/show_bug.cgi?id=147569
3151
3152         Reviewed by Geoffrey Garen.
3153
3154         Do not munmap() on the main thread for performance reasons and
3155         consistency as we already make sure to mmap() on another thread.
3156
3157         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
3158         (WebKit::NetworkCache::Data::adoptMap):
3159
3160 2015-08-03  Wenson Hsieh  <wenson_hsieh@apple.com>
3161
3162         Inputs with the autofocus attribute cause the keyboard to not deploy
3163         https://bugs.webkit.org/show_bug.cgi?id=147555
3164         <rdar://problem/22018044>
3165
3166         Reviewed by Andreas Kling.
3167
3168         Upon submitting a form by pressing "Go" on the keyboard, an <input> on the next page with the
3169         autofocus attribute may become non-interactible. When attempting to tap on the input, nothing
3170         seems to happen. This is because the state of WebPage upon invoking WebPage::elementDidFocus
3171         indicates (incorrectly) that the input element is already focused, and therefore hits an early
3172         return. To solve this, we explicitly reset m_hasFocusedDueToUserInteraction upon transitioning
3173         to a new page.
3174
3175         * WebProcess/WebPage/WebPage.cpp:
3176         (WebKit::WebPage::didStartPageTransition): On iOS, resets m_hasFocusedDueToUserInteraction as
3177             well. It was previously thought that this would be handled by blur() called on the assisted
3178             element when submitting a form. However, pressing "Go" on the iOS keyboard is an implicit
3179             submission and does not trigger a blur event.
3180
3181 2015-08-03  Chris Dumez  <cdumez@apple.com>
3182
3183         Fix error handling case in Cache::dumpContentsToFile()
3184         https://bugs.webkit.org/show_bug.cgi?id=147567
3185
3186         Reviewed by Andreas Kling.
3187
3188         Cache::dumpContentsToFile() was expecting openFile() to return 0 in case
3189         of error. However, it returns invalidPlatformFileHandle, which is -1 on
3190         Unix.
3191
3192         * NetworkProcess/cache/NetworkCache.cpp:
3193         (WebKit::NetworkCache::Cache::dumpContentsToFile):
3194
3195 2015-08-03  Chris Dumez  <cdumez@apple.com>
3196
3197         Make sure WebMemorySampler doesn't leak file descriptor
3198         https://bugs.webkit.org/show_bug.cgi?id=147564
3199
3200         Reviewed by Anders Carlsson.
3201
3202         WebMemorySampler was opening files but never closing them.
3203
3204         * Shared/WebMemorySampler.cpp:
3205         (WebKit::WebMemorySampler::stop):
3206         * Shared/WebMemorySampler.h:
3207
3208 2015-08-03  Carlos Garcia Campos  <cgarcia@igalia.com>
3209
3210         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.5 release.
3211
3212         * gtk/NEWS: Add release notes for 2.9.5.
3213
3214 2015-07-27  Matt Rajca  <mrajca@apple.com>
3215
3216         Media Session: inform the UI process when the focused Content media element changes
3217         https://bugs.webkit.org/show_bug.cgi?id=147323
3218
3219         Reviewed by Tim Horton.
3220
3221         * UIProcess/WebPageProxy.cpp:
3222         (WebKit::WebPageProxy::isPlayingMediaDidChange):
3223         * UIProcess/WebPageProxy.h:
3224         * UIProcess/WebPageProxy.messages.in:
3225         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3226         (WebKit::WebChromeClient::focusedContentMediaElementDidChange):
3227         * WebProcess/WebCoreSupport/WebChromeClient.h:
3228
3229 2015-07-31  Chris Dumez  <cdumez@apple.com>
3230
3231         Drop dummy Timer callbacks
3232         https://bugs.webkit.org/show_bug.cgi?id=147516
3233
3234         Reviewed by Alexey Proskuryakov.
3235
3236         Drop dummy Timer callbacks in the code base. A lot of Timer callbacks
3237         do nothing else beside calling a particular method. In such case, we
3238         can use the called method as Timer callback instead.
3239
3240         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3241         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3242         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
3243         (WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired): Deleted.
3244
3245 2015-07-31  Chris Dumez  <cdumez@apple.com>
3246
3247         [WK2][NetworkCache] Drop HTTP method from NetworkCache::Key
3248         https://bugs.webkit.org/show_bug.cgi?id=143348
3249
3250         Reviewed by Antti Koivisto.
3251
3252         Drop HTTP method from NetworkCache::Key as we only cache GET responses
3253         for now. Even when we start caching HEAD responses, we likely will not
3254         want the method to be part of the key because:
3255         - A HEAD response can be used to update the headers of a previously cached response to GET
3256         - A cached GET response may be used to satisfy subsequent HEAD requests
3257
3258         * NetworkProcess/cache/NetworkCache.cpp:
3259         (WebKit::NetworkCache::makeCacheKey):
3260         * NetworkProcess/cache/NetworkCacheKey.cpp:
3261         (WebKit::NetworkCache::Key::Key):
3262         (WebKit::NetworkCache::Key::operator==):
3263         (WebKit::NetworkCache::Key::decode):
3264         (WebKit::NetworkCache::Key::operator=): Deleted.
3265         (WebKit::NetworkCache::Key::computeHash): Deleted.
3266         (WebKit::NetworkCache::Key::encode): Deleted.
3267         * NetworkProcess/cache/NetworkCacheKey.h:
3268         (WebKit::NetworkCache::Key::method): Deleted.
3269
3270 2015-07-31  Chris Dumez  <cdumez@apple.com>
3271
3272         Coalesce concurrent authentication challenges for the same ProtectionSpace
3273         https://bugs.webkit.org/show_bug.cgi?id=147496
3274         <rdar://problem/16839069>
3275
3276         Reviewed by Alexey Proskuryakov.
3277
3278         Coalesce concurrent authentication challenges for the same ProtectionSpace.
3279         Ideally, this would be done in the network layer but short term, this will
3280         make sure the user no longer gets repeating authentication dialogs for the
3281         same protection space.
3282
3283         This gets rid of a long-standing bug in WebKit / Safari where visiting a
3284         site using HTTP authentication would pop up one authentication dialog for
3285         each subresource being loaded from the network (especially when the main
3286         resource is loaded from the cache).
3287
3288         * Shared/Authentication/AuthenticationManager.cpp:
3289         (WebKit::canCoalesceChallenge):
3290         (WebKit::AuthenticationManager::addChallengeToChallengeMap):
3291         (WebKit::AuthenticationManager::shouldCoalesceChallenge):
3292         (WebKit::AuthenticationManager::coalesceChallengesMatching):
3293         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
3294         (WebKit::AuthenticationManager::useCredentialForChallenge):
3295         (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
3296         (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
3297         (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
3298         (WebKit::AuthenticationManager::cancelChallenge):
3299         (WebKit::AuthenticationManager::cancelSingleChallenge):
3300         (WebKit::AuthenticationManager::performDefaultHandling):
3301         (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
3302         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
3303         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
3304         (WebKit::AuthenticationManager::AuthenticationManager): Deleted.
3305         * Shared/Authentication/AuthenticationManager.h:
3306
3307 2015-07-31  Joseph Pecoraro  <pecoraro@apple.com>
3308
3309         Unreviewed parameter name typo fix.
3310
3311         * UIProcess/API/Cocoa/WKPreferences.mm:
3312         (-[WKPreferences _setHiddenPageDOMTimerThrottlingEnabled:]):
3313
3314 2015-07-31  Carlos Garcia Campos  <cgarcia@igalia.com>
3315
3316         [GTK] NPAPI code crashes on Wayland
3317         https://bugs.webkit.org/show_bug.cgi?id=147297
3318
3319         Reviewed by Žan Doberšek.
3320
3321         Do not crete NPAPI plugins when runing on Wayland, since they are
3322         not supported. ENABLE_NETSCAPE_PLUGIN_API option used to be
3323         incompatible with building with the Wayland target, but now that
3324         we allow to build X11 and Wayland targets at the same time, we
3325         need runtime checks to avoid creating NPAPI plugins in Wayland.
3326
3327         * UIProcess/API/gtk/WebKitSettings.cpp:
3328         (webkit_settings_set_enable_plugins): Do not allow to change the
3329         setting when running in Wayland.
3330         * UIProcess/gtk/WebPreferencesGtk.cpp:
3331         (WebKit::WebPreferences::platformInitializeStore): Initialize
3332         EnablePlugins preference to false when running in Wayland.
3333
3334 2015-07-30  Joseph Pecoraro  <pecoraro@apple.com>
3335
3336         LayoutTests/inspector frequently run slow and timeout when run in WebKit2 but not WebKit1
3337         https://bugs.webkit.org/show_bug.cgi?id=147456
3338
3339         Reviewed by Timothy Hatcher.
3340
3341         By default, WebKit2 WebPage's on PLATFORM(COCOA) enabling DOM Timer
3342         throttling. Under testing, this ends up impacting Web Inspector
3343         tests that create their own WKWebView which never gets displayed
3344         and so gets throttled. Disable throttling on the Inspector's view
3345         during testing.
3346
3347         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3348         * UIProcess/API/Cocoa/WKPreferences.mm:
3349         (-[WKPreferences _hiddenPageDOMTimerThrottlingEnabled]):
3350         (-[WKPreferences _setHiddenPageDOMTimerThrottlingEnabled:]):
3351         SPI to toggle DOM timer throttling.
3352
3353         * UIProcess/WebInspectorProxy.cpp:
3354         (WebKit::WebInspectorProxy::createInspectorPage):
3355         * UIProcess/WebInspectorProxy.h:
3356         (WebKit::WebInspectorProxy::isUnderTest):
3357         Provide a way to get if we are under test, and set it before
3358         calling into the platform method.
3359
3360         * UIProcess/mac/WebInspectorProxyMac.mm:
3361         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3362         When testing, disable timer throttling.
3363
3364 2015-07-30  Eric Carlson  <eric.carlson@apple.com>
3365
3366         [iOS] Set AirPlay discovery mode to disabled when page is hidden
3367         https://bugs.webkit.org/show_bug.cgi?id=147455
3368
3369         Reviewed by Enrica Casucci.
3370
3371         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
3372         (-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Set discovery mode to disabled after
3373           the picker has been closed.
3374         (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Ditto.
3375
3376 2015-07-29  Dean Jackson  <dino@apple.com>
3377
3378         Don't use (Details) when exposing SPI
3379         https://bugs.webkit.org/show_bug.cgi?id=147426
3380         <rdar://problem/22062407>
3381
3382         Reviewed by Dan Bernstein.
3383
3384         If we are declaring the interface without any implementation,
3385         we should use class extensions.
3386
3387         * Platform/spi/ios/AssertionServicesSPI.h:
3388         * Platform/spi/ios/CorePDFSPI.h:
3389         * Platform/spi/ios/DataDetectorsUISPI.h:
3390         * Platform/spi/ios/ManagedConfigurationSPI.h:
3391         * Platform/spi/ios/UIKitSPI.h:
3392         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
3393         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
3394         * UIProcess/_WKWebViewPrintFormatter.mm:
3395         * UIProcess/mac/WebPageProxyMac.mm:
3396
3397 2015-07-30  Chris Dumez  <cdumez@apple.com>
3398
3399         [WK2][NetworkCache] Stop closing files on the main thread
3400         https://bugs.webkit.org/show_bug.cgi?id=147410
3401
3402         Reviewed by Andreas Kling.
3403
3404         After r186510, we no longer open cache files on the main thread.
3405         However, we still close them on the main thread. This patch makes
3406         sure we close the files on another thread instead.
3407
3408         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
3409         (WebKit::NetworkCache::IOChannel::IOChannel):
3410
3411 2015-07-30  Simon Fraser  <simon.fraser@apple.com>
3412
3413         Convert Path applier to use std::function
3414         https://bugs.webkit.org/show_bug.cgi?id=147368
3415
3416         Reviewed by Sam Weinig.
3417
3418         Use std::function for Path::apply().
3419
3420         * Shared/WebCoreArgumentCoders.cpp:
3421         (IPC::pathEncodeApplierFunction):
3422         (IPC::ArgumentCoder<Path>::encode):
3423         (IPC::pathPointCountApplierFunction): Deleted.
3424
3425 2015-07-30  Joonghun Park  <jh718.park@samsung.com>
3426
3427         [EFL] Enable IndexedDB based on DatabaseProcess
3428         https://bugs.webkit.org/show_bug.cgi?id=147221
3429
3430         Reviewed by Csaba Osztrogonác.
3431
3432         * DatabaseProcess/efl/DatabaseProcessMainEfl.cpp: Add ecore_init().
3433         Without this call, it leads to crash when launching DatabaseProcess.
3434         * PlatformEfl.cmake: Add missing include_directory.
3435         * Shared/efl/ProcessExecutablePathEfl.cpp:
3436         (WebKit::executablePathOfDatabaseProcess):
3437         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
3438         (WebKit::ProcessLauncher::launchProcess):
3439         * UIProcess/efl/WebProcessPoolEfl.cpp:
3440         (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
3441         Add default path for indexedDB sqlite3 db file.
3442
3443 2015-07-30  Chris Dumez  <cdumez@apple.com>
3444
3445         Minimize children vector capacity changes in PlatformCALayerRemote::recursiveBuildTransaction()
3446         https://bugs.webkit.org/show_bug.cgi?id=147446
3447
3448         Reviewed by Simon Fraser.
3449
3450         Minimize children vector capacity changes in PlatformCALayerRemote::recursiveBuildTransaction()
3451         by leveraging the fact that we know in advance how many layer IDs are going to be added. We
3452         now set the Vector size from the start, instead of clearing it and then growing the vector
3453         capacity when appending the layer IDs one by one.
3454
3455         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3456         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
3457
3458 2015-07-30  Chris Dumez  <cdumez@apple.com>
3459
3460         Mark more classes as fast allocated
3461         https://bugs.webkit.org/show_bug.cgi?id=147440
3462
3463         Reviewed by Sam Weinig.
3464
3465         Mark more classes as fast allocated for performance. We heap-allocate