Unreviewed, rolling out r187812.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-08-04  Chris Dumez  <cdumez@apple.com>
2
3         Unreviewed, rolling out r187812.
4
5         This is not safe
6
7         Reverted changeset:
8
9         "[WK2] Reserve Vector capacity in VectorArgumentCoder<false,
10         T, inlineCapacity>::decode()"
11         https://bugs.webkit.org/show_bug.cgi?id=147619
12         http://trac.webkit.org/changeset/187812
13
14 2015-08-03  Chris Dumez  <cdumez@apple.com>
15
16         [WK2] Reserve Vector capacity in VectorArgumentCoder<false, T, inlineCapacity>::decode()
17         https://bugs.webkit.org/show_bug.cgi?id=147619
18
19         Reviewed by Andreas Kling.
20
21         Reserve Vector capacity in VectorArgumentCoder<false, T, inlineCapacity>::decode()
22         as we know the size of the Vector in advance.
23
24         * Platform/IPC/ArgumentCoders.h:
25
26 2015-08-03  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
27
28         [CoordinatedGraphics] Rearrange uses of USE_COORDINATED_GRAPHICS_MULTIPROCESS
29         https://bugs.webkit.org/show_bug.cgi?id=147256
30
31         Reviewed by Benjamin Poulain.
32
33         Reduce uses of USE_COORDINATED_GRAPHICS_MULTIPROCESS guard in order to fix build
34         breaks when USE_COORDINATED_GRAPHICS_MULTIPROCESS is off. This is first step to switch
35         between multiprocess model to thread model.
36
37         * PlatformEfl.cmake:
38         * Shared/DrawingAreaInfo.h:
39         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
40         (WKViewFindZoomableAreaForRect):
41         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
42         (WebKit::CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy):
43         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
44         (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
45         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
46         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
47         (WebKit::PageViewportController::pageTransitionViewportReady):
48         * UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp:
49         * UIProcess/CoordinatedGraphics/WebView.cpp:
50         * UIProcess/CoordinatedGraphics/WebView.h:
51         * UIProcess/WebPageProxy.cpp:
52         (WebKit::WebPageProxy::commitPageTransitionViewport):
53         * UIProcess/WebPageProxy.h:
54         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
55         (WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):
56         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
57         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
58         * WebProcess/WebPage/DrawingAreaImpl.cpp:
59         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
60         * WebProcess/WebPage/DrawingAreaImpl.h:
61         * WebProcess/WebPage/LayerTreeHost.cpp:
62         (WebKit::LayerTreeHost::create):
63         * WebProcess/WebPage/WebPage.cpp:
64         (WebKit::WebPage::sendViewportAttributesChanged):
65         (WebKit::WebPage::pageDidRequestScroll):
66         * WebProcess/WebPage/WebPage.h:
67         * WebProcess/WebPage/WebPage.messages.in:
68
69 2015-08-03  Matt Rajca  <mrajca@apple.com>
70
71         Media Session: let UI clients query whether a media element is paused
72         https://bugs.webkit.org/show_bug.cgi?id=147588
73
74         Reviewed by Tim Horton.
75
76         Added plumbing to determine if a page's media element is paused.
77
78         * UIProcess/WebPageProxy.cpp:
79         (WebKit::WebPageProxy::isMediaElementPaused):
80         * UIProcess/WebPageProxy.h:
81         * WebProcess/WebPage/WebPage.cpp:
82         (WebKit::WebPage::isMediaElementPaused):
83         * WebProcess/WebPage/WebPage.h:
84         * WebProcess/WebPage/WebPage.messages.in:
85
86 2015-08-03  Chris Dumez  <cdumez@apple.com>
87
88         Make sure error handling code APIUserContentExtensionStore closes open file descriptors
89         https://bugs.webkit.org/show_bug.cgi?id=147562
90
91         Reviewed by Alex Christensen.
92
93         Make sure error handling code APIUserContentExtensionStore closes open
94         file descriptors to avoid leaking them.
95
96         * NetworkProcess/cache/NetworkCacheData.cpp:
97         (WebKit::NetworkCache::adoptAndMapFile):
98         * UIProcess/API/APIUserContentExtensionStore.cpp:
99         (API::compiledToFile):
100
101 2015-08-03  Beth Dakin  <bdakin@apple.com>
102
103         Need WKWebView API to enable/disable link preview
104         https://bugs.webkit.org/show_bug.cgi?id=147573
105         -and corresponding-
106         rdar://problem/22077836
107
108         Reviewed by Dan Bernstein.
109
110         WKView implementation.
111         * UIProcess/API/Cocoa/WKViewPrivate.h:
112
113         New API. Call into WKView to handle Mac.
114         * UIProcess/API/Cocoa/WKWebView.h:
115         * UIProcess/API/Cocoa/WKWebView.mm:
116         (-[WKWebView initWithFrame:configuration:]):
117         (-[WKWebView allowsLinkPreview]):
118         (-[WKWebView setAllowsLinkPreview:]):
119
120         Remove the SPI declaration from WKWebViewPrivate in order to make this API.
121         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
122
123         Handle the Mac side.
124         * UIProcess/API/mac/WKView.mm:
125         (-[WKView viewDidMoveToWindow]):
126         (-[WKView initWithFrame:processPool:configuration:webView:]):
127         (-[WKView allowsBackForwardNavigationGestures]):
128         (-[WKView allowsLinkPreview]):
129         (-[WKView setAllowsLinkPreview:]):
130
131         Don’t register previews when link preview is prevented.
132         * UIProcess/ios/WKContentViewInteraction.mm:
133         (-[WKContentView _registerPreview]):
134
135 2015-08-03  Tim Horton  <timothy_horton@apple.com>
136
137         [iOS] Link previews sometimes don't hide the link highlight
138         https://bugs.webkit.org/show_bug.cgi?id=147585
139         <rdar://problem/22119648>
140
141         Reviewed by Beth Dakin.
142
143         * UIProcess/ios/WKContentViewInteraction.mm:
144         (-[WKContentView _interactionStartedFromPreviewItemController:]):
145         (-[WKContentView _interactionStoppedFromPreviewItemController:]):
146         (-[WKContentView _previewItemController:didDismissPreview:committing:]):
147         (-[WKContentView _previewItemController:willPresentPreview:forPosition:inSourceView:]): Deleted.
148         Use interactionStarted/Stopped, which are always called, instead of didDismiss/willPresent,
149         which are only called if we return a custom view controller from _presentedViewControllerForPreviewItemController.
150         We continue using didDismiss to inform clients of dismissal because they'll
151         only care if they customized the view controller.
152
153 2015-08-03  Chris Dumez  <cdumez@apple.com>
154
155         [WK2][NetworkCache] Do not munmap() on the main thread
156         https://bugs.webkit.org/show_bug.cgi?id=147569
157
158         Reviewed by Geoffrey Garen.
159
160         Do not munmap() on the main thread for performance reasons and
161         consistency as we already make sure to mmap() on another thread.
162
163         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
164         (WebKit::NetworkCache::Data::adoptMap):
165
166 2015-08-03  Wenson Hsieh  <wenson_hsieh@apple.com>
167
168         Inputs with the autofocus attribute cause the keyboard to not deploy
169         https://bugs.webkit.org/show_bug.cgi?id=147555
170         <rdar://problem/22018044>
171
172         Reviewed by Andreas Kling.
173
174         Upon submitting a form by pressing "Go" on the keyboard, an <input> on the next page with the
175         autofocus attribute may become non-interactible. When attempting to tap on the input, nothing
176         seems to happen. This is because the state of WebPage upon invoking WebPage::elementDidFocus
177         indicates (incorrectly) that the input element is already focused, and therefore hits an early
178         return. To solve this, we explicitly reset m_hasFocusedDueToUserInteraction upon transitioning
179         to a new page.
180
181         * WebProcess/WebPage/WebPage.cpp:
182         (WebKit::WebPage::didStartPageTransition): On iOS, resets m_hasFocusedDueToUserInteraction as
183             well. It was previously thought that this would be handled by blur() called on the assisted
184             element when submitting a form. However, pressing "Go" on the iOS keyboard is an implicit
185             submission and does not trigger a blur event.
186
187 2015-08-03  Chris Dumez  <cdumez@apple.com>
188
189         Fix error handling case in Cache::dumpContentsToFile()
190         https://bugs.webkit.org/show_bug.cgi?id=147567
191
192         Reviewed by Andreas Kling.
193
194         Cache::dumpContentsToFile() was expecting openFile() to return 0 in case
195         of error. However, it returns invalidPlatformFileHandle, which is -1 on
196         Unix.
197
198         * NetworkProcess/cache/NetworkCache.cpp:
199         (WebKit::NetworkCache::Cache::dumpContentsToFile):
200
201 2015-08-03  Chris Dumez  <cdumez@apple.com>
202
203         Make sure WebMemorySampler doesn't leak file descriptor
204         https://bugs.webkit.org/show_bug.cgi?id=147564
205
206         Reviewed by Anders Carlsson.
207
208         WebMemorySampler was opening files but never closing them.
209
210         * Shared/WebMemorySampler.cpp:
211         (WebKit::WebMemorySampler::stop):
212         * Shared/WebMemorySampler.h:
213
214 2015-08-03  Carlos Garcia Campos  <cgarcia@igalia.com>
215
216         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.5 release.
217
218         * gtk/NEWS: Add release notes for 2.9.5.
219
220 2015-07-27  Matt Rajca  <mrajca@apple.com>
221
222         Media Session: inform the UI process when the focused Content media element changes
223         https://bugs.webkit.org/show_bug.cgi?id=147323
224
225         Reviewed by Tim Horton.
226
227         * UIProcess/WebPageProxy.cpp:
228         (WebKit::WebPageProxy::isPlayingMediaDidChange):
229         * UIProcess/WebPageProxy.h:
230         * UIProcess/WebPageProxy.messages.in:
231         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
232         (WebKit::WebChromeClient::focusedContentMediaElementDidChange):
233         * WebProcess/WebCoreSupport/WebChromeClient.h:
234
235 2015-07-31  Chris Dumez  <cdumez@apple.com>
236
237         Drop dummy Timer callbacks
238         https://bugs.webkit.org/show_bug.cgi?id=147516
239
240         Reviewed by Alexey Proskuryakov.
241
242         Drop dummy Timer callbacks in the code base. A lot of Timer callbacks
243         do nothing else beside calling a particular method. In such case, we
244         can use the called method as Timer callback instead.
245
246         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
247         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
248         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
249         (WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired): Deleted.
250
251 2015-07-31  Chris Dumez  <cdumez@apple.com>
252
253         [WK2][NetworkCache] Drop HTTP method from NetworkCache::Key
254         https://bugs.webkit.org/show_bug.cgi?id=143348
255
256         Reviewed by Antti Koivisto.
257
258         Drop HTTP method from NetworkCache::Key as we only cache GET responses
259         for now. Even when we start caching HEAD responses, we likely will not
260         want the method to be part of the key because:
261         - A HEAD response can be used to update the headers of a previously cached response to GET
262         - A cached GET response may be used to satisfy subsequent HEAD requests
263
264         * NetworkProcess/cache/NetworkCache.cpp:
265         (WebKit::NetworkCache::makeCacheKey):
266         * NetworkProcess/cache/NetworkCacheKey.cpp:
267         (WebKit::NetworkCache::Key::Key):
268         (WebKit::NetworkCache::Key::operator==):
269         (WebKit::NetworkCache::Key::decode):
270         (WebKit::NetworkCache::Key::operator=): Deleted.
271         (WebKit::NetworkCache::Key::computeHash): Deleted.
272         (WebKit::NetworkCache::Key::encode): Deleted.
273         * NetworkProcess/cache/NetworkCacheKey.h:
274         (WebKit::NetworkCache::Key::method): Deleted.
275
276 2015-07-31  Chris Dumez  <cdumez@apple.com>
277
278         Coalesce concurrent authentication challenges for the same ProtectionSpace
279         https://bugs.webkit.org/show_bug.cgi?id=147496
280         <rdar://problem/16839069>
281
282         Reviewed by Alexey Proskuryakov.
283
284         Coalesce concurrent authentication challenges for the same ProtectionSpace.
285         Ideally, this would be done in the network layer but short term, this will
286         make sure the user no longer gets repeating authentication dialogs for the
287         same protection space.
288
289         This gets rid of a long-standing bug in WebKit / Safari where visiting a
290         site using HTTP authentication would pop up one authentication dialog for
291         each subresource being loaded from the network (especially when the main
292         resource is loaded from the cache).
293
294         * Shared/Authentication/AuthenticationManager.cpp:
295         (WebKit::canCoalesceChallenge):
296         (WebKit::AuthenticationManager::addChallengeToChallengeMap):
297         (WebKit::AuthenticationManager::shouldCoalesceChallenge):
298         (WebKit::AuthenticationManager::coalesceChallengesMatching):
299         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
300         (WebKit::AuthenticationManager::useCredentialForChallenge):
301         (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
302         (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
303         (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
304         (WebKit::AuthenticationManager::cancelChallenge):
305         (WebKit::AuthenticationManager::cancelSingleChallenge):
306         (WebKit::AuthenticationManager::performDefaultHandling):
307         (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
308         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
309         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
310         (WebKit::AuthenticationManager::AuthenticationManager): Deleted.
311         * Shared/Authentication/AuthenticationManager.h:
312
313 2015-07-31  Joseph Pecoraro  <pecoraro@apple.com>
314
315         Unreviewed parameter name typo fix.
316
317         * UIProcess/API/Cocoa/WKPreferences.mm:
318         (-[WKPreferences _setHiddenPageDOMTimerThrottlingEnabled:]):
319
320 2015-07-31  Carlos Garcia Campos  <cgarcia@igalia.com>
321
322         [GTK] NPAPI code crashes on Wayland
323         https://bugs.webkit.org/show_bug.cgi?id=147297
324
325         Reviewed by Žan Doberšek.
326
327         Do not crete NPAPI plugins when runing on Wayland, since they are
328         not supported. ENABLE_NETSCAPE_PLUGIN_API option used to be
329         incompatible with building with the Wayland target, but now that
330         we allow to build X11 and Wayland targets at the same time, we
331         need runtime checks to avoid creating NPAPI plugins in Wayland.
332
333         * UIProcess/API/gtk/WebKitSettings.cpp:
334         (webkit_settings_set_enable_plugins): Do not allow to change the
335         setting when running in Wayland.
336         * UIProcess/gtk/WebPreferencesGtk.cpp:
337         (WebKit::WebPreferences::platformInitializeStore): Initialize
338         EnablePlugins preference to false when running in Wayland.
339
340 2015-07-30  Joseph Pecoraro  <pecoraro@apple.com>
341
342         LayoutTests/inspector frequently run slow and timeout when run in WebKit2 but not WebKit1
343         https://bugs.webkit.org/show_bug.cgi?id=147456
344
345         Reviewed by Timothy Hatcher.
346
347         By default, WebKit2 WebPage's on PLATFORM(COCOA) enabling DOM Timer
348         throttling. Under testing, this ends up impacting Web Inspector
349         tests that create their own WKWebView which never gets displayed
350         and so gets throttled. Disable throttling on the Inspector's view
351         during testing.
352
353         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
354         * UIProcess/API/Cocoa/WKPreferences.mm:
355         (-[WKPreferences _hiddenPageDOMTimerThrottlingEnabled]):
356         (-[WKPreferences _setHiddenPageDOMTimerThrottlingEnabled:]):
357         SPI to toggle DOM timer throttling.
358
359         * UIProcess/WebInspectorProxy.cpp:
360         (WebKit::WebInspectorProxy::createInspectorPage):
361         * UIProcess/WebInspectorProxy.h:
362         (WebKit::WebInspectorProxy::isUnderTest):
363         Provide a way to get if we are under test, and set it before
364         calling into the platform method.
365
366         * UIProcess/mac/WebInspectorProxyMac.mm:
367         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
368         When testing, disable timer throttling.
369
370 2015-07-30  Eric Carlson  <eric.carlson@apple.com>
371
372         [iOS] Set AirPlay discovery mode to disabled when page is hidden
373         https://bugs.webkit.org/show_bug.cgi?id=147455
374
375         Reviewed by Enrica Casucci.
376
377         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
378         (-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Set discovery mode to disabled after
379           the picker has been closed.
380         (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Ditto.
381
382 2015-07-29  Dean Jackson  <dino@apple.com>
383
384         Don't use (Details) when exposing SPI
385         https://bugs.webkit.org/show_bug.cgi?id=147426
386         <rdar://problem/22062407>
387
388         Reviewed by Dan Bernstein.
389
390         If we are declaring the interface without any implementation,
391         we should use class extensions.
392
393         * Platform/spi/ios/AssertionServicesSPI.h:
394         * Platform/spi/ios/CorePDFSPI.h:
395         * Platform/spi/ios/DataDetectorsUISPI.h:
396         * Platform/spi/ios/ManagedConfigurationSPI.h:
397         * Platform/spi/ios/UIKitSPI.h:
398         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
399         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
400         * UIProcess/_WKWebViewPrintFormatter.mm:
401         * UIProcess/mac/WebPageProxyMac.mm:
402
403 2015-07-30  Chris Dumez  <cdumez@apple.com>
404
405         [WK2][NetworkCache] Stop closing files on the main thread
406         https://bugs.webkit.org/show_bug.cgi?id=147410
407
408         Reviewed by Andreas Kling.
409
410         After r186510, we no longer open cache files on the main thread.
411         However, we still close them on the main thread. This patch makes
412         sure we close the files on another thread instead.
413
414         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
415         (WebKit::NetworkCache::IOChannel::IOChannel):
416
417 2015-07-30  Simon Fraser  <simon.fraser@apple.com>
418
419         Convert Path applier to use std::function
420         https://bugs.webkit.org/show_bug.cgi?id=147368
421
422         Reviewed by Sam Weinig.
423
424         Use std::function for Path::apply().
425
426         * Shared/WebCoreArgumentCoders.cpp:
427         (IPC::pathEncodeApplierFunction):
428         (IPC::ArgumentCoder<Path>::encode):
429         (IPC::pathPointCountApplierFunction): Deleted.
430
431 2015-07-30  Joonghun Park  <jh718.park@samsung.com>
432
433         [EFL] Enable IndexedDB based on DatabaseProcess
434         https://bugs.webkit.org/show_bug.cgi?id=147221
435
436         Reviewed by Csaba Osztrogonác.
437
438         * DatabaseProcess/efl/DatabaseProcessMainEfl.cpp: Add ecore_init().
439         Without this call, it leads to crash when launching DatabaseProcess.
440         * PlatformEfl.cmake: Add missing include_directory.
441         * Shared/efl/ProcessExecutablePathEfl.cpp:
442         (WebKit::executablePathOfDatabaseProcess):
443         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
444         (WebKit::ProcessLauncher::launchProcess):
445         * UIProcess/efl/WebProcessPoolEfl.cpp:
446         (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
447         Add default path for indexedDB sqlite3 db file.
448
449 2015-07-30  Chris Dumez  <cdumez@apple.com>
450
451         Minimize children vector capacity changes in PlatformCALayerRemote::recursiveBuildTransaction()
452         https://bugs.webkit.org/show_bug.cgi?id=147446
453
454         Reviewed by Simon Fraser.
455
456         Minimize children vector capacity changes in PlatformCALayerRemote::recursiveBuildTransaction()
457         by leveraging the fact that we know in advance how many layer IDs are going to be added. We
458         now set the Vector size from the start, instead of clearing it and then growing the vector
459         capacity when appending the layer IDs one by one.
460
461         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
462         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
463
464 2015-07-30  Chris Dumez  <cdumez@apple.com>
465
466         Mark more classes as fast allocated
467         https://bugs.webkit.org/show_bug.cgi?id=147440
468
469         Reviewed by Sam Weinig.
470
471         Mark more classes as fast allocated for performance. We heap-allocate
472         objects of those types throughout the code base.
473
474         * NetworkProcess/cache/NetworkCacheStorage.cpp:
475         * NetworkProcess/cache/NetworkCacheStorage.h:
476         * Platform/IPC/MessageRecorder.h:
477         * Platform/mac/LayerHostingContext.h:
478
479 2015-07-29  Andy VanWagoner  <thetalecrafter@gmail.com>
480
481         Implement basic types for ECMAScript Internationalization API
482         https://bugs.webkit.org/show_bug.cgi?id=146926
483
484         Reviewed by Benjamin Poulain.
485
486         * Configurations/FeatureDefines.xcconfig: Enabled INTL.
487
488 2015-07-29  Chris Dumez  <cdumez@apple.com>
489
490         [WK2] Use FastMalloc in IPC::MessageDecoder
491         https://bugs.webkit.org/show_bug.cgi?id=147425
492
493         Reviewed by Sam Weinig.
494
495         Use FastMalloc in IPC::MessageDecoder instead of system malloc, for
496         performance reasons and consistency.
497
498         * Platform/IPC/ArgumentDecoder.cpp:
499         (IPC::ArgumentDecoder::~ArgumentDecoder):
500         (IPC::ArgumentDecoder::initialize):
501
502 2015-07-29  Enrica Casucci  <enrica@apple.com>
503
504         Preview should not start if touch handler prevents default.
505         https://bugs.webkit.org/show_bug.cgi?id=147423
506         rdar://problem/22061043
507
508         Reviewed by Tim Horton.
509
510         We need to check if _highlightLongPressCanClick has not been reset before
511         we allow the preview. It can be reset by a touch handler preventing default.
512
513         * UIProcess/ios/WKContentViewInteraction.mm:
514         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
515
516 2015-07-29  Chris Fleizach  <cfleizach@apple.com>
517
518         AX: iOS: VoiceOver hangs indefinitely when an JS alert appears
519         https://bugs.webkit.org/show_bug.cgi?id=147386
520
521         Reviewed by Dan Bernstein.
522
523         Make sure this also builds on iOS8.
524
525         * Platform/IPC/mac/ConnectionMac.mm:
526
527 2015-07-29  Michael Catanzaro  <mcatanzaro@igalia.com>
528
529         [Seccomp] Further improvements to default web process policy
530         https://bugs.webkit.org/show_bug.cgi?id=142987
531
532         Provide various helper functions to allow more flexible construction of
533         filesystem access policies.
534
535         Reviewed by Žan Doberšek.
536
537         Improve the policy. Also, remove ifdefs to reduce potential for breakage in non-default
538         configurations.
539
540         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
541         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
542
543 2015-07-29  Chris Dumez  <cdumez@apple.com>
544
545         Avoid unnecessarily constructing PlatformMediaSessionManager on Document destruction
546         https://bugs.webkit.org/show_bug.cgi?id=147398
547
548         Reviewed by Jer Noble.
549
550         Only call PlatformMediaSessionManager::stopAllMediaPlaybackForProcess() in
551         destructors if an PlatformMediaSessionManager instance already exists, to 
552         avoid constructing one unecessarily at that point.
553
554         * WebProcess/WebProcess.cpp:
555         (WebKit::WebProcess::didClose):
556
557 2015-07-28  Carlos Garcia Campos  <cgarcia@igalia.com>
558
559         [GTK] Add API to set the maximum number of web processes per WebKitWebContext
560         https://bugs.webkit.org/show_bug.cgi?id=147108
561
562         Reviewed by Gustavo Noronha Silva.
563
564         * UIProcess/API/gtk/WebKitWebContext.cpp:
565         (webkit_web_context_set_web_process_count_limit):
566         (webkit_web_context_get_web_process_count_limit):
567         * UIProcess/API/gtk/WebKitWebContext.h:
568         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
569
570 2015-07-28  Carlos Garcia Campos  <cgarcia@igalia.com>
571
572         [GTK] Fix empty space in popup menus when first item is selected
573         https://bugs.webkit.org/show_bug.cgi?id=147358
574
575         Reviewed by Martin Robinson.
576
577         It happens when one of the first elements are selected, because we
578         try to center the current selection on the combo element. When the
579         menu is large enough to make the element centered we need to leave
580         empty space at the beginning. This can be fixed by not scrolling
581         to center the selected item when it's above the combo
582         element. This ensure the selected item will always be visible,
583         even if it's not centered. If the selected item is already
584         centered or below the combo element, the behaviour doesn't change
585         and we scroll to center it.
586
587         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
588         (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
589
590 2015-07-28  Jincheol Jo  <jincheol.jo@navercorp.com>
591
592         [EFL] Fix typos in ewk_extension.cpp
593         https://bugs.webkit.org/show_bug.cgi?id=147396
594
595         Reviewed by Gyuyoung Kim.
596
597         Fix from toEwkExtendion to toEwkExtension.
598
599         * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
600         (toEwkExtension):
601         (EwkExtension::didCreatePage):
602         (EwkExtension::willDestroyPage):
603         (EwkExtension::didReceiveMessage):
604         (toEwkExtendion): Deleted.
605
606 2015-07-28  Alexey Proskuryakov  <ap@apple.com>
607
608         Clean up usesAsyncCallbacks handling in ResourceHandle
609         https://bugs.webkit.org/show_bug.cgi?id=147342
610
611         Reviewed by Darin Adler.
612
613         Update for a renaming in WebCore.
614
615         * NetworkProcess/NetworkResourceLoader.cpp:
616         (WebKit::NetworkResourceLoader::cleanup):
617         * Shared/Downloads/soup/DownloadSoup.cpp:
618         (WebKit::Download::platformInvalidate):
619
620 2015-07-28  Chris Fleizach  <cfleizach@apple.com>
621
622         AX: iOS: VoiceOver hangs indefinitely when an JS alert appears
623         https://bugs.webkit.org/show_bug.cgi?id=147386
624
625         Reviewed by Anders Carlsson.
626
627         Support the iOS platform API to notify accessibility clients when the WebProcess is about to suspend (because of some modal dialog).
628         Luckily, we did all the hardwork for OSX a few years ago to support this paradigm.         
629
630         * Platform/IPC/mac/ConnectionMac.mm:
631         (IPC::AccessibilityProcessSuspendedNotification):
632         (IPC::Connection::willSendSyncMessage):
633         (IPC::Connection::didReceiveSyncReply):
634
635 2015-07-28  Yusuke Suzuki  <utatane.tea@gmail.com>
636
637         [ES6] Add ENABLE_ES6_MODULES compile time flag with the default value "false"
638         https://bugs.webkit.org/show_bug.cgi?id=147350
639
640         Reviewed by Sam Weinig.
641
642         * Configurations/FeatureDefines.xcconfig:
643
644 2015-07-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
645
646         [iOS] REGRESSION(r168075): Fullscreen web video doesn't pause on screen lock
647         https://bugs.webkit.org/show_bug.cgi?id=147269
648
649         Reviewed by Andreas Kling.
650
651         Media elements should pause when the application is going to EnterBackground
652         under lock regardless whether it is in full screen or not.
653
654         * Platform/spi/ios/UIKitSPI.h: Forward declare [UIApplication isSuspendedUnderLock].
655
656         * UIProcess/ios/WebPageProxyIOS.mm:
657         (WebKit::WebPageProxy::applicationDidEnterBackground):
658         [UIApp isSuspendedUnderLock] can only be called in the UIProcess. We need
659         to call it here and pass it to the WebPage in the WebProcess as part of the
660         ApplicationDidEnterBackground message.
661         
662         * WebProcess/WebPage/WebPage.h:
663         * WebProcess/WebPage/WebPage.messages.in: Add the new parameter:
664         'isSuspendedUnderLock' to the ApplicationDidEnterBackground message.
665         
666         * WebProcess/WebPage/ios/WebPageIOS.mm:
667         (WebKit::WebPage::applicationDidEnterBackground): On iOS, the WebPage needs
668         to notify the MediaSessionManagerIOS that it received the message 
669         ApplicationDidEnterBackground.
670
671 2015-07-28  Yongjun Zhang  <yongjun_zhang@apple.com>
672
673         Bounds in InteractionInformationAtPosition should be always in main frame coordinate space.
674         https://bugs.webkit.org/show_bug.cgi?id=147372
675
676         When we prepare the bounds for InteractionInformationAtPosition, we should convert the rect to
677         main frame space since WKContent in UIProcess expects it to be in the web view space.
678
679         Reviewed by Tim Horton.
680
681         * WebProcess/WebPage/ios/WebPageIOS.mm:
682         (WebKit::WebPage::getPositionInformation): Convert the bounding rect to main frame space if the element is inside a sub-frame.
683
684 2015-07-27  Simon Fraser  <simon.fraser@apple.com>
685
686         PathApplierFunction should take a reference to a PathElement
687         https://bugs.webkit.org/show_bug.cgi?id=147337
688
689         Reviewed by Dan Bates.
690
691         Convert PathApplierFunction to take a const PathElement&, since it can never be null.
692
693         * Shared/WebCoreArgumentCoders.cpp:
694         (IPC::pathPointCountApplierFunction):
695         (IPC::pathEncodeApplierFunction):
696
697 2015-07-28  Jer Noble  <jer.noble@apple.com>
698
699         [iOS] Notify fullscreen controller in UIProcess whether external playback is allowed
700         https://bugs.webkit.org/show_bug.cgi?id=147343
701
702         Reviewed by Brady Eidson.
703
704         Pass the boolean property wirelessVideoPlaybackDisabled across the UIProcess/WebProcess boundary.
705
706         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
707         (WebKit::WebVideoFullscreenManagerProxy::setWirelessVideoPlaybackDisabled):
708         * WebProcess/ios/WebVideoFullscreenManager.mm:
709         (WebKit::WebVideoFullscreenInterfaceContext::setWirelessVideoPlaybackDisabled):
710         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
711         (WebKit::WebVideoFullscreenManager::setWirelessVideoPlaybackDisabled):
712
713 2015-07-28  Carlos Garcia Campos  <cgarcia@igalia.com>
714
715         [GTK] Use fastMalloc instead of g_slice
716         https://bugs.webkit.org/show_bug.cgi?id=147357
717
718         Reviewed by Sergio Villar Senin.
719
720         The use of g_slice is no longer encouraged by glib developers.
721
722         * UIProcess/API/gtk/WebKitCredential.cpp:
723         (webkitCredentialCreate):
724         (webkit_credential_free):
725         * UIProcess/API/gtk/WebKitJavascriptResult.cpp:
726         (webkitJavascriptResultCreate):
727         (webkit_javascript_result_unref):
728         * UIProcess/API/gtk/WebKitMimeInfo.cpp:
729         (webkitMimeInfoCreate):
730         (webkit_mime_info_unref):
731         * UIProcess/API/gtk/WebKitNavigationAction.cpp:
732         (webkitNavigationActionCreate):
733         (webkit_navigation_action_copy):
734         (webkit_navigation_action_free):
735         * UIProcess/API/gtk/WebKitPrivate.h:
736         * UIProcess/API/gtk/WebKitScriptDialog.cpp:
737         (webkitScriptDialogCopy):
738         (webkitScriptDialogFree):
739         * UIProcess/API/gtk/WebKitUserContent.cpp:
740         (webkit_user_style_sheet_unref):
741         (webkit_user_style_sheet_new):
742         (webkit_user_script_unref):
743         (webkit_user_script_new):
744
745 2015-07-27  Dan Bernstein  <mitz@apple.com>
746
747         [iOS] REGRESSION (r187376): Form editing buttons are missing from the Shortcut Bar
748         https://bugs.webkit.org/show_bug.cgi?id=147351
749
750         Reviewed by Adele Peterson.
751
752         We were relying on -[WKContentView inputAccessoryView] getting called to initialize the form
753         accessory view, even when that method would always return nil, as it does on iPad. After
754         r187376, that method changed to initializing the view only when returning it, which caused
755         this bug.
756
757         * UIProcess/ios/WKContentViewInteraction.mm:
758         (-[WKContentView _displayFormNodeInputView]): Call the new -_ensureFormAccessoryView from
759         here, when we are going to need the view.
760         (-[WKContentView _ensureFormAccessoryView]): Moved initialization code from
761         -inputAccessoryView here, and removed outdated +instancesRespondToSelector: check.
762         (-[WKContentView inputAccessoryView]): Now calls through -formAccessoryView.
763         (-[WKContentView formAccessoryView]): Added call to -_ensureFormAccessoryView here.
764
765 2015-07-27  Andreas Kling  <akling@apple.com>
766
767         WebsiteDataStore should clean up its storage in the network process when destroyed.
768         <https://webkit.org/b/147349>
769         <rdar://problem/21838764>
770
771         Reviewed by Darin Adler.
772
773         Have ~WebsiteDataStore() send a DestroyPrivateBrowsingSession message to all networking processes
774         for ephemeral sessions. This plugs a NetworkStorageSession leak that could retain a large
775         CFNetwork object graph.
776
777         This complements r187115 which did the same for network process storage owned by
778         API::Session objects.
779
780         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
781         (WebKit::WebsiteDataStore::~WebsiteDataStore):
782
783 2015-07-27  Tim Horton  <timothy_horton@apple.com>
784
785         First in-window viewStateChange synchronously blocks despite not previously being in-window
786         https://bugs.webkit.org/show_bug.cgi?id=147344
787         <rdar://problem/22021772>
788
789         Reviewed by Simon Fraser.
790
791         * UIProcess/WebPageProxy.cpp:
792         (WebKit::WebPageProxy::updateViewState):
793         (WebKit::WebPageProxy::dispatchViewStateChange):
794         The whole point of m_viewWasEverInWindow was so that we would not
795         synchronously wait when a view was added to a window for the first time,
796         only all subsequent times.
797
798         However, since m_viewWasEverInWindow was being set *before* being
799         checked in dispatchViewStateChange, we were always blocking. This is
800         a huge waste of main-thread time, because there's no reason to wait
801         for the first paint if you've never seen the view before (and shouldn't
802         expect it to have content).
803
804         Instead, set the flag after dispatching a view state change, so it becomes
805         "have we ever sent a view state with IsInWindow set" instead.
806
807 2015-07-27  Tim Horton  <timothy_horton@apple.com>
808
809         [iOS] Long press or link click can sometimes trigger during/after a preview
810         https://bugs.webkit.org/show_bug.cgi?id=147338
811         <rdar://problem/22020770>
812
813         Reviewed by Enrica Casucci.
814
815         * UIProcess/ios/WKContentViewInteraction.mm:
816         (-[WKContentView _longPressRecognized:]):
817         Bail if we're previewing.
818
819         (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
820         (-[WKContentView _presentedViewControllerForPreviewItemController:]):
821         Always avoid allowing clicks and start interaction when previewing a link.
822
823 2015-07-27  Andreas Kling  <akling@apple.com>
824
825         [iOS] Occasional crashes in WebPage::elementDidBlur()'s async block.
826         <https://webkit.org/b/147281>
827         <rdar://problem/21701858>
828
829         Reviewed by Anders Carlsson.
830
831         Protect the WebPage object until the dispatch_async block has finished.
832         I have no way to repro this, but there's evidence of some crashing here.
833
834         * WebProcess/WebPage/ios/WebPageIOS.mm:
835         (WebKit::WebPage::elementDidBlur):
836
837 2015-07-27  Michael Catanzaro  <mcatanzaro@igalia.com>
838
839         [Seccomp] Set appropriate filters when trapping syscalls by default
840         https://bugs.webkit.org/show_bug.cgi?id=142983
841
842         If we trap syscalls by default, we must not set separate filters to trap
843         anything here, since it will fail causing us to crash.
844
845         But also, there are some things we must allow unconditionally even when
846         trapping by default. sigreturn, obviously. Also, let's whitelist brk
847         here instead of in platform-specific code.
848
849         Reviewed by Žan Doberšek.
850
851         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
852         (WebKit::SeccompBroker::launchProcess): Don't trap sigprocmask or sigaction unless allow is
853         the default action. Also, allow sigreturn and brk is allow is not the default.
854         * Shared/linux/SeccompFilters/SeccompFilters.cpp: Added
855         (WebKit::SeccompFilters::defaultAction):
856         * Shared/linux/SeccompFilters/SeccompFilters.h: Added defaultAction
857
858 2015-07-27  Matthew Daiter  <mdaiter@apple.com>
859
860         Renamed duplicate vectors inside UserMediaPermissionRequestProxy
861         https://bugs.webkit.org/show_bug.cgi?id=147321
862         <rdar://problem/22011290>
863
864         Reviewed by Eric Carlson.
865
866         * UIProcess/UserMediaPermissionRequestProxy.cpp:
867         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
868         * UIProcess/UserMediaPermissionRequestProxy.h:
869         (WebKit::UserMediaPermissionRequestProxy::videoDeviceUIDs):
870         (WebKit::UserMediaPermissionRequestProxy::audioDeviceUIDs):
871         (WebKit::UserMediaPermissionRequestProxy::deviceUIDsVideo): Deleted.
872         (WebKit::UserMediaPermissionRequestProxy::deviceUIDsAudio): Deleted.
873         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
874         (WebKit::UserMediaPermissionRequestManager::startRequest):
875
876 2015-07-27  Carlos Garcia Campos  <cgarcia@igalia.com>
877
878         [GTK] Pass a GstInstallPluginsContext to gst_install_plugins_async
879         https://bugs.webkit.org/show_bug.cgi?id=147103
880
881         Reviewed by Philippe Normand.
882
883         This allows PackageKit to properly position the window and make it
884         transient to the web view window.
885
886         * UIProcess/API/gtk/PageClientImpl.cpp:
887         (WebKit::PageClientImpl::setCursor): Disambiguate Cursor now that
888         we include gtkx.h.
889         (WebKit::PageClientImpl::createGstInstallPluginsContext): Create a
890         new GstInstallPluginsContext and set the web view window XID when
891         running on X11.
892         * UIProcess/API/gtk/PageClientImpl.h:
893         * UIProcess/PageClient.h:
894         * UIProcess/efl/WebViewEfl.h:
895         * UIProcess/gstreamer/WebPageProxyGStreamer.cpp:
896         (WebKit::WebPageProxy::requestInstallMissingMediaPlugins): Use
897         PageClient::createGstInstallPluginsContext() to create a new
898         GstInstallPluginsContext and pass it to gst_install_plugins_async().
899
900 2015-07-26  Gwang Yoon Hwang  <yoon@igalia.com>
901
902         [ThreadedCompositor] Unreviewed build fix after r186059
903         https://bugs.webkit.org/show_bug.cgi?id=147315
904
905         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
906         (WebKit::ThreadedCompositor::glContext):
907         Explicitly cast u_int64 to GLNativeWindowType.
908         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
909         (WebKit::ThreadedCoordinatedLayerTreeHost::create):
910         Update declaration to match with modified definition.
911
912
913 2015-07-26  Chris Dumez  <cdumez@apple.com>
914
915         [WK2][iOS] WebContent process main thread should have fixed priority
916         https://bugs.webkit.org/show_bug.cgi?id=147313
917         <rdar://problem/22003112>
918
919         Reviewed by Darin Adler.
920
921         WebContent process main thread should have fixed priority on iOS 9.
922         Priority decay regresses PLT and fixing the main thread's priority
923         gives up a ~3% progression on warm PLT (tested on iPhone 5s).
924
925         * WebProcess/cocoa/WebProcessCocoa.mm:
926         (WebKit::WebProcess::platformInitializeWebProcess):
927
928 2015-07-26  Dan Bernstein  <mitz@apple.com>
929
930         Suppressed an Xcode 7 warning about including a nib in an iOS build product.
931
932         * Configurations/BaseLegacyProcess.xcconfig: Exclude xib files on iOS.
933         * Configurations/BaseXPCService.xcconfig: Ditto.
934
935 2015-07-24  Ryosuke Niwa  <rniwa@webkit.org>
936
937         iOS 8 build fix attempt after r187215.
938
939         * UIProcess/API/Cocoa/WKWebView.mm:
940         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): Deleted.
941
942 2015-07-24  Yongjun Zhang  <yongjun_zhang@apple.com>
943
944         Don't create UIWebFormAccessory if we don't require accessory view.
945         https://bugs.webkit.org/show_bug.cgi?id=147283
946
947         Don't try to intialize _formAccessoryView if requiresAccessoryView returns false since we don't
948         need it yet.
949
950         Reviewed by Dan Bernstein.
951
952         * UIProcess/ios/WKContentViewInteraction.mm:
953         (-[WKContentView inputAccessoryView]):
954
955 2015-07-24  Anders Carlsson  <andersca@apple.com>
956
957         WKWebsiteDataStore remove methods don't properly delete cookies
958         https://bugs.webkit.org/show_bug.cgi?id=147282
959         rdar://problem/21948230
960
961         Reviewed by Sam Weinig.
962
963         * NetworkProcess/NetworkProcess.cpp:
964         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
965         Call deleteCookiesForHostnames instead of iterating over each hostname.
966
967         * WebProcess/Cookies/WebCookieManager.cpp:
968         (WebKit::WebCookieManager::deleteCookiesForHostname):
969         Call deleteCookiesForHostnames.
970
971 2015-07-24  Anders Carlsson  <andersca@apple.com>
972
973         Networking process crash in NetworkConnectionToWebProcess::convertMainResourceLoadToDownload while attempting to download a blob
974         https://bugs.webkit.org/show_bug.cgi?id=147276
975         rdar://problem/21423353
976
977         Reviewed by Andreas Kling.
978
979         We currently don't support downloading blobs, so for now just bail if we encounter a null loader inside
980         convertMainResourceLoadToDownload (which happens when trying to download a blob URL).
981
982         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
983         (WebKit::NetworkConnectionToWebProcess::didCleanupResourceLoader):
984         Rewrite the assertion to be more clear - it's fine to do an extra hash lookup in debug builds.
985
986         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
987         Bail if loader is null.
988
989 2015-07-24  Yusuke Suzuki  <utatane.tea@gmail.com>
990
991         Remove runtime flags for symbols
992         https://bugs.webkit.org/show_bug.cgi?id=147246
993
994         Reviewed by Alex Christensen.
995
996         * UIProcess/API/C/WKPreferencesRefPrivate.h:
997         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
998
999 2015-07-24  Yusuke Suzuki  <utatane.tea@gmail.com>
1000
1001         Object.getOwnPropertySymbols on large list takes very long
1002         https://bugs.webkit.org/show_bug.cgi?id=146137
1003
1004         Reviewed by Mark Lam.
1005
1006         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1007         (WebKit::NPJSObject::enumerate):
1008
1009 2015-07-24  Simon Fraser  <simon.fraser@apple.com>
1010
1011         Recode.net gets into a continual resize loop in split fullscreen
1012         https://bugs.webkit.org/show_bug.cgi?id=147266
1013         rdar://problem/21409047
1014
1015         Reviewed by Tim Horton.
1016         
1017         In split fullscreen, we use fixed layout and scale to shrink pages down to
1018         fit a given width. This is re-evaluated every time the document width changes.
1019         However some pages, like recode.net, end up continually resizing because
1020         when laid out unconstrained they use a narrower width than when laid out with
1021         a fixed layout size. In fixed layout, they actually use more width than the fixed
1022         layout size.
1023         
1024         Detect and break this cycle by just not re-scaling when we've done one fixed layout,
1025         and the document is now taking more width than the fixed layout width.
1026
1027         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1028         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
1029
1030 2015-07-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1031
1032         [GStreamer] Crashes during plugin installation
1033         https://bugs.webkit.org/show_bug.cgi?id=144099
1034
1035         Reviewed by Philippe Normand.
1036
1037         Move the missing plugins installation to the UI process, ensuring
1038         there's a single installer running and cancelling the request when
1039         the page is closed or the media player is deleted.
1040
1041         * PlatformEfl.cmake: Add new files to compilation.
1042         * PlatformGTK.cmake: Ditto.
1043         * UIProcess/WebPageProxy.h:
1044         * UIProcess/WebPageProxy.messages.in: Add
1045         RequestInstallMissingMediaPlugins message.
1046         * UIProcess/gstreamer/WebPageProxyGStreamer.cpp: Added.
1047         (WebKit::WebPageProxy::requestInstallMissingMediaPlugins): Call
1048         gst_install_plugins_async() and send
1049         DidEndRequestInstallMissingMediaPlugins message back to the web
1050         process when done.
1051         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1052         (WebKit::WebChromeClient::requestInstallMissingMediaPlugins): Call
1053         WebPage::requestInstallMissingMediaPlugins().
1054         * WebProcess/WebCoreSupport/WebChromeClient.h:
1055         * WebProcess/WebPage/WebPage.cpp:
1056         (WebKit::WebPage::close): Invalidate the install missing plugins
1057         request callback.
1058         * WebProcess/WebPage/WebPage.h:
1059         * WebProcess/WebPage/WebPage.messages.in: Add
1060         DidEndRequestInstallMissingMediaPlugins message.
1061         * WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp: Added.
1062         (WebKit::WebPage::requestInstallMissingMediaPlugins): Send
1063         RequestInstallMissingMediaPlugins to the UI process or complete
1064         the request early if there's already a request in progress.
1065         (WebKit::WebPage::didEndRequestInstallMissingMediaPlugins):
1066         Complete the request.
1067
1068 2015-07-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1069
1070         Unreviewed. Fix the build with MEDIA_STREAM disabled after r187282.
1071
1072         RealtimeMediaSource is only defined when MEDIA_STREAM is enabled.
1073
1074         * UIProcess/UserMediaPermissionRequestProxy.cpp:
1075         * UIProcess/UserMediaPermissionRequestProxy.h:
1076
1077 2015-07-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1078
1079         REGRESSION(r187100): [GTK] ASSERTION FAILED: Attempt to access post layout data before receiving it when typing backspace
1080         https://bugs.webkit.org/show_bug.cgi?id=147196
1081
1082         Reviewed by Žan Doberšek.
1083
1084         Do not try to use the PostLayoutData from EditorState when
1085         isMissingPostLayoutData is true. That happens when there's a
1086         layout pending, and EditorStateChanged is sent again after that
1087         layout with the post layout data. So we can just return early and
1088         wait until the second message.
1089
1090         * UIProcess/API/gtk/WebKitEditorState.cpp:
1091         (webkitEditorStateChanged):
1092         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1093         (webkitWebViewBaseUpdateTextInputState):
1094
1095 2015-07-23  Alex Christensen  <achristensen@webkit.org>
1096
1097         Fix 32-bit build after r187272.
1098
1099         * UIProcess/mac/PageClientImpl.mm:
1100         (WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged):
1101         Added some WK_API_ENABLED.
1102
1103 2015-07-23  Dan Bernstein  <mitz@apple.com>
1104
1105         <rdar://problem/21929532> REGRESSION (r184026): Safari AutoFill with Contact info for phone number is broken
1106         https://bugs.webkit.org/show_bug.cgi?id=147249
1107
1108         Reviewed by Sam Weinig.
1109
1110         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1111         (encodeObject): Use encodeString only for strings that encode as NSString or
1112         NSMutableString. It can’t encode arbitrary NSString subclasses.
1113         (decodeObject): Use decodeString for NSMutableString as well.
1114
1115 2015-07-23  Zalan Bujtas  <zalan@apple.com>
1116
1117         [iOS] REGRESSION (187131): Loading CuteOverload zooms in to the top left corner.
1118         https://bugs.webkit.org/show_bug.cgi?id=147251
1119         rdar://problem/21953359
1120
1121         Calling zoomToRect() should result in essentially the same zoom scale as if we
1122         called setZoomScale with the new page scale factor.
1123  
1124         Reviewed by Benjamin Poulain.
1125
1126         * UIProcess/API/Cocoa/WKWebView.mm:
1127         (-[WKWebView _didCommitLayerTree:]):
1128
1129 2015-07-23  Matthew Daiter  <mdaiter@apple.com>
1130
1131         Linking WebKit2 to be able to grab media sources from a UID
1132         https://bugs.webkit.org/show_bug.cgi?id=147202
1133         <rdar://problem/21947608>
1134
1135         Reviewed by Brent Fulgham.
1136
1137         * UIProcess/UserMediaPermissionRequestProxy.cpp:
1138         (WebKit::UserMediaPermissionRequestProxy::getDeviceNameForUID):
1139         * UIProcess/UserMediaPermissionRequestProxy.h:
1140
1141 2015-07-23  Alex Christensen  <achristensen@webkit.org>
1142
1143         Remove compile and runtime flags for promises.
1144         https://bugs.webkit.org/show_bug.cgi?id=147244
1145
1146         Reviewed by Yusuke Suzuki.
1147
1148         * Configurations/FeatureDefines.xcconfig:
1149         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1150         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1151
1152 2015-07-21  Jer Noble  <jer.noble@apple.com>
1153
1154         Notify the UI delegate when a MediaDocument's natural size changes
1155         https://bugs.webkit.org/show_bug.cgi?id=147182
1156
1157         Reviewed by Simon Fraser.
1158
1159         Pipe notifications of media document natural size changes up from the chrome client, through
1160         to the UIProcess,  through the page client, through the WKWebView, to the UIDelegate.
1161
1162         * UIProcess/API/APIUIClient.h:
1163         (API::UIClient::mediaDocumentNaturalSizeChanged):
1164         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1165         * UIProcess/API/Cocoa/WKWebView.mm:
1166         (-[WKWebView _mediaDocumentNaturalSizeChanged:]):
1167         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1168         * UIProcess/Cocoa/UIDelegate.h:
1169         * UIProcess/Cocoa/UIDelegate.mm:
1170         (WebKit::UIDelegate::setDelegate):
1171         (WebKit::UIDelegate::UIClient::mediaDocumentNaturalSizeChanged):
1172         * UIProcess/PageClient.h:
1173         * UIProcess/WebPageProxy.cpp:
1174         (WebKit::WebPageProxy::mediaDocumentNaturalSizeChanged):
1175         * UIProcess/WebPageProxy.h:
1176         * UIProcess/WebPageProxy.messages.in:
1177         * UIProcess/ios/PageClientImplIOS.h:
1178         * UIProcess/ios/PageClientImplIOS.mm:
1179         (WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged):
1180         * UIProcess/mac/PageClientImpl.h:
1181         * UIProcess/mac/PageClientImpl.mm:
1182         (WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged):
1183         * WebProcess/WebCoreSupport/WebChromeClient.h:
1184         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1185         (WebKit::WebChromeClient::mediaDocumentNaturalSizeChanged):
1186         * WebProcess/WebPage/WebPage.cpp:
1187         (WebKit::WebPage::mediaDocumentNaturalSizeChanged):
1188         * WebProcess/WebPage/WebPage.h:
1189         * UIProcess/API/gtk/PageClientImpl.h: Add default, empty implementation of new pure-virtual method.
1190         * UIProcess/efl/WebViewEfl.h: Ditto.
1191
1192 2015-07-23  Enrica Casucci  <enrica@apple.com>
1193
1194         Removing one incorrect annotation from the previous change.
1195
1196         Unreviewed.
1197
1198         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1199
1200 2015-07-23  Enrica Casucci  <enrica@apple.com>
1201
1202         [iOS] Add another preview delegate for didDismissPreview.
1203         https://bugs.webkit.org/show_bug.cgi?id=147241
1204         rdar://problem/21664211
1205
1206         Reviewed by Tim Horton and Yongjun Zhang.
1207
1208         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1209         * UIProcess/ios/WKContentViewInteraction.mm:
1210         (-[WKContentView _previewItemController:didDismissPreview:committing:]):
1211
1212 2015-07-23  Dan Bernstein  <mitz@apple.com>
1213
1214         <rdar://problem/21910578> Second pass at [iOS] Keyboard shortcuts that take focus away from the web view end up typing a letter into the newly focused field
1215         https://bugs.webkit.org/show_bug.cgi?id=146732
1216
1217         Reviewed by Darin Adler.
1218
1219         * UIProcess/ios/WKContentViewInteraction.mm:
1220         (-[WKContentView _interpretKeyEvent:isCharEvent:]): Rather than checking if the view is
1221         first responder, which it might still be when the Web Content processes invokes this
1222         callback, check if we are in editable content before forwarding the event to the keyboard.
1223
1224 2015-07-23  Jer Noble  <jer.noble@apple.com>
1225
1226         Unreviewed build fix after r187251; rename flag -> allows.
1227
1228         * UIProcess/WebPageProxy.cpp:
1229         (WebKit::WebPageProxy::setAllowsMediaDocumentInlinePlayback):
1230
1231 2015-07-23  Alex Christensen  <achristensen@webkit.org>
1232
1233         [iOS] Unreviewed build fix after r187251.
1234
1235         * UIProcess/WebPageProxy.cpp:
1236         (WebKit::WebPageProxy::setAllowsMediaDocumentInlinePlayback):
1237         Use the correct name for the boolean to pass along to SetAllowsMediaDocumentInlinePlayback.
1238
1239 2015-07-23  Enrica Casucci  <enrica@apple.com>
1240
1241         One more iOS build fix.
1242
1243         Unreviewed.
1244
1245         * Platform/spi/ios/UIKitSPI.h:
1246         * UIProcess/ios/WKContentViewInteraction.h:
1247
1248 2015-07-23  Matthew Daiter  <mdaiter@apple.com>
1249
1250         Bridged passing lists of devices between the UIProcess and the WebProcess
1251         https://bugs.webkit.org/show_bug.cgi?id=147056
1252         <rdar://problem/21883094>
1253
1254         Reviewed by Brent Fulgham.
1255
1256         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: Modified file
1257         to reflect changes made to the header in the .messages.in file
1258         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Ditto
1259         (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision):
1260         * UIProcess/UserMediaPermissionRequestManagerProxy.h: Ditto
1261         * UIProcess/UserMediaPermissionRequestProxy.cpp: Ditto
1262         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
1263         * UIProcess/UserMediaPermissionRequestProxy.h:
1264         (WebKit::UserMediaPermissionRequestProxy::create):
1265         (WebKit::UserMediaPermissionRequestProxy::deviceUIDsVideo):
1266         (WebKit::UserMediaPermissionRequestProxy::deviceUIDsAudio):
1267         * UIProcess/WebPageProxy.cpp:
1268         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
1269         * UIProcess/WebPageProxy.h:
1270         * UIProcess/WebPageProxy.messages.in: Changed heading
1271         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1272         (WebKit::UserMediaPermissionRequestManager::startRequest):
1273         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision):
1274         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
1275         * WebProcess/WebPage/WebPage.cpp:
1276         (WebKit::WebPage::didReceiveUserMediaPermissionDecision):
1277         * WebProcess/WebPage/WebPage.h:
1278         * WebProcess/WebPage/WebPage.messages.in: Changed heading
1279
1280 2015-07-23  Yongjun Zhang  <yongjun_zhang@apple.com>
1281
1282         Adopt the new _previewItemControllerDidCancelPreview delegate method.
1283         https://bugs.webkit.org/show_bug.cgi?id=147238
1284
1285         Don't allow hightlight long press to trigger tap if the link preview is cancelled because
1286         the link is not preview-able.
1287
1288         Reviewed by Beth Dakin.
1289
1290         * UIProcess/ios/WKContentViewInteraction.mm:
1291         (-[WKContentView _previewItemControllerDidCancelPreview:]): 
1292
1293 2015-07-23  Enrica Casucci  <enrica@apple.com>
1294
1295         iOS build fix after http://trac.webkit.org/changeset/187238.
1296
1297         Unreviewed.
1298
1299         * Platform/spi/ios/UIKitSPI.h:
1300
1301 2015-07-23  Jer Noble  <jer.noble@apple.com>
1302
1303         [WK2] Add a WKWebView property for whether the view is displaying a media document
1304         https://bugs.webkit.org/show_bug.cgi?id=147233
1305
1306         Reviewed by Beth Dakin.
1307
1308         Add a _isDisplayingStandaloneMediaDocument property, which queries the frame for whether
1309         the current MIME type is one which our media engines support.
1310
1311         * UIProcess/API/Cocoa/WKWebView.mm:
1312         (-[WKWebView _isDisplayingStandaloneMediaDocument]):
1313         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1314         * UIProcess/WebFrameProxy.cpp:
1315         (WebKit::WebFrameProxy::isDisplayingStandaloneMediaDocument):
1316         * UIProcess/WebFrameProxy.h:
1317
1318 2015-07-21  Jer Noble  <jer.noble@apple.com>
1319
1320         [iOS] Add an explicit API to allow media documents to (temporarily) play inline
1321         https://bugs.webkit.org/show_bug.cgi?id=147181
1322
1323         Reviewed by Beth Dakin.
1324
1325         Add a WKWebView(Private) API which allows MediaDocuments loaded by the view to play their contents inline, regardless
1326         of whether inline playback is restricted on the current device.
1327
1328         * UIProcess/API/Cocoa/WKWebView.mm:
1329         (-[WKWebView _setRequiresUserActionForMediaPlayback:]): Added. Pass through to WebPageProxy.
1330         (-[WKWebView _allowsMediaDocumentInlinePlayback]): Ditto.
1331         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1332         * UIProcess/WebPageProxy.cpp:
1333         (WebKit::WebPageProxy::allowsMediaDocumentInlinePlayback): Simple getter.
1334         (WebKit::WebPageProxy::setAllowsMediaDocumentInlinePlayback): Set, and conditionally pass the new value to WebPage.
1335         * UIProcess/WebPageProxy.h:
1336         * WebProcess/WebPage/WebPage.cpp:
1337         (WebKit::WebPage::setAllowsMediaDocumentInlinePlayback): Set, and conditionally notify WebCore page of the change.
1338         * WebProcess/WebPage/WebPage.h:
1339         (WebKit::WebPage::allowsMediaDocumentInlinePlayback): Simple getter.
1340         * WebProcess/WebPage/WebPage.messages.in: Add new messages.
1341
1342 2015-07-23  Beth Dakin  <bdakin@apple.com>
1343
1344         Should not allow previews of 1x1 images
1345         https://bugs.webkit.org/show_bug.cgi?id=147237
1346         -and corresponding-
1347         rdar://problem/21968460
1348
1349         Reviewed by Tim Horton.
1350
1351         1x1 images are used on some sites to cover actual images, which leads to a 
1352         misleading preview experience. There is not any reason why you would really 
1353         want to preview an image this small nor any reason to believe that the 
1354         preview would result in anything useful.
1355         * WebProcess/WebPage/ios/WebPageIOS.mm:
1356         (WebKit::WebPage::getPositionInformation):
1357
1358 2015-07-23  Brady Eidson  <beidson@apple.com>
1359
1360         Crash in WebPlatformStrategies::createPingHandle - Deref a null NetworkingContext.
1361         <rdar://problem/21949735> and https://bugs.webkit.org/show_bug.cgi?id=147227
1362
1363         Reviewed by Alexey Proskuryakov.
1364
1365         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1366         (WebKit::WebPlatformStrategies::createPingHandle): Skip it if there's a null NetworkingContext.
1367
1368 2015-07-23  Tim Horton  <timothy_horton@apple.com>
1369
1370         Remove some files that should have been removed with WebKit2 Windows
1371         https://bugs.webkit.org/show_bug.cgi?id=147223
1372
1373         Reviewed by Csaba Osztrogonác.
1374
1375         * Shared/API/c/cf/WKURLRequestCF.cpp: Removed.
1376         * Shared/API/c/cf/WKURLRequestCF.h: Removed.
1377         * Shared/API/c/cf/WKURLResponseCF.cpp: Removed.
1378         * Shared/API/c/cf/WKURLResponseCF.h: Removed.
1379
1380 2015-07-23  Timothy Horton  <timothy_horton@apple.com>
1381
1382         Fix the build
1383
1384         * Platform/spi/ios/UIKitSPI.h:
1385
1386 2015-07-23  Tim Horton  <timothy_horton@apple.com>
1387
1388         Remove files that were meant to be removed in r173929
1389
1390         * WebProcess/WebPage/mac/WebInspectorMac.mm: Removed.
1391
1392 2015-07-23  Tim Horton  <timothy_horton@apple.com>
1393
1394         Remove files that were meant to be removed in r168213
1395
1396         * UIProcess/API/Cocoa/WKErrorRecoveryAttempting.h: Removed.
1397
1398 2015-07-23  Tim Horton  <timothy_horton@apple.com>
1399
1400         Remove files that were meant to be removed in r168229
1401
1402         * UIProcess/API/Cocoa/WKSession.h: Removed.
1403         * UIProcess/API/Cocoa/WKSession.mm: Removed.
1404         * UIProcess/API/Cocoa/WKSessionInternal.h: Removed.
1405
1406 2015-07-23  Tim Horton  <timothy_horton@apple.com>
1407
1408         Remove files that were meant to be removed in r165014
1409
1410         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h: Removed.
1411         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: Removed.
1412
1413 2015-07-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1414
1415         [GTK] Add API to allow executing editing commands that require an argument
1416         https://bugs.webkit.org/show_bug.cgi?id=146781
1417
1418         Reviewed by Gustavo Noronha Silva.
1419
1420         Commands like InsertImage or CreateLink receive an argument, but
1421         we only have webkit_web_view_execute_editing_command() that
1422         doesn't receive any argument. This patch adds
1423         webkit_web_view_execute_editing_command_with_argument() for those
1424         commands. It also adds WEBKIT_EDITING_COMMAND_INSERT_IMAGE and
1425         WEBKIT_EDITING_COMMAND_CREATE_LINK to the predefined editing commands.
1426
1427         * UIProcess/API/gtk/WebKitEditingCommands.h: Add
1428         WEBKIT_EDITING_COMMAND_INSERT_IMAGE and WEBKIT_EDITING_COMMAND_CREATE_LINK.
1429         * UIProcess/API/gtk/WebKitWebView.cpp:
1430         (webkit_web_view_execute_editing_command_with_argument):
1431         * UIProcess/API/gtk/WebKitWebView.h:
1432         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
1433         * UIProcess/WebPageProxy.cpp:
1434         (WebKit::WebPageProxy::executeEditCommand): Pass also the argument
1435         to the message.
1436         * UIProcess/WebPageProxy.h:
1437         * WebProcess/WebPage/WebPage.cpp:
1438         (WebKit::WebPage::executeEditCommand): Add the argument parameter
1439         to the message handler.
1440         * WebProcess/WebPage/WebPage.h:
1441         * WebProcess/WebPage/WebPage.messages.in: Add argument parameter
1442         to ExecuteEditCommand message.
1443
1444 2015-07-22  Sukolsak Sakshuwong  <sukolsak@gmail.com>
1445
1446         Add ENABLE_WEBASSEMBLY feature flag for WebAssembly
1447         https://bugs.webkit.org/show_bug.cgi?id=147212
1448
1449         Reviewed by Filip Pizlo.
1450
1451         * Configurations/FeatureDefines.xcconfig:
1452
1453 2015-07-22  James Savage  <james.savage@apple.com>
1454
1455         Use updated CoreAnimation snapshot SPI.
1456         https://bugs.webkit.org/show_bug.cgi?id=147197
1457         <rdar://problem/21032083>
1458
1459         Reviewed by Tim Horton.
1460         Patch by James Savage.
1461
1462         * Platform/spi/ios/UIKitSPI.h:
1463         * UIProcess/API/Cocoa/WKWebView.mm:
1464         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
1465
1466 2015-07-22  Timothy Horton  <timothy_horton@apple.com>
1467
1468         Fix the build
1469
1470         * UIProcess/ios/WKContentViewInteraction.mm:
1471         (-[WKContentView setupInteraction]):
1472         (-[WKContentView cleanupInteraction]):
1473
1474 2015-07-22  Commit Queue  <commit-queue@webkit.org>
1475
1476         Unreviewed, rolling out r187196.
1477         https://bugs.webkit.org/show_bug.cgi?id=147213
1478
1479         broke all the iOS builds (Requested by thorton on #webkit).
1480
1481         Reverted changeset:
1482
1483         "Use updated CoreAnimation snapshot SPI."
1484         https://bugs.webkit.org/show_bug.cgi?id=147197
1485         http://trac.webkit.org/changeset/187196
1486
1487 2015-07-22  Tim Horton  <timothy_horton@apple.com>
1488
1489         Fix the build
1490
1491         * UIProcess/ios/WKContentViewInteraction.h:
1492
1493 2015-07-22  Tim Horton  <timothy_horton@apple.com>
1494
1495         [iOS] Adjust the preview architecture
1496         https://bugs.webkit.org/show_bug.cgi?id=147203
1497         <rdar://problem/21945775>
1498
1499         Reviewed by Simon Fraser.
1500
1501         * UIProcess/ios/WKContentViewInteraction.mm:
1502         (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
1503         Link previews should win over image previews if both are possible.
1504
1505 2015-07-22  James Savage  <james.savage@apple.com>
1506
1507         Use updated CoreAnimation snapshot SPI.
1508         https://bugs.webkit.org/show_bug.cgi?id=147197
1509
1510         Reviewed by Tim Horton.
1511
1512         * Platform/spi/ios/UIKitSPI.h:
1513         * UIProcess/API/Cocoa/WKWebView.mm:
1514         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
1515
1516 2015-07-22  Tim Horton  <timothy_horton@apple.com>
1517
1518         [iOS] Adjust the preview architecture
1519         https://bugs.webkit.org/show_bug.cgi?id=147203
1520         <rdar://problem/21945775>
1521
1522         Reviewed by Beth Dakin.
1523
1524         * Platform/spi/ios/UIKitSPI.h:
1525         * UIProcess/API/Cocoa/WKWebView.mm:
1526         (-[WKWebView _setAllowsLinkPreview:]): Deleted.
1527         * UIProcess/ios/WKContentView.mm:
1528         (-[WKContentView willMoveToWindow:]): Deleted.
1529         * UIProcess/ios/WKContentViewInteraction.h:
1530         * UIProcess/ios/WKContentViewInteraction.mm:
1531         (-[WKContentView setupInteraction]):
1532         (-[WKContentView cleanupInteraction]):
1533         (-[WKContentView _registerPreview]):
1534         (-[WKContentView _unregisterPreview]):
1535         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
1536         (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
1537         (-[WKContentView _presentationRectForPreviewItemController:]):
1538         (-[WKContentView _presentedViewControllerForPreviewItemController:]):
1539         (-[WKContentView _previewItemController:commitPreview:]):
1540         (-[WKContentView _previewItemController:willPresentPreview:forPosition:inSourceView:]):
1541         (-[WKContentView _previewItemController:didDismissPreview:committing:]):
1542         (-[WKContentView _presentationSnapshotForPreviewItemController:]):
1543         (-[WKContentView _presentationRectsForPreviewItemController:]):
1544         (-[WKContentView gestureRecognizerShouldBegin:]): Deleted.
1545         (-[WKContentView _registerPreviewInWindow:]): Deleted.
1546         (-[WKContentView _unregisterPreviewInWindow:]): Deleted.
1547         (-[WKContentView previewViewControllerForPosition:inSourceView:]): Deleted.
1548         (-[WKContentView commitPreviewViewController:]): Deleted.
1549         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]): Deleted.
1550         (-[WKContentView didDismissPreviewViewController:committing:]): Deleted.
1551         Register and unregister in setup/cleanupInteraction instead of when moving between windows.
1552         Implement 'shouldBegin' instead of interacting directly with the recognizer.
1553         Make use of system enums instead of our own.
1554         Let UIPreviewItemController handle shrink-wrapping and the indicator view.
1555
1556 2015-07-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1557
1558         [EFL] Support indexeddb for WK2
1559         https://bugs.webkit.org/show_bug.cgi?id=145867
1560
1561         Reviewed by Csaba Osztrogonác.
1562
1563         Add stub implementation for indexeddb. Move KeyedDecoder and KeyedEncoder from gtk to glib
1564         in order to share it between GTK and EFL ports.
1565
1566         * DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp:
1567         * DatabaseProcess/efl/DatabaseProcessMainEfl.cpp: Copied from Source/WebKit2/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp.
1568         (WebKit::DatabaseProcessMainUnix):
1569         * PlatformEfl.cmake:
1570         * PlatformGTK.cmake:
1571         * Shared/glib/KeyedDecoder.cpp: Renamed from Source/WebKit2/Shared/gtk/KeyedDecoder.cpp.
1572         (WebKit::KeyedDecoder::KeyedDecoder):
1573         (WebKit::KeyedDecoder::~KeyedDecoder):
1574         (WebKit::KeyedDecoder::dictionaryFromGVariant):
1575         (WebKit::KeyedDecoder::decodeBytes):
1576         (WebKit::KeyedDecoder::decodeSimpleValue):
1577         (WebKit::KeyedDecoder::decodeBool):
1578         (WebKit::KeyedDecoder::decodeUInt32):
1579         (WebKit::KeyedDecoder::decodeInt32):
1580         (WebKit::KeyedDecoder::decodeInt64):
1581         (WebKit::KeyedDecoder::decodeFloat):
1582         (WebKit::KeyedDecoder::decodeDouble):
1583         (WebKit::KeyedDecoder::decodeString):
1584         (WebKit::KeyedDecoder::beginObject):
1585         (WebKit::KeyedDecoder::endObject):
1586         (WebKit::KeyedDecoder::beginArray):
1587         (WebKit::KeyedDecoder::beginArrayElement):
1588         (WebKit::KeyedDecoder::endArrayElement):
1589         (WebKit::KeyedDecoder::endArray):
1590         * Shared/glib/KeyedDecoder.h: Renamed from Source/WebKit2/Shared/gtk/KeyedDecoder.h.
1591         * Shared/glib/KeyedEncoder.cpp: Renamed from Source/WebKit2/Shared/gtk/KeyedEncoder.cpp.
1592         (WebKit::KeyedEncoder::KeyedEncoder):
1593         (WebKit::KeyedEncoder::~KeyedEncoder):
1594         (WebKit::KeyedEncoder::encodeBytes):
1595         (WebKit::KeyedEncoder::encodeBool):
1596         (WebKit::KeyedEncoder::encodeUInt32):
1597         (WebKit::KeyedEncoder::encodeInt32):
1598         (WebKit::KeyedEncoder::encodeInt64):
1599         (WebKit::KeyedEncoder::encodeFloat):
1600         (WebKit::KeyedEncoder::encodeDouble):
1601         (WebKit::KeyedEncoder::encodeString):
1602         (WebKit::KeyedEncoder::beginObject):
1603         (WebKit::KeyedEncoder::endObject):
1604         (WebKit::KeyedEncoder::beginArray):
1605         (WebKit::KeyedEncoder::beginArrayElement):
1606         (WebKit::KeyedEncoder::endArrayElement):
1607         (WebKit::KeyedEncoder::endArray):
1608         (WebKit::KeyedEncoder::finishEncoding):
1609         * Shared/glib/KeyedEncoder.h: Renamed from Source/WebKit2/Shared/gtk/KeyedEncoder.h.
1610         * UIProcess/Databases/efl/DatabaseProcessProxyEfl.cpp: Copied from Source/WebKit2/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp.
1611         (WebKit::DatabaseProcessProxy::platformGetLaunchOptions):
1612
1613 2015-07-22  Michael Catanzaro  <mcatanzaro@igalia.com>
1614
1615         [Seccomp] Canonicalize filesystem path when whitelisting it
1616         https://bugs.webkit.org/show_bug.cgi?id=142986
1617
1618         Reviewed by Žan Doberšek.
1619
1620         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
1621         (WebKit::canonicalizeFileName):
1622         (WebKit::SyscallPolicy::addFilePermission):
1623         (WebKit::SyscallPolicy::addDirectoryPermission):
1624
1625 2015-07-21  Simon Fraser  <simon.fraser@apple.com>
1626
1627         Add logging for TiledCoreAnimationDrawingArea resizing
1628         https://bugs.webkit.org/show_bug.cgi?id=147180
1629
1630         Reviewed by Tim Horton.
1631
1632         Add a "Resize" log channel for WebKit2, and use it to log data in scaleViewToFitDocumentIfNeeded().
1633
1634         * Platform/Logging.h:
1635         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1636         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
1637
1638 2015-07-22  Sam Weinig  <sam@webkit.org>
1639
1640         Encode/Decode underlying errors when serializing NSErrors
1641         <rdar://problem/21818117>
1642         https://bugs.webkit.org/show_bug.cgi?id=147199
1643
1644         Reviewed by Anders Carlsson.
1645
1646         * Shared/mac/WebCoreArgumentCodersMac.mm:
1647         (IPC::ArgumentCoder<CertificateInfo>::decode):
1648         (IPC::encodeNSError):
1649         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
1650         (IPC::decodeNSError):
1651         (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
1652         Break out encoding/decoding of the NSErrors into a helpers so they can be called
1653         for the underlying error.
1654
1655 2015-07-22  Beth Dakin  <bdakin@apple.com>
1656
1657         Animated images should animate in previews
1658         https://bugs.webkit.org/show_bug.cgi?id=147173
1659         -and corresponding-
1660         rdar://problem/21637698
1661
1662         Reviewed by Dan Bernstein.
1663
1664         InteractionInformationAtPosition needs to know if it’s an animated image.
1665         * Shared/InteractionInformationAtPosition.cpp:
1666         (WebKit::InteractionInformationAtPosition::encode):
1667         (WebKit::InteractionInformationAtPosition::decode):
1668         * Shared/InteractionInformationAtPosition.h:
1669
1670         New delegate method to create a link preview view controller for animated 
1671         images.
1672         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1673
1674         Treat animated images more like link previews.
1675         * UIProcess/ios/WKContentViewInteraction.mm:
1676         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
1677
1678         Set info.isAnimatedImage
1679         * WebProcess/WebPage/ios/WebPageIOS.mm:
1680         (WebKit::WebPage::getPositionInformation):
1681
1682 2015-07-22  Michael Catanzaro  <mcatanzaro@igalia.com>
1683
1684         [Seccomp Filters] Add helpers to get XDG base directory locations
1685         https://bugs.webkit.org/show_bug.cgi?id=142982
1686
1687         Reviewed by Zan Dobersek.
1688
1689         * PlatformEfl.cmake:
1690         * PlatformGTK.cmake:
1691         * Shared/linux/SeccompFilters/XDGBaseDirectory.h: Added.
1692         * Shared/linux/SeccompFilters/XDGBaseDirectoryGLib.cpp: Added.
1693         (WebKit::userHomeDirectory):
1694         (WebKit::userCacheDirectory):
1695         (WebKit::userConfigDirectory):
1696         (WebKit::userDataDirectory):
1697         (WebKit::userRuntimeDirectory):
1698
1699 2015-07-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1700
1701         [EFL][WK2] EWK2ContextTestMultipleProcesses.ewk_context_network_process_model fails to pass
1702         https://bugs.webkit.org/show_bug.cgi?id=142967
1703
1704         Reviewed by Csaba Osztrogonác.
1705
1706         Though processIdentifier() can return 0 when a page is not closed, ewk_context_network_process_model has
1707         not been considered process id can be 0. This patch adds a protection logic which doesn't test when process
1708         id is 0 at the moment.
1709
1710         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
1711         (TEST_F):
1712
1713 2015-07-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1714
1715         Unreviewed. Fix some warnings when generating GTK+ HTML API docs.
1716
1717         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
1718         WebKitWebsiteDataManager and WebKitWebEditor.
1719
1720 2015-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1721
1722         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.4 release.
1723
1724         * gtk/NEWS: Add release notes for 2.9.4.
1725
1726 2015-07-21  Joseph Pecoraro  <pecoraro@apple.com>
1727
1728         Web Inspector: [Mac] "Open Image In New Window" context menu item does nothing on an image
1729         https://bugs.webkit.org/show_bug.cgi?id=147175
1730
1731         Reviewed by Timothy Hatcher.
1732
1733         * UIProcess/mac/WebInspectorProxyMac.mm:
1734         (WebKit::getContextMenuFromProposedMenu):
1735         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1736         Remove default context menus that won't work in the inspector page.
1737
1738 2015-07-21  Benjamin Poulain  <benjamin@webkit.org>
1739
1740         [Content Extensions] Use a jump table when consecutive transitions have different targets
1741         https://bugs.webkit.org/show_bug.cgi?id=147099
1742
1743         Reviewed by Alex Christensen.
1744
1745         * UIProcess/API/APIUserContentExtensionStore.h:
1746
1747 2015-07-21  Daniel Bates  <dabates@apple.com>
1748
1749         Fix the build following <https://trac.webkit.org/changeset/187129>
1750         (https://bugs.webkit.org/show_bug.cgi?id=147112)
1751
1752         * UIProcess/WebProcessProxy.cpp:
1753         (WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState): Guard implementation with PLATFORM(IOS)
1754         since this logic is specific to the iOS port.
1755
1756 2015-07-21  Simon Fraser  <simon.fraser@apple.com>
1757
1758         Rename the 'View' log channel to 'Printing'
1759         https://bugs.webkit.org/show_bug.cgi?id=147172
1760
1761         Reviewed by Zalan Bujtas.
1762
1763         "View" was a terrible name for a log channel that was all about printing.
1764         Sort the log channels.
1765
1766         * Platform/Logging.h:
1767         * UIProcess/API/mac/WKView.mm:
1768         (-[WKView drawRect:]):
1769         (-[WKView printOperationWithPrintInfo:forFrame:]):
1770         * UIProcess/mac/WKPrintingView.mm:
1771         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
1772         (pageDidComputePageRects):
1773         (-[WKPrintingView knowsPageRange:]):
1774         (-[WKPrintingView drawRect:]):
1775         (-[WKPrintingView rectForPage:]):
1776         (-[WKPrintingView beginDocument]):
1777         (-[WKPrintingView endDocument]):
1778
1779 2015-07-21  Zalan Bujtas  <zalan@apple.com>
1780
1781         [iOS] Menu drop down such as on nike.com does not stay
1782         https://bugs.webkit.org/show_bug.cgi?id=147047
1783         rdar://problem/21046961
1784
1785         Reviewed by Benjamin Poulain.
1786
1787         This is a workaround for unintended scrolling while scaling.
1788         (Based on Benjamin Poulain's WIP patch for webkit.org/b/136904)
1789
1790         In certain cases when scaling would result in moving the scrollview (which would trigger
1791         a scroll event on WebCore side), zoomRect is called instead of setZoomScale to ensure
1792         that the scroll position stays intact.
1793
1794         * UIProcess/API/Cocoa/WKWebView.mm:
1795         (-[WKWebView _didCommitLayerTree:]):
1796
1797 2015-07-21  Daniel Bates  <dabates@apple.com>
1798
1799         WTFCrash() in WebKit::WebProcess::networkConnection()
1800         https://bugs.webkit.org/show_bug.cgi?id=147112
1801         <rdar://problem/18477459>
1802
1803         Reviewed by Gavin Barraclough.
1804
1805         Fixes an issue where a newly launched network process may be jetsam'd because it has not
1806         taken a process assertion between the time it was launched and the time when a web process
1807         makes use of it.
1808
1809         Initially a network process does not have a process assertion. A process assertion is taken
1810         (if one has not been taken) for the network process when a process assertion is taken for at
1811         least one web process. When the network process crashes a WebProcess may ultimately launch a
1812         new network process in WebProcess::networkConnection(). The new network process may be jetsam'd
1813         immediately when the system is under some measure pressure because it has a low jetsam priority,
1814         0 (since it does not have a process assertion and higher priority implies that a process is less
1815         likely to be jetsam'd). And the logic in WebProcess::networkConnection() explicitly calls
1816         CRASH() if the newly launched network process crashes immediately. Towards preventing the newly
1817         launched network process from being jetsam'd we should obtain a process assertion for it.
1818
1819         * UIProcess/WebProcessPool.cpp:
1820         (WebKit::WebProcessPool::WebProcessPool): Initialize m_didNetworkProcessCrash to false.
1821         (WebKit::WebProcessPool::ensureNetworkProcess): If the network process crashed (m_didNetworkProcessCrash == true)
1822         then tell each process in the pool to reinstate their network activity token for the new network process.
1823         (WebKit::WebProcessPool::networkProcessCrashed): Set m_didNetworkProcessCrash to true when the
1824         network process crashed.
1825         * UIProcess/WebProcessPool.h:
1826         * UIProcess/WebProcessProxy.cpp:
1827         (WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState): Added.
1828         (WebKit::WebProcessProxy::didSetAssertionState): Add assert to ensure we never have both
1829         a background- and foreground- activity token for the network process.
1830         * UIProcess/WebProcessProxy.h:
1831
1832 2015-07-21  Daniel Bates  <dabates@apple.com>
1833
1834         ASSERT(m_suspendMessageCount >= 0) fails in ProcessThrottler::didCancelProcessSuspension()
1835         when WebContent process crashes; Network process may never voluntarily suspend
1836         https://bugs.webkit.org/show_bug.cgi?id=147122
1837         <rdar://problem/21906759>
1838
1839         Reviewed by Chris Dumez.
1840
1841         Fixes an issue where the network process may never voluntarily release its process assertion.
1842
1843         Currently the network process always sends both a ProcessReadyToSuspend and CancelPrepareToSuspend
1844         message in response to receiving a PrepareToSuspend message and CancelPrepareToSuspend message,
1845         respectively. The process throttler expects to receive either a ProcessReadyToSuspend message
1846         or a CancelPrepareToSuspend message (and not both) in response to sending the message sequence
1847         PrepareToSuspend, CancelPrepareToSuspend. When a process throttler receives both messages in
1848         response to this sequence then its internal message count becomes imbalanced and it will
1849         never release the process assertion it manages. One user interaction that can cause such an
1850         imbalance, in the process throttler held by NetworkProcessProxy, is switching tabs.
1851
1852         * NetworkProcess/NetworkProcess.cpp:
1853         (WebKit::NetworkProcess::cancelPrepareToSuspend): Do not send message NetworkProcessProxy::DidCancelProcessSuspension. 
1854         * UIProcess/Network/NetworkProcessProxy.cpp:
1855         (WebKit::NetworkProcessProxy::didCancelProcessSuspension): Deleted.
1856         * UIProcess/Network/NetworkProcessProxy.h:
1857         * UIProcess/Network/NetworkProcessProxy.messages.in: Remove message NetworkProcessProxy::DidCancelProcessSuspension.
1858
1859 2015-07-21  Matthew Daiter  <mdaiter@apple.com>
1860
1861         Make sure to invalidate requests for user media after webpage reset
1862         https://bugs.webkit.org/show_bug.cgi?id=147155
1863         <rdar://problem/21924174>
1864
1865         Reviewed by Brent Fulgham.
1866
1867         * UIProcess/WebPageProxy.cpp:
1868         (WebKit::WebPageProxy::resetState): Added user media reset
1869
1870 2015-07-21  Tim Horton  <timothy_horton@apple.com>
1871
1872         [iOS] Avoid using a TextIndicator if there are non-text things to indicate
1873         https://bugs.webkit.org/show_bug.cgi?id=147152
1874         <rdar://problem/21921061>
1875
1876         Reviewed by Beth Dakin.
1877
1878         * UIProcess/ios/WKContentViewInteraction.mm:
1879         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
1880         * WebProcess/WebPage/ios/WebPageIOS.mm:
1881         (WebKit::shouldUseTextIndicatorForLink):
1882         (WebKit::WebPage::getPositionInformation):
1883         Fall back to a rectangular area instead of a TextIndicator if there are any
1884         non-inline elements inside the link.
1885
1886 2015-07-21  Andreas Kling  <akling@apple.com>
1887
1888         API::Session should clean up its storage in the network process when destroyed.
1889         <https://webkit.org/b/147139>
1890         <rdar://problem/21838764>
1891
1892         Reviewed by Anders Carlsson.
1893
1894         Have ~Session() send a DestroyPrivateBrowsingSession message to all networking processes
1895         for ephemeral sessions. This plugs a NetworkStorageSession leak that could retain a large
1896         CFNetwork object graph.
1897
1898         * UIProcess/API/APISession.cpp:
1899         (API::Session::~Session):
1900
1901 2015-07-21  Sungmann Cho  <sungmann.cho@navercorp.com>
1902
1903         Make PluginProxy::handleMouseEvent() asynchronous.
1904         https://bugs.webkit.org/show_bug.cgi?id=146142
1905
1906         Reviewed by Anders Carlsson.
1907
1908         PluginProxy::handleMouseEvent() forwards the generated mouse event to PluginControllerProxy
1909         using a synchronous message, but the recipient always reply immediately with the same value("true")
1910         even before handling the received message. So I think PluginProxy::handleMouseEvent() is perfectly
1911         OK to process its messages asynchronously.
1912
1913         * PluginProcess/PluginControllerProxy.cpp:
1914         (WebKit::PluginControllerProxy::handleMouseEvent):
1915         * PluginProcess/PluginControllerProxy.h:
1916         * PluginProcess/PluginControllerProxy.messages.in:
1917         * WebProcess/Plugins/PluginProxy.cpp:
1918         (WebKit::PluginProxy::handleMouseEvent):
1919
1920 2015-07-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1921
1922         [GTK] Add API to be notified about editor state changes
1923         https://bugs.webkit.org/show_bug.cgi?id=145875
1924
1925         Reviewed by Gustavo Noronha Silva.
1926
1927         Add WebKitEditorState object, that is created on demand by the
1928         WebKitWebView and can be used to get the typing attributes of the
1929         editor at the current position or selection.
1930
1931         * PlatformGTK.cmake:
1932         * Shared/EditorState.cpp: Use part of the PostLayoutData struct
1933         for the GTK port too.
1934         (WebKit::EditorState::encode): Encode PostLayoutData for GTK and
1935         remove our custom cursorRect.
1936         (WebKit::EditorState::decode): Decode PostLayoutData for GTK and
1937         remove our custom cursorRect.
1938         (WebKit::EditorState::PostLayoutData::encode): Reorder it to
1939         reduce the amonut of ifdefs.
1940         (WebKit::EditorState::PostLayoutData::decode): Ditto.
1941         * Shared/EditorState.h: Add AttributeStrikeThrough to
1942         TypingAttributes enum.
1943         * UIProcess/API/gtk/PageClientImpl.cpp:
1944         (WebKit::PageClientImpl::selectionDidChange): Rename
1945         updateTextInputState() to selectionDidChange() and also notify the
1946         WebKitWebView.
1947         * UIProcess/API/gtk/PageClientImpl.h:
1948         * UIProcess/API/gtk/WebKitEditorState.cpp: Added.
1949         (webkitEditorStateGetProperty):
1950         (webkit_editor_state_class_init):
1951         (webkitEditorStateSetTypingAttributes):
1952         (webkitEditorStateCreate):
1953         (webkitEditorStateChanged):
1954         (webkit_editor_state_get_typing_attributes):
1955         * UIProcess/API/gtk/WebKitEditorState.h: Added.
1956         * UIProcess/API/gtk/WebKitEditorStatePrivate.h: Added.
1957         * UIProcess/API/gtk/WebKitWebView.cpp:
1958         (webkitWebViewSelectionDidChange): Notify the WebKitEditorState if
1959         it has already been created.
1960         (webkit_web_view_get_editor_state): Ensure a WebKitEditorState and
1961         return it.
1962         * UIProcess/API/gtk/WebKitWebView.h:
1963         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1964         (webkitWebViewBaseUpdateTextInputState): Get the caret cursor rect
1965         from PostLayoutData.
1966         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1967         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
1968         * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Add webkit_editor_state_get_type.
1969         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitEditorState.
1970         * UIProcess/API/gtk/webkit2.h: Include WebKitEditorState.h.
1971         * UIProcess/PageClient.h:
1972         * UIProcess/gtk/WebPageProxyGtk.cpp:
1973         (WebKit::WebPageProxy::editorStateChanged): Call PageClientImpl::selectionDidChange().
1974         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1975         (WebKit::WebPage::platformEditorState): Add typing attributes to EditorState.
1976
1977 2015-07-20  Simon Fraser  <simon.fraser@apple.com>
1978
1979         Fix the iOS build.
1980
1981         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1982
1983 2015-07-20  Simon Fraser  <simon.fraser@apple.com>
1984
1985         Facebook in tiled fullscreen is slow
1986         https://bugs.webkit.org/show_bug.cgi?id=147134
1987         rdar://problem/21823349
1988
1989         Reviewed by Tim Horton.
1990         
1991         TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded() could cause a page to toggle
1992         between two fixed layout sizes differing by a pixel, because of rounding. This would cause
1993         lots of extra layouts and painting.
1994         
1995         This happened because the the fixed layout size was computed using ceil(m_webPage.size().width() / viewScale)
1996
1997         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1998         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
1999
2000 2015-07-20  Wenson Hsieh  <wenson_hsieh@apple.com>
2001
2002         Fix crash due to RemoteLayerTreeDisplayRefreshMonitor outliving RemoteLayerTreeDrawingArea
2003         https://bugs.webkit.org/show_bug.cgi?id=147124
2004         <rdar://problem/21582858>
2005
2006         Reviewed by Simon Fraser.
2007
2008         Refactors RemoteLayerTreeDisplayRefreshMonitor to use a weak pointer rather than a reference
2009         to its RemoteLayerTreeDrawingArea, since the drawing area may be deallocated before the monitor
2010         in some rare cases. This rarely caused pages using requestAnimationFrame to crash on iOS. However,
2011         this should not be the case: logically, a RemoteLayerTreeDrawingArea should always outlive its
2012         refresh monitors. Refer to https://bugs.webkit.org/show_bug.cgi?id=147128 for more details.
2013
2014         * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h:
2015         * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.mm:
2016         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::RemoteLayerTreeDisplayRefreshMonitor):
2017         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::~RemoteLayerTreeDisplayRefreshMonitor): On destruction, checks
2018             first to see whether or not the drawing area has been deallocated before telling it to update its monitors.
2019         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::requestRefreshCallback):
2020         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2021         (WebKit::RemoteLayerTreeDrawingArea::createWeakPtr): Creates and returns a new weak pointer to itself.
2022         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2023         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
2024
2025 2015-07-20  Alex Christensen  <achristensen@webkit.org>
2026
2027         [Content Extensions] Cache actions with domains that match everything
2028         https://bugs.webkit.org/show_bug.cgi?id=147050
2029
2030         Reviewed by Benjamin Poulain.
2031
2032         * UIProcess/API/APIUserContentExtensionStore.h:
2033
2034 2015-07-20  Gordon Sheridan  <gordon_sheridan@apple.com>
2035
2036         Support blocking a plug-in for non-security reasons
2037         https://bugs.webkit.org/show_bug.cgi?id=145009
2038
2039         Reviewed by Anders Carlsson.
2040
2041         * Shared/Plugins/PluginModuleInfo.h:
2042         Replace PluginModuleBlocked with separate enum values for blocking for security and compatibility.
2043
2044         * UIProcess/API/C/WKAPICast.h:
2045         (WebKit::toWKPluginLoadPolicy):
2046         Modify to handle change to PluginModuleBlocked enum.
2047
2048         (WebKit::toPluginModuleLoadPolicy):
2049         Ditto.
2050
2051         * UIProcess/API/C/WKPluginLoadPolicy.h:
2052         Added enum value for blocking a plugin for compatibility reasons.
2053
2054         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2055         (WebKit::shouldBlockPlugin):
2056         Check load policy for both reasons a plugin may be blocked.
2057
2058         (WebKit::WKPlugInModuleLoadPolicyToPluginModuleLoadPolicy):
2059         Added function to convert between load policy enum types.
2060
2061         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
2062         Modified to call WKLoadPolicyForPluginVersion() which can distinguish between blocked for security or compatibility.
2063
2064         * UIProcess/WebPageProxy.cpp:
2065         (WebKit::WebPageProxy::findPlugin):
2066         Updated to recognize both PluginModuleBlocked enum values that indicate a plugin is blocked.
2067
2068         * WebProcess/WebPage/WebPage.cpp:
2069         (WebKit::WebPage::createPlugin):
2070         Ditto.
2071
2072         (WebKit::WebPage::canPluginHandleResponse):
2073         Ditto.
2074
2075 2015-07-20  Antti Koivisto  <antti@apple.com>
2076
2077         NSURLCache fallback does not work on iOS due to sandboxing
2078         https://bugs.webkit.org/show_bug.cgi?id=146314
2079         <rdar://problem/21433691>
2080
2081         Reviewed by Anders Carlsson.
2082
2083         This broke with earlier cache path computation changes.
2084
2085         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2086         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2087
2088             NSURLCache path is relative to the container cache path so "." is sufficient.
2089             This puts the cache files under
2090             <container>/Library/Caches/com.apple.WebKit.Networking/
2091
2092 2015-07-20  Jeremy Jones  <jeremyj@apple.com>
2093
2094         Adopt AVPlayerLayerView
2095         https://bugs.webkit.org/show_bug.cgi?id=146862
2096
2097         Reviewed by Simon Fraser.
2098
2099         The CALayerHost is replaced with WebLayerHostView to be compatible with UIView animations.
2100         videoLayerFrame and videoLayerGravity no longer need to be stored because they are stored
2101         where they are used in the interface. Some animation is improved in the conversion.
2102
2103         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2104         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2105         (+[WebLayerHostView layerClass]): Add class WebLayerHostView.
2106         (-[WebLayerHostView contextID]):
2107         (-[WebLayerHostView setContextID:]):
2108         (-[WebLayerHostView layerHost]):
2109         (WebKit::WebVideoFullscreenManagerProxy::invalidate): layer -> view
2110         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
2111         Apply the hostingDeviceScaleFactor transform to -sublayerTransform instead of to
2112         -transform. This more directly inverts the tranform WebProcess and allows -transform
2113         to be used for animation in the UIProcess. This is important because UIView's actions
2114         animate -transform, but not -sublayerTrasform.
2115
2116         (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): layer -> view
2117         (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame): Deleted.
2118         (WebKit::WebVideoFullscreenModelContext::videoLayerFrame): Deleted.
2119         (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity): Deleted.
2120         (WebKit::WebVideoFullscreenModelContext::videoLayerGravity): Deleted.
2121         * WebProcess/ios/WebVideoFullscreenManager.mm:
2122         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
2123         Set initial video layer frame to fix start point of animation.
2124
2125         (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
2126         dispatch_async allows the CATransaction to complete before continuing with the animation.
2127         This prevents a flash during animation.
2128
2129 2015-07-20  Tim Horton  <timothy_horton@apple.com>
2130
2131         REGRESSION (r174287): Flash of black when opening a new web view or navigating to a new page
2132         https://bugs.webkit.org/show_bug.cgi?id=147127
2133         <rdar://problem/21474317>
2134
2135         Reviewed by Simon Fraser.
2136
2137         * WebProcess/WebPage/WebPage.cpp:
2138         (WebKit::WebPage::snapshotAtSize):
2139         Avoid using an invalid documentBackgroundColor, fall back to baseBackgroundColor
2140         like we did before r174287.
2141
2142 2015-07-20  Michael Catanzaro  <mcatanzaro@igalia.com>
2143
2144         [Seccomp] Should be easier to debug blocked syscalls
2145         https://bugs.webkit.org/show_bug.cgi?id=142980
2146
2147         These should be printed even when not running in debug mode. There is no
2148         value in hiding errors from release build users.
2149
2150         Reviewed by Žan Doberšek.
2151
2152         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
2153         (WebKit::SeccompBroker::runLoop): Don't close stderr et. al. in release builds.
2154         * Shared/linux/SeccompFilters/Syscall.cpp:
2155         (WebKit::write_uint): Added.
2156         (WebKit::reportUnexpectedSyscall): Added.
2157         (WebKit::Syscall::createFromContext): Call reportUnexpectedSyscall. Also, no need to crash
2158         here in release builds.
2159         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
2160         (WebKit::SyscallPolicy::hasPermissionForPath): Print a warning when access is denied.
2161         (WebKit::SyscallPolicy::permissionToString): Added.
2162         * Shared/linux/SeccompFilters/SyscallPolicy.h: Add permissionToString.
2163
2164 2015-07-20  Csaba Osztrogonác  <ossy@webkit.org>
2165
2166         Fix the !ENABLE(VIDEO) build after r186396
2167         https://bugs.webkit.org/show_bug.cgi?id=147116
2168
2169         Reviewed by Brent Fulgham.
2170
2171         * WebProcess/WebProcess.cpp:
2172         (WebKit::WebProcess::didClose):
2173
2174 2015-07-20  Tomas Popela  <tpopela@redhat.com>
2175
2176         [GTK] Add selection-changed signal to the WebKit2 API
2177         https://bugs.webkit.org/show_bug.cgi?id=137116
2178
2179         Reviewed by Carlos Garcia Campos.
2180
2181         Add a new object WebKitWebEditor where the editing capabilities of a
2182         WebPage will be grouped and exposed. Add the selection-changed signal
2183         there (we used the same name as in WK1 API).
2184
2185         * PlatformGTK.cmake:
2186         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2187         * WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp: Added.
2188         (didChangeSelection):
2189         (webkitWebEditorCreate):
2190         (webkit_web_editor_get_page):
2191         * WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.h: Added.
2192         * WebProcess/InjectedBundle/API/gtk/WebKitWebEditorPrivate.h: Added.
2193         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
2194         (webkitWebPageGetPage):
2195         (webkit_web_page_get_editor):
2196         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h:
2197         * WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h:
2198         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
2199
2200 2015-07-16  Anders Carlsson  <andersca@apple.com>
2201
2202         WebsiteDataStore operations need to grab background assertions
2203         https://bugs.webkit.org/show_bug.cgi?id=147015
2204         rdar://problem/21799011
2205
2206         Reviewed by Sam Weinig.
2207
2208         * UIProcess/Network/NetworkProcessProxy.cpp:
2209         (WebKit::NetworkProcessProxy::fetchWebsiteData):
2210         (WebKit::NetworkProcessProxy::deleteWebsiteData):
2211         (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
2212         * UIProcess/WebProcessProxy.cpp:
2213         (WebKit::WebProcessProxy::fetchWebsiteData):
2214         (WebKit::WebProcessProxy::deleteWebsiteData):
2215         (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
2216
2217 2015-07-19  Michael Catanzaro  <mcatanzaro@igalia.com>
2218
2219         Unreviewed, placate -Wmismatched-tags after r187011
2220
2221         It's basically bug #146990 again. Oops.
2222
2223         * WebProcess/gtk/SeccompFiltersWebProcessGtk.h:
2224
2225 2015-07-19  Michael Catanzaro  <mcatanzaro@igalia.com>
2226
2227         [GTK] Add seccomp filters support
2228         https://bugs.webkit.org/show_bug.cgi?id=110014
2229
2230         Reviewed by Žan Doberšek.
2231
2232         Allow building with ENABLE_SECCOMP_FILTERS=ON. Based on work by Thiago Marcos P. Santos.
2233
2234         * PlatformGTK.cmake: Support ENABLE_SECCOMP_FILTERS build option.
2235         * WebProcess/gtk/SeccompFiltersWebProcessGtk.cpp: Added.
2236         (WebKit::SeccompFiltersWebProcessGtk::SeccompFiltersWebProcessGtk):
2237         (WebKit::SeccompFiltersWebProcessGtk::platformInitialize):
2238         * WebProcess/gtk/SeccompFiltersWebProcessGtk.h: Added.
2239         * WebProcess/soup/WebProcessSoup.cpp:
2240         (WebKit::WebProcess::platformInitializeWebProcess): Initialize default
2241         GTK+ web process seccomp filters.
2242
2243 2015-07-18  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2244
2245         Reduce PassRefPtr in WebKit2 - 3
2246         https://bugs.webkit.org/show_bug.cgi?id=146995
2247
2248         Reviewed by Daniel Bates.
2249
2250         To remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
2251         Because some uses depend on WebCore, WebCore, WK1 ports are modified as well.
2252
2253         * DatabaseProcess/DatabaseProcess.cpp:
2254         (WebKit::DatabaseProcess::getOrCreateUniqueIDBDatabase):
2255         * DatabaseProcess/DatabaseProcess.h:
2256         * PluginProcess/PluginControllerProxy.cpp:
2257         (WebKit::PluginControllerProxy::takeInitializationReply):
2258         * PluginProcess/PluginControllerProxy.h:
2259         * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
2260         (WebKit::CoordinatedBackingStore::texture):
2261         * Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
2262         (WebKit::CoordinatedBackingStore::create):
2263         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
2264         (WebKit::WebCoordinatedSurface::create):
2265         (WebKit::WebCoordinatedSurface::createWithSurface):
2266         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
2267         * UIProcess/API/APILoaderClient.h:
2268         (API::LoaderClient::webCryptoMasterKey):
2269         * UIProcess/API/APINavigationClient.h:
2270         (API::NavigationClient::webCryptoMasterKey):
2271         * UIProcess/API/C/WKPage.cpp:
2272         (WKPageSetPageLoaderClient):
2273         (WKPageSetPageNavigationClient):
2274         * UIProcess/API/gtk/PageClientImpl.cpp:
2275         (WebKit::PageClientImpl::createPopupMenuProxy):
2276         (WebKit::PageClientImpl::createContextMenuProxy):
2277         (WebKit::PageClientImpl::createColorPicker):
2278         * UIProcess/API/gtk/PageClientImpl.h:
2279         * UIProcess/Authentication/WebCredential.h:
2280         * UIProcess/Authentication/WebProtectionSpace.h:
2281         * UIProcess/AutoCorrectionCallback.h:
2282         * UIProcess/Cocoa/NavigationState.h:
2283         * UIProcess/Cocoa/NavigationState.mm:
2284         (WebKit::NavigationState::NavigationClient::webCryptoMasterKey):
2285         * UIProcess/CoordinatedGraphics/WebView.cpp:
2286         (WebKit::WebView::createPopupMenuProxy):
2287         (WebKit::WebView::createContextMenuProxy):
2288         (WebKit::WebView::createColorPicker):
2289         * UIProcess/CoordinatedGraphics/WebView.h:
2290         * UIProcess/PageClient.h:
2291         * UIProcess/WebPageProxy.h:
2292         * UIProcess/efl/WebViewEfl.cpp:
2293         (WebKit::WebViewEfl::createPopupMenuProxy):
2294         (WebKit::WebViewEfl::createContextMenuProxy):
2295         (WebKit::WebViewEfl::createColorPicker):
2296         * UIProcess/efl/WebViewEfl.h:
2297         * UIProcess/ios/PageClientImplIOS.h:
2298         * UIProcess/ios/PageClientImplIOS.mm:
2299         (WebKit::PageClientImpl::createPopupMenuProxy):
2300         (WebKit::PageClientImpl::createContextMenuProxy):
2301         * UIProcess/ios/WebPageProxyIOS.mm:
2302         (WebKit::WebPageProxy::dataSelectionForPasteboard):
2303         * UIProcess/mac/PageClientImpl.h:
2304         * UIProcess/mac/PageClientImpl.mm:
2305         (WebKit::PageClientImpl::createPopupMenuProxy):
2306         (WebKit::PageClientImpl::createContextMenuProxy):
2307         (WebKit::PageClientImpl::createColorPicker):
2308         * UIProcess/mac/WebPageProxyMac.mm:
2309         (WebKit::WebPageProxy::dataSelectionForPasteboard):
2310         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2311         (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad):
2312         (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad):
2313         * WebProcess/Network/WebResourceLoadScheduler.h:
2314         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2315         (WebKit::NetscapePlugin::fromNPP):
2316         (WebKit::NetscapePlugin::snapshot):
2317         (WebKit::NetscapePlugin::liveResourceData):
2318         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2319         * WebProcess/Plugins/Plugin.h:
2320         * WebProcess/Plugins/PluginProxy.cpp:
2321         (WebKit::PluginProxy::snapshot):
2322         (WebKit::PluginProxy::liveResourceData):
2323         * WebProcess/Plugins/PluginProxy.h:
2324         * WebProcess/Storage/StorageNamespaceImpl.cpp:
2325         (WebKit::StorageNamespaceImpl::storageArea):
2326         (WebKit::StorageNamespaceImpl::copy):
2327         * WebProcess/Storage/StorageNamespaceImpl.h:
2328         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
2329         (WebKit::toHistoryItem):
2330         * WebProcess/WebCoreSupport/SessionStateConversion.h:
2331         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2332         (WebKit::WebChromeClient::createPopupMenu):
2333         (WebKit::WebChromeClient::createSearchPopupMenu):
2334         * WebProcess/WebCoreSupport/WebChromeClient.h:
2335         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2336         (WebKit::WebFrameLoaderClient::createDocumentLoader):
2337         (WebKit::WebFrameLoaderClient::createFrame):
2338         (WebKit::WebFrameLoaderClient::createPlugin):
2339         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2340         * WebProcess/WebPage/WebPage.cpp:
2341         (WebKit::WebPage::create):
2342         (WebKit::WebPage::createDocumentLoader):
2343         * WebProcess/WebPage/WebPage.h:
2344         * WebProcess/WebPage/mac/WebPageMac.mm:
2345         (WebKit::WebPage::lookupTextAtLocation):
2346
2347 2015-07-18  Simon Fraser  <simon.fraser@apple.com>
2348
2349         Scroll position jumps when scrolling scaling pages down in split view
2350         https://bugs.webkit.org/show_bug.cgi?id=147072
2351         rdar://problem/21769577
2352
2353         Reviewed by Sam Weinig.
2354         
2355         When apple.com/music is in Split View at a reduced scale, scrolling the page
2356         can cause unwanted scroll jumps. This happened because we'd enter
2357         TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded() with a pending
2358         layout, so run the autosizing logic. When scrolled near the bottom, the unconstrained
2359         layout resulted in a shorter document, which truncated the scroll position. The
2360         scaled layout then restored the longer document, but it also restored that
2361         truncated scroll position.
2362         
2363         Forcing a layout is sufficient to fix the bug for this page, and doing a single
2364         layout (which will happen anyway) is preferable to running the autosize logic
2365         if layout happens to be dirty.
2366
2367         I was not able to make a test to reproduce the problem. Entering
2368         scaleViewToFitDocumentIfNeeded() with pending layout was triggerable
2369         using a transform transition, but I was not able to reproduce incorrect
2370         scroll position restoration.
2371
2372         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2373         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
2374
2375 2015-07-17  Andy Estes  <aestes@apple.com>
2376
2377         [iOS] Further tighten the sandbox around pages fetched with Content-Disposition: attachment
2378         https://bugs.webkit.org/show_bug.cgi?id=147044
2379         rdar://problem/21567820
2380
2381         Reviewed by Brady Eidson.
2382
2383         * WebProcess/WebPage/WebPage.cpp:
2384         (WebKit::WebPage::WebPage): Enabled Content-Disposition: attachment sandbox on iOS.
2385
2386 2015-07-17  Tim Horton  <timothy_horton@apple.com>
2387
2388         [iOS] TextIndicator has a large forehead when line-height > 1
2389         https://bugs.webkit.org/show_bug.cgi?id=147058
2390         <rdar://problem/21643094>
2391
2392         Reviewed by Dean Jackson.
2393
2394         * WebProcess/WebPage/ios/WebPageIOS.mm:
2395         (WebKit::WebPage::getPositionInformation):
2396         Apply a review comment that I left myself and then forgot about.
2397
2398 2015-07-17  Enrica Casucci  <enrica@apple.com>
2399
2400         [iOS] Implement selectionInteractionAssistant accessor.
2401         https://bugs.webkit.org/show_bug.cgi?id=147054
2402         rdar://problem/20864286
2403
2404         Reviewed by Tim Horton.
2405
2406         One more change to adopt the new selection interaction
2407         model on iOS.
2408
2409         * UIProcess/ios/WKContentViewInteraction.mm:
2410         (-[WKContentView selectionInteractionAssistant]):
2411
2412 2015-07-17  Dan Bernstein  <mitz@apple.com>
2413
2414         REGRESSION (r186964): Crash in WebKit2.CloseFromWithinCreatePage
2415         https://bugs.webkit.org/show_bug.cgi?id=147055
2416
2417         Reviewed by Alex Christensen.
2418
2419         * UIProcess/WebPageProxy.cpp:
2420         (WebKit::WebPageProxy::createNewPage): Grab the main frame’s URL before calling out to the
2421         client, who may destroy the frame.
2422
2423 2015-07-17  Dan Bernstein  <mitz@apple.com>
2424
2425         WebKit2 part of <rdar://problem/21803781> The external URL policy is not reported correctly in navigation actions that create new windows
2426         https://bugs.webkit.org/show_bug.cgi?id=147040
2427
2428         Reviewed by Dean Jackson.
2429
2430         * UIProcess/Cocoa/UIDelegate.mm:
2431         (WebKit::UIDelegate::UIClient::createNewPage): Disallow App Links if the new page is for the
2432         same protocol, host and port as the main frame of this page.
2433
2434         * UIProcess/WebPageProxy.cpp:
2435         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Disallow App Links if
2436         m_shouldSuppressAppLinksInNextNavigationPolicyDecision is set, and reset it. See below for
2437         when we set it.
2438         (WebKit::WebPageProxy::decidePolicyForNewWindowAction): Disallow App Links if the new window
2439         is for the same protocol, host and port as the main frame of this page.
2440         (WebKit::WebPageProxy::createNewPage): Make the new page disallow App Links in the first
2441         policy decision if it is for the same protocol, host and port as the main frame of this
2442         page.
2443         * UIProcess/WebPageProxy.h: Added m_shouldSuppressAppLinksInNextNavigationPolicyDecision
2444         member variable.
2445
2446         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2447         (WebKit::WebChromeClient::createWindow): Pass the shouldOpenExternalURLsPolicy.
2448
2449         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2450         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.
2451
2452 2015-07-17  Tim Horton  <timothy_horton@apple.com>
2453
2454         iOS TextIndicators include text that is not supposed to be indicated
2455         https://bugs.webkit.org/show_bug.cgi?id=147028
2456         <rdar://problem/21643094>
2457
2458         Reviewed by Sam Weinig.
2459
2460         * WebProcess/Plugins/PluginView.cpp:
2461         (WebKit::PluginView::shouldCreateTransientPaintingSnapshot):
2462
2463 2015-07-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2464
2465         [GTK] Cleanup PasteboardHelper
2466         https://bugs.webkit.org/show_bug.cgi?id=147035
2467
2468         Reviewed by Žan Doberšek.
2469
2470         Use PasteboardHelper::singleton() instead of
2471         PasteboardHelper::defaultPasteboardHelper().
2472
2473         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2474         (webkitWebViewBaseConstructed):
2475         * UIProcess/gtk/DragAndDropHandler.cpp:
2476         (WebKit::DragAndDropHandler::startDrag):
2477         (WebKit::DragAndDropHandler::fillDragData):
2478         (WebKit::DragAndDropHandler::dataObjectForDropData):
2479         (WebKit::DragAndDropHandler::requestDragData):
2480
2481 2015-07-16  Matt Baker  <mattbaker@apple.com>
2482
2483         [Mac] Web Inspector toolbar can be covered by the Safari tab bar when docked to the right
2484         https://bugs.webkit.org/show_bug.cgi?id=146994
2485
2486         Reviewed by Timothy Hatcher.
2487
2488         WebInspectorProxy contained logic which ignored the next frame change notification from the inspected view,
2489         whenever it updated the frames of both the Inspector view and inspected view. This patch removes that logic,
2490         as it prevented the Inspector's frame from being adjusted after changes to the browser's top content inset.
2491
2492         * UIProcess/mac/WebInspectorProxyMac.mm:
2493         (-[WKWebInspectorProxyObjCAdapter ignoreNextInspectedViewFrameDidChange]): Deleted.
2494         (-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]): Deleted.
2495         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Deleted.
2496
2497 2015-07-16  Joseph Pecoraro  <pecoraro@apple.com>
2498
2499         Web Inspector: [Mac] Save dialog not working when inspector is docked
2500         https://bugs.webkit.org/show_bug.cgi?id=146991
2501
2502         Reviewed by Sam Weinig.
2503
2504         * UIProcess/mac/WebInspectorProxyMac.mm:
2505         (WebKit::runOpenPanel):
2506         (WebKit::WebInspectorProxy::platformSave):
2507         When the window is nil (docked) use a non-window version of running the dialog.
2508
2509 2015-07-16  Tim Horton  <timothy_horton@apple.com>
2510
2511         Add shrink-wrapped link highlights
2512         https://bugs.webkit.org/show_bug.cgi?id=147021
2513         <rdar://problem/21643094>
2514
2515         Reviewed by Enrica Casucci.
2516
2517         * Shared/InteractionInformationAtPosition.cpp:
2518         (WebKit::InteractionInformationAtPosition::encode):
2519         (WebKit::InteractionInformationAtPosition::decode):
2520         * Shared/InteractionInformationAtPosition.h:
2521         Add a TextIndicator to InteractionInformationAtPosition.
2522         Make use of some new C++ features.
2523
2524         * UIProcess/ios/WKContentViewInteraction.h:
2525         * UIProcess/ios/WKContentViewInteraction.mm:
2526         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
2527         (-[WKContentView didDismissPreviewViewController:committing:]):
2528         Make use of the TextIndicator (if we have one) to show a shrink-wrapped
2529         snapshot of the link.
2530
2531         * WebProcess/WebPage/ios/WebPageIOS.mm:
2532         (WebKit::WebPage::getPositionInformation):
2533         Build a TextIndicator for the link if possible.
2534
2535 2015-07-16  Matt Rajca  <mrajca@apple.com>
2536
2537         Media Session: remove plumbing for delivering start/end-of-interruption events
2538         https://bugs.webkit.org/show_bug.cgi?id=147005
2539
2540         Reviewed by Eric Carlson.
2541
2542         Instead of receiving interruptions through WebKit, we will provide platform-specific implementations in WebCore
2543         so the same behavior is available to all clients.
2544
2545         * UIProcess/API/C/WKPage.cpp:
2546         * UIProcess/API/C/WKPagePrivate.h:
2547         * UIProcess/WebPageProxy.cpp:
2548         * UIProcess/WebPageProxy.h:
2549         * WebProcess/WebPage/WebPage.cpp:
2550         * WebProcess/WebPage/WebPage.h:
2551         * WebProcess/WebPage/WebPage.messages.in:
2552
2553 2015-07-16  Michael Catanzaro  <mcatanzaro@igalia.com>
2554
2555         REGRESSION(r186464): [SOUP] ASSERTION FAILED: !m_messageReceiverMapCount when closing any tab
2556         https://bugs.webkit.org/show_bug.cgi?id=147006
2557
2558         Reviewed by Anders Carlsson.
2559
2560         Remove the message receiver before it is deallocated.
2561
2562         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
2563         (WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
2564
2565 2015-07-16  Brady Eidson  <beidson@apple.com>
2566
2567         Review feedback followup for:
2568         REGRESSION(r186088): Crash under WebKit::WebPageProxy::didFailLoadForFrame
2569         <rdar://problem/21692212> and https://bugs.webkit.org/show_bug.cgi?id=146988
2570
2571         * UIProcess/mac/PageClientImpl.mm:
2572         (WebKit::PageClientImpl::refView): CFRetain instead of Obj-C retain.
2573         (WebKit::PageClientImpl::derefView): CFRelease instead of Obj-C release.
2574
2575
2576 2015-07-16  Michael Catanzaro  <mcatanzaro@igalia.com>
2577
2578         [Linux] Seccomp: fix -Wmismatched-tags
2579         https://bugs.webkit.org/show_bug.cgi?id=146990
2580
2581         Reviewed by Žan Doberšek.
2582
2583         WebProcessCreationParameters is a struct nowadays, not a class, so declare it appropriately.
2584
2585         * Shared/linux/SeccompFilters/SyscallPolicy.h:
2586
2587 2015-07-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2588
2589         REGRESSION(r185415): [GTK] Browsers crash when an input method is enabled
2590         https://bugs.webkit.org/show_bug.cgi?id=146639
2591
2592         Reviewed by Žan Doberšek.
2593
2594         In r185415 I assumed that preedit signals were always emitted
2595         after a keypress was handled by the WebView. However, some input
2596         methods handle the keyboard events before the WebView, and preedit
2597         signals are emitted but no key event has been handled by the
2598         WebView. So, instead of asserting when filter key event completion
2599         handler is nullptr, we should check whether the current event was
2600         generated for a WebView filter request or not. In case the
2601         completion handler is nullptr, we send the event directly to the
2602         page, instead of going through the WebView, since there won't be
2603         editing commands for those events anyway.
2604
2605         * UIProcess/gtk/InputMethodFilter.cpp:
2606         (WebKit::InputMethodFilter::handleKeyboardEvent):
2607         (WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults):
2608
2609 2015-07-15  Carlos Garcia Campos  <cgarcia@igalia.com>
2610
2611         Unreviewed. Follow up to r186887 for GTK+.
2612
2613         Add GTK+ implementation of PageClientImpl::refView/derefView.
2614
2615         * UIProcess/API/gtk/PageClientImpl.cpp:
2616         (WebKit::PageClientImpl::refView):
2617         (WebKit::PageClientImpl::derefView):
2618         * UIProcess/API/gtk/PageClientImpl.h:
2619
2620 2015-07-15  Carlos Garcia Campos  <cgarcia@igalia.com>
2621
2622         [GTK] Input method filter is always enabled when the view is focused
2623         https://bugs.webkit.org/show_bug.cgi?id=146965
2624
2625         Reviewed by Martin Robinson.
2626
2627         It should only be enabled when the view is focused and there's an
2628         editable element focused. In r138544, when input methods were
2629         implemented, the message SetInputMethodState was added, but it was
2630         never used. Instead, the notifyFocusIn method of the IM filter
2631         enables the input method unconditionally. We should actually use
2632         the SetInputMethodState message to enable/disable input methods
2633         when editable elements are focused/unfocused.
2634
2635         * UIProcess/gtk/InputMethodFilter.cpp:
2636         (WebKit::InputMethodFilter::setEnabled): Call notifyFocusedIn/Out
2637         when inputs methods are enabled/disabled instead of notifying the
2638         IM context directly.
2639         (WebKit::InputMethodFilter::setCursorRect): Do not update the
2640         cursor position if input methods are didabled.
2641         (WebKit::InputMethodFilter::notifyFocusedIn): Do nothing when
2642         input methods are disabled. Do not enable input methods
2643         uncontionally here.
2644         (WebKit::InputMethodFilter::notifyFocusedOut): Do not disable
2645         input methods uncontionally here.
2646         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2647         (WebKit::WebEditorClient::setInputMethodState): Call
2648         WebPage::setInputMethodState() for GTK platform.
2649         * WebProcess/WebPage/WebPage.h: Add setInputMethodState() for GTK platform.
2650         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2651         (WebKit::WebPage::setInputMethodState): Update input method state
2652         and send SetInputMethodState message to the UI process if state changed.
2653
2654 2015-07-15  Brady Eidson  <beidson@apple.com>
2655
2656         REGRESSION(r186088): Crash under WebKit::WebPageProxy::didFailLoadForFrame
2657         <rdar://problem/21692212> and https://bugs.webkit.org/show_bug.cgi?id=146988
2658
2659         Reviewed by Sam Weinig.
2660
2661         When a loader delegate callback results in the WKView getting deallocated, then the PageClient
2662         is also destroyed.
2663
2664         WebPageProxy then (often) turns around and uses the PageClient anyways.
2665
2666         Tried to write a TestWebKitAPI test for this, but only didFailLoadForFrame appears to obviously 
2667         be vulnerable, and there seems to be no way to reproduce that failure case under TestWebKitAPI.
2668
2669         * UIProcess/PageClient.h: Add ref/derefView.
2670
2671         * UIProcess/API/gtk/PageClientImpl.h: Stub them out.
2672         * UIProcess/efl/WebViewEfl.h: Stub them out.
2673
2674         * UIProcess/mac/PageClientImpl.h:
2675         * UIProcess/mac/PageClientImpl.mm:
2676         (WebKit::PageClientImpl::refView): [m_wkView retain]
2677         (WebKit::PageClientImpl::derefView): [m_wkView release]
2678
2679         * UIProcess/ios/PageClientImplIOS.h:
2680         * UIProcess/ios/PageClientImplIOS.mm:
2681         (WebKit::PageClientImpl::refView): Retain all 3 views.
2682         (WebKit::PageClientImpl::derefView): Release all 3 views.
2683
2684         * UIProcess/WebPageProxy.cpp:
2685         (WebKit::PageClientProtector::PageClientProtector): Calls refView() on the PageClient.
2686         (WebKit::PageClientProtector::~PageClientProtector): Calls derefView() on the PageClient.
2687         (WebKit::WebPageProxy::didChangeBackForwardList): All methods that make m_loaderClient or
2688           m_pageClient callouts get a protector at their head.
2689         (WebKit::WebPageProxy::willGoToBackForwardListItem):
2690         (WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
2691         (WebKit::WebPageProxy::findPlugin):
2692         (WebKit::WebPageProxy::didCreateMainFrame):
2693         (WebKit::WebPageProxy::didCreateSubframe):
2694         (WebKit::WebPageProxy::didStartProgress):
2695         (WebKit::WebPageProxy::didChangeProgress):
2696         (WebKit::WebPageProxy::didFinishProgress):
2697         (WebKit::WebPageProxy::didDestroyNavigation):
2698         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
2699         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
2700         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
2701         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
2702         (WebKit::WebPageProxy::didCommitLoadForFrame):
2703         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
2704         (WebKit::WebPageProxy::didFinishLoadForFrame):
2705         (WebKit::WebPageProxy::didFailLoadForFrame):
2706         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
2707         (WebKit::WebPageProxy::didReceiveTitleForFrame):
2708         (WebKit::WebPageProxy::didFirstLayoutForFrame):
2709         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
2710         (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
2711         (WebKit::WebPageProxy::didLayout):
2712         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
2713         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
2714         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
2715         (WebKit::WebPageProxy::didDetectXSSForFrame):
2716         (WebKit::WebPageProxy::frameDidBecomeFrameSet):
2717         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2718         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
2719         (WebKit::WebPageProxy::decidePolicyForResponse):
2720         (WebKit::WebPageProxy::decidePolicyForResponseSync):
2721         (WebKit::WebPageProxy::unableToImplementPolicy):
2722         (WebKit::WebPageProxy::didNavigateWithNavigationData):
2723         (WebKit::WebPageProxy::didPerformClientRedirect):
2724         (WebKit::WebPageProxy::didPerformServerRedirect):
2725         (WebKit::WebPageProxy::didUpdateHistoryTitle):
2726         (WebKit::WebPageProxy::wrapCryptoKey):
2727         (WebKit::WebPageProxy::unwrapCryptoKey):
2728         (WebKit::WebPageProxy::navigationGestureDidBegin):
2729         (WebKit::WebPageProxy::navigationGestureWillEnd):
2730         (WebKit::WebPageProxy::navigationGestureDidEnd):
2731         (WebKit::WebPageProxy::willRecordNavigationSnapshot):
2732
2733 2015-07-15  Sam Weinig  <sam@webkit.org>
2734
2735         Color match plug-ins
2736         <rdar://problem/21758722>
2737         https://bugs.webkit.org/show_bug.cgi?id=146987
2738
2739         Reviewed by Dean Jackson.
2740
2741         * Platform/mac/LayerHostingContext.h:
2742         * Platform/mac/LayerHostingContext.mm:
2743         (WebKit::LayerHostingContext::setColorMatchUntaggedContent):
2744         (WebKit::LayerHostingContext::colorMatchUntaggedContent):
2745         Add setter/getter for color matching untagged content.
2746
2747         * PluginProcess/mac/PluginControllerProxyMac.mm:
2748         (WebKit::PluginControllerProxy::updateLayerHostingContext):
2749         Have plug-ins CAContext's color match untagged colors into sRGB.
2750
2751 2015-07-15  Michael Catanzaro  <mcatanzaro@igalia.com>
2752
2753         [GTK] Rename PACKAGE_LOCALE_DIR to LOCALEDIR
2754         https://bugs.webkit.org/show_bug.cgi?id=146975
2755
2756         Reviewed by Martin Robinson.
2757
2758         * PlatformGTK.cmake:
2759         * UIProcess/API/gtk/WebKitWebContext.cpp:
2760         (webkit_web_context_class_init):
2761         * WebProcess/gtk/WebProcessMainGtk.cpp:
2762
2763 2015-07-15  Michael Catanzaro  <mcatanzaro@igalia.com>
2764
2765         [GTK] Rename LIBEXECDIR to PKGLIBEXECDIR
2766         https://bugs.webkit.org/show_bug.cgi?id=140070
2767
2768         Reviewed by Martin Robinson.
2769
2770         The path that's currently stored in LIBEXECDIR is one level lower than
2771         the real LIBEXECDIR, which we are going to need. Introduce PKGLIBEXECDIR
2772         so that we can use LIBEXECDIR for the real LIBEXECDIR in the future.
2773
2774         * PlatformGTK.cmake:
2775         * Shared/gtk/ProcessExecutablePathGtk.cpp:
2776         (WebKit::findWebKitProcess):
2777
2778 2015-07-15  Daniel Bates  <dabates@apple.com>
2779
2780         [Mac][WK2] Videos should only have access to cookies when -[NSURLRequest HTTPShouldHandleCookies] is YES
2781         https://bugs.webkit.org/show_bug.cgi?id=146763
2782         <rdar://problem/21736994>
2783
2784         Reviewed by Darin Adler.
2785
2786         We should only fetch cookies from the Network process when -[NSURLRequest HTTPShouldHandleCookies] is YES.
2787         This makes us more closely match the behavior of the CFNetwork implementation of
2788         -[__NSURLSessionLocal {_copyCookiesForRequestUsingAllAppropriateStorageSemantics, _getCookieHeadersForTask:completionHandler}].
2789
2790         * Shared/mac/CookieStorageShim.mm:
2791         (-[WKNSURLSessionLocal _copyCookiesForRequestUsingAllAppropriateStorageSemantics:]):
2792         (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
2793
2794 2015-07-14  Enrica Casucci  <enrica@apple.com>
2795
2796         [iOS] Add support for updateSelectionWithExtentPoint:withBoundary.
2797         https://bugs.webkit.org/show_bug.cgi?id=146951
2798         rdar://problem/20864286
2799
2800         Reviewed by Tim Horton.
2801
2802         Add implementation for new method used by text selection
2803         engine on iOS. The new function modifies the selection near the given point
2804         and snaps it at the boundary of the specified granularity.
2805
2806         * UIProcess/WebPageProxy.h:
2807         * UIProcess/ios/WKContentViewInteraction.mm:
2808         (-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
2809         (-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]):
2810         (-[WKContentView _characterBeforeCaretSelection]):
2811         * UIProcess/ios/WebPageProxyIOS.mm:
2812         (WebKit::WebPageProxy::updateSelectionWithExtentPoint):
2813         (WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
2814         (WebKit::WebPageProxy::requestDictationContext):
2815         * WebProcess/WebPage/WebPage.h:
2816         * WebProcess/WebPage/WebPage.messages.in:
2817         * WebProcess/WebPage/ios/WebPageIOS.mm:
2818         (WebKit::WebPage::rangeForGranularityAtPoint):
2819         (WebKit::WebPage::selectTextWithGranularityAtPoint):
2820         (WebKit::WebPage::updateSelectionWithExtentPointAndBoundary):
2821
2822 2015-07-15  Michael Catanzaro  <mcatanzaro@igalia.com>
2823
2824         [Linux] SeccompBrokerClient should cache arbitrary file descriptors
2825         https://bugs.webkit.org/show_bug.cgi?id=140068
2826
2827         Reviewed by Žan Doberšek.
2828
2829         If malloc() attempts to open /proc/sys/vm/overcommit_memory in a SIGSYS
2830         signal handler, the SeccompBroker will attempt to recursively broker the
2831         open() syscall. Generalize the existing code that already handles the
2832         similar case where malloc() opens /sys/devices/system/cpu/online to
2833         handle this situation as well.
2834
2835         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
2836         (WebKit::SIGSYSHandler):
2837         (WebKit::SeccompBrokerClient::SeccompBrokerClient):
2838         (WebKit::SeccompBrokerClient::~SeccompBrokerClient):
2839         (WebKit::SeccompBrokerClient::handleIfOpeningCachedFile):
2840         (WebKit::SeccompBrokerClient::cacheFile):
2841         (WebKit::SeccompBrokerClient::handleIfOpeningOnlineCPUCount): Deleted.
2842
2843 2015-07-15  ChangSeok Oh  <changseok.oh@collabora.com>
2844
2845         [GTK] Accelerated compositing is enabled by MiniBrowser in Wayland
2846         https://bugs.webkit.org/show_bug.cgi?id=146827
2847
2848         Reviewed by Žan Doberšek.
2849
2850         WebKit2Gtk+ does not currently support accelerated compositing. For the reason,
2851         we forcedly disable it in webkitWebViewBaseCreateWebPage. However, when we launch
2852         MiniBrowser in wayland, the unsupported feature is re-enabled since the existing
2853         setting is overwritten by a newly created one. Here the default value for
2854         accelerated compositing is true. We can fix this by moving the code disabling
2855         accelerated composition to WebPreferences::platformInitializeStore() so that
2856         we make sure the accelerated compositing is always disabled for wayland.
2857
2858         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2859         (webkitWebViewBaseCreateWebPage): Deleted.
2860         * UIProcess/gtk/WebPreferencesGtk.cpp:
2861         (WebKit::WebPreferences::platformInitializeStore):
2862
2863 2015-07-15  Dan Bernstein  <mitz@apple.com>
2864
2865         Fixed build fix.
2866
2867         * Platform/spi/ios/SafariServicesSPI.h:
2868
2869 2015-07-14  Ryuan Choi  <ryuan.choi@navercorp.com>
2870
2871         [CoordinatedGraphics] Possible wrong rendering with scrolling
2872         https://bugs.webkit.org/show_bug.cgi?id=146958
2873
2874         Reviewed by Gyuyoung Kim.
2875
2876         While r174261 fixing build break, there is some mistake that flushes contents layer
2877         instead of overlay layer.
2878
2879         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2880         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
2881
2882 2015-07-14  Dan Bernstein  <mitz@apple.com>
2883
2884         Attempted build fixes.
2885
2886         * Platform/spi/ios/SafariServicesSPI.h:
2887
2888 2015-07-14  Dan Bernstein  <mitz@apple.com>
2889
2890         Attempted build fixes.
2891
2892         * Platform/spi/ios/SafariServicesSPI.h:
2893
2894 2015-07-14  Anders Carlsson  <andersca@apple.com>
2895
2896         Remove wkPopupMenu from WebCoreSystemInterface; it's not called from WebCore
2897         https://bugs.webkit.org/show_bug.cgi?id=146945
2898
2899         Reviewed by Tim Horton.
2900
2901         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2902         (InitWebCoreSystemInterface): Deleted.
2903
2904 2015-07-14  Anders Carlsson  <andersca@apple.com>
2905
2906         Release assert under StyleResolver::loadPendingImages() caused by MemoryPressureHandler
2907         https://bugs.webkit.org/show_bug.cgi?id=146940
2908         rdar://problem/21605505
2909
2910         Reviewed by Sam Weinig.
2911
2912         * WebProcess/WebProcess.cpp:
2913         (WebKit::WebProcess::processWillSuspendImminently):
2914
2915 2015-07-14  Sam Weinig  <sam@webkit.org>
2916
2917         WebKit needs to serialize numeric values in NSError userInfo
2918         <rdar://problem/21818117>
2919         https://bugs.webkit.org/show_bug.cgi?id=146936
2920
2921         Reviewed by Anders Carlsson.
2922
2923         * Shared/mac/WebCoreArgumentCodersMac.mm:
2924         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
2925         Encode userInfo values that are NSNumbers in addition to NSStrings and NSURLs. Decoding 
2926         is already handled.
2927
2928 2015-07-14  Michael Catanzaro  <mcatanzaro@igalia.com>
2929
2930         [Linux] SeccompFilters: whitelist all NPAPI plugin directories
2931         https://bugs.webkit.org/show_bug.cgi?id=140067
2932
2933         Reviewed by Žan Doberšek.
2934
2935         * PlatformEfl.cmake: Build PluginSearchPath.cpp
2936         * PlatformGTK.cmake: Build PluginSearchPath.cpp
2937         * Shared/Plugins/unix/PluginSearchPath.cpp: Added.
2938         (WebKit::pluginsDirectories): Moved from PluginInfoStoreUnix.cpp.
2939         * Shared/Plugins/unix/PluginSearchPath.h: Added.
2940         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
2941         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy): Add the entire
2942         plugin search path to the whitelist.
2943         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
2944         (WebKit::PluginInfoStore::pluginsDirectories): Now gets plugins
2945         directories from PluginSearchPath.cpp
2946
2947 2015-07-14  Yongjun Zhang  <yongjun_zhang@apple.com>
2948
2949         https://bugs.webkit.org/show_bug.cgi?id=146917
2950         iOS WebKit doesn't build.
2951         rdar://problem/21801544
2952
2953         Fix the build - don't use deprecated methods.
2954
2955         Reviewed by Dan Bernstein.
2956
2957         * UIProcess/ios/WKContentViewInteraction.h:
2958         * UIProcess/ios/WKContentViewInteraction.mm:
2959         (-[WKContentView _registerPreviewInWindow:]):
2960         (-[WKContentView _unregisterPreviewInWindow:]):
2961
2962 2015-07-14  Yongjun Zhang  <yongjun_zhang@apple.com>
2963
2964         https://bugs.webkit.org/show_bug.cgi?id=146909
2965         Add actions for default link preview that uses SFSafariViewController.
2966
2967         Use the new private properties to prepare actions for the default link preview controller.
2968
2969         Reviewed by Dan Bernstein.
2970
2971         * UIProcess/ios/WKContentViewInteraction.mm:
2972         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
2973
2974 2015-07-14  Michael Catanzaro  <mcatanzaro@igalia.com>
2975
2976         [Linux] SeccompFilters: whitelist source directory on all ports
2977         https://bugs.webkit.org/show_bug.cgi?id=140066
2978
2979         Reviewed by Žan Doberšek.
2980
2981         Move this from EFL to port-independent code.
2982
2983         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
2984         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
2985         * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp:
2986         (WebKit::SeccompFiltersWebProcessEfl::platformInitialize):
2987
2988 2015-07-14  Zan Dobersek  <zdobersek@igalia.com>
2989
2990         [GTK] Add a runtime check for X11 display in webkitWebViewBaseExitAcceleratedCompositingMode()
2991         https://bugs.webkit.org/show_bug.cgi?id=146711
2992
2993         Reviewed by Carlos Garcia Campos.
2994
2995         webkitWebViewBaseExitAcceleratedCompositingMode() is already guarded with
2996         X11 build guards, but it should also do a runtime check that the program
2997         is running under an X11 display before proceeding.
2998
2999         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3000         (webkitWebViewBaseDidRelaunchWebProcess):
3001
3002 2015-07-13  Matt Rajca  <mrajca@apple.com>
3003
3004         Media Session: add plumbing for delivering start/end-of-interruption events
3005         https://bugs.webkit.org/show_bug.cgi?id=146837
3006
3007         Reviewed by Tim Horton.
3008
3009         * UIProcess/API/C/WKPage.cpp:
3010         (WKPageHandleMediaSessionInterruptionEvent):
3011         * UIProcess/API/C/WKPagePrivate.h:
3012         * UIProcess/WebPageProxy.cpp:
3013         (WebKit::WebPageProxy::handleMediaSessionInterruptionEvent):
3014         * UIProcess/WebPageProxy.h:
3015         * WebProcess/WebPage/WebPage.cpp:
3016         (WebKit::WebPage::handleMediaSessionInterruptionEvent):
3017         * WebProcess/WebPage/WebPage.h:
3018         * WebProcess/WebPage/WebPage.messages.in:
3019
3020 2015-07-13  Simon Fraser  <simon.fraser@apple.com>
3021
3022         [iOS WK2] When choosing an initial viewport scale, take overflow on the <body> into account
3023         https://bugs.webkit.org/show_bug.cgi?id=146918
3024         rdar://problem/9222837
3025
3026         Reviewed by Tim Horton.
3027
3028         Use as input to the viewport scaling algorithm a contents size from the FrameView
3029         that takes overflow on the viewport renderer into account. This prevents unexpected
3030         viewports scaling on pages that have content that overflows their expressed contents size,
3031         but apply overflow to the <body>.
3032
3033         * WebProcess/WebPage/WebPage.cpp:
3034         (WebKit::WebPage::mainFrameDidLayout): Use contentsSizeRespectingOverflow(),
3035         rather than raw contentsSize(), to determine scaling.
3036
3037 2015-07-13  Dan Bernstein  <mitz@apple.com>
3038
3039         Fixed the build.
3040
3041         * UIProcess/ios/WKContentViewInteraction.mm:
3042         (-[WKContentView _registerPreviewInWindow:]):
3043         (-[WKContentView _unregisterPreviewInWindow:]):
3044
3045 2015-07-13  Dan Bernstein  <mitz@apple.com>
3046
3047         Removed now-unused SPI -[WKWebView _loadRequest:withOptions:].
3048
3049         Rubber-stamped by Anders Carlsson.
3050
3051         * UIProcess/API/Cocoa/WKWebView.mm:
3052         (-[WKWebView _loadRequest:withOptions:]): Deleted.
3053         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3054
3055 2015-07-13  Anders Carlsson  <andersca@apple.com>
3056
3057         Apps linked with a deployment target of iOS 7.x or earlier crash when using modern WebKit API
3058         https://bugs.webkit.org/show_bug.cgi?id=146913
3059         rdar://problem/21789252
3060
3061         Reviewed by Dan Bernstein.
3062
3063         Make a top-level symlink from /System/Library/PrivateFrameworks/WebKit.framework to
3064         /System/Library/Frameworks/WebKit.framework.
3065
3066         * WebKit2.xcodeproj/project.pbxproj:
3067
3068 2015-07-13  Anders Carlsson  <andersca@apple.com>
3069
3070         Silverlight causes tabs to hang
3071         https://bugs.webkit.org/show_bug.cgi?id=146912
3072         rdar://problem/21686508
3073
3074         Reviewed by Sam Weinig.
3075
3076         Make sure to link production builds of the legacy plug-in process against the shim on 10.11 and newer.
3077
3078         * Configurations/PluginProcess.xcconfig:
3079
3080 2015-07-13  Michael Catanzaro  <mcatanzaro@igalia.com>
3081
3082         [Linux] SeccompFilters: handle alternate install prefixes
3083         https://bugs.webkit.org/show_bug.cgi?id=140065
3084
3085         Reviewed by Žan Doberšek.
3086
3087         If the install prefix is something other than /usr, e.g. /usr/local or
3088         ~/jhbuild/install, then we want to make sure to allow libraries and data
3089         from that prefix.
3090
3091         * PlatformEfl.cmake:
3092         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
3093         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
3094
3095 2015-07-13  Carlos Garcia Campos  <cgarcia@igalia.com>
3096
3097         [GTK] Contents not correctly laid out when the web view is not realized
3098         https://bugs.webkit.org/show_bug.cgi?id=142532
3099
3100         Reviewed by Darin Adler.
3101
3102         The problem is that we are not reporting any size until the web
3103         view is realized, so any web view loaded in a separate tab in the
3104         browser, will report 0x0 as the window.innerWidth,
3105         window.innerHeight until the view is realized. Websites that use
3106         the window.innerWidth/innerHeight during the page load to decide
3107         how to lay out the contents will be rendered wrongly.
3108         I haven't been able to reproduce this with unit tests, as this
3109         requires the particular case of same window but different web
3110         views using tabs for example.
3111
3112         * UIProcess/API/gtk/PageClientImpl.cpp:
3113         (WebKit::PageClientImpl::viewSize): Always report the drawing area
3114         size to make usre it's in sync with the WebProcess page size.
3115         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3116         (webkitWebViewBaseSizeAllocate): Remove the optimization of only
3117         report the size when it has changed, since both the redirected
3118         window and the drawing area already do that check. Also remove the
3119         optimization of waiting until the view is mapped to report its
3120         size, since that's often too late for websites using the window
3121         size during load.
3122         (webkitWebViewBaseMap): Never report size on map, it should have
3123         already been reported by size-allocate.
3124
3125 2015-07-11  Nikita Vasilyev  <nvasilyev@apple.com>
3126
3127         Web Inspector: Inspector should be able to be docked to the bottom of a narrow window
3128         https://bugs.webkit.org/show_bug.cgi?id=146871
3129
3130         Reviewed by Timothy Hatcher.
3131
3132         * UIProcess/WebInspectorProxy.cpp:
3133         * UIProcess/mac/WebInspectorProxyMac.mm:
3134         (WebKit::WebInspectorProxy::platformCanAttach):
3135         * WebProcess/WebPage/WebInspector.cpp:
3136
3137 2015-07-11  Joseph Pecoraro  <pecoraro@apple.com>
3138
3139         Allow clients to opt-out of default app link link actions
3140         https://bugs.webkit.org/show_bug.cgi?id=146883
3141         <rdar://problem/21221902>
3142
3143         Reviewed by Dan Bernstein.
3144
3145         * UIProcess/API/APIUIClient.h:
3146         (API::UIClient::shouldIncludeAppLinkActionsForElement):
3147         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3148         * UIProcess/Cocoa/UIDelegate.h:
3149         * UIProcess/Cocoa/UIDelegate.mm:
3150         (WebKit::UIDelegate::setDelegate):
3151         (WebKit::UIDelegate::UIClient::shouldIncludeAppLinkActionsForElement):
3152         Plumbing for a new delegate message to ask the client if they
3153         would like app link actions or not. Default is yes.
3154
3155         * UIProcess/ios/WKActionSheetAssistant.h:
3156         * UIProcess/ios/WKActionSheetAssistant.mm:
3157         (-[WKActionSheetAssistant showImageSheet]):
3158         (-[WKActionSheetAssistant showLinkSheet]):
3159         (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
3160         (-[WKActionSheetAssistant defaultActionsForImageSheet:]):
3161         Pass elementInfo into methods generating default actions.
3162         
3163         (-[WKActionSheetAssistant _appendOpenActionsForURL:actions:elementInfo:]):
3164         When generating open actions, if the process has AppLink capabilities
3165         ask the client if they want to include AppLink actions or fall back
3166         to the basic Open action.
3167
3168         * UIProcess/ios/WKContentViewInteraction.mm:
3169         (-[WKContentView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
3170         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
3171         * UIProcess/ios/WKPDFView.mm:
3172         (-[WKPDFView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
3173         Assistant delegate implementations forward to the UIDelegate.
3174
3175 2015-07-11  Joseph Pecoraro  <pecoraro@apple.com>
3176
3177         Update default link action sheets for app links
3178         https://bugs.webkit.org/show_bug.cgi?id=146658
3179         <rdar://problem/21221902>
3180
3181         Reviewed by Dan Bernstein.
3182
3183         * Shared/mac/SandboxUtilities.h:
3184         * Shared/mac/SandboxUtilities.mm: Renamed from Source/WebKit2/Shared/mac/SandboxUtilities.cpp.
3185         (WebKit::processHasEntitlement):
3186         * UIProcess/ApplicationStateTracker.mm:
3187         (WebKit::applicationType):
3188         (WebKit::hasEntitlement): Deleted.
3189         * WebKit2.xcodeproj/project.pbxproj:
3190         Share a helper for checking if the current process has an entitlement.
3191
3192         * UIProcess/API/Cocoa/_WKElementAction.h:
3193         * UIProcess/API/Cocoa/_WKElementAction.mm:
3194         (+[_WKElementAction _elementActionWithType:title:actionHandler:]):
3195         (+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
3196         * UIProcess/API/Cocoa/_WKElementActionInternal.h:
3197         Add an internal way to make an element action with a standard type and regular handler.
3198         We use this for the new standard types that don't have a default implementation.
3199
3200         * UIProcess/ios/WKActionSheetAssistant.mm:
3201         (applicationHasAppLinkEntitlements):
3202         (appLinkForURL):
3203         Helpers checking access to app links and fetching app links.
3204
3205         (-[WKActionSheetAssistant _appendOpenActionsForURL:actions:]):
3206         (-[WKActionSheetAssistant defaultActionsForLinkSheet]):
3207         (-[WKActionSheetAssistant defaultActionsForImageSheet]):
3208         Create "Open in Safari" and "Open in 'App'" default actions for AppLinks,
3209         otherwise add the normal default "Open" action.
3210
3211 2015-07-11  Enrica Casucci  <enrica@apple.com>
3212
3213         Remove incorrect overriding of inputAssistantItem in WKContentView.
3214         https://bugs.webkit.org/show_bug.cgi?id=146863
3215         rdar://problem/21507154
3216
3217         Reviewed by Sam Weinig.
3218
3219         Correction to the patch in r186713.
3220         We need to provide the inputAssistantItem from the responder.
3221
3222         * UIProcess/ios/WKContentViewInteraction.mm:
3223         (-[WKContentView inputAccessoryView]):
3224
3225 2015-07-11  Commit Queue  <commit-queue@webkit.org>
3226
3227         Unreviewed, rolling out r186689 and r186710.
3228         https://bugs.webkit.org/show_bug.cgi?id=146880
3229
3230         May have caused a PLT regression and broken a layout test
3231         (Requested by cdumez on #webkit).
3232
3233         Reverted changesets:
3234
3235         "[WK2] Increase the QoS of some of our WorkQueues to match the
3236         one of our processes"
3237         https://bugs.webkit.org/show_bug.cgi?id=146855
3238         http://trac.webkit.org/changeset/186689
3239
3240         "REGRESSION (r186689?): fast/frames/frame-limit.html timeout
3241         on Mavericks {Release,Debug} WK2 bots"
3242         https://bugs.webkit.org/show_bug.cgi?id=146876
3243         http://trac.webkit.org/changeset/186710
3244
3245 2015-07-10  Enrica Casucci  <enrica@apple.com>
3246
3247         Remove incorrect overriding of inputAssistantItem in WKContentView.
3248         https://bugs.webkit.org/show_bug.cgi?id=146863
3249         rdar://problem/21507154
3250
3251         Reviewed by Dan Bernstein.
3252
3253         Removing implementation of inputAssistantItem and moving initialization
3254         of formAccessoryView to inputAccessoryView to avoid interfering with
3255         the keyboard handling of the assistant bar.
3256
3257         * UIProcess/ios/WKContentViewInteraction.mm:
3258         (-[WKContentView inputAccessoryView]):
3259         (-[WKContentView inputAssistantItem]): Deleted.
3260         (-[WKContentView _inputAssistantItem]): Deleted.
3261
3262 2015-07-10  Simon Fraser  <simon.fraser@apple.com>
3263
3264         [iOS WK2] Scrolling issues on horizontally scrollable RTL pages
3265         https://bugs.webkit.org/show_bug.cgi?id=146872
3266         rdar://problem/7569416
3267
3268         Reviewed by Sam Weinig.
3269
3270         Horizontally scrollable RTL pages in WebKit2 had a variety of issues: they had
3271         a gap down the right edge, and unreachable content on the left side, focussing
3272         form fields scrolled to the wrong location, and programmatic scrolls scrolled
3273         to the wrong place.
3274         
3275         Fix by plumbing the WebCore notion of scrollOrigin through to the UI process,
3276         and using it in various places. There are three main aspects to the patch:
3277         
3278         1. scroll origin is included in RemoteLayerTreeTransaction, and plumbed through
3279            to -[WKWebView _scrollToContentOffset:] for correct programmatic scrolling,
3280            including zooming to focused form elements. The WKContentView's boundsOrigin
3281            is set to the scroll origin so that the view coordinates match document coordinates.
3282         2. WebPageProxy::computeCustomFixedPositionRect() uses the actual documentRect()
3283            rather than just conjuring up a rect with a zero origin, which makes position:fixed
3284            work correctly.
3285         3. _interactionViewsContainerView (which hosts tap highlights) is positioned to 
3286            coincide with the origin of the documentRect (i.e. at the scroll origin, which
3287            may not be top-left). This allows tap highlights to show in the correct location.
3288         4. ScrollView::unobscuredContentRect() is fixed to take scroll origin into account;
3289            if the returned rect is wrong, RenderLayer::hitTest() incorrectly clips the hit
3290            testing area.
3291
3292         * Shared/mac/RemoteLayerTreeTransaction.h:
3293         (WebKit::RemoteLayerTreeTransaction::scrollOrigin):
3294         (WebKit::RemoteLayerTreeTransaction::setScrollOrigin):
3295         * Shared/mac/RemoteLayerTreeTransaction.mm:
3296         (WebKit::RemoteLayerTreeTransaction::encode):
3297         (WebKit::RemoteLayerTreeTransaction::decode):
3298         (WebKit::RemoteLayerTreeTransaction::description): Dump some more info.
3299         * UIProcess/API/Cocoa/WKWebView.mm:
3300         (-[WKWebView _scrollToContentOffset:scrollOrigin:]):
3301         (-[WKWebView _scrollToContentOffset:]): Deleted.
3302         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3303         * UIProcess/API/gtk/PageClientImpl.cpp:
3304         (WebKit::PageClientImpl::requestScroll):
3305         * UIProcess/API/gtk/PageClientImpl.h:
3306         * UIProcess/CoordinatedGraphics/WebView.cpp:
3307         (WebKit::WebView::requestScroll):
3308         * UIProcess/CoordinatedGraphics/WebView.h:
3309         * UIProcess/PageClient.h:
3310         * UIProcess/WebPageProxy.cpp:
3311         (WebKit::WebPageProxy::requestScroll):
3312         * UIProcess/WebPageProxy.h:
3313         * UIProcess/ios/PageClientImplIOS.h:
3314         * UIProcess/ios/PageClientImplIOS.mm:
3315         (WebKit::PageClientImpl::requestScroll):
3316         (WebKit::PageClientImpl::documentRect):
3317         (WebKit::PageClientImpl::contentsSize): Deleted.
3318         * UIProcess/ios/WKContentView.mm:
3319         (-[WKContentView _didCommitLayerTree:]):
3320         * UIProcess/ios/WebPageProxyIOS.mm:
3321         (WebKit::WebPageProxy::computeCustomFixedPositionRect):
3322         * UIProcess/mac/PageClientImpl.h:
3323         * UIProcess/mac/PageClientImpl.mm:
3324         (WebKit::PageClientImpl::requestScroll):
3325         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3326         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
3327         * WebProcess/WebPage/WebPage.cpp:
3328         (WebKit::WebPage::willCommitLayerTree):
3329
3330 2015-07-10  Chris Dumez  <cdumez@apple.com>
3331
3332         [WK2] Diagnostic logging messages are causing too much IPC
3333         https://bugs.webkit.org/show_bug.cgi?id=146873
3334         <rdar://problem/21779205>
3335
3336         Reviewed by Ryosuke Niwa.
3337
3338         Diagnostic logging messages are causing too much IPC. To address the
3339         problem, we now do the sampling of the senders' side (WebContent
3340         process and Networking process) instead of the receiver's side
3341         (UIProcess).
3342
3343         * NetworkProcess/NetworkProcess.cpp:
3344         (WebKit::NetworkProcess::logDiagnosticMessage):
3345         (WebKit::NetworkProcess::logDiagnosticMessageWithResult):
3346         (WebKit::NetworkProcess::logDiagnosticMessageWithValue):
3347         * UIProcess/Network/NetworkProcessProxy.cpp:
3348         (WebKit::NetworkProcessProxy::logSampledDiagnosticMessage):
3349         (WebKit::NetworkProcessProxy::logSampledDiagnosticMessageWithResult):
3350         (WebKit::NetworkProcessProxy::logSampledDiagnosticMessageWithValue):
3351         * UIProcess/Network/NetworkProcessProxy.h:
3352         * UIProcess/Network/NetworkProcessProxy.messages.in:
3353         * UIProcess/WebPageProxy.cpp:
3354         (WebKit::WebPageProxy::logDiagnosticMessage):
3355         (WebKit::WebPageProxy::logDiagnosticMessageWithResult):
3356         (WebKit::WebPageProxy::logDiagnosticMessageWithValue):
3357         (WebKit::WebPageProxy::logSampledDiagnosticMessage):
3358         (WebKit::WebPageProxy::logSampledDiagnosticMessageWithResult):
3359         (WebKit::WebPageProxy::logSampledDiagnosticMessageWithValue):
3360         * UIProcess/WebPageProxy.h:
3361         * UIProcess/WebPageProxy.messages.in:
3362         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
3363         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
3364         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
3365         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
3366
3367 2015-07-10  Dean Jackson  <dino@apple.com>
3368
3369         Airplay button and placeholder are missing in inline controls
3370         https://bugs.webkit.org/show_bug.cgi?id=146869
3371         <rdar://problem/21555051>
3372
3373         Reviewed by Simon Fraser.
3374
3375         Fix a typo in the ENABLE that was causing the Airplay
3376         setting (allowsAirPlayForMediaPlayback, which becomes
3377         webkitWirelessVideoPlaybackDisabled) to default to false.
3378
3379         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3380         (-[WKWebViewConfiguration init]): Change WIRELESS_TARGET_PLAYBACK
3381         to WIRELESS_PLAYBACK_TARGET.
3382
3383 2015-07-10  Tim Horton  <timothy_horton@apple.com>
3384
3385         Use CoreAnimation fences instead of synchronous IPC to synchronize resize
3386         https://bugs.webkit.org/show_bug.cgi?id=146294
3387         <rdar://problem/21090193>
3388
3389         Reviewed by Anders Carlsson.
3390
3391         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
3392         (WebKit::TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate):
3393         Tiny followup; don't touch Connection if the connection isn't valid.
3394
3395 2015-07-10  Chris Dumez  <cdumez@apple.com>
3396
3397         [WK2] Increase the QoS of some of our WorkQueues to match the one of our processes
3398         https://bugs.webkit.org/show_bug.cgi?id=146855
3399
3400         Reviewed by Anders Carlsson.
3401
3402         Increase the QoS of some of our WorkQueues to match the one of our processes. For
3403         e.g., even though the WebContent and the Networking processes have USER_UNITIATED
3404         QoS, the IPC between them is using a WorkQueue with DEFAULT QoS. Similarly, the
3405         WorkQueue used for network cache reads has DEFAULT QoS.
3406
3407         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3408         (WebKit::NetworkCache::Storage::Storage):
3409         * Platform/IPC/Connection.cpp:
3410         (IPC::Connection::Connection):
3411
3412 2015-07-10  Zalan Bujtas  <zalan@apple.com>
3413
3414         Crash at WebCore::WebPage::innerFrameQuad.
3415         https://bugs.webkit.org/show_bug.cgi?id=146843
3416         rdar://problem/21501819
3417
3418         Reviewed by Andreas Kling.
3419
3420         We may end up with a null rootEditableElement() after calling Document::updateLayout().
3421
3422         Speculative fix. Not reproducible.
3423
3424         * WebProcess/WebPage/WebPage.h: Some const cleanup.
3425         * WebProcess/WebPage/ios/WebPageIOS.mm:
3426         (WebKit::innerFrameQuad): null check assistedNode.rootEditableElement()
3427         (WebKit::constrainPoint):
3428         (WebKit::WebPage::selectWithGesture):
3429         (WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
3430         (WebKit::WebPage::selectPositionAtPoint):
3431         (WebKit::WebPage::selectPositionAtBoundaryWithDirection):
3432         (WebKit::WebPage::selectTextWithGranularityAtPoint):
3433         (WebKit::WebPage::updateSelectionWithExtentPoint):
3434         (WebKit::WebPage::getPositionInformation):
3435
3436 2015-07-09  Jon Honeycutt  <jhoneycutt@apple.com>
3437
3438         [iOS] Document picker has overlapping icons on iPad
3439         https://bugs.webkit.org/show_bug.cgi?id=146808
3440         <rdar://problem/21251875>
3441
3442         Reviewed by Sam Weinig.
3443
3444         * UIProcess/ios/forms/WKFileUploadPanel.mm:
3445         (-[WKFileUploadPanel documentMenu:didPickDocumentPicker:]):
3446         Don't show this UI as a popover on iPad; the default is a full screen
3447         form sheet.
3448
3449 2015-07-09  Dan Bernstein  <mitz@apple.com>
3450
3451         WebKit2 part of Track and expose policies for external URL schemes and App Links separately
3452         https://bugs.webkit.org/show_bug.cgi?id=146822
3453
3454         Reviewed by Anders Carlsson.
3455
3456         * Shared/NavigationActionData.cpp:
3457         (WebKit::NavigationActionData::encode):
3458         (WebKit::NavigationActionData::decode):
3459         * Shared/NavigationActionData.h:
3460           Replaced the shouldOpenExternalURLsPolicy boolean member with a
3461           shouldOpenExternalURLsPolicy member whose type is ShouldOpenExternalURLsPolicy, and
3462           updated encoding and decoding:
3463
3464         * UIProcess/API/APINavigationAction.h:
3465           Added shouldOpenAppLinks boolean to NavigationAction::create and the constructor. It
3466           augments the policy in the NavigationActionData with a valude decided in the UI process.
3467           Replaced shouldOpenExternalURLs() with shouldOpenExternalSchemes() and
3468           shouldOpenAppLinks() which check the policy and the new m_shouldOpenAppLinks boolean.
3469
3470         * UIProcess/API/Cocoa/WKNavigationAction.mm:
3471         (-[WKNavigationAction _shouldOpenExternalSchemes]): Getter for new property, calls through
3472           to the NavigationAction.
3473         (-[WKNavigationAction _shouldOpenAppLinks]): Ditto.
3474         (-[WKNavigationAction _shouldOpenExternalURLs]): Now deprecated and returns the
3475           _shouldOpenExternalSchemes value.
3476         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h: Declared new properties for the two
3477           policies and deprecated old property.
3478
3479         * UIProcess/Cocoa/NavigationState.mm:
3480         (WebKit::tryAppLink): Changed to use NavigationAction::shouldOpenAppLinks, which
3481           encapsulates logic that used to be here.
3482
3483         * UIProcess/Cocoa/UIDelegate.mm:
3484         (WebKit::UIDelegate::UIClient::createNewPage): Allow App Links (if already allowed by policy).
3485
3486         * UIProcess/WebPageProxy.cpp:
3487         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Moved logic from tryAppLink in
3488           NavigationState.mm here and pass the result to NavigationAction::create.
3489         (WebKit::WebPageProxy::decidePolicyForNewWindowAction): Allow App Links (if already allowed
<