b183cda4146ea7f5ea9bede24991dd995996bd63
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-09-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         REGRESSION(r188639): [GTK] Several inspector tests started to time out in GTK+ bots after r188639
4         https://bugs.webkit.org/show_bug.cgi?id=148569
5
6         Reviewed by Darin Adler.
7
8         * PlatformGTK.cmake: Add missing inspector files required for
9         layout tests.
10
11 2015-09-25  Eric Carlson  <eric.carlson@apple.com>
12
13         Clean up user media request internal API
14         https://bugs.webkit.org/show_bug.cgi?id=149527
15
16         Reviewed by Tim Horton.
17
18         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
19         (WKUserMediaPermissionRequestVideoDeviceUIDs): New, renamed from WKUserMediaPermissionRequestDeviceNamesVideo.
20         (WKUserMediaPermissionRequestAudioDeviceUIDs): New, renamed from WKUserMediaPermissionRequestDeviceNamesAudio.
21         (WKUserMediaPermissionRequestAllowBest): Deleted.
22         (WKUserMediaPermissionRequestDeviceNamesVideo): Deleted.
23         (WKUserMediaPermissionRequestDeviceNamesAudio): Deleted.
24         (WKUserMediaPermissionRequestFirstVideoDeviceUID): Deleted.
25         (WKUserMediaPermissionRequestFirstAudioDeviceUID): Deleted.
26         * UIProcess/API/C/WKUserMediaPermissionRequest.h:
27
28         * UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
29         (webkitUserMediaPermissionRequestAllow): Update for UserMediaRequest API change.
30
31         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
32         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Get rid of the bool parameters.
33           Switch audio/video parameter order to be consistent with everywhere else.
34         (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Ditto.
35         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
36
37         * UIProcess/UserMediaPermissionRequestProxy.cpp:
38         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): Get rid of the bool parameters.
39           Switch audio/video parameter order to be consistent with everywhere else.
40         (WebKit::UserMediaPermissionRequestProxy::allow): Switch audio/video parameter order.
41         (WebKit::UserMediaPermissionRequestProxy::getDeviceNameForUID): Deleted.
42         * UIProcess/UserMediaPermissionRequestProxy.h:
43         (WebKit::UserMediaPermissionRequestProxy::create):
44         (WebKit::UserMediaPermissionRequestProxy::videoDeviceUIDs):
45         (WebKit::UserMediaPermissionRequestProxy::audioDeviceUIDs):
46         (WebKit::UserMediaPermissionRequestProxy::firstAudioDeviceUID):
47         (WebKit::UserMediaPermissionRequestProxy::requiresAudio): Deleted.
48         (WebKit::UserMediaPermissionRequestProxy::requiresVideo): Deleted.
49
50         * UIProcess/WebPageProxy.cpp:
51         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Get rid of the bool parameters.
52           Switch audio/video parameter order to be consistent with everywhere else.
53         * UIProcess/WebPageProxy.h: Ditto.
54         * UIProcess/WebPageProxy.messages.in: Ditto.
55
56         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
57         (WebKit::UserMediaPermissionRequestManager::startRequest): Get rid of bool params, the device
58           vectors have the same information.
59         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision): Switch audio/video
60           parameter order to be consistent with everywhere else. deviceUIDVideo -> videoDeviceUID,
61         deviceUIDAudio -> audioDeviceUID.
62         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
63
64         * WebProcess/WebPage/WebPage.cpp:
65         (WebKit::WebPage::didReceiveUserMediaPermissionDecision): Switch audio/video parameter order.
66         * WebProcess/WebPage/WebPage.h:
67
68 2015-09-25  Simon Fraser  <simon.fraser@apple.com>
69
70         [iOS WK2] Add viewport tests and fix runUIScript() timing issues
71         https://bugs.webkit.org/show_bug.cgi?id=149577
72
73         Reviewed by Tim Horton.
74         
75         When calling testRunner.runUIScript() from a page load event, the script could run
76         in the UI process before the current remote layer tree transaction had been handled
77         there. This meant that runUIScript() could query state which was about to change.
78         
79         Fix by delaying the execution of the UI script until a layer tree transaction has
80         been handled by the UI process, leveraging the existing DrawingAreaProxy::dispatchAfterEnsuringDrawing().
81         
82         This is done using a new C SPI function WKPageCallAfterNextPresentationUpdate(),
83         which is mirrored in the Obj-C SPI as -_doAfterNextPresentationUpdate:.
84         
85         Move WKWebView SPI which is testing-related into a WKTesting category. It is expected
86         that this will grow significantly.
87
88         * UIProcess/API/C/WKPage.cpp:
89         (WKPageCallAfterNextPresentationUpdate):
90         * UIProcess/API/C/WKPagePrivate.h:
91         * UIProcess/API/Cocoa/WKWebView.mm:
92         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
93         * UIProcess/WebPageProxy.cpp:
94         (WebKit::WebPageProxy::callAfterNextPresentationUpdate):
95         * UIProcess/WebPageProxy.h:
96         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
97         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
98         (WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):
99
100 2015-09-25  Alexey Proskuryakov  <ap@apple.com>
101
102         [Mac] Media tests start to time out after a few days of bot uptime
103         https://bugs.webkit.org/show_bug.cgi?id=149468
104
105         Reviewed by Darin Adler.
106
107         Make the fix work with WebKit2, and avoid touching user's media cache for WebKit1.
108
109         When UI process is not sandboxed, inherit DIRHELPER_USER_DIR_SUFFIX from it.
110         This means that during testing, WebContent uses a temporary directory of the form
111         /private/var/folders/.../T/WebKitTestRunner-VKjmz0/com.apple.WebKit.WebContent.Development,
112         instead of /private/var/folders/.../T/com.apple.WebKit.WebContent.Development+WebKitTestRunner.
113
114         WebKit1 now also better respects a temporary directory of the form
115         /private/var/folders/.../T/DumpRenderTree-VKjmz0, instead of the default, which
116         makes CoreMedia put its cache inside it.
117
118         As a result, almost everything is isolated per testing process, and deleted at the end.
119         Same with cache directories. The only outliers that I know of are plug-in directories,
120         which are per-process, but are not under the testing root, and thus aren't deleted.
121
122         * PluginProcess/mac/PluginProcessMac.mm:
123         (WebKit::PluginProcess::initializeSandbox):
124         * Shared/ChildProcessProxy.cpp:
125         (WebKit::ChildProcessProxy::fromConnection):
126         (WebKit::ChildProcessProxy::getLaunchOptions):
127         (WebKit::ChildProcessProxy::connect):
128         * Shared/ChildProcessProxy.h:
129         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
130         (WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
131         * Shared/SandboxInitializationParameters.h:
132         (WebKit::SandboxInitializationParameters::sandboxProfile):
133         (WebKit::SandboxInitializationParameters::setUserDirectorySuffix):
134         (WebKit::SandboxInitializationParameters::userDirectorySuffix):
135         (WebKit::SandboxInitializationParameters::setSystemDirectorySuffix): Deleted.
136         (WebKit::SandboxInitializationParameters::systemDirectorySuffix): Deleted.
137         * Shared/ios/ChildProcessIOS.mm:
138         (WebKit::ChildProcess::initializeSandbox):
139         * Shared/mac/ChildProcessMac.mm:
140         (WebKit::ChildProcess::initializeSandbox):
141         * UIProcess/Databases/DatabaseProcessProxy.cpp:
142         (WebKit::DatabaseProcessProxy::getLaunchOptions):
143         * UIProcess/Network/NetworkProcessProxy.cpp:
144         (WebKit::NetworkProcessProxy::getLaunchOptions):
145         * UIProcess/Plugins/PluginProcessProxy.cpp:
146         (WebKit::PluginProcessProxy::getLaunchOptions):
147         * UIProcess/WebProcessProxy.cpp:
148         (WebKit::WebProcessProxy::getLaunchOptions):
149
150 2015-09-25  Beth Dakin  <bdakin@apple.com>
151
152         Clicking on a data detected item inside a form control always pops up a map 
153         on force touch trackpad
154         https://bugs.webkit.org/show_bug.cgi?id=149559
155         -and corresponding-
156         rdar://problem/22826796
157
158         Reviewed by Tim Horton.
159
160         Look for Data Detected text for text nodes and HitTestResults that are over 
161         text inside form controls.
162
163         * WebProcess/WebPage/mac/WebPageMac.mm:
164         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
165
166 2015-09-25  Carlos Garcia Campos  <cgarcia@igalia.com>
167
168         [GTK] ASSERTION FAILED: !m_inUpdateBackingStoreState in DrawingAreaImpl::display() after DrawingAreaImpl::forceRepaint()
169         https://bugs.webkit.org/show_bug.cgi?id=148956
170
171         Reviewed by Žan Doberšek.
172
173         This is because those tests call notifyDone in the onresize event
174         handler. InjectedBundlePage::dump() always calls WKBundlePageForceRepaint()
175         before dumping. When the view is resized DrawingAreaImpl::updateBackingStoreState()
176         is called, so if the size has changed the FrameView::resize()
177         method is called and all children are resized, so the onresize
178         handlers happen at that point, before the
179         m_inUpdateBackingStoreState is set to false again. For WTR we
180         could probably just return early from froceReapaint() when
181         m_inUpdateBackingStoreState is true, because in that case we know
182         the layout is updated because of the resize and the actual display
183         is not really needed. But the UI process can also request a force
184         repaint, so we could wait until the backing store update is done
185         and then force the repaint. For WTR it will happen after the
186         dump, but it shouldn't be a problem.
187
188         * WebProcess/WebPage/DrawingAreaImpl.cpp:
189         (WebKit::DrawingAreaImpl::forceRepaint):
190         (WebKit::DrawingAreaImpl::updateBackingStoreState):
191         * WebProcess/WebPage/DrawingAreaImpl.h:
192
193 2015-09-24  Tim Horton  <timothy_horton@apple.com>
194
195         Find hole drawn at subframe's 0x0 when a subframe find match is not rendered
196         https://bugs.webkit.org/show_bug.cgi?id=149543
197
198         Reviewed by Beth Dakin.
199
200         * WebProcess/WebPage/FindController.cpp:
201         (WebKit::FindController::rectsForTextMatches):
202         Don't add empty rects to the list. Later code will just inflate them
203         and end up drawing a nonsensical find hole.
204
205 2015-09-24  Chris Dumez  <cdumez@apple.com>
206
207         Drop XPATH_NAMESPACE_NODE from Node::NodeType enum
208         https://bugs.webkit.org/show_bug.cgi?id=149532
209
210         Reviewed by Ryosuke Niwa.
211
212         Drop XPATH_NAMESPACE_NODE from Node::NodeType enum as there is currently
213         no way to construct such Node in WebKit. This avoid having to handle this
214         Node type everywhere.
215
216         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
217         (WebKit::WKDOMNodeClass): Deleted.
218
219 2015-09-24  Ryosuke Niwa  <rniwa@webkit.org>
220
221         Ran sort-Xcode-project-file.
222
223         * WebKit2.xcodeproj/project.pbxproj:
224
225 2015-09-23  Timothy Horton  <timothy_horton@apple.com>
226
227         Link highlight rect is too rounded on blocks with border-radius
228         https://bugs.webkit.org/show_bug.cgi?id=149511
229
230         Reviewed by Dan Bernstein.
231
232         * UIProcess/ios/WKContentViewInteraction.mm:
233         (nsSizeForTapHighlightBorderRadius):
234         (-[WKContentView _updateTapHighlight]):
235         Scale the border radius from content to view coordinates, just like
236         we do for the rects that WebKit returns us.
237
238 2015-09-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
239
240         Add a file of pointer-lock to cmake ports
241         https://bugs.webkit.org/show_bug.cgi?id=149453
242
243         Reviewed by Csaba Osztrogonác.
244
245         * WebProcess/WebPage/WebPage.cpp:
246         (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick): Fix a build break.
247
248 2015-09-22  Anders Carlsson  <andersca@apple.com>
249
250         URL of page visited in private browsing still appears in Activity Monitor after page is closed
251         https://bugs.webkit.org/show_bug.cgi?id=149475
252         rdar://problem/22684521
253
254         Reviewed by Dan Bernstein.
255
256         * WebProcess/WebPage/WebPage.cpp:
257         (WebKit::WebPage::close):
258         Make sure to call updateActivePages after removing the page from the page map.
259
260         * WebProcess/cocoa/WebProcessCocoa.mm:
261         (WebKit::WebProcess::updateActivePages):
262         Don't include pages that have private browsing enabled.
263
264 2015-09-22  Tim Horton  <timothy_horton@apple.com>
265
266         Make it more obvious when using an unaccelerated image buffer, and fix a few callers who do
267         https://bugs.webkit.org/show_bug.cgi?id=149428
268
269         Reviewed by Simon Fraser and Darin Adler.
270
271         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
272         (WebKit::ThreadSafeCoordinatedSurface::create):
273
274 2015-09-22  Andreas Kling  <akling@apple.com>
275
276         [WK2][NetworkCache] New entry bodies remain in dirty memory after being written to disk.
277         <https://webkit.org/b/149463>
278
279         Reviewed by Antti Koivisto.
280
281         Call msync(MS_ASYNC) on cache entry bodies after writing their data to a
282         memory-mapped file. This turns the previously dirty memory into clean memory,
283         reducing our effective footprint.
284
285         I previously believed this would happen automatically when the kernel finds
286         itself under memory pressure, around the same time as it starts dropping
287         volatile pages. Turns out that's not the case. Even under considerable pressure,
288         we never flush this memory to file. So let's take care of it ourselves.
289
290         If this ends up generating more IO activity than we're comfortable with on some
291         scenario, we can look at throttling.
292
293         * NetworkProcess/cache/NetworkCacheData.cpp:
294         (WebKit::NetworkCache::Data::mapToFile):
295
296 2015-09-22  Chris Dumez  <cdumez@apple.com>
297
298         Drop support for legacy EntityReference DOM Node type
299         https://bugs.webkit.org/show_bug.cgi?id=149348
300
301         Reviewed by Darin Adler.
302
303         Drop handling EntityReference Nodes.
304
305         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
306         (WebKit::WKDOMNodeClass): Deleted.
307         * WebProcess/WebPage/ios/WebPageIOS.mm:
308         (WebKit::isAssistableElement):
309
310 2015-09-22  Commit Queue  <commit-queue@webkit.org>
311
312         Unreviewed, rolling out r189616.
313         https://bugs.webkit.org/show_bug.cgi?id=149456
314
315         suspected cause of multiple regressions (Requested by kling on
316         #webkit).
317
318         Reverted changeset:
319
320         "[JSC] Weak should only accept cell pointees."
321         https://bugs.webkit.org/show_bug.cgi?id=148955
322         http://trac.webkit.org/changeset/189616
323
324 2015-09-21  Timothy Horton  <timothy_horton@apple.com>
325
326         Allow DataDetectors to pre-filter telephone number menu items
327         https://bugs.webkit.org/show_bug.cgi?id=149444
328         <rdar://problem/19286320>
329
330         Reviewed by Sam Weinig.
331
332         * Platform/mac/MenuUtilities.mm:
333         (WebKit::menuItemForTelephoneNumber):
334         (WebKit::menuForTelephoneNumber):
335         Let DataDetectors know what kind of items we want, so that they can avoid
336         some unnecessary work in cases where we were just going to throw away the items anyway.
337
338 2015-09-21  Gwang Yoon Hwang  <yoon@igalia.com>
339
340         [Threaded Compositor] Modified to use reference of GraphicsContext instead of pointer
341         https://bugs.webkit.org/show_bug.cgi?id=149399
342
343         Reviewed by Darin Adler.
344
345         This fixes build failure after r189144
346
347         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
348         (WebKit::ThreadSafeCoordinatedSurface::paintToSurface):
349         (WebKit::ThreadSafeCoordinatedSurface::beginPaint):
350         (WebKit::ThreadSafeCoordinatedSurface::endPaint):
351         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h:
352
353 2015-09-21  Simon Fraser  <simon.fraser@apple.com>
354
355         Add the ability for tests to run script in the UI process in WebKitTestRunner
356         https://bugs.webkit.org/show_bug.cgi?id=149356
357
358         Reviewed by Tim Horton.
359
360         Expose a few private functions for testing.
361
362         * UIProcess/API/Cocoa/WKWebView.mm:
363         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
364
365 2015-09-21  Tim Horton  <timothy_horton@apple.com>
366
367         Layout milestones aren't synchronized with UI-side compositing transactions
368         https://bugs.webkit.org/show_bug.cgi?id=149362
369
370         Reviewed by Anders Carlsson.
371         
372         Because layout milestones are primarily used to synchronize things with
373         the displayed layout/rendering of the page, they should fire at the same
374         time as the contents of the view change.
375
376         However, with UI-side compositing, the layer tree transaction will
377         most likely come in *after* the layout milestones associated with its
378         contents fire, breaking this synchronization.
379
380         Instead, put the layout milestones inside the transaction and fire them
381         immediately after it is committed in the UI process.
382
383         * Shared/mac/RemoteLayerTreeTransaction.h:
384         (WebKit::RemoteLayerTreeTransaction::setCallbackIDs):
385         (WebKit::RemoteLayerTreeTransaction::newlyReachedLayoutMilestones):
386         (WebKit::RemoteLayerTreeTransaction::setNewlyReachedLayoutMilestones):
387         * Shared/mac/RemoteLayerTreeTransaction.mm:
388         (WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):
389         (WebKit::RemoteLayerTreeTransaction::encode):
390         (WebKit::RemoteLayerTreeTransaction::decode):
391         Add LayoutMilestones to the transaction.
392
393         * UIProcess/API/APILoaderClient.h:
394         (API::LoaderClient::didLayout):
395         * UIProcess/API/APINavigationClient.h:
396         (API::NavigationClient::renderingProgressDidChange):
397         * UIProcess/API/C/WKPage.cpp:
398         (WKPageSetPageLoaderClient):
399         (WKPageSetPageNavigationClient):
400         * UIProcess/Cocoa/NavigationState.h:
401         * UIProcess/Cocoa/NavigationState.mm:
402         (WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
403         * UIProcess/WebPageProxy.messages.in:
404         * UIProcess/ios/WebPageProxyIOS.mm:
405         (WebKit::WebPageProxy::didCommitLayerTree):
406         Remove the UserData parameter from didLayout/renderingProgressDidChange,
407         except for at the API level where we'll always pass null.
408         Nobody uses UserData on didLayout, and we'll assert if any client sets it
409         (and it won't get passed through to the UI process).
410
411         * UIProcess/WebPageProxy.cpp:
412         (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
413         Just call didLayout with the relevant milestones instead of reimplementing it.
414
415         (WebKit::WebPageProxy::didLayout):
416         * UIProcess/WebPageProxy.h:
417         Make didLayout public.
418
419         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
420         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
421         Let WebPage handle dispatching didLayout.
422
423         * WebProcess/WebPage/WebPage.cpp:
424         (WebKit::WebPage::dispatchDidLayout):
425         * WebProcess/WebPage/WebPage.h:
426         Let the DrawingArea handle dispatching didLayout.
427         If it doesn't want to handle it, we'll just do the normal thing
428         and dispatch an async message.
429
430         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
431         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
432         If we reach a new layout milestone, dispatch didLayout client/delegate callbacks.
433
434         * WebProcess/WebPage/DrawingArea.h:
435         (WebKit::DrawingArea::dispatchDidLayout):
436         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
437         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
438         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
439         (WebKit::RemoteLayerTreeDrawingArea::dispatchDidLayout):
440         Queue up milestones as we reach them, and send them in the transaction.
441
442 2015-09-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
443
444         Remove XHR_TIMEOUT compilation guard
445         https://bugs.webkit.org/show_bug.cgi?id=149260
446
447         Reviewed by Benjamin Poulain.
448
449         * Configurations/FeatureDefines.xcconfig:
450
451 2015-09-19  Michael Catanzaro  <mcatanzaro@igalia.com>
452
453         [GTK] WebEditorClient::supportsGlobalSelection returns true under Wayland
454         https://bugs.webkit.org/show_bug.cgi?id=149375
455
456         Reviewed by Darin Adler.
457
458         WebEditorClient::supportsGlobalSelection should return false when running under Wayland,
459         since Wayland does not have any equivalent for PRIMARY or the concept of a global selection.
460
461         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
462         (WebKit::WebEditorClient::supportsGlobalSelection):
463
464 2015-09-19  Dan Bernstein  <mitz@apple.com>
465
466         Attempted build fix.
467
468         * mac/postprocess-framework-headers.sh: Fixed an overzealous regular expression.
469
470 2015-09-18  Commit Queue  <commit-queue@webkit.org>
471
472         Unreviewed, rolling out r189908.
473         https://bugs.webkit.org/show_bug.cgi?id=149368
474
475         Broke run-webkit-tests --pixel (Requested by ap on #webkit).
476
477         Reverted changeset:
478
479         "printing does not use minimum page zoom factor"
480         https://bugs.webkit.org/show_bug.cgi?id=108507
481         http://trac.webkit.org/changeset/189908
482
483 2015-09-18  Andy Estes  <aestes@apple.com>
484
485         [iOS] did{Start,Finish}LoadForQuickLookDocumentInMainFrame is never called on WKNavigationDelegate
486         https://bugs.webkit.org/show_bug.cgi?id=149360
487
488         Reviewed by Tim Horton.
489
490         * UIProcess/ios/WebPageProxyIOS.mm:
491         (WebKit::WebPageProxy::didStartLoadForQuickLookDocumentInMainFrame): Called on m_navigationDelegate if non-null.
492         (WebKit::WebPageProxy::didFinishLoadForQuickLookDocumentInMainFrame): Ditto.
493
494 2015-09-18  Beth Dakin  <bdakin@apple.com>
495
496         Snapshots broken on iOS
497         https://bugs.webkit.org/show_bug.cgi?id=149354
498
499         Reviewed by Tim Horton.
500
501         We need to send the IOSurface to ViewSnapshot::create() for this to work.
502         * UIProcess/API/Cocoa/WKWebView.mm:
503         (-[WKWebView _takeViewSnapshot]):
504
505 2015-09-18  Chris Dumez  <cdumez@apple.com>
506
507         Drop support for Entity Node type
508         https://bugs.webkit.org/show_bug.cgi?id=149239
509
510         Reviewed by Darin Adler.
511
512         Stop handling the Entity node type.
513
514         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
515
516 2015-09-17  Brian Burg  <bburg@apple.com>
517
518         ASSERT(!m_frontendRouter->hasLocalFrontend()) when running Web Inspector tests
519         https://bugs.webkit.org/show_bug.cgi?id=149006
520         <rdar://problem/22654257>
521         <rdar://problem/22631369>
522
523         Reviewed by Joseph Pecoraro.
524
525         Stop using InspectorController to close the frontend page. Go through
526         the FrontendClient instead. Reduce redundant code paths.
527
528         This change seems to fix some recent crashes that were seen when
529         closing Safari with Web Inspector open. These were caused by the frontend
530         channel not being disconnected at the right time.
531
532         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
533         (WebKit::WebInspectorClient::inspectedPageDestroyed):
534         (WebKit::WebInspectorClient::closeLocalFrontend): Deleted.
535         * WebProcess/WebCoreSupport/WebInspectorClient.h:
536         * WebProcess/WebPage/WebInspector.cpp:
537         (WebKit::WebInspector::close):
538         * WebProcess/WebPage/WebInspectorUI.cpp:
539         (WebKit::WebInspectorUI::establishConnection):
540
541             Save a pointer to the frontend's InspectorController since we may
542             need to use it while the page is being destructed and its getter
543             is no longer accessible.
544
545         (WebKit::WebInspectorUI::closeWindow):
546
547             Explicitly remove the frontend client when closing the frontend.
548
549         * WebProcess/WebPage/WebInspectorUI.h:
550         * WebProcess/WebPage/WebPage.cpp:
551         (WebKit::WebPage::inspector):
552
553             Allow clients to specify whether an inspector should be eagerly created.
554             Without this, we may accidentally create an instance during teardown.
555
556         * WebProcess/WebPage/WebPage.h:
557
558 2015-09-18  Emanuele Aina  <emanuele.aina@collabora.com>
559
560         Fix build with --no-indexed-database after r189831
561         https://bugs.webkit.org/show_bug.cgi?id=149342
562
563         Reviewed by Csaba Osztrogonác.
564
565         * WebProcess/Databases/WebDatabaseProvider.h:
566         Add ENABLE(INDEXED_DATABASE) guard around supportsModernIDB().
567
568 2015-09-17  Beth Dakin  <bdakin@apple.com>
569
570         Heavy taps on links are sometimes interpreted as the preview gesture
571         https://bugs.webkit.org/show_bug.cgi?id=149304
572         -and corresponding-
573         rdar://problem/22689258
574
575         Reviewed by Tim Horton.
576
577         If the preview gesture starts and stop and less than 250 milliseconds have 
578         passed, then call _attemptClickAtLocation to treat it as a normal tap.
579         * UIProcess/ios/WKContentViewInteraction.h:
580         * UIProcess/ios/WKContentViewInteraction.mm:
581         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
582         (-[WKContentView _interactionStartedFromPreviewItemController:]):
583         (-[WKContentView _interactionStoppedFromPreviewItemController:]):
584
585 2015-09-17  Tim Horton  <timothy_horton@apple.com>
586
587         After restoring tabs, swipes back to fast loading pages hang for 3 seconds
588         https://bugs.webkit.org/show_bug.cgi?id=148764
589         <rdar://problem/22568860>
590
591         Reviewed by Beth Dakin.
592
593         * UIProcess/mac/ViewGestureControllerMac.mm:
594         (WebKit::ViewGestureController::endSwipeGesture):
595         Don't wait for the render tree size threshold if we don't have one.
596
597 2015-09-17  Timothy Horton  <timothy_horton@apple.com>
598
599         REGRESSION (r189287): 2.5% PLT regression
600         https://bugs.webkit.org/show_bug.cgi?id=149277
601         <rdar://problem/22657219>
602
603         Reviewed by Anders Carlsson.
604
605         * UIProcess/API/mac/WKView.mm:
606         (-[WKView _takeViewSnapshot]):
607         Don't take an extra unused snapshot.
608
609 2015-09-17  Michael Catanzaro  <mcatanzaro@igalia.com>
610
611         [GTK] Crash in WebKit::BackingStore::createBackend running under Wayland
612         https://bugs.webkit.org/show_bug.cgi?id=147453
613
614         Reviewed by Carlos Garcia Campos.
615
616         Except when running on X11, this function always crashes if called before the web view is
617         realized, as gdk_window_create_similar_surface will return null in that case. Avoid this by
618         simply realizing the widget before calling that.
619
620         Thanks to Carlos Garnacho for some debugging help.
621
622         * UIProcess/cairo/BackingStoreCairo.cpp:
623         (WebKit::BackingStore::createBackend):
624
625 2015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
626
627         printing does not use minimum page zoom factor
628         https://bugs.webkit.org/show_bug.cgi?id=108507
629
630         Reviewed by Darin Adler.
631
632         Add kWKSnapshotOptionsPrinting flag to indicate the snapshot
633         should be generated in printing mode.
634
635         * Shared/API/c/WKImage.h:
636         * Shared/API/c/WKSharedAPICast.h:
637         (WebKit::toSnapshotOptions):
638         * Shared/ImageOptions.h:
639         * WebProcess/InjectedBundle/InjectedBundle.cpp:
640         (WebKit::InjectedBundle::numberOfPages): Pass the frame as a
641         reference instead of a pointer.
642         * WebProcess/WebPage/WebPage.cpp:
643         (WebKit::WebPage::scaledSnapshotWithOptions): In case of printing,
644         calculate the bitmap height based on the number of pages.
645         (WebKit::WebPage::snapshotAtSize): In case of printing, use
646         PrintContext::spoolAllPagesWithBoundaries() and return.
647
648 2015-09-16  Joseph Pecoraro  <pecoraro@apple.com>
649
650         Web Inspector: Fix common typo "supress" => "suppress"
651         https://bugs.webkit.org/show_bug.cgi?id=149199
652
653         Reviewed by Gyuyoung Kim.
654
655         * PluginProcess/mac/PluginProcessMac.mm:
656         (WebKit::PluginProcess::platformInitializeProcess):
657
658 2015-09-16  Dan Bernstein  <mitz@apple.com>
659
660         [iOS] Inline implementation of -[WKImagePreviewViewController previewActions]
661         https://bugs.webkit.org/show_bug.cgi?id=149224
662
663         Reviewed by Tim Horton.
664
665         * Platform/spi/ios/UIKitSPI.h: Declare UIViewControllerPreviewAction and its factory method.
666         * UIProcess/WKImagePreviewViewController.mm:
667         (-[WKImagePreviewViewController previewActions]): Moved here.
668
669 2015-09-16  Alexey Proskuryakov  <ap@apple.com>
670
671         [Mac] Allow reading from SubmitDiagInfo.domains in Networking process
672         https://bugs.webkit.org/show_bug.cgi?id=149176
673         rdar://problem/22483680
674
675         Reviewed by Darin Adler.
676
677         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
678
679 2015-09-16  Dan Bernstein  <mitz@apple.com>
680
681         [iOS] Unifiy WebKit2PlatformTouchPoint definition
682         https://bugs.webkit.org/show_bug.cgi?id=149221
683
684         Reviewed by Darin Adler.
685
686         * Shared/WebEventConversion.cpp:
687         (WebKit::touchEventType):
688         (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
689
690 2015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
691
692         [GTK] Web Process crash recovery no longer works
693         https://bugs.webkit.org/show_bug.cgi?id=149064
694
695         Reviewed by Žan Doberšek.
696
697         After a web process crash the new DrawingArea is never resized, so
698         nothing is rendered into the web view.
699
700         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
701         (webkitWebViewBaseDidRelaunchWebProcess): Queue a widget resize to ensure
702         the new DrawingAreaProxy is resized.
703
704 2015-09-15  Ryosuke Niwa  <rniwa@webkit.org>
705
706         Add ShadowRoot interface and Element.prototype.attachShadow
707         https://bugs.webkit.org/show_bug.cgi?id=149187
708
709         Reviewed by Antti Koivisto.
710
711         * Configurations/FeatureDefines.xcconfig:
712
713 2015-09-15  Brady Eidson  <beidson@apple.com>
714
715         Add empty IDBFactory implementation for Modern IDB.
716         https://bugs.webkit.org/show_bug.cgi?id=149191
717
718         Reviewed by Jer Noble.
719
720         * WebProcess/Databases/WebDatabaseProvider.h:
721
722 2015-09-15  Brady Eidson  <beidson@apple.com>
723
724         Move most IDB object encoding/decoding from WebKit2 to WebCore.
725         https://bugs.webkit.org/show_bug.cgi?id=149152
726
727         Reviewed by Alex Christensen.
728
729         * Shared/WebCoreArgumentCoders.cpp:
730         (IPC::ArgumentCoder<IDBDatabaseMetadata>::encode): Deleted.
731         (IPC::ArgumentCoder<IDBDatabaseMetadata>::decode): Deleted.
732         (IPC::ArgumentCoder<IDBIndexMetadata>::encode): Deleted.
733         (IPC::ArgumentCoder<IDBIndexMetadata>::decode): Deleted.
734         (IPC::ArgumentCoder<IDBKeyData>::encode): Deleted.
735         (IPC::ArgumentCoder<IDBKeyData>::decode): Deleted.
736         (IPC::ArgumentCoder<IDBKeyPath>::encode): Deleted.
737         (IPC::ArgumentCoder<IDBKeyPath>::decode): Deleted.
738         (IPC::ArgumentCoder<IDBKeyRangeData>::encode): Deleted.
739         (IPC::ArgumentCoder<IDBKeyRangeData>::decode): Deleted.
740         (IPC::ArgumentCoder<IDBObjectStoreMetadata>::encode): Deleted.
741         (IPC::ArgumentCoder<IDBObjectStoreMetadata>::decode): Deleted.
742         * Shared/WebCoreArgumentCoders.h:
743
744 2015-09-14  Brady Eidson  <beidson@apple.com>
745
746         Make the enum IDBKey::Type into a utility enum class.
747         https://bugs.webkit.org/show_bug.cgi?id=149149
748
749         Reviewed by Alex Christensen.
750
751         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
752         (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
753
754         * Shared/WebCoreArgumentCoders.cpp:
755         (IPC::ArgumentCoder<IDBKeyData>::encode):
756         (IPC::ArgumentCoder<IDBKeyData>::decode):
757
758 2015-09-14  Wenson Hsieh  <wenson_hsieh@apple.com>
759
760         WKWebView scroll deceleration rate is not being set properly
761         https://bugs.webkit.org/show_bug.cgi?id=149145
762         <rdar://problem/22064071>
763
764         Reviewed by Simon Fraser.
765
766         We are not currently setting the web view's deceleration rate to the correct preferred value because we
767         are setting the decelerationRate property of the scrollView, which snaps input values to the closer of
768         two predefined UIKit constants, UIScrollViewDecelerationRateFast and UIScrollViewDecelerationRateNormal.
769         To fix this, we directly set the horizontal and vertical scroll deceleration factors to the preferred
770         value.
771
772         * UIProcess/API/Cocoa/WKWebView.mm: 
773         (-[WKWebView scrollViewWillBeginDragging:]): Directly set the scroll view's deceleration factor without
774                 going through the decelerationRate property.
775
776 2015-09-14  Dan Bernstein  <mitz@apple.com>
777
778         Consolidate touch event code dealing with force.
779
780         Reviewed by Beth Dakin.
781
782         * Shared/WebEvent.h:
783         (WebKit::WebPlatformTouchPoint::state):
784         (WebKit::WebPlatformTouchPoint::setForce):
785         (WebKit::WebPlatformTouchPoint::force):
786         * Shared/ios/NativeWebTouchEventIOS.mm:
787         (WebKit::positionForCGPoint):
788         (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
789         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
790         * Shared/ios/WebPlatformTouchPointIOS.cpp:
791         (WebKit::WebPlatformTouchPoint::encode):
792         (WebKit::WebPlatformTouchPoint::decode):
793
794 2015-09-14  Alex Christensen  <achristensen@webkit.org>
795
796         Progress towards CMake on Mac.
797         https://bugs.webkit.org/show_bug.cgi?id=149123
798
799         Reviewed by Chris Dumez.
800
801         * PlatformMac.cmake:
802         Added some more sources.
803
804 2015-09-14  Dan Bernstein  <mitz@apple.com>
805
806         [iOS] Stop importing WebKitAdditions/WKContentViewInteraction.mm
807         https://bugs.webkit.org/show_bug.cgi?id=149127
808
809         Reviewed by Beth Dakin.
810
811         * Platform/spi/ios/UIKitSPI.h:
812         * UIProcess/ios/WKContentViewInteraction.mm:
813         (-[WKContentView setupInteraction]):
814
815 2015-09-14  Brady Eidson  <beidson@apple.com>
816
817         Rename current concrete IDB implementation to "Legacy".
818         https://bugs.webkit.org/show_bug.cgi?id=149118
819
820         Reviewed by Alex Christensen.
821
822         * CMakeLists.txt:
823
824 2015-09-14  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
825
826         [EFL] Remove create() factory function in EvasGLContext and EvasGLSurface
827         https://bugs.webkit.org/show_bug.cgi?id=149110
828
829         Reviewed by Csaba Osztrogonác.
830
831         It is not good implementation we support both create() factory function and public constructor.
832         In EvasGLContext and EvasGLSurface cases, those have supported both. However create() factory is only
833         used by EwkView. Thus let's remove the create() function, then EwkView creates EvasGLContext using
834         std::make_unique<> directly.
835
836         * UIProcess/API/efl/EwkView.cpp:
837         (EwkView::EwkView):
838         (EwkView::createGLSurface):
839
840 2015-09-13  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
841
842         Remove all uses of PassRefPtr in crypto, storage, and history
843         https://bugs.webkit.org/show_bug.cgi?id=149091
844
845         Reviewed by Andreas Kling.
846
847         * WebProcess/Storage/StorageNamespaceImpl.cpp:
848         (WebKit::StorageNamespaceImpl::storageArea):
849         * WebProcess/Storage/StorageNamespaceImpl.h:
850
851 2015-09-13  Dan Bernstein  <mitz@apple.com>
852
853         Define HAVE_LINK_PREVIEW in WebKit2
854         https://bugs.webkit.org/show_bug.cgi?id=149099
855
856         Reviewed by Sam Weinig.
857
858         * Platform/spi/ios/UIKitSPI.h:
859         * UIProcess/WKImagePreviewViewController.mm:
860         * config.h:
861
862 2015-09-12  Myles C. Maxfield  <mmaxfield@apple.com>
863
864         [Cocoa] Allow testing with the system language
865         https://bugs.webkit.org/show_bug.cgi?id=148671
866
867         Reviewed by Anders Carlsson and Alexey Proskuryakov.
868
869         This patch adds two new SPI functions for setting and retrieving a vector of
870         override languages to/from the WKContextConfiguration. The implementation of
871         these functions holds state inside WebProcessPoolConfiguration. Then, when
872         we launch a process, the WebProcessProxy will inject these override languages
873         into the ProcessLauncher::LaunchOptions so that the ProcessLauncher can
874         inject these languages into the XPC Bootstrap message. Then, in the Web
875         Process's main(), the XPC Boostrap message is read, and the platform
876         languages are set via NSUserDefaults setting a volatile domain.
877
878         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
879         (main): Set the volatile domain with NSUserDefaults.
880         * UIProcess/API/APIProcessPoolConfiguration.cpp:
881         (API::ProcessPoolConfiguration::copy):
882         * UIProcess/API/APIProcessPoolConfiguration.h: Hold state for the override
883         languages.
884         * UIProcess/API/C/WKContextConfigurationRef.cpp:
885         (WKContextConfigurationCopyOverrideLanguages): SPI.
886         (WKContextConfigurationSetOverrideLanguages): Ditto.
887         * UIProcess/API/C/WKContextConfigurationRef.h:
888         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
889         (WebKit::connectToService): Inject the languages into the XPC Bootstrap
890         message.
891         * UIProcess/WebProcessProxy.cpp:
892         (WebKit::WebProcessProxy::getLaunchOptions): Inject the override languages
893         into the ProcessLauncher::LaunchOptions.
894
895 2015-09-12  Alexey Proskuryakov  <ap@apple.com>
896
897         [iOS] Allow UDP networking
898         https://bugs.webkit.org/show_bug.cgi?id=149081
899         rdar://problem/22291743
900
901         Reviewed by Sam Weinig.
902
903         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
904         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
905
906 2015-09-12  Joseph Pecoraro  <pecoraro@apple.com>
907
908         Web Inspector: Extract InspectorFrontendAPI dispatching from WebInspectorUI
909         https://bugs.webkit.org/show_bug.cgi?id=149089
910
911         Reviewed by Brian Burg.
912
913         * CMakeLists.txt:
914         * WebKit2.xcodeproj/project.pbxproj:
915         * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp: Added.
916         (WebKit::WebInspectorFrontendAPIDispatcher::WebInspectorFrontendAPIDispatcher):
917         (WebKit::WebInspectorFrontendAPIDispatcher::reset):
918         (WebKit::WebInspectorFrontendAPIDispatcher::frontendLoaded):
919         (WebKit::WebInspectorFrontendAPIDispatcher::dispatchCommand):
920         (WebKit::WebInspectorFrontendAPIDispatcher::dispatchMessageAsync):
921         (WebKit::WebInspectorFrontendAPIDispatcher::evaluateExpressionOnLoad):
922         * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.h: Added.
923         * WebProcess/WebPage/WebInspectorUI.cpp:
924         (WebKit::WebInspectorUI::WebInspectorUI):
925         (WebKit::WebInspectorUI::establishConnection):
926         (WebKit::WebInspectorUI::frontendLoaded):
927         (WebKit::WebInspectorUI::setDockSide):
928         (WebKit::WebInspectorUI::setDockingUnavailable):
929         (WebKit::WebInspectorUI::showConsole):
930         (WebKit::WebInspectorUI::showResources):
931         (WebKit::WebInspectorUI::showMainResourceForFrame):
932         (WebKit::WebInspectorUI::startPageProfiling):
933         (WebKit::WebInspectorUI::stopPageProfiling):
934         (WebKit::WebInspectorUI::didSave):
935         (WebKit::WebInspectorUI::didAppend):
936         (WebKit::WebInspectorUI::sendMessageToFrontend):
937         (WebKit::WebInspectorUI::evaluateCommandOnLoad): Deleted.
938         (WebKit::WebInspectorUI::evaluateExpressionOnLoad): Deleted.
939         (WebKit::WebInspectorUI::evaluatePendingExpressions): Deleted.
940         * WebProcess/WebPage/WebInspectorUI.h:
941         (WebKit::WebInspectorUI::evaluateCommandOnLoad): Deleted.
942
943 2015-09-12  Joseph Pecoraro  <pecoraro@apple.com>
944
945         Web Inspector: Move Already Generic Inspector Page Context Menu to Generic Setup
946         https://bugs.webkit.org/show_bug.cgi?id=149088
947
948         Reviewed by Brian Burg.
949
950         * UIProcess/WebInspectorProxy.cpp:
951         (WebKit::getContextMenuFromProposedMenu):
952         (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
953         * UIProcess/mac/WebInspectorProxyMac.mm:
954         (WebKit::getContextMenuFromProposedMenu): Deleted.
955         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
956
957 2015-09-12  Brian Burg  <bburg@apple.com>
958
959         Web Inspector: disambiguate inspected/frontend controllers and pages in backend code
960         https://bugs.webkit.org/show_bug.cgi?id=149071
961
962         Reviewed by Joseph Pecoraro.
963
964         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
965         (WebKit::WebInspectorClient::inspectedPageDestroyed): Renamed.
966         (WebKit::WebInspectorClient::openLocalFrontend): Renamed.
967         (WebKit::WebInspectorClient::closeLocalFrontend): Renamed.
968         (WebKit::WebInspectorClient::inspectorDestroyed): Deleted.
969         (WebKit::WebInspectorClient::openInspectorFrontend): Deleted.
970         (WebKit::WebInspectorClient::closeInspectorFrontend): Deleted.
971         * WebProcess/WebCoreSupport/WebInspectorClient.h:
972
973 2015-09-11  Beth Dakin  <bdakin@apple.com>
974
975         Another build fix.
976
977         * UIProcess/mac/ViewSnapshotStore.h:
978         (WebKit::ViewSnapshot::size):
979         (WebKit::ViewSnapshot::imageSizeInBytes):
980
981 2015-09-11  Beth Dakin  <bdakin@apple.com>
982
983         Still need view snapshotting code for non-IOSurface for the sim
984         https://bugs.webkit.org/show_bug.cgi?id=149077
985
986         Reviewed by Tim Horton.
987
988         This fixes the simulator build.
989         * UIProcess/API/Cocoa/WKWebView.mm:
990         (-[WKWebView _takeViewSnapshot]):
991         (-[WKWebView _zoomToPoint:atScale:animated:]):
992         * UIProcess/mac/ViewGestureControllerMac.mm:
993         (WebKit::ViewGestureController::beginSwipeGesture):
994         (WebKit::ViewGestureController::removeSwipeSnapshot):
995         * UIProcess/mac/ViewSnapshotStore.h:
996         (WebKit::ViewSnapshot::setDeviceScaleFactor):
997         (WebKit::ViewSnapshot::deviceScaleFactor):
998         (WebKit::ViewSnapshot::surface):
999         (WebKit::ViewSnapshot::imageSizeInBytes):
1000         (WebKit::ViewSnapshot::size):
1001         * UIProcess/mac/ViewSnapshotStore.mm:
1002         (WebKit::ViewSnapshotStore::singleton):
1003         (WebKit::ViewSnapshotStore::snapshottingContext):
1004         (WebKit::ViewSnapshotStore::didAddImageToSnapshot):
1005         (WebKit::ViewSnapshotStore::discardSnapshotImages):
1006         (WebKit::ViewSnapshot::create):
1007         (WebKit::ViewSnapshot::ViewSnapshot):
1008         (WebKit::ViewSnapshot::~ViewSnapshot):
1009         (WebKit::ViewSnapshot::setSurface):
1010         (WebKit::ViewSnapshot::hasImage):
1011         (WebKit::ViewSnapshot::clearImage):
1012         (WebKit::ViewSnapshot::asLayerContents):
1013
1014 2015-09-11  Beth Dakin  <bdakin@apple.com>
1015
1016         Build fix
1017
1018         * UIProcess/mac/ViewGestureControllerMac.mm:
1019         (WebKit::ViewGestureController::beginSwipeGesture):
1020         (WebKit::ViewGestureController::removeSwipeSnapshot):
1021
1022 2015-09-11  Beth Dakin  <bdakin@apple.com>
1023
1024         Should use CARenderServerRenderLayerWithTransform for snapshots on iOS
1025         https://bugs.webkit.org/show_bug.cgi?id=149069
1026         -and corresponding-
1027         rdar://problem/19726953
1028
1029         Reviewed by Tim Horton.
1030
1031         This will let us own the backing IOSurface, which will let us share more code 
1032         with Mac.
1033
1034         Use CARenderServerRenderLayerWithTransform
1035         * UIProcess/API/Cocoa/WKWebView.mm:
1036         (-[WKWebView _takeViewSnapshot]):
1037         (-[WKWebView _zoomToPoint:atScale:animated:]):
1038
1039         We can eliminate things needed for the slot-based API.
1040         * UIProcess/mac/ViewSnapshotStore.h:
1041         (WebKit::ViewSnapshot::setDeviceScaleFactor):
1042         (WebKit::ViewSnapshot::deviceScaleFactor):
1043         (WebKit::ViewSnapshot::surface):
1044         (WebKit::ViewSnapshot::imageSizeInBytes):
1045         (WebKit::ViewSnapshot::size):
1046         * UIProcess/mac/ViewSnapshotStore.mm:
1047         (WebKit::ViewSnapshotStore::singleton):
1048         (WebKit::ViewSnapshotStore::didAddImageToSnapshot):
1049         (WebKit::ViewSnapshotStore::discardSnapshotImages):
1050         (WebKit::ViewSnapshot::create):
1051         (WebKit::ViewSnapshot::ViewSnapshot):
1052         (WebKit::ViewSnapshot::~ViewSnapshot):
1053         (WebKit::ViewSnapshot::setSurface):
1054         (WebKit::ViewSnapshot::hasImage):
1055         (WebKit::ViewSnapshot::clearImage):
1056         (WebKit::ViewSnapshot::asLayerContents):
1057         (WebKit::ViewSnapshotStore::snapshottingContext): Deleted.
1058
1059 2015-09-11  Andreas Kling  <akling@apple.com>
1060
1061         [JSC] Weak should only accept cell pointees.
1062         <https://webkit.org/b/148955>
1063
1064         Reviewed by Geoffrey Garen.
1065
1066         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1067         (WebKit::NPRuntimeObjectMap::finalize):
1068         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
1069
1070 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
1071
1072         Web Inspector: Remove unused files
1073         https://bugs.webkit.org/show_bug.cgi?id=149049
1074
1075         Reviewed by Brian Burg.
1076
1077         * WebProcess/WebPage/efl/WebInspectorEfl.cpp: Removed.
1078         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp: Removed.
1079
1080 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
1081
1082         WebInspectorUI should have a WebPage reference
1083         https://bugs.webkit.org/show_bug.cgi?id=149046
1084
1085         Reviewed by Geoffrey Garen.
1086
1087         * WebProcess/WebPage/WebInspectorUI.cpp:
1088         * WebProcess/WebPage/WebInspectorUI.h:
1089         (WebKit::WebInspectorUI::page): Deleted.
1090         * WebProcess/WebPage/WebPage.cpp:
1091         (WebKit::WebPage::inspectorUI):
1092
1093 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
1094
1095         Web Inspector: WebInspectorUI does not need to be an API::Object
1096         https://bugs.webkit.org/show_bug.cgi?id=149045
1097
1098         Reviewed by Timothy Hatcher.
1099
1100         * Shared/API/APIObject.h:
1101         * WebProcess/WebPage/WebInspectorUI.h:
1102
1103 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
1104
1105         Web Inspector: Remove unused member in WebPage
1106         https://bugs.webkit.org/show_bug.cgi?id=149040
1107
1108         Reviewed by Brian Burg.
1109
1110         * WebProcess/WebPage/WebPage.cpp:
1111         * WebProcess/WebPage/WebPage.h:
1112
1113 2015-09-10  Daniel Bates  <dabates@apple.com>
1114
1115         sendProcessWillSuspendImminently uses a wrong message flag
1116         https://bugs.webkit.org/show_bug.cgi?id=148995
1117
1118         Reviewed by Alexey Proskuryakov.
1119
1120         Remove use of flag IPC::InterruptWaitingIfSyncMessageArrives as it does not make
1121         sense when sending a sync message.
1122
1123         * UIProcess/Network/NetworkProcessProxy.cpp:
1124         (WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently):
1125         * UIProcess/WebProcessProxy.cpp:
1126         (WebKit::WebProcessProxy::sendProcessWillSuspendImminently):
1127
1128 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
1129
1130         Unreviewed build fix after r189572.
1131
1132         * UIProcess/WebInspectorProxy.cpp:
1133         (WebKit::WebInspectorProxy::inspectorPageURL):
1134         (WebKit::WebInspectorProxy::inspectorTestPageURL):
1135         (WebKit::WebInspectorProxy::inspectorBaseURL):
1136         Remove the const on the now static methods.
1137
1138 2015-09-10  Chris Dumez  <cdumez@apple.com>
1139
1140         Node.appendChild(null) / replaceChild(null, null) / removeChild(null) / insertBefore(null, ref) should throw a TypeError
1141         https://bugs.webkit.org/show_bug.cgi?id=148971
1142         <rdar://problem/22560883>
1143         <rdar://problem/22559225>
1144
1145         Reviewed by Ryosuke Niwa.
1146
1147         ContainerNode::appendChild() now takes a Ref<Node>&& parameter so we
1148         need to update the call sites.
1149
1150         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1151         (WebKit::PDFPlugin::PDFPlugin):
1152         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
1153         (WebKit::PDFPluginAnnotation::attach):
1154         (WebKit::PDFPluginAnnotation::~PDFPluginAnnotation):
1155         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
1156         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
1157
1158 2015-09-10  Joseph Pecoraro  <pecoraro@apple.com>
1159
1160         Web Inspector: Make WebInspectorProxy inspectorURL path methods static
1161         https://bugs.webkit.org/show_bug.cgi?id=149021
1162
1163         Reviewed by Brian Burg.
1164
1165         * UIProcess/WebInspectorProxy.cpp:
1166         (WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess):
1167         (WebKit::isMainOrTestInspectorPage):
1168         (WebKit::decidePolicyForNavigationAction):
1169         (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
1170         (WebKit::WebInspectorProxy::createInspectorPage):
1171         * UIProcess/WebInspectorProxy.h:
1172         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1173         (WebKit::WebInspectorProxy::inspectorPageURL):
1174         (WebKit::WebInspectorProxy::inspectorTestPageURL):
1175         (WebKit::WebInspectorProxy::inspectorBaseURL):
1176         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1177         (WebKit::WebInspectorProxy::inspectorPageURL):
1178         (WebKit::WebInspectorProxy::inspectorTestPageURL):
1179         (WebKit::WebInspectorProxy::inspectorBaseURL):
1180         * UIProcess/mac/WebInspectorProxyMac.mm:
1181         (WebKit::WebInspectorProxy::inspectorPageURL):
1182         (WebKit::WebInspectorProxy::inspectorTestPageURL):
1183         (WebKit::WebInspectorProxy::inspectorBaseURL):
1184
1185 2015-09-09  Joseph Pecoraro  <pecoraro@apple.com>
1186
1187         Web Inspector: Remove dead WebInspectorProxy related code
1188         https://bugs.webkit.org/show_bug.cgi?id=149019
1189
1190         Reviewed by Timothy Hatcher.
1191
1192         * UIProcess/API/C/mac/WKInspectorPrivateMac.h:
1193         * UIProcess/WebInspectorProxy.cpp:
1194         * UIProcess/WebInspectorProxy.h:
1195         * UIProcess/mac/WebInspectorProxyMac.mm:
1196         (-[WKWebInspectorProxyObjCAdapter attachRight:]): Deleted.
1197         (-[WKWebInspectorProxyObjCAdapter attachBottom:]): Deleted.
1198
1199 2015-09-09  Anders Carlsson  <andersca@apple.com>
1200
1201         Remove an unused NSString SPI constant
1202         https://bugs.webkit.org/show_bug.cgi?id=149009
1203
1204         Reviewed by Dan Bernstein.
1205
1206         * UIProcess/API/Cocoa/WKWebView.mm:
1207         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1208
1209 2015-09-09  Dan Bernstein  <mitz@apple.com>
1210
1211         Updated availability annotations for iOS 9 and OS X El Capitan.
1212
1213         Rubber-stamped by Anders Carlsson.
1214
1215         * Shared/API/Cocoa/_WKRenderingProgressEvents.h:
1216         * UIProcess/API/Cocoa/WKError.h:
1217         * UIProcess/API/Cocoa/WKErrorPrivate.h:
1218         * UIProcess/API/Cocoa/WKFrameInfo.h:
1219         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
1220         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1221         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1222         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1223         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1224         * UIProcess/API/Cocoa/WKSecurityOrigin.h:
1225         * UIProcess/API/Cocoa/WKUIDelegate.h:
1226         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1227         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
1228         * UIProcess/API/Cocoa/WKViewPrivate.h:
1229         * UIProcess/API/Cocoa/WKWebView.h:
1230         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1231         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1232         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1233         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1234         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
1235         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1236         * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
1237         * UIProcess/API/Cocoa/_WKElementAction.h:
1238         * UIProcess/API/Cocoa/_WKLayoutMode.h:
1239         * UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h:
1240         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
1241         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
1242         * UIProcess/API/Cocoa/_WKUserContentFilter.h:
1243         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
1244         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1245         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
1246
1247 2015-09-09  Alexey Proskuryakov  <ap@apple.com>
1248
1249         fast/dom/rtl-scroll-to-leftmost-and-resize.html is a flaky timeout - IPC drops messages
1250         https://bugs.webkit.org/show_bug.cgi?id=148951
1251
1252         Reviewed by Anders Carlsson.
1253
1254         * Platform/IPC/Connection.cpp:
1255         (IPC::Connection::waitForMessage): Don't modify m_waitingForMessage without holding
1256         a lock. This is not part of this fix, but seems necessary for correctness.
1257         (IPC::Connection::processIncomingMessage): Don't interrupt a wait that has already succeeded.
1258
1259 2015-09-08  Daniel Bates  <dabates@apple.com>
1260
1261         [Mac] Expose Enable/Disable Accelerated Drawing in MiniBrowser
1262         https://bugs.webkit.org/show_bug.cgi?id=148980
1263
1264         Reviewed by Alexey Proskuryakov.
1265
1266         Expose SPI web preference to enable/disable- and query the state of- accelerated drawing
1267         so that we can toggle this setting in MiniBrowser on Mac.
1268
1269         * UIProcess/API/Cocoa/WKPreferences.mm:
1270         (-[WKPreferences _acceleratedDrawingEnabled]): Added.
1271         (-[WKPreferences _setAcceleratedDrawingEnabled:]): Added.
1272         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1273
1274 2015-09-08  Joseph Pecoraro  <pecoraro@apple.com>
1275
1276         Web Inspector: Remove unused file: WebInspectorFrontendClient.h
1277         https://bugs.webkit.org/show_bug.cgi?id=148979
1278
1279         Reviewed by Brian Burg.
1280
1281         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: Removed.
1282         Unused now. WebInspectorUI subclasses InspectorFrontendClient itself.
1283
1284 2015-09-07  Andy Estes  <aestes@apple.com>
1285
1286         [Mac] DebugRelease builds should link against libWebKitSystemInterfaceElCapitan.a on 10.11
1287         https://bugs.webkit.org/show_bug.cgi?id=148946
1288         <rdar://problem/22603981>
1289
1290         Reviewed by Dan Bernstein.
1291
1292         * Configurations/DebugRelease.xcconfig:
1293
1294 2015-09-05  Michael Catanzaro  <mcatanzaro@igalia.com>
1295
1296         Leak in WebContextInjectedBundleClient::getInjectedBundleInitializationUserData
1297         https://bugs.webkit.org/show_bug.cgi?id=148769
1298
1299         Fix suggested by Zan Dobersek.
1300
1301         Reviewed by Darin Adler.
1302
1303         * UIProcess/WebContextInjectedBundleClient.cpp:
1304         (WebKit::WebContextInjectedBundleClient::getInjectedBundleInitializationUserData):
1305
1306 2015-09-04  Brian Burg  <bburg@apple.com>
1307
1308         Web Inspector: agents should send messages through FrontendRouter instead of FrontendChannel
1309         https://bugs.webkit.org/show_bug.cgi?id=148492
1310
1311         Reviewed by Joseph Pecoraro.
1312
1313         Stop using InspectorForwarding.h.
1314
1315         * WebProcess/WebPage/WebInspector.h:
1316         * WebProcess/WebPage/WebInspectorUI.h:
1317
1318 2015-09-04  Brian Burg  <bburg@apple.com>
1319
1320         Web Inspector: InspectorController should support multiple frontend channels
1321         https://bugs.webkit.org/show_bug.cgi?id=148538
1322
1323         Reviewed by Joseph Pecoraro.
1324
1325         Explicitly disconnect the frontend channel when closing the frontend.
1326
1327         Rename createInspectorPage/closeFrontend to the symmetric and unambiguous
1328         {open,close}FrontendConnection in the WebInspector class.
1329
1330         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1331         (WebKit::WebInspectorClient::openInspectorFrontend):
1332         (WebKit::WebInspectorClient::closeInspectorFrontend):
1333         * WebProcess/WebCoreSupport/WebInspectorClient.h: Stop using a forwarded type.
1334         * WebProcess/WebPage/WebInspector.cpp:
1335         (WebKit::WebInspector::openFrontendConnection):
1336         (WebKit::WebInspector::closeFrontendConnection):
1337         (WebKit::WebInspector::remoteFrontendConnected):
1338         (WebKit::WebInspector::remoteFrontendDisconnected):
1339         (WebKit::WebInspector::createInspectorPage): Deleted.
1340         (WebKit::WebInspector::closeFrontend): Deleted.
1341         * WebProcess/WebPage/WebInspector.h:
1342
1343 2015-09-04  Dan Bernstein  <mitz@apple.com>
1344
1345         [iOS] Disable backspace key navigation by default
1346         https://bugs.webkit.org/show_bug.cgi?id=148808
1347
1348         Reviewed by Tim Horton.
1349
1350         * Shared/WebPreferencesDefinitions.h: Defined DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED as
1351           false on iOS, true elsewhere, and made it the default value of the
1352           backspaceKeyNavigationEnabled preference key.
1353
1354 2015-09-04  Beth Dakin  <bdakin@apple.com>
1355
1356         Need to be able to test default behaviors on force click
1357         https://bugs.webkit.org/show_bug.cgi?id=148758
1358
1359         Reviewed by Tim Horton.
1360
1361         The hit test seems to return synchronously in WKTR, so we need to do the hit 
1362         test last before we clear state otherwise we will trample the hit test 
1363         result.
1364         * UIProcess/mac/WKImmediateActionController.mm:
1365         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
1366         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
1367
1368 2015-09-03  Commit Queue  <commit-queue@webkit.org>
1369
1370         Unreviewed, rolling out r189338.
1371         https://bugs.webkit.org/show_bug.cgi?id=148785
1372
1373         Caused tons of crashes (Requested by cdumez on #webkit).
1374
1375         Reverted changeset:
1376
1377         "Web Inspector: InspectorController should support multiple
1378         frontend channels"
1379         https://bugs.webkit.org/show_bug.cgi?id=148538
1380         http://trac.webkit.org/changeset/189338
1381
1382 2015-09-03  Brian Burg  <bburg@apple.com>
1383
1384         Web Inspector: InspectorController should support multiple frontend channels
1385         https://bugs.webkit.org/show_bug.cgi?id=148538
1386
1387         Reviewed by Joseph Pecoraro.
1388
1389         Explicitly disconnect the frontend channel when closing the frontend.
1390
1391         Rename createInspectorPage/closeFrontend to the symmetric and unambiguous
1392         {open,close}FrontendConnection in the WebInspector class.
1393
1394         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1395         (WebKit::WebInspectorClient::openInspectorFrontend):
1396         (WebKit::WebInspectorClient::closeInspectorFrontend):
1397         * WebProcess/WebCoreSupport/WebInspectorClient.h: Stop using a forwarded type.
1398         * WebProcess/WebPage/WebInspector.cpp:
1399         (WebKit::WebInspector::openFrontendConnection):
1400         (WebKit::WebInspector::closeFrontendConnection):
1401         (WebKit::WebInspector::remoteFrontendConnected):
1402         (WebKit::WebInspector::remoteFrontendDisconnected):
1403         (WebKit::WebInspector::createInspectorPage): Deleted.
1404         (WebKit::WebInspector::closeFrontend): Deleted.
1405         * WebProcess/WebPage/WebInspector.h:
1406
1407 2015-09-03  Timothy Hatcher  <timothy@apple.com>
1408
1409         Web Inspector: Closing the Safari window when the Web Inspector is one of the other windows in split screen mode can cause the entire screen to go black
1410         https://bugs.webkit.org/show_bug.cgi?id=148777
1411
1412         Reviewed by Brian Burg.
1413
1414         * UIProcess/mac/WebInspectorProxyMac.mm:
1415         (WebKit::WebInspectorProxy::platformDidClose):
1416         (WebKit::WebInspectorProxy::platformHide):
1417         (WebKit::WebInspectorProxy::platformAttach):
1418         Call close instead of orderOut: to make fullscreen and tile modes with Web Inspector work as expected.
1419
1420 2015-09-03  Brady Eidson  <beidson@apple.com>
1421
1422         Move SecurityOriginData from WK2 to WebCore.
1423         https://bugs.webkit.org/show_bug.cgi?id=148739
1424
1425         Reviewed by Tim Horton.
1426
1427         This will be needed for upcoming IndexedDB work.
1428
1429         * CMakeLists.txt:
1430         * DatabaseProcess/DatabaseProcess.h:
1431         * DatabaseProcess/DatabaseProcess.messages.in:
1432         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
1433         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
1434         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1435         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseIdentifier.cpp:
1436         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseIdentifier.h:
1437         * NetworkProcess/NetworkProcess.cpp:
1438         * NetworkProcess/NetworkProcess.h:
1439         * NetworkProcess/NetworkProcess.messages.in:
1440         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1441         * Shared/WebCrossThreadCopier.cpp:
1442         * Shared/WebCrossThreadCopier.h:
1443         * Shared/WebsiteData/WebsiteData.cpp:
1444         * UIProcess/API/APINavigationClient.h:
1445         * UIProcess/API/APIUIClient.h:
1446         * UIProcess/API/C/WKPage.cpp:
1447         * UIProcess/API/Cocoa/WKUserContentController.mm:
1448         * UIProcess/API/gtk/WebKitUIClient.cpp:
1449         * UIProcess/Cocoa/NavigationState.h:
1450         * UIProcess/Cocoa/NavigationState.mm:
1451         * UIProcess/Cocoa/UIDelegate.h:
1452         * UIProcess/Cocoa/UIDelegate.mm:
1453         * UIProcess/Storage/StorageManager.cpp:
1454         * UIProcess/Storage/StorageManager.h:
1455         * UIProcess/Storage/StorageManager.messages.in:
1456         * UIProcess/UserContent/WebScriptMessageHandler.h:
1457         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1458         * UIProcess/UserContent/WebUserContentControllerProxy.h:
1459         * UIProcess/UserContent/WebUserContentControllerProxy.messages.in:
1460         * UIProcess/WebCookieManagerProxy.cpp:
1461         * UIProcess/WebPageProxy.h:
1462         * UIProcess/WebPageProxy.messages.in:
1463         * WebKit2.xcodeproj/project.pbxproj:
1464         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1465         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
1466         * WebProcess/MediaCache/WebMediaKeyStorageManager.h:
1467         * WebProcess/Storage/StorageAreaMap.cpp:
1468         * WebProcess/UserContent/WebUserContentController.cpp:
1469         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1470         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1471         * WebProcess/WebProcess.cpp:
1472         * WebProcess/WebProcess.h:
1473         * WebProcess/WebProcess.messages.in:
1474
1475 2015-09-03  Tim Horton  <timothy_horton@apple.com>
1476
1477         [Mac] Add support for testing swipes
1478         https://bugs.webkit.org/show_bug.cgi?id=148700
1479
1480         Reviewed by Beth Dakin.
1481
1482         * UIProcess/API/mac/WKView.mm:
1483         (takeWindowSnapshot):
1484         (-[WKView _takeViewSnapshot]):
1485         Fall back to the non-hardware snapshotting path if the hardware path fails,
1486         which usually happens if the view is fully off-screen (as in the case
1487         of WebKitTestRunner).
1488
1489 2015-09-02  Tim Horton  <timothy_horton@apple.com>
1490
1491         Add a modern API way to know that the navigation gesture snapshot was removed, for WebKitTestRunner
1492         https://bugs.webkit.org/show_bug.cgi?id=148693
1493
1494         Reviewed by Anders Carlsson.
1495
1496         * UIProcess/API/APINavigationClient.h:
1497         (API::NavigationClient::didRemoveNavigationGestureSnapshot):
1498         * UIProcess/API/C/WKPage.cpp:
1499         (WKPageSetPageNavigationClient):
1500         * UIProcess/API/C/WKPageNavigationClient.h:
1501         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1502         * UIProcess/Cocoa/NavigationState.h:
1503         * UIProcess/Cocoa/NavigationState.mm:
1504         (WebKit::NavigationState::setNavigationDelegate):
1505         (WebKit::NavigationState::navigationGestureSnapshotWasRemoved):
1506         * UIProcess/PageClient.h:
1507         * UIProcess/WebPageProxy.cpp:
1508         (WebKit::WebPageProxy::navigationGestureDidEnd):
1509         (WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved):
1510         * UIProcess/ios/PageClientImplIOS.h:
1511         * UIProcess/ios/PageClientImplIOS.mm:
1512         (WebKit::PageClientImpl::didRemoveNavigationGestureSnapshot):
1513         * UIProcess/mac/PageClientImpl.h:
1514         * UIProcess/mac/PageClientImpl.mm:
1515         (WebKit::PageClientImpl::didRemoveNavigationGestureSnapshot):
1516         * UIProcess/API/gtk/PageClientImpl.cpp:
1517         (WebKit::PageClientImpl::didRemoveNavigationGestureSnapshot):
1518         * UIProcess/API/gtk/PageClientImpl.h:
1519         * UIProcess/CoordinatedGraphics/WebView.h:
1520         Add a callback for WKTR when the swipe snapshot is removed.
1521
1522 2015-09-02  Andreas Kling  <akling@apple.com>
1523
1524         ScrollbarThemes should be returned by reference.
1525         <https://webkit.org/b/147551>
1526
1527         Reviewed by Zalan Bujtas.
1528
1529         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1530         (WebKit::PDFPlugin::paintControlForLayerInContext):
1531
1532 2015-09-02  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1533
1534         REGRESSION(r188206): [EFL] Adjust scrollbar width to ewk_view_contents_size_get API test 
1535         https://bugs.webkit.org/show_bug.cgi?id=148701
1536
1537         Reviewed by Csaba Osztrogonác.
1538
1539         r188206 applied to use non-overlay scrollbar on EFL minibrowser. So we need to
1540         adjust scrollwidth to ewk_view_contents_size_get API test as well.
1541
1542         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1543         (TEST_F):
1544
1545 2015-09-02  Emanuele Aina  <emanuele.aina@collabora.com>
1546
1547         Fix build with ENABLE(DATABASE_PROCESS) and !ENABLE(INDEXED_DATABASE)
1548         https://bugs.webkit.org/show_bug.cgi?id=146550
1549
1550         Reviewed by Brady Eidson.
1551
1552         Given that INDEXED_DATABASE at the moment is the only user of
1553         DATABASE_PROCESS, their guards got inevitably mixed up with various
1554         levels of consistency. Since the --no-indexed-database flag from
1555         build-webkit leaves DATABASE_PROCESS enabled, this resulted in build
1556         failures.
1557
1558         * DatabaseProcess/DatabaseProcess.cpp:
1559         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
1560         * Shared/Databases/DatabaseProcessCreationParameters.cpp:
1561         * Shared/Databases/DatabaseProcessCreationParameters.h:
1562         * UIProcess/WebProcessPool.cpp:
1563         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
1564         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
1565         Add missing ENABLE(INDEXED_DATABASE) guards and moved the
1566         misplaced ones.
1567
1568         * DatabaseProcess/DatabaseProcess.h:
1569         Ditto, and also add a forward declaration for SecurityOriginData since
1570         with INDEXED_DATABASE off SecurityOriginData.h is no longer included
1571         by way of UniqueIDBDatabaseIdentifier.h.
1572
1573 2015-09-01  Brian Burg  <bburg@apple.com>
1574
1575         Web Inspector: opt the Inspector process out of page visibility-based process suppression when running tests
1576         https://bugs.webkit.org/show_bug.cgi?id=148686
1577
1578         Reviewed by Timothy Hatcher.
1579
1580         This may be the cause of debug test timeouts and high execution time variance
1581         that have been plaguing the bots. Process suppression shouldn't happen for
1582         inspector process during tests anyway, so it shouldn't hurt to flip this.
1583
1584         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1585
1586             The stated default here is incorrect, the default value is true.
1587
1588         * UIProcess/API/Cocoa/WKPreferences.mm:
1589         (-[WKPreferences _pageVisibilityBasedProcessSuppressionEnabled]): Added.
1590         (-[WKPreferences _setPageVisibilityBasedProcessSuppressionEnabled:]): Added.
1591         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1592         * UIProcess/mac/WebInspectorProxyMac.mm:
1593         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1594
1595 2015-09-01  Alexey Proskuryakov  <ap@apple.com>
1596
1597         Update sandbox after r179367
1598         https://bugs.webkit.org/show_bug.cgi?id=148683
1599         rdar://problem/21767401
1600
1601         Reviewed by Darin Adler.
1602
1603         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
1604
1605 2015-08-26  Andy Estes  <aestes@apple.com>
1606
1607         [Content Filtering] Determine navigation and content policy before continuing to filter a load
1608         https://bugs.webkit.org/show_bug.cgi?id=148506
1609
1610         Reviewed by Brady Eidson.
1611
1612         Deleted parts of r188486 and r188851.
1613
1614         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1615         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
1616         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1617         * WebProcess/WebPage/WebFrame.cpp:
1618         (WebKit::WebFrame::convertMainResourceLoadToDownload):
1619
1620 2015-08-31  Chris Dumez  <cdumez@apple.com>
1621
1622         Range.detach() / NodeIterator.detach() should be no-ops as per the latest DOM specification
1623         https://bugs.webkit.org/show_bug.cgi?id=148454
1624
1625         Reviewed by Ryosuke Niwa.
1626
1627         Update Range API call sites to reflect changes.
1628
1629         * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
1630         (-[WKDOMRange collapse:]):
1631         (-[WKDOMRange startContainer]):
1632         (-[WKDOMRange startOffset]):
1633         (-[WKDOMRange endContainer]):
1634         (-[WKDOMRange endOffset]):
1635         (-[WKDOMRange isCollapsed]):
1636         (-[WKDOMRange text]): Deleted.
1637         * WebProcess/WebPage/FindController.cpp:
1638         (WebKit::FindController::getImageForFindMatch):
1639         (WebKit::FindController::selectFindMatch):
1640         * WebProcess/WebPage/WebPage.cpp:
1641         (WebKit::targetFrameForEditing):
1642         (WebKit::WebPage::firstRectForCharacterRangeAsync): Deleted.
1643         * WebProcess/WebPage/efl/WebPageEfl.cpp:
1644         (WebKit::targetFrameForEditing):
1645         * WebProcess/WebPage/ios/WebPageIOS.mm:
1646         (WebKit::WebPage::rangeForWebSelectionAtPosition):
1647         (WebKit::WebPage::rangeForBlockAtPoint):
1648         (WebKit::containsRange):
1649         (WebKit::unionDOMRanges):
1650         (WebKit::WebPage::contractedRangeFromHandle):
1651         * WebProcess/WebPage/mac/WebPageMac.mm:
1652         (WebKit::WebPage::dictionaryPopupInfoForRange):
1653         (WebKit::WebPage::firstRectForCharacterRange): Deleted.
1654
1655 2015-08-31  Tim Horton  <timothy_horton@apple.com>
1656
1657         iOS WebKit2 find-in-page doesn't support multi-line results, is often blank
1658         https://bugs.webkit.org/show_bug.cgi?id=148599
1659         <rdar://problem/17914031>
1660
1661         Reviewed by Beth Dakin.
1662
1663         * WebProcess/WebPage/FindController.cpp:
1664         (WebKit::FindController::findString):
1665         (WebKit::FindController::didFindString):
1666         * WebProcess/WebPage/FindController.h:
1667         Add didFindString() for FindControllerIOS.
1668
1669         * WebProcess/WebPage/ios/FindControllerIOS.mm:
1670         (WebKit::FindIndicatorOverlayClientIOS::drawRect):
1671         (WebKit::FindController::updateFindIndicator):
1672         (WebKit::setCompositionSelectionChangeEnabledInAllFrames):
1673         (WebKit::FindController::willFindString):
1674         (WebKit::FindController::didFindString):
1675         (WebKit::FindController::didFailToFindString):
1676         (WebKit::FindController::didHideFindIndicator):
1677         * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
1678         (WebKit::FindIndicatorOverlayClientIOS::FindIndicatorOverlayClientIOS):
1679         Adopt TextIndicator and shrink-wrapping.
1680
1681         We'll re-create the indicator if the device/page scale factor change;
1682         this is the only case in which a TextIndicator sticks around when
1683         page scale changes -- we should come up with a better model!
1684
1685 2015-08-31  Antti Koivisto  <antti@apple.com>
1686
1687         Network Cache: Stale content after back navigation
1688         https://bugs.webkit.org/show_bug.cgi?id=148634
1689
1690         Reviewed by Chris Dumez.
1691
1692         It is possible to get an older version of the previous page when navigating back. This can happen
1693         if the main resource load has not completed before navigating away from the page.
1694
1695         Network cache entry is normally updated when the load completes. In case of cancellation we would leave
1696         any existing entry as-is. However we render incrementally and user might have seen some content from
1697         the partial load already. Navigating back to the cached page could show older version of the content.
1698
1699         * NetworkProcess/NetworkResourceLoader.cpp:
1700         (WebKit::NetworkResourceLoader::abort):
1701
1702             If a network load is canceled by the client after receiving response but before the load has completed
1703             remove any existing cache entry for it.
1704
1705 2015-08-28  Myles C. Maxfield  <mmaxfield@apple.com>
1706
1707         Migrate GraphicsContexts from pointers to references
1708         https://bugs.webkit.org/show_bug.cgi?id=148561
1709
1710         Reviewed by Tim Horton.
1711
1712         * PluginProcess/PluginControllerProxy.cpp:
1713         (WebKit::PluginControllerProxy::paint):
1714         * Shared/cairo/ShareableBitmapCairo.cpp:
1715         (WebKit::ShareableBitmap::paint):
1716         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1717         (WebKit::imageForRect):
1718         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1719         (WebKit::InjectedBundleRangeHandle::renderedImage):
1720         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1721         (WebKit::NetscapePlugin::paint):
1722         (WebKit::NetscapePlugin::snapshot):
1723         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1724         * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
1725         (WebKit::NetscapePlugin::platformPaint):
1726         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1727         (WebKit::NetscapePlugin::platformPaint):
1728         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1729         (WebKit::NetscapePlugin::platformPaint):
1730         * WebProcess/Plugins/PDF/PDFPlugin.h:
1731         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1732         (WebKit::PDFPlugin::updateControlTints):
1733         (WebKit::PDFPlugin::paintControlForLayerInContext):
1734         * WebProcess/Plugins/Plugin.cpp:
1735         (WebKit::Plugin::updateControlTints):
1736         * WebProcess/Plugins/Plugin.h:
1737         * WebProcess/Plugins/PluginProxy.cpp:
1738         (WebKit::PluginProxy::paint):
1739         * WebProcess/Plugins/PluginProxy.h:
1740         * WebProcess/Plugins/PluginView.cpp:
1741         (WebKit::PluginView::paint):
1742         * WebProcess/Plugins/PluginView.h:
1743         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
1744         (WebKit::convertCairoSurfaceToShareableBitmap):
1745         * WebProcess/WebPage/WebPage.cpp:
1746         (WebKit::WebPage::drawRect):
1747         (WebKit::WebPage::snapshotAtSize):
1748         (WebKit::WebPage::snapshotNode):
1749         * WebProcess/WebPage/ios/FindControllerIOS.mm:
1750         (WebKit::FindIndicatorOverlayClientIOS::drawRect):
1751
1752 2015-08-28  Eric Carlson  <eric.carlson@apple.com>
1753
1754         [Mac] Restructure WebMediaSessionManager for testing
1755         https://bugs.webkit.org/show_bug.cgi?id=148593
1756
1757         Reviewed by Jer Noble.
1758
1759         * UIProcess/mac/PageClientImpl.mm:
1760         (WebKit::PageClientImpl::mediaSessionManager): Call WebMediaSessionManager::singleton, not
1761           WebMediaSessionManagerMac::singleton.
1762
1763 2015-08-28  Jer Noble  <jer.noble@apple.com>
1764
1765         [iOS] Add WebKit/WebKit2 settings to control automatic data loading
1766         https://bugs.webkit.org/show_bug.cgi?id=148579
1767
1768         Reviewed by Anders Carlsson.
1769
1770         Add a property to WKWebViewConfiguration to control whether clients are allowed
1771         to load media data automatically.  Pass this configuration on through to WebCore.
1772
1773         * Shared/WebPreferencesDefinitions.h:
1774         * UIProcess/API/Cocoa/WKWebView.mm:
1775         (-[WKWebView initWithFrame:configuration:]):
1776         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1777         (-[WKWebViewConfiguration init]):
1778         (-[WKWebViewConfiguration copyWithZone:]):
1779         (-[WKWebViewConfiguration _mediaDataLoadsAutomatically]):
1780         (-[WKWebViewConfiguration _setMediaDataLoadsAutomatically:]):
1781         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1782         * WebProcess/WebPage/WebPage.cpp:
1783         (WebKit::WebPage::updatePreferences):
1784
1785 2015-08-28  Jer Noble  <jer.noble@apple.com>
1786
1787         [iOS] Make the AllowsInlineMediaPlayback preference work in WebKit / WebKit2.
1788         https://bugs.webkit.org/show_bug.cgi?id=147512
1789
1790         Reviewed by Anders Carlsson.
1791
1792         Default the value of allowsInlineMediaPlayback to YES on iPad and NO on iPhone and iPod.
1793         Add a new configuration property, _inlineMediaPlaybackRequiresPlaysInlineAttribute, which
1794         defaults to NO on iPad and YES on iPhone and iPad.
1795
1796         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1797         (-[WKWebViewConfiguration init]):
1798         * Shared/WebPreferencesDefinitions.h:
1799         * UIProcess/API/C/WKPreferences.cpp:
1800         (WKPreferencesSetInlineMediaPlaybackRequiresPlaysInlineAttribute):
1801         (WKPreferencesGetInlineMediaPlaybackRequiresPlaysInlineAttribute):
1802         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1803         * UIProcess/API/Cocoa/WKWebView.mm:
1804         (-[WKWebView initWithFrame:configuration:]):
1805         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1806         (-[WKWebViewConfiguration init]):
1807         (-[WKWebViewConfiguration copyWithZone:]):
1808         (-[WKWebViewConfiguration _inlineMediaPlaybackRequiresPlaysInlineAttribute]):
1809         (-[WKWebViewConfiguration _setInlineMediaPlaybackRequiresPlaysInlineAttribute:]):
1810         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1811         * WebProcess/WebPage/WebPage.cpp:
1812         (WebKit::WebPage::updatePreferences):
1813
1814 2015-08-28  Timothy Horton  <timothy_horton@apple.com>
1815
1816         Add navigation gesture callbacks to WKPageNavigationClient
1817         https://bugs.webkit.org/show_bug.cgi?id=148568
1818         <rdar://problem/22371346>
1819
1820         Reviewed by Anders Carlsson.
1821
1822         * UIProcess/API/APINavigationClient.h:
1823         (API::NavigationClient::didBeginNavigationGesture):
1824         (API::NavigationClient::willEndNavigationGesture):
1825         (API::NavigationClient::didEndNavigationGesture):
1826         * UIProcess/API/C/WKPage.cpp:
1827         (WKPageSetPageNavigationClient):
1828         * UIProcess/API/C/WKPageNavigationClient.h:
1829         * UIProcess/WebPageProxy.cpp:
1830         (WebKit::WebPageProxy::navigationGestureDidBegin):
1831         (WebKit::WebPageProxy::navigationGestureWillEnd):
1832         (WebKit::WebPageProxy::navigationGestureDidEnd):
1833
1834 2015-08-28  Timothy Horton  <timothy_horton@apple.com>
1835
1836         Get rid of the DynamicSizeWithMinimumViewSize layout mode
1837         https://bugs.webkit.org/show_bug.cgi?id=148554
1838
1839         Reviewed by Anders Carlsson.
1840
1841         * UIProcess/API/C/WKLayoutMode.h:
1842         * UIProcess/API/Cocoa/WKViewPrivate.h:
1843         * UIProcess/API/Cocoa/WKWebView.mm:
1844         (-[WKWebView _layoutMode]):
1845         (-[WKWebView _setLayoutMode:]):
1846         (-[WKWebView _setMinimumViewSize:]): Deleted.
1847         (-[WKWebView _minimumViewSize]): Deleted.
1848         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1849         * UIProcess/API/Cocoa/_WKLayoutMode.h:
1850         * UIProcess/API/mac/WKView.mm:
1851         (-[WKView _setMinimumViewSize:]): Deleted.
1852         (-[WKView _minimumViewSize]): Deleted.
1853         * UIProcess/WebPageProxy.cpp:
1854         (WebKit::WebPageProxy::scaleViewAndUpdateGeometryFenced): Deleted.
1855         * UIProcess/WebPageProxy.h:
1856         * UIProcess/mac/WKViewLayoutStrategy.mm:
1857         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
1858         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
1859         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy _updateTransientScale:]): Deleted.
1860         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]): Deleted.
1861         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeMinimumViewSize]): Deleted.
1862         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willStartLiveResize]): Deleted.
1863         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didEndLiveResize]): Deleted.
1864         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeFrameSize]): Deleted.
1865         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]): Deleted.
1866         * WebProcess/WebPage/DrawingArea.h:
1867         (WebKit::DrawingArea::replyWithFenceAfterNextFlush): Deleted.
1868         * WebProcess/WebPage/WebPage.cpp:
1869         (WebKit::WebPage::scaleViewAndUpdateGeometryFenced): Deleted.
1870         * WebProcess/WebPage/WebPage.h:
1871         * WebProcess/WebPage/WebPage.messages.in:
1872         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1873         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1874         (WebKit::TiledCoreAnimationDrawingArea::replyWithFenceAfterNextFlush): Deleted.
1875
1876 2015-08-28  Timothy Horton  <timothy_horton@apple.com>
1877
1878         [Mac] Right-clicking on GIFs spins the UI process for a while
1879         https://bugs.webkit.org/show_bug.cgi?id=148566
1880         <rdar://problem/22460854>
1881
1882         Reviewed by Brady Eidson.
1883
1884         * UIProcess/WebPageProxy.cpp:
1885         (WebKit::WebPageProxy::internalShowContextMenu):
1886         (WebKit::WebPageProxy::platformInitializeShareMenuItem):
1887         * UIProcess/WebPageProxy.h:
1888         * UIProcess/mac/WebPageProxyMac.mm:
1889         (WebKit::WebPageProxy::platformInitializeShareMenuItem):
1890         Move all of the code to make a Share menuitem into platformInitializeShareMenuItem.
1891         Make an NSImage directly from the image data if possible.
1892
1893 2015-08-28  Michael Catanzaro  <mcatanzaro@igalia.com>
1894
1895         [CMake] LIBSECCOMP_INCLUDE_DIRS should be added to WebKit2_SYSTEM_INCLUDE_DIRECTORIES
1896         https://bugs.webkit.org/show_bug.cgi?id=148552
1897
1898         Reviewed by Žan Doberšek.
1899
1900         LIBSECCOMP_INCLUDE_DIRS should be added to WebKit2_SYSTEM_INCLUDE_DIRECTORIES, not
1901         WebKit2_INCLUDE_DIRECTORIES. (So that warnings from libseccomp headers are suppressed. Not
1902         that there are any right now.)
1903
1904         * PlatformGTK.cmake:
1905
1906 2015-08-28  Michael Catanzaro  <mcatanzaro@igalia.com>
1907
1908         Minor fixes in reportUnexpectedSyscall
1909         https://bugs.webkit.org/show_bug.cgi?id=148551
1910
1911         Reviewed by Žan Doberšek.
1912
1913         There is an off-by-one in the static assert.
1914
1915         Also, an unsigned long long is passed in, but the parameter is an int. Then it's passed to
1916         writeUnsignedInt, which takes an unsigned int. Let's use unsigned int instead. (The value
1917         is a syscall number, so it's safe to truncate regardless -- it never be anywhere near as
1918         large as an int, unless the input is malicious, in which case truncating it is the right
1919         thing to do anyway -- so this is just a matter of style.)
1920
1921         * Shared/linux/SeccompFilters/Syscall.cpp:
1922         (WebKit::reportUnexpectedSyscall):
1923
1924 2015-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1925
1926         [GTK] Simplify the internal API to create a WebView
1927         https://bugs.webkit.org/show_bug.cgi?id=148570
1928
1929         Reviewed by Žan Doberšek.
1930
1931         Now that all the information required to create a WebView is in
1932         API::PageConfiguration, we can simplify the internal API to
1933         receive only the configuration instead of receiving a long list of
1934         parameters that we use to build a new API::PageConfiguration.
1935
1936         * UIProcess/API/C/gtk/WKView.cpp:
1937         (WKViewCreate):
1938         * UIProcess/API/C/gtk/WKView.h:
1939         * UIProcess/API/gtk/WebKitWebContext.cpp:
1940         (webkitWebContextCreatePageForWebView):
1941         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1942         (webkitWebViewBaseCreate):
1943         (webkitWebViewBaseCreateWebPage):
1944         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
1945         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1946         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1947
1948 2015-08-27  Timothy Horton  <timothy_horton@apple.com>
1949
1950         Video full-screen shouldn't use the DynamicSizeWithMinimumViewSize layout mode
1951         https://bugs.webkit.org/show_bug.cgi?id=148553
1952
1953         Reviewed by Zalan Bujtas.
1954
1955         * UIProcess/API/mac/WKView.mm:
1956         (-[WKView _supportsArbitraryLayoutModes]):
1957         (-[WKView _updateSupportsArbitraryLayoutModes]):
1958         (-[WKView _didCommitLoadForMainFrame]):
1959         * UIProcess/API/mac/WKViewInternal.h:
1960         * UIProcess/mac/PageClientImpl.mm:
1961         (WebKit::PageClientImpl::beganEnterFullScreen):
1962         (WebKit::PageClientImpl::beganExitFullScreen):
1963         * UIProcess/mac/WKFullScreenWindowController.mm:
1964         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Deleted.
1965         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Deleted.
1966         It's not OK to just randomly change the layout mode, because the client
1967         can change it or its properties out from under us, and also because we
1968         weren't resetting it to whatever the client had specified.
1969
1970         I recently implemented a better way to override layout modes, for PDF,
1971         so use that here. Also, we shouldn't use DynamicSizeWithMinimumViewSize,
1972         we should just use the "normal" mode (ViewSize), since we've already ensured
1973         a minimum size by setting contentMinSize.
1974
1975 2015-08-27  Alexey Proskuryakov  <ap@apple.com>
1976
1977         pluginInfo.clientLoadPolicy is used uninitialized in WebContent process
1978         https://bugs.webkit.org/show_bug.cgi?id=148550
1979
1980         Reviewed by Tim Horton.
1981
1982         This fixes flakiness on plugins/plugin-javascript-access.html.
1983
1984         * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<PluginInfo>::decode):
1985
1986 2015-08-27  Timothy Horton  <timothy_horton@apple.com>
1987
1988         Factor out Lookup invocation
1989         https://bugs.webkit.org/show_bug.cgi?id=148509
1990
1991         Reviewed by Anders Carlsson.
1992
1993         * Shared/DictionaryPopupInfo.cpp: Removed.
1994         * Shared/DictionaryPopupInfo.h: Removed.
1995         Moved to WebCore.
1996
1997         * Shared/WebCoreArgumentCoders.cpp:
1998         (IPC::ArgumentCoder<DictionaryPopupInfo>::encode):
1999         (IPC::ArgumentCoder<DictionaryPopupInfo>::decode):
2000         Add encode/decoders for DictionaryPopupInfo now that it's in WebCore.
2001
2002         * Shared/WebCoreArgumentCoders.h:
2003         * Shared/WebHitTestResult.h:
2004         * Shared/mac/ArgumentCodersMac.h:
2005         * UIProcess/API/mac/WKView.mm:
2006         (+[WKView hideWordDefinitionWindow]):
2007         (-[WKView _dismissContentRelativeChildWindows]):
2008         * UIProcess/PageClient.h:
2009         * UIProcess/WebPageProxy.h:
2010         * UIProcess/WebPageProxy.messages.in:
2011         * UIProcess/mac/PageClientImpl.h:
2012         * UIProcess/mac/PageClientImpl.mm:
2013         (WebKit::PageClientImpl::didPerformDictionaryLookup):
2014         * UIProcess/mac/WKImmediateActionController.mm:
2015         (-[WKImmediateActionController _animationControllerForText]):
2016         * UIProcess/mac/WebPageProxyMac.mm:
2017         * WebKit2.xcodeproj/project.pbxproj:
2018         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2019         (WebKit::PDFPlugin::showDefinitionForAttributedString):
2020         (WebKit::PDFPlugin::lookupTextAtLocation):
2021         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2022         * WebProcess/WebPage/WebPage.h:
2023         * WebProcess/WebPage/mac/WebPageMac.mm:
2024         (WebKit::WebPage::performDictionaryLookupAtLocation):
2025         (WebKit::WebPage::performDictionaryLookupForSelection):
2026         (WebKit::WebPage::dictionaryPopupInfoForRange):
2027         (WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin):
2028         (WebKit::WebPage::lookupTextAtLocation):
2029         Adjust to new names and move stuff to WebCore.
2030
2031 2015-08-27  Brian Burg  <bburg@apple.com>
2032
2033         Web Inspector: FrontendChannel should know its own connection type
2034         https://bugs.webkit.org/show_bug.cgi?id=148482
2035
2036         Reviewed by Joseph Pecoraro.
2037
2038         * WebProcess/WebPage/WebInspector.h: add connectionType().
2039
2040 2015-08-27  Csaba Osztrogonác  <ossy@webkit.org>
2041
2042         [EFL] REGRESSION: 50+ layout tests crash
2043         https://bugs.webkit.org/show_bug.cgi?id=148471
2044
2045         Reviewed by Gyuyoung Kim.
2046
2047         * UIProcess/CoordinatedGraphics/WebView.cpp:
2048         (WebKit::WebView::WebView):
2049
2050 2015-08-27  Zan Dobersek  <zdobersek@igalia.com>
2051
2052         Fix WKMutableArray creations in WKUserMediaPermissionRequest
2053         https://bugs.webkit.org/show_bug.cgi?id=148489
2054
2055         Reviewed by Carlos Garcia Campos.
2056
2057         Call WKMutableArrayCreate() to create the WKMutableArray objects.
2058         WKMutableArrayRef type is a pointer, so calling 'WKMutableArrayRef()' 
2059         just sets a null value to the variable that is then returned and
2060         queried for size in WebKitTestRunner's TestController, resulting
2061         in a crash.
2062
2063         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
2064         (WKUserMediaPermissionRequestDeviceNamesVideo):
2065         (WKUserMediaPermissionRequestDeviceNamesAudio):
2066
2067 2015-08-26  Emanuele Aina  <emanuele.aina@collabora.com>
2068
2069         [ThreadedCompositor] Use WTF::Condition together with WTF::Lock
2070         https://bugs.webkit.org/show_bug.cgi?id=148493
2071
2072         Reviewed by Gyuyoung Kim.
2073
2074         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2075         Replace ThreadCondition::signal() calls with Condition::notifyOne().
2076         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
2077         Replace ThreadCondition usage with Condition.
2078
2079 2015-08-26  Wenson Hsieh  <wenson_hsieh@apple.com>
2080
2081         Fix crash due to animationDidEnd called on deallocated RemoteLayerTreeHost
2082         https://bugs.webkit.org/show_bug.cgi?id=148442
2083         <rdar://problem/21609257>
2084
2085         Reviewed by Tim Horton.
2086
2087         A PlatformCAAnimationRemote's backpointer to a deallocated RemoteLayerTreeHost is not
2088         invalidated when its host removes its reference to it.
2089
2090         * UIProcess/mac/RemoteLayerTreeHost.mm:
2091         (WebKit::RemoteLayerTreeHost::layerWillBeRemoved): Invalidate a backpointer from the
2092             PlatformCAAnimationRemotes to the RemoteLayerTreeHost.
2093
2094 2015-08-26  Beth Dakin  <bdakin@apple.com>
2095
2096         REGRESSION: Safari navigates after a cancelled force click
2097         https://bugs.webkit.org/show_bug.cgi?id=148491
2098         -and corresponding-
2099         rdar://problem/22394323
2100
2101         Reviewed by Tim Horton.
2102
2103         Use the current stage to determine which type of cancel this is.
2104         * WebProcess/WebPage/mac/WebPageMac.mm:
2105         (WebKit::WebPage::immediateActionDidCancel):
2106
2107 2015-08-26  Eric Carlson  <eric.carlson@apple.com>
2108
2109         Media Session: make MediaSessionMetadata a class
2110         https://bugs.webkit.org/show_bug.cgi?id=148486
2111
2112         Reviewed by Jer Noble.
2113
2114         * Shared/WebCoreArgumentCoders.h: struct MediaSessionMetadata -> class MediaSessionMetadata.
2115         * UIProcess/WebPageProxy.h: Ditto.
2116
2117 2015-08-26  Zan Dobersek  <zdobersek@igalia.com>
2118
2119         Unreviewed.
2120
2121         Fix the crashes in GTK+'s WebKitTestRunner by setting the process pool
2122         on the API::PageConfiguration object in webkitWebViewBaseCreate().
2123
2124         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2125         (webkitWebViewBaseCreate):
2126
2127 2015-08-25  Beth Dakin  <bdakin@apple.com>
2128
2129         Speculative build fix.
2130
2131         * UIProcess/ios/WKContentViewInteraction.mm:
2132         (-[WKContentView setupInteraction]):
2133
2134 2015-08-25  Beth Dakin  <bdakin@apple.com>
2135
2136         Long press gesture recognizer should adjust delay based on other recognizers
2137         https://bugs.webkit.org/show_bug.cgi?id=148402
2138         -and corresponding-
2139         rdar://problem/22278723
2140
2141         Reviewed by Tim Horton.
2142
2143         Call _setAdjustsDelayBasedOnOtherRecognizers with a value of YES.
2144         * UIProcess/ios/WKContentViewInteraction.mm:
2145         (-[WKContentView setupInteraction]):
2146
2147 2015-08-24  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2148
2149         Unreviewed, EFL and GTK build fix since r188895.
2150
2151         * CMakeLists.txt: Rename Rename VisitedLinkProvider to VisitedLinkStore.
2152
2153 2015-08-24  Anders Carlsson  <andersca@apple.com>
2154
2155         Rename VisitedLinkProvider to VisitedLinkStore
2156         https://bugs.webkit.org/show_bug.cgi?id=148406
2157
2158         Reviewed by Tim Horton.
2159
2160         * DerivedSources.make:
2161         * Shared/API/APIObject.h:
2162         * Shared/Cocoa/APIObject.mm:
2163         (API::Object::newObject):
2164         * UIProcess/API/APIPageConfiguration.cpp:
2165         (API::PageConfiguration::copy):
2166         (API::PageConfiguration::visitedLinkStore):
2167         (API::PageConfiguration::setVisitedLinkStore):
2168         (API::PageConfiguration::visitedLinkProvider): Deleted.
2169         (API::PageConfiguration::setVisitedLinkProvider): Deleted.
2170         * UIProcess/API/APIPageConfiguration.h:
2171         * UIProcess/API/C/WKContext.cpp:
2172         (WKContextAddVisitedLink):
2173         (WKContextClearVisitedLinks):
2174         * UIProcess/API/Cocoa/WKWebView.mm:
2175         (-[WKWebView initWithFrame:configuration:]):
2176         * UIProcess/API/Cocoa/_WKVisitedLinkStore.mm:
2177         (-[_WKVisitedLinkStore init]):
2178         (-[_WKVisitedLinkStore dealloc]):
2179         (-[_WKVisitedLinkStore addVisitedLinkWithURL:]):
2180         (-[_WKVisitedLinkStore removeAll]):
2181         (-[_WKVisitedLinkStore _apiObject]):
2182         * UIProcess/API/Cocoa/_WKVisitedLinkStoreInternal.h:
2183         (WebKit::wrapper):
2184         * UIProcess/VisitedLinkProvider.cpp:
2185         (WebKit::generateIdentifier): Deleted.
2186         (WebKit::VisitedLinkProvider::create): Deleted.
2187         (WebKit::VisitedLinkProvider::~VisitedLinkProvider): Deleted.
2188         (WebKit::VisitedLinkProvider::VisitedLinkProvider): Deleted.
2189         (WebKit::VisitedLinkProvider::addProcess): Deleted.
2190         (WebKit::VisitedLinkProvider::removeProcess): Deleted.
2191         (WebKit::VisitedLinkProvider::addVisitedLinkHash): Deleted.
2192         (WebKit::VisitedLinkProvider::removeAll): Deleted.
2193         (WebKit::VisitedLinkProvider::webProcessWillOpenConnection): Deleted.
2194         (WebKit::VisitedLinkProvider::webProcessDidCloseConnection): Deleted.
2195         (WebKit::VisitedLinkProvider::addVisitedLinkHashFromPage): Deleted.
2196         (WebKit::nextPowerOf2): Deleted.
2197         (WebKit::tableSizeForKeyCount): Deleted.
2198         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired): Deleted.
2199         (WebKit::VisitedLinkProvider::resizeTable): Deleted.
2200         (WebKit::VisitedLinkProvider::sendTable): Deleted.
2201         * UIProcess/VisitedLinkStore.cpp: Renamed from Source/WebKit2/UIProcess/VisitedLinkProvider.cpp.
2202         (WebKit::generateIdentifier):
2203         (WebKit::VisitedLinkStore::create):
2204         (WebKit::VisitedLinkStore::~VisitedLinkStore):
2205         (WebKit::VisitedLinkStore::VisitedLinkStore):
2206         (WebKit::VisitedLinkStore::addProcess):
2207         (WebKit::VisitedLinkStore::removeProcess):
2208         (WebKit::VisitedLinkStore::addVisitedLinkHash):
2209         (WebKit::VisitedLinkStore::removeAll):
2210         (WebKit::VisitedLinkStore::webProcessWillOpenConnection):
2211         (WebKit::VisitedLinkStore::webProcessDidCloseConnection):
2212         (WebKit::VisitedLinkStore::addVisitedLinkHashFromPage):
2213         (WebKit::nextPowerOf2):
2214         (WebKit::tableSizeForKeyCount):
2215         (WebKit::VisitedLinkStore::pendingVisitedLinksTimerFired):
2216         (WebKit::VisitedLinkStore::resizeTable):
2217         (WebKit::VisitedLinkStore::sendTable):
2218         * UIProcess/VisitedLinkStore.h: Renamed from Source/WebKit2/UIProcess/VisitedLinkProvider.h.
2219         * UIProcess/VisitedLinkStore.messages.in: Renamed from Source/WebKit2/UIProcess/VisitedLinkProvider.messages.in.
2220         * UIProcess/WebPageProxy.cpp:
2221         (WebKit::WebPageProxy::WebPageProxy):
2222         (WebKit::WebPageProxy::processDidFinishLaunching):
2223         (WebKit::WebPageProxy::creationParameters):
2224         * UIProcess/WebPageProxy.h:
2225         * UIProcess/WebProcessPool.cpp:
2226         (WebKit::WebProcessPool::WebProcessPool):
2227         (WebKit::WebProcessPool::createWebPage):
2228         * UIProcess/WebProcessPool.h:
2229         * UIProcess/WebProcessProxy.cpp:
2230         (WebKit::WebProcessProxy::shutDown):
2231         (WebKit::WebProcessProxy::addVisitedLinkStore):
2232         (WebKit::WebProcessProxy::didDestroyVisitedLinkStore):
2233         (WebKit::WebProcessProxy::addVisitedLinkProvider): Deleted.
2234         (WebKit::WebProcessProxy::didDestroyVisitedLinkProvider): Deleted.
2235         * UIProcess/WebProcessProxy.h:
2236         * WebKit2.xcodeproj/project.pbxproj:
2237         * WebProcess/WebPage/VisitedLinkTableController.cpp:
2238         (WebKit::VisitedLinkTableController::addVisitedLink):
2239
2240 2015-08-24  Tim Horton  <timothy_horton@apple.com>
2241
2242         (Finally...) get rid of WKViewIOS
2243         https://bugs.webkit.org/show_bug.cgi?id=148404
2244
2245         Reviewed by Anders Carlsson.
2246
2247         * UIProcess/API/Cocoa/WKView.h:
2248         * UIProcess/API/ios/WKViewIOS.mm: Removed.
2249         * UIProcess/ios/PageClientImplIOS.h:
2250         * UIProcess/ios/PageClientImplIOS.mm:
2251         (WebKit::PageClientImpl::PageClientImpl): Deleted.
2252         (WebKit::PageClientImpl::didRelaunchProcess): Deleted.
2253         (WebKit::PageClientImpl::refView): Deleted.
2254         (WebKit::PageClientImpl::derefView): Deleted.
2255         * UIProcess/ios/WKContentView.h:
2256         * UIProcess/ios/WKContentView.mm:
2257         (-[WKContentView initWithFrame:processPool:configuration:wkView:]): Deleted.
2258         * WebKit2.xcodeproj/project.pbxproj:
2259         Get rid of WKViewIOS and references to it.
2260
2261         * DatabaseProcess/ios/DatabaseProcessIOS.mm:
2262         (WebKit::DatabaseProcess::initializeSandbox):
2263         * NetworkProcess/ios/NetworkProcessIOS.mm:
2264         (WebKit::NetworkProcess::initializeSandbox):
2265         * Shared/Plugins/mac/PluginSandboxProfile.mm:
2266         (WebKit::pluginSandboxProfileDirectory):
2267         * Shared/ios/ChildProcessIOS.mm:
2268         (WebKit::ChildProcess::initializeSandbox):
2269         * WebProcess/cocoa/WebProcessCocoa.mm:
2270         (WebKit::WebProcess::initializeSandbox):
2271         Look for WKWebView instead of WKView if we have it.
2272
2273 2015-08-24  Anders Carlsson  <andersca@apple.com>
2274
2275         Rename _WKVisitedLinkProvider to _WKVisitedLinkStore for consistency
2276         https://bugs.webkit.org/show_bug.cgi?id=148398
2277
2278         Reviewed by Tim Horton.
2279
2280         We'd like to call the abstract classes providers and the concrete classes stores in WebKit. Begin by renaming
2281         _WKVisitedLinkProvider to _WKVisitedLinkStore, but keep the former around as a deprecated class.
2282
2283         * Shared/API/Cocoa/WebKitPrivate.h:
2284         * Shared/Cocoa/APIObject.mm:
2285         (API::Object::newObject):
2286         * UIProcess/API/Cocoa/WKWebView.mm:
2287         (-[WKWebView initWithFrame:configuration:]):
2288         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2289         (-[WKWebViewConfiguration copyWithZone:]):
2290         (-[WKWebViewConfiguration _visitedLinkStore]):
2291         (-[WKWebViewConfiguration _setVisitedLinkStore:]):
2292         (-[WKWebViewConfiguration _visitedLinkProvider]):
2293         (-[WKWebViewConfiguration _setVisitedLinkProvider:]):
2294         (-[WKWebViewConfiguration _validate]):
2295         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2296         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
2297         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
2298         (-[_WKVisitedLinkProvider init]): Deleted.
2299         (-[_WKVisitedLinkProvider dealloc]): Deleted.
2300         (-[_WKVisitedLinkProvider addVisitedLinkWithURL:]): Deleted.
2301         (-[_WKVisitedLinkProvider removeAll]): Deleted.
2302         (-[_WKVisitedLinkProvider _apiObject]): Deleted.
2303         * UIProcess/API/Cocoa/_WKVisitedLinkStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProvider.h.
2304         * UIProcess/API/Cocoa/_WKVisitedLinkStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm.
2305         (-[_WKVisitedLinkStore init]):
2306         (-[_WKVisitedLinkStore dealloc]):
2307         (-[_WKVisitedLinkStore addVisitedLinkWithURL:]):
2308         (-[_WKVisitedLinkStore removeAll]):
2309         (-[_WKVisitedLinkStore _apiObject]):
2310         * UIProcess/API/Cocoa/_WKVisitedLinkStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h.
2311         (WebKit::wrapper):
2312         * WebKit2.xcodeproj/project.pbxproj:
2313
2314 2015-08-24  Wenson Hsieh  <wenson_hsieh@apple.com>
2315
2316         Use _NSScrollingPredominantAxisFilter for wheel event filtering on Mac
2317         https://bugs.webkit.org/show_bug.cgi?id=147320
2318
2319         Reviewed by Simon Fraser.
2320
2321         Refactored to use a predominant axis filter instead of a predominant axis tracker. This allows us to
2322         employ AppKit's _NSScrollingPredominantAxisFilter when possible, and use the wheel event delta tracker
2323         as a fallback. Here, we refactor EventDispatcher to use the new filters for mainframe scrolling.
2324
2325         No new tests, since this change does not add new functionality.
2326
2327         * WebProcess/WebPage/EventDispatcher.cpp: Include WheelEventDeltaFilterMac.h when necessary.
2328         (WebKit::EventDispatcher::EventDispatcher): Initialize a WheelEventDeltaFilterMac when possible. Otherwise,
2329             fall back to a BasicWheelEventDeltaFilter.
2330         (WebKit::EventDispatcher::wheelEvent): Use filtered deltas to initialize the platform wheel event instead
2331             of zeroing out non-predominant axes.
2332         * WebProcess/WebPage/EventDispatcher.h: Replace m_recentWheelEventDeltaTracker with m_recentWheelEventDeltaFilter.
2333
2334 2015-08-23  Andy Estes  <aestes@apple.com>
2335
2336         [Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveServerRedirectForProvisionalLoadForFrame when Content Filtering is enabled
2337         https://bugs.webkit.org/show_bug.cgi?id=147872
2338         rdar://problem/22044000
2339
2340         Reviewed by Dan Bernstein.
2341         
2342         The provisional DocumentLoader request URL does not reflect redirects when content filtering is enabled, but
2343         the URL argument passed to dispatchDidReceiveServerRedirectForProvisionalLoad() does, so use it intead.
2344
2345         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2346         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
2347         Sent DidReceiveServerRedirectForProvisionalLoadForFrame using the URL argument.
2348         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2349
2350 2015-08-23  Csaba Osztrogonác  <ossy@webkit.org>
2351
2352         Typo fix after r188842.
2353
2354         * CMakeLists.txt:
2355
2356 2015-08-23  Csaba Osztrogonác  <ossy@webkit.org>
2357
2358         Speculative buildfix after r188828.
2359
2360         * CMakeLists.txt:
2361
2362 2015-08-22  Tim Horton  <timothy_horton@apple.com>
2363
2364         Factor out and add logging to swipe-start hysteresis code
2365         https://bugs.webkit.org/show_bug.cgi?id=148361
2366
2367         Reviewed by Darin Adler.
2368
2369         * UIProcess/ViewGestureController.cpp:
2370         (WebKit::ViewGestureController::ViewGestureController):
2371         * UIProcess/mac/ViewGestureController.h:
2372         (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
2373         (WebKit::ViewGestureController::shouldIgnorePinnedState):
2374         (WebKit::ViewGestureController::setShouldIgnorePinnedState):
2375         (WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
2376         (WebKit::ViewGestureController::PendingSwipeTracker::shouldIgnorePinnedState):
2377         (WebKit::ViewGestureController::PendingSwipeTracker::setShouldIgnorePinnedState):
2378         Move pending-swipe members into PendingSwipeTracker.
2379
2380         * UIProcess/mac/ViewGestureControllerMac.mm:
2381         (WebKit::scrollEventCanInfluenceSwipe):
2382         (WebKit::deltaShouldCancelSwipe):
2383         (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
2384         (WebKit::ViewGestureController::handleScrollWheelEvent):
2385         (WebKit::ViewGestureController::PendingSwipeTracker::handleEvent):
2386         (WebKit::ViewGestureController::PendingSwipeTracker::eventWasNotHandledByWebCore):
2387         (WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
2388         (WebKit::ViewGestureController::PendingSwipeTracker::reset):
2389         (WebKit::ViewGestureController::trackSwipeGesture):
2390         (WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
2391         Move pending-swipe methods into PendingSwipeTracker.
2392         Clean up the logic a bit.
2393         Add some logging.
2394
2395 2015-08-22  Timothy Horton  <timothy_horton@apple.com>
2396
2397         WebKitTestRunner should use WKWebView on OS X and iOS
2398         https://bugs.webkit.org/show_bug.cgi?id=143743
2399         <rdar://problem/16947123>
2400
2401         Reviewed by Anders Carlsson.
2402         Patch by Enrica Casucci and myself.
2403
2404         * UIProcess/API/Cocoa/WKWebView.mm:
2405         (-[WKWebView _windowOcclusionDetectionEnabled]):
2406         (-[WKWebView _setWindowOcclusionDetectionEnabled:]):
2407         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2408         Add SPI to disable window occlusion detection, for WebKitTestRunner's use.
2409
2410         * Shared/WebPreferencesDefinitions.h:
2411         Remove a completely unused WebPreference. It is a WebCore Setting,
2412         but in the API it's exposed as a WKPage setter and WKView and WKWebView property
2413         instead of as a WKPreference, so there's no need for the WebPreference.
2414
2415         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2416         (WKBundlePageAddUserScript):
2417         (WKBundlePageAddUserStyleSheet):
2418         (WKBundlePageRemoveAllUserContent):
2419         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2420         * WebProcess/WebPage/WebPage.cpp:
2421         (WebKit::WebPage::addUserScript):
2422         (WebKit::WebPage::addUserStyleSheet):
2423         (WebKit::WebPage::removeAllUserContent):
2424         * WebProcess/WebPage/WebPage.h:
2425         Add WKBundlePage functions for user script and style sheet manipulation.
2426         These use the WebPage's WebUserContentController instead of the WebPageGroupProxy's
2427         (used by the WKBundle functions), so they work correctly with the modern API.
2428
2429 2015-08-22  Michael Catanzaro  <mcatanzaro@igalia.com>
2430
2431         Unreviewed, attempt to fix GTK build after r188718
2432
2433         * CMakeLists.txt: Build WKPageConfigurationRef.cpp
2434         * PlatformEfl.cmake: Don't build WKPageConfigurationRef.cpp
2435
2436 2015-08-22  Antti Koivisto  <antti@apple.com>
2437
2438         Decode data URLs in web process
2439         https://bugs.webkit.org/show_bug.cgi?id=148128
2440
2441         Reviewed by Darin Adler.
2442
2443         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2444         (WebKit::WebResourceLoadScheduler::scheduleLoad):
2445
2446             Don't send data: loads to the network process, handle them locally.
2447
2448         (WebKit::WebResourceLoadScheduler::startLocalLoad):
2449
2450             Call ResourceLoder::start() directly.
2451
2452 2015-08-21  Commit Queue  <commit-queue@webkit.org>
2453
2454         Unreviewed, rolling out r188807, r188813, and r188815.
2455         https://bugs.webkit.org/show_bug.cgi?id=148349
2456
2457         lots of 32-bit build problems, better to resolve separately
2458         and try again (Requested by thorton on #webkit).
2459
2460         Reverted changesets:
2461
2462         "WebKitTestRunner should use WKWebView on OS X and iOS"
2463         https://bugs.webkit.org/show_bug.cgi?id=143743
2464         http://trac.webkit.org/changeset/188807
2465
2466         "Stop building WebKitTestRunner for 32-bit platforms"
2467         https://bugs.webkit.org/show_bug.cgi?id=143743
2468         http://trac.webkit.org/changeset/188813
2469
2470         "Stop building WebKitTestRunner for 32-bit platforms"
2471         https://bugs.webkit.org/show_bug.cgi?id=143743
2472         http://trac.webkit.org/changeset/188815
2473
2474 2015-08-21  Timothy Horton  <timothy_horton@apple.com>
2475
2476         WebKitTestRunner should use WKWebView on OS X and iOS
2477         https://bugs.webkit.org/show_bug.cgi?id=143743
2478         <rdar://problem/16947123>
2479
2480         Reviewed by Anders Carlsson.
2481         Patch by Enrica Casucci and myself.
2482
2483         * UIProcess/API/Cocoa/WKWebView.mm:
2484         (-[WKWebView _windowOcclusionDetectionEnabled]):
2485         (-[WKWebView _setWindowOcclusionDetectionEnabled:]):
2486         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2487         Add SPI to disable window occlusion detection, for WebKitTestRunner's use.
2488
2489         * Shared/WebPreferencesDefinitions.h:
2490         Remove a completely unused WebPreference. It is a WebCore Setting,
2491         but in the API it's exposed as a WKPage setter and WKView and WKWebView property
2492         instead of as a WKPreference, so there's no need for the WebPreference.
2493
2494         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2495         (WKBundlePageAddUserScript):
2496         (WKBundlePageAddUserStyleSheet):
2497         (WKBundlePageRemoveAllUserContent):
2498         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2499         * WebProcess/WebPage/WebPage.cpp:
2500         (WebKit::WebPage::addUserScript):
2501         (WebKit::WebPage::addUserStyleSheet):
2502         (WebKit::WebPage::removeAllUserContent):
2503         * WebProcess/WebPage/WebPage.h:
2504         Add WKBundlePage functions for user script and style sheet manipulation.
2505         These use the WebPage's WebUserContentController instead of the WebPageGroupProxy's
2506         (used by the WKBundle functions), so they work correctly with the modern API.
2507
2508 2015-08-21  Alexey Proskuryakov  <ap@apple.com>
2509
2510         Improve how UI events are dispatched by WebKitTestRunner
2511         https://bugs.webkit.org/show_bug.cgi?id=148326
2512
2513         Reviewed by Anders Carlsson.
2514
2515         Added "fully synchronous mode for testing", in which all messages are dispatched
2516         synchronously.
2517
2518         When an async message is sent in this mode, it is wrapped into a sync one automatically.
2519
2520         A client must opt in, either by using WKBundlePagePostSynchronousMessageForTesting(),
2521         or by calling WKContextConfigurationAllowFullySynchronousModeForTesting().
2522         This makes sure that we don't increase potential for IPC misuse.
2523
2524         * WebProcess/WebPage/WebPage.messages.in: Yay, fewer messages!
2525
2526         * UIProcess/API/C/WKPage.cpp:
2527         (WKPageSetShouldSendEventsSynchronously): Deleted.
2528         * UIProcess/API/C/WKPagePrivate.h:
2529         We no longer need WKPageSetShouldSendEventsSynchronously and associated custom messages.
2530
2531         * WebProcess/WebPage/EventDispatcher.cpp:
2532         (WebKit::EventDispatcher::wheelEvent):
2533         (WebKit::updateWheelEventTestTriggersIfNeeded): Deleted.
2534         Removed code that was only needed to support pseudo-syncronous scrolling in tests.
2535
2536         * Platform/IPC/Connection.cpp:
2537         (IPC::Connection::sendMessage):
2538         (IPC::Connection::dispatchSyncMessage):
2539         (IPC::Connection::dispatchMessage):
2540         * Platform/IPC/Connection.h:
2541         (IPC::Connection::allowFullySynchronousModeForTesting):
2542         (IPC::Connection::sendSync):
2543         * Platform/IPC/MessageDecoder.cpp:
2544         (IPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply):
2545         (IPC::MessageDecoder::shouldUseFullySynchronousModeForTesting):
2546         (IPC::MessageDecoder::setImportanceAssertion):
2547         (IPC::MessageDecoder::unwrapForTesting):
2548         * Platform/IPC/MessageDecoder.h:
2549         (IPC::MessageDecoder::UUID):
2550         * Platform/IPC/MessageEncoder.cpp:
2551         (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply):
2552         (IPC::MessageEncoder::setFullySynchronousModeForTesting):
2553         (IPC::MessageEncoder::wrapForTesting):
2554         * Platform/IPC/MessageEncoder.h:
2555         (IPC::MessageEncoder::UUID):
2556         * Platform/IPC/MessageFlags.h:
2557         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2558         (API::ProcessPoolConfiguration::copy):
2559         * UIProcess/API/APIProcessPoolConfiguration.h:
2560         * UIProcess/API/C/WKContextConfigurationRef.cpp:
2561         (WKContextConfigurationSetMediaKeysStorageDirectory):
2562         (WKContextConfigurationAllowFullySynchronousModeForTesting):
2563         * UIProcess/API/C/WKContextConfigurationRef.h:
2564
2565         * UIProcess/WebPageProxy.cpp:
2566         (WebKit::WebPageProxy::WebPageProxy):
2567         (WebKit::WebPageProxy::handleMouseEvent):
2568         (WebKit::WebPageProxy::sendWheelEvent):
2569         (WebKit::WebPageProxy::handleKeyboardEvent):
2570         (WebKit::WebPageProxy::handleTouchEvent):
2571         * UIProcess/WebPageProxy.h:
2572         (WebKit::WebPageProxy::renderTreeSize):
2573         (WebKit::WebPageProxy::setShouldSendEventsSynchronously): Deleted.
2574         * UIProcess/WebProcessPool.cpp:
2575         (WebKit::WebProcessPool::processDidFinishLaunching):
2576         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2577         (WKBundlePagePostMessage):
2578         (WKBundlePagePostSynchronousMessageForTesting):
2579         (WKBundlePagePostSynchronousMessage): Deleted.
2580         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2581         * WebProcess/WebPage/WebPage.cpp:
2582         (WebKit::WebPage::mouseEvent):
2583         (WebKit::handleWheelEvent):
2584         (WebKit::WebPage::wheelEvent):
2585         (WebKit::handleKeyEvent):
2586         (WebKit::WebPage::keyEvent):
2587         (WebKit::WebPage::validateCommand):
2588         (WebKit::WebPage::touchEvent):
2589         (WebKit::WebPage::scroll):
2590         (WebKit::WebPage::postMessage):
2591         (WebKit::WebPage::postSynchronousMessageForTesting):
2592         (WebKit::WebPage::mouseEventSyncForTesting): Deleted.
2593         (WebKit::WebPage::wheelEventSyncForTesting): Deleted.
2594         (WebKit::WebPage::keyEventSyncForTesting): Deleted.
2595         (WebKit::WebPage::touchEventSyncForTesting): Deleted.
2596         (WebKit::WebPage::postSynchronousMessage): Deleted.
2597         * WebProcess/WebPage/WebPage.h:
2598
2599 2015-08-20  Matt Rajca  <mrajca@apple.com>
2600
2601         Media Session: let UI clients change the volume of the focused media element
2602         https://bugs.webkit.org/show_bug.cgi?id=148289
2603
2604         Reviewed by Tim Horton.
2605
2606         * UIProcess/API/C/WKMediaSessionFocusManager.cpp:
2607         (WKMediaSessionFocusManagerSetVolumeOfFocusedMediaElement):
2608         * UIProcess/API/C/WKMediaSessionFocusManager.h:
2609         * UIProcess/WebMediaSessionFocusManager.cpp:
2610         (WebKit::WebMediaSessionFocusManager::updatePlaybackAttribute):
2611         (WebKit::WebMediaSessionFocusManager::setVolumeOfFocusedMediaElement):
2612         * UIProcess/WebMediaSessionFocusManager.h:
2613         * UIProcess/WebPageProxy.cpp:
2614         (WebKit::WebPageProxy::setVolumeOfMediaElement):
2615         * UIProcess/WebPageProxy.h:
2616         * WebProcess/WebPage/WebPage.cpp:
2617         (WebKit::WebPage::setVolumeOfMediaElement):
2618         * WebProcess/WebPage/WebPage.h:
2619         * WebProcess/WebPage/WebPage.messages.in:
2620
2621 2015-08-21  Anders Carlsson  <andersca@apple.com>
2622
2623         Get rid of uses of the old callOnMainThread function that takes a function ptr + context
2624         https://bugs.webkit.org/show_bug.cgi?id=148324
2625
2626         Reviewed by Tim Horton.
2627
2628         * UIProcess/mac/WKPrintingView.mm:
2629         (prepareDataForPrintingOnSecondaryThread):
2630         (-[WKPrintingView knowsPageRange:]):
2631
2632 2015-08-21  Chris Dumez  <cdumez@apple.com>
2633
2634         Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
2635         https://bugs.webkit.org/show_bug.cgi?id=148205
2636
2637         Reviewed by Antti Koivisto.
2638
2639         After r188640, successful revalidation of resources in the memory cache
2640         would cause us to drop the corresponding resource in the disk cache.
2641         This patch addresses the issue by not removing the cache entry if the
2642         response is a successful revalidation (i.e. status code == 304).
2643
2644         Longer term, we should probably update the entry in the disk cache (if
2645         it exists) when it is revalidated by the memory cache. Currently,
2646         revalidation by the memory cache bypasses the disk cache and goes
2647         straight to the network. Then, when the response comes back as a 304,
2648         we try and store the response in the cache. However, a 304 status code
2649         is not cacheable so the cache rejects it.
2650
2651         * NetworkProcess/cache/NetworkCache.cpp:
2652         (WebKit::NetworkCache::Cache::store):
2653
2654 2015-08-20  Joonghun Park  <jh718.park@samsung.com>
2655
2656         [EFL] Revise PlatformWebView ctor according to r188718
2657         https://bugs.webkit.org/show_bug.cgi?id=148282
2658
2659         Reviewed by Gyuyoung Kim.
2660
2661         * PlatformEfl.cmake:
2662
2663 2015-08-20  Alex Christensen  <achristensen@webkit.org>
2664
2665         GTK build fix after r188693.
2666
2667         * UIProcess/API/gtk/PageClientImpl.h:
2668         Delete mediaDocumentNaturalSizeChanged which could be renamed to imageOrMediaDocumentSizeChanged, 
2669         but there's no reason to have an empty function overriding another virtual function that is also empty.
2670
2671 2015-08-20  Joonghun Park  <jh718.park@samsung.com>
2672
2673         [EFL] Fix build error since r188693
2674         https://bugs.webkit.org/show_bug.cgi?id=148279
2675
2676         Reviewed by Gyuyoung Kim.
2677
2678         * UIProcess/efl/WebViewEfl.h:
2679
2680 2015-08-20  Anders Carlsson  <andersca@apple.com>
2681
2682         Use WKPageConfigurationRef in WebKitTestRunner
2683         https://bugs.webkit.org/show_bug.cgi?id=147996
2684
2685         Reviewed by Tim Horton.
2686
2687         * UIProcess/API/ios/WKViewIOS.mm:
2688         (-[WKView _commonInitializationWithConfigurationRef:]):
2689         (-[WKView initWithFrame:configurationRef:]):
2690         * UIProcess/API/mac/WKView.mm:
2691         (-[WKView initWithFrame:configurationRef:]):
2692         Make sure to copy the configuration, matching what we do in the modern API.
2693         
2694 2015-08-20  Beth Dakin  <bdakin@apple.com>
2695
2696         Standalone image documents should send their size to the UIClient just like 
2697         standalone media documents
2698         https://bugs.webkit.org/show_bug.cgi?id=148195
2699         -and corresponding-
2700         rdar://problem/21951253
2701
2702         Reviewed by Tim Horton.
2703
2704         This patch re-names mediaDocumentNaturalSizeChanged() to 
2705         imageOrMediaDocumentSizeChanged(), and, as the new name implies, uses the 
2706         function for both media documents and images.
2707
2708         * UIProcess/API/APIUIClient.h:
2709         (API::UIClient::didClickAutoFillButton):
2710         (API::UIClient::imageOrMediaDocumentSizeChanged):
2711         (API::UIClient::mediaDocumentNaturalSizeChanged): Deleted.
2712         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2713
2714         The WKWebView and PageClient implementations of this function were actually 
2715         not being used, so this patch removes them and just keeps the UIClient stuff.
2716         * UIProcess/API/Cocoa/WKWebView.mm:
2717         (-[WKWebView performDragOperation:]):
2718         (-[WKWebView _mediaDocumentNaturalSizeChanged:]): Deleted.
2719         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2720
2721         More re-naming.
2722         * UIProcess/Cocoa/UIDelegate.h:
2723         * UIProcess/Cocoa/UIDelegate.mm:
2724         (WebKit::UIDelegate::setDelegate):
2725         (WebKit::UIDelegate::UIClient::UIClient):
2726         (WebKit::UIDelegate::UIClient::didNotHandleTapAsClick):
2727         (WebKit::UIDelegate::UIClient::imageOrMediaDocumentSizeChanged):
2728         (WebKit::UIDelegate::UIClient::mediaDocumentNaturalSizeChanged): Deleted.
2729         * UIProcess/PageClient.h:
2730         * UIProcess/WebPageProxy.cpp:
2731         (WebKit::WebPageProxy::installViewStateChangeCompletionHandler):
2732         (WebKit::WebPageProxy::imageOrMediaDocumentSizeChanged):
2733         (WebKit::WebPageProxy::setShouldDispatchFakeMouseMoveEvents):
2734         (WebKit::WebPageProxy::mediaDocumentNaturalSizeChanged): Deleted.
2735         * UIProcess/WebPageProxy.h:
2736         (WebKit::WebPageProxy::useFixedLayoutDidChange):
2737         (WebKit::WebPageProxy::fixedLayoutSizeDidChange):
2738         * UIProcess/WebPageProxy.messages.in:
2739
2740         The WKWebView and PageClient implementations of this function were actually 
2741         not being used, so this patch removes them and just keeps the UIClient stuff.
2742         * UIProcess/ios/PageClientImplIOS.h:
2743         * UIProcess/ios/PageClientImplIOS.mm:
2744         (WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged): Deleted.
2745         * UIProcess/mac/PageClientImpl.h:
2746         * UIProcess/mac/PageClientImpl.mm:
2747         (WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged): Deleted.
2748
2749         More re-naming.
2750         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2751         (WebKit::WebChromeClient::imageOrMediaDocumentSizeChanged):
2752         (WebKit::WebChromeClient::mediaDocumentNaturalSizeChanged): Deleted.
2753         * WebProcess/WebCoreSupport/WebChromeClient.h:
2754         * WebProcess/WebPage/WebPage.cpp:
2755         (WebKit::WebPage::imageOrMediaDocumentSizeChanged):
2756         (WebKit::WebPage::mediaDocumentNaturalSizeChanged): Deleted.
2757         * WebProcess/WebPage/WebPage.h:
2758
2759 2015-08-19  Eric Carlson  <eric.carlson@apple.com>
2760
2761         Remove ENABLE_WEBVTT_REGIONS
2762         https://bugs.webkit.org/show_bug.cgi?id=148184
2763
2764         Reviewed by Jer Noble.
2765
2766         * Configurations/FeatureDefines.xcconfig: Remove ENABLE_WEBVTT_REGIONS.
2767
2768 2015-08-18  Dean Jackson  <dino@apple.com>
2769
2770         Support CSS filters without webkit prefix
2771         https://bugs.webkit.org/show_bug.cgi?id=148138
2772         <rdar://problem/22331434>
2773
2774         Reviewed by Sam Weinig.
2775
2776         Rename WebkitFilter to Filter.
2777
2778         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2779         (IPC::ArgumentCoder<TextureMapperAnimation>::encode):
2780         (IPC::ArgumentCoder<TextureMapperAnimation>::decode):
2781
2782 2015-08-19  Alex Christensen  <achristensen@webkit.org>
2783
2784         Build TestWTF on Mac with CMake.
2785         https://bugs.webkit.org/show_bug.cgi?id=147972
2786
2787         Reviewed by Tim Horton.
2788
2789         * PlatformMac.cmake:
2790         Make more forwarding headers.
2791
2792 2015-08-18  Filip Pizlo  <fpizlo@apple.com>
2793
2794         Replace all uses of std::mutex/std::condition_variable with WTF::Lock/WTF::Condition
2795         https://bugs.webkit.org/show_bug.cgi?id=148140
2796
2797         Reviewed by Geoffrey Garen.
2798
2799         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2800         (WebKit::NetworkCache::Storage::traverse):
2801         * Platform/IPC/Connection.cpp:
2802         (IPC::Connection::SyncMessageState::processIncomingMessage):
2803         (IPC::Connection::SyncMessageState::dispatchMessages):
2804         (IPC::Connection::SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesForConnection):
2805         (IPC::Connection::sendMessage):
2806         (IPC::Connection::waitForMessage):
2807         (IPC::Connection::processIncomingMessage):
2808         (IPC::Connection::installIncomingSyncMessageCallback):
2809         (IPC::Connection::uninstallIncomingSyncMessageCallback):
2810         (IPC::Connection::hasIncomingSyncMessage):
2811         (IPC::Connection::connectionDidClose):
2812         (IPC::Connection::sendOutgoingMessages):
2813         (IPC::Connection::enqueueIncomingMessage):
2814         (IPC::Connection::dispatchOneMessage):
2815         * Platform/IPC/Connection.h:
2816         * Shared/BlockingResponseMap.h:
2817         (BlockingResponseMap::waitForResponse):
2818         (BlockingResponseMap::didReceiveResponse):
2819         (BlockingResponseMap::cancel):
2820         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
2821         (WebKit::PluginInfoCache::saveToFile):
2822         (WebKit::PluginInfoCache::updatePluginInfo):
2823         * UIProcess/Plugins/gtk/PluginInfoCache.h:
2824         * UIProcess/mac/WKPrintingView.h:
2825         * UIProcess/mac/WKPrintingView.mm:
2826         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
2827         (prepareDataForPrintingOnSecondaryThread):
2828         (-[WKPrintingView knowsPageRange:]):
2829
2830 2015-08-19  Chris Dumez  <cdumez@apple.com>
2831
2832         WebKit may keep outdated entry in the disk cache after a reload
2833         https://bugs.webkit.org/show_bug.cgi?id=148137
2834         <rdar://problem/22299547>
2835
2836         Reviewed by Antti Koivisto.
2837
2838         WebKit would keep outdated entry in the disk cache after a reload
2839         in the following scenario:
2840         1. We have an entry in the cache
2841         2. The user reloads
2842         3. We get a fresh resource from the network but this one is not cacheable
2843
2844         In this case, we now remove the stale entry from the cache to make sure
2845         it is not served to following requests (e.g. history navigations).
2846
2847         * NetworkProcess/NetworkResourceLoader.cpp:
2848         (WebKit::NetworkResourceLoader::didFinishLoading):
2849         Remove the entry from the cache if its redirection is no longer
2850         cacheable.
2851
2852         * NetworkProcess/cache/NetworkCache.cpp:
2853         (WebKit::NetworkCache::Cache::store):
2854         If we make the decision not to store the response, then remove the
2855         entry in the cache for this resource if it exists.
2856
2857         (WebKit::NetworkCache::Cache::remove):
2858         * NetworkProcess/cache/NetworkCache.h:
2859         Add new remove() overload taking a ResourceRequest argument so the
2860         call site does not have the compute the key.
2861
2862         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2863         (WebKit::NetworkCache::Storage::removeFromPendingWriteOperations):
2864         (WebKit::NetworkCache::Storage::remove):
2865         * NetworkProcess/cache/NetworkCacheStorage.h:
2866         When we're asked to remove an entry with a given key, also remove
2867         it from the pending write operations. This pre-existing bug would
2868         prevent the new layout test from passing.
2869
2870 2015-08-18  Zan Dobersek  <zdobersek@igalia.com>
2871
2872         [GLib] GMainLoopSource should receive the std::function<> objects through rvalue references
2873         https://bugs.webkit.org/show_bug.cgi?id=147981
2874
2875         Reviewed by Carlos Garcia Campos.
2876
2877         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
2878         (WebKit::NetworkCache::runTaskInQueue): Move the std::function<> into the scheduling call.
2879
2880 2015-08-18  Dan Bernstein  <mitz@apple.com>
2881
2882         [iOS] Safari’s Web Content process crashes when decoding an NSError containing an identity
2883         https://bugs.webkit.org/show_bug.cgi?id=148135
2884
2885         Reviewed by Sam Weinig.
2886
2887         * Configurations/WebContent-iOS.entitlements: Added the com.apple.identities keychain
2888           access group. The Networking process already has it since r169655.
2889
2890         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2891         (WebKit::WebProcessPool::platformInitialize): Always allow the UI process to decode keys.
2892
2893 2015-08-18  Jincheol Jo  <jincheol.jo@navercorp.com>
2894
2895         [EFL] Web Inspector: make to use StringBuilder in inspectorBaseURL
2896         https://bugs.webkit.org/show_bug.cgi?id=148126
2897
2898         Reviewed by Gyuyoung Kim.
2899
2900         * UIProcess/efl/WebInspectorProxyEfl.cpp:
2901         (WebKit::WebInspectorProxy::inspectorBaseURL):
2902         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
2903
2904 2015-08-18  Anders Carlsson  <andersca@apple.com>
2905
2906         Fix build, and fix the version check.
2907
2908         * UIProcess/API/C/WKPage.cpp:
2909         (WKPageSetPageUIClient):
2910
2911 2015-08-18  Anders Carlsson  <andersca@apple.com>
2912
2913         REGRESSION: Playing audio causes near-instant crash
2914         https://bugs.webkit.org/show_bug.cgi?id=148059
2915         rdar://problem/22282680
2916
2917         Reviewed by Sam Weinig.
2918
2919         The version of WebKit that Safari 6.2.8, 7.1.8 and 8.0.8 built against
2920         had an ABI incompatible WKPageUIClientV4 struct. Thankfully we're not going to ship any
2921         versions of Safari that use the "normal" WKPageUIClientV4 struct so just assume that it's always the
2922         broken one and fix it up by converting it to a WKPageUIClientV5 struct and setting that as the page UI client.
2923
2924         * UIProcess/API/C/WKPage.cpp:
2925         (fixUpBotchedPageUIClient):
2926         (WKPageSetPageUIClient):
2927
2928 2015-08-17  Filip Pizlo  <fpizlo@apple.com>
2929
2930         Replace all remaining uses of WTF::Mutex with WTF::Lock
2931         https://bugs.webkit.org/show_bug.cgi?id=148089
2932
2933         Reviewed by Geoffrey Garen.
2934
2935         * DatabaseProcess/DatabaseProcess.cpp:
2936         (WebKit::DatabaseProcess::postDatabaseTask):
2937         (WebKit::DatabaseProcess::performNextDatabaseTask):
2938         * DatabaseProcess/DatabaseProcess.h:
2939         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2940         (WebKit::UniqueIDBDatabase::shutdown):
2941         (WebKit::UniqueIDBDatabase::postMainThreadTask):
2942         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
2943         (WebKit::UniqueIDBDatabase::postDatabaseTask):
2944         (WebKit::UniqueIDBDatabase::performNextDatabaseTask):
2945         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2946         * Platform/IPC/Connection.cpp:
2947         (IPC::Connection::sendSyncMessage):
2948         (IPC::Connection::sendSyncMessageFromSecondaryThread):
2949         (IPC::Connection::waitForSyncReply):
2950         (IPC::Connection::processIncomingSyncReply):
2951         (IPC::Connection::connectionDidClose):
2952         * Platform/IPC/Connection.h:
2953         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2954         (WebKit::CoordinatedGraphicsScene::appendUpdate):
2955         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2956         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2957         (WebKit::ThreadedCompositor::createCompositingThread):
2958         (WebKit::ThreadedCompositor::runCompositingThread):
2959         (WebKit::ThreadedCompositor::terminateCompositingThread):
2960         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
2961         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
2962         (WebKit::CustomProtocolManager::addCustomProtocol):
2963         (WebKit::CustomProtocolManager::removeCustomProtocol):
2964         (WebKit::CustomProtocolManager::registerScheme):
2965         (WebKit::CustomProtocolManager::unregisterScheme):
2966         (WebKit::CustomProtocolManager::supportsScheme):
2967         (WebKit::CustomProtocolManager::protocolForID):
2968         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
2969         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
2970         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2971         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
2972         (WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
2973         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
2974         * WebProcess/Plugins/PluginProcessConnectionManager.h:
2975         * WebProcess/WebPage/EventDispatcher.cpp:
2976         (WebKit::EventDispatcher::addScrollingTreeForPage):
2977         (WebKit::EventDispatcher::removeScrollingTreeForPage):
2978         (WebKit::EventDispatcher::wheelEvent):
2979         * WebProcess/WebPage/EventDispatcher.h:
2980         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
2981         (webkitSoupRequestInputStreamReadAsync):
2982         (webkitSoupRequestInputStreamAddData):
2983
2984 2015-08-17  Alex Christensen  <achristensen@webkit.org>
2985
2986         Speculative GTK build fix after r188553
2987
2988         * CMakeLists.txt:
2989         Added new files.
2990
2991 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
2992
2993         Implement IntegerHasher
2994         https://bugs.webkit.org/show_bug.cgi?id=147866
2995
2996         Reviewed by Darin Adler and Anders Carlsson.
2997
2998         Use new #include.
2999
3000         * DatabaseProcess/IndexedDB/IDBIdentifier.h:
3001         * Platform/IPC/StringReference.cpp:
3002
3003 2015-08-13  Anders Carlsson  <andersca@apple.com>
3004
3005         Add WKWindowFeaturesRef and a new modern createNewPage UI client callback
3006         https://bugs.webkit.org/show_bug.cgi?id=147989
3007
3008         Reviewed by Tim Horton.
3009
3010         Re-land this and make sure we actually allocate a WKWindowFeatures object.
3011
3012         * Platform/IPC/mac/ConnectionMac.mm:
3013         * Shared/API/APIObject.h:
3014         * Shared/API/c/WKBase.h:
3015         * UIProcess/API/APIWindowFeatures.cpp: Added.
3016         * UIProcess/API/APIWindowFeatures.h: Added.
3017         * UIProcess/API/C/WKAPICast.h:
3018         * UIProcess/API/C/WKPage.cpp:
3019         (WKPageSetPageUIClient):
3020         * UIProcess/API/C/WKPageUIClient.h:
3021         * UIProcess/API/C/WKWindowFeaturesRef.cpp: Added.
3022         (WKWindowFeaturesGetTypeID):
3023         * UIProcess/API/C/WKWindowFeaturesRef.h: Added.
3024         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
3025         (-[WKWindowFeatures dealloc]):
3026         (-[WKWindowFeatures menuBarVisibility]):
3027         (-[WKWindowFeatures statusBarVisibility]):
3028         (-[WKWindowFeatures toolbarsVisibility]):
3029         (-[WKWindowFeatures allowsResizing]):
3030         (-[WKWindowFeatures x]):
3031         (-[WKWindowFeatures y]):
3032         (-[WKWindowFeatures width]):
3033         (-[WKWindowFeatures height]):
3034         (-[WKWindowFeatures _apiObject]):
3035         (-[WKWindowFeatures _initWithWindowFeatures:]): Deleted.
3036         * UIProcess/API/Cocoa/WKWindowFeaturesInternal.h:
3037         (WebKit::wrapper):
3038         * UIProcess/Cocoa/UIDelegate.mm:
3039         (WebKit::UIDelegate::UIClient::createNewPage):
3040         * WebKit2.xcodeproj/project.pbxproj:
3041
3042 2015-08-17  Sam Weinig  <sam@webkit.org>
3043
3044         API::PageConfiguration's sessionID needs to be set whenever the API::WebsiteDataStore is set
3045         https://bugs.webkit.org/show_bug.cgi?id=148097
3046
3047         Reviewed by Anders Carlsson.
3048
3049         We were getting an empty SessionID set on the WebPageProxy (and crashing asserting down the line)
3050         when using a WKPageConfiguration with a WKWebsiteDataStore set on it.
3051
3052         Tests:
3053             WebKit2.WKPageConfigurationBasicWithDataStore
3054             WebKit2.WKPageConfigurationBasicWithNonPersistentDataStore
3055
3056         * UIProcess/API/APIPageConfiguration.cpp:
3057         (API::PageConfiguration::setWebsiteDataStore):
3058         Set the sessionID member whenever changing the WebsiteDataStore.
3059
3060         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
3061         (WKWebsiteDataStoreGetDefaultDataStore):
3062         (WKWebsiteDataStoreCreateNonPersistentDataStore):
3063         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
3064         Expose functions for getting default and new non-persistent data stores via the C-SPI. Useful
3065         for testing and transitioning users of the C-SPI to the new model.
3066
3067         * UIProcess/API/Cocoa/WKWebView.mm:
3068         (-[WKWebView initWithFrame:configuration:]):
3069         Remove explicit setting of the sessionID. This is handled by the above call to setWebsiteDataStore().
3070
3071 2015-08-17  Wenson Hsieh  <wenson_hsieh@apple.com>
3072
3073         Cannot change WKWebView scrollView deceleration rate
3074         https://bugs.webkit.org/show_bug.cgi?id=148086
3075         <rdar://problem/21893685>
3076
3077         Reviewed by Simon Fraser.
3078
3079         Updates the preferred scroll deceleration factor when the scrollView's decelerationRate is explicitly set by the
3080         user, so when snap scrolling is inactive and [WKWebView scrollViewWillBeginDragging] sets its scrollView's
3081         decelerationRate to the preferred decelerationRate, it will be set to the updated value.
3082
3083         * UIProcess/ios/WKScrollView.mm:
3084         (-[WKScrollView setDecelerationRate:]): Overrides setDecelerationRate to update _preferredScrollDecelerationFactor.
3085
3086 2015-08-17  Timothy Horton  <timothy_horton@apple.com>
3087
3088         Adopt shrink-wrapping for TextIndicators on Mac
3089         https://bugs.webkit.org/show_bug.cgi?id=148064
3090
3091         Reviewed by Beth Dakin.
3092
3093         * Shared/WebCoreArgumentCoders.cpp:
3094         (IPC::ArgumentCoder<TextIndicatorData>::encode): Deleted.
3095         (IPC::ArgumentCoder<TextIndicatorData>::decode): Deleted.
3096         * WebProcess/WebPage/FindController.cpp:
3097         (WebKit::FindController::updateFindIndicator):
3098         * WebProcess/WebPage/ios/WebPageIOS.mm:
3099         (WebKit::WebPage::getPositionInformation):
3100         Use the new option, TextIndicatorOptionIncludeMarginIfRangeMatchesSelection,
3101         for iOS and FindController, because we can keep the margins in these cases
3102         because we don't have to animate to/from the blue highlight.
3103
3104 2015-08-16  Timothy Horton  <timothy_horton@apple.com>
3105
3106         Refactor ViewGestureController swipe snapshot removal to be more platform-independent
3107         https://bugs.webkit.org/show_bug.cgi?id=148062
3108
3109         Reviewed by Dan Bernstein.
3110
3111         * Platform/Logging.h:
3112         Add a ViewGestures logging channel.
3113
3114         * UIProcess/ViewGestureController.cpp: Added.
3115         (viewGestureControllersForAllPages):
3116         (WebKit::ViewGestureController::ViewGestureController):
3117         (WebKit::ViewGestureController::~ViewGestureController):
3118         (WebKit::ViewGestureController::gestureControllerForPage):
3119         (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
3120         (WebKit::ViewGestureController::didRepaintAfterNavigation):
3121         (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
3122         (WebKit::ViewGestureController::didRestoreScrollPosition):
3123         (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
3124         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
3125         (WebKit::ViewGestureController::checkForActiveLoads):
3126         (WebKit::ViewGestureController::SnapshotRemovalTracker::eventsDescription):
3127         (WebKit::ViewGestureController::SnapshotRemovalTracker::SnapshotRemovalTracker):
3128         (WebKit::ViewGestureController::SnapshotRemovalTracker::log):
3129         (WebKit::ViewGestureController::SnapshotRemovalTracker::start):
3130         (WebKit::ViewGestureController::SnapshotRemovalTracker::reset):
3131         (WebKit::ViewGestureController::SnapshotRemovalTracker::eventOccurred):
3132         (WebKit::ViewGestureController::SnapshotRemovalTracker::cancelOutstandingEvent):
3133         (WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackIfPossible):
3134         (WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackImmediately):
3135         (WebKit::ViewGestureController::SnapshotRemovalTracker::watchdogTimerFired):
3136         (WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
3137         Build a platform-independent SnapshotRemovalTracker, which keeps track of
3138         various events that we wait for before removing the snapshot. This
3139         is constructed from the union of ViewGestureController{IOS, Mac}'s snapshot
3140         removal code, and each platform ViewGestureController can specify which
3141         events to wait for (because this currently differs slightly).
3142
3143         Add logging to SnapshotRemovalTracker to make debugging snapshot removal
3144         issues much easier.
3145
3146         * UIProcess/mac/ViewGestureController.h:
3147         (WebKit::ViewGestureController::backgroundColorForCurrentSnapshot):
3148         (WebKit::ViewGestureController::didFinishLoadForMainFrame):
3149         (WebKit::ViewGestureController::didFailLoadForMainFrame):
3150
3151         * UIProcess/ios/ViewGestureControllerIOS.mm:
3152         (WebKit::ViewGestureController::platformTeardown):
3153         (WebKit::ViewGestureController::beginSwipeGesture):
3154         (WebKit::ViewGestureController::endSwipeGesture):
3155         (WebKit::ViewGestureController::setRenderTreeSize):
3156         (WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
3157         (WebKit::ViewGestureController::removeSwipeSnapshot):
3158         (viewGestureControllersForAllPages): Deleted.
3159         (WebKit::ViewGestureController::ViewGestureController): Deleted.
3160         (WebKit::ViewGestureController::~ViewGestureController): Deleted.
3161         (WebKit::ViewGestureController::didRestoreScrollPosition): Deleted.
3162         (WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState): Deleted.
3163         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame): Deleted.
3164         (WebKit::ViewGestureController::activeLoadMonitoringTimerFired): Deleted.
3165         (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired): Deleted.
3166         (WebKit::ViewGestureController::removeSwipeSnapshotIfReady): Deleted.
3167         * UIProcess/mac/ViewGestureControllerMac.mm:
3168         (WebKit::ViewGestureController::platformTeardown):
3169         (WebKit::ViewGestureController::endSwipeGesture):
3170         (WebKit::ViewGestureController::forceRepaintIfNeeded):
3171         (WebKit::ViewGestureController::removeSwipeSnapshot):
3172         (WebKit::ViewGestureController::ViewGestureController): Deleted.
3173         (WebKit::ViewGestureController::~ViewGestureController): Deleted.
3174         (WebKit::ViewGestureController::beginSwipeGesture): Deleted.
3175         (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold): Deleted.
3176         (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame): Deleted.
3177         (WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState): Deleted.
3178         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame): Deleted.
3179         (WebKit::ViewGestureController::activeLoadMonitoringTimerFired): Deleted.
3180         (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired): Deleted.
3181         (WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint): Deleted.
3182         Move shareable snapshot removal code to a new platform-independent ViewGestureController file.
3183         Move the ViewGestureController constructor/destructor to the platform-independent file.
3184
3185         * UIProcess/mac/ViewGestureController.messages.in:
3186         * WebKit2.xcodeproj/project.pbxproj:
3187
3188 2015-08-11  Andy Estes  <aestes@apple.com>
3189
3190         [Cocoa] Add redirect support to CustomProtocolManager
3191         https://bugs.webkit.org/show_bug.cgi?id=147871
3192
3193         Reviewed by Dan Bernstein.
3194         
3195         NSURLProtocols have the ability to generate redirect responses. This change teaches CustomProtocolManager how to handle them.
3196
3197         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
3198         (WebKit::CustomProtocolManager::wasRedirectedToRequest): Called -URLProtocol:wasRedirectedToRequest:redirectResponse: on the NSURLProtocolClient.
3199         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
3200         * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: Defined WasRedirectedToRequest.
3201         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
3202         (WebKit::CustomProtocolManager::wasRedirectedToRequest): Defined empty function.
3203         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
3204         (-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]): If a redirect response is received, send WasRedirectedToRequest and return nil to ignore the redirect.
3205
3206 2015-08-13  Andy Estes  <aestes@apple.com>
3207
3208         [Cocoa] Downloads do not start if policy decision is made asynchronously
3209         https://bugs.webkit.org/show_bug.cgi?id=147985
3210
3211         Reviewed by Brady Eidson.
3212
3213         * WebProcess/Network/WebResourceLoader.cpp: Updated to include SubresourceLoader.h.
3214         * WebProcess/WebPage/WebFrame.cpp:
3215         (WebKit::WebFrame::convertMainResourceLoadToDownload): Started a new download if the main resource loader is not calling didReceiveResponse.
3216
3217 2015-08-14  Simon Fraser  <simon.fraser@apple.com>
3218
3219         Speculative fix for iOS build failure.
3220
3221         * Shared/mac/RemoteLayerTreeTransaction.h:
3222
3223 2015-08-14  Philippe Normand  <pnormand@igalia.com>
3224
3225         Unreviewed, remove dead code after r188385.
3226
3227         * UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
3228         (webkitUserMediaPermissionRequestAllow): Deleted.
3229
3230 2015-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3231
3232         Unreviewed. Fix the build with !ENABLE(MEDIA_STREAM) after r188385.
3233
3234         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
3235         (WKUserMediaPermissionRequestDeviceNamesVideo):
3236         (WKUserMediaPermissionRequestDeviceNamesAudio):
3237
3238 2015-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3239
3240         Unreviewed. Fix GTK+ build after r188386.
3241
3242         * UIProcess/API/gtk/WebKitWindowProperties.cpp:
3243         (webkitWindowPropertiesUpdateFromWebWindowFeatures):
3244
3245 2015-08-13  Tim Horton  <timothy_horton@apple.com>
3246
3247         Performing a Lookup on wrapped text puts the popover arrow in the wrong place (off to the right)
3248         https://bugs.webkit.org/show_bug.cgi?id=148012
3249         <rdar://problem/19238094>
3250
3251         Reviewed by Simon Fraser.
3252
3253         * UIProcess/mac/PageClientImpl.mm:
3254         (WebKit::PageClientImpl::didPerformDictionaryLookup):
3255         * UIProcess/mac/WKImmediateActionController.mm:
3256         (-[WKImmediateActionController _animationControllerForText]):
3257         Adopt the new SPI, handing it the first text rect, instead of having it
3258         guess where to put the popover.
3259
3260 2015-08-13  Commit Queue  <commit-queue@webkit.org>
3261
3262         Unreviewed, rolling out r188418.
3263         https://bugs.webkit.org/show_bug.cgi?id=148017
3264
3265         Fix EFL after the rollout of r188404 (Requested by smfr on
3266         #webkit).
3267
3268         Reverted changeset:
3269
3270         "[CMake] Unreviewed build fix after r188404"
3271         http://trac.webkit.org/changeset/188418
3272
3273 2015-08-13  Commit Queue  <commit-queue@webkit.org>
3274
3275         Unreviewed, rolling out r188404.
3276         https://bugs.webkit.org/show_bug.cgi?id=148014
3277
3278         Broke 4 API tests (Requested by smfr on #webkit).
3279
3280         Reverted changeset:
3281
3282         "Add WKWindowFeaturesRef and a new modern createNewPage UI
3283         client callback"
3284         https://bugs.webkit.org/show_bug.cgi?id=147989
3285         http://trac.webkit.org/changeset/188404
3286
3287 2015-08-13  Tim Horton  <timothy_horton@apple.com>
3288
3289         Try to fix the Gtk/EFL build.
3290
3291         * WebProcess/WebPage/FindController.cpp:
3292         (WebKit::FindController::updateFindIndicator):
3293
3294 2015-08-13  Tim Horton  <timothy_horton@apple.com>
3295
3296         Refactor and improve TextIndicator to prepare for tests
3297         https://bugs.webkit.org/show_bug.cgi?id=147622
3298
3299         Reviewed by Simon Fraser.
3300
3301         * Shared/WebCoreArgumentCoders.cpp:
3302         (IPC::encodeOptionalImage):
3303         (IPC::decodeOptionalImage):
3304         (IPC::ArgumentCoder<TextIndicatorData>::encode):
3305         (IPC::ArgumentCoder<TextIndicatorData>::decode):
3306         Move encode/decodeOptionalImage to their own functions to avoid duplication.
3307
3308         * UIProcess/API/mac/WKView.mm:
3309         (-[WKView _dictionaryLookupPopoverWillClose:]):
3310         (-[WKView _setTextIndicator:]):
3311         (-[WKView _setTextIndicator:withLifetime:]):
3312         (-[WKView _clearTextIndicatorWithAnimation:]):
3313         (-[WKView _dismissContentRelativeChildWindows]):
3314         (-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
3315         * UIProcess/API/mac/WKViewInternal.h:
3316         * UIProcess/PageClient.h:
3317         * UIProcess/WebPageProxy.cpp:
3318         (WebKit::WebPageProxy::setTextIndicator):
3319         * UIProcess/WebPageProxy.h:
3320         * UIProcess/ios/PageClientImplIOS.h:
3321         * UIProcess/ios/PageClientImplIOS.mm:
3322         (WebKit::PageClientImpl::setTextIndicator):
3323         (WebKit::PageClientImpl::clearTextIndicator):
3324         * UIProcess/mac/PageClientImpl.h:
3325         * UIProcess/mac/PageClientImpl.mm:
3326         (WebKit::PageClientImpl::setTextIndicator):
3327         (WebKit::PageClientImpl::clearTextIndicator):
3328         (WebKit::PageClientImpl::didPerformDictionaryLookup):
3329         * UIProcess/mac/WKImmediateActionController.mm:
3330         (-[WKImmediateActionController _animationControllerForText]):
3331         * WebProcess/WebPage/FindController.cpp:
3332         (WebKit::FindController::updateFindIndicator):
3333         * WebProcess/WebPage/ios/WebPageIOS.mm:
3334         (WebKit::WebPage::getPositionInformation):
3335         (WebKit::shouldUseTextIndicatorForLink): Deleted.
3336         * WebProcess/WebPage/mac/WebPageMac.mm:
3337         (WebKit::WebPage::dictionaryPopupInfoForRange):
3338         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
3339         Adopt TextIndicatorOptions.
3340         Adjust to Range method renames.
3341
3342 2015-08-13  Jaehun Lim  <ljaehun.lim@samsung.com>
3343
3344         [CMake] Unreviewed build fix after r188404
3345
3346         * CMakeLists.txt: Add UIProcess/API/APIWindowFeatures.cpp, UIProcess/API/C/WKWindowFeaturesRef.cpp
3347
3348 2015-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
3349
3350         A focused node should not be assisted when handling touch events synchronously
3351         https://bugs.webkit.org/show_bug.cgi?id=147836
3352         <rdar://problem/22204108>
3353
3354         Reviewed by Enrica Casucci.
3355
3356         Makes interaction with touch handlers no longer assist the currently focused element in the
3357         general case. Added plumbing to reassist a currently focused node when dispatching touch events,
3358         so that an input that programmatically focuses itself and prevents default on a touch event will
3359         be properly assisted when it has been programmatically focused (either through Javascript or the
3360         autofocus attribute) prior to receiving the touch event. This patch also removes the now
3361         unnecessary special-casing of the Gmail settings app that currently makes the keyboard deploy
3362         upon autofocus.
3363
3364         * UIProcess/ios/WKContentViewInteraction.mm:
3365         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Removed
3366             special case to avoid the early return for Gmail Add Account.
3367         * WebProcess/WebCoreSupport/WebChromeClient.h: Added a handler for refocusing an element.
3368         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
3369         (WebKit::WebChromeClient::elementDidRefocus): Makes refocusing an element trigger input
3370             assistance on iOS.
3371         * WebProcess/WebPage/WebPage.cpp:
3372         (WebKit::WebPage::dispatchTouchEvent): Removes logic to focus the currently focused element upon
3373             receiving a touch event.
3374
3375 2015-08-13  Anders Carlsson  <andersca@apple.com>
3376
3377         Add WKWindowFeaturesRef and a new modern createNewPage UI client callback
3378         https://bugs.webkit.org/show_bug.cgi?id=147989
3379
3380         Reviewed by Tim Horton.
3381
3382         * Platform/IPC/mac/ConnectionMac.mm:
3383         * Shared/API/APIObject.h:
3384         * Shared/API/c/WKBase.h:
3385         * UIProcess/API/APIWindowFeatures.cpp: Added.
3386         * UIProcess/API/APIWindowFeatures.h: Added.
3387         * UIProcess/API/C/WKAPICast.h:
3388         * UIProcess/API/C/WKPage.cpp:
3389         (WKPageSetPageUIClient):
3390         * UIProcess/API/C/WKPageUIClient.h:
3391         * UIProcess/API/C/WKWindowFeaturesRef.cpp: Added.
3392         (WKWindowFeaturesGetTypeID):
3393         * UIProcess/API/C/WKWindowFeaturesRef.h: Added.
3394         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
3395         (-[WKWindowFeatures dealloc]):
3396         (-[WKWindowFeatures menuBarVisibility]):
3397         (-[WKWindowFeatures statusBarVisibility]):
3398         (-[WKWindowFeatures toolbarsVisibility]):
3399         (-[WKWindowFeatures allowsResizing]):
3400         (-[WKWindowFeatures x]):
3401         (-[WKWindowFeatures y]):
3402         (-[WKWindowFeatures width]):
3403         (-[WKWindowFeatures height]):
3404         (-[WKWindowFeatures _apiObject]):
3405         (-[WKWindowFeatures _initWithWindowFeatures:]): Deleted.
3406         * UIProcess/API/Cocoa/WKWindowFeaturesInternal.h:
3407         (WebKit::wrapper):
3408         * UIProcess/Cocoa/UIDelegate.mm:
3409         (WebKit::UIDelegate::UIClient::createNewPage):
3410         * WebKit2.xcodeproj/project.pbxproj:
3411
3412 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
3413
3414         FilterOperation.h should not include FilterEffect.h
3415         https://bugs.webkit.org/show_bug.cgi?id=147970
3416
3417         Reviewed by Daniel Bates.
3418
3419         FilterEffect.h pulls in lots of JSC goop via runtime/Uint8ClampedArray.h,
3420         so move its include to FilterOperation.cpp.
3421         
3422         Causes include bloat because FilterOperation.h is pulled in via RenderStyle.h.
3423
3424         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3425
3426 2015-08-12  Anders Carlsson  <andersca@apple.com>
3427
3428         Use WTF::Optional in WindowFeatures
3429         https://bugs.webkit.org/show_bug.cgi?id=147956
3430
3431         Reviewed by Sam Weinig.
3432
3433         * Shared/WebCoreArgumentCoders.cpp:
3434         (IPC::ArgumentCoder<WindowFeatures>::encode): Deleted.
3435         (IPC::ArgumentCoder<WindowFeatures>::decode): Deleted.
3436         * UIProcess/API/C/WKPage.cpp:
3437         (WKPageSetPageUIClient):
3438         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
3439         (-[WKWindowFeatures _initWithWindowFeatures:]):
3440
3441 2015-08-13  Matthew Daiter  <mdaiter@apple.com>
3442
3443         Linking device query ability from WebKit2 to clients
3444         https://bugs.webkit.org/show_bug.cgi?id=147263
3445         <rdar://problem/21983345>
3446
3447         Reviewed by Jer Noble.
3448
3449         * Platform/mac/LayerHostingContext.mm:
3450         (WebKit::LayerHostingContext::setColorMatchUntaggedContent):
3451         (WebKit::LayerHostingContext::colorMatchUntaggedContent):
3452         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
3453         (WKUserMediaPermissionRequestAllow):
3454         (WKUserMediaPermissionRequestDeviceNamesVideo):
3455         (WKUserMediaPermissionRequestDeviceNamesAudio):
3456         * UIProcess/API/C/WKUserMediaPermissionRequest.h:
3457         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3458         (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Deleted.
3459         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
3460         * UIProcess/UserMediaPermissionRequestProxy.cpp:
3461         (WebKit::UserMediaPermissionRequestProxy::allow):
3462         (WebKit::UserMediaPermissionRequestProxy::deny):
3463         * UIProcess/UserMediaPermissionRequestProxy.h:
3464         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
3465         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision):
3466
3467
3468 2015-08-12  Alexey Proskuryakov  <ap@apple.com>
3469
3470         [Mac] WebKit processes should have access to com.apple.nesessionmanager.flow-divert-token
3471         https://bugs.webkit.org/show_bug.cgi?id=147949
3472         rdar://problem/22254920
3473
3474         Reviewed by Anders Carlsson.
3475
3476         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
3477         * WebProcess/com.apple.WebProcess.sb.in:
3478
3479 2015-08-12  Brian Burg  <bburg@apple.com>
3480
3481         Web Inspector: CRASH under WebInspector::closeFrontend for some protocol tests
3482         https://bugs.webkit.org/show_bug.cgi?id=147948
3483
3484         Reviewed by Joseph Pecoraro.
3485
3486         * WebProcess/WebPage/WebInspector.cpp:
3487         (WebKit::WebInspector::closeFrontend): Don't invalidate the channel if it's null.
3488         * WebProcess/WebPage/WebInspector.h: Add default member variable values.
3489
3490 2015-08-12  Joseph Pecoraro  <pecoraro@apple.com>
3491
3492         Web Inspector: Not receiving responses for async request IndexedDB.requestDatabaseNames
3493         https://bugs.webkit.org/show_bug.cgi?id=147844
3494
3495         Reviewed by Brian Burg.
3496
3497         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
3498         (WebKit::WebIDBFactoryBackend::getDatabaseNames):
3499         This method should not return without calling either the success
3500         or error callbacks. In this case, it can succeed with an empty list.
3501
3502 2015-08-12  Enrica Casucci  <enrica@apple.com>
3503
3504         Element interaction should not be canceled when the menu is already being shown.
3505         https://bugs.webkit.org/show_bug.cgi?id=147945
3506         rdar://problem/22206433
3507
3508         Reviewed by Beth Dakin.
3509
3510         When preview is canceled by the action menu gesture, we should not stop interacting
3511         with the element, since the information about the element is used for the menu actions.
3512         We now expose a new method in the action sheet assistant to know if the action sheed is
3513         being shown and we use this as an indication that we should not stop the interaction
3514         with the element.
3515
3516         * UIProcess/ios/WKActionSheetAssistant.h:
3517         * UIProcess/ios/WKActionSheetAssistant.mm:
3518         (-[WKActionSheetAssistant isShowingSheet]): Added.
3519         * UIProcess/ios/WKContentViewInteraction.mm:
3520         (-[WKContentView _interactionStoppedFromPreviewItemController:]): Do not stop
3521         the interaction if the sheet is being shown.
3522
3523 2015-08-12  Matt Rajca  <mrajca@apple.com>
3524
3525         Fixed the Release build when MEDIA_SESSION is enabled.
3526
3527         * UIProcess/API/C/WKPage.cpp:
3528         (WKPageHandleMediaEvent):
3529
3530 2015-08-07  Matt Rajca  <mrajca@apple.com>
3531
3532         Media Session: notify the UI process when media controls are enabled/disabled
3533         https://bugs.webkit.org/show_bug.cgi?id=147802
3534
3535         Reviewed by Eric Carlson.
3536
3537         * UIProcess/WebMediaSessionFocusManager.cpp:
3538         (WebKit::WebMediaSessionFocusManager::playbackAttributeDidChange): Generalized to take different attributes.
3539         (WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange): Deleted.
3540         * UIProcess/WebMediaSessionFocusManager.h:
3541         * UIProcess/WebPageProxy.cpp:
3542         (WebKit::WebPageProxy::isPlayingMediaDidChange): Process new attributes for enabling/disabling media controls.
3543
3544 2015-08-12  Devin Rousso  <drousso@apple.com>
3545
3546         Web Inspector: Implement selector highlighting for iOS
3547         https://bugs.webkit.org/show_bug.cgi?id=147919
3548
3549         Reviewed by Timothy Hatcher.
3550
3551         * UIProcess/WKInspectorHighlightView.mm:
3552         (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]):
3553         Added offset parameter to start drawing the highlight at that index of the highlight quad list.
3554
3555         (-[WKInspectorHighlightView _layoutForNodeListHighlight:]):
3556         Loops through the highlight quads and draws a new highlight for every 4 highlight quad objects.
3557
3558         (-[WKInspectorHighlightView update:]):
3559         Now uses the light highlighting for both nodes and lists of nodes.
3560
3561 2015-08-11  Carlos Garcia Campos  <cgarcia@igalia.com>
3562
3563         NetworkProcess: DNS prefetch happens in the Web Process
3564         https://bugs.webkit.org/show_bug.cgi?id=147824
3565
3566         Reviewed by Alexey Proskuryakov.
3567
3568         DNS prefetch requests started in the WebProcess should be sent to
3569         the network process when it's enabled.
3570
3571         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3572         (WebKit::NetworkConnectionToWebProcess::prefetchDNS): Do the
3573         actual DNS prefetch.
3574         * NetworkProcess/NetworkConnectionToWebProcess.h:
3575         * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Add
3576         PrefetchDNS message.
3577         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
3578         (webkitWebExtensionDidReceiveMessage): Use WebProcess::prefetchDNS().
3579         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3580         (WebKit::WebFrameLoaderClient::prefetchDNS): Ditto.
3581         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3582         * WebProcess/WebPage/ios/WebPageIOS.mm:
3583         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Use
3584         FrameLoaderClient to do the DNS prefetch.
3585         * WebProcess/WebProcess.cpp:
3586         (WebKit::WebProcess::prefetchDNS): Send the request to the network
3587         process if it's enabled, otherwise do the actual DNS prefetch.
3588         * WebProcess/WebProcess.h:
3589
3590 2015-08-11  Hunseop Jeong  <hs85.jeong@samsung.com>
3591
3592         Try to fix the EFL build after r188279
3593         https://bugs.webkit.org/show_bug.cgi?id=147917
3594
3595         Reviewed by Gyuyoung Kim.
3596
3597         Replaced the WKPageLoaderClient with variable name because it is removed in r188279.
3598
3599         * UIProcess/efl/PageLoadClientEfl.cpp:
3600         (WebKit::PageLoadClientEfl::PageLoadClientEfl):
3601         * UIProcess/efl/PagePolicyClientEfl.cpp:
3602         (WebKit::PagePolicyClientEfl::PagePolicyClientEfl):
3603
3604 2015-08-11  Andy Estes  <aestes@apple.com>
3605
3606         Tried again to fix the iOS build.
3607
3608         * UIProcess/ios/WKGeolocationProviderIOS.mm:
3609         (-[WKGeolocationProviderIOS initWithProcessPool:]):
3610
3611 2015-08-11  Dan Bernstein  <mitz@apple.com>
3612
3613         Tried to fix the iOS build.
3614
3615         * UIProcess/ios/WKGeolocationProviderIOS.mm:
3616         (-[WKGeolocationProviderIOS initWithProcessPool:]):
3617
3618 2015-08-11  Andy Estes  <aestes@apple.com>
3619
3620         WebFrameLoaderClient::dispatchDecidePolicyForResponse() calls an std::function after it's been moved from
3621         https://bugs.webkit.org/show_bug.cgi?id=147873
3622
3623         Reviewed by Alexey Proskuryakov.
3624         
3625         I noticed during code inspection that we were calling an std::function after WTF::move() has been called on it.
3626         Calling an empty std::function results in a C++ exception being thrown. I don't know how to make a sync IPC
3627         message fail, so I'm not sure how to test this.
3628
3629         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3630         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): Called didReceivePolicyDecision instead.
3631
3632 2015-08-11  Beth Dakin  <bdakin@apple.com>
3633
3634         REGRESSION (r188053): Sometimes unable to save an image from Google Search/
3635         imgur via long press
3636         https://bugs.webkit.org/show_bug.cgi?id=147896
3637
3638         Reviewed by Enrica Casucci.
3639
3640         http://trac.webkit.org/changeset/188053 added code to call cleanupSheet when 
3641         the long press gesture is cancelled. However, the gesture will be called with 
3642         the cancelled state when then user taps an item in the action sheet (such as 
3643         “save image”), and sometimes the “cancel” comes in before the image has been 
3644         saved. That is a problem because we need to avoid cleaning up the sheet until 
3645         after the image is saved. Before that patch, we never cleaned up the sheet on 
3646         cancel, so this patch goes back to that behavior. We also have to remove some 
3647         assertions that assume that everything will be totally cleaned up when a new 
3648         sheet is created, but that is not necessarily true due to interactions 
3649         between the preview gesture and the long press gesture. 
3650
3651         Remove assertions.
3652         * UIProcess/ios/WKActionSheetAssistant.mm:
3653         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
3654         (-[WKActionSheetAssistant showImageSheet]):
3655         (-[WKActionSheetAssistant showLinkSheet]):
3656         (-[WKActionSheetAssistant showDataDetectorsSheet]):
3657
3658         Revert the part of Enrica’s patch that called cleanupSheet when the gesture 
3659         is cancelled.
3660         * UIProcess/ios/WKContentViewInteraction.mm:
3661         (-[WKContentView _longPressRecognized:]):
3662
3663 2015-08-11  Anders Carlsson  <andersca@apple.com>
3664
3665         Remove unversioned client structs from the C SPI
3666         https://bugs.webkit.org/show_bug.cgi?id=147894
3667
3668         Reviewed by Dan Bernstein.
3669
3670         * Shared/API/c/WKConnectionRef.h:
3671         * UIProcess/API/C/WKContext.h:
3672         * UIProcess/API/C/WKContextConnectionClient.h:
3673         * UIProcess/API/C/WKContextDownloadClient.h:
3674         * UIProcess/API/C/WKContextHistoryClient.h:
3675         * UIProcess/API/C/WKContextInjectedBundleClient.h:
3676         * UIProcess/API/C/WKCookieManager.h:
3677         * UIProcess/API/C/WKDatabaseManager.h:
3678         * UIProcess/API/C/WKGeolocationManager.h:
3679         * UIProcess/API/C/WKIconDatabase.h:
3680         * UIProcess/API/C/WKNotificationProvider.h:
3681         * UIProcess/API/C/WKPageContextMenuClient.h:
3682         * UIProcess/API/C/WKPageDiagnosticLoggingClient.h:
3683         * UIProcess/API/C/WKPageFindClient.h:
3684         * UIProcess/API/C/WKPageFindMatchesClient.h:
3685         * UIProcess/API/C/WKPageFormClient.h:
3686         * UIProcess/API/C/WKPageLoaderClient.h:
3687         * UIProcess/API/C/WKPagePolicyClient.h:
3688         * UIProcess/API/C/WKPageUIClient.h:
3689         * WebProcess/InjectedBundle/API/c/WKBundle.h:
3690         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h:
3691         * WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
3692         * WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
3693         * WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
3694         * WebProcess/InjectedBundle/API/c/WKBundlePageFormClient.h:
3695         * WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h:
3696         * WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
3697         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
3698         * WebProcess/InjectedBundle/API/c/WKBundlePagePolicyClient.h:
3699         * WebProcess/InjectedBundle/API/c/WKBundlePageResourceLoadClient.h:
3700         * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
3701
3702 2015-08-11  Dan Bernstein  <mitz@apple.com>
3703
3704         Reverted r188255, because it turned out that delegates do nonot need this information.
3705
3706         * UIProcess/API/APIUIClient.h:
3707         (API::UIClient::footerHeight):
3708         (API::UIClient::drawHeader):
3709         (API::UIClient::drawFooter):
3710         (API::UIClient::printFrame):
3711         (API::UIClient::canRunModal):
3712         (API::UIClient::runModal):
3713         * UIProcess/API/C/WKPage.cpp:
3714         (WKPageSetPageUIClient):
3715         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3716         * UIProcess/Cocoa/UIDelegate.h:
3717         * UIProcess/Cocoa/UIDelegate.mm:
3718         (WebKit::UIDelegate::UIDelegate):
3719         (WebKit::UIDelegate::setDelegate):
3720         (WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):
3721         (WebKit::UIDelegate::UIClient::printFrame):
3722         (WebKit::UIDelegate::UIClient::close):
3723         * UIProcess/WebPageProxy.cpp:
3724         (WebKit::WebPageProxy::runOpenPanel):
3725         (WebKit::WebPageProxy::printFrame):
3726         (WebKit::WebPageProxy::printMainFrame):
3727         (WebKit::WebPageProxy::setMediaVolume):
3728         * UIProcess/WebPageProxy.h:
3729         (WebKit::WebPageProxy::setShouldSendEventsSynchronously):
3730         * UIProcess/WebPageProxy.messages.in:
3731         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3732         (WebKit::WebChromeClient::print):
3733         (WebKit::WebChromeClient::exceededDatabaseQuota):
3734
3735 2015-08-11  Dan Bernstein  <mitz@apple.com>
3736
3737         [Cocoa] The UI delegate can't tell if printing was user-initiated
3738         https://bugs.webkit.org/show_bug.cgi?id=147869
3739
3740         Reviewed by Sam Weinig.
3741
3742         * UIProcess/API/APIUIClient.h:
3743         (API::UIClient::printFrame): Added processingUserGesture argument.
3744
3745         * UIProcess/API/C/WKPage.cpp:
3746         (WKPageSetPageUIClient): Updated for new client function signature.
3747
3748         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added userInitiated boolean argument to
3749           -_webView:printFrame:.
3750
3751         * UIProcess/Cocoa/UIDelegate.h: Added bool to m_delegateMethods for the new method.
3752         * UIProcess/Cocoa/UIDelegate.mm:
3753         (WebKit::UIDelegate::UIDelegate):
3754         (WebKit::UIDelegate::setDelegate): Initialized new bool.
3755         (WebKit::UIDelegate::UIClient::printFrame): Pass processingUserGesture as the delegate’s
3756           userInitiated argument.
3757
3758         * UIProcess/WebPageProxy.cpp:
3759         (WebKit::WebPageProxy::printFrame): Added processingUserGesture argument, passing it along
3760           to the client.
3761         * UIProcess/WebPageProxy.h:
3762
3763         * UIProcess/WebPageProxy.messages.in: Added processingUserGesture argument to printFrame.
3764
3765         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3766         (WebKit::WebChromeClient::print): Pass new argument.
3767
3768 2015-08-10  Matthew Daiter  <mdaiter@apple.com>
3769
3770         Add MediaDeviceIdentifier to WebsiteDataTypes
3771         https://bugs.webkit.org/show_bug.cgi?id=147853
3772
3773         Reviewed by Jer Noble.
3774
3775         * Shared/WebsiteData/WebsiteDataTypes.h:
3776
3777 2015-08-10  Sam Weinig  <sam@webkit.org>
3778
3779         Try to fix the 32-bit build.
3780
3781         * UIProcess/API/mac/WKViewInternal.h:
3782
3783 2015-08-08  Sam Weinig  <sam@webkit.org>
3784
3785         Replace WebPageConfiguration with API::PageConfiguration and expose a C-SPI accessor for it
3786         https://bugs.webkit.org/show_bug.cgi?id=147811
3787
3788         Reviewed by Darin Adler.
3789
3790         - Adds the missing pieces from WebPageConfiguration into API::PageConfiguration.
3791         - Adds C-SPI to set and get the WebsiteDataStore on the WKPageConfigurationRef.
3792         - Uses API::PageConfiguration to pass configuration information from WKWebView/WKView 
3793           to WebPageProxy.
3794         - Stores the API::PageConfiguration on the WebPageProxy and exposes a new C-SPI function,
3795           WKPageCopyPageConfiguration, to get a copy of it.
3796
3797         * UIProcess/API/APIPageConfiguration.cpp:
3798         (API::PageConfiguration::create):
3799         (API::PageConfiguration::PageConfiguration):
3800         (API::PageConfiguration::~PageConfiguration):
3801         (API::PageConfiguration::copy):
3802         (API::PageConfiguration::processPool):
3803         (API::PageConfiguration::setRelatedPage):
3804         (API::PageConfiguration::visitedLinkProvider):
3805         (API::PageConfiguration::setVisitedLinkProvider):
3806         (API::PageConfiguration::websiteDataStore):
3807         (API::PageConfiguration::setWebsiteDataStore):
3808         (API::PageConfiguration::sessionID):
3809         (API::PageConfiguration::setSessionID):
3810         (API::PageConfiguration::webPageConfiguration): Deleted.
3811         * UIProcess/API/APIPageConfiguration.h:
3812         (API::PageConfiguration::preferenceValues):
3813         (API::PageConfiguration::treatsSHA1SignedCertificatesAsInsecure):
3814         (API::PageConfiguration::setTreatsSHA1SignedCertificatesAsInsecure):
3815         (API::PageConfiguration::alwaysRunsAtForegroundPriority):
3816         (API::PageConfiguration::setAlwaysRunsAtForegroundPriority):
3817         (API::PageConfiguration::create): Deleted.
3818         * UIProcess/API/C/WKPage.cpp:
3819         (WKPageGetPageGroup):
3820         (WKPageCopyPageConfiguration):
3821         (WKPageLoadURL):
3822         * UIProcess/API/C/WKPage.h:
3823         * UIProcess/API/C/WKPageConfigurationRef.cpp:
3824         (WKPageConfigurationSetRelatedPage):
3825         (WKPageConfigurationGetWebsiteDataStore):
3826         (WKPageConfigurationSetWebsiteDataStore):
3827         * UIProcess/API/C/WKPageConfigurationRef.h:
3828         * UIProcess/API/Cocoa/WKWebView.mm:
3829         (-[WKWebView initWithFrame:configuration:]):
3830         * UIProcess/API/ios/WKViewIOS.mm:
3831         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
3832         * UIProcess/API/mac/WKView.mm:
3833         (-[WKView _setPrimaryTrackingArea:]):
3834         (-[WKView initWithFrame:processPool:configuration:webView:]):
3835         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
3836         (-[WKView initWithFrame:configurationRef:]):
3837         (-[WKView wantsUpdateLayer]):
3838         * UIProcess/API/mac/WKViewInternal.h:
3839         * UIProcess/WebPageProxy.cpp:
3840         (WebKit::WebPageProxy::create):
3841         (WebKit::WebPageProxy::WebPageProxy):
3842         (WebKit::WebPageProxy::~WebPageProxy):
3843         (WebKit::WebPageProxy::configuration):
3844         (WebKit::WebPageProxy::processIdentifier):
3845         * UIProcess/WebPageProxy.h:
3846         (WebKit::WebPageProxy::pageID):
3847         (WebKit::WebPageProxy::sessionID):
3848         * UIProcess/WebProcessPool.cpp:
3849         (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
3850         (WebKit::WebProcessPool::createWebPage):
3851         (WebKit::WebProcessPool::download):
3852         * UIProcess/WebProcessPool.h:
3853         * UIProcess/WebProcessProxy.cpp:
3854         (WebKit::WebProcessProxy::webPage):
3855         (WebKit::WebProcessProxy::createWebPage):
3856         * UIProcess/WebProcessProxy.h:
3857         (WebKit::WebProcessProxy::processPool):
3858         * UIProcess/ios/WKContentView.h:
3859         * UIProcess/ios/WKContentView.mm:
3860         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
3861         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
3862         (-[WKContentView initWithFrame:processPool:configuration:wkView:]):
3863         (-[WKContentView dealloc]):
3864
3865 2015-08-10  Commit Queue  <commit-queue@webkit.org>
3866
3867         Unreviewed, rolling out r187131 and r187286.
3868         https://bugs.webkit.org/show_bug.cgi?id=147839
3869
3870          Causing mroe frequent crashes with invalid layer bounds
3871         (rdar://problem/21465328) (Requested by smfr on #webkit).
3872
3873         Reverted changesets:
3874
3875         "[iOS] Menu drop down such as on nike.com does not stay"
3876         https://bugs.webkit.org/show_bug.cgi?id=147047
3877         http://trac.webkit.org/changeset/187131
3878
3879         "[iOS] REGRESSION (187131): Loading CuteOverload zooms in to
3880         the top left corner."
3881         https://bugs.webkit.org/show_bug.cgi?id=147251
3882         http://trac.webkit.org/changeset/187286
3883
3884 2015-08-07  Matt Rajca  <mrajca@apple.com>
3885
3886         Media Session: generalize isFocusedContentMediaElementPlaying so it works with other playback attributes
3887         https://bugs.webkit.org/show_bug.cgi?id=147797
3888
3889         Reviewed by Simon Fraser.
3890
3891         * UIProcess/API/C/WKMediaSessionFocusManager.cpp:
3892         (WKMediaSessionFocusManagerValueForPlaybackAttribute):
3893         (WKMediaSessionFocusManagerIsFocusedContentMediaElementPlaying): Deleted.
3894         * UIProcess/API/C/WKMediaSessionFocusManager.h:
3895         * UIProcess/WebMediaSessionFocusManager.cpp:
3896         (WebKit::WebMediaSessionFocusManager::valueForPlaybackAttribute):
3897         (WebKit::WebMediaSessionFocusManager::mediaControlIsEnabledDidChange):
3898         (WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPlaying): Deleted.
3899         (WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange): Deleted.
3900         * UIProcess/WebMediaSessionFocusManager.h:
3901
3902 2015-08-10  Zan Dobersek  <zdobersek@igalia.com>
3903
3904         [CoordinatedGraphics] Fix forward declarations of CoordinatedGraphicsLayerState, ViewportAttributes
3905         https://bugs.webkit.org/show_bug.cgi?id=147823
3906
3907         Reviewed by Carlos Garcia Campos.
3908
3909         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
3910         * WebProcess/WebPage/LayerTreeHost.h:
3911
3912 2015-08-10  Carlos Garcia Campos  <cgarcia@igalia.com>
3913
3914         [GTK] Crash when the web view is destroyed while the screensaver DBUs proxy is being created
3915         https://bugs.webkit.org/show_bug.cgi?id=147780
3916
3917         Reviewed by Sergio Villar Senin.
3918
3919         We should cancel the screenSaverInhibitCancellable on
3920         dispose. Also use adoptGRef() when creating the cancellable object
3921         to not leak it.
3922
3923         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3924         (webkitWebViewBaseDispose):
3925         (webkitWebViewBaseSendInhibitMessageToScreenSaver):
3926         (webkitWebViewBaseInhibitScreenSaver):
3927
3928 2015-08-09  Chris Dumez  <cdumez@apple.com>
3929
3930         Follow-up nit fixes after r187691.
3931         https://bugs.webkit.org/show_bug.cgi?id=128006
3932
3933         Reviewed by Gavin Barraclough.
3934
3935         Use modern for-loops instead of explicit iterators.
3936
3937         * Shared/Authentication/AuthenticationManager.cpp:
3938         (WebKit::AuthenticationManager::shouldCoalesceChallenge):
3939         (WebKit::AuthenticationManager::coalesceChallengesMatching):
3940
3941 2015-08-07  Filip Pizlo  <fpizlo@apple.com>
3942
3943         Lightweight locks should be adaptive
3944         https://bugs.webkit.org/show_bug.cgi?id=147545
3945
3946         Reviewed by Geoffrey Garen.
3947
3948         * WebProcess/WebPage/EventDispatcher.cpp:
3949         (WebKit::EventDispatcher::clearQueuedTouchEventsForPage):
3950         (WebKit::EventDispatcher::getQueuedTouchEventsForPage):
3951         (WebKit::EventDispatcher::touchEvent):
3952         (WebKit::EventDispatcher::dispatchTouchEvents):
3953         * WebProcess/WebPage/EventDispatcher.h:
3954         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
3955         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
3956         (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
3957         * WebProcess/WebPage/ViewUpdateDispatcher.h:
3958
3959 2015-08-07  Wenson Hsieh  <wenson_hsieh@apple.com>
3960
3961         Temporarily allow programmatic input assistance for adding Gmail account
3962         https://bugs.webkit.org/show_bug.cgi?id=147792
3963
3964         Reviewed by Enrica Casucci.
3965         <rdar://problem/22126518>
3966
3967         Temporary fix for keyboard input sliding out and immediately back in upon user interaction
3968         in the Gmail 2-factor authentication page.
3969
3970         * UIProcess/ios/WKContentViewInteraction.mm:
3971         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Early
3972             return no longer triggers due to lack of user interaction when adding a new Gmail account
3973             through Settings.
3974
3975 2015-08-07  Brady Eidson  <beidson@apple.com>
3976
3977         Move concrete KeyedDecoder/Encoder implementations to WebCore.
3978         https://bugs.webkit.org/show_bug.cgi?id=147757.
3979
3980         Rubberstamped by Andy Estes.
3981
3982         * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
3983         (WebKit::serializeIDBKeyPath):
3984         (WebKit::deserializeIDBKeyPath):
3985         (WebKit::serializeIDBKeyData):
3986         (WebKit::deserializeIDBKeyData):
3987         
3988         * PlatformEfl.cmake:
3989         * PlatformGTK.cmake:
3990         * WebKit2.xcodeproj/project.pbxproj:
3991
3992 2015-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
3993
3994         Unreviewed. Fix GTK+ compile warning also introduced in r188121.
3995
3996         * UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp:
3997         (webkit_install_missing_media_plugins_permission_request_get_description):
3998
3999 2015-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
4000
4001         Unreviewed. Fix GTK+ debug build after r188121.
4002
4003         * UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp:
4004         (webkit_install_missing_media_plugins_permission_request_get_description):
4005
4006 2015-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
4007
4008         [GStreamer] Do not automatically show PackageKit codec installation notifications
4009         https://bugs.webkit.org/show_bug.cgi?id=135973
4010
4011         Reviewed by Philippe Normand.
4012
4013         Add InstallMissingMediaPluginsPermissionRequest to ask the API
4014         layer whether to allow or deny the installation of missing media
4015         plugins. And add a GTK+ implementation based on current permission
4016         request API. Replace the
4017         PageClientImpl::createGstInstallPluginsContext() with
4018         decicePolicyForInstallMissingMediaPluginsPermissionRequest() that
4019         passes the InstallMissingMediaPluginsPermissionRequest object to
4020         the API layer. The allow method receives the
4021         GstInstallPluginsContext now, so that it can be created by the API implementation.
4022
4023         * PlatformEfl.cmake:
4024         * PlatformGTK.cmake:
4025         * UIProcess/API/gtk/PageClientImpl.cpp:
4026         (WebKit::PageClientImpl::decicePolicyForInstallMissingMediaPluginsPermissionRequest):
4027         * UIProcess/API/gtk/PageClientImpl.h:
4028         * UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp: Added.
4029         (createGstInstallPluginsContext):
4030         (webkitInstallMissingMediaPluginsPermissionRequestAllow):
4031         (webkitInstallMissingMediaPluginsPermissionRequestDeny):
4032         (webkit_permission_request_interface_init):
4033         (webkitInstallMissingMediaPluginsPermissionRequestDispose):
4034         (webkit_install_missing_media_plugins_permission_request_class_init):
4035         (webkitInstallMissingMediaPluginsPermissionRequestCreate):
4036         (webkit_install_missing_media_plugins_permission_request_get_description):
4037         * UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.h: Added.
4038         * UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequestPrivate.h: Added.
4039         * UIProcess/API/gtk/WebKitWebView.cpp:
4040         (webkitWebViewRequestInstallMissingMediaPlugins):
4041         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
4042         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
4043         * UIProcess/API/gtk/docs/webkit2gtk-4.0.types:
4044         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
4045         * UIProcess/API/gtk/webkit2.h:
4046         * UIProcess/PageClient.h:
4047         * UIProcess/WebPageProxy.h:
4048         * UIProcess/WebPageProxy.messages.in:
4049         * UIProcess/efl/WebViewEfl.h:
4050         * UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp: Copied from Source/WebKit2/UIProcess/gstreamer/WebPageProxyGStreamer.cpp.
4051         (WebKit::InstallMissingMediaPluginsPermissionRequest::InstallMissingMediaPluginsPermissionRequest):
4052         (WebKit::InstallMissingMediaPluginsPermissionRequest::~InstallMissingMediaPluginsPermissionRequest):
4053         (WebKit::InstallMissingMediaPluginsPermissionRequest::allow):
4054         (WebKit::InstallMissingMediaPluginsPermissionRequest::deny):
4055         (WebKit::InstallMissingMediaPluginsPermissionRequest::didEndRequestInstallMissingMediaPlugins):
4056         * UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.h: Copied from Source/WebKit2/WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp.
4057         (WebKit::InstallMissingMediaPluginsPermissionRequest::create):
4058         (WebKit::InstallMissingMediaPluginsPermissionRequest::page):
4059         (WebKit::InstallMissingMediaPluginsPermissionRequest::details):
4060         (WebKit::InstallMissingMediaPluginsPermissionRequest::description):
4061         * UIProcess/gstreamer/WebPageProxyGStreamer.cpp:
4062         (WebKit::WebPageProxy::requestInstallMissingMediaPlugins):
4063         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
4064         (WebKit::WebChromeClient::requestInstallMissingMediaPlugins):
4065         * WebProcess/WebCoreSupport/WebChromeClient.h:
4066         * WebProcess/WebPage/WebPage.h:
4067         * WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp:
4068         (WebKit::WebPage::requestInstallMissingMediaPlugins):
4069
4070 2015-08-06  Beth Dakin  <bdakin@apple.com>
4071
4072         TextIndicator can have stale contentImage data and crash
4073         https://bugs.webkit.org/show_bug.cgi?id=147770
4074         -and corresponding-
4075         rdar://problem/22181735
4076
4077         Reviewed by Tim Horton.
4078
4079         If there is no contentImage or contentImageWithHighlight, set them to 
4080         nullptr.
4081         * Shared/WebCoreArgumentCoders.cpp:
4082         (IPC::ArgumentCoder<TextIndicatorData>::decode):
4083
4084 2015-08-06  Dan Bernstein  <mitz@apple.com>
4085
4086         Fixed all the builds after trying to fix the non-HAVE(LINK_PREVIEW) build.
4087
4088         * UIProcess/ios/WKContentViewInteraction.mm:
4089
4090 2015-08-06  Dan Bernstein  <mitz@apple.com>
4091
4092         Fixed the non-HAVE(LINK_PREVIEW) build.
4093
4094         * UIProcess/ios/WKContentViewInteraction.mm:
4095
4096 2015-08-06  Enrica Casucci  <enrica@apple.com>
4097
4098         Cleanup action sheet only when long press is canceled (non ended).
4099         https://bugs.webkit.org/show_bug.cgi?id=147766
4100         rdar://problem/22181842
4101
4102         Reviewed by Tim Horton.
4103
4104         * UIProcess/ios/WKContentViewInteraction.mm:
4105         (-[WKContentView _longPressRecognized:]):
4106