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