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