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