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