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