dd18f6c76a96447ccc5bd3eeffbe6cd8b58a0b18
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-05-05  Tim Horton  <timothy_horton@apple.com>
2
3         Fix the build.
4
5         * Platform/mac/LayerHostingContext.mm:
6         (WebKit::LayerHostingContext::setFencePort):
7
8 2015-05-05  Tim Horton  <timothy_horton@apple.com>
9
10         Fix the build.
11
12         * UIProcess/mac/WKViewLayoutStrategy.mm:
13         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
14
15 2015-05-05  Timothy Horton  <timothy_horton@apple.com>
16
17         Add a layout mode for computing fixed layout size from a minimum size
18         https://bugs.webkit.org/show_bug.cgi?id=144610
19         <rdar://problem/19790341>
20
21         Reviewed by Simon Fraser.
22
23         Add a layout mode where WebKit determines the layout size with a set of
24         (still in flux) heuristics, trying hard to keep the page usable below a
25         particular client-defined threshold view size.
26
27         This can mean that WebKit will start scaling down the page inside the view
28         to make the whole page fit, using the viewScale mechanism.
29
30         * UIProcess/API/C/WKLayoutMode.h:
31         * UIProcess/API/Cocoa/_WKLayoutMode.h:
32         Add the new layout mode, and documentation for the two complicated ones.
33         
34         * UIProcess/API/Cocoa/WKWebView.mm:
35         (-[WKWebView _layoutMode]):
36         (-[WKWebView _setLayoutMode:]):
37         (-[WKWebView _setViewScale:]):
38         (-[WKWebView _setMinimumViewSize:]):
39         (-[WKWebView _minimumViewSize]):
40         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
41         Forward the layoutMode and viewScale parameters to WKView if we have one.
42
43         * UIProcess/API/Cocoa/WKViewPrivate.h:
44         * UIProcess/API/mac/WKView.mm:
45         (-[WKView dealloc]):
46         (-[WKView viewWillStartLiveResize]):
47         (-[WKView viewDidEndLiveResize]):
48         (-[WKView setFrameSize:]):
49         (-[WKView initWithFrame:processPool:configuration:webView:]):
50         (-[WKView disableFrameSizeUpdates]):
51         (-[WKView enableFrameSizeUpdates]):
52         (-[WKView frameSizeUpdatesDisabled]):
53         (-[WKView _layoutMode]):
54         (-[WKView _setLayoutMode:]):
55         (-[WKView _setViewScale:]):
56         (-[WKView _setMinimumViewSize:]):
57         (-[WKView _minimumViewSize]):
58         Store the minimum view size, and update the fixed layout size if needed.
59
60         (-[WKView _updateAutomaticallyComputedFixedLayoutSize]): Deleted.
61         (-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]): Deleted.
62         (-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]): Deleted.
63         Store the WKLayoutMode on the WKViewLayoutStrategy instead of having a
64         bunch of things like _automaticallyComputesFixedLayoutSizeFromViewScale.
65
66         * UIProcess/API/mac/WKViewInternal.h:
67
68         * UIProcess/mac/WKViewLayoutStrategy.h: Added.
69         * UIProcess/mac/WKViewLayoutStrategy.mm: Added.
70         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
71         (-[WKViewLayoutStrategy initWithPage:view:mode:]):
72         (-[WKViewLayoutStrategy willDestroyView:]):
73         (-[WKViewLayoutStrategy layoutMode]):
74         (-[WKViewLayoutStrategy updateLayout]):
75         (-[WKViewLayoutStrategy disableFrameSizeUpdates]):
76         (-[WKViewLayoutStrategy enableFrameSizeUpdates]):
77         (-[WKViewLayoutStrategy frameSizeUpdatesDisabled]):
78         (-[WKViewLayoutStrategy didChangeViewScale]):
79         (-[WKViewLayoutStrategy didChangeMinimumViewSize]):
80         (-[WKViewLayoutStrategy willStartLiveResize]):
81         (-[WKViewLayoutStrategy didEndLiveResize]):
82         (-[WKViewLayoutStrategy didChangeFrameSize]):
83         (-[WKViewLayoutStrategy willChangeLayoutStrategy]):
84         (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]):
85         (-[WKViewViewSizeLayoutStrategy updateLayout]):
86         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]):
87         (-[WKViewFixedSizeLayoutStrategy updateLayout]):
88         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]):
89         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
90         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeViewScale]):
91         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
92         Move the existing layout strategies from WKView into WKViewLayoutStrategy subclasses.
93
94         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]):
95         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
96         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeMinimumViewSize]):
97         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willStartLiveResize]):
98         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didEndLiveResize]):
99         While in live resize with the new layout mode, disable frame size updates.
100         The new layout mode will do a live scale during part of the resize, and
101         we don't always want to send the new view size to the Web process.
102
103         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeFrameSize]):
104         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
105         While in the new layout mode, maintain the viewScale as the minimum of the
106         scale required to fit the current view frame size inside the minimumViewSize.
107         If no scaling is required, carry on as usual, pushing the new view frame size
108         to the DrawingArea and on to the Web process.
109         If scaling is required, apply a transform to the view in the UI process,
110         until the live resize completes, in which case we send a fenced viewScale
111         adjustment to the Web process (so that the tiles paint at the new viewScale
112         synchronized with the removal of the transform in the UI process).
113
114         * UIProcess/WebPageProxy.cpp:
115         (WebKit::WebPageProxy::scaleViewFenced):
116         * UIProcess/WebPageProxy.h:
117         * WebProcess/WebPage/DrawingArea.h:
118         (WebKit::DrawingArea::addFence):
119         (WebKit::DrawingArea::acceleratedAnimationDidEnd): Deleted.
120         * WebProcess/WebPage/WebPage.cpp:
121         (WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
122         * WebProcess/WebPage/WebPage.h:
123         * WebProcess/WebPage/WebPage.messages.in:
124         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
125         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
126         (WebKit::TiledCoreAnimationDrawingArea::addFence):
127         Add scaleViewAndUpdateGeometryFenced and the ability to install CoreAnimation fences on
128         TiledCoreAnimationDrawingArea's CAContext.
129
130         Add the ability to send updateGeometry out-of-band, so that
131         we can send it synchronously inside the message along with the CA fence.
132         We have to both change the viewScale and updateGeometry simultaneously
133         in the same CA commit that we install the fence into, in order to ensure
134         that there is no flash.
135
136 2015-05-05  Alex Christensen  <achristensen@webkit.org>
137
138         [Content Extensions] Release input NSString when finished copying it.
139         https://bugs.webkit.org/show_bug.cgi?id=144642
140
141         Reviewed by Brian Weinstein.
142
143         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
144         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
145         (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
146
147 2015-05-05  Alex Christensen  <achristensen@webkit.org>
148
149         [Content Extensions] Use less memory to store the json input.
150         https://bugs.webkit.org/show_bug.cgi?id=144604
151
152         Reviewed by Benjamin Poulain.
153
154         * UIProcess/API/APIUserContentExtensionStore.cpp:
155         (API::compiledToFile):
156         (API::UserContentExtensionStore::compileContentExtension):
157         * UIProcess/API/APIUserContentExtensionStore.h:
158         Don't copy strings as much or keep them alive after done using them.
159
160 2015-05-04  Alex Christensen  <achristensen@webkit.org>
161
162         [Content Extensions] Use less memory when writing byte code to file
163         https://bugs.webkit.org/show_bug.cgi?id=144602
164
165         Reviewed by Darin Adler.
166
167         * UIProcess/API/APIUserContentExtensionStore.cpp:
168         (API::decodeContentExtensionMetaData):
169         (API::writeDataToFile):
170         (API::compiledToFile):
171         (API::createExtension):
172         Compile and write each DFA to file, then come back and write the header when finalizing.
173         Also don't copy the DFA bytecode. This way, we don't need to keep more than one DFA's
174         bytecode in memory at a time.
175
176 2015-05-05  Sungmann Cho  <sungmann.cho@navercorp.com>
177
178         Make all FrameLoadState data members private.
179         https://bugs.webkit.org/show_bug.cgi?id=144562
180
181         Reviewed by Darin Adler.
182
183         Previously, all of the data members in FrameLoadState were public and accessed directly
184         from outside the class. But these should all be private as noted in FrameLoadState.h
185         for better encapsulation.
186
187         No new tests, no behavior change.
188
189         * UIProcess/API/C/WKFrame.cpp:
190         (WKFrameGetFrameLoadState):
191         * UIProcess/FrameLoadState.h:
192         (WebKit::FrameLoadState::state):
193         (WebKit::FrameLoadState::url):
194         (WebKit::FrameLoadState::provisionalURL):
195         (WebKit::FrameLoadState::unreachableURL):
196         * UIProcess/WebFrameProxy.h:
197         (WebKit::WebFrameProxy::url):
198         (WebKit::WebFrameProxy::provisionalURL):
199         (WebKit::WebFrameProxy::unreachableURL):
200
201 2015-05-05  Alexey Proskuryakov  <ap@apple.com>
202
203         Crashes in SandboxExtension::consumePermanently when uploading
204         https://bugs.webkit.org/show_bug.cgi?id=144611
205         rdar://problem/10156710
206
207         Reviewed by Darin Adler.
208
209         This only fixes the crashes, uploading still won't work.
210         Added null checks and some logging that may help us get to the root cause eventually.
211
212         * Shared/SandboxExtension.h:
213         (WebKit::SandboxExtension::createHandle):
214         (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
215         * Shared/mac/SandboxExtensionMac.mm:
216         (WebKit::SandboxExtension::createHandle):
217         (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
218         * UIProcess/WebPageProxy.cpp:
219         (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
220         * WebProcess/WebPage/WebPage.cpp:
221         (WebKit::WebPage::extendSandboxForFileFromOpenPanel):
222
223 2015-05-05  Csaba Osztrogonác  <ossy@webkit.org>
224
225         Remove TextureMapperImageBuffer
226         https://bugs.webkit.org/show_bug.cgi?id=143561
227
228         Reviewed by Žan Doberšek.
229
230         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
231         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
232         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
233         (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
234
235 2015-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
236
237         [SOUP] Network Cache: IOChannel operations are not sent to the right thread
238         https://bugs.webkit.org/show_bug.cgi?id=144542
239
240         Reviewed by Darin Adler.
241
242         We are ignoring the given WorkQueue and running the async
243         operations in the current thread. Check the given WorkQueue
244         instead and schedule the operation to the given queue. If the
245         given queue is nullptr, which means the operation should be run in
246         the main context, the operation is run directly if the current
247         context is the main one or sent to the main context using a
248         GMainLoopSource.
249
250         Fixes crashes due to asserts when running disk-cache layout tests
251         in a Debug build.
252
253         * NetworkProcess/cache/NetworkCacheIOChannel.h:
254         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
255         (WebKit::NetworkCache::runTaskInQueue):
256         (WebKit::NetworkCache::IOChannel::read):
257         (WebKit::NetworkCache::IOChannel::readSync):
258         (WebKit::NetworkCache::IOChannel::write):
259
260 2015-05-04  Dan Bernstein  <mitz@apple.com>
261
262         WebKit always goes through LaunchServices for main frame navigation actions
263         https://bugs.webkit.org/show_bug.cgi?id=144608
264
265         Reviewed by Tim Horton.
266
267         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Defined
268         _WKNavigationActionPolicyAllowWithoutTryingAppLink.
269         * UIProcess/Cocoa/NavigationState.mm:
270         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): If the policy
271         is _WKNavigationActionPolicyAllowWithoutTryingAppLink, don’t go through tryAppLink.
272
273 2015-05-04  Enrica Casucci  <enrica@apple.com>
274
275         [iOS WK2] editorState should include information about selection clipping rectangle.
276         https://bugs.webkit.org/show_bug.cgi?id=144603
277         rdar://problem/20521252
278
279         Reviewed by Chris Dumez.
280
281         Adding selectionClipRect to the post-layout portion of EditorState.
282         This way we can compute the selection clipping rectangle based on
283         up-to-date information instead of using the rectangle provided when
284         then element was first focused.
285
286         * Shared/EditorState.cpp:
287         (WebKit::EditorState::PostLayoutData::encode):
288         (WebKit::EditorState::PostLayoutData::decode):
289         * Shared/EditorState.h:
290         * UIProcess/ios/WKContentViewInteraction.mm:
291         (-[WKContentView _selectionClipRect]):
292         * WebProcess/WebPage/ios/WebPageIOS.mm:
293         (WebKit::WebPage::platformEditorState):
294
295 2015-05-04  Antti Koivisto  <antti@apple.com>
296
297         Network Cache: Support time based cache clearing
298         https://bugs.webkit.org/show_bug.cgi?id=144568
299         <rdar://problem/19769820>
300
301         Reviewed by Andreas Kling.
302
303         Support clearing cache entries newer than given time only.
304
305         * NetworkProcess/cache/NetworkCache.cpp:
306         (WebKit::NetworkCache::Cache::deleteDumpFile):
307         (WebKit::NetworkCache::Storage::traverse):
308
309             Also fix thread safety of traverse handler function.
310
311         (WebKit::NetworkCache::Cache::clear):
312
313             Also add completion handler to support the API properly.
314
315         * NetworkProcess/cache/NetworkCache.h:
316         * NetworkProcess/cache/NetworkCacheStorage.cpp:
317         (WebKit::NetworkCache::Storage::clear):
318         * NetworkProcess/cache/NetworkCacheStorage.h:
319         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
320         (WebKit::clearNSURLCache):
321
322             Factor to a function.
323
324         (WebKit::NetworkProcess::clearDiskCache):
325
326 2015-05-04  Zan Dobersek  <zdobersek@igalia.com>
327
328         [WTF] Remove Functional.h inclusions
329         https://bugs.webkit.org/show_bug.cgi?id=144400
330
331         Reviewed by Darin Adler.
332
333         Remove unnecessary inclusions of the <wtf/Functional.h> header in WebKit2.
334
335         * Platform/IPC/unix/ConnectionUnix.cpp:
336         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Import the <objc/runtime.h>
337         header that was previously indirectly included through the Functional.h header.
338         * WebProcess/WebPage/DrawingArea.cpp:
339
340 2015-05-04  Csaba Osztrogonác  <ossy@webkit.org>
341
342         [ARM] Don't compare unsigned chars to EOF (-1)
343         https://bugs.webkit.org/show_bug.cgi?id=144439
344
345         Reviewed by Geoffrey Garen.
346
347         * Shared/linux/WebMemorySamplerLinux.cpp:
348         (WebKit::nextToken): Don't cast return value of fgetc() to char.
349
350 2015-05-04  Antti Koivisto  <antti@apple.com>
351
352         Remove NetworkResourceLoadScheduler
353         https://bugs.webkit.org/show_bug.cgi?id=144550
354
355         Reviewed by Sam Weinig.
356
357         It doesn't really do anything.
358
359         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
360         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
361         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
362         * NetworkProcess/NetworkProcess.cpp:
363         (WebKit::NetworkProcess::getNetworkProcessStatistics):
364         * NetworkProcess/NetworkProcess.h:
365         (WebKit::NetworkProcess::networkResourceLoadScheduler): Deleted.
366         * NetworkProcess/NetworkResourceLoadScheduler.cpp: Removed.
367         * NetworkProcess/NetworkResourceLoadScheduler.h: Removed.
368         * NetworkProcess/NetworkResourceLoader.cpp:
369         (WebKit::NetworkResourceLoader::cleanup):
370         * NetworkProcess/NetworkResourceLoader.h:
371         (WebKit::NetworkResourceLoader::create):
372         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
373         (WebKit::initializeNetworkSettings):
374
375             Moved from NetworkResourceLoadSchedulerMac.mm.
376
377         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
378         * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm: Removed.
379         * NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp: Removed.
380         * WebKit2.xcodeproj/project.pbxproj:
381
382 2015-05-03  Alexey Proskuryakov  <ap@apple.com>
383
384         Crash in SandboxExtension::consume when uploading iWork -tef documents to iCloud
385         https://bugs.webkit.org/show_bug.cgi?id=144509
386         rdar://problem/18731910
387
388         Reviewed by Daniel Bates.
389
390         No test, because testRunner.beginDragWithFiles doesn't work in WKTR, and making
391         it work is hard.
392
393         * Shared/BlobDataFileReferenceWithSandboxExtension.cpp:
394         (WebKit::BlobDataFileReferenceWithSandboxExtension::prepareForFileAccess):
395         (WebKit::BlobDataFileReferenceWithSandboxExtension::revokeFileAccess):
396
397 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
398
399         [GTK][EFL] Unify platform display handling
400         https://bugs.webkit.org/show_bug.cgi?id=144517
401
402         Reviewed by Martin Robinson.
403
404         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
405         (webkitWebViewBaseRealize): Use PlatformDisplay::sharedDisplay()
406         to checkt the display type.
407         (webkitWebViewBaseCreateWebPage): Ditto.
408         * UIProcess/cairo/BackingStoreCairo.cpp:
409         (WebKit::BackingStore::createBackend): Pass the native X11 shared
410         display to BackingStoreBackendCairoX11.
411         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
412         (WebKit::NetscapePlugin::x11HostDisplay): Return the native X11
413         shared display.
414
415 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
416
417         Unreviewed. Fix Debug build with NETWORK_CACHE enabled and CACHE_PARTITIONING disabled.
418
419         * NetworkProcess/cache/NetworkCache.cpp:
420         (WebKit::NetworkCache::Cache::store):
421
422 2015-05-01  Dan Bernstein  <mitz@apple.com>
423
424         WebKit2 part of <rdar://problem/8636045> Back/forward navigation to an error page in Safari breaks the back-forward list
425         https://bugs.webkit.org/show_bug.cgi?id=144501
426
427         Reviewed by Darin Adler.
428
429         * UIProcess/WebPageProxy.cpp:
430         (WebKit::WebPageProxy::loadAlternateHTMLString): If this is called during
431         didFailProvisionalLoadForFrame, send back the provisional URL captured at the time of
432         failure.
433         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame): Get the provisioinal URL and keep
434         it in new member variable m_failingProvisionalLoadURL for the duration of the client’s
435         handling of this message.
436         * UIProcess/WebPageProxy.h:
437
438         * UIProcess/WebPageProxy.messages.in: Added provisionalURL parameter to
439         DidFailProvisionalLoadForFrame.
440
441         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
442         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad): Send the URL for this error
443         to the UI process.
444
445         * WebProcess/WebPage/WebPage.cpp:
446         (WebKit::WebPage::loadAlternateHTMLString): Temporarily restore the loader’s state to
447         reflect the provisional load error being handled.
448
449         * WebProcess/WebPage/WebPage.h:
450         * WebProcess/WebPage/WebPage.messages.in: Added provisionalLoadErrorURL parameter to
451         LoadAlternateHTMLString.
452
453 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
454
455         USE(...) macro should expect unprefixed variables
456         https://bugs.webkit.org/show_bug.cgi?id=144454
457
458         Reviewed by Daniel Bates.
459
460         * Shared/API/c/WKBase.h: Replace all occurrences WTF_USE with USE.
461         * WebKit2.xcodeproj/project.pbxproj: Ditto.
462
463 2015-05-01  Brady Eidson  <beidson@apple.com>
464
465         Add API to disable meta refreshes.
466         <rdar://problem/20333198> and https://bugs.webkit.org/show_bug.cgi?id=144269
467
468         Reviewed by Alexey Proskuryakov.
469
470         Add a preference to enable/disable meta refreshes, enabled by default.
471
472         * Shared/WebPreferencesDefinitions.h:
473         * UIProcess/API/C/WKPreferences.cpp:
474         (WKPreferencesSetMetaRefreshEnabled):
475         (WKPreferencesGetMetaRefreshEnabled):
476         (WKPreferencesGetIgnoreViewportScalingConstraints): Deleted.
477         * UIProcess/API/C/WKPreferencesRefPrivate.h:
478         * WebProcess/InjectedBundle/InjectedBundle.cpp:
479         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
480         * WebProcess/WebPage/WebPage.cpp:
481         (WebKit::WebPage::updatePreferences):
482
483 2015-05-01  Antti Koivisto  <antti@apple.com>
484
485         Remove network process load serialization code
486         https://bugs.webkit.org/show_bug.cgi?id=144448
487
488         Reviewed by Alexey Proskuryakov.
489
490         TestRunner.setSerializeHTTPLoads is used by a few tests but it is unnecessary
491         with network process. We don't reorder loads anyway so test results are consistent.
492         There or no other clients for this code.
493
494         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
495         (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
496         (WebKit::NetworkConnectionToWebProcess::setSerialLoadingEnabled): Deleted.
497         * NetworkProcess/NetworkConnectionToWebProcess.h:
498         (WebKit::NetworkConnectionToWebProcess::isSerialLoadingEnabled): Deleted.
499         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
500         * NetworkProcess/NetworkProcess.cpp:
501         (WebKit::NetworkProcess::getNetworkProcessStatistics):
502         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
503         (WebKit::NetworkResourceLoadScheduler::scheduleLoader):
504         (WebKit::NetworkResourceLoadScheduler::removeLoader):
505         (WebKit::NetworkResourceLoadScheduler::loadsPendingCount): Deleted.
506         * NetworkProcess/NetworkResourceLoadScheduler.h:
507         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
508         (WKBundleSetTabKeyCyclesThroughElements):
509         (WKBundleSetSerialLoadingEnabled): Deleted.
510         (WKBundleDispatchPendingLoadRequests): Deleted.
511         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
512         * WebProcess/InjectedBundle/InjectedBundle.cpp:
513         (WebKit::InjectedBundle::setSerialLoadingEnabled): Deleted.
514         (WebKit::InjectedBundle::dispatchPendingLoadRequests): Deleted.
515
516             Remove also this as it does nothing.
517
518         * WebProcess/Network/WebResourceLoadScheduler.cpp:
519         (WebKit::WebResourceLoadScheduler::WebResourceLoadScheduler):
520         (WebKit::WebResourceLoadScheduler::suspendPendingRequests):
521         (WebKit::WebResourceLoadScheduler::resumePendingRequests):
522
523             Remove implementation, it does nothing.
524
525         (WebKit::WebResourceLoadScheduler::setSerialLoadingEnabled):
526         * WebProcess/Network/WebResourceLoadScheduler.h:
527
528 2015-04-30  Timothy Horton  <timothy_horton@apple.com>
529
530         Remove long-deprecated unused WKView minimumLayoutWidth properties
531         https://bugs.webkit.org/show_bug.cgi?id=144480
532
533         Reviewed by Alexey Proskuryakov.
534
535         * UIProcess/API/Cocoa/WKViewPrivate.h:
536         * UIProcess/API/mac/WKView.mm:
537         (-[WKView minimumLayoutWidth]): Deleted.
538         (-[WKView setMinimumLayoutWidth:]): Deleted.
539         (-[WKView minimumWidthForAutoLayout]): Deleted.
540         (-[WKView setMinimumWidthForAutoLayout:]): Deleted.
541         These were replaced with minimumSizeForAutoLayout long ago.
542
543 2015-04-30  Simon Fraser  <simon.fraser@apple.com>
544
545         Fixed elements end up in the middle of the view with pageScale < 1
546         https://bugs.webkit.org/show_bug.cgi?id=144428
547         rdar://problem/20404982
548
549         Reviewed by Tim Horton.
550
551         Encode/decode fixedElementsLayoutRelativeToFrame.
552
553         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
554         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
555         (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
556
557 2015-04-30  Tim Horton  <timothy_horton@apple.com>
558
559         Asynchronous (or timed-out synchronous) resize flashes white instead of page background color
560         https://bugs.webkit.org/show_bug.cgi?id=144468
561
562         Reviewed by Simon Fraser and Dan Bernstein.
563
564         * UIProcess/API/mac/WKView.mm:
565         (-[WKView _viewBackgroundColor]):
566         (-[WKView updateLayer]):
567         Use the pageExtendedBackgroundColor for the background color of the WKView,
568         if we have one (and aren't using a transparent background). This means
569         during asynchronous resize or other cases where the Web process isn't keeping
570         up with the UI process during a resize, we'll see background color instead of white.
571
572 2015-04-30  Beth Dakin  <bdakin@apple.com>
573
574         Should choose UIScrollView indicatorStyle based on the document background color
575         https://bugs.webkit.org/show_bug.cgi?id=144473
576         -and corresponding-
577         rdar://problem/19897699
578
579         Reviewed by Simon Fraser.
580
581         Update the indicator style whenever the background color changes.  
582         * UIProcess/API/Cocoa/WKWebView.mm:
583         (-[WKWebView _updateScrollViewBackground]):
584
585 2015-04-30  Enrica Casucci  <enrica@apple.com>
586
587         [iOS] tapping in the middle of a word in editable content should not select the word.
588         https://bugs.webkit.org/show_bug.cgi?id=144421
589         rdar://problem/20710948
590
591         Reviewed by Tim Horton.
592
593         Reverting to the original behavior.
594
595         * WebProcess/WebPage/ios/WebPageIOS.mm:
596         (WebKit::WebPage::selectWithGesture):
597
598 2015-04-29  Hunseop Jeong  <hs85.jeong@samsung.com>
599
600         Fix the EFL build after r183595
601         https://bugs.webkit.org/show_bug.cgi?id=144427
602
603         Reviewed by Gyuyoung Kim.
604
605         updateWheelEventTestTriggersIfNeeded() is guarded by #if ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING).
606
607         * WebProcess/WebPage/EventDispatcher.cpp:
608         (WebKit::updateWheelEventTestTriggersIfNeeded):
609
610 2015-04-29  Brent Fulgham  <bfulgham@apple.com>
611
612         Expand test infrastructure to support scrolling tests
613         https://bugs.webkit.org/show_bug.cgi?id=143684
614         <rdar://problem/20375516>
615
616         Reviewed by Simon Fraser.
617
618         Update test programs to activate (and deactivate) the new WheelEventTestTrigger logic.
619
620         * UIProcess/API/C/WKPage.cpp:
621         (WKPageClearWheelEventTestTriggers): Added.
622         * UIProcess/API/C/WKPage.h:
623         * UIProcess/WebPageProxy.cpp:
624         (WebKit::WebPageProxy::clearWheelEventTestTrigger): Added.
625         * UIProcess/WebPageProxy.h:
626         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
627         (WKBundlePageStartMonitoringScrollOperations): Interact with WheelEventTestTrigger through
628         the Page, rather than MainFrame.
629         (WKBundlePageRegisterScrollOperationCompletionCallback): Ditto.
630         * WebProcess/Plugins/PDF/PDFPlugin.mm:
631         (WebKit::PDFPlugin::createScrollbar): Make sure scroll animator knows about any
632         active test triggers.
633         * WebPage/EventDispatcher.mm:
634         (WebKit::EventDispatcher::wheelEvent): If the wheel event was passed to the scrolling thread,
635         defer tests until a Scrolling Thread Sync has occurred.
636         * WebPage/WebPage.cpp:
637         (WebKit::WebPage::clearWheelEventTestTrigger): Added.
638         * WebPage/WebPage.h:
639         * WebPage/WebPage.message.in: Added ClearWheelEventTestTrigger message.
640
641 2015-04-29  Enrica Casucci  <enrica@apple.com>
642
643         Adding the ability to move selection by granularity on iOS.
644         https://bugs.webkit.org/show_bug.cgi?id=144410
645         rdar://problem/19213337
646
647         Reviewed by Benjamin Poulain.
648
649         This patch also correctly sets _usingGestureForSelection for all
650         the functions that change the selection with a gesture.
651         This way we make sure that the selection drawing is not delayed
652         until the next time we paint.
653
654         * UIProcess/WebPageProxy.h:
655         * UIProcess/ios/WKContentViewInteraction.mm:
656         (-[WKContentView moveSelectionAtBoundary:inDirection:completionHandler:]):
657         * UIProcess/ios/WebPageProxyIOS.mm:
658         (WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection):
659         * WebProcess/WebPage/WebPage.h:
660         * WebProcess/WebPage/WebPage.messages.in:
661         * WebProcess/WebPage/ios/WebPageIOS.mm:
662         (WebKit::WebPage::moveSelectionAtBoundaryWithDirection):
663
664 2015-04-29  Tim Horton  <timothy_horton@apple.com>
665
666         UI process sometimes crashes under _takeViewSnapshot when the window is off-screen
667         https://bugs.webkit.org/show_bug.cgi?id=144418
668         <rdar://problem/20740278>
669
670         Reviewed by Alexey Proskuryakov.
671
672         * UIProcess/API/mac/WKView.mm:
673         (-[WKView _takeViewSnapshot]):
674         Null-check the array before checking if it has any items.
675         If the window is off-screen, we can't snapshot it.
676
677 2015-04-29  Simon Fraser  <simon.fraser@apple.com>
678
679         Allow testing of plug-ins that handle wheel events.
680         https://bugs.webkit.org/show_bug.cgi?id=144413
681
682         Reviewed by Tim Horton.
683         
684         Allow the Test Netscape Plug-in to pretend to handle wheel events,
685         so layout tests can use it.
686
687         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
688         (WebKit::NetscapePluginModule::determineQuirks):
689
690 2015-04-29  Filip Pizlo  <fpizlo@apple.com>
691
692         JSTypeInfo should have an inline type flag to indicate if getCallData() has been overridden
693         https://bugs.webkit.org/show_bug.cgi?id=144397
694
695         Reviewed by Andreas Kling.
696
697         If you override getCallData() and you want to be called a "function", then you need to use the
698         new TypeOfShouldCallGetCallData flag.
699
700         * WebProcess/Plugins/Netscape/JSNPObject.h:
701
702 2015-04-29  Antti Koivisto  <antti@apple.com>
703
704         ResourceLoadPriority should be enum class
705         https://bugs.webkit.org/show_bug.cgi?id=144326
706
707         Reviewed by Darin Adler.
708
709         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
710         (WebKit::NetworkConnectionToWebProcess::servePendingRequests): Deleted.
711
712             Remove this unused message.
713
714         * NetworkProcess/NetworkConnectionToWebProcess.h:
715         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
716         * NetworkProcess/cache/NetworkCache.cpp:
717         (WebKit::NetworkCache::makeStoreDecision):
718         (WebKit::NetworkCache::Cache::retrieve):
719         * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
720         (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
721         * WebProcess/Network/WebResourceLoadScheduler.cpp:
722         (WebKit::WebResourceLoadScheduler::servePendingRequests):
723         * WebProcess/Network/WebResourceLoadScheduler.h:
724
725 2015-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
726
727         [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
728         https://bugs.webkit.org/show_bug.cgi?id=132159
729
730         Reviewed by Darin Adler.
731
732         Add SPI to set the font whitelist.
733
734         * Shared/WebProcessCreationParameters.cpp:
735         (WebKit::WebProcessCreationParameters::encode):
736         (WebKit::WebProcessCreationParameters::decode):
737         * Shared/WebProcessCreationParameters.h:
738         * UIProcess/API/C/WKContext.cpp:
739         (WKContextSetFontWhitelist):
740         * UIProcess/API/C/WKContextPrivate.h:
741         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
742         (WebKit::WebProcessPool::platformInitializeWebProcess):
743         * UIProcess/WebProcessPool.cpp:
744         (WebKit::WebProcessPool::setFontWhitelist):
745         * UIProcess/WebProcessPool.h:
746         * WebProcess/cocoa/WebProcessCocoa.mm:
747         (WebKit::WebProcess::platformInitializeWebProcess):
748
749 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
750
751         [CMake] [GTK] Organize and clean up unused CMake variables
752         https://bugs.webkit.org/show_bug.cgi?id=144364
753
754         Reviewed by Gyuyoung Kim.
755
756         * PlatformGTK.cmake: Add variables specific to this project.
757         * webkit2gtk-web-extension.pc.in: Hardcode the GTK+ API version. It rarely changes.
758         * webkit2gtk.pc.in: Ditto.
759
760 2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
761
762         REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
763         https://bugs.webkit.org/show_bug.cgi?id=144388
764
765         Reviewed by Brady Eidson.
766
767         Move the WebContextMenuClient::shareMenuItem() implementation to
768         platform files, since platforms not supporting share menu item
769         should return a null ContextMenuIem instead.
770
771         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
772         (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
773         * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
774         (WebKit::WebContextMenuClient::shareMenuItem):
775         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
776         (WebKit::WebContextMenuClient::shareMenuItem):
777         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
778         (WebKit::WebContextMenuClient::shareMenuItem):
779
780 2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
781
782         REGRESSION(r183467): [SOUP] isMainResource is no longer passed as resource load parameters to the network process
783         https://bugs.webkit.org/show_bug.cgi?id=144381
784
785         Reviewed by Darin Adler.
786
787         A requester enum value is passed now as part of the
788         ResourceRequest, but it's not encoded/decoded for soup.
789
790         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
791         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData): Encode requester.
792         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData): Decode requester.
793
794 2015-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
795
796         [SOUP] Use xattrs to get/set the creation time of disk cache files
797         https://bugs.webkit.org/show_bug.cgi?id=144251
798
799         Reviewed by Martin Robinson.
800
801         The network process disk cache uses the creation time to compute a
802         worth value used to determine the order in which cached resources
803         are deleted when the cache is shrunk. In some operating systems
804         like Linux there's no st_birthtime in struct stat, but since cache
805         files are always created and deleted by us, we could use a custom
806         xattr to store and retrieve the creation time of cached resources.
807
808         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
809         (WebKit::NetworkCache::fileTimes):
810         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
811         (WebKit::NetworkCache::IOChannel::IOChannel):
812
813 2015-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
814
815         Network Cache: Do not create a SharedBuffer for mapped resources unless explicitly requested
816         https://bugs.webkit.org/show_bug.cgi?id=144337
817
818         Reviewed by Antti Koivisto.
819
820         We send a buffer or a memory mapped handler to the web process
821         depending on whether the resource body is mapped or not, but we
822         are always creating a shared buffer even for mapped resources.
823         Split initializeBufferFromStorageRecord() moving the mapped memory
824         handler initialization to its own method.
825
826         * NetworkProcess/cache/NetworkCacheEntry.cpp:
827         (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
828         Initialize the mapped memory handler if the body data is mapped.
829         (WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
830         Initialize the buffer by wrapping the mapped memory if the body
831         data is mapped, or using the body data directly otherwise.
832         (WebKit::NetworkCache::Entry::shareableResourceHandle): Call
833         initializeShareableResourceHandleFromStorageRecord() if the
834         handler is null.
835         * NetworkProcess/cache/NetworkCacheEntry.h:
836
837 2015-04-28  Simon Fraser  <simon.fraser@apple.com>
838
839         Make a non-static version of FrameView::yPositionForRootContentLayer()
840         https://bugs.webkit.org/show_bug.cgi?id=144375
841
842         Reviewed by Andy Estes.
843
844         There were two calls to the static FrameView::yPositionForRootContentLayer()
845         which passed in all the arguments for the same FrameView. Make a member
846         function for convenience.
847
848         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
849         (WebKit::shadowLayerPositionForFrame):
850
851 2015-04-28  Ryuan Choi  <ryuan.choi@navercorp.com>
852
853         [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
854         https://bugs.webkit.org/show_bug.cgi?id=143001
855
856         Reviewed by Gyuyoung Kim.
857
858         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
859         (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
860         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
861         (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
862         * WebProcess/WebCoreSupport/WebChromeClient.h:
863         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
864         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
865         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
866         * WebProcess/WebPage/WebPage.cpp:
867         (WebKit::WebPage::setSize):
868         (WebKit::WebPage::setUseFixedLayout):
869         (WebKit::WebPage::canHandleUserEvents):
870         * WebProcess/WebPage/WebPage.h:
871
872 2015-04-28  Timothy Horton  <timothy_horton@apple.com>
873
874         [TextIndicator] Yellow highlight takes too long to fade out on scroll
875         https://bugs.webkit.org/show_bug.cgi?id=144358
876         <rdar://problem/19451011>
877
878         Reviewed by Beth Dakin.
879
880         * UIProcess/API/Cocoa/WKViewPrivate.h:
881         * UIProcess/API/mac/WKView.mm:
882         (-[WKView renewGState]):
883         (-[WKView viewDidMoveToWindow]):
884         (-[WKView _dictionaryLookupPopoverWillClose:]):
885         (-[WKView _setTextIndicator:]):
886         (-[WKView _setTextIndicator:withLifetime:]):
887         (-[WKView _clearTextIndicatorWithAnimation:]):
888         (-[WKView magnifyWithEvent:]):
889         (-[WKView smartMagnifyWithEvent:]):
890         (-[WKView setMagnification:centeredAtPoint:]):
891         (-[WKView setMagnification:]):
892         (-[WKView _dismissContentRelativeChildWindows]):
893         (-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
894         (-[WKView _setTextIndicator:fadeOut:]): Deleted.
895         * UIProcess/API/mac/WKViewInternal.h:
896         * UIProcess/PageClient.h:
897         * UIProcess/WebPageProxy.cpp:
898         (WebKit::WebPageProxy::pageDidScroll):
899         (WebKit::WebPageProxy::setTextIndicator):
900         (WebKit::WebPageProxy::clearTextIndicator):
901         * UIProcess/WebPageProxy.h:
902         * UIProcess/WebPageProxy.messages.in:
903         * UIProcess/ios/PageClientImplIOS.h:
904         * UIProcess/ios/PageClientImplIOS.mm:
905         (WebKit::PageClientImpl::setTextIndicator):
906         (WebKit::PageClientImpl::clearTextIndicator):
907         * UIProcess/mac/PageClientImpl.h:
908         * UIProcess/mac/PageClientImpl.mm:
909         (WebKit::PageClientImpl::setTextIndicator):
910         (WebKit::PageClientImpl::clearTextIndicator):
911         (WebKit::PageClientImpl::didPerformDictionaryLookup):
912         (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
913         * UIProcess/mac/WKActionMenuController.mm:
914         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
915         * UIProcess/mac/WKImmediateActionController.mm:
916         (-[WKImmediateActionController _defaultAnimationController]):
917         (-[WKImmediateActionController _animationControllerForDataDetectedText]):
918         (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
919         (-[WKImmediateActionController _animationControllerForText]):
920         * WebProcess/WebPage/FindController.cpp:
921         (WebKit::FindController::updateFindIndicator):
922         Make _setTextIndicator take a reference.
923         Add a variant of _setTextIndicator that takes a Lifetime.
924         Make _clearTextIndicatorWithAnimation take a DismissalAnimation.
925         Make dismissContentRelativeChildWindows take a parameter indicating
926         whether the dismissal should include animation or not (currently
927         only applies to TextIndicator).
928         Don't animate when dismissal occurs because of scrolling, zooming,
929         or other things in which the content will have changed significantly
930         underneath the indicator and shouldn't have a slowly-fading-out yellow highlight.
931
932 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
933
934         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
935         https://bugs.webkit.org/show_bug.cgi?id=144304
936
937         Reviewed by Geoffrey Garen.
938
939         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
940
941         * Configurations/FeatureDefines.xcconfig:
942
943 2015-04-28  Commit Queue  <commit-queue@webkit.org>
944
945         Unreviewed, rolling out r183514.
946         https://bugs.webkit.org/show_bug.cgi?id=144359
947
948         It broke cloop test bots (Requested by mcatanzaro on #webkit).
949
950         Reverted changeset:
951
952         "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
953         https://bugs.webkit.org/show_bug.cgi?id=144304
954         http://trac.webkit.org/changeset/183514
955
956 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
957
958         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
959         https://bugs.webkit.org/show_bug.cgi?id=144304
960
961         Reviewed by Geoffrey Garen.
962
963         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
964
965         * Configurations/FeatureDefines.xcconfig:
966
967 2015-04-28  Enrica Casucci  <enrica@apple.com>
968
969         Add support for lookup on iOS.
970         https://bugs.webkit.org/show_bug.cgi?id=144342
971         rdar://problem/19994090
972
973         Reviewed by Tim Horton.
974
975         * UIProcess/WebPageProxy.h:
976         * UIProcess/ios/WKContentViewInteraction.mm:
977         (-[WKContentView _lookup:]):
978         (-[WKContentView canPerformAction:withSender:]):
979         * UIProcess/ios/WebPageProxyIOS.mm:
980         (WebKit::WebPageProxy::getLookupContextAtPoint):
981         * WebProcess/WebPage/WebPage.h:
982         * WebProcess/WebPage/WebPage.messages.in:
983         * WebProcess/WebPage/ios/WebPageIOS.mm:
984         (WebKit::WebPage::getLookupContextAtPoint):
985
986 2015-04-28  Brady Eidson  <beidson@apple.com>
987
988         Consolidate most "frame load" arguments into FrameLoadRequest.
989         https://bugs.webkit.org/show_bug.cgi?id=144276
990
991         Reviewed by Alexey Proskuryakov.
992
993         * WebProcess/Plugins/PluginView.cpp:
994         (WebKit::PluginView::loadURL):
995         
996         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
997         (WebKit::WebFrameLoaderClient::dispatchCreatePage):
998         
999         * WebProcess/WebPage/WebInspector.cpp:
1000         (WebKit::WebInspector::openInNewTab):
1001
1002 2015-04-28  Chris Dumez  <cdumez@apple.com>
1003
1004         [WK2][Mac] Update WebContent process' sandbox profile for AWD
1005         https://bugs.webkit.org/show_bug.cgi?id=144315
1006         <rdar://problem/20719293>
1007
1008         Reviewed by Alexey Proskuryakov.
1009
1010         Update sandbox profile for AWD similarly to what was done for iOS in
1011         r182278.
1012
1013         * WebProcess/com.apple.WebProcess.sb.in:
1014
1015 2015-04-28  Antti Koivisto  <antti@apple.com>
1016
1017         Network Cache: Disk cache getting filled by YouTube video data
1018         https://bugs.webkit.org/show_bug.cgi?id=144259
1019
1020         Reviewed by Darin Adler.
1021
1022         MSE media is loaded via XHR and tends to eventually fill the cache.
1023
1024         YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
1025         We can reduce disk writes and keep more useful resources around by not caching them
1026
1027         * NetworkProcess/NetworkResourceLoader.cpp:
1028         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
1029         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
1030         * NetworkProcess/cache/NetworkCache.cpp:
1031         (WebKit::NetworkCache::makeStoreDecision):
1032
1033             Don't store if the requester is XHR and response has video or audio content type.
1034
1035         * NetworkProcess/cache/NetworkCache.h:
1036         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1037         (WebKit::NetworkCache::storeDecisionToDiagnosticKey):
1038         * Shared/Network/NetworkResourceLoadParameters.cpp:
1039         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
1040         (WebKit::NetworkResourceLoadParameters::encode):
1041         (WebKit::NetworkResourceLoadParameters::decode):
1042         * Shared/Network/NetworkResourceLoadParameters.h:
1043
1044             The requester type is now part of the ResourceRequest, no need for separate parameter.
1045
1046         * Shared/mac/WebCoreArgumentCodersMac.mm:
1047         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
1048         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
1049         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1050         (WebKit::WebResourceLoadScheduler::scheduleLoad):
1051
1052 2015-04-28  Zan Dobersek  <zdobersek@igalia.com>
1053
1054         [WK2] API::UserContentURLPattern creation functions should return Ref<>
1055         https://bugs.webkit.org/show_bug.cgi?id=144225
1056
1057         Reviewed by Darin Adler.
1058
1059         Have API::UserContentURLPattern creation functions return Ref<>.
1060         Call-sites are also updated, using and operating on the returned Ref<>
1061         object where possible.
1062
1063         * Shared/API/APIUserContentURLPattern.h:
1064         (API::UserContentURLPattern::create):
1065         * Shared/API/c/WKUserContentURLPattern.cpp:
1066         (WKUserContentURLPatternCreate):
1067
1068 2015-04-28  Zan Dobersek  <zdobersek@igalia.com>
1069
1070         [WK2] API::URLRequest, API::URLResponse creation functions should return Ref<>
1071         https://bugs.webkit.org/show_bug.cgi?id=144224
1072
1073         Reviewed by Darin Adler.
1074
1075         Have API::URLRequest and API::URLResponse creation functions return Ref<>.
1076         The call-sites are also updated, using and operating on the returned Ref<> object
1077         where possible.
1078
1079         * Shared/API/APIURLRequest.h:
1080         (API::URLRequest::create):
1081         * Shared/API/APIURLResponse.h:
1082         (API::URLResponse::create):
1083         * Shared/API/c/WKURLRequest.cpp:
1084         (WKURLRequestCreateWithWKURL):
1085         * Shared/API/c/mac/WKURLRequestNS.mm:
1086         (WKURLRequestCreateWithNSURLRequest):
1087         * Shared/API/c/mac/WKURLResponseNS.mm:
1088         (WKURLResponseCreateWithNSURLResponse):
1089         * UIProcess/API/C/WKContext.cpp:
1090         (WKContextSetDownloadClient):
1091         * UIProcess/API/C/WKDownload.cpp:
1092         (WKDownloadCopyRequest):
1093         * UIProcess/API/C/WKNavigationDataRef.cpp:
1094         (WKNavigationDataCopyOriginalRequest):
1095         * UIProcess/API/C/WKPage.cpp:
1096         (WKPageSetPagePolicyClient):
1097         (WKPageSetPageUIClient):
1098         * UIProcess/Cocoa/NavigationState.mm:
1099         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1100         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
1101         (WebKit::WebSoupCustomProtocolRequestManagerClient::startLoading):
1102         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1103         (willSendRequestForFrame):
1104         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
1105         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
1106         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
1107         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
1108
1109 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1110
1111         [WK2] API::Point, API::Size, API::Rect creation functions should return Ref<>
1112         https://bugs.webkit.org/show_bug.cgi?id=144223
1113
1114         Reviewed by Darin Adler.
1115
1116         Have API::Point, API::Size and API::Rect creation functions return Ref<>.
1117         Call-sites are also updated, using and operating on the returned Ref<> object
1118         where possible.
1119
1120         * Shared/API/APIGeometry.h:
1121         (API::Size::create):
1122         (API::Point::create):
1123         (API::Rect::create):
1124         * Shared/API/c/WKGeometry.cpp:
1125         (WKPointCreate):
1126         (WKSizeCreate):
1127         (WKRectCreate):
1128
1129 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1130
1131         [WK2] API::Error creation functions should return Ref<>
1132         https://bugs.webkit.org/show_bug.cgi?id=144222
1133
1134         Reviewed by Darin Adler.
1135
1136         Have API::Error creation functions return Ref<>.
1137         The call-sites are also updated, using and operating
1138         on the returned Ref<> object where possible.
1139
1140         * Shared/API/APIError.h:
1141         (API::Error::create):
1142         * Shared/API/c/cf/WKErrorCF.cpp:
1143         (WKErrorCreateWithCFError):
1144         * UIProcess/API/C/WKOriginDataManager.cpp:
1145         (WKOriginDataManagerDeleteEntriesForOrigin):
1146         (WKOriginDataManagerDeleteEntriesModifiedBetweenDates):
1147         (WKOriginDataManagerDeleteAllEntries):
1148         * UIProcess/API/C/WKPage.cpp:
1149         (toGenericCallbackFunction):
1150         (WKPageForceRepaint):
1151         (WKPageValidateCommand):
1152         (WKPageComputePagesForPrinting):
1153         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
1154         (WKPluginSiteDataManagerClearSiteData):
1155         (WKPluginSiteDataManagerClearAllSiteData):
1156         * UIProcess/GenericCallback.h:
1157         (WebKit::toGenericCallbackFunction):
1158         * UIProcess/WebPageProxy.cpp:
1159         (WebKit::WebPageProxy::printFinishedCallback):
1160
1161 2015-04-27  Sungmann Cho  <sungmann.cho@navercorp.com>
1162
1163         [GTK] Remove unnecessary semicolon from WebKitNotificationProvider.h.
1164         https://bugs.webkit.org/show_bug.cgi?id=144312
1165
1166         Reviewed by Martin Robinson.
1167
1168         No new tests, no behavior change.
1169
1170         * UIProcess/API/gtk/WebKitNotificationProvider.h:
1171
1172 2015-04-27  Brent Fulgham  <bfulgham@apple.com>
1173
1174         PDF action menu fixes
1175         https://bugs.webkit.org/show_bug.cgi?id=144299
1176         <rdar://problem/20702215>
1177
1178         Reviewed by Tim Horton.
1179
1180         Make two corrections to how PDFs are handled:
1181         1. When calculating the view rect for the user's selection, make sure
1182         that we get coordinates for the correct PDF page. The existing code assumed
1183         that the current PDFLayerControler's current page was correct, but this will
1184         not be true if you zoom the PDF out so that several pages are displayed at
1185         once. Each selection keeps track of the page it is referenced against.
1186         
1187         2. Revise the offsets calculated for the TextIndicator to take into account
1188         the font descender (as well as the ascender), and to adjust by the scaled
1189         amount of margin around the selected text.
1190
1191         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1192         (WebKit::PDFPlugin::viewRectForSelection): Use correct page for calculating
1193         the coordinates.
1194         * WebProcess/WebPage/mac/WebPageMac.mm:
1195         (WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin): Include font 'descendant'
1196         and (scaled) margin when adjusting the hit target for the TextIndicator to draw.
1197
1198 2015-04-27  Michael Catanzaro  <mcatanzaro@igalia.com>
1199
1200         Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
1201         https://bugs.webkit.org/show_bug.cgi?id=144193
1202
1203         Reviewed by Darin Adler.
1204
1205         * CMakeLists.txt:
1206
1207 2015-04-24  Jon Honeycutt  <jhoneycutt@apple.com>
1208
1209         Context menus are not reshown after an orientation change
1210
1211         <https://bugs.webkit.org/show_bug.cgi?id=144143>
1212         <rdar://problem/20679931>
1213
1214         Reviewed by Darin Adler.
1215
1216         * UIProcess/ios/WKActionSheet.mm:
1217         (-[WKActionSheet updateSheetPosition]):
1218         Return early if we're still in a rotation, not if the rotation is
1219         complete.
1220
1221 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1222
1223         [WK2] API::Dictionary creation functions should return Ref<>
1224         https://bugs.webkit.org/show_bug.cgi?id=144221
1225
1226         Reviewed by Darin Adler.
1227
1228         Have API::Dictionary creation functions return Ref<>.
1229         The call-sites are also updated, using and operating
1230         on the returned Ref<> object where possible.
1231
1232         * Shared/API/APIDictionary.cpp:
1233         (API::Dictionary::create):
1234         * Shared/API/APIDictionary.h:
1235         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1236         (createEncodedObject):
1237         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
1238         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
1239         * Shared/API/c/WKDictionary.cpp:
1240         (WKDictionaryCreate):
1241         * Shared/API/c/WKMutableDictionary.cpp:
1242         (WKMutableDictionaryCreate):
1243         * Shared/Plugins/Netscape/PluginInformation.cpp:
1244         (WebKit::createPluginInformationDictionary):
1245         * Shared/Plugins/Netscape/PluginInformation.h:
1246         * UIProcess/API/C/WKPage.cpp:
1247         (WKPageSetPageUIClient):
1248         * UIProcess/API/gtk/WebKitWebContext.cpp:
1249         (webkit_web_context_prefetch_dns):
1250         * UIProcess/API/gtk/WebKitWebView.cpp:
1251         (webkit_web_view_get_snapshot):
1252         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
1253         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
1254         * UIProcess/Plugins/PlugInAutoStartProvider.h:
1255         * UIProcess/StatisticsRequest.cpp:
1256         (WebKit::createDictionaryFromHashMap):
1257         (WebKit::StatisticsRequest::completedRequest):
1258         * UIProcess/WebFormClient.cpp:
1259         (WebKit::WebFormClient::willSubmitForm):
1260         * UIProcess/WebPageProxy.cpp:
1261         (WebKit::WebPageProxy::didFailToInitializePlugin):
1262         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1263         (didInitiateLoadForResource):
1264         (willSendRequestForFrame):
1265         (didReceiveResponseForResource):
1266         (didReceiveContentLengthForResource):
1267         (didFinishLoadForResource):
1268         (didFailLoadForResource):
1269         (webkitWebPageDidReceiveMessage):
1270         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1271         (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
1272         (WebKit::InjectedBundlePageFormClient::willSubmitForm):
1273
1274 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1275
1276         [WK2] API::Data creation functions should return Ref<>
1277         https://bugs.webkit.org/show_bug.cgi?id=144220
1278
1279         Reviewed by Darin Adler.
1280
1281         Have API::Data creation functions return Ref<>.
1282         The call-sites are also updated, using and operating
1283         on the returned Ref<> object where possible.
1284
1285         * Shared/API/APIData.h:
1286         (API::Data::createWithoutCopying):
1287         (API::Data::create):
1288         * Shared/API/c/WKData.cpp:
1289         (WKDataCreate):
1290         * Shared/API/c/mac/WKWebArchive.cpp:
1291         (WKWebArchiveCopyData):
1292         * Shared/API/c/mac/WKWebArchiveResource.cpp:
1293         (WKWebArchiveResourceCopyData):
1294         * Shared/APIWebArchive.h:
1295         * Shared/APIWebArchive.mm:
1296         (API::WebArchive::data):
1297         * Shared/APIWebArchiveResource.h:
1298         * Shared/APIWebArchiveResource.mm:
1299         (API::WebArchiveResource::data):
1300         * Shared/Cocoa/APIDataCocoa.mm:
1301         (API::Data::createWithoutCopying):
1302         * UIProcess/API/Cocoa/WKWebView.mm:
1303         (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
1304         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
1305         (webkitURISchemeRequestReadCallback):
1306         * UIProcess/API/gtk/WebKitWebView.cpp:
1307         (webkit_web_view_load_bytes):
1308         * UIProcess/Downloads/DownloadProxy.cpp:
1309         (WebKit::createData):
1310         * UIProcess/WebPageProxy.cpp:
1311         (WebKit::WebPageProxy::dataCallback):
1312         (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder):
1313
1314 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1315
1316         [WK2] API::URL creation functions should return Ref<>
1317         https://bugs.webkit.org/show_bug.cgi?id=144219
1318
1319         Reviewed by Darin Adler.
1320
1321         Have API::URL creation functions return Ref<>.
1322         The call-sites are also updated, using and operating in the
1323         returned Ref<> object, where possible.
1324
1325         * Shared/API/APIURL.h:
1326         (API::URL::create):
1327         * Shared/API/c/WKSharedAPICast.h:
1328         (WebKit::toCopiedURLAPI):
1329         * Shared/API/c/WKURL.cpp:
1330         (WKURLCreateWithUTF8CString):
1331         (WKURLCreateWithBaseURL):
1332         * UIProcess/API/gtk/WebKitWebResource.cpp:
1333         (webkit_web_resource_get_data):
1334         * UIProcess/WebIconDatabase.cpp:
1335         (WebKit::WebIconDatabase::didChangeIconForPageURL):
1336         (WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):
1337         * WebProcess/WebPage/WebPage.cpp:
1338         (WebKit::WebPage::userAgent):
1339
1340 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1341
1342         [WK2] API::String creation functions should return Ref<>
1343         https://bugs.webkit.org/show_bug.cgi?id=144218
1344
1345         Reviewed by Darin Adler.
1346
1347         Have API::String creation functions return Ref<>.
1348         The call-sites are also updated, using and operating on the returned
1349         Ref<> object, where possible.
1350
1351         * Shared/API/APIString.h:
1352         * Shared/API/c/WKPluginInformation.cpp:
1353         (WKPluginInformationBundleIdentifierKey):
1354         (WKPluginInformationBundleVersionKey):
1355         (WKPluginInformationBundleShortVersionKey):
1356         (WKPluginInformationPathKey):
1357         (WKPluginInformationDisplayNameKey):
1358         (WKPluginInformationDefaultLoadPolicyKey):
1359         (WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
1360         (WKPluginInformationHasSandboxProfileKey):
1361         (WKPluginInformationFrameURLKey):
1362         (WKPluginInformationMIMETypeKey):
1363         (WKPluginInformationPageURLKey):
1364         (WKPluginInformationPluginspageAttributeURLKey):
1365         (WKPluginInformationPluginURLKey):
1366         (WKPlugInInformationReplacementObscuredKey):
1367         * Shared/API/c/WKSharedAPICast.h:
1368         (WebKit::ProxyingRefPtr::ProxyingRefPtr):
1369         (WebKit::toCopiedAPI):
1370         * Shared/API/c/WKString.cpp:
1371         (WKStringCreateWithUTF8CString):
1372         (WKStringCreateWithJSString):
1373         * UIProcess/API/C/WKDatabaseManager.cpp:
1374         (WKDatabaseManagerGetOriginKey):
1375         (WKDatabaseManagerGetOriginQuotaKey):
1376         (WKDatabaseManagerGetOriginUsageKey):
1377         (WKDatabaseManagerGetDatabaseDetailsKey):
1378         (WKDatabaseManagerGetDatabaseDetailsNameKey):
1379         (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
1380         (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
1381         (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
1382         (WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
1383         (WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
1384         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1385         (WKKeyValueStorageManagerGetOriginKey):
1386         (WKKeyValueStorageManagerGetCreationTimeKey):
1387         (WKKeyValueStorageManagerGetModificationTimeKey):
1388         * UIProcess/API/C/WKPage.cpp:
1389         (WKPageGetSessionHistoryURLValueType):
1390         (WKPageGetSessionBackForwardListItemValueType):
1391         (toGenericCallbackFunction):
1392         (WKPageValidateCommand):
1393         * UIProcess/WebProcessPool.cpp:
1394         (WebKit::WebProcessPool::didReceiveInvalidMessage):
1395
1396 2015-04-27  Brady Eidson  <beidson@apple.com>
1397
1398         Make 'enum NavigationType' be an enum class
1399         https://bugs.webkit.org/show_bug.cgi?id=144270
1400
1401         Reviewed by Alex Christensen.
1402
1403         * Shared/API/c/WKSharedAPICast.h:
1404         (WebKit::toAPI):
1405         
1406         * Shared/NavigationActionData.cpp:
1407         (WebKit::NavigationActionData::NavigationActionData):
1408         
1409         * UIProcess/API/Cocoa/WKNavigationAction.mm:
1410         (toWKNavigationType):
1411         
1412         * UIProcess/API/gtk/WebKitPrivate.cpp:
1413         (toWebKitNavigationType):
1414         
1415         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1416         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1417         
1418         * WebProcess/WebPage/WebInspector.cpp:
1419         (WebKit::WebInspector::openInNewTab):
1420
1421 2015-04-27  Brent Fulgham  <bfulgham@apple.com>
1422
1423         REGRESSION(r182879): Images and video can no longer be downloaded
1424         https://bugs.webkit.org/show_bug.cgi?id=144267
1425         <rdar://problem/20702844>
1426
1427         Reviewed by Simon Fraser.
1428
1429         * UIProcess/mac/WKActionMenuController.mm:
1430         (-[WKActionMenuController _createActionMenuItemForTag:]): Check for
1431         "!WebCore::protocolIs(..., "file")" for image and media downloads.
1432
1433 2015-04-27  Csaba Osztrogonác  <ossy@webkit.org>
1434
1435         [EFL] TestWebKitAPI's forwarding header generator should depend on WebKit2's generator
1436         https://bugs.webkit.org/show_bug.cgi?id=143874
1437
1438         Reviewed by Gyuyoung Kim.
1439
1440         * PlatformEfl.cmake: Rename the generator to have consistent name with other generators.
1441         * Scripts/generate-forwarding-headers.pl: Removed the unnecessary multiple include-path support.
1442
1443 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1444
1445         [SOUP] Add initial implementation of NetworkProcess disk cache
1446         https://bugs.webkit.org/show_bug.cgi?id=143872
1447
1448         Reviewed by Martin Robinson.
1449
1450         Implement the platform specific parts of the disk cache
1451         implementation for Soup. It's mainly NetworkCache::Data and
1452         NetworkCache::IOChannel.
1453
1454         * CMakeLists.txt:
1455         * NetworkProcess/cache/NetworkCache.cpp:
1456         (WebKit::NetworkCache::dumpFileChanged):
1457         (WebKit::NetworkCache::Cache::initialize):
1458         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
1459         * NetworkProcess/cache/NetworkCacheData.h:
1460         (WebKit::NetworkCache::Data::soupBuffer):
1461         * NetworkProcess/cache/NetworkCacheDataSoup.cpp: Added.
1462         (WebKit::NetworkCache::Data::Data):
1463         (WebKit::NetworkCache::Data::empty):
1464         (WebKit::NetworkCache::Data::data):
1465         (WebKit::NetworkCache::Data::isNull):
1466         (WebKit::NetworkCache::Data::apply):
1467         (WebKit::NetworkCache::Data::subrange):
1468         (WebKit::NetworkCache::concatenate):
1469         (WebKit::NetworkCache::MapWrapper::~MapWrapper):
1470         (WebKit::NetworkCache::deleteMapWrapper):
1471         (WebKit::NetworkCache::mapFile):
1472         (WebKit::NetworkCache::Data::adoptMap):
1473         (WebKit::NetworkCache::computeSHA1):
1474         (WebKit::NetworkCache::bytesEqual):
1475         * NetworkProcess/cache/NetworkCacheIOChannel.h:
1476         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp: Added.
1477         (WebKit::NetworkCache::IOChannel::IOChannel):
1478         (WebKit::NetworkCache::IOChannel::open):
1479         (WebKit::NetworkCache::fillDataFromReadBuffer):
1480         (WebKit::NetworkCache::inputStreamReadReadyCallback):
1481         (WebKit::NetworkCache::IOChannel::read):
1482         (WebKit::NetworkCache::IOChannel::readSync):
1483         (WebKit::NetworkCache::outputStreamWriteReadyCallback):
1484         (WebKit::NetworkCache::IOChannel::write):
1485         * NetworkProcess/cache/NetworkCacheStorageSoup.cpp: Removed.
1486         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
1487         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1488         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1489         (WebKit::NetworkProcess::platformSetCacheModel):
1490         (WebKit::NetworkProcess::clearDiskCache):
1491         * PlatformGTK.cmake:
1492
1493 2015-04-26  Yusuke Suzuki  <utatane.tea@gmail.com>
1494
1495         [ES6] Implement ES6 template literals
1496         https://bugs.webkit.org/show_bug.cgi?id=142691
1497
1498         Reviewed by Darin Adler.
1499
1500         Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
1501
1502         * Configurations/FeatureDefines.xcconfig:
1503
1504 2015-04-26  Sungmann Cho  <sungmann.cho@navercorp.com>
1505
1506         Remove PluginView::renderer().
1507         https://bugs.webkit.org/show_bug.cgi?id=144216
1508
1509         Reviewed by Darin Adler.
1510
1511         Nobody should have to know about the plug-in view's renderer except the plug-in view itself.
1512
1513         No new tests, no behavior change.
1514
1515         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1516         (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
1517         (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
1518         * WebProcess/Plugins/PluginView.cpp:
1519         (WebKit::PluginView::renderer): Deleted.
1520         * WebProcess/Plugins/PluginView.h:
1521
1522 2015-04-26  Doug Russell  <d_russell@apple.com>
1523
1524         AX: richer text change notifications (142719)
1525         https://bugs.webkit.org/show_bug.cgi?id=142719
1526
1527         Reviewed by Darin Adler.
1528
1529         Richer accessibility value change notifications. Introduce AXTextEditType,
1530         postTextStateChangeNotification and postTextReplacementNotification to give assistive
1531         tech apps more reliable context for responding to changes in web content. Also implement
1532         a mechanism to post value changes in password form fields in coalesced ticks to thwart
1533         analyzing the cadence of changes.
1534
1535         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
1536         and an overload of postTextReplacementNotification to give assistive tech apps more
1537         reliable context for responding to changes in web content selection. Also block posting
1538         selection changes on password fields.
1539
1540         * UIProcess/WebEditCommandProxy.cpp:
1541         (WebKit::WebEditCommandProxy::nameForEditAction):
1542
1543 2015-04-26  Dan Bernstein  <mitz@apple.com>
1544
1545         <rdar://problem/20702337> REGRESSION (r182952): Plug-in service fails to load because it links against WebKit2.framework
1546         https://bugs.webkit.org/show_bug.cgi?id=144233
1547
1548         Reviewed by Simon Fraser.
1549
1550         Have the plug-in service link against WebKit.framework rather than WebKit2.framework.
1551
1552         * Configurations/PluginService.32.xcconfig: Removed linker flags for linking against WebKit2
1553         and Foundation from the definition of OTHER_LDFLAGS. Since linking is no longer conditional,
1554         we can just do it in the target’s Link Binary With Libraries build phase.
1555
1556         * Configurations/PluginService.64.xcconfig: Ditto.
1557
1558         * WebKit2.xcodeproj/project.pbxproj: Have Foundation and WebKit listed in the services’ Link
1559         Binariy With Libraries build phases (one service already had WebKit).
1560
1561 2015-04-26  Dan Bernstein  <mitz@apple.com>
1562
1563         Fixed the build.
1564
1565         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1566         (-[WKFileUploadPanel _showDocumentPickerMenu]): Suppressed deprecation warnings around use
1567         of -[UIDocumentMenuViewController _setIgnoreApplicationEntitlementForImport:].
1568
1569 2015-04-25  Tim Horton  <timothy_horton@apple.com>
1570
1571         Further update gesture swipe shadow style
1572         https://bugs.webkit.org/show_bug.cgi?id=144215
1573         <rdar://problem/19295843>
1574
1575         Reviewed by Dan Bernstein.
1576
1577         * Resources/mac/SwipeShadow.png: Removed.
1578         * Resources/mac/SwipeShadow@2x.png: Removed.
1579         * UIProcess/mac/ViewGestureController.h:
1580         * UIProcess/mac/ViewGestureControllerMac.mm:
1581         (WebKit::ViewGestureController::beginSwipeGesture):
1582         * WebKit2.xcodeproj/project.pbxproj:
1583         Use a CAGradientLayer instead of PNGs for the swipe shadow.
1584
1585 2015-04-25  Dan Bernstein  <mitz@apple.com>
1586
1587         WebKit2 part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
1588         https://bugs.webkit.org/show_bug.cgi?id=144201
1589
1590         Reviewed by Darin Adler.
1591
1592         Instead of TBD, we use the high version number to which it corresponds in CFAvailability.h,
1593         9876.5.
1594
1595         * mac/MigrateHeadersFromWebKitLegacy.make: To detect not-yet-available declarations in
1596         headers, look for "9876_5" rather than "TBA".
1597
1598 2015-04-24  Timothy Hatcher  <timothy@apple.com>
1599
1600         Web Inspector: Remove native window dock controls
1601         https://bugs.webkit.org/show_bug.cgi?id=144184
1602
1603         Reviewed by Joseph Pecoraro.
1604
1605         * Resources/DockBottom.pdf: Removed.
1606         * Resources/DockBottomLegacy.pdf: Removed.
1607         * Resources/DockRight.pdf: Removed.
1608         * Resources/DockRightLegacy.pdf: Removed.
1609         * UIProcess/WebInspectorProxy.h:
1610         * UIProcess/mac/WebInspectorProxyMac.mm:
1611         (WebKit::WebInspectorProxy::createInspectorWindow):
1612         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
1613         * WebKit2.xcodeproj/project.pbxproj:
1614
1615 2015-04-25  Martin Robinson  <mrobinson@igalia.com>
1616
1617         Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
1618         https://bugs.webkit.org/show_bug.cgi?id=144182
1619
1620         Reviewed by Simon Fraser.
1621
1622         * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
1623
1624 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
1625
1626         Have the web inspector report accurate memory use for layers with detached backing store
1627         https://bugs.webkit.org/show_bug.cgi?id=144179
1628
1629         Reviewed by Dean Jackson.
1630         
1631         Remote layers can make their backing store volatile, so the backing only contributes
1632         to reported memory use when attached.
1633
1634         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1635
1636 2015-04-24  Andreas Kling  <akling@apple.com>
1637
1638         theverge.com burning 100% CPU on iPad (due to window.screenX/Y)
1639         <https://webkit.org/b/144175>
1640         <rdar://problem/20694585>
1641
1642         Reviewed by Anders Carlsson.
1643
1644         Return an empty window rect on iOS WK2 builds. This avoids sending a synchronous
1645         IPC request to the UI process that would give the same result, but spend way
1646         more time and CPU cycles to do so.
1647
1648         With this change, theverge.com CPU usage goes from 100% to ~20% when idle.
1649
1650         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1651         (WebKit::WebChromeClient::windowRect):
1652
1653 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
1654
1655         TextIndicator for embedded PDFs is slightly offset
1656         https://bugs.webkit.org/show_bug.cgi?id=144172
1657         <rdar://problem/20691304>
1658
1659         Reviewed by Tim Horton.
1660
1661         When I converted the existing DOM Range logic to work with PDFSelections, I omitted the
1662         step where the font ascent was used to adjust the origin used for the TextIndicator. This
1663         patch determines the correct ascent for the range of characters in the selection, and
1664         adjusts the offset by the difference between the ascent and the height of the selection rect.
1665         
1666         Also, since the PDFSelection only supplies the bounding rect for the selection, I calculate
1667         an equivalent text bounding box by insetting the rect by half the size of the ascent.
1668
1669         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1670         (WebKit::PDFPlugin::scaleFactor): Add accessor for PDF scale factor.
1671         * WebProcess/Plugins/PDF/PDFPlugin.h:
1672         * WebProcess/WebPage/mac/WebPageMac.mm:
1673         (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Adjusted to take the
1674         font ascent and scale factor into account.
1675
1676 2015-04-24  David Kilzer  <ddkilzer@apple.com>
1677
1678         REGRESSION (r183293): Fix iOS EWS build by adding SPI declaration for +[UIPeripheralHost visiblePeripheralFrame]
1679
1680         Fixes the following build failures:
1681
1682             WebKit2/UIProcess/ios/WKPDFView.mm:740:45: error: class method '+visiblePeripheralFrame' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
1683                 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
1684                                                         ^~~~~~~~~~~~~~~~~~~~~~
1685             WebKit2/UIProcess/ios/WKPDFView.mm:740:12: error: no viable conversion from 'id' to 'CGRect'
1686                 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
1687                        ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1688
1689         * Platform/spi/ios/UIKitSPI.h:
1690         (+[UIPeripheralHost visiblePeripheralFrame]): Add declaration.
1691
1692 2015-04-24  Anders Carlsson  <andersca@apple.com>
1693
1694         Change _WKWebsiteDataStore to hold on to an internal WKWebsiteDataStore
1695         https://bugs.webkit.org/show_bug.cgi?id=144171
1696
1697         Reviewed by Tim Horton.
1698
1699         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1700         (-[WKWebViewConfiguration _websiteDataStore]):
1701         (-[WKWebViewConfiguration _setWebsiteDataStore:]):
1702         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1703         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1704         (-[_WKWebsiteDataStore initWithDataStore:]):
1705         (+[_WKWebsiteDataStore defaultDataStore]):
1706         (+[_WKWebsiteDataStore nonPersistentDataStore]):
1707         (-[_WKWebsiteDataStore isNonPersistent]):
1708         (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1709         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1710         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1711         * UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
1712         * WebKit2.xcodeproj/project.pbxproj:
1713
1714 2015-04-24  Tim Horton  <timothy_horton@apple.com>
1715
1716         WKPDFView does not support password-protected PDFs
1717         https://bugs.webkit.org/show_bug.cgi?id=144162
1718         <rdar://problem/18411512>
1719
1720         Reviewed by Andy Estes.
1721
1722         * Platform/spi/ios/UIKitSPI.h:
1723         Add some SPI.
1724
1725         * UIProcess/ios/WKPDFView.h:
1726         * UIProcess/ios/WKPDFView.mm:
1727         (-[WKPDFView _didLoadPDFDocument]):
1728         (-[WKPDFView web_setContentProviderData:suggestedFilename:]):
1729         Move creation of the UIPDFDocument (only possible if the CGPDFDocument is unlocked)
1730         and initial setup of the page views out into _didLoadPDFDocument.
1731
1732         If the CGPDFDocument is locked, we'll show some UI to unlock it; otherwise
1733         we'll continue on to _didLoadPDFDocument as previously.
1734
1735         (-[WKPDFView web_setMinimumSize:]):
1736         Resize the password UI instead of the PDF pages if we have it.
1737
1738         (-[WKPDFView _computePageAndDocumentFrames]):
1739         Don't bother doing any work revalidating PDF pages if the document is locked.
1740
1741         (-[WKPDFView _updatePasswordEntryField]):
1742         Make sure that the UIDocumentPassword view is always the size of the scrollview.
1743         This takes care of rotation.
1744
1745         (-[WKPDFView _keyboardDidShow:]):
1746         Make sure that we scroll the password field around, if necessary, to keep it
1747         on screen when editing begins.
1748
1749         (-[WKPDFView _showPasswordEntryField]):
1750         (-[WKPDFView _hidePasswordEntryField]):
1751         Adjust the background color (to match the UIDocumentPasswordView) and disable zooming
1752         while it's up. The UIDocumentPassword view is installed into the scroll view
1753         to match UIWebView behavior.
1754
1755         (-[WKPDFView userDidEnterPassword:forPasswordView:]):
1756         (-[WKPDFView didBeginEditingPassword:inView:]):
1757         (-[WKPDFView didEndEditingPassword:inView:]):
1758         (-[WKPDFView _didFailToUnlock]):
1759         Pop up a dialog informing the user that they entered the wrong password.
1760
1761         (-[WKPDFView _tryToUnlockWithPassword:]):
1762         Try to unlock the document. If it succeeds, hide the unlock UI and go back to
1763         _didLoadPDFDocument.
1764
1765 2015-04-24  Commit Queue  <commit-queue@webkit.org>
1766
1767         Unreviewed, rolling out r183266.
1768         https://bugs.webkit.org/show_bug.cgi?id=144164
1769
1770         Broke 32-bit build and a test. (Requested by ap on #webkit).
1771
1772         Reverted changeset:
1773
1774         "AX: richer text change notifications (142719)"
1775         https://bugs.webkit.org/show_bug.cgi?id=142719
1776         http://trac.webkit.org/changeset/183266
1777
1778 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
1779
1780         REGRESSION: WebKit2.ActionMenusTest API test fails
1781         https://bugs.webkit.org/show_bug.cgi?id=144149
1782         <rdar://problem/20677770>
1783
1784         Reviewed by Tim Horton.
1785
1786         Tested by TestWebKitAPI 
1787
1788         The 'lookupTextAtLocation' method was not converting the NSEvent coordinates it
1789         was receiving from root view to the plugin view. Consequently, full page PDFs
1790         did hit testing correctly, but an <embed> PDF would not.
1791
1792         Since 'existingSelectionContainsPoint' is exposed as API, I also modified it to
1793         expect 'root view' coordinates and perform the requisite conversions, rather
1794         than expecting 'plugin view' coordinates.
1795
1796         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1797         (WebKit::PDFPlugin::existingSelectionContainsPoint): Expect 'root view' coordinates
1798         for the input.
1799         (WebKit::PDFPlugin::lookupTextAtLocation): Properly convert the passed 'root view'
1800         coordinates to the PDF's view coordinate space.
1801         * WebProcess/WebPage/mac/WebPageMac.mm:
1802         (WebKit::WebPage::performActionMenuHitTestAtLocation): Pass hit point using view coordinates,
1803         not content coordinates.
1804
1805 2015-04-24  Anders Carlsson  <andersca@apple.com>
1806
1807         Address a review comment from Joe Pecoraro.
1808
1809         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1810
1811 2015-04-24  Anders Carlsson  <andersca@apple.com>
1812
1813         Rename -[WKWebsiteDataStore isNonPersistent] to -[WKWebsiteDataStore isPersistent]
1814         https://bugs.webkit.org/show_bug.cgi?id=144158
1815
1816         Reviewed by Beth Dakin.
1817
1818         * UIProcess/API/APIWebsiteDataStore.cpp:
1819         (API::WebsiteDataStore::isPersistent):
1820         (API::WebsiteDataStore::isNonPersistent): Deleted.
1821         * UIProcess/API/APIWebsiteDataStore.h:
1822         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1823         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1824         (-[WKWebsiteDataStore isPersistent]):
1825         (-[WKWebsiteDataStore isNonPersistent]): Deleted.
1826         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1827         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1828         (-[_WKWebsiteDataStore isNonPersistent]):
1829         * UIProcess/WebsiteData/WebsiteDataStore.h:
1830
1831 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
1832
1833         Immediate action not functional for embedded PDFs
1834         https://bugs.webkit.org/show_bug.cgi?id=143952
1835         <rdar://problem/19842365>        
1836
1837         Reviewed by Tim Horton.
1838
1839         Add a new method to retrieve appropriate dictionary lookup content and update the
1840         hit test result with relevant dictionary content and the bounding rect of the
1841         selection.
1842
1843         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add stub.
1844         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Initialize plugin type.
1845         * WebProcess/Plugins/PDF/PDFPlugin.h:
1846         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1847         (WebKit::rectInWindowSpaceForRectInLayoutSpace): New helper function to
1848         convert PDF 'in page' units to the equivalent view units.
1849         (WebKit::PDFPlugin::PDFPlugin): Initialize plugin type.
1850         (WebKit::PDFPlugin::viewRectForSelection): Query a provided PDFSelection for
1851         its bounding rect and return the result in view units.
1852         * WebProcess/Plugins/Plugin.h:
1853         * WebProcess/Plugins/PluginProxy.cpp: Initialize plugin type.
1854         * WebProcess/Plugins/PluginProxy.h: Add stub.
1855         * WebProcess/Plugins/PluginView.cpp: 
1856         (WebKit::PluginView::viewRectForSelection): Added.
1857         * WebProcess/Plugins/PluginView.h:
1858         * WebProcess/WebPage/WebPage.h:
1859         * WebProcess/WebPage/mac/WebPageMac.mm:
1860         (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Added.
1861         (WebKit::textIndicatorTransitionForActionMenu): Added helper function.
1862         (WebKit::WebPage::performActionMenuHitTestAtLocation): Update the hit test information
1863         with relevant dictionary lookup content, and mark the result as a text node (if
1864         appropriate).
1865
1866 2015-04-24  Jer Noble  <jer.noble@apple.com>
1867
1868         [WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state actually changed.
1869         https://bugs.webkit.org/show_bug.cgi?id=144153
1870
1871         Reviewed by Alexey Proskuryakov.
1872
1873         Check the old state vs. the new state and only issue the change notification if the IsPlayingAudio state changed.
1874
1875         * UIProcess/WebPageProxy.cpp:
1876         (WebKit::WebPageProxy::isPlayingMediaDidChange):
1877
1878 2015-04-24  Antti Koivisto  <antti@apple.com>
1879
1880         CrashTracer: [USER] com.apple.WebKit.Networking at com.apple.WebKit: WebKit::NetworkResourceLoader::~NetworkResourceLoader + 14
1881         https://bugs.webkit.org/show_bug.cgi?id=144147
1882
1883         Reviewed by Chris Dumez.
1884
1885         Storage::storeBodyAsBlob copies the std::function callback for handling mapped bodies in a thread.
1886         This is thread safe only if the function copy is thread safe. It is currently not as we are capturing
1887         RefPtr<NetworkResourceLoader> and NetworkResourceLoader doesn't use thread safe refcounting.
1888
1889         Fix by avoiding copying of the callback. Use same apporach for WriteOperation as we already use for
1890         ReadOperation: count the active operations in progress and delete WriteOperation when everything is
1891         finished. This way we don't need to copy the function out from WriteOperation.
1892
1893         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1894         (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
1895         (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
1896
1897             Move definition here from the header.
1898
1899         (WebKit::NetworkCache::Storage::~Storage):
1900         (WebKit::NetworkCache::Storage::storeBodyAsBlob):
1901
1902             Increment the operation count when storing a blob, call finishWriteOperation when done.
1903
1904         (WebKit::NetworkCache::Storage::dispatchReadOperation):
1905         (WebKit::NetworkCache::Storage::finishReadOperation):
1906
1907             Count active operations instead of finished operations. This makes the code clearer.
1908
1909         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
1910         (WebKit::NetworkCache::Storage::finishWriteOperation):
1911
1912             Mirror the way ReadOperations work.
1913
1914         * NetworkProcess/cache/NetworkCacheStorage.h:
1915         (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation): Deleted.
1916
1917 2015-04-24  Timothy Hatcher  <timothy@apple.com>
1918
1919         REGRESSION: Web Inspector: Start Timeline Recording in Develop menu broken
1920         https://bugs.webkit.org/show_bug.cgi?id=144150
1921
1922         Reviewed by Brian Burg.
1923
1924         * WebProcess/WebPage/WebInspectorUI.cpp:
1925         (WebKit::WebInspectorUI::evaluateCommandOnLoad): Properly treat bools as literals
1926         instead of strings by not using the string version of evaluateCommandOnLoad.
1927
1928 2015-04-23  Anders Carlsson  <andersca@apple.com>
1929
1930         Add headerdocs for WKWebsiteDataRecord and WKWebsiteDataStore
1931         https://bugs.webkit.org/show_bug.cgi?id=144138
1932
1933         Reviewed by Darin Adler.
1934
1935         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1936         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1937         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1938         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1939         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1940         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1941
1942 2015-04-24  Doug Russell  <d_russell@apple.com>
1943
1944         AX: richer text change notifications (142719)
1945         https://bugs.webkit.org/show_bug.cgi?id=142719
1946
1947         Reviewed by Darin Adler.
1948
1949         Richer accessibility value change notifications. Introduce AXTextEditType, postTextStateChangeNotification and postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content. Also implement a mechanism to post value changes in password form fields in coalesced ticks to thwart analyzing the cadence of changes.
1950
1951         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent, and an overload of postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content selection. Also block posting selection changes on password fields.
1952
1953         * UIProcess/WebEditCommandProxy.cpp:
1954         (WebKit::WebEditCommandProxy::nameForEditAction):
1955
1956 2015-04-24  Darin Adler  <darin@apple.com>
1957
1958         Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
1959         https://bugs.webkit.org/show_bug.cgi?id=128007
1960
1961         Reviewed by Anders Carlsson.
1962
1963         * NetworkProcess/cache/NetworkCacheEncoder.h: Added an include now
1964         needed that was inherited from OwnPtr.h before.
1965
1966 2015-04-24  Antti Koivisto  <antti@apple.com>
1967
1968         Network Cache: Make path functions members
1969         https://bugs.webkit.org/show_bug.cgi?id=144146
1970
1971         Reviewed by Carlos Garcia Campos.
1972
1973         This simplifies the code.
1974
1975         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1976         (WebKit::NetworkCache::Storage::partitionPathForKey):
1977         (WebKit::NetworkCache::Storage::recordPathForKey):
1978         (WebKit::NetworkCache::Storage::bodyPathForKey):
1979         (WebKit::NetworkCache::Storage::storeBodyAsBlob):
1980         (WebKit::NetworkCache::Storage::remove):
1981         (WebKit::NetworkCache::Storage::dispatchReadOperation):
1982         (WebKit::NetworkCache::Storage::finishReadOperation):
1983         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
1984         (WebKit::NetworkCache::partitionPathForKey): Deleted.
1985         (WebKit::NetworkCache::recordPathForKey): Deleted.
1986         (WebKit::NetworkCache::bodyPathForKey): Deleted.
1987         * NetworkProcess/cache/NetworkCacheStorage.h:
1988
1989 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1990
1991         Unreviewed. Remove incorrect assert after r183189.
1992
1993         In this case the assert was already there, but it's incorrect
1994         because we are handling uninitialized attachments below in the
1995         same function, and also when sending messages. So, if it's ok to
1996         send uninitialized attachments, it's ok to receive them. This
1997         didn't fail before r183189, because we were only invaliding the
1998         attachments by setting the file descriptor to -1, and they were
1999         handled as null attachments. After r183189, the move operator
2000         resets the moved attachment leaving it uninitialized again.
2001
2002         * Platform/IPC/unix/ConnectionUnix.cpp:
2003         (IPC::Connection::processMessage):
2004
2005 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2006
2007         [SOUP] Use a webkit subdirectory for the disk cache
2008         https://bugs.webkit.org/show_bug.cgi?id=144048
2009
2010         Reviewed by Martin Robinson.
2011
2012         Recent versions of libsoup remove any file in cache dir not
2013         referenced by the index when the cache is loaded to workaround
2014         leaked resources when load/dump is unbalanced for whatever reason,
2015         like a crash. We currently use $XDG_CACHE_HOME/app-name as default
2016         disk cache directory, but that directory could be used by apps to
2017         cache other things, and the soup cache might end up deleting other
2018         stuff. The soup cache assumes the given directory is only for the
2019         disk cache, so we should ensure that.
2020
2021         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2022         (WebKit::NetworkProcess::platformInitializeNetworkProcess): Append
2023         webkit to the given disk cache and clear the previous soup cache if it exists.
2024         * WebProcess/soup/WebProcessSoup.cpp:
2025         (WebKit::WebProcess::platformInitializeWebProcess): Ditto.
2026
2027 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2028
2029         Unreviewed. Remove incorrect ASSERT added in r183176.
2030
2031         We allow to encode null attachments.
2032
2033         * Platform/unix/SharedMemoryUnix.cpp:
2034         (WebKit::SharedMemory::Handle::releaseAttachment):
2035
2036 2015-04-23  Dan Bernstein  <mitz@apple.com>
2037
2038         <rdar://problem/20680694> Framework header postprocessing isn’t removing WK_DEPRECATED macros when it should.
2039
2040         Reviewed by Andy Estes.
2041
2042         * mac/postprocess-framework-headers.sh:
2043
2044 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
2045
2046         Make it possible to detach GraphicsLayerCA backing store
2047         https://bugs.webkit.org/show_bug.cgi?id=144140
2048
2049         Reviewed by Tim Horton.
2050         
2051         This changes makes it possible to denote a GraphicsLayerCA's backing store
2052         as "attached" or not. When not attached, the backing store is made volatile
2053         and can be purged. This will be used in a future patch.
2054
2055         * Shared/mac/RemoteLayerBackingStore.mm:
2056         (WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore): Whitespace.
2057         (WebKit::RemoteLayerBackingStore::display): If backingStoreWillBeDisplayed()
2058         returns true, this indicates that the backing store was brought out of the
2059         "unreachable" list, so return true even if the backing store doesn't require
2060         painting.
2061         * Shared/mac/RemoteLayerBackingStoreCollection.h: C++11 initializer, and comments.
2062         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
2063         (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
2064         (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed): Return true
2065         if the caller will need to submit the backing store in the current transaction.
2066         (WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable): This
2067         explicit dirtying is no longer necessary given the backingStoreWillBeDisplayed() change.
2068         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2069         (WebKit::applyPropertiesToLayer): Only set the layer's backing if we both have backing
2070         store, and it's attached.
2071         * Shared/mac/RemoteLayerTreeTransaction.h: New bit, and data member.
2072         * Shared/mac/RemoteLayerTreeTransaction.mm:
2073         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
2074         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
2075         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
2076         (WebKit::dumpChangedLayers):
2077         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2078         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction): Only call display()
2079         on the backing store if it's attached.
2080         (WebKit::PlatformCALayerRemote::setBackingStoreAttached):
2081         (WebKit::PlatformCALayerRemote::backingStoreAttached):
2082         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2083         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
2084         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
2085         (WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):
2086
2087 2015-04-23  Tim Horton  <timothy_horton@apple.com>
2088
2089         Quick Look preview popover is not dismissed on scroll in Mail
2090         https://bugs.webkit.org/show_bug.cgi?id=144119
2091         <rdar://problem/19752045>
2092
2093         Reviewed by Anders Carlsson.
2094
2095         * UIProcess/API/mac/WKView.mm:
2096         (-[WKView renewGState]):
2097         If we have a TextIndicator, dismiss all content relative child windows
2098         on renewGState, not just the TextIndicator itself.
2099
2100         This will fix cases like Mail, where WebKit isn't driving the scrolling,
2101         and we have no way (except renewGState) to know that scrolling is happening.
2102
2103 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
2104
2105         Changing TiledBacking velocity should schedule a tile revalidation
2106         https://bugs.webkit.org/show_bug.cgi?id=144123
2107
2108         Reviewed by Tim Horton.
2109         
2110         Drive-by fix: use the FrameView& that we have already.
2111
2112         * WebProcess/WebPage/ios/WebPageIOS.mm:
2113         (WebKit::WebPage::updateVisibleContentRects):
2114
2115 2015-04-23  Jer Noble  <jer.noble@apple.com>
2116
2117         [Mac] Disable QTKit by default on future OS X.
2118         https://bugs.webkit.org/show_bug.cgi?id=144082
2119
2120         Reviewed by Darin Adler.
2121
2122         QTKitEnabled defaults to false.
2123
2124         * Shared/WebPreferencesDefinitions.h:
2125
2126 2015-04-23  Jer Noble  <jer.noble@apple.com>
2127
2128         [WK2][Mac] Tweak the timing curve of the WebKit Fullscreen animation
2129         https://bugs.webkit.org/show_bug.cgi?id=144120
2130
2131         Reviewed by Eric Carlson.
2132
2133         Tweak the curve to ease-in faster when the fullscreen animation duration is short.
2134
2135         * UIProcess/mac/WKFullScreenWindowController.mm:
2136         (timingFunctionForDuration):
2137         (zoomAnimation):
2138         (maskAnimation):
2139         (fadeAnimation):
2140
2141 2015-04-23  Enrica Casucci  <enrica@apple.com>
2142
2143         iOS build fix after r183208.
2144
2145         Unreviewed.
2146
2147         * UIProcess/ios/WKContentViewInteraction.mm:
2148
2149 2015-04-22  Alexey Proskuryakov  <ap@apple.com>
2150
2151         [iOS] WebKit services should inherit environment variables for home
2152         https://bugs.webkit.org/show_bug.cgi?id=144078
2153         rdar://problem/20571678
2154
2155         Reviewed by Dan Bernstein.
2156
2157         Pass current environment variables as XPC bootstrap. Also while at it, made
2158         _CFBundleSetupXPCBootstrap not soft linked.
2159
2160         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
2161         (main):
2162         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2163         (WebKit::connectToService):
2164
2165 2015-04-23  Enrica Casucci  <enrica@apple.com>
2166
2167         Support share button.
2168         https://bugs.webkit.org/show_bug.cgi?id=144077
2169         rdar://problem/19772892
2170
2171         Reviewed by Darin Adler.
2172
2173         * UIProcess/ios/WKContentViewInteraction.mm:
2174         (-[WKContentView _share:]):
2175         (-[WKContentView canPerformAction:withSender:]):
2176         (-[WKContentView _define:]):
2177         (-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
2178         (-[WKContentView moveByOffset:]):
2179         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
2180         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
2181         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
2182         (-[WKContentView accessoryTab:]):
2183         (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
2184         (-[WKContentView executeEditCommandWithCallback:]):
2185
2186 2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2187
2188         [UNIX] Do not allow copies of IPC::Attachment
2189         https://bugs.webkit.org/show_bug.cgi?id=144096
2190
2191         Reviewed by Darin Adler.
2192
2193         It ensures that the file descriptor ownership is always correctly
2194         transferred. This way we can remove the dispose() method to
2195         explicitly close the file descriptor and always close it in the
2196         Attachment destructor (unless explicitly transferred to
2197         IPC::Connection or SharedMemory). It simplifies the code and
2198         ensure we don't leak file descriptors.
2199
2200         * Platform/IPC/ArgumentDecoder.cpp:
2201         (IPC::ArgumentDecoder::~ArgumentDecoder): Remove the code to
2202         explicitly dispose attachments.
2203         (IPC::ArgumentDecoder::removeAttachment): Use WTF::move().
2204         * Platform/IPC/ArgumentEncoder.cpp:
2205         (IPC::ArgumentEncoder::~ArgumentEncoder): Remove the code to
2206         explicitly dispose attachments.
2207         (IPC::ArgumentEncoder::addAttachment): Use WTF::move().
2208         (IPC::ArgumentEncoder::releaseAttachments): Simplify by using WTF::move().
2209         * Platform/IPC/ArgumentEncoder.h:
2210         * Platform/IPC/Attachment.cpp:
2211         (IPC::Attachment::encode): Move a copy of the attachment, and
2212         reset the file descriptor, since the ownership is passed to the encoder.
2213         * Platform/IPC/Attachment.h: Make copy constructor and assignment
2214         private to not allow public copies. The only copy allowed is done
2215         by Attachment::encode(). Make m_fileDescriptor mutable so that we
2216         can reset it in Attachment::encode() after passing the ownership
2217         to the encoder.
2218         * Platform/IPC/unix/AttachmentUnix.cpp:
2219         (IPC::Attachment::~Attachment): Close the file descriptor if it
2220         hasn't been released explicitly.
2221         (IPC::Attachment::dispose): Deleted.
2222         * Platform/IPC/unix/ConnectionUnix.cpp:
2223         (IPC::Connection::processMessage): Do not use AttachmentResourceGuard.
2224         (IPC::Connection::sendOutgoingMessage): Ditto.
2225         (IPC::AttachmentResourceGuard::AttachmentResourceGuard): Deleted.
2226         (IPC::AttachmentResourceGuard::~AttachmentResourceGuard): Deleted.
2227         * Platform/unix/SharedMemoryUnix.cpp:
2228         (WebKit::SharedMemory::Handle::~Handle): Do not call clear().
2229         (WebKit::SharedMemory::Handle::clear): Reset the attachment.
2230         * UIProcess/WebInspectorProxy.cpp:
2231         (WebKit::WebInspectorProxy::createInspectorPage): Use WTF::move().
2232         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2233         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
2234         Call releaseFileDescriptor() instead of fileDescritpro() since the
2235         ownership is passed to the connection.
2236
2237 2015-04-23  Alexey Proskuryakov  <ap@apple.com>
2238
2239         Build fix.
2240
2241         * WebProcess/cocoa/WebProcessCocoa.mm: Correct the case of an include file name.
2242
2243 2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2244
2245         Unreviewed. Fix debug build after r183176.
2246
2247         * Platform/unix/SharedMemoryUnix.cpp:
2248         (WebKit::SharedMemory::Handle::decode):
2249         (WebKit::SharedMemory::createHandle):
2250
2251 2015-04-23  Andreas Kling  <akling@apple.com>
2252
2253         There should only be one way to get the system memory size.
2254         <https://webkit.org/b/144081>
2255
2256         Reviewed by Antti Koivisto.
2257
2258         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2259         (WebKit::NetworkProcess::platformSetCacheModel):
2260         (WebKit::memorySize): Deleted.
2261         * WebProcess/cocoa/WebProcessCocoa.mm:
2262         (WebKit::WebProcess::platformSetCacheModel):
2263         (WebKit::memorySize): Deleted.
2264
2265 2015-04-23  Chris Dumez  <cdumez@apple.com>
2266
2267         [WK2] WebDiagnosticLoggingClient is leaking
2268         https://bugs.webkit.org/show_bug.cgi?id=144089
2269         <rdar://problem/19706214>
2270
2271         Reviewed by Darin Adler.
2272
2273         WebDiagnosticLoggingClient is leaking. It is constructed inside WebPage
2274         constructor but there is no code destroying it.
2275
2276         This patch adds a new xxxDestroyed() virtual function to
2277         DiagnosticLoggingClient and that is overriden in
2278         WebDiagnosticLoggingClient to call "delete this". This is the same
2279         pattern as for other WK2 clients (e.g. WebFrameLoaderClient,
2280         WebProgressTrackerClient).
2281
2282         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
2283         (WebKit::WebDiagnosticLoggingClient::mainFrameDestroyed):
2284         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
2285
2286 2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2287
2288         [UNIX] Simplify the file descriptor handling in SharedMemory
2289         https://bugs.webkit.org/show_bug.cgi?id=144046
2290
2291         Reviewed by Darin Adler.
2292
2293         Simplify the file descriptor handling and clarify its ownership by
2294         using IPC::Attachment in SharedMemory::Handle instead of fd and
2295         size members. SharedMemory::Handle::adoptFromAttachment() has been
2296         renamed as SharedMemory::Handle::adoptAttachment() and receives an
2297         IPC::Attachment. And SharedMemory::Handle::releaseToAttachment()
2298         has been renamed as SharedMemory::Handle::releaseAttachment().
2299
2300         * Platform/IPC/Attachment.h: Add move constructor and move assigned operator.
2301         * Platform/IPC/Connection.h:
2302         (IPC::Connection::identifierIsNull): A file descriptor is null
2303         when it's -1 no 0.
2304         * Platform/IPC/unix/AttachmentUnix.cpp:
2305         (IPC::Attachment::Attachment):
2306         (IPC::Attachment::operator=):
2307         (IPC::Attachment::dispose): Reset the file descriptor after
2308         closing it.
2309         * Platform/IPC/unix/ConnectionUnix.cpp:
2310         (IPC::Connection::processMessage): Use
2311         SharedMemory::Handle::adoptAttachment() that receives an
2312         IPC::Attachment now.
2313         (IPC::Connection::sendOutgoingMessage): Use
2314         SharedMemory::Handle::releaseAttachment().
2315         * Platform/SharedMemory.h:
2316         * Platform/unix/SharedMemoryUnix.cpp:
2317         (WebKit::SharedMemory::Handle::Handle): Remove initializers for
2318         file descriptor and size members.
2319         (WebKit::SharedMemory::Handle::clear): Dispose the attachment.
2320         (WebKit::SharedMemory::Handle::isNull): Handle is null if the
2321         attachment file descriptor is -1.
2322         (WebKit::SharedMemory::Handle::encode): Use releaseAttachment().
2323         (WebKit::SharedMemory::Handle::decode): Use adoptAttachment().
2324         (WebKit::SharedMemory::Handle::releaseAttachment): Implement it
2325         using move.
2326         (WebKit::SharedMemory::Handle::adoptAttachment): Ditto.
2327         (WebKit::SharedMemory::map): Use
2328         IPC::Attachment::releaseFileDescriptor() instead of manually
2329         changing the member.
2330         (WebKit::SharedMemory::createHandle): Initialize the handle
2331         attachment with the duplicated file descriptor and size.
2332
2333 2015-04-22  Darin Adler  <darin@apple.com>
2334
2335         Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
2336         https://bugs.webkit.org/show_bug.cgi?id=143943
2337
2338         Reviewed by Anders Carlsson.
2339
2340         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
2341         Removed unneeded include.
2342
2343 2015-04-22  Brent Fulgham  <bfulgham@apple.com>
2344
2345         VisibleSelection should only accept Range by reference
2346         https://bugs.webkit.org/show_bug.cgi?id=144047
2347
2348         Reviewed by Tim Horton.
2349
2350         Update all uses of VisibleSelection to pass a Range reference instead
2351         of a Range pointer.
2352
2353         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
2354         (WebKit::InjectedBundleRangeHandle::renderedImage):
2355         * WebProcess/WebPage/FindController.cpp:
2356         (WebKit::FindController::getImageForFindMatch):
2357         (WebKit::FindController::selectFindMatch):
2358         * WebProcess/WebPage/WebPage.cpp:
2359         (WebKit::WebPage::insertTextAsync):
2360         (WebKit::WebPage::setCompositionAsync):
2361         * WebProcess/WebPage/mac/WebPageMac.mm:
2362         (WebKit::WebPage::insertDictatedTextAsync):
2363
2364 2015-04-22  Anders Carlsson  <andersca@apple.com>
2365
2366         Add WK_ARRAY and WK_SET annotations
2367         https://bugs.webkit.org/show_bug.cgi?id=144075
2368         rdar://problem/19417770
2369
2370         Reviewed by Dan Bernstein.
2371
2372         * Shared/API/Cocoa/WKFoundation.h:
2373         * UIProcess/API/Cocoa/WKBackForwardList.h:
2374         * UIProcess/API/Cocoa/WKUserContentController.h:
2375         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
2376         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2377         * mac/postprocess-framework-headers.sh:
2378
2379 2015-04-22  Brent Fulgham  <bfulgham@apple.com>
2380
2381         Unreviewed build fix after r183136.
2382
2383         * WebProcess/WebPage/mac/WebPageMac.mm: Correct capitalization of
2384         'HTMLPluginImageElement.h' -> 'HTMLPlugInImageElement.h'
2385
2386 2015-04-21  Brent Fulgham  <bfulgham@apple.com>
2387
2388         Extend action menus to support PDF
2389         https://bugs.webkit.org/show_bug.cgi?id=143895
2390         <rdar://problem/19003333>
2391
2392         Reviewed by Tim Horton.
2393
2394         If the mouse pointer is over a PDF, try to provide a relevant action menu for whatever
2395         content is under the mouse. For now, we only support copying text and handling URLs.
2396
2397         If no text is selected, use the dictionary lookup service to find a semantically appropriate
2398         selection underneath the mouse. This is consistent with how normal text is treated in pure HTML
2399         views. If some text is already selected, and the mouse is over the existing selection, continue
2400         using the selected text. Otherwise, discard the old selection and select the most appropriate
2401         region under the mouse pointer.
2402
2403         * Shared/API/c/WKActionMenuTypes.h: Add PDF menu option.
2404         * Shared/WebMouseEvent.cpp: Recognize mouse force events as valid mouse events.
2405         * UIProcess/mac/WKActionMenuController.mm:
2406         (-[WKActionMenuController _defaultMenuItemsForPDF]): Add simply copy text option.
2407         (-[WKActionMenuController _defaultMenuItems]): Recognize PDFs and add relevant action
2408         menu entries.
2409         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Provide stub for new method.
2410         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Expose 'rectsForSelectionInLayerSpace',
2411         'rectsForAnnotationInLayoutSpace', 'layout', and 'currentPage'.
2412         * WebProcess/Plugins/PDF/PDFPlugin.h:
2413         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2414         (WebKit::PDFPlugin::getSelectionForWordAtPoint): Added.
2415         (WebKit::PDFPlugin::existingSelectionContainsPoint): Added.
2416         (WebKit::PDFPlugin::lookupTextAtLocation): Added.
2417         * WebProcess/Plugins/Plugin.h: Add declaration for new 'getSelectionForWordAtPoint' method.
2418         * WebProcess/Plugins/PluginProxy.h: Provide stub for new method.
2419         * WebProcess/Plugins/PluginView.cpp:
2420         (WebKit::PluginView::getSelectionForWordAtPoint): Added.
2421         (WebKit::PluginView::existingSelectionContainsPoint): Added.
2422         (WebKit::PluginView::lookupTextAtLocation): Added.
2423         * WebProcess/Plugins/PluginView.h:
2424         * WebProcess/WebPage/mac/WebPageMac.mm:
2425         (WebKit::WebPage::performActionMenuHitTestAtLocation): Update to support PDF documents and retrieve
2426         relevant content to support later action menu handling.
2427
2428 2015-04-22  Eric Carlson  <eric.carlson@apple.com>
2429
2430         Update AirPlay sandbox rules
2431         https://bugs.webkit.org/show_bug.cgi?id=144062
2432         <rdar://problem/19869448>
2433
2434         Reviewed by Alexey Proskuryakov.
2435
2436         * WebProcess/com.apple.WebProcess.sb.in: Remove obsolete rules.
2437
2438 2015-04-22  Alexey Proskuryakov  <ap@apple.com>
2439
2440         [Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
2441         https://bugs.webkit.org/show_bug.cgi?id=144052
2442         rdar://problem/19754404
2443
2444         Reviewed by Darin Adler.
2445
2446         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
2447         (main): Make XPC transaction tracking work again after a re-exec.
2448
2449 2015-04-22  Zan Dobersek  <zdobersek@igalia.com>
2450
2451         [WK2] Have API::Array creation methods return Ref<>
2452         https://bugs.webkit.org/show_bug.cgi?id=143933
2453
2454         Reviewed by Darin Adler.
2455
2456         API::Array::create() and API::Array::createStringArray() should return Ref<> objects
2457         as the return values are never null. It's up to the caller to implicitly convert the
2458         returned objects to RefPtr<> if so required. All the call-sites have been updated to
2459         reflect that.
2460
2461         * Shared/API/APIArray.cpp:
2462         (API::Array::create):
2463         (API::Array::createStringArray):
2464         (API::Array::copy):
2465         * Shared/API/APIArray.h:
2466         * Shared/API/APIDictionary.cpp:
2467         (API::Dictionary::keys):
2468         * Shared/API/APIDictionary.h:
2469         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2470         (ensureObjectStream):
2471         * Shared/API/c/WKArray.cpp:
2472         (WKArrayCreate):
2473         (WKArrayCreateAdoptingValues):
2474         * Shared/API/c/WKContextMenuItem.cpp:
2475         (WKContextMenuCopySubmenuItems):
2476         * Shared/API/c/WKDictionary.cpp:
2477         (WKDictionaryCopyKeys):
2478         * Shared/API/c/WKMutableArray.cpp:
2479         (WKMutableArrayCreate):
2480         * Shared/Cocoa/WKNSDictionary.mm:
2481         (-[WKNSDictionary keyEnumerator]):
2482         * Shared/SecurityOriginData.cpp:
2483         (WebKit::performAPICallbackWithSecurityOriginDataVector):
2484         * Shared/WebContextMenuItem.cpp:
2485         (WebKit::WebContextMenuItem::submenuItemsAsAPIArray):
2486         * Shared/WebContextMenuItem.h:
2487         * Shared/WebOpenPanelParameters.cpp:
2488         (WebKit::WebOpenPanelParameters::acceptMIMETypes):
2489         (WebKit::WebOpenPanelParameters::selectedFileNames):
2490         * Shared/WebOpenPanelParameters.h:
2491         * UIProcess/API/C/WKBackForwardListRef.cpp:
2492         (WKBackForwardListCopyBackListWithLimit):
2493         (WKBackForwardListCopyForwardListWithLimit):
2494         * UIProcess/API/C/WKGrammarDetail.cpp:
2495         (WKGrammarDetailCopyGuesses):
2496         * UIProcess/API/C/WKOpenPanelParameters.cpp:
2497         (WKOpenPanelParametersCopyAcceptedMIMETypes):
2498         (WKOpenPanelParametersCopySelectedFileNames):
2499         * UIProcess/API/C/WKPage.cpp:
2500         (WKPageSetPageContextMenuClient):
2501         (WKPageCopyRelatedPages):
2502         * UIProcess/API/Cocoa/WKBackForwardList.mm:
2503         (-[WKBackForwardList backList]):
2504         (-[WKBackForwardList forwardList]):
2505         * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
2506         (createWKArray):
2507         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2508         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2509         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
2510         (webkit_back_forward_list_get_back_list_with_limit):
2511         (webkit_back_forward_list_get_forward_list_with_limit):
2512         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
2513         (webkit_file_chooser_request_get_mime_types):
2514         (webkit_file_chooser_request_get_mime_types_filter):
2515         (webkit_file_chooser_request_select_files):
2516         * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
2517         (WebKitNotificationProvider::notificationCloseCallback):
2518         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2519         (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
2520         * UIProcess/Notifications/WebNotificationProvider.cpp:
2521         (WebKit::WebNotificationProvider::clearNotifications):
2522         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
2523         (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
2524         * UIProcess/StatisticsRequest.cpp:
2525         (WebKit::StatisticsRequest::completedRequest):
2526         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
2527         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
2528         * UIProcess/WebBackForwardList.cpp:
2529         (WebKit::WebBackForwardList::backList):
2530         (WebKit::WebBackForwardList::forwardList):
2531         (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit):
2532         (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit):
2533         * UIProcess/WebBackForwardList.h:
2534         * UIProcess/WebCookieManagerProxy.cpp:
2535         (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
2536         * UIProcess/WebDatabaseManagerProxy.cpp:
2537         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
2538         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
2539         * UIProcess/WebGrammarDetail.cpp:
2540         (WebKit::WebGrammarDetail::guesses):
2541         * UIProcess/WebGrammarDetail.h:
2542         * UIProcess/WebKeyValueStorageManager.cpp:
2543         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
2544         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
2545         * UIProcess/WebMediaCacheManagerProxy.cpp:
2546         (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
2547         * UIProcess/WebOriginDataManagerProxy.cpp:
2548         (WebKit::WebOriginDataManagerProxy::didGetOrigins):
2549         * UIProcess/WebPageProxy.cpp:
2550         (WebKit::WebPageProxy::didFindStringMatches):
2551         * UIProcess/WebProcessPool.cpp:
2552         (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins):
2553         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2554         (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
2555         (-[WKFileUploadPanel presentWithParameters:resultListener:]):
2556         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
2557         (-[WKWebProcessPlugInFrame childFrames]):
2558         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
2559         (WKBundleBackForwardListItemCopyChildren):
2560         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2561         (WKBundleFrameCopyChildFrames):
2562         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2563         (WKBundlePageCopyTrackedRepaintRects):
2564         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
2565         (WebKit::InjectedBundleBackForwardListItem::children):
2566         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
2567         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
2568         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
2569         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
2570         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
2571         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2572         (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
2573         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2574         (WebKit::findLargestFrameInFrameSet):
2575         * WebProcess/WebPage/WebFrame.cpp:
2576         (WebKit::WebFrame::childFrames):
2577         * WebProcess/WebPage/WebFrame.h:
2578         * WebProcess/WebPage/WebPage.cpp:
2579         (WebKit::WebPage::trackedRepaintRects):
2580         * WebProcess/WebPage/WebPage.h:
2581
2582 2015-04-21  Eric Carlson  <eric.carlson@apple.com>
2583
2584         [Mac] Use one playback target for all web processes
2585         https://bugs.webkit.org/show_bug.cgi?id=144009
2586
2587         Reviewed by Tim Horton.
2588
2589         Every WebPageProxy uses the WebMediaSessionManager singleton to talk to the playback target
2590         picker.
2591
2592         * UIProcess/PageClient.h:
2593         * UIProcess/WebPageProxy.cpp:
2594         (WebKit::WebPageProxy::WebPageProxy):
2595         (WebKit::WebPageProxy::resetState):
2596         (WebKit::WebPageProxy::isPlayingMediaDidChange):
2597         (WebKit::WebPageProxy::addPlaybackTargetPickerClient):
2598         (WebKit::WebPageProxy::removePlaybackTargetPickerClient):
2599         (WebKit::WebPageProxy::showPlaybackTargetPicker):
2600         (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
2601         (WebKit::WebPageProxy::setPlaybackTarget):
2602         (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
2603         (WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
2604         (WebKit::WebPageProxy::devicePickerProxy): Deleted.
2605         (WebKit::WebPageProxy::startingMonitoringPlaybackTargets): Deleted.
2606         (WebKit::WebPageProxy::stopMonitoringPlaybackTargets): Deleted.
2607         (WebKit::WebPageProxy::didChoosePlaybackTarget): Deleted.
2608         * UIProcess/WebPageProxy.h:
2609         (WebKit::WebPageProxy::isPlayingAudio):
2610         * UIProcess/WebPageProxy.messages.in:
2611         * UIProcess/mac/PageClientImpl.h:
2612         * UIProcess/mac/PageClientImpl.mm:
2613         (WebKit::PageClientImpl::mediaSessionManager):
2614         (WebKit::PageClientImpl::createPlaybackTargetPicker): Deleted.
2615         * UIProcess/mac/WebMediaSessionManagerMac.cpp: Added.
2616         (WebKit::WebMediaSessionManagerMac::singleton):
2617         (WebKit::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
2618         (WebKit::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
2619         (WebKit::WebMediaSessionManagerMac::targetPicker):
2620         * UIProcess/mac/WebMediaSessionManagerMac.h: Added.
2621         * WebProcess/Plugins/PluginView.h:
2622         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2623         (WebKit::WebChromeClient::isPlayingMediaDidChange):
2624         (WebKit::WebChromeClient::addPlaybackTargetPickerClient):
2625         (WebKit::WebChromeClient::removePlaybackTargetPickerClient):
2626         (WebKit::WebChromeClient::showPlaybackTargetPicker):
2627         (WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
2628         (WebKit::WebChromeClient::startingMonitoringPlaybackTargets): Deleted.
2629         (WebKit::WebChromeClient::stopMonitoringPlaybackTargets): Deleted.
2630         * WebProcess/WebCoreSupport/WebChromeClient.h:
2631         * WebProcess/WebPage/WebPage.h:
2632         * WebProcess/WebPage/WebPage.messages.in:
2633         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2634         (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
2635         * WebProcess/WebPage/mac/WebPageMac.mm:
2636         (WebKit::WebPage::playbackTargetSelected):
2637         (WebKit::WebPage::playbackTargetAvailabilityDidChange):
2638         (WebKit::WebPage::setShouldPlayToPlaybackTarget):
2639
2640 2015-04-21  Anders Carlsson  <andersca@apple.com>
2641
2642         WKWebsiteDataStore doesn't track and remove IndexedDB databases
2643         https://bugs.webkit.org/show_bug.cgi?id=144032
2644         rdar://problem/20242856
2645
2646         Reviewed by Tim Horton.
2647
2648         * DatabaseProcess/DatabaseProcess.cpp:
2649         (WebKit::DatabaseProcess::fetchWebsiteData):
2650         (WebKit::DatabaseProcess::deleteWebsiteData):
2651         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
2652         * DatabaseProcess/DatabaseProcess.h:
2653         * DatabaseProcess/DatabaseProcess.messages.in:
2654         * Shared/WebsiteData/WebsiteDataTypes.h:
2655         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
2656         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
2657         (dataTypesToString):
2658         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
2659         (WebKit::toWebsiteDataTypes):
2660         (WebKit::toWKWebsiteDataTypes):
2661         * UIProcess/Databases/DatabaseProcessProxy.cpp:
2662         (WebKit::generateCallbackID):
2663         (WebKit::DatabaseProcessProxy::~DatabaseProcessProxy):
2664         (WebKit::DatabaseProcessProxy::fetchWebsiteData):
2665         (WebKit::DatabaseProcessProxy::deleteWebsiteData):
2666         (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
2667         (WebKit::DatabaseProcessProxy::didClose):
2668         (WebKit::DatabaseProcessProxy::didFetchWebsiteData):
2669         (WebKit::DatabaseProcessProxy::didDeleteWebsiteData):
2670         (WebKit::DatabaseProcessProxy::didDeleteWebsiteDataForOrigins):
2671         * UIProcess/Databases/DatabaseProcessProxy.h:
2672         * UIProcess/Databases/DatabaseProcessProxy.messages.in:
2673         * UIProcess/WebProcessPool.h:
2674         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2675         (WebKit::WebsiteDataStore::fetchData):
2676         (WebKit::WebsiteDataStore::removeData):
2677
2678 2015-04-21  Anders Carlsson  <andersca@apple.com>
2679
2680         Add module maps for WebKit
2681         https://bugs.webkit.org/show_bug.cgi?id=144026
2682         rdar://problem/19665428
2683
2684         Reviewed by Dan Bernstein.
2685
2686         * Configurations/WebKit.xcconfig:
2687         * Modules/OSX.modulemap: Added.
2688         * Modules/iOS.modulemap: Added.
2689
2690 2015-04-21  Tim Horton  <timothy_horton@apple.com>
2691
2692         Long pause under _takeViewSnapshot when screen updates are disabled
2693         https://bugs.webkit.org/show_bug.cgi?id=144017
2694         <rdar://problem/20548397>
2695
2696         Reviewed by Simon Fraser.
2697
2698         * UIProcess/API/mac/WKView.mm:
2699         (-[WKView _takeViewSnapshot]):
2700         Use CGSHWCaptureWindowList, for snapshotting that doesn't block on
2701         the next commit, and can succeed while screen updates are disabled
2702         without blocking.
2703
2704 2015-04-21  Chris Dumez  <cdumez@apple.com>
2705
2706         [WK2][NetworkCache] Better account of resource revalidations in efficacy logging
2707         https://bugs.webkit.org/show_bug.cgi?id=144014
2708
2709         Reviewed by Antti Koivisto.
2710
2711         Better account of resource revalidations in efficacy logging.
2712         Prevously, resources that were in the cache but needed revalidation
2713         were counted as retrieval successes, which is not entirely accurate.
2714
2715         We now distinguish "is in the cache and is directly usable" from
2716         "is in the cache but needs revalidation". We also log how many of these
2717         revalidations are successful.
2718
2719         * NetworkProcess/NetworkResourceLoader.cpp:
2720         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2721         * NetworkProcess/cache/NetworkCache.cpp:
2722         (WebKit::NetworkCache::Cache::update):
2723         * NetworkProcess/cache/NetworkCache.h:
2724         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2725         (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
2726         (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
2727         * NetworkProcess/cache/NetworkCacheStatistics.h:
2728
2729 2015-04-21  Dan Bernstein  <mitz@apple.com>
2730
2731         [Cocoa] Framework header postprocessing should respect additional definitions
2732         https://bugs.webkit.org/show_bug.cgi?id=144018
2733
2734         Reviewed by Anders Carlsson.
2735
2736         * mac/postprocess-framework-headers.sh: Read definitons from
2737         /usr/local/include/WebKitAdditions/Scripts/postprocess-framework-headers-definitions, and
2738         have them take precedence over OSX_VERSION and IOS_VERSION and supply additional options to
2739         sed.
2740
2741 2015-04-21  Anders Carlsson  <andersca@apple.com>
2742
2743         Fix block signatures
2744         https://bugs.webkit.org/show_bug.cgi?id=144002
2745
2746         Reviewed by Andreas Kling.
2747
2748         * UIProcess/API/Cocoa/WKUIDelegate.h:
2749         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2750         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2751         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2752         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2753         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2754         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2755         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2756         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2757         * UIProcess/ios/WKPDFView.mm:
2758         (-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]):
2759         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2760         (-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
2761         (-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
2762         (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
2763
2764 2015-04-21  Timothy Horton  <timothy_horton@apple.com>
2765
2766         PDFs still don't snapshot properly in iOS Safari
2767         https://bugs.webkit.org/show_bug.cgi?id=143976
2768         <rdar://problem/18283459>
2769
2770         Reviewed by Anders Carlsson.
2771
2772         * UIProcess/WebPageProxy.cpp:
2773         (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
2774         * UIProcess/WebPageProxy.h:
2775         * UIProcess/API/Cocoa/WKWebView.mm:
2776         (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
2777         Inform the client that we've passed all reasonable layout milestones
2778         as soon as the custom content provider has been handed its data.
2779         WKPDFView, the only custom content provider, synchronously lays out
2780         its subviews upon initial receipt of data, so this works fine for it.
2781         This ensures that clients that normally depend on layout milestones firing
2782         won't break when a custom content view is installed.
2783
2784         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2785         Fall back to renderInContext: if the custom content view is not parented
2786         when a snapshot is requested.
2787
2788 2015-04-21  Dan Bernstein  <mitz@apple.com>
2789
2790         Merged WKBackForwardListItem’s Internal category into the class extension in WKBackForwardListItemInternal.h.
2791
2792         Reviewed by Anders Carlsson.
2793
2794         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
2795         (-[WKBackForwardListItem _item]):
2796         (-[WKBackForwardListItem _apiObject]):
2797         * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
2798
2799 2015-04-21  Chris Dumez  <cdumez@apple.com>
2800
2801         Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
2802         https://bugs.webkit.org/show_bug.cgi?id=143970
2803
2804         Reviewed by Darin Adler.
2805
2806         Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
2807         constructor explicit as it copies the vector and it is easy to call it
2808         by mistake.
2809
2810         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2811         (WebKit::WebIDBServerConnection::setIndexKeys):
2812         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2813
2814 2015-04-20  Dan Bernstein  <mitz@apple.com>
2815
2816         Expose more bundle form client functions as WKWebProcessPlugInFormDelegatePrivate methods
2817         https://bugs.webkit.org/show_bug.cgi?id=143973
2818
2819         Reviewed by Anders Carlsson.
2820
2821         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared new
2822         delegate methods.
2823
2824         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Declared new frame
2825         property.
2826         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
2827         (-[WKWebProcessPlugInNodeHandle frame]): Added. Returns the node’s document’s frame. This is
2828         useful to delegates getting an array of nodes via the new method.
2829
2830         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2831         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added overrides of
2832         shouldNotifyOnFormChanges and didAssociateFormControls, which call the new delegate methods.
2833
2834 2015-04-20  Joseph Pecoraro  <pecoraro@apple.com>
2835
2836         Cleanup some StringBuilder use
2837         https://bugs.webkit.org/show_bug.cgi?id=143550
2838
2839         Reviewed by Darin Adler.
2840
2841         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
2842         (WebKit::buildObjectStoreStatement):
2843         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2844         (WebKit::v2RecordsTableSchema):
2845         * Shared/Databases/IndexedDB/IDBUtilities.cpp:
2846         (WebKit::uniqueDatabaseIdentifier):
2847         * UIProcess/API/APIUserScript.cpp:
2848         (API::UserScript::generateUniqueURL):
2849         * UIProcess/WebProcessPool.cpp:
2850         (WebKit::WebProcessPool::didReceiveInvalidMessage):
2851         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
2852         (WebKit::combinedSecurityOriginIdentifier):
2853
2854 2015-04-20  Anders Carlsson  <andersca@apple.com>
2855
2856         Modify the WKWebsiteDataStore API to take a NSSet of types instead of a bitmask
2857         https://bugs.webkit.org/show_bug.cgi?id=143966
2858
2859         Reviewed by Dan Bernstein.
2860
2861         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
2862         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
2863         (dataTypesToString):
2864         (-[WKWebsiteDataRecord dataTypes]):
2865         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
2866         (WebKit::toWebsiteDataTypes):
2867         (WebKit::toWKWebsiteDataTypes):
2868         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2869         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2870         (+[WKWebsiteDataStore allWebsiteDataTypes]):
2871         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2872         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2873         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2874         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
2875         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2876         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2877         (toWKWebsiteDataTypes):
2878         (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2879         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2880         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2881
2882 2015-04-20  Beth Dakin  <bdakin@apple.com>
2883
2884         Should remove mouseForceClick and mouseForceCancelled from DOM force events
2885         https://bugs.webkit.org/show_bug.cgi?id=143904
2886         -and corresponding-
2887         rdar://problem/20578842
2888
2889         Reviewed by Dan Bernstein.
2890
2891         * WebProcess/WebPage/mac/WebPageMac.mm:
2892         (WebKit::WebPage::immediateActionDidCancel):
2893
2894 2015-04-20  Tim Horton  <timothy_horton@apple.com>
2895
2896         Implement immediate action support for tel: and mailto: URLs
2897         https://bugs.webkit.org/show_bug.cgi?id=143916
2898         <rdar://problem/19721711>
2899
2900         Reviewed by Darin Adler.
2901
2902         * Shared/API/c/WKImmediateActionTypes.h:
2903         * UIProcess/mac/WKImmediateActionController.mm:
2904         (-[WKImmediateActionController _defaultAnimationController]):
2905         (-[WKImmediateActionController _animationControllerForDataDetectedText]):
2906         (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
2907         (-[WKImmediateActionController _menuItemForDataDetectedText]): Deleted.
2908         Add _animationControllerForDataDetectedLink and use it when
2909         building immediate actions for tel: and mailto: links.
2910
2911 2015-04-20  Alex Christensen  <achristensen@webkit.org>
2912
2913         Properly report errors from _WKUserContentExtensionStore.
2914         https://bugs.webkit.org/show_bug.cgi?id=143808
2915
2916         Reviewed by Darin Adler.
2917
2918         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
2919         (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
2920         (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
2921         (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
2922
2923 2015-04-18  Simon Fraser  <simon.fraser@apple.com>
2924
2925         REGRESSION (r181656): Animated tiled layers are missing content
2926         https://bugs.webkit.org/show_bug.cgi?id=143911
2927         rdar://problem/20596328
2928
2929         Reviewed by Darin Adler.
2930         
2931         After r181656, all requestAnimationFrame was falling back to timers, and not
2932         using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
2933         fumble.
2934         
2935         Replace this confusing Optional<> code with simpler code that just forces the
2936         clients to make a DisplayRefreshMonitor if they can, first asking
2937         ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().
2938         
2939         Make lots of things into references, and use C++11 initialization in some places.
2940
2941         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2942         (WebKit::WebChromeClient::createDisplayRefreshMonitor):
2943         * WebProcess/WebCoreSupport/WebChromeClient.h:
2944
2945 2015-04-18  Dan Bernstein  <mitz@apple.com>
2946
2947         SwipeShadow images are installed on iOS
2948         https://bugs.webkit.org/show_bug.cgi?id=143915
2949
2950         Reviewed by Tim Horton.
2951
2952         * Configurations/WebKit.xcconfig: Added Resources/Mac/* to
2953         EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*]. We could move more resources there and remove
2954         individual patterns.
2955         * Resources/SwipeShadow.png: Moved to mac.
2956         * Resources/SwipeShadow@2x.png: Moved to mac.
2957         * Resources/mac: Added.
2958         * Resources/mac/SwipeShadow.png: Moved from Source/WebKit2/Resources/SwipeShadow.png.
2959         * Resources/mac/SwipeShadow@2x.png: Moved from Source/WebKit2/Resources/SwipeShadow@2x.png.
2960         * WebKit2.xcodeproj/project.pbxproj: Created mac group in the Resources group and moved
2961         SwipeShadow*.png into it. Updated for file moves.
2962
2963 2015-04-18  Chris Dumez  <cdumez@apple.com>
2964
2965         Fix NetworkCache Statistics database bootstrapping after r182803
2966         https://bugs.webkit.org/show_bug.cgi?id=143890
2967
2968         Reviewed by Darin Adler.
2969
2970         Update the NetworkCache Statistics database bootstrapping code to use
2971         the records path instead of the version path. Also check that the
2972         filenames in the folder are valid hashes to discard the *-body files.
2973
2974         * NetworkProcess/cache/NetworkCache.cpp:
2975         (WebKit::NetworkCache::Cache::recordsPath):
2976         (WebKit::NetworkCache::Cache::storagePath): Deleted.
2977         * NetworkProcess/cache/NetworkCache.h:
2978         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2979         (WebKit::NetworkCache::Statistics::initialize):
2980         (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
2981         (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
2982
2983 2015-04-17  Tim Horton  <timothy_horton@apple.com>
2984
2985         Clients sometimes block for 500ms in waitForPossibleGeometryUpdates
2986         https://bugs.webkit.org/show_bug.cgi?id=143901
2987         <rdar://problem/20488655>
2988
2989         Reviewed by Anders Carlsson.
2990
2991         * Platform/IPC/Connection.cpp:
2992         (IPC::Connection::waitForMessage):
2993         InterruptWaitingIfSyncMessageArrives already cancels waitForMessage if
2994         a sync message arrives while waiting, but it should also avoid waiting
2995         if there's a sync message already in the queue when the waiting starts,
2996         as that will have the same nasty effect.
2997
2998         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2999         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
3000         If a synchronous message comes in from the Web process while we're waiting,
3001         cancel our synchronous wait for DidUpdateGeometry. This will cause the size
3002         change to not synchronize with the Web process' painting, but that is better
3003         than pointlessly blocking for 500ms.
3004
3005 2015-04-17  Chris Dumez  <cdumez@apple.com>
3006
3007         Possible null pointer dereference in WebDiagnosticLoggingClient::logDiagnosticMessageWithValue()
3008         https://bugs.webkit.org/show_bug.cgi?id=143899
3009         <rdar://problem/20584215>
3010
3011         Reviewed by Anders Carlsson.
3012
3013         WebDiagnosticLoggingClient::logDiagnosticMessage*() methods failed to
3014         check that m_page.corePage() was non-null before dereferencing, thus
3015         causing crashes when it is null.
3016
3017         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
3018         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
3019         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
3020         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
3021
3022 2015-04-17  Yongjun Zhang  <yongjun_zhang@apple.com>
3023
3024         WebKit client should be able to add view controller for link preview.
3025         https://bugs.webkit.org/show_bug.cgi?id=143686
3026
3027         Add delegate methods to WKUIDelegatePrivate so that a WebKit client can prepare a view controller
3028         for link preview and react to the dismissal of this view controller. Also connect WKContentView to
3029         preview gesture recognizer and forwards the delegate callbacks to corresponding delegate methods
3030         in WKUIDelegatePrivate.
3031
3032         Reviewed by Beth Dakin.
3033
3034         * Platform/spi/ios/UIKitSPI.h:
3035         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3036         * UIProcess/ios/WKContentView.mm:
3037         (-[WKContentView willMoveToWindow:]):
3038         * UIProcess/ios/WKContentViewInteraction.h:
3039         * UIProcess/ios/WKContentViewInteraction.mm:
3040         (-[WKContentView cleanupInteraction]):
3041         (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
3042         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
3043         (-[WKContentView gestureRecognizerShouldBegin:]):
3044         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
3045         (-[WKContentView commitPreviewViewController:]):
3046         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
3047         (-[WKContentView didDismissPreviewViewController:committing:]):
3048
3049 2015-04-17  Beth Dakin  <bdakin@apple.com>
3050
3051         Force mouse events should go through normal mouse event handling code paths
3052         https://bugs.webkit.org/show_bug.cgi?id=143749
3053         -and corresponding-
3054         rdar://problem/20472895
3055
3056         Reviewed by Dean Jackson.
3057
3058         This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the 
3059         NSEventTypePressures that is gets and sends those down to the web process.
3060
3061         Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an 
3062         NSEventTypePressure, the new name makes it clear how the second parameter differs 
3063         from the first.
3064         * Shared/NativeWebMouseEvent.h:
3065
3066         New event types for the new types of events.
3067         * Shared/WebEvent.h:
3068         * Shared/WebEventConversion.cpp:
3069         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
3070         * Shared/mac/NativeWebMouseEventMac.mm:
3071         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
3072         * Shared/mac/WebEventFactory.h:
3073
3074         All of the square-peg, round-hole problems of massaging the NSEventTypePressures 
3075         events into WebMouseEvents is taken care of here.
3076         * Shared/mac/WebEventFactory.mm:
3077         (WebKit::mouseButtonForEvent):
3078         (WebKit::globalPointForEvent):
3079         (WebKit::pointForEvent):
3080         (WebKit::WebEventFactory::createWebMouseEvent):
3081
3082         Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent 
3083         and handle it.
3084         * UIProcess/API/mac/WKView.mm:
3085         (-[WKView pressureChangeWithEvent:]):
3086
3087         Handle the new types.
3088         * UIProcess/WebPageProxy.cpp:
3089         (WebKit::WebPageProxy::didReceiveEvent):
3090
3091         Can delete inputDeviceForceDidChange since it’s no longer used.
3092         (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
3093         * UIProcess/WebPageProxy.h:
3094
3095         Handle the new types of mouse events properly.
3096         * WebProcess/WebPage/WebPage.cpp:
3097         (WebKit::handleMouseEvent):
3098
3099         Delete inputDeviceForceDidChange() and m_lastForceStage.
3100         * WebProcess/WebPage/WebPage.h:
3101         * WebProcess/WebPage/WebPage.messages.in:
3102         * WebProcess/WebPage/mac/WebPageMac.mm:
3103         (WebKit::WebPage::inputDeviceForceDidChange): Deleted.
3104
3105         Handle new WebEvent types.
3106         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
3107
3108 2015-04-17  Commit Queue  <commit-queue@webkit.org>
3109
3110         Unreviewed, rolling out r182912 and r182920.
3111         https://bugs.webkit.org/show_bug.cgi?id=143881
3112
3113         Build breakage in some configurations (Requested by ap on
3114         #webkit).
3115
3116         Reverted changesets:
3117
3118         "Force mouse events should go through normal mouse event
3119         handling code paths"
3120         https://bugs.webkit.org/show_bug.cgi?id=143749
3121         http://trac.webkit.org/changeset/182912
3122
3123         http://trac.webkit.org/changeset/182920
3124
3125 2015-04-17  Antti Koivisto  <antti@apple.com>
3126
3127         Network Cache: Read resource record and body in parallel
3128         https://bugs.webkit.org/show_bug.cgi?id=143879
3129
3130         Reviewed by Chris Dumez.
3131
3132         We currently first fetch the record file and then fetch the body blob if needed.
3133         We can do both operations in parallel to reduce latency.
3134
3135         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
3136         (WebKit::NetworkCache::traverseCacheFiles):
3137
3138             Do all validation in the client.
3139
3140         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3141         (WebKit::NetworkCache::Storage::synchronize):
3142
3143             Maintain a bloom filter that contains the body blobs to avoid unnecessary IO attempts.
3144             Delete any unknown file in cache directory.
3145
3146         (WebKit::NetworkCache::Storage::addToRecordFilter):
3147
3148             More informative name for record filter.
3149
3150         (WebKit::NetworkCache::Storage::mayContain):
3151         (WebKit::NetworkCache::Storage::readRecord):
3152         (WebKit::NetworkCache::Storage::storeBodyAsBlob):
3153         (WebKit::NetworkCache::Storage::dispatchReadOperation):
3154
3155             Start record read IO and body blob read IO in parallel.
3156
3157         (WebKit::NetworkCache::Storage::finishReadOperation):
3158
3159             The read is finished when we have both the record and the blob.
3160
3161         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
3162         (WebKit::NetworkCache::Storage::retrieve):
3163         (WebKit::NetworkCache::Storage::store):
3164         (WebKit::NetworkCache::Storage::traverse):
3165         (WebKit::NetworkCache::Storage::clear):
3166         (WebKit::NetworkCache::Storage::shrink):
3167         (WebKit::NetworkCache::Storage::addToContentsFilter): Deleted.
3168         (WebKit::NetworkCache::Storage::decodeRecord): Deleted.
3169         * NetworkProcess/cache/NetworkCacheStorage.h:
3170         (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
3171
3172             ReadOperation is now mutable and gathers the read result.
3173
3174 2015-04-16  Anders Carlsson  <andersca@apple.com>
3175
3176         Stop installing WebKit2.framework
3177         https://bugs.webkit.org/show_bug.cgi?id=143860
3178         rdar://problem/18298491
3179
3180         Reviewed by Dan Bernstein.
3181
3182         * Configurations/WebKit2.xcconfig:
3183         Set SKIP_INSTALL=YES for all SDKs except 10.9 where we still need it.
3184
3185 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
3186
3187         Unreviewed. Fix the build with ENABLE(NETWORK_CACHE) and !ENABLE(SHAREABLE_RESOURCE).
3188
3189         * NetworkProcess/cache/NetworkCacheEntry.cpp:
3190         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
3191         (WebKit::NetworkCache::fileTimes): There's no st_birthtime in Linux.
3192
3193 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
3194
3195         [SOUP] ResourceRequest cache policy is not encoded/decoded in IPC messages
3196         https://bugs.webkit.org/show_bug.cgi?id=143867
3197
3198         Reviewed by Sergio Villar Senin.
3199
3200         Encode/Decode the ResourceRequest cache policy.
3201
3202         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
3203         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
3204         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
3205
3206 2015-04-16  Sungmann Cho  <sungmann.cho@navercorp.com>
3207
3208         Use UNUSED_PARAM instead of the void casting to suppress unused parameter warnings.
3209         https://bugs.webkit.org/show_bug.cgi?id=143750
3210
3211         Reviewed by Darin Adler.
3212
3213         No new tests, no behavior change.
3214
3215         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
3216         (WebKit::NotificationPermissionRequestManager::NotificationPermissionRequestManager):
3217
3218 2015-04-16  Brady Eidson  <beidson@apple.com>
3219
3220         Compiling a content extension fails when user's home directory is on a different volume from /var/tmp.
3221         https://bugs.webkit.org/show_bug.cgi?id=143834
3222
3223         Reviewed by Anders Carlsson.
3224
3225         * UIProcess/API/APIUserContentExtensionStore.cpp:
3226         (API::compiledToFile): Use moveFile() instead of renameFile()
3227
3228 2015-04-16  Anders Carlsson  <andersca@apple.com>
3229
3230         Deprecate _WKWebsiteDataStore in favor of WKWebsiteDataStore
3231         https://bugs.webkit.org/show_bug.cgi?id=143844
3232
3233         Reviewed by Dan Bernstein.
3234
3235         * Shared/API/Cocoa/WKFoundation.h:
3236         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3237         (-[WKWebViewConfiguration _validate]):
3238         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3239         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
3240         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
3241         * mac/postprocess-framework-headers.sh:
3242
3243 2015-04-16  Alex Christensen  <achristensen@webkit.org>
3244
3245         Removed unused WKUserContentFilterRef.
3246         https://bugs.webkit.org/show_bug.cgi?id=143852
3247
3248         Reviewed by Sam Weinig.
3249
3250         * Shared/WebCompiledContentExtension.cpp:
3251         (WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient): Deleted.
3252         (WebKit::LegacyContentExtensionCompilationClient::writeBytecode): Deleted.
3253         (WebKit::LegacyContentExtensionCompilationClient::writeActions): Deleted.
3254         (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData): Deleted.
3255         * Shared/WebCompiledContentExtension.h:
3256         * UIProcess/API/C/WKUserContentFilterRef.cpp: Removed.
3257         * UIProcess/API/C/WKUserContentFilterRef.h: Removed.
3258         * UIProcess/API/C/WebKit2_C.h:
3259         * UIProcess/API/Cocoa/_WKUserContentFilter.h:
3260         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
3261         (-[_WKUserContentFilter initWithName:serializedRules:]): Deleted.
3262         * WebKit2.xcodeproj/project.pbxproj:
3263
3264 2015-04-16  Beth Dakin  <bdakin@apple.com>
3265
3266         Rubber-stamped by Tim Horton.
3267
3268         Fixing a small mistake in http://trac.webkit.org/changeset/182912 which should 
3269         make sure to use the most up-to-date pressure information when setting the force 
3270         on a WebMouseEvent.
3271
3272         * Shared/mac/WebEventFactory.mm:
3273         (WebKit::WebEventFactory::createWebMouseEvent):
3274
3275 2015-04-13  Jer Noble  <jer.noble@apple.com>
3276
3277         [iOS] When simultaneously exiting-and-entering fullscreen, WebVideoFullscreenManager/Proxy becomes confused about what video element it represents.
3278         https://bugs.webkit.org/show_bug.cgi?id=143680
3279
3280         Reviewed by Simon Fraser.
3281
3282         The original assumption of WebVideoFullscreenManager and -Proxy was that the two classes would represent a
3283         single video element and its full screen state. With multiple animations in and out of fullscreen combined with
3284         multiple fullscreen modes, this assumption no longer holds true.
3285
3286         Rather than having a WebVideoFullscreenManager which /isa/ WebVideoFullscreenModelVideoElement, the manager now
3287         /hasa/ WebVideoFullscreenModelVideoElement (or has many such models). Ditto for WebVideoFullscreenManager and
3288         WebVideoFullscreenInterfaceAVKit. The WebVideoFullscreenInterfaceAVKit still needs a WebVideoFullscreenModel to
3289         communicate with, so a new wrapper class is used for that purpose, WebVideoFullscreenModelContext. Ditto for
3290         WebVideoFullscreenModelVideoElement and the new class WebVideoFullscreenInterfaceContext. These context classes
3291         are paired and share a contextId, allowing the manager and its proxy to route messages between the UIProcess's
3292         WebVideoFullscreenInterfaceAVKit to-and-from the WebProcess's WebVideoFullscreenModelVideoElement.
3293
3294         Both the WebVideoFullscreenModelContext and the WebVideoFullscreenInterfaceContext take a back-pointer to their
3295         manager or manager proxy, and each method on the context simply calls the matching method on the manager and
3296         passes its contextId as a parameter.
3297
3298         Both the WebVideoFullscreenManager and the WebVideoFullscreenManagerProxy pass that contextId in each of their
3299         cross-process messages.
3300
3301         On the other side, the manager and proxy also have a map between contextIds and their matching
3302         WebVideoFullscreenModelVideoElement (in the case of WebVideoFullscreenManager) or
3303         WebVideoFullscreenInterfaceAVKit (in the case of WebVideoFullscreenManagerProxy).
3304
3305         While this change is large by LoC, it is almost entirely boilerplate.  The new and interesting pieces are these:
3306
3307         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3308         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy): No longer a WebVideoFullscreenInterfaceAVKit.
3309         (WebKit::WebVideoFullscreenManagerProxy::invalidate): Walk through the models and interfaces, invalidating each.
3310         (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface): Added. Return a new model and interface tuple.
3311         (WebKit::WebVideoFullscreenManagerProxy::ensureModelAndInterface): Added. Lazily create, and add to the m_contextMap
3312             a new model and interface object.
3313         (WebKit::WebVideoFullscreenManagerProxy::ensureModel): Return the model half of ensureModelAndInterface().
3314         (WebKit::WebVideoFullscreenManagerProxy::ensureInterface): Return the interface half of ensureModelAndInterface().
3315         (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen): Walk through the outstanding interface objects, and if 
3316             any have a fullscreen mode which matches the about-to-be-fullscreen interface, request that that other interface
3317             exit fullscreen.
3318         * WebProcess/ios/WebVideoFullscreenManager.mm:
3319         (WebKit::nextContextId): Static, incrementing counter used as a contextId source.
3320         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager): No longer a WebVideoFullscreenModelVideoElement.
3321         (WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager): Walk through the models and interfaces, invalidating each.
3322         (WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Added. Return a new model and interface tuple.
3323         (WebKit::WebVideoFullscreenManager::ensureModelAndInterface):  Added. Lazily create, and add to the m_contextMap
3324             a new model and interface object.
3325         (WebKit::WebVideoFullscreenManager::ensureModel): Return the model half of ensureModelAndInterface().
3326         (WebKit::WebVideoFullscreenManager::ensureInterface): Return the interface half of ensureModelAndInterface().
3327
3328         New classes and methods which just forward on to their owning objects:
3329
3330         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3331         (WebKit::WebVideoFullscreenModelContext::create):
3332         (WebKit::WebVideoFullscreenModelContext::~WebVideoFullscreenModelContext):
3333         (WebKit::WebVideoFullscreenModelContext::invalidate):
3334         (WebKit::WebVideoFullscreenModelContext::layerHost):
3335         (WebKit::WebVideoFullscreenModelContext::setLayerHost):
3336         (WebKit::WebVideoFullscreenModelContext::setInitialVideoLayerFrame):
3337         (WebKit::WebVideoFullscreenModelContext::WebVideoFullscreenModelContext):
3338         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3339         (WebKit::WebVideoFullscreenModelContext::play):
3340         (WebKit::WebVideoFullscreenModelContext::pause):
3341         (WebKit::WebVideoFullscreenModelContext::togglePlayState):
3342         (WebKit::WebVideoFullscreenModelContext::beginScrubbing):
3343         (WebKit::WebVideoFullscreenModelContext::endScrubbing):
3344         (WebKit::WebVideoFullscreenModelContext::seekToTime):
3345         (WebKit::WebVideoFullscreenModelContext::fastSeek):
3346         (WebKit::WebVideoFullscreenModelContext::beginScanningForward):
3347         (WebKit::WebVideoFullscreenModelContext::beginScanningBackward):
3348         (WebKit::WebVideoFullscreenModelContext::endScanning):
3349         (WebKit::WebVideoFullscreenModelContext::requestExitFullscreen):
3350         (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame):
3351         (WebKit::WebVideoFullscreenModelContext::videoLayerFrame):
3352         (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity):
3353         (WebKit::WebVideoFullscreenModelContext::videoLayerGravity):
3354         (WebKit::WebVideoFullscreenModelContext::selectAudioMediaOption):
3355         (WebKit::WebVideoFullscreenModelContext::selectLegibleMediaOption):
3356         (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged):
3357         (WebKit::WebVideoFullscreenModelContext::didSetupFullscreen):
3358         (WebKit::WebVideoFullscreenModelContext::didEnterFullscreen):
3359         (WebKit::WebVideoFullscreenModelContext::didExitFullscreen):
3360         (WebKit::WebVideoFullscreenModelContext::didCleanupFullscreen):
3361         (WebKit::WebVideoFullscreenModelContext::fullscreenMayReturnToInline):
3362         * WebProcess/ios/WebVideoFullscreenManager.h:
3363         (WebKit::WebVideoFullscreenInterfaceContext::create):
3364         (WebKit::WebVideoFullscreenInterfaceContext::invalidate):
3365         (WebKit::WebVideoFullscreenInterfaceContext::layerHostingContext):
3366         (WebKit::WebVideoFullscreenInterfaceContext::isAnimating):
3367         (WebKit::WebVideoFullscreenInterfaceContext::setIsAnimating):
3368         (WebKit::WebVideoFullscreenInterfaceContext::targetIsFullscreen):
3369         (WebKit::WebVideoFullscreenInterfaceContext::setTargetIsFullscreen):
3370         (WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode):
3371         (WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode):
3372         (WebKit::WebVideoFullscreenInterfaceContext::isFullscreen):
3373         (WebKit::WebVideoFullscreenInterfaceContext::setIsFullscreen):
3374         * WebProcess/ios/WebVideoFullscreenManager.mm:
3375         (WebKit::WebVideoFullscreenInterfaceContext::WebVideoFullscreenInterfaceContext):
3376         (WebKit::WebVideoFullscreenInterfaceContext::~WebVideoFullscreenInterfaceContext):
3377         (WebKit::WebVideoFullscreenInterfaceContext::setLayerHostingContext):
3378         (WebKit::WebVideoFullscreenInterfaceContext::resetMediaState):
3379         (WebKit::WebVideoFullscreenInterfaceContext::setDuration):
3380         (WebKit::WebVideoFullscreenInterfaceContext::setCurrentTime):
3381         (WebKit::WebVideoFullscreenInterfaceContext::setBufferedTime):
3382         (WebKit::WebVideoFullscreenInterfaceContext::setRate):
3383         (WebKit::WebVideoFullscreenInterfaceContext::setVideoDimensions):
3384         (WebKit::WebVideoFullscreenInterfaceContext::setSeekableRanges):
3385         (WebKit::WebVideoFullscreenInterfaceContext::setCanPlayFastReverse):
3386         (WebKit::WebVideoFullscreenInterfaceContext::setAudioMediaSelectionOptions):
3387         (WebKit::WebVideoFullscreenInterfaceContext::setLegibleMediaSelectionOptions):
3388         (WebKit::WebVideoFullscreenInterfaceContext::setExternalPlayback):
3389
3390         Cross-process methods which now take a contextId parameter:
3391
3392         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
3393         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3394         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
3395         (WebKit::WebVideoFullscreenManagerProxy::resetMediaState):
3396         (WebKit::WebVideoFullscreenManagerProxy::setCurrentTime):
3397         (WebKit::WebVideoFullscreenManagerProxy::setBufferedTime):
3398         (WebKit::WebVideoFullscreenManagerProxy::setVideoDimensions):
3399         (WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
3400         (WebKit::WebVideoFullscreenManagerProxy::setCanPlayFastReverse):
3401         (WebKit::WebVideoFullscreenManagerProxy::setAudioMediaSelectionOptions):
3402         (WebKit::WebVideoFullscreenManagerProxy::setLegibleMediaSelectionOptions):
3403         (WebKit::WebVideoFullscreenManagerProxy::setExternalPlaybackProperties):
3404         (WebKit::WebVideoFullscreenManagerProxy::setDuration):
3405         (WebKit::WebVideoFullscreenManagerProxy::setRate):
3406         (WebKit::WebVideoFullscreenManagerProxy::exitFullscreen):
3407         (WebKit::WebVideoFullscreenManagerProxy::cleanupFullscreen):
3408         (WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline):
3409         (WebKit::WebVideoFullscreenManagerProxy::play):
3410         (WebKit::WebVideoFullscreenManagerProxy::pause):
3411         (WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
3412         (WebKit::WebVideoFullscreenManagerProxy::beginScrubbing):
3413         (WebKit::WebVideoFullscreenManagerProxy::endScrubbing):
3414         (WebKit::WebVideoFullscreenManagerProxy::seekToTime):
3415         (WebKit::WebVideoFullscreenManagerProxy::fastSeek):
3416         (WebKit::WebVideoFullscreenManagerProxy::beginScanningForward):
3417         (WebKit::WebVideoFullscreenManagerProxy::beginScanningBackward):
3418         (WebKit::WebVideoFullscreenManagerProxy::endScanning):
3419         (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
3420         (WebKit::WebVideoFullscreenManagerProxy::didSetupFullscreen):
3421         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
3422         (WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
3423         (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen):
3424         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
3425         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
3426         (WebKit::WebVideoFullscreenManagerProxy::selectAudioMediaOption):
3427         (WebKit::WebVideoFullscreenManagerProxy::selectLegibleMediaOption):
3428         (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged):
3429         (WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
3430         (WebKit::WebVideoFullscreenManagerProxy::videoLayerFrame): Deleted.
3431         (WebKit::WebVideoFullscreenManagerProxy::videoLayerGravity): Deleted.
3432         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
3433         * WebProcess/ios/WebVideoFullscreenManager.mm:
3434         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
3435         (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
3436         (WebKit::WebVideoFullscreenManager::resetMediaState):
3437         (WebKit::WebVideoFullscreenManager::setDuration):
3438         (WebKit::WebVideoFullscreenManager::setCurrentTime):
3439         (WebKit::WebVideoFullscreenManager::setBufferedTime):
3440         (WebKit::WebVideoFullscreenManager::setRate):
3441         (WebKit::WebVideoFullscreenManager::setVideoDimensions):
3442         (WebKit::WebVideoFullscreenManager::setSeekableRanges):
3443         (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse):
3444         (WebKit::WebVideoFullscreenManager::setAudioMediaSelectionOptions):
3445         (WebKit::WebVideoFullscreenManager::setLegibleMediaSelectionOptions):
3446         (WebKit::WebVideoFullscreenManager::setExternalPlayback):
3447         (WebKit::WebVideoFullscreenManager::play):
3448         (WebKit::WebVideoFullscreenManager::pause):
3449         (WebKit::WebVideoFullscreenManager::togglePlayState):
3450         (WebKit::WebVideoFullscreenManager::beginScrubbing):
3451         (WebKit::WebVideoFullscreenManager::endScrubbing):
3452         (WebKit::WebVideoFullscreenManager::seekToTime):
3453         (WebKit::WebVideoFullscreenManager::fastSeek):
3454         (WebKit::WebVideoFullscreenManager::beginScanningForward):
3455         (WebKit::WebVideoFullscreenManager::beginScanningBackward):
3456         (WebKit::WebVideoFullscreenManager::endScanning):
3457         (WebKit::WebVideoFullscreenManager::requestExitFullscreen):
3458         (WebKit::WebVideoFullscreenManager::selectAudioMediaOption):
3459         (WebKit::WebVideoFullscreenManager::selectLegibleMediaOption):
3460         (WebKit::WebVideoFullscreenManager::fullscreenModeChanged):
3461         (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
3462         (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
3463         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
3464         (WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
3465         (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
3466         (WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
3467         (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
3468         (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
3469
3470 2015-04-16  Beth Dakin  <bdakin@apple.com>
3471
3472         Force mouse events should go through normal mouse event handling code paths
3473         https://bugs.webkit.org/show_bug.cgi?id=143749
3474         -and corresponding-
3475         rdar://problem/20472895
3476
3477         Reviewed by Dean Jackson.
3478
3479         This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the 
3480         NSEventTypePressures that is gets and sends those down to the web process.
3481
3482         Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an 
3483         NSEventTypePressure, the new name makes it clear how the second parameter differs 
3484         from the first.
3485         * Shared/NativeWebMouseEvent.h:
3486
3487         New event types for the new types of events.
3488         * Shared/WebEvent.h:
3489         * Shared/WebEventConversion.cpp:
3490         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
3491         * Shared/mac/NativeWebMouseEventMac.mm:
3492         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
3493         * Shared/mac/WebEventFactory.h:
3494
3495         All of the square-peg, round-hole problems of massaging the NSEventTypePressures 
3496         events into WebMouseEvents is taken care of here.
3497         * Shared/mac/WebEventFactory.mm:
3498         (WebKit::mouseButtonForEvent):
3499         (WebKit::globalPointForEvent):
3500         (WebKit::pointForEvent):
3501         (WebKit::WebEventFactory::createWebMouseEvent):
3502
3503         Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent 
3504         and handle it.
3505         * UIProcess/API/mac/WKView.mm:
3506         (-[WKView pressureChangeWithEvent:]):
3507
3508         Handle the new types.
3509         * UIProcess/WebPageProxy.cpp:
3510         (WebKit::WebPageProxy::didReceiveEvent):
3511
3512         Can delete inputDeviceForceDidChange since it’s no longer used.
3513         (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
3514         * UIProcess/WebPageProxy.h:
3515
3516         Handle the new types of mouse events properly.
3517         * WebProcess/WebPage/WebPage.cpp:
3518         (WebKit::handleMouseEvent):
3519
3520         Delete inputDeviceForceDidChange() and m_lastForceStage.
3521         * WebProcess/WebPage/WebPage.h:
3522         * WebProcess/WebPage/WebPage.messages.in:
3523         * WebProcess/WebPage/mac/WebPageMac.mm:
3524         (WebKit::WebPage::inputDeviceForceDidChange): Deleted.
3525
3526         Handle new WebEvent types.
3527         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
3528
3529 2015-04-16  Dan Bernstein  <mitz@apple.com>
3530
3531         <rdar://problem/20575744> Also include a definition of __NSd_{current deployment target} in WKFoundation.h.
3532
3533         Reviewed by Tim Horton.
3534
3535         * WebKit2.xcodeproj/project.pbxproj:
3536
3537 2015-04-16  Timothy Horton  <timothy_horton@apple.com>
3538
3539         Provide a mechanism through the legacy SPI to know when swipe gestures begin and end
3540         https://bugs.webkit.org/show_bug.cgi?id=143740
3541         <rdar://problem/20468540>
3542
3543         Reviewed by Dan Bernstein.
3544
3545         In the C SPI, add three WKPageLoaderClient callbacks for the three
3546         navigation gesture events (did begin, will end, did end).
3547
3548         * UIProcess/API/C/WKPageLoaderClient.h:
3549         Add the callbacks.
3550
3551         * UIProcess/API/APILoaderClient.h:
3552         (API::LoaderClient::navigationGestureDidBegin):
3553         (API::LoaderClient::navigationGestureWillEnd):
3554         (API::LoaderClient::navigationGestureDidEnd):
3555         * UIProcess/WebPageProxy.cpp:
3556         (WebKit::WebPageProxy::navigationGestureDidBegin):
3557         (WebKit::WebPageProxy::navigationGestureWillEnd):
3558         (WebKit::WebPageProxy::navigationGestureDidEnd):
3559         Dispatch navigation gesture events to the loader client as well as
3560         (after a bounce through the PageClient) the navigation delegate.
3561
3562         * UIProcess/API/C/WKPage.cpp:
3563         (WKPageSetPageLoaderClient):
3564         Call the callbacks.
3565
3566         * UIProcess/mac/ViewGestureController.h:
3567         * UIProcess/mac/ViewGestureControllerMac.mm:
3568         (WebKit::ViewGestureController::trackSwipeGesture):
3569         (WebKit::ViewGestureController::willEndSwipeGesture):
3570         While we were already informing WebPageProxy of 'did begin' and 'did end'
3571         navigation gesture events, we were missing 'will end'. Add it.
3572
3573 2015-04-16  Tim Horton  <timothy_horton@apple.com>
3574
3575         Dispatching multiple asynchronous animated resizes in parallel causes page scale to detach from reality
3576         https://bugs.webkit.org/show_bug.cgi?id=143812
3577         <rdar://problem/19866038>
3578
3579         Reviewed by Simon Fraser.
3580
3581         * Shared/VisibleContentRectUpdateInfo.h:
3582         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
3583         No cats in transaction (more of these below, too).
3584
3585         * UIProcess/WebPageProxy.h:
3586         * UIProcess/WebPageProxy.messages.in:
3587         * UIProcess/ios/WebPageProxyIOS.mm:
3588         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
3589         (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
3590         * WebProcess/WebPage/WebPage.h:
3591         * WebProcess/WebPage/WebPage.messages.in:
3592         * WebProcess/WebPage/ios/WebPageIOS.mm:
3593         (WebKit::WebPage::handleTap):
3594         (WebKit::WebPage::commitPotentialTap):
3595         (WebKit::WebPage::dynamicViewportSizeUpdate):
3596         Add an incrementing ID to dynamicViewportSizeUpdates. The UI process keeps
3597         the current ID, and it is bounced through the Web process (dynamicViewportSizeUpdates)
3598         back to the UI process (dynamicViewportUpdateChangedTarget). If we have
3599         dispatched another dynamicViewportSizeUpdate in the interim, ignore
3600         the intermediate target.
3601
3602 2015-04-16  Sungmann Cho  <sungmann.cho@navercorp.com>
3603
3604         Remove PluginController::isPluginVisible().
3605         https://bugs.webkit.org/show_bug.cgi?id=143830
3606
3607         Reviewed by Darin Adler.
3608
3609         PluginController::isPluginVisible() was introduced by http://webkit.org/b/60285.
3610         This method had been used only for WebKit2 on Windows, and no one uses it now.
3611         So we can remove it.
3612
3613         No new tests, no behavior change.
3614
3615         * PluginProcess/PluginControllerProxy.cpp:
3616         (WebKit::PluginControllerProxy::isPluginVisible): Deleted.
3617         * PluginProcess/PluginControllerProxy.h:
3618         * WebProcess/Plugins/PluginController.h:
3619         * WebProcess/Plugins/PluginView.cpp:
3620         (WebKit::PluginView::isPluginVisible): Deleted.
3621         * WebProcess/Plugins/PluginView.h:
3622
3623 2015-04-16  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3624
3625         [EFL] Disable a flaky ewk_context_network_process_model() API test
3626         https://bugs.webkit.org/show_bug.cgi?id=143824
3627
3628         Reviewed by Csaba Osztrogonác.
3629
3630         ewk_context_network_process_model has been often failed. Though Bug 142967
3631         was filed to fix this issue, it is not solved yet. To maintain EFL bot, this patch
3632         disables it until fixing it.
3633
3634         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
3635         (TEST_F):
3636
3637 2015-04-16  Csaba Osztrogonác  <ossy@webkit.org>
3638
3639         [WK2] Forwarding headers generator shouldn't generate unnecessary headers
3640         https://bugs.webkit.org/show_bug.cgi?id=143820
3641
3642         Reviewed by Carlos Garcia Campos.
3643
3644         * Scripts/generate-forwarding-headers.pl:
3645         (collectNeededHeaders):
3646
3647 2015-04-16  Csaba Osztrogonác  <ossy@webkit.org>
3648
3649         [GTK] Run forwarding headers generator unconditionally
3650         https://bugs.webkit.org/show_bug.cgi?id=143819
3651
3652         Reviewed by Carlos Garcia Campos.
3653
3654         * PlatformGTK.cmake:
3655
3656 2015-04-15  Brent Fulgham  <bfulgham@apple.com>
3657
3658         [Mac] Disable "Save to Downloads" option for local files
3659         https://bugs.webkit.org/show_bug.cgi?id=143794
3660
3661         Reviewed by Tim Horton.
3662
3663         Disable the Image and Media download options if the download
3664         target is a local file. We can only download web resources;
3665         anything else is actually a no-op.
3666
3667         * UIProcess/mac/WKActionMenuController.mm:
3668         (-[WKActionMenuController _defaultMenuItemsForVideo]):
3669         (-[WKActionMenuController _defaultMenuItemsForImage]):
3670
3671 2015-04-15  Anders Carlsson  <andersca@apple.com>
3672
3673         Make websiteDataStore on WKWebViewConfiguration public
3674         https://bugs.webkit.org/show_bug.cgi?id=143810
3675
3676         Reviewed by Dan Bernstein.
3677
3678         * UIProcess/API/Cocoa/WKWebView.mm:
3679         (-[WKWebView initWithFrame:configuration:]):
3680         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
3681         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3682         (-[WKWebViewConfiguration copyWithZone:]):
3683         (-[WKWebViewConfiguration websiteDataStore]):
3684         (-[WKWebViewConfiguration setWebsiteDataStore:]):
3685         (-[WKWebViewConfiguration _websiteDataStore]):
3686         (-[WKWebViewConfiguration _setWebsiteDataStore:]):
3687
3688 2015-04-15  Anders Carlsson  <andersca@apple.com>
3689
3690         Make WKWebsiteDataStore public
3691         https://bugs.webkit.org/show_bug.cgi?id=143805
3692
3693         Reviewed by Dan Bernstein.
3694
3695         Rename the current _WKWebsiteDataStore to WKWebsiteDataStore. Make init unavailable and tighten up the
3696         types of the defaultDataStore and nonPersistentDataStore class methods.
3697         
3698         Add a new _WKWebsiteDataStore @interface and @implementation that derives from WKWebsiteDataStore
3699         and forwards the defaultDataStore and nonPersistentDataStore method calls.
3700
3701         * Shared/API/Cocoa/WebKit.h:
3702         * Shared/Cocoa/APIObject.mm:
3703         (API::Object::newObject):
3704         * UIProcess/API/Cocoa/WKWebView.mm:
3705         (-[WKWebView initWithFrame:configuration:]):
3706         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3707         (-[WKWebViewConfiguration _websiteDataStore]):
3708         * UIProcess/API/Cocoa/WKWebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
3709         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm.
3710         (+[WKWebsiteDataStore defaultDataStore]):
3711         (+[WKWebsiteDataStore nonPersistentDataStore]):
3712         (-[WKWebsiteDataStore dealloc]):
3713         (-[WKWebsiteDataStore isNonPersistent]):
3714         (toSystemClockTime):
3715         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
3716         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
3717         (toWebsiteDataRecords):
3718         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
3719         (-[WKWebsiteDataStore _apiObject]):
3720         * UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h.
3721         (WebKit::wrapper):
3722         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
3723         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3724         (+[_WKWebsiteDataStore defaultDataStore]):
3725         (+[_WKWebsiteDataStore nonPersistentDataStore]):
3726         (-[_WKWebsiteDataStore dealloc]): Deleted.
3727         (-[_WKWebsiteDataStore isNonPersistent]): Deleted.
3728         (toWebsiteDataTypes): Deleted.
3729         (toSystemClockTime): Deleted.
3730         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]): Deleted.
3731         (-[_WKWebsiteDataStore _apiObject]): Deleted.
3732         * WebKit2.xcodeproj/project.pbxproj:
3733
3734 2015-04-15  Timothy Horton  <timothy_horton@apple.com>
3735
3736         Custom CSS cursors do not use -webkit-image-set on retina displays
3737         https://bugs.webkit.org/show_bug.cgi?id=120783
3738
3739         Reviewed by Beth Dakin.
3740         Patch by Evan Wallace <evan.exe@gmail.com>.
3741
3742         Serialize the cursor image scale for SetCursor messages so custom
3743         CSS cursors work with -webkit-image-set on retina displays.
3744
3745         * Shared/WebCoreArgumentCoders.cpp:
3746         (CoreIPC::ArgumentCoder<Cursor>::encode):
3747         (CoreIPC::ArgumentCoder<Cursor>::decode):
3748
3749 2015-04-15  Alex Christensen  <achristensen@webkit.org>
3750
3751         Progress towards CMake on Mac.
3752         https://bugs.webkit.org/show_bug.cgi?id=143785
3753
3754         Reviewed by Csaba Osztrogonác.
3755
3756         * CMakeLists.txt:
3757         * PlatformEfl.cmake:
3758         * PlatformGTK.cmake:
3759
3760 2015-04-15  Anders Carlsson  <andersca@apple.com>
3761
3762         Make WKWebsiteDataRecord public
3763         https://bugs.webkit.org/show_bug.cgi?id=143796
3764
3765         Reviewed by Dan Bernstein.
3766
3767         Rename _WKWebsiteDataRecord and associated files to WKWebsiteDataRecord and
3768         add a new _WKWebsiteDataRecord.h with a class @interface declaration that just
3769         inherits from WKWebsiteDataRecord. We don't need an @implementation since nobody is expected
3770         to allocate _WKWebsiteDataRecord objects.
3771
3772         * Shared/API/Cocoa/WebKit.h:
3773         * Shared/Cocoa/APIObject.mm:
3774         (API::Object::newObject):
3775         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.h.
3776         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm.
3777         (-[WKWebsiteDataRecord dealloc]):
3778         (dataTypesToString):
3779         (-[WKWebsiteDataRecord description]):
3780         (-[WKWebsiteDataRecord displayName]):
3781         (-[WKWebsiteDataRecord dataTypes]):
3782         (-[WKWebsiteDataRecord _apiObject]):
3783         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h.
3784         (WebKit::wrapper):
3785         (WebKit::toWebsiteDataTypes):
3786         (WebKit::toWKWebsiteDataTypes):
3787         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
3788         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3789         (toWebsiteDataRecords):
3790         * WebKit2.xcodeproj/project.pbxproj:
3791
3792 2015-04-13  Jer Noble  <jer.noble@apple.com>
3793
3794         [Fullscreen] ChromeClient::exitVideoFullscreen() should take a pointer to a HTMLVideoElement.
3795         https://bugs.webkit.org/show_bug.cgi?id=143674
3796
3797         Reviewed by Darin Adler.
3798
3799         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3800         (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Takes a reference.
3801         (WebKit::WebChromeClient::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
3802         (WebKit::WebChromeClient::exitVideoFullscreen): Deleted.
3803         * WebProcess/WebCoreSupport/WebChromeClient.h:
3804         * WebProcess/ios/WebVideoFullscreenManager.h:
3805         * WebProcess/ios/WebVideoFullscreenManager.mm:
3806         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
3807         (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
3808         (WebKit::WebVideoFullscreenManager::didEnterFullscreen): Pass a reference.
3809         (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.
3810         (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
3811
3812 2015-04-15  Antti Koivisto  <antti@apple.com>
3813
3814         Network Cache: Inline small body data to record file
3815         https://bugs.webkit.org/show_bug.cgi?id=143783
3816
3817         Reviewed by Chris Dumez.
3818
3819         We currently save all body data as separate files. We can improve space efficiency and do less reads and writes
3820         by inlining smaller resource bodies with the header.
3821
3822         * NetworkProcess/cache/NetworkCacheIOChannel.h:
3823         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
3824         (WebKit::NetworkCache::IOChannel::read):
3825         (WebKit::NetworkCache::IOChannel::readSync):
3826         (WebKit::NetworkCache::IOChannel::write):
3827
3828             Add WorkQueue argument to allow specifying which queue the result is submitted to.
3829
3830         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3831         (WebKit::NetworkCache::decodeRecordMetaData):
3832
3833             Add a boolean indicating whether the body is inlined.
3834
3835         (WebKit::NetworkCache::decodeRecordHeader):
3836         (WebKit::NetworkCache::Storage::decodeRecord):
3837         (WebKit::NetworkCache::encodeRecordMetaData):
3838         (WebKit::NetworkCache::Storage::storeBodyAsBlob):
3839         (WebKit::NetworkCache::Storage::encodeRecord):
3840         (WebKit::NetworkCache::Storage::dispatchReadOperation):
3841
3842             Read the record first, then read the blob if needed.
3843             Submit the read operation directly from the main queue. Only thing we do is opening an IO channel
3844             and that uses O_NONBLOCK.
3845             Process the read results in the IO work queue where we now do the blob retrieval.
3846
3847         (WebKit::NetworkCache::shouldStoreBodyAsBlob):
3848
3849             The current threshold for saving a separate blob is 16KB.
3850
3851         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
3852         (WebKit::NetworkCache::Storage::traverse):
3853         (WebKit::NetworkCache::createRecord): Deleted.
3854         (WebKit::NetworkCache::encodeRecordHeader): Deleted.
3855         * NetworkProcess/cache/NetworkCacheStorage.h:
3856
3857 2015-04-15  Tim Horton  <timothy_horton@apple.com>
3858
3859         Non-local keyboards don't update scroll view parameters
3860         https://bugs.webkit.org/show_bug.cgi?id=143791
3861         <rdar://problem/18974020>
3862
3863         * Platform/spi/ios/UIKitSPI.h:
3864         Fix the build.
3865
3866 2015-04-15  Tim Horton  <timothy_horton@apple.com>
3867
3868         Non-local keyboards don't update scroll view parameters
3869         https://bugs.webkit.org/show_bug.cgi?id=143791
3870         <rdar://problem/18974020>
3871
3872         Reviewed by Enrica Casucci.
3873
3874         * UIProcess/API/Cocoa/WKWebView.mm:
3875         (-[WKWebView _shouldUpdateKeyboardWithInfo:]):
3876         (-[WKWebView _keyboardWillChangeFrame:]):
3877         (-[WKWebView _keyboardWillShow:]):
3878         Make sure that we update scroll view parameters (obscured insets, etc.)
3879         if we have a non-local keyboard, in addition to the cases where we have an assisted node.
3880
3881 2015-04-15  Dan Bernstein  <mitz@apple.com>
3882
3883         <rdar://problem/20549298> No matching __NSi_ definition for postprocessed value of WK_{MAC,IOS}_TBA
3884         https://bugs.webkit.org/show_bug.cgi?id=143786
3885
3886         Reviewed by Anders Carlsson.
3887
3888         * Shared/API/Cocoa/WKFoundation.h: Added a placeholder for the postprocessing script to
3889         insert a definition of __NSi_* for the current deployment target. Import CoreFoundation.h so
3890         that we can check if the macro is already defined.
3891         * WebKit2.xcodeproj/project.pbxproj: In the Postprocess WKFoundation.h script build phase,
3892         replace the placeholder with a definition of __NSi_{current deployment target} if not
3893         already defined.
3894
3895 2015-04-14  Anders Carlsson  <andersca@apple.com>
3896
3897         Make creating send rights from shared memory more robust
3898         https://bugs.webkit.org/show_bug.cgi?id=143730
3899         rdar://problem/16595870
3900
3901         Reviewed by Darin Adler.
3902
3903         This cleans up creation of handles and send rights and also fixes a bug where it would be impossible
3904         to send more than 128 MB of shared memory in a single object.
3905
3906         * Platform/SharedMemory.h:
3907         * Platform/mac/SharedMemoryMac.cpp:
3908         (WebKit::makeMemoryEntry):
3909         New helper function that creates a memory entry send right. This uses MAP_MEM_VM_SHARE which ensures
3910         that memory objects larger than 128 MB will be handled correctly.
3911
3912         (WebKit::SharedMemory::create):
3913         Call makeMemoryEntry.
3914
3915         (WebKit::SharedMemory::createHandle):
3916         Call createSendRight.
3917
3918         (WebKit::SharedMemory::createSendRight):
3919         Call makeMemoryEntry and add the necessary assertions.
3920
3921 2015-04-15  Eric Carlson  <eric.carlson@apple.com>
3922
3923         Generalize "isPlayingAudio" to include other media characteristics
3924         https://bugs.webkit.org/show_bug.cgi?id=143713
3925
3926         Reviewed by Jer Noble.
3927
3928         * UIProcess/API/C/WKPage.cpp:
3929         (toGenericCallbackFunction): Scope CallbackBase.
3930         (WKPageForceRepaint): Ditto.
3931         (WKPageValidateCommand): Ditto.
3932         (WKPageComputePagesForPrinting): Ditto.
3933
3934         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
3935         (-[_WKThumbnailView _requestSnapshotIfNeeded]): Ditto.
3936
3937         * UIProcess/API/mac/WKView.mm:
3938         (-[WKView becomeFirstResponder]): Ditto.
3939         (-[WKView updateFontPanelIfNeeded]): Ditto.
3940         (-[WKView validateUserInterfaceItem:]): Ditto.
3941         (-[WKView startSpeaking:]): Ditto.
3942         (-[WKView selectedRangeWithCompletionHandler:]): Ditto.
3943         (-[WKView markedRangeWithCompletionHandler:]): Ditto.
3944         (-[WKView hasMarkedTextWithCompletionHandler:]): Ditto.
3945         (-[WKView attributedSubstringForProposedRange:completionHandler:]): Ditto.
3946         (-[WKView firstRectForCharacterRange:completionHandler:]): Ditto.
3947         (-[WKView characterIndexForPoint:completionHandler:]): Ditto.
3948
3949         * UIProcess/WebPageProxy.cpp:
3950         (WebKit::WebPageProxy::isPlayingMediaDidChange): Rename from isPlayingAudioDidChange.
3951         (WebKit::WebPageProxy::isPlayingAudioDidChange): Deleted.
3952         * UIProcess/WebPageProxy.h:
3953
3954         * UIProcess/WebPageProxy.messages.in:
3955
3956         * UIProcess/mac/WKFullScreenWindowController.mm:
3957         (-[WKFullScreenWindowController dealloc]): Scope CallbackBase.
3958         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.
3959
3960         * UIProcess/mac/WKPrintingView.mm:
3961         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ditto.
3962         (-[WKPrintingView _askPageToComputePageRects]): Ditto.
3963         (-[WKPrintingView _drawPreview:]): Ditto.
3964
3965         * WebProcess/Plugins/PluginView.cpp:
3966         (WebKit::PluginView::setPluginIsPlayingAudio):
3967         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3968         (WebKit::WebChromeClient::isPlayingMediaDidChange):
3969         (WebKit::WebChromeClient::isPlayingAudioDidChange): Deleted.
3970         * WebProcess/WebCoreSupport/WebChromeClient.h:
3971
3972 2015-04-15  Antti Koivisto  <antti@apple.com>
3973
3974         Network Cache: Add thread-safe accessors for storage paths
3975         https://bugs.webkit.org/show_bug.cgi?id=143668
3976
3977         Reviewed by Darin Adler.
3978
3979         Less need to use StringCapture.
3980
3981         * NetworkProcess/cache/NetworkCache.cpp:
3982         (WebKit::NetworkCache::Cache::dumpFilePath):
3983         (WebKit::NetworkCache::Cache::storagePath):
3984         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3985         (WebKit::NetworkCache::makeRecordsDirectoryPath):
3986         (WebKit::NetworkCache::Storage::Storage):
3987         (WebKit::NetworkCache::Storage::basePath):
3988         (WebKit::NetworkCache::Storage::versionPath):
3989         (WebKit::NetworkCache::Storage::recordsPath):
3990         (WebKit::NetworkCache::Storage::synchronize):
3991         (WebKit::NetworkCache::Storage::remove):
3992         (WebKit::NetworkCache::Storage::dispatchReadOperation):
3993         (WebKit::NetworkCache::Storage::finishReadOperation):
3994         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
3995         (WebKit::NetworkCache::Storage::traverse):
3996         (WebKit::NetworkCache::Storage::clear):
3997         (WebKit::NetworkCache::Storage::shrink):
3998         (WebKit::NetworkCache::Storage::deleteOldVersions):
3999         (WebKit::NetworkCache::makeRecordDirectoryPath): Deleted.
4000         * NetworkProcess/cache/NetworkCacheStorage.h:
4001         (WebKit::NetworkCache::Storage::baseDirectoryPath): Deleted.
4002         (WebKit::NetworkCache::Storage::directoryPath): Deleted.
4003
4004 2015-04-14  Tim Horton  <timothy_horton@apple.com>
4005
4006         Update gesture swipe shadow style
4007         https://bugs.webkit.org/show_bug.cgi?id=143616
4008         <rdar://problem/19295843>
4009
4010         Reviewed by Darin Adler.
4011
4012         * UIProcess/mac/ViewGestureController.h:
4013         * UIProcess/mac/ViewGestureControllerMac.mm:
4014         (WebKit::ViewGestureController::beginSwipeGesture):
4015         For the modern shadow style, use a layer stretched along the edge of the swiping content
4016         with the newly added PNGs as the layer contents.
4017
4018         Add a dimming layer over the lower layer of content which fades in/out
4019         during the swipe.
4020
4021         (WebKit::ViewGestureController::handleSwipeGesture):
4022         Fade the dimming layer in and out during the entire swipe.
4023         Fade the shadow layer out during the last few pixels of the swipe.
4024
4025         (WebKit::ViewGestureController::removeSwipeSnapshot):
4026         Unparent the new layers.
4027
4028         * WebKit2.xcodeproj/project.pbxproj:
4029         * Resources/SwipeShadow.png:
4030         * Resources/SwipeShadow@2x.png:
4031         Add the new resources.
4032
4033 2015-04-14  Brian Weinstein  <bweinstein@apple.com>
4034
4035         Add SPI to clear HSTS hosts added since a date.
4036         https://bugs.webkit.org/show_bug.cgi?id=143726
4037         and
4038         rdar://problem/16664597
4039
4040         Reviewed by Anders Carlsson.
4041
4042         * UIProcess/API/C/mac/WKContextPrivateMac.h:
4043         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
4044         (WKContextResetHSTSHostsAddedAfterDate): Call into the WebProcessPool.
4045         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
4046         (WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate): Call CFNetwork SPI to clear HSTS hosts added
4047         after the given date.
4048         * UIProcess/WebProcessPool.h:
4049
4050 2015-04-14  Anders Carlsson  <andersca@apple.com>
4051
4052         More work on making the SharedMemory interface more sane
4053         https://bugs.webkit.org/show_bug.cgi?id=143718
4054
4055         Reviewed by Andreas Kling.
4056
4057         Get rid of m_shouldVMDeallocateData. The idea is that shared memory created by calling
4058         SharedMemory::allocate has a non-null m_data pointer, and a null m_port. Shared memory created
4059         by calling SharedMemory::create with a pointer and a length has a non-null port but a null m_data
4060         since the data can be unmapped by the caller and we don't want to hold on to dangling pointers.
4061
4062        &n