[SOUP] Use a webkit subdirectory for the disk cache
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         [SOUP] Use a webkit subdirectory for the disk cache
4         https://bugs.webkit.org/show_bug.cgi?id=144048
5
6         Reviewed by Martin Robinson.
7
8         Recent versions of libsoup remove any file in cache dir not
9         referenced by the index when the cache is loaded to workaround
10         leaked resources when load/dump is unbalanced for whatever reason,
11         like a crash. We currently use $XDG_CACHE_HOME/app-name as default
12         disk cache directory, but that directory could be used by apps to
13         cache other things, and the soup cache might end up deleting other
14         stuff. The soup cache assumes the given directory is only for the
15         disk cache, so we should ensure that.
16
17         * NetworkProcess/soup/NetworkProcessSoup.cpp:
18         (WebKit::NetworkProcess::platformInitializeNetworkProcess): Append
19         webkit to the given disk cache and clear the previous soup cache if it exists.
20         * WebProcess/soup/WebProcessSoup.cpp:
21         (WebKit::WebProcess::platformInitializeWebProcess): Ditto.
22
23 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
24
25         Unreviewed. Remove incorrect ASSERT added in r183176.
26
27         We allow to encode null attachments.
28
29         * Platform/unix/SharedMemoryUnix.cpp:
30         (WebKit::SharedMemory::Handle::releaseAttachment):
31
32 2015-04-23  Dan Bernstein  <mitz@apple.com>
33
34         <rdar://problem/20680694> Framework header postprocessing isn’t removing WK_DEPRECATED macros when it should.
35
36         Reviewed by Andy Estes.
37
38         * mac/postprocess-framework-headers.sh:
39
40 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
41
42         Make it possible to detach GraphicsLayerCA backing store
43         https://bugs.webkit.org/show_bug.cgi?id=144140
44
45         Reviewed by Tim Horton.
46         
47         This changes makes it possible to denote a GraphicsLayerCA's backing store
48         as "attached" or not. When not attached, the backing store is made volatile
49         and can be purged. This will be used in a future patch.
50
51         * Shared/mac/RemoteLayerBackingStore.mm:
52         (WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore): Whitespace.
53         (WebKit::RemoteLayerBackingStore::display): If backingStoreWillBeDisplayed()
54         returns true, this indicates that the backing store was brought out of the
55         "unreachable" list, so return true even if the backing store doesn't require
56         painting.
57         * Shared/mac/RemoteLayerBackingStoreCollection.h: C++11 initializer, and comments.
58         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
59         (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
60         (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed): Return true
61         if the caller will need to submit the backing store in the current transaction.
62         (WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable): This
63         explicit dirtying is no longer necessary given the backingStoreWillBeDisplayed() change.
64         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
65         (WebKit::applyPropertiesToLayer): Only set the layer's backing if we both have backing
66         store, and it's attached.
67         * Shared/mac/RemoteLayerTreeTransaction.h: New bit, and data member.
68         * Shared/mac/RemoteLayerTreeTransaction.mm:
69         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
70         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
71         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
72         (WebKit::dumpChangedLayers):
73         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
74         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction): Only call display()
75         on the backing store if it's attached.
76         (WebKit::PlatformCALayerRemote::setBackingStoreAttached):
77         (WebKit::PlatformCALayerRemote::backingStoreAttached):
78         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
79         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
80         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
81         (WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):
82
83 2015-04-23  Tim Horton  <timothy_horton@apple.com>
84
85         Quick Look preview popover is not dismissed on scroll in Mail
86         https://bugs.webkit.org/show_bug.cgi?id=144119
87         <rdar://problem/19752045>
88
89         Reviewed by Anders Carlsson.
90
91         * UIProcess/API/mac/WKView.mm:
92         (-[WKView renewGState]):
93         If we have a TextIndicator, dismiss all content relative child windows
94         on renewGState, not just the TextIndicator itself.
95
96         This will fix cases like Mail, where WebKit isn't driving the scrolling,
97         and we have no way (except renewGState) to know that scrolling is happening.
98
99 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
100
101         Changing TiledBacking velocity should schedule a tile revalidation
102         https://bugs.webkit.org/show_bug.cgi?id=144123
103
104         Reviewed by Tim Horton.
105         
106         Drive-by fix: use the FrameView& that we have already.
107
108         * WebProcess/WebPage/ios/WebPageIOS.mm:
109         (WebKit::WebPage::updateVisibleContentRects):
110
111 2015-04-23  Jer Noble  <jer.noble@apple.com>
112
113         [Mac] Disable QTKit by default on future OS X.
114         https://bugs.webkit.org/show_bug.cgi?id=144082
115
116         Reviewed by Darin Adler.
117
118         QTKitEnabled defaults to false.
119
120         * Shared/WebPreferencesDefinitions.h:
121
122 2015-04-23  Jer Noble  <jer.noble@apple.com>
123
124         [WK2][Mac] Tweak the timing curve of the WebKit Fullscreen animation
125         https://bugs.webkit.org/show_bug.cgi?id=144120
126
127         Reviewed by Eric Carlson.
128
129         Tweak the curve to ease-in faster when the fullscreen animation duration is short.
130
131         * UIProcess/mac/WKFullScreenWindowController.mm:
132         (timingFunctionForDuration):
133         (zoomAnimation):
134         (maskAnimation):
135         (fadeAnimation):
136
137 2015-04-23  Enrica Casucci  <enrica@apple.com>
138
139         iOS build fix after r183208.
140
141         Unreviewed.
142
143         * UIProcess/ios/WKContentViewInteraction.mm:
144
145 2015-04-22  Alexey Proskuryakov  <ap@apple.com>
146
147         [iOS] WebKit services should inherit environment variables for home
148         https://bugs.webkit.org/show_bug.cgi?id=144078
149         rdar://problem/20571678
150
151         Reviewed by Dan Bernstein.
152
153         Pass current environment variables as XPC bootstrap. Also while at it, made
154         _CFBundleSetupXPCBootstrap not soft linked.
155
156         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
157         (main):
158         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
159         (WebKit::connectToService):
160
161 2015-04-23  Enrica Casucci  <enrica@apple.com>
162
163         Support share button.
164         https://bugs.webkit.org/show_bug.cgi?id=144077
165         rdar://problem/19772892
166
167         Reviewed by Darin Adler.
168
169         * UIProcess/ios/WKContentViewInteraction.mm:
170         (-[WKContentView _share:]):
171         (-[WKContentView canPerformAction:withSender:]):
172         (-[WKContentView _define:]):
173         (-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
174         (-[WKContentView moveByOffset:]):
175         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
176         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
177         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
178         (-[WKContentView accessoryTab:]):
179         (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
180         (-[WKContentView executeEditCommandWithCallback:]):
181
182 2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
183
184         [UNIX] Do not allow copies of IPC::Attachment
185         https://bugs.webkit.org/show_bug.cgi?id=144096
186
187         Reviewed by Darin Adler.
188
189         It ensures that the file descriptor ownership is always correctly
190         transferred. This way we can remove the dispose() method to
191         explicitly close the file descriptor and always close it in the
192         Attachment destructor (unless explicitly transferred to
193         IPC::Connection or SharedMemory). It simplifies the code and
194         ensure we don't leak file descriptors.
195
196         * Platform/IPC/ArgumentDecoder.cpp:
197         (IPC::ArgumentDecoder::~ArgumentDecoder): Remove the code to
198         explicitly dispose attachments.
199         (IPC::ArgumentDecoder::removeAttachment): Use WTF::move().
200         * Platform/IPC/ArgumentEncoder.cpp:
201         (IPC::ArgumentEncoder::~ArgumentEncoder): Remove the code to
202         explicitly dispose attachments.
203         (IPC::ArgumentEncoder::addAttachment): Use WTF::move().
204         (IPC::ArgumentEncoder::releaseAttachments): Simplify by using WTF::move().
205         * Platform/IPC/ArgumentEncoder.h:
206         * Platform/IPC/Attachment.cpp:
207         (IPC::Attachment::encode): Move a copy of the attachment, and
208         reset the file descriptor, since the ownership is passed to the encoder.
209         * Platform/IPC/Attachment.h: Make copy constructor and assignment
210         private to not allow public copies. The only copy allowed is done
211         by Attachment::encode(). Make m_fileDescriptor mutable so that we
212         can reset it in Attachment::encode() after passing the ownership
213         to the encoder.
214         * Platform/IPC/unix/AttachmentUnix.cpp:
215         (IPC::Attachment::~Attachment): Close the file descriptor if it
216         hasn't been released explicitly.
217         (IPC::Attachment::dispose): Deleted.
218         * Platform/IPC/unix/ConnectionUnix.cpp:
219         (IPC::Connection::processMessage): Do not use AttachmentResourceGuard.
220         (IPC::Connection::sendOutgoingMessage): Ditto.
221         (IPC::AttachmentResourceGuard::AttachmentResourceGuard): Deleted.
222         (IPC::AttachmentResourceGuard::~AttachmentResourceGuard): Deleted.
223         * Platform/unix/SharedMemoryUnix.cpp:
224         (WebKit::SharedMemory::Handle::~Handle): Do not call clear().
225         (WebKit::SharedMemory::Handle::clear): Reset the attachment.
226         * UIProcess/WebInspectorProxy.cpp:
227         (WebKit::WebInspectorProxy::createInspectorPage): Use WTF::move().
228         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
229         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
230         Call releaseFileDescriptor() instead of fileDescritpro() since the
231         ownership is passed to the connection.
232
233 2015-04-23  Alexey Proskuryakov  <ap@apple.com>
234
235         Build fix.
236
237         * WebProcess/cocoa/WebProcessCocoa.mm: Correct the case of an include file name.
238
239 2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
240
241         Unreviewed. Fix debug build after r183176.
242
243         * Platform/unix/SharedMemoryUnix.cpp:
244         (WebKit::SharedMemory::Handle::decode):
245         (WebKit::SharedMemory::createHandle):
246
247 2015-04-23  Andreas Kling  <akling@apple.com>
248
249         There should only be one way to get the system memory size.
250         <https://webkit.org/b/144081>
251
252         Reviewed by Antti Koivisto.
253
254         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
255         (WebKit::NetworkProcess::platformSetCacheModel):
256         (WebKit::memorySize): Deleted.
257         * WebProcess/cocoa/WebProcessCocoa.mm:
258         (WebKit::WebProcess::platformSetCacheModel):
259         (WebKit::memorySize): Deleted.
260
261 2015-04-23  Chris Dumez  <cdumez@apple.com>
262
263         [WK2] WebDiagnosticLoggingClient is leaking
264         https://bugs.webkit.org/show_bug.cgi?id=144089
265         <rdar://problem/19706214>
266
267         Reviewed by Darin Adler.
268
269         WebDiagnosticLoggingClient is leaking. It is constructed inside WebPage
270         constructor but there is no code destroying it.
271
272         This patch adds a new xxxDestroyed() virtual function to
273         DiagnosticLoggingClient and that is overriden in
274         WebDiagnosticLoggingClient to call "delete this". This is the same
275         pattern as for other WK2 clients (e.g. WebFrameLoaderClient,
276         WebProgressTrackerClient).
277
278         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
279         (WebKit::WebDiagnosticLoggingClient::mainFrameDestroyed):
280         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
281
282 2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
283
284         [UNIX] Simplify the file descriptor handling in SharedMemory
285         https://bugs.webkit.org/show_bug.cgi?id=144046
286
287         Reviewed by Darin Adler.
288
289         Simplify the file descriptor handling and clarify its ownership by
290         using IPC::Attachment in SharedMemory::Handle instead of fd and
291         size members. SharedMemory::Handle::adoptFromAttachment() has been
292         renamed as SharedMemory::Handle::adoptAttachment() and receives an
293         IPC::Attachment. And SharedMemory::Handle::releaseToAttachment()
294         has been renamed as SharedMemory::Handle::releaseAttachment().
295
296         * Platform/IPC/Attachment.h: Add move constructor and move assigned operator.
297         * Platform/IPC/Connection.h:
298         (IPC::Connection::identifierIsNull): A file descriptor is null
299         when it's -1 no 0.
300         * Platform/IPC/unix/AttachmentUnix.cpp:
301         (IPC::Attachment::Attachment):
302         (IPC::Attachment::operator=):
303         (IPC::Attachment::dispose): Reset the file descriptor after
304         closing it.
305         * Platform/IPC/unix/ConnectionUnix.cpp:
306         (IPC::Connection::processMessage): Use
307         SharedMemory::Handle::adoptAttachment() that receives an
308         IPC::Attachment now.
309         (IPC::Connection::sendOutgoingMessage): Use
310         SharedMemory::Handle::releaseAttachment().
311         * Platform/SharedMemory.h:
312         * Platform/unix/SharedMemoryUnix.cpp:
313         (WebKit::SharedMemory::Handle::Handle): Remove initializers for
314         file descriptor and size members.
315         (WebKit::SharedMemory::Handle::clear): Dispose the attachment.
316         (WebKit::SharedMemory::Handle::isNull): Handle is null if the
317         attachment file descriptor is -1.
318         (WebKit::SharedMemory::Handle::encode): Use releaseAttachment().
319         (WebKit::SharedMemory::Handle::decode): Use adoptAttachment().
320         (WebKit::SharedMemory::Handle::releaseAttachment): Implement it
321         using move.
322         (WebKit::SharedMemory::Handle::adoptAttachment): Ditto.
323         (WebKit::SharedMemory::map): Use
324         IPC::Attachment::releaseFileDescriptor() instead of manually
325         changing the member.
326         (WebKit::SharedMemory::createHandle): Initialize the handle
327         attachment with the duplicated file descriptor and size.
328
329 2015-04-22  Darin Adler  <darin@apple.com>
330
331         Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
332         https://bugs.webkit.org/show_bug.cgi?id=143943
333
334         Reviewed by Anders Carlsson.
335
336         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
337         Removed unneeded include.
338
339 2015-04-22  Brent Fulgham  <bfulgham@apple.com>
340
341         VisibleSelection should only accept Range by reference
342         https://bugs.webkit.org/show_bug.cgi?id=144047
343
344         Reviewed by Tim Horton.
345
346         Update all uses of VisibleSelection to pass a Range reference instead
347         of a Range pointer.
348
349         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
350         (WebKit::InjectedBundleRangeHandle::renderedImage):
351         * WebProcess/WebPage/FindController.cpp:
352         (WebKit::FindController::getImageForFindMatch):
353         (WebKit::FindController::selectFindMatch):
354         * WebProcess/WebPage/WebPage.cpp:
355         (WebKit::WebPage::insertTextAsync):
356         (WebKit::WebPage::setCompositionAsync):
357         * WebProcess/WebPage/mac/WebPageMac.mm:
358         (WebKit::WebPage::insertDictatedTextAsync):
359
360 2015-04-22  Anders Carlsson  <andersca@apple.com>
361
362         Add WK_ARRAY and WK_SET annotations
363         https://bugs.webkit.org/show_bug.cgi?id=144075
364         rdar://problem/19417770
365
366         Reviewed by Dan Bernstein.
367
368         * Shared/API/Cocoa/WKFoundation.h:
369         * UIProcess/API/Cocoa/WKBackForwardList.h:
370         * UIProcess/API/Cocoa/WKUserContentController.h:
371         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
372         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
373         * mac/postprocess-framework-headers.sh:
374
375 2015-04-22  Brent Fulgham  <bfulgham@apple.com>
376
377         Unreviewed build fix after r183136.
378
379         * WebProcess/WebPage/mac/WebPageMac.mm: Correct capitalization of
380         'HTMLPluginImageElement.h' -> 'HTMLPlugInImageElement.h'
381
382 2015-04-21  Brent Fulgham  <bfulgham@apple.com>
383
384         Extend action menus to support PDF
385         https://bugs.webkit.org/show_bug.cgi?id=143895
386         <rdar://problem/19003333>
387
388         Reviewed by Tim Horton.
389
390         If the mouse pointer is over a PDF, try to provide a relevant action menu for whatever
391         content is under the mouse. For now, we only support copying text and handling URLs.
392
393         If no text is selected, use the dictionary lookup service to find a semantically appropriate
394         selection underneath the mouse. This is consistent with how normal text is treated in pure HTML
395         views. If some text is already selected, and the mouse is over the existing selection, continue
396         using the selected text. Otherwise, discard the old selection and select the most appropriate
397         region under the mouse pointer.
398
399         * Shared/API/c/WKActionMenuTypes.h: Add PDF menu option.
400         * Shared/WebMouseEvent.cpp: Recognize mouse force events as valid mouse events.
401         * UIProcess/mac/WKActionMenuController.mm:
402         (-[WKActionMenuController _defaultMenuItemsForPDF]): Add simply copy text option.
403         (-[WKActionMenuController _defaultMenuItems]): Recognize PDFs and add relevant action
404         menu entries.
405         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Provide stub for new method.
406         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Expose 'rectsForSelectionInLayerSpace',
407         'rectsForAnnotationInLayoutSpace', 'layout', and 'currentPage'.
408         * WebProcess/Plugins/PDF/PDFPlugin.h:
409         * WebProcess/Plugins/PDF/PDFPlugin.mm:
410         (WebKit::PDFPlugin::getSelectionForWordAtPoint): Added.
411         (WebKit::PDFPlugin::existingSelectionContainsPoint): Added.
412         (WebKit::PDFPlugin::lookupTextAtLocation): Added.
413         * WebProcess/Plugins/Plugin.h: Add declaration for new 'getSelectionForWordAtPoint' method.
414         * WebProcess/Plugins/PluginProxy.h: Provide stub for new method.
415         * WebProcess/Plugins/PluginView.cpp:
416         (WebKit::PluginView::getSelectionForWordAtPoint): Added.
417         (WebKit::PluginView::existingSelectionContainsPoint): Added.
418         (WebKit::PluginView::lookupTextAtLocation): Added.
419         * WebProcess/Plugins/PluginView.h:
420         * WebProcess/WebPage/mac/WebPageMac.mm:
421         (WebKit::WebPage::performActionMenuHitTestAtLocation): Update to support PDF documents and retrieve
422         relevant content to support later action menu handling.
423
424 2015-04-22  Eric Carlson  <eric.carlson@apple.com>
425
426         Update AirPlay sandbox rules
427         https://bugs.webkit.org/show_bug.cgi?id=144062
428         <rdar://problem/19869448>
429
430         Reviewed by Alexey Proskuryakov.
431
432         * WebProcess/com.apple.WebProcess.sb.in: Remove obsolete rules.
433
434 2015-04-22  Alexey Proskuryakov  <ap@apple.com>
435
436         [Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
437         https://bugs.webkit.org/show_bug.cgi?id=144052
438         rdar://problem/19754404
439
440         Reviewed by Darin Adler.
441
442         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
443         (main): Make XPC transaction tracking work again after a re-exec.
444
445 2015-04-22  Zan Dobersek  <zdobersek@igalia.com>
446
447         [WK2] Have API::Array creation methods return Ref<>
448         https://bugs.webkit.org/show_bug.cgi?id=143933
449
450         Reviewed by Darin Adler.
451
452         API::Array::create() and API::Array::createStringArray() should return Ref<> objects
453         as the return values are never null. It's up to the caller to implicitly convert the
454         returned objects to RefPtr<> if so required. All the call-sites have been updated to
455         reflect that.
456
457         * Shared/API/APIArray.cpp:
458         (API::Array::create):
459         (API::Array::createStringArray):
460         (API::Array::copy):
461         * Shared/API/APIArray.h:
462         * Shared/API/APIDictionary.cpp:
463         (API::Dictionary::keys):
464         * Shared/API/APIDictionary.h:
465         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
466         (ensureObjectStream):
467         * Shared/API/c/WKArray.cpp:
468         (WKArrayCreate):
469         (WKArrayCreateAdoptingValues):
470         * Shared/API/c/WKContextMenuItem.cpp:
471         (WKContextMenuCopySubmenuItems):
472         * Shared/API/c/WKDictionary.cpp:
473         (WKDictionaryCopyKeys):
474         * Shared/API/c/WKMutableArray.cpp:
475         (WKMutableArrayCreate):
476         * Shared/Cocoa/WKNSDictionary.mm:
477         (-[WKNSDictionary keyEnumerator]):
478         * Shared/SecurityOriginData.cpp:
479         (WebKit::performAPICallbackWithSecurityOriginDataVector):
480         * Shared/WebContextMenuItem.cpp:
481         (WebKit::WebContextMenuItem::submenuItemsAsAPIArray):
482         * Shared/WebContextMenuItem.h:
483         * Shared/WebOpenPanelParameters.cpp:
484         (WebKit::WebOpenPanelParameters::acceptMIMETypes):
485         (WebKit::WebOpenPanelParameters::selectedFileNames):
486         * Shared/WebOpenPanelParameters.h:
487         * UIProcess/API/C/WKBackForwardListRef.cpp:
488         (WKBackForwardListCopyBackListWithLimit):
489         (WKBackForwardListCopyForwardListWithLimit):
490         * UIProcess/API/C/WKGrammarDetail.cpp:
491         (WKGrammarDetailCopyGuesses):
492         * UIProcess/API/C/WKOpenPanelParameters.cpp:
493         (WKOpenPanelParametersCopyAcceptedMIMETypes):
494         (WKOpenPanelParametersCopySelectedFileNames):
495         * UIProcess/API/C/WKPage.cpp:
496         (WKPageSetPageContextMenuClient):
497         (WKPageCopyRelatedPages):
498         * UIProcess/API/Cocoa/WKBackForwardList.mm:
499         (-[WKBackForwardList backList]):
500         (-[WKBackForwardList forwardList]):
501         * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
502         (createWKArray):
503         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
504         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
505         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
506         (webkit_back_forward_list_get_back_list_with_limit):
507         (webkit_back_forward_list_get_forward_list_with_limit):
508         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
509         (webkit_file_chooser_request_get_mime_types):
510         (webkit_file_chooser_request_get_mime_types_filter):
511         (webkit_file_chooser_request_select_files):
512         * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
513         (WebKitNotificationProvider::notificationCloseCallback):
514         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
515         (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
516         * UIProcess/Notifications/WebNotificationProvider.cpp:
517         (WebKit::WebNotificationProvider::clearNotifications):
518         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
519         (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
520         * UIProcess/StatisticsRequest.cpp:
521         (WebKit::StatisticsRequest::completedRequest):
522         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
523         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
524         * UIProcess/WebBackForwardList.cpp:
525         (WebKit::WebBackForwardList::backList):
526         (WebKit::WebBackForwardList::forwardList):
527         (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit):
528         (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit):
529         * UIProcess/WebBackForwardList.h:
530         * UIProcess/WebCookieManagerProxy.cpp:
531         (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
532         * UIProcess/WebDatabaseManagerProxy.cpp:
533         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
534         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
535         * UIProcess/WebGrammarDetail.cpp:
536         (WebKit::WebGrammarDetail::guesses):
537         * UIProcess/WebGrammarDetail.h:
538         * UIProcess/WebKeyValueStorageManager.cpp:
539         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
540         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
541         * UIProcess/WebMediaCacheManagerProxy.cpp:
542         (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
543         * UIProcess/WebOriginDataManagerProxy.cpp:
544         (WebKit::WebOriginDataManagerProxy::didGetOrigins):
545         * UIProcess/WebPageProxy.cpp:
546         (WebKit::WebPageProxy::didFindStringMatches):
547         * UIProcess/WebProcessPool.cpp:
548         (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins):
549         * UIProcess/ios/forms/WKFileUploadPanel.mm:
550         (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
551         (-[WKFileUploadPanel presentWithParameters:resultListener:]):
552         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
553         (-[WKWebProcessPlugInFrame childFrames]):
554         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
555         (WKBundleBackForwardListItemCopyChildren):
556         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
557         (WKBundleFrameCopyChildFrames):
558         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
559         (WKBundlePageCopyTrackedRepaintRects):
560         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
561         (WebKit::InjectedBundleBackForwardListItem::children):
562         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
563         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
564         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
565         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
566         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
567         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
568         (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
569         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
570         (WebKit::findLargestFrameInFrameSet):
571         * WebProcess/WebPage/WebFrame.cpp:
572         (WebKit::WebFrame::childFrames):
573         * WebProcess/WebPage/WebFrame.h:
574         * WebProcess/WebPage/WebPage.cpp:
575         (WebKit::WebPage::trackedRepaintRects):
576         * WebProcess/WebPage/WebPage.h:
577
578 2015-04-21  Eric Carlson  <eric.carlson@apple.com>
579
580         [Mac] Use one playback target for all web processes
581         https://bugs.webkit.org/show_bug.cgi?id=144009
582
583         Reviewed by Tim Horton.
584
585         Every WebPageProxy uses the WebMediaSessionManager singleton to talk to the playback target
586         picker.
587
588         * UIProcess/PageClient.h:
589         * UIProcess/WebPageProxy.cpp:
590         (WebKit::WebPageProxy::WebPageProxy):
591         (WebKit::WebPageProxy::resetState):
592         (WebKit::WebPageProxy::isPlayingMediaDidChange):
593         (WebKit::WebPageProxy::addPlaybackTargetPickerClient):
594         (WebKit::WebPageProxy::removePlaybackTargetPickerClient):
595         (WebKit::WebPageProxy::showPlaybackTargetPicker):
596         (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
597         (WebKit::WebPageProxy::setPlaybackTarget):
598         (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
599         (WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
600         (WebKit::WebPageProxy::devicePickerProxy): Deleted.
601         (WebKit::WebPageProxy::startingMonitoringPlaybackTargets): Deleted.
602         (WebKit::WebPageProxy::stopMonitoringPlaybackTargets): Deleted.
603         (WebKit::WebPageProxy::didChoosePlaybackTarget): Deleted.
604         * UIProcess/WebPageProxy.h:
605         (WebKit::WebPageProxy::isPlayingAudio):
606         * UIProcess/WebPageProxy.messages.in:
607         * UIProcess/mac/PageClientImpl.h:
608         * UIProcess/mac/PageClientImpl.mm:
609         (WebKit::PageClientImpl::mediaSessionManager):
610         (WebKit::PageClientImpl::createPlaybackTargetPicker): Deleted.
611         * UIProcess/mac/WebMediaSessionManagerMac.cpp: Added.
612         (WebKit::WebMediaSessionManagerMac::singleton):
613         (WebKit::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
614         (WebKit::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
615         (WebKit::WebMediaSessionManagerMac::targetPicker):
616         * UIProcess/mac/WebMediaSessionManagerMac.h: Added.
617         * WebProcess/Plugins/PluginView.h:
618         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
619         (WebKit::WebChromeClient::isPlayingMediaDidChange):
620         (WebKit::WebChromeClient::addPlaybackTargetPickerClient):
621         (WebKit::WebChromeClient::removePlaybackTargetPickerClient):
622         (WebKit::WebChromeClient::showPlaybackTargetPicker):
623         (WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
624         (WebKit::WebChromeClient::startingMonitoringPlaybackTargets): Deleted.
625         (WebKit::WebChromeClient::stopMonitoringPlaybackTargets): Deleted.
626         * WebProcess/WebCoreSupport/WebChromeClient.h:
627         * WebProcess/WebPage/WebPage.h:
628         * WebProcess/WebPage/WebPage.messages.in:
629         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
630         (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
631         * WebProcess/WebPage/mac/WebPageMac.mm:
632         (WebKit::WebPage::playbackTargetSelected):
633         (WebKit::WebPage::playbackTargetAvailabilityDidChange):
634         (WebKit::WebPage::setShouldPlayToPlaybackTarget):
635
636 2015-04-21  Anders Carlsson  <andersca@apple.com>
637
638         WKWebsiteDataStore doesn't track and remove IndexedDB databases
639         https://bugs.webkit.org/show_bug.cgi?id=144032
640         rdar://problem/20242856
641
642         Reviewed by Tim Horton.
643
644         * DatabaseProcess/DatabaseProcess.cpp:
645         (WebKit::DatabaseProcess::fetchWebsiteData):
646         (WebKit::DatabaseProcess::deleteWebsiteData):
647         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
648         * DatabaseProcess/DatabaseProcess.h:
649         * DatabaseProcess/DatabaseProcess.messages.in:
650         * Shared/WebsiteData/WebsiteDataTypes.h:
651         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
652         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
653         (dataTypesToString):
654         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
655         (WebKit::toWebsiteDataTypes):
656         (WebKit::toWKWebsiteDataTypes):
657         * UIProcess/Databases/DatabaseProcessProxy.cpp:
658         (WebKit::generateCallbackID):
659         (WebKit::DatabaseProcessProxy::~DatabaseProcessProxy):
660         (WebKit::DatabaseProcessProxy::fetchWebsiteData):
661         (WebKit::DatabaseProcessProxy::deleteWebsiteData):
662         (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
663         (WebKit::DatabaseProcessProxy::didClose):
664         (WebKit::DatabaseProcessProxy::didFetchWebsiteData):
665         (WebKit::DatabaseProcessProxy::didDeleteWebsiteData):
666         (WebKit::DatabaseProcessProxy::didDeleteWebsiteDataForOrigins):
667         * UIProcess/Databases/DatabaseProcessProxy.h:
668         * UIProcess/Databases/DatabaseProcessProxy.messages.in:
669         * UIProcess/WebProcessPool.h:
670         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
671         (WebKit::WebsiteDataStore::fetchData):
672         (WebKit::WebsiteDataStore::removeData):
673
674 2015-04-21  Anders Carlsson  <andersca@apple.com>
675
676         Add module maps for WebKit
677         https://bugs.webkit.org/show_bug.cgi?id=144026
678         rdar://problem/19665428
679
680         Reviewed by Dan Bernstein.
681
682         * Configurations/WebKit.xcconfig:
683         * Modules/OSX.modulemap: Added.
684         * Modules/iOS.modulemap: Added.
685
686 2015-04-21  Tim Horton  <timothy_horton@apple.com>
687
688         Long pause under _takeViewSnapshot when screen updates are disabled
689         https://bugs.webkit.org/show_bug.cgi?id=144017
690         <rdar://problem/20548397>
691
692         Reviewed by Simon Fraser.
693
694         * UIProcess/API/mac/WKView.mm:
695         (-[WKView _takeViewSnapshot]):
696         Use CGSHWCaptureWindowList, for snapshotting that doesn't block on
697         the next commit, and can succeed while screen updates are disabled
698         without blocking.
699
700 2015-04-21  Chris Dumez  <cdumez@apple.com>
701
702         [WK2][NetworkCache] Better account of resource revalidations in efficacy logging
703         https://bugs.webkit.org/show_bug.cgi?id=144014
704
705         Reviewed by Antti Koivisto.
706
707         Better account of resource revalidations in efficacy logging.
708         Prevously, resources that were in the cache but needed revalidation
709         were counted as retrieval successes, which is not entirely accurate.
710
711         We now distinguish "is in the cache and is directly usable" from
712         "is in the cache but needs revalidation". We also log how many of these
713         revalidations are successful.
714
715         * NetworkProcess/NetworkResourceLoader.cpp:
716         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
717         * NetworkProcess/cache/NetworkCache.cpp:
718         (WebKit::NetworkCache::Cache::update):
719         * NetworkProcess/cache/NetworkCache.h:
720         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
721         (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
722         (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
723         * NetworkProcess/cache/NetworkCacheStatistics.h:
724
725 2015-04-21  Dan Bernstein  <mitz@apple.com>
726
727         [Cocoa] Framework header postprocessing should respect additional definitions
728         https://bugs.webkit.org/show_bug.cgi?id=144018
729
730         Reviewed by Anders Carlsson.
731
732         * mac/postprocess-framework-headers.sh: Read definitons from
733         /usr/local/include/WebKitAdditions/Scripts/postprocess-framework-headers-definitions, and
734         have them take precedence over OSX_VERSION and IOS_VERSION and supply additional options to
735         sed.
736
737 2015-04-21  Anders Carlsson  <andersca@apple.com>
738
739         Fix block signatures
740         https://bugs.webkit.org/show_bug.cgi?id=144002
741
742         Reviewed by Andreas Kling.
743
744         * UIProcess/API/Cocoa/WKUIDelegate.h:
745         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
746         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
747         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
748         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
749         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
750         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
751         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
752         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
753         * UIProcess/ios/WKPDFView.mm:
754         (-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]):
755         * UIProcess/ios/forms/WKFileUploadPanel.mm:
756         (-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
757         (-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
758         (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
759
760 2015-04-21  Timothy Horton  <timothy_horton@apple.com>
761
762         PDFs still don't snapshot properly in iOS Safari
763         https://bugs.webkit.org/show_bug.cgi?id=143976
764         <rdar://problem/18283459>
765
766         Reviewed by Anders Carlsson.
767
768         * UIProcess/WebPageProxy.cpp:
769         (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
770         * UIProcess/WebPageProxy.h:
771         * UIProcess/API/Cocoa/WKWebView.mm:
772         (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
773         Inform the client that we've passed all reasonable layout milestones
774         as soon as the custom content provider has been handed its data.
775         WKPDFView, the only custom content provider, synchronously lays out
776         its subviews upon initial receipt of data, so this works fine for it.
777         This ensures that clients that normally depend on layout milestones firing
778         won't break when a custom content view is installed.
779
780         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
781         Fall back to renderInContext: if the custom content view is not parented
782         when a snapshot is requested.
783
784 2015-04-21  Dan Bernstein  <mitz@apple.com>
785
786         Merged WKBackForwardListItem’s Internal category into the class extension in WKBackForwardListItemInternal.h.
787
788         Reviewed by Anders Carlsson.
789
790         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
791         (-[WKBackForwardListItem _item]):
792         (-[WKBackForwardListItem _apiObject]):
793         * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
794
795 2015-04-21  Chris Dumez  <cdumez@apple.com>
796
797         Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
798         https://bugs.webkit.org/show_bug.cgi?id=143970
799
800         Reviewed by Darin Adler.
801
802         Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
803         constructor explicit as it copies the vector and it is easy to call it
804         by mistake.
805
806         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
807         (WebKit::WebIDBServerConnection::setIndexKeys):
808         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
809
810 2015-04-20  Dan Bernstein  <mitz@apple.com>
811
812         Expose more bundle form client functions as WKWebProcessPlugInFormDelegatePrivate methods
813         https://bugs.webkit.org/show_bug.cgi?id=143973
814
815         Reviewed by Anders Carlsson.
816
817         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared new
818         delegate methods.
819
820         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Declared new frame
821         property.
822         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
823         (-[WKWebProcessPlugInNodeHandle frame]): Added. Returns the node’s document’s frame. This is
824         useful to delegates getting an array of nodes via the new method.
825
826         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
827         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added overrides of
828         shouldNotifyOnFormChanges and didAssociateFormControls, which call the new delegate methods.
829
830 2015-04-20  Joseph Pecoraro  <pecoraro@apple.com>
831
832         Cleanup some StringBuilder use
833         https://bugs.webkit.org/show_bug.cgi?id=143550
834
835         Reviewed by Darin Adler.
836
837         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
838         (WebKit::buildObjectStoreStatement):
839         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
840         (WebKit::v2RecordsTableSchema):
841         * Shared/Databases/IndexedDB/IDBUtilities.cpp:
842         (WebKit::uniqueDatabaseIdentifier):
843         * UIProcess/API/APIUserScript.cpp:
844         (API::UserScript::generateUniqueURL):
845         * UIProcess/WebProcessPool.cpp:
846         (WebKit::WebProcessPool::didReceiveInvalidMessage):
847         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
848         (WebKit::combinedSecurityOriginIdentifier):
849
850 2015-04-20  Anders Carlsson  <andersca@apple.com>
851
852         Modify the WKWebsiteDataStore API to take a NSSet of types instead of a bitmask
853         https://bugs.webkit.org/show_bug.cgi?id=143966
854
855         Reviewed by Dan Bernstein.
856
857         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
858         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
859         (dataTypesToString):
860         (-[WKWebsiteDataRecord dataTypes]):
861         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
862         (WebKit::toWebsiteDataTypes):
863         (WebKit::toWKWebsiteDataTypes):
864         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
865         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
866         (+[WKWebsiteDataStore allWebsiteDataTypes]):
867         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
868         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
869         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
870         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
871         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
872         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
873         (toWKWebsiteDataTypes):
874         (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
875         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
876         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
877
878 2015-04-20  Beth Dakin  <bdakin@apple.com>
879
880         Should remove mouseForceClick and mouseForceCancelled from DOM force events
881         https://bugs.webkit.org/show_bug.cgi?id=143904
882         -and corresponding-
883         rdar://problem/20578842
884
885         Reviewed by Dan Bernstein.
886
887         * WebProcess/WebPage/mac/WebPageMac.mm:
888         (WebKit::WebPage::immediateActionDidCancel):
889
890 2015-04-20  Tim Horton  <timothy_horton@apple.com>
891
892         Implement immediate action support for tel: and mailto: URLs
893         https://bugs.webkit.org/show_bug.cgi?id=143916
894         <rdar://problem/19721711>
895
896         Reviewed by Darin Adler.
897
898         * Shared/API/c/WKImmediateActionTypes.h:
899         * UIProcess/mac/WKImmediateActionController.mm:
900         (-[WKImmediateActionController _defaultAnimationController]):
901         (-[WKImmediateActionController _animationControllerForDataDetectedText]):
902         (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
903         (-[WKImmediateActionController _menuItemForDataDetectedText]): Deleted.
904         Add _animationControllerForDataDetectedLink and use it when
905         building immediate actions for tel: and mailto: links.
906
907 2015-04-20  Alex Christensen  <achristensen@webkit.org>
908
909         Properly report errors from _WKUserContentExtensionStore.
910         https://bugs.webkit.org/show_bug.cgi?id=143808
911
912         Reviewed by Darin Adler.
913
914         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
915         (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
916         (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
917         (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
918
919 2015-04-18  Simon Fraser  <simon.fraser@apple.com>
920
921         REGRESSION (r181656): Animated tiled layers are missing content
922         https://bugs.webkit.org/show_bug.cgi?id=143911
923         rdar://problem/20596328
924
925         Reviewed by Darin Adler.
926         
927         After r181656, all requestAnimationFrame was falling back to timers, and not
928         using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
929         fumble.
930         
931         Replace this confusing Optional<> code with simpler code that just forces the
932         clients to make a DisplayRefreshMonitor if they can, first asking
933         ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().
934         
935         Make lots of things into references, and use C++11 initialization in some places.
936
937         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
938         (WebKit::WebChromeClient::createDisplayRefreshMonitor):
939         * WebProcess/WebCoreSupport/WebChromeClient.h:
940
941 2015-04-18  Dan Bernstein  <mitz@apple.com>
942
943         SwipeShadow images are installed on iOS
944         https://bugs.webkit.org/show_bug.cgi?id=143915
945
946         Reviewed by Tim Horton.
947
948         * Configurations/WebKit.xcconfig: Added Resources/Mac/* to
949         EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*]. We could move more resources there and remove
950         individual patterns.
951         * Resources/SwipeShadow.png: Moved to mac.
952         * Resources/SwipeShadow@2x.png: Moved to mac.
953         * Resources/mac: Added.
954         * Resources/mac/SwipeShadow.png: Moved from Source/WebKit2/Resources/SwipeShadow.png.
955         * Resources/mac/SwipeShadow@2x.png: Moved from Source/WebKit2/Resources/SwipeShadow@2x.png.
956         * WebKit2.xcodeproj/project.pbxproj: Created mac group in the Resources group and moved
957         SwipeShadow*.png into it. Updated for file moves.
958
959 2015-04-18  Chris Dumez  <cdumez@apple.com>
960
961         Fix NetworkCache Statistics database bootstrapping after r182803
962         https://bugs.webkit.org/show_bug.cgi?id=143890
963
964         Reviewed by Darin Adler.
965
966         Update the NetworkCache Statistics database bootstrapping code to use
967         the records path instead of the version path. Also check that the
968         filenames in the folder are valid hashes to discard the *-body files.
969
970         * NetworkProcess/cache/NetworkCache.cpp:
971         (WebKit::NetworkCache::Cache::recordsPath):
972         (WebKit::NetworkCache::Cache::storagePath): Deleted.
973         * NetworkProcess/cache/NetworkCache.h:
974         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
975         (WebKit::NetworkCache::Statistics::initialize):
976         (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
977         (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
978
979 2015-04-17  Tim Horton  <timothy_horton@apple.com>
980
981         Clients sometimes block for 500ms in waitForPossibleGeometryUpdates
982         https://bugs.webkit.org/show_bug.cgi?id=143901
983         <rdar://problem/20488655>
984
985         Reviewed by Anders Carlsson.
986
987         * Platform/IPC/Connection.cpp:
988         (IPC::Connection::waitForMessage):
989         InterruptWaitingIfSyncMessageArrives already cancels waitForMessage if
990         a sync message arrives while waiting, but it should also avoid waiting
991         if there's a sync message already in the queue when the waiting starts,
992         as that will have the same nasty effect.
993
994         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
995         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
996         If a synchronous message comes in from the Web process while we're waiting,
997         cancel our synchronous wait for DidUpdateGeometry. This will cause the size
998         change to not synchronize with the Web process' painting, but that is better
999         than pointlessly blocking for 500ms.
1000
1001 2015-04-17  Chris Dumez  <cdumez@apple.com>
1002
1003         Possible null pointer dereference in WebDiagnosticLoggingClient::logDiagnosticMessageWithValue()
1004         https://bugs.webkit.org/show_bug.cgi?id=143899
1005         <rdar://problem/20584215>
1006
1007         Reviewed by Anders Carlsson.
1008
1009         WebDiagnosticLoggingClient::logDiagnosticMessage*() methods failed to
1010         check that m_page.corePage() was non-null before dereferencing, thus
1011         causing crashes when it is null.
1012
1013         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
1014         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
1015         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
1016         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
1017
1018 2015-04-17  Yongjun Zhang  <yongjun_zhang@apple.com>
1019
1020         WebKit client should be able to add view controller for link preview.
1021         https://bugs.webkit.org/show_bug.cgi?id=143686
1022
1023         Add delegate methods to WKUIDelegatePrivate so that a WebKit client can prepare a view controller
1024         for link preview and react to the dismissal of this view controller. Also connect WKContentView to
1025         preview gesture recognizer and forwards the delegate callbacks to corresponding delegate methods
1026         in WKUIDelegatePrivate.
1027
1028         Reviewed by Beth Dakin.
1029
1030         * Platform/spi/ios/UIKitSPI.h:
1031         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1032         * UIProcess/ios/WKContentView.mm:
1033         (-[WKContentView willMoveToWindow:]):
1034         * UIProcess/ios/WKContentViewInteraction.h:
1035         * UIProcess/ios/WKContentViewInteraction.mm:
1036         (-[WKContentView cleanupInteraction]):
1037         (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
1038         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
1039         (-[WKContentView gestureRecognizerShouldBegin:]):
1040         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
1041         (-[WKContentView commitPreviewViewController:]):
1042         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
1043         (-[WKContentView didDismissPreviewViewController:committing:]):
1044
1045 2015-04-17  Beth Dakin  <bdakin@apple.com>
1046
1047         Force mouse events should go through normal mouse event handling code paths
1048         https://bugs.webkit.org/show_bug.cgi?id=143749
1049         -and corresponding-
1050         rdar://problem/20472895
1051
1052         Reviewed by Dean Jackson.
1053
1054         This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the 
1055         NSEventTypePressures that is gets and sends those down to the web process.
1056
1057         Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an 
1058         NSEventTypePressure, the new name makes it clear how the second parameter differs 
1059         from the first.
1060         * Shared/NativeWebMouseEvent.h:
1061
1062         New event types for the new types of events.
1063         * Shared/WebEvent.h:
1064         * Shared/WebEventConversion.cpp:
1065         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
1066         * Shared/mac/NativeWebMouseEventMac.mm:
1067         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
1068         * Shared/mac/WebEventFactory.h:
1069
1070         All of the square-peg, round-hole problems of massaging the NSEventTypePressures 
1071         events into WebMouseEvents is taken care of here.
1072         * Shared/mac/WebEventFactory.mm:
1073         (WebKit::mouseButtonForEvent):
1074         (WebKit::globalPointForEvent):
1075         (WebKit::pointForEvent):
1076         (WebKit::WebEventFactory::createWebMouseEvent):
1077
1078         Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent 
1079         and handle it.
1080         * UIProcess/API/mac/WKView.mm:
1081         (-[WKView pressureChangeWithEvent:]):
1082
1083         Handle the new types.
1084         * UIProcess/WebPageProxy.cpp:
1085         (WebKit::WebPageProxy::didReceiveEvent):
1086
1087         Can delete inputDeviceForceDidChange since it’s no longer used.
1088         (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
1089         * UIProcess/WebPageProxy.h:
1090
1091         Handle the new types of mouse events properly.
1092         * WebProcess/WebPage/WebPage.cpp:
1093         (WebKit::handleMouseEvent):
1094
1095         Delete inputDeviceForceDidChange() and m_lastForceStage.
1096         * WebProcess/WebPage/WebPage.h:
1097         * WebProcess/WebPage/WebPage.messages.in:
1098         * WebProcess/WebPage/mac/WebPageMac.mm:
1099         (WebKit::WebPage::inputDeviceForceDidChange): Deleted.
1100
1101         Handle new WebEvent types.
1102         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1103
1104 2015-04-17  Commit Queue  <commit-queue@webkit.org>
1105
1106         Unreviewed, rolling out r182912 and r182920.
1107         https://bugs.webkit.org/show_bug.cgi?id=143881
1108
1109         Build breakage in some configurations (Requested by ap on
1110         #webkit).
1111
1112         Reverted changesets:
1113
1114         "Force mouse events should go through normal mouse event
1115         handling code paths"
1116         https://bugs.webkit.org/show_bug.cgi?id=143749
1117         http://trac.webkit.org/changeset/182912
1118
1119         http://trac.webkit.org/changeset/182920
1120
1121 2015-04-17  Antti Koivisto  <antti@apple.com>
1122
1123         Network Cache: Read resource record and body in parallel
1124         https://bugs.webkit.org/show_bug.cgi?id=143879
1125
1126         Reviewed by Chris Dumez.
1127
1128         We currently first fetch the record file and then fetch the body blob if needed.
1129         We can do both operations in parallel to reduce latency.
1130
1131         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
1132         (WebKit::NetworkCache::traverseCacheFiles):
1133
1134             Do all validation in the client.
1135
1136         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1137         (WebKit::NetworkCache::Storage::synchronize):
1138
1139             Maintain a bloom filter that contains the body blobs to avoid unnecessary IO attempts.
1140             Delete any unknown file in cache directory.
1141
1142         (WebKit::NetworkCache::Storage::addToRecordFilter):
1143
1144             More informative name for record filter.
1145
1146         (WebKit::NetworkCache::Storage::mayContain):
1147         (WebKit::NetworkCache::Storage::readRecord):
1148         (WebKit::NetworkCache::Storage::storeBodyAsBlob):
1149         (WebKit::NetworkCache::Storage::dispatchReadOperation):
1150
1151             Start record read IO and body blob read IO in parallel.
1152
1153         (WebKit::NetworkCache::Storage::finishReadOperation):
1154
1155             The read is finished when we have both the record and the blob.
1156
1157         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
1158         (WebKit::NetworkCache::Storage::retrieve):
1159         (WebKit::NetworkCache::Storage::store):
1160         (WebKit::NetworkCache::Storage::traverse):
1161         (WebKit::NetworkCache::Storage::clear):
1162         (WebKit::NetworkCache::Storage::shrink):
1163         (WebKit::NetworkCache::Storage::addToContentsFilter): Deleted.
1164         (WebKit::NetworkCache::Storage::decodeRecord): Deleted.
1165         * NetworkProcess/cache/NetworkCacheStorage.h:
1166         (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
1167
1168             ReadOperation is now mutable and gathers the read result.
1169
1170 2015-04-16  Anders Carlsson  <andersca@apple.com>
1171
1172         Stop installing WebKit2.framework
1173         https://bugs.webkit.org/show_bug.cgi?id=143860
1174         rdar://problem/18298491
1175
1176         Reviewed by Dan Bernstein.
1177
1178         * Configurations/WebKit2.xcconfig:
1179         Set SKIP_INSTALL=YES for all SDKs except 10.9 where we still need it.
1180
1181 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1182
1183         Unreviewed. Fix the build with ENABLE(NETWORK_CACHE) and !ENABLE(SHAREABLE_RESOURCE).
1184
1185         * NetworkProcess/cache/NetworkCacheEntry.cpp:
1186         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
1187         (WebKit::NetworkCache::fileTimes): There's no st_birthtime in Linux.
1188
1189 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1190
1191         [SOUP] ResourceRequest cache policy is not encoded/decoded in IPC messages
1192         https://bugs.webkit.org/show_bug.cgi?id=143867
1193
1194         Reviewed by Sergio Villar Senin.
1195
1196         Encode/Decode the ResourceRequest cache policy.
1197
1198         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
1199         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
1200         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
1201
1202 2015-04-16  Sungmann Cho  <sungmann.cho@navercorp.com>
1203
1204         Use UNUSED_PARAM instead of the void casting to suppress unused parameter warnings.
1205         https://bugs.webkit.org/show_bug.cgi?id=143750
1206
1207         Reviewed by Darin Adler.
1208
1209         No new tests, no behavior change.
1210
1211         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
1212         (WebKit::NotificationPermissionRequestManager::NotificationPermissionRequestManager):
1213
1214 2015-04-16  Brady Eidson  <beidson@apple.com>
1215
1216         Compiling a content extension fails when user's home directory is on a different volume from /var/tmp.
1217         https://bugs.webkit.org/show_bug.cgi?id=143834
1218
1219         Reviewed by Anders Carlsson.
1220
1221         * UIProcess/API/APIUserContentExtensionStore.cpp:
1222         (API::compiledToFile): Use moveFile() instead of renameFile()
1223
1224 2015-04-16  Anders Carlsson  <andersca@apple.com>
1225
1226         Deprecate _WKWebsiteDataStore in favor of WKWebsiteDataStore
1227         https://bugs.webkit.org/show_bug.cgi?id=143844
1228
1229         Reviewed by Dan Bernstein.
1230
1231         * Shared/API/Cocoa/WKFoundation.h:
1232         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1233         (-[WKWebViewConfiguration _validate]):
1234         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1235         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
1236         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1237         * mac/postprocess-framework-headers.sh:
1238
1239 2015-04-16  Alex Christensen  <achristensen@webkit.org>
1240
1241         Removed unused WKUserContentFilterRef.
1242         https://bugs.webkit.org/show_bug.cgi?id=143852
1243
1244         Reviewed by Sam Weinig.
1245
1246         * Shared/WebCompiledContentExtension.cpp:
1247         (WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient): Deleted.
1248         (WebKit::LegacyContentExtensionCompilationClient::writeBytecode): Deleted.
1249         (WebKit::LegacyContentExtensionCompilationClient::writeActions): Deleted.
1250         (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData): Deleted.
1251         * Shared/WebCompiledContentExtension.h:
1252         * UIProcess/API/C/WKUserContentFilterRef.cpp: Removed.
1253         * UIProcess/API/C/WKUserContentFilterRef.h: Removed.
1254         * UIProcess/API/C/WebKit2_C.h:
1255         * UIProcess/API/Cocoa/_WKUserContentFilter.h:
1256         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
1257         (-[_WKUserContentFilter initWithName:serializedRules:]): Deleted.
1258         * WebKit2.xcodeproj/project.pbxproj:
1259
1260 2015-04-16  Beth Dakin  <bdakin@apple.com>
1261
1262         Rubber-stamped by Tim Horton.
1263
1264         Fixing a small mistake in http://trac.webkit.org/changeset/182912 which should 
1265         make sure to use the most up-to-date pressure information when setting the force 
1266         on a WebMouseEvent.
1267
1268         * Shared/mac/WebEventFactory.mm:
1269         (WebKit::WebEventFactory::createWebMouseEvent):
1270
1271 2015-04-13  Jer Noble  <jer.noble@apple.com>
1272
1273         [iOS] When simultaneously exiting-and-entering fullscreen, WebVideoFullscreenManager/Proxy becomes confused about what video element it represents.
1274         https://bugs.webkit.org/show_bug.cgi?id=143680
1275
1276         Reviewed by Simon Fraser.
1277
1278         The original assumption of WebVideoFullscreenManager and -Proxy was that the two classes would represent a
1279         single video element and its full screen state. With multiple animations in and out of fullscreen combined with
1280         multiple fullscreen modes, this assumption no longer holds true.
1281
1282         Rather than having a WebVideoFullscreenManager which /isa/ WebVideoFullscreenModelVideoElement, the manager now
1283         /hasa/ WebVideoFullscreenModelVideoElement (or has many such models). Ditto for WebVideoFullscreenManager and
1284         WebVideoFullscreenInterfaceAVKit. The WebVideoFullscreenInterfaceAVKit still needs a WebVideoFullscreenModel to
1285         communicate with, so a new wrapper class is used for that purpose, WebVideoFullscreenModelContext. Ditto for
1286         WebVideoFullscreenModelVideoElement and the new class WebVideoFullscreenInterfaceContext. These context classes
1287         are paired and share a contextId, allowing the manager and its proxy to route messages between the UIProcess's
1288         WebVideoFullscreenInterfaceAVKit to-and-from the WebProcess's WebVideoFullscreenModelVideoElement.
1289
1290         Both the WebVideoFullscreenModelContext and the WebVideoFullscreenInterfaceContext take a back-pointer to their
1291         manager or manager proxy, and each method on the context simply calls the matching method on the manager and
1292         passes its contextId as a parameter.
1293
1294         Both the WebVideoFullscreenManager and the WebVideoFullscreenManagerProxy pass that contextId in each of their
1295         cross-process messages.
1296
1297         On the other side, the manager and proxy also have a map between contextIds and their matching
1298         WebVideoFullscreenModelVideoElement (in the case of WebVideoFullscreenManager) or
1299         WebVideoFullscreenInterfaceAVKit (in the case of WebVideoFullscreenManagerProxy).
1300
1301         While this change is large by LoC, it is almost entirely boilerplate.  The new and interesting pieces are these:
1302
1303         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1304         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy): No longer a WebVideoFullscreenInterfaceAVKit.
1305         (WebKit::WebVideoFullscreenManagerProxy::invalidate): Walk through the models and interfaces, invalidating each.
1306         (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface): Added. Return a new model and interface tuple.
1307         (WebKit::WebVideoFullscreenManagerProxy::ensureModelAndInterface): Added. Lazily create, and add to the m_contextMap
1308             a new model and interface object.
1309         (WebKit::WebVideoFullscreenManagerProxy::ensureModel): Return the model half of ensureModelAndInterface().
1310         (WebKit::WebVideoFullscreenManagerProxy::ensureInterface): Return the interface half of ensureModelAndInterface().
1311         (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen): Walk through the outstanding interface objects, and if 
1312             any have a fullscreen mode which matches the about-to-be-fullscreen interface, request that that other interface
1313             exit fullscreen.
1314         * WebProcess/ios/WebVideoFullscreenManager.mm:
1315         (WebKit::nextContextId): Static, incrementing counter used as a contextId source.
1316         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager): No longer a WebVideoFullscreenModelVideoElement.
1317         (WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager): Walk through the models and interfaces, invalidating each.
1318         (WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Added. Return a new model and interface tuple.
1319         (WebKit::WebVideoFullscreenManager::ensureModelAndInterface):  Added. Lazily create, and add to the m_contextMap
1320             a new model and interface object.
1321         (WebKit::WebVideoFullscreenManager::ensureModel): Return the model half of ensureModelAndInterface().
1322         (WebKit::WebVideoFullscreenManager::ensureInterface): Return the interface half of ensureModelAndInterface().
1323
1324         New classes and methods which just forward on to their owning objects:
1325
1326         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1327         (WebKit::WebVideoFullscreenModelContext::create):
1328         (WebKit::WebVideoFullscreenModelContext::~WebVideoFullscreenModelContext):
1329         (WebKit::WebVideoFullscreenModelContext::invalidate):
1330         (WebKit::WebVideoFullscreenModelContext::layerHost):
1331         (WebKit::WebVideoFullscreenModelContext::setLayerHost):
1332         (WebKit::WebVideoFullscreenModelContext::setInitialVideoLayerFrame):
1333         (WebKit::WebVideoFullscreenModelContext::WebVideoFullscreenModelContext):
1334         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1335         (WebKit::WebVideoFullscreenModelContext::play):
1336         (WebKit::WebVideoFullscreenModelContext::pause):
1337         (WebKit::WebVideoFullscreenModelContext::togglePlayState):
1338         (WebKit::WebVideoFullscreenModelContext::beginScrubbing):
1339         (WebKit::WebVideoFullscreenModelContext::endScrubbing):
1340         (WebKit::WebVideoFullscreenModelContext::seekToTime):
1341         (WebKit::WebVideoFullscreenModelContext::fastSeek):
1342         (WebKit::WebVideoFullscreenModelContext::beginScanningForward):
1343         (WebKit::WebVideoFullscreenModelContext::beginScanningBackward):
1344         (WebKit::WebVideoFullscreenModelContext::endScanning):
1345         (WebKit::WebVideoFullscreenModelContext::requestExitFullscreen):
1346         (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame):
1347         (WebKit::WebVideoFullscreenModelContext::videoLayerFrame):
1348         (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity):
1349         (WebKit::WebVideoFullscreenModelContext::videoLayerGravity):
1350         (WebKit::WebVideoFullscreenModelContext::selectAudioMediaOption):
1351         (WebKit::WebVideoFullscreenModelContext::selectLegibleMediaOption):
1352         (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged):
1353         (WebKit::WebVideoFullscreenModelContext::didSetupFullscreen):
1354         (WebKit::WebVideoFullscreenModelContext::didEnterFullscreen):
1355         (WebKit::WebVideoFullscreenModelContext::didExitFullscreen):
1356         (WebKit::WebVideoFullscreenModelContext::didCleanupFullscreen):
1357         (WebKit::WebVideoFullscreenModelContext::fullscreenMayReturnToInline):
1358         * WebProcess/ios/WebVideoFullscreenManager.h:
1359         (WebKit::WebVideoFullscreenInterfaceContext::create):
1360         (WebKit::WebVideoFullscreenInterfaceContext::invalidate):
1361         (WebKit::WebVideoFullscreenInterfaceContext::layerHostingContext):
1362         (WebKit::WebVideoFullscreenInterfaceContext::isAnimating):
1363         (WebKit::WebVideoFullscreenInterfaceContext::setIsAnimating):
1364         (WebKit::WebVideoFullscreenInterfaceContext::targetIsFullscreen):
1365         (WebKit::WebVideoFullscreenInterfaceContext::setTargetIsFullscreen):
1366         (WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode):
1367         (WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode):
1368         (WebKit::WebVideoFullscreenInterfaceContext::isFullscreen):
1369         (WebKit::WebVideoFullscreenInterfaceContext::setIsFullscreen):
1370         * WebProcess/ios/WebVideoFullscreenManager.mm:
1371         (WebKit::WebVideoFullscreenInterfaceContext::WebVideoFullscreenInterfaceContext):
1372         (WebKit::WebVideoFullscreenInterfaceContext::~WebVideoFullscreenInterfaceContext):
1373         (WebKit::WebVideoFullscreenInterfaceContext::setLayerHostingContext):
1374         (WebKit::WebVideoFullscreenInterfaceContext::resetMediaState):
1375         (WebKit::WebVideoFullscreenInterfaceContext::setDuration):
1376         (WebKit::WebVideoFullscreenInterfaceContext::setCurrentTime):
1377         (WebKit::WebVideoFullscreenInterfaceContext::setBufferedTime):
1378         (WebKit::WebVideoFullscreenInterfaceContext::setRate):
1379         (WebKit::WebVideoFullscreenInterfaceContext::setVideoDimensions):
1380         (WebKit::WebVideoFullscreenInterfaceContext::setSeekableRanges):
1381         (WebKit::WebVideoFullscreenInterfaceContext::setCanPlayFastReverse):
1382         (WebKit::WebVideoFullscreenInterfaceContext::setAudioMediaSelectionOptions):
1383         (WebKit::WebVideoFullscreenInterfaceContext::setLegibleMediaSelectionOptions):
1384         (WebKit::WebVideoFullscreenInterfaceContext::setExternalPlayback):
1385
1386         Cross-process methods which now take a contextId parameter:
1387
1388         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
1389         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1390         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
1391         (WebKit::WebVideoFullscreenManagerProxy::resetMediaState):
1392         (WebKit::WebVideoFullscreenManagerProxy::setCurrentTime):
1393         (WebKit::WebVideoFullscreenManagerProxy::setBufferedTime):
1394         (WebKit::WebVideoFullscreenManagerProxy::setVideoDimensions):
1395         (WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
1396         (WebKit::WebVideoFullscreenManagerProxy::setCanPlayFastReverse):
1397         (WebKit::WebVideoFullscreenManagerProxy::setAudioMediaSelectionOptions):
1398         (WebKit::WebVideoFullscreenManagerProxy::setLegibleMediaSelectionOptions):
1399         (WebKit::WebVideoFullscreenManagerProxy::setExternalPlaybackProperties):
1400         (WebKit::WebVideoFullscreenManagerProxy::setDuration):
1401         (WebKit::WebVideoFullscreenManagerProxy::setRate):
1402         (WebKit::WebVideoFullscreenManagerProxy::exitFullscreen):
1403         (WebKit::WebVideoFullscreenManagerProxy::cleanupFullscreen):
1404         (WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline):
1405         (WebKit::WebVideoFullscreenManagerProxy::play):
1406         (WebKit::WebVideoFullscreenManagerProxy::pause):
1407         (WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
1408         (WebKit::WebVideoFullscreenManagerProxy::beginScrubbing):
1409         (WebKit::WebVideoFullscreenManagerProxy::endScrubbing):
1410         (WebKit::WebVideoFullscreenManagerProxy::seekToTime):
1411         (WebKit::WebVideoFullscreenManagerProxy::fastSeek):
1412         (WebKit::WebVideoFullscreenManagerProxy::beginScanningForward):
1413         (WebKit::WebVideoFullscreenManagerProxy::beginScanningBackward):
1414         (WebKit::WebVideoFullscreenManagerProxy::endScanning):
1415         (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
1416         (WebKit::WebVideoFullscreenManagerProxy::didSetupFullscreen):
1417         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
1418         (WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
1419         (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen):
1420         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
1421         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
1422         (WebKit::WebVideoFullscreenManagerProxy::selectAudioMediaOption):
1423         (WebKit::WebVideoFullscreenManagerProxy::selectLegibleMediaOption):
1424         (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged):
1425         (WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
1426         (WebKit::WebVideoFullscreenManagerProxy::videoLayerFrame): Deleted.
1427         (WebKit::WebVideoFullscreenManagerProxy::videoLayerGravity): Deleted.
1428         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
1429         * WebProcess/ios/WebVideoFullscreenManager.mm:
1430         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
1431         (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
1432         (WebKit::WebVideoFullscreenManager::resetMediaState):
1433         (WebKit::WebVideoFullscreenManager::setDuration):
1434         (WebKit::WebVideoFullscreenManager::setCurrentTime):
1435         (WebKit::WebVideoFullscreenManager::setBufferedTime):
1436         (WebKit::WebVideoFullscreenManager::setRate):
1437         (WebKit::WebVideoFullscreenManager::setVideoDimensions):
1438         (WebKit::WebVideoFullscreenManager::setSeekableRanges):
1439         (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse):
1440         (WebKit::WebVideoFullscreenManager::setAudioMediaSelectionOptions):
1441         (WebKit::WebVideoFullscreenManager::setLegibleMediaSelectionOptions):
1442         (WebKit::WebVideoFullscreenManager::setExternalPlayback):
1443         (WebKit::WebVideoFullscreenManager::play):
1444         (WebKit::WebVideoFullscreenManager::pause):
1445         (WebKit::WebVideoFullscreenManager::togglePlayState):
1446         (WebKit::WebVideoFullscreenManager::beginScrubbing):
1447         (WebKit::WebVideoFullscreenManager::endScrubbing):
1448         (WebKit::WebVideoFullscreenManager::seekToTime):
1449         (WebKit::WebVideoFullscreenManager::fastSeek):
1450         (WebKit::WebVideoFullscreenManager::beginScanningForward):
1451         (WebKit::WebVideoFullscreenManager::beginScanningBackward):
1452         (WebKit::WebVideoFullscreenManager::endScanning):
1453         (WebKit::WebVideoFullscreenManager::requestExitFullscreen):
1454         (WebKit::WebVideoFullscreenManager::selectAudioMediaOption):
1455         (WebKit::WebVideoFullscreenManager::selectLegibleMediaOption):
1456         (WebKit::WebVideoFullscreenManager::fullscreenModeChanged):
1457         (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
1458         (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
1459         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
1460         (WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
1461         (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
1462         (WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
1463         (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
1464         (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
1465
1466 2015-04-16  Beth Dakin  <bdakin@apple.com>
1467
1468         Force mouse events should go through normal mouse event handling code paths
1469         https://bugs.webkit.org/show_bug.cgi?id=143749
1470         -and corresponding-
1471         rdar://problem/20472895
1472
1473         Reviewed by Dean Jackson.
1474
1475         This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the 
1476         NSEventTypePressures that is gets and sends those down to the web process.
1477
1478         Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an 
1479         NSEventTypePressure, the new name makes it clear how the second parameter differs 
1480         from the first.
1481         * Shared/NativeWebMouseEvent.h:
1482
1483         New event types for the new types of events.
1484         * Shared/WebEvent.h:
1485         * Shared/WebEventConversion.cpp:
1486         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
1487         * Shared/mac/NativeWebMouseEventMac.mm:
1488         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
1489         * Shared/mac/WebEventFactory.h:
1490
1491         All of the square-peg, round-hole problems of massaging the NSEventTypePressures 
1492         events into WebMouseEvents is taken care of here.
1493         * Shared/mac/WebEventFactory.mm:
1494         (WebKit::mouseButtonForEvent):
1495         (WebKit::globalPointForEvent):
1496         (WebKit::pointForEvent):
1497         (WebKit::WebEventFactory::createWebMouseEvent):
1498
1499         Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent 
1500         and handle it.
1501         * UIProcess/API/mac/WKView.mm:
1502         (-[WKView pressureChangeWithEvent:]):
1503
1504         Handle the new types.
1505         * UIProcess/WebPageProxy.cpp:
1506         (WebKit::WebPageProxy::didReceiveEvent):
1507
1508         Can delete inputDeviceForceDidChange since it’s no longer used.
1509         (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
1510         * UIProcess/WebPageProxy.h:
1511
1512         Handle the new types of mouse events properly.
1513         * WebProcess/WebPage/WebPage.cpp:
1514         (WebKit::handleMouseEvent):
1515
1516         Delete inputDeviceForceDidChange() and m_lastForceStage.
1517         * WebProcess/WebPage/WebPage.h:
1518         * WebProcess/WebPage/WebPage.messages.in:
1519         * WebProcess/WebPage/mac/WebPageMac.mm:
1520         (WebKit::WebPage::inputDeviceForceDidChange): Deleted.
1521
1522         Handle new WebEvent types.
1523         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1524
1525 2015-04-16  Dan Bernstein  <mitz@apple.com>
1526
1527         <rdar://problem/20575744> Also include a definition of __NSd_{current deployment target} in WKFoundation.h.
1528
1529         Reviewed by Tim Horton.
1530
1531         * WebKit2.xcodeproj/project.pbxproj:
1532
1533 2015-04-16  Timothy Horton  <timothy_horton@apple.com>
1534
1535         Provide a mechanism through the legacy SPI to know when swipe gestures begin and end
1536         https://bugs.webkit.org/show_bug.cgi?id=143740
1537         <rdar://problem/20468540>
1538
1539         Reviewed by Dan Bernstein.
1540
1541         In the C SPI, add three WKPageLoaderClient callbacks for the three
1542         navigation gesture events (did begin, will end, did end).
1543
1544         * UIProcess/API/C/WKPageLoaderClient.h:
1545         Add the callbacks.
1546
1547         * UIProcess/API/APILoaderClient.h:
1548         (API::LoaderClient::navigationGestureDidBegin):
1549         (API::LoaderClient::navigationGestureWillEnd):
1550         (API::LoaderClient::navigationGestureDidEnd):
1551         * UIProcess/WebPageProxy.cpp:
1552         (WebKit::WebPageProxy::navigationGestureDidBegin):
1553         (WebKit::WebPageProxy::navigationGestureWillEnd):
1554         (WebKit::WebPageProxy::navigationGestureDidEnd):
1555         Dispatch navigation gesture events to the loader client as well as
1556         (after a bounce through the PageClient) the navigation delegate.
1557
1558         * UIProcess/API/C/WKPage.cpp:
1559         (WKPageSetPageLoaderClient):
1560         Call the callbacks.
1561
1562         * UIProcess/mac/ViewGestureController.h:
1563         * UIProcess/mac/ViewGestureControllerMac.mm:
1564         (WebKit::ViewGestureController::trackSwipeGesture):
1565         (WebKit::ViewGestureController::willEndSwipeGesture):
1566         While we were already informing WebPageProxy of 'did begin' and 'did end'
1567         navigation gesture events, we were missing 'will end'. Add it.
1568
1569 2015-04-16  Tim Horton  <timothy_horton@apple.com>
1570
1571         Dispatching multiple asynchronous animated resizes in parallel causes page scale to detach from reality
1572         https://bugs.webkit.org/show_bug.cgi?id=143812
1573         <rdar://problem/19866038>
1574
1575         Reviewed by Simon Fraser.
1576
1577         * Shared/VisibleContentRectUpdateInfo.h:
1578         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
1579         No cats in transaction (more of these below, too).
1580
1581         * UIProcess/WebPageProxy.h:
1582         * UIProcess/WebPageProxy.messages.in:
1583         * UIProcess/ios/WebPageProxyIOS.mm:
1584         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
1585         (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
1586         * WebProcess/WebPage/WebPage.h:
1587         * WebProcess/WebPage/WebPage.messages.in:
1588         * WebProcess/WebPage/ios/WebPageIOS.mm:
1589         (WebKit::WebPage::handleTap):
1590         (WebKit::WebPage::commitPotentialTap):
1591         (WebKit::WebPage::dynamicViewportSizeUpdate):
1592         Add an incrementing ID to dynamicViewportSizeUpdates. The UI process keeps
1593         the current ID, and it is bounced through the Web process (dynamicViewportSizeUpdates)
1594         back to the UI process (dynamicViewportUpdateChangedTarget). If we have
1595         dispatched another dynamicViewportSizeUpdate in the interim, ignore
1596         the intermediate target.
1597
1598 2015-04-16  Sungmann Cho  <sungmann.cho@navercorp.com>
1599
1600         Remove PluginController::isPluginVisible().
1601         https://bugs.webkit.org/show_bug.cgi?id=143830
1602
1603         Reviewed by Darin Adler.
1604
1605         PluginController::isPluginVisible() was introduced by http://webkit.org/b/60285.
1606         This method had been used only for WebKit2 on Windows, and no one uses it now.
1607         So we can remove it.
1608
1609         No new tests, no behavior change.
1610
1611         * PluginProcess/PluginControllerProxy.cpp:
1612         (WebKit::PluginControllerProxy::isPluginVisible): Deleted.
1613         * PluginProcess/PluginControllerProxy.h:
1614         * WebProcess/Plugins/PluginController.h:
1615         * WebProcess/Plugins/PluginView.cpp:
1616         (WebKit::PluginView::isPluginVisible): Deleted.
1617         * WebProcess/Plugins/PluginView.h:
1618
1619 2015-04-16  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1620
1621         [EFL] Disable a flaky ewk_context_network_process_model() API test
1622         https://bugs.webkit.org/show_bug.cgi?id=143824
1623
1624         Reviewed by Csaba Osztrogonác.
1625
1626         ewk_context_network_process_model has been often failed. Though Bug 142967
1627         was filed to fix this issue, it is not solved yet. To maintain EFL bot, this patch
1628         disables it until fixing it.
1629
1630         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
1631         (TEST_F):
1632
1633 2015-04-16  Csaba Osztrogonác  <ossy@webkit.org>
1634
1635         [WK2] Forwarding headers generator shouldn't generate unnecessary headers
1636         https://bugs.webkit.org/show_bug.cgi?id=143820
1637
1638         Reviewed by Carlos Garcia Campos.
1639
1640         * Scripts/generate-forwarding-headers.pl:
1641         (collectNeededHeaders):
1642
1643 2015-04-16  Csaba Osztrogonác  <ossy@webkit.org>
1644
1645         [GTK] Run forwarding headers generator unconditionally
1646         https://bugs.webkit.org/show_bug.cgi?id=143819
1647
1648         Reviewed by Carlos Garcia Campos.
1649
1650         * PlatformGTK.cmake:
1651
1652 2015-04-15  Brent Fulgham  <bfulgham@apple.com>
1653
1654         [Mac] Disable "Save to Downloads" option for local files
1655         https://bugs.webkit.org/show_bug.cgi?id=143794
1656
1657         Reviewed by Tim Horton.
1658
1659         Disable the Image and Media download options if the download
1660         target is a local file. We can only download web resources;
1661         anything else is actually a no-op.
1662
1663         * UIProcess/mac/WKActionMenuController.mm:
1664         (-[WKActionMenuController _defaultMenuItemsForVideo]):
1665         (-[WKActionMenuController _defaultMenuItemsForImage]):
1666
1667 2015-04-15  Anders Carlsson  <andersca@apple.com>
1668
1669         Make websiteDataStore on WKWebViewConfiguration public
1670         https://bugs.webkit.org/show_bug.cgi?id=143810
1671
1672         Reviewed by Dan Bernstein.
1673
1674         * UIProcess/API/Cocoa/WKWebView.mm:
1675         (-[WKWebView initWithFrame:configuration:]):
1676         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1677         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1678         (-[WKWebViewConfiguration copyWithZone:]):
1679         (-[WKWebViewConfiguration websiteDataStore]):
1680         (-[WKWebViewConfiguration setWebsiteDataStore:]):
1681         (-[WKWebViewConfiguration _websiteDataStore]):
1682         (-[WKWebViewConfiguration _setWebsiteDataStore:]):
1683
1684 2015-04-15  Anders Carlsson  <andersca@apple.com>
1685
1686         Make WKWebsiteDataStore public
1687         https://bugs.webkit.org/show_bug.cgi?id=143805
1688
1689         Reviewed by Dan Bernstein.
1690
1691         Rename the current _WKWebsiteDataStore to WKWebsiteDataStore. Make init unavailable and tighten up the
1692         types of the defaultDataStore and nonPersistentDataStore class methods.
1693         
1694         Add a new _WKWebsiteDataStore @interface and @implementation that derives from WKWebsiteDataStore
1695         and forwards the defaultDataStore and nonPersistentDataStore method calls.
1696
1697         * Shared/API/Cocoa/WebKit.h:
1698         * Shared/Cocoa/APIObject.mm:
1699         (API::Object::newObject):
1700         * UIProcess/API/Cocoa/WKWebView.mm:
1701         (-[WKWebView initWithFrame:configuration:]):
1702         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1703         (-[WKWebViewConfiguration _websiteDataStore]):
1704         * UIProcess/API/Cocoa/WKWebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
1705         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm.
1706         (+[WKWebsiteDataStore defaultDataStore]):
1707         (+[WKWebsiteDataStore nonPersistentDataStore]):
1708         (-[WKWebsiteDataStore dealloc]):
1709         (-[WKWebsiteDataStore isNonPersistent]):
1710         (toSystemClockTime):
1711         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1712         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1713         (toWebsiteDataRecords):
1714         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1715         (-[WKWebsiteDataStore _apiObject]):
1716         * UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h.
1717         (WebKit::wrapper):
1718         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1719         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1720         (+[_WKWebsiteDataStore defaultDataStore]):
1721         (+[_WKWebsiteDataStore nonPersistentDataStore]):
1722         (-[_WKWebsiteDataStore dealloc]): Deleted.
1723         (-[_WKWebsiteDataStore isNonPersistent]): Deleted.
1724         (toWebsiteDataTypes): Deleted.
1725         (toSystemClockTime): Deleted.
1726         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]): Deleted.
1727         (-[_WKWebsiteDataStore _apiObject]): Deleted.
1728         * WebKit2.xcodeproj/project.pbxproj:
1729
1730 2015-04-15  Timothy Horton  <timothy_horton@apple.com>
1731
1732         Custom CSS cursors do not use -webkit-image-set on retina displays
1733         https://bugs.webkit.org/show_bug.cgi?id=120783
1734
1735         Reviewed by Beth Dakin.
1736         Patch by Evan Wallace <evan.exe@gmail.com>.
1737
1738         Serialize the cursor image scale for SetCursor messages so custom
1739         CSS cursors work with -webkit-image-set on retina displays.
1740
1741         * Shared/WebCoreArgumentCoders.cpp:
1742         (CoreIPC::ArgumentCoder<Cursor>::encode):
1743         (CoreIPC::ArgumentCoder<Cursor>::decode):
1744
1745 2015-04-15  Alex Christensen  <achristensen@webkit.org>
1746
1747         Progress towards CMake on Mac.
1748         https://bugs.webkit.org/show_bug.cgi?id=143785
1749
1750         Reviewed by Csaba Osztrogonác.
1751
1752         * CMakeLists.txt:
1753         * PlatformEfl.cmake:
1754         * PlatformGTK.cmake:
1755
1756 2015-04-15  Anders Carlsson  <andersca@apple.com>
1757
1758         Make WKWebsiteDataRecord public
1759         https://bugs.webkit.org/show_bug.cgi?id=143796
1760
1761         Reviewed by Dan Bernstein.
1762
1763         Rename _WKWebsiteDataRecord and associated files to WKWebsiteDataRecord and
1764         add a new _WKWebsiteDataRecord.h with a class @interface declaration that just
1765         inherits from WKWebsiteDataRecord. We don't need an @implementation since nobody is expected
1766         to allocate _WKWebsiteDataRecord objects.
1767
1768         * Shared/API/Cocoa/WebKit.h:
1769         * Shared/Cocoa/APIObject.mm:
1770         (API::Object::newObject):
1771         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.h.
1772         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm.
1773         (-[WKWebsiteDataRecord dealloc]):
1774         (dataTypesToString):
1775         (-[WKWebsiteDataRecord description]):
1776         (-[WKWebsiteDataRecord displayName]):
1777         (-[WKWebsiteDataRecord dataTypes]):
1778         (-[WKWebsiteDataRecord _apiObject]):
1779         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h.
1780         (WebKit::wrapper):
1781         (WebKit::toWebsiteDataTypes):
1782         (WebKit::toWKWebsiteDataTypes):
1783         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
1784         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1785         (toWebsiteDataRecords):
1786         * WebKit2.xcodeproj/project.pbxproj:
1787
1788 2015-04-13  Jer Noble  <jer.noble@apple.com>
1789
1790         [Fullscreen] ChromeClient::exitVideoFullscreen() should take a pointer to a HTMLVideoElement.
1791         https://bugs.webkit.org/show_bug.cgi?id=143674
1792
1793         Reviewed by Darin Adler.
1794
1795         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1796         (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Takes a reference.
1797         (WebKit::WebChromeClient::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
1798         (WebKit::WebChromeClient::exitVideoFullscreen): Deleted.
1799         * WebProcess/WebCoreSupport/WebChromeClient.h:
1800         * WebProcess/ios/WebVideoFullscreenManager.h:
1801         * WebProcess/ios/WebVideoFullscreenManager.mm:
1802         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
1803         (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
1804         (WebKit::WebVideoFullscreenManager::didEnterFullscreen): Pass a reference.
1805         (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.
1806         (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
1807
1808 2015-04-15  Antti Koivisto  <antti@apple.com>
1809
1810         Network Cache: Inline small body data to record file
1811         https://bugs.webkit.org/show_bug.cgi?id=143783
1812
1813         Reviewed by Chris Dumez.
1814
1815         We currently save all body data as separate files. We can improve space efficiency and do less reads and writes
1816         by inlining smaller resource bodies with the header.
1817
1818         * NetworkProcess/cache/NetworkCacheIOChannel.h:
1819         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
1820         (WebKit::NetworkCache::IOChannel::read):
1821         (WebKit::NetworkCache::IOChannel::readSync):
1822         (WebKit::NetworkCache::IOChannel::write):
1823
1824             Add WorkQueue argument to allow specifying which queue the result is submitted to.
1825
1826         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1827         (WebKit::NetworkCache::decodeRecordMetaData):
1828
1829             Add a boolean indicating whether the body is inlined.
1830
1831         (WebKit::NetworkCache::decodeRecordHeader):
1832         (WebKit::NetworkCache::Storage::decodeRecord):
1833         (WebKit::NetworkCache::encodeRecordMetaData):
1834         (WebKit::NetworkCache::Storage::storeBodyAsBlob):
1835         (WebKit::NetworkCache::Storage::encodeRecord):
1836         (WebKit::NetworkCache::Storage::dispatchReadOperation):
1837
1838             Read the record first, then read the blob if needed.
1839             Submit the read operation directly from the main queue. Only thing we do is opening an IO channel
1840             and that uses O_NONBLOCK.
1841             Process the read results in the IO work queue where we now do the blob retrieval.
1842
1843         (WebKit::NetworkCache::shouldStoreBodyAsBlob):
1844
1845             The current threshold for saving a separate blob is 16KB.
1846
1847         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
1848         (WebKit::NetworkCache::Storage::traverse):
1849         (WebKit::NetworkCache::createRecord): Deleted.
1850         (WebKit::NetworkCache::encodeRecordHeader): Deleted.
1851         * NetworkProcess/cache/NetworkCacheStorage.h:
1852
1853 2015-04-15  Tim Horton  <timothy_horton@apple.com>
1854
1855         Non-local keyboards don't update scroll view parameters
1856         https://bugs.webkit.org/show_bug.cgi?id=143791
1857         <rdar://problem/18974020>
1858
1859         * Platform/spi/ios/UIKitSPI.h:
1860         Fix the build.
1861
1862 2015-04-15  Tim Horton  <timothy_horton@apple.com>
1863
1864         Non-local keyboards don't update scroll view parameters
1865         https://bugs.webkit.org/show_bug.cgi?id=143791
1866         <rdar://problem/18974020>
1867
1868         Reviewed by Enrica Casucci.
1869
1870         * UIProcess/API/Cocoa/WKWebView.mm:
1871         (-[WKWebView _shouldUpdateKeyboardWithInfo:]):
1872         (-[WKWebView _keyboardWillChangeFrame:]):
1873         (-[WKWebView _keyboardWillShow:]):
1874         Make sure that we update scroll view parameters (obscured insets, etc.)
1875         if we have a non-local keyboard, in addition to the cases where we have an assisted node.
1876
1877 2015-04-15  Dan Bernstein  <mitz@apple.com>
1878
1879         <rdar://problem/20549298> No matching __NSi_ definition for postprocessed value of WK_{MAC,IOS}_TBA
1880         https://bugs.webkit.org/show_bug.cgi?id=143786
1881
1882         Reviewed by Anders Carlsson.
1883
1884         * Shared/API/Cocoa/WKFoundation.h: Added a placeholder for the postprocessing script to
1885         insert a definition of __NSi_* for the current deployment target. Import CoreFoundation.h so
1886         that we can check if the macro is already defined.
1887         * WebKit2.xcodeproj/project.pbxproj: In the Postprocess WKFoundation.h script build phase,
1888         replace the placeholder with a definition of __NSi_{current deployment target} if not
1889         already defined.
1890
1891 2015-04-14  Anders Carlsson  <andersca@apple.com>
1892
1893         Make creating send rights from shared memory more robust
1894         https://bugs.webkit.org/show_bug.cgi?id=143730
1895         rdar://problem/16595870
1896
1897         Reviewed by Darin Adler.
1898
1899         This cleans up creation of handles and send rights and also fixes a bug where it would be impossible
1900         to send more than 128 MB of shared memory in a single object.
1901
1902         * Platform/SharedMemory.h:
1903         * Platform/mac/SharedMemoryMac.cpp:
1904         (WebKit::makeMemoryEntry):
1905         New helper function that creates a memory entry send right. This uses MAP_MEM_VM_SHARE which ensures
1906         that memory objects larger than 128 MB will be handled correctly.
1907
1908         (WebKit::SharedMemory::create):
1909         Call makeMemoryEntry.
1910
1911         (WebKit::SharedMemory::createHandle):
1912         Call createSendRight.
1913
1914         (WebKit::SharedMemory::createSendRight):
1915         Call makeMemoryEntry and add the necessary assertions.
1916
1917 2015-04-15  Eric Carlson  <eric.carlson@apple.com>
1918
1919         Generalize "isPlayingAudio" to include other media characteristics
1920         https://bugs.webkit.org/show_bug.cgi?id=143713
1921
1922         Reviewed by Jer Noble.
1923
1924         * UIProcess/API/C/WKPage.cpp:
1925         (toGenericCallbackFunction): Scope CallbackBase.
1926         (WKPageForceRepaint): Ditto.
1927         (WKPageValidateCommand): Ditto.
1928         (WKPageComputePagesForPrinting): Ditto.
1929
1930         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
1931         (-[_WKThumbnailView _requestSnapshotIfNeeded]): Ditto.
1932
1933         * UIProcess/API/mac/WKView.mm:
1934         (-[WKView becomeFirstResponder]): Ditto.
1935         (-[WKView updateFontPanelIfNeeded]): Ditto.
1936         (-[WKView validateUserInterfaceItem:]): Ditto.
1937         (-[WKView startSpeaking:]): Ditto.
1938         (-[WKView selectedRangeWithCompletionHandler:]): Ditto.
1939         (-[WKView markedRangeWithCompletionHandler:]): Ditto.
1940         (-[WKView hasMarkedTextWithCompletionHandler:]): Ditto.
1941         (-[WKView attributedSubstringForProposedRange:completionHandler:]): Ditto.
1942         (-[WKView firstRectForCharacterRange:completionHandler:]): Ditto.
1943         (-[WKView characterIndexForPoint:completionHandler:]): Ditto.
1944
1945         * UIProcess/WebPageProxy.cpp:
1946         (WebKit::WebPageProxy::isPlayingMediaDidChange): Rename from isPlayingAudioDidChange.
1947         (WebKit::WebPageProxy::isPlayingAudioDidChange): Deleted.
1948         * UIProcess/WebPageProxy.h:
1949
1950         * UIProcess/WebPageProxy.messages.in:
1951
1952         * UIProcess/mac/WKFullScreenWindowController.mm:
1953         (-[WKFullScreenWindowController dealloc]): Scope CallbackBase.
1954         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.
1955
1956         * UIProcess/mac/WKPrintingView.mm:
1957         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ditto.
1958         (-[WKPrintingView _askPageToComputePageRects]): Ditto.
1959         (-[WKPrintingView _drawPreview:]): Ditto.
1960
1961         * WebProcess/Plugins/PluginView.cpp:
1962         (WebKit::PluginView::setPluginIsPlayingAudio):
1963         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1964         (WebKit::WebChromeClient::isPlayingMediaDidChange):
1965         (WebKit::WebChromeClient::isPlayingAudioDidChange): Deleted.
1966         * WebProcess/WebCoreSupport/WebChromeClient.h:
1967
1968 2015-04-15  Antti Koivisto  <antti@apple.com>
1969
1970         Network Cache: Add thread-safe accessors for storage paths
1971         https://bugs.webkit.org/show_bug.cgi?id=143668
1972
1973         Reviewed by Darin Adler.
1974
1975         Less need to use StringCapture.
1976
1977         * NetworkProcess/cache/NetworkCache.cpp:
1978         (WebKit::NetworkCache::Cache::dumpFilePath):
1979         (WebKit::NetworkCache::Cache::storagePath):
1980         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1981         (WebKit::NetworkCache::makeRecordsDirectoryPath):
1982         (WebKit::NetworkCache::Storage::Storage):
1983         (WebKit::NetworkCache::Storage::basePath):
1984         (WebKit::NetworkCache::Storage::versionPath):
1985         (WebKit::NetworkCache::Storage::recordsPath):
1986         (WebKit::NetworkCache::Storage::synchronize):
1987         (WebKit::NetworkCache::Storage::remove):
1988         (WebKit::NetworkCache::Storage::dispatchReadOperation):
1989         (WebKit::NetworkCache::Storage::finishReadOperation):
1990         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
1991         (WebKit::NetworkCache::Storage::traverse):
1992         (WebKit::NetworkCache::Storage::clear):
1993         (WebKit::NetworkCache::Storage::shrink):
1994         (WebKit::NetworkCache::Storage::deleteOldVersions):
1995         (WebKit::NetworkCache::makeRecordDirectoryPath): Deleted.
1996         * NetworkProcess/cache/NetworkCacheStorage.h:
1997         (WebKit::NetworkCache::Storage::baseDirectoryPath): Deleted.
1998         (WebKit::NetworkCache::Storage::directoryPath): Deleted.
1999
2000 2015-04-14  Tim Horton  <timothy_horton@apple.com>
2001
2002         Update gesture swipe shadow style
2003         https://bugs.webkit.org/show_bug.cgi?id=143616
2004         <rdar://problem/19295843>
2005
2006         Reviewed by Darin Adler.
2007
2008         * UIProcess/mac/ViewGestureController.h:
2009         * UIProcess/mac/ViewGestureControllerMac.mm:
2010         (WebKit::ViewGestureController::beginSwipeGesture):
2011         For the modern shadow style, use a layer stretched along the edge of the swiping content
2012         with the newly added PNGs as the layer contents.
2013
2014         Add a dimming layer over the lower layer of content which fades in/out
2015         during the swipe.
2016
2017         (WebKit::ViewGestureController::handleSwipeGesture):
2018         Fade the dimming layer in and out during the entire swipe.
2019         Fade the shadow layer out during the last few pixels of the swipe.
2020
2021         (WebKit::ViewGestureController::removeSwipeSnapshot):
2022         Unparent the new layers.
2023
2024         * WebKit2.xcodeproj/project.pbxproj:
2025         * Resources/SwipeShadow.png:
2026         * Resources/SwipeShadow@2x.png:
2027         Add the new resources.
2028
2029 2015-04-14  Brian Weinstein  <bweinstein@apple.com>
2030
2031         Add SPI to clear HSTS hosts added since a date.
2032         https://bugs.webkit.org/show_bug.cgi?id=143726
2033         and
2034         rdar://problem/16664597
2035
2036         Reviewed by Anders Carlsson.
2037
2038         * UIProcess/API/C/mac/WKContextPrivateMac.h:
2039         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
2040         (WKContextResetHSTSHostsAddedAfterDate): Call into the WebProcessPool.
2041         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2042         (WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate): Call CFNetwork SPI to clear HSTS hosts added
2043         after the given date.
2044         * UIProcess/WebProcessPool.h:
2045
2046 2015-04-14  Anders Carlsson  <andersca@apple.com>
2047
2048         More work on making the SharedMemory interface more sane
2049         https://bugs.webkit.org/show_bug.cgi?id=143718
2050
2051         Reviewed by Andreas Kling.
2052
2053         Get rid of m_shouldVMDeallocateData. The idea is that shared memory created by calling
2054         SharedMemory::allocate has a non-null m_data pointer, and a null m_port. Shared memory created
2055         by calling SharedMemory::create with a pointer and a length has a non-null port but a null m_data
2056         since the data can be unmapped by the caller and we don't want to hold on to dangling pointers.
2057
2058         * Platform/SharedMemory.h:
2059         (WebKit::SharedMemory::data):
2060         * Platform/mac/SharedMemoryMac.cpp:
2061         (WebKit::SharedMemory::allocate):
2062         (WebKit::SharedMemory::create):
2063         (WebKit::SharedMemory::map):
2064         (WebKit::SharedMemory::~SharedMemory):
2065         (WebKit::SharedMemory::createHandle):
2066
2067 2015-04-14  Antti Koivisto  <antti@apple.com>
2068
2069         Network Cache: Deduplicate body data
2070         https://bugs.webkit.org/show_bug.cgi?id=143652
2071
2072         Reviewed by Darin Adler.
2073
2074         It is common to have cache entries with identical body data. This happens when the same resource is loaded from
2075         a different URL (https vs http, slash vs no-slash at end, etc.). It also happens when the same URL is
2076         referenced from different cache partitions.
2077
2078         We can improve disk space efficiency and use less memory by sharing identical body data between cache entries.
2079
2080         This patch splits the body data out from the record file. The new record file contains meta data and response
2081         headers only. Body data is stored using the new BlobStorage interface. Files are deduplicated by computing
2082         SHA1 hash over the data and looking for an existing blob with the same hash. If found the existing entry
2083         is reused by creating a hard link to it.
2084
2085         The new disk structure looks like this:
2086
2087         WebKitCache/
2088             Version 3/
2089                 Blobs/
2090                     0A3C9A970ADA27FAE9BD7BC630BAD0B929C293C0
2091                     0A6B8060BA77DF92C82A2FD7AF58F79524D8F34C
2092                     ...
2093                 Records/
2094                     apple.com/
2095                         0B8645B04E7EC78C178B7460052601C2
2096                         0B8645B04E7EC78C178B7460052601C2-body
2097                         0CB1A3638D1C5A09C5E3283A74FA040B
2098                         0CB1A3638D1C5A09C5E3283A74FA040B-body
2099                         ...
2100
2101         Each record file has an associated -body which is a hard link to a file in the Blobs directory.
2102
2103         The patch increases effective capacity by 10-20% with a typical cache. It also saves memory especially when identical
2104         resources are used in multiple tabs.
2105
2106         Currently all >0 sized resources are stored as shared blobs. In future small resources should be integrated into record
2107         files and blobs used for larger files only.
2108
2109         * NetworkProcess/cache/NetworkCache.cpp:
2110         (WebKit::NetworkCache::Cache::store):
2111         (WebKit::NetworkCache::Cache::update):
2112
2113             Adopt the new storage interface.
2114
2115         (WebKit::NetworkCache::Cache::dumpContentsToFile):
2116         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp: Added.
2117         (WebKit::NetworkCache::BlobStorage::BlobStorage):
2118         (WebKit::NetworkCache::BlobStorage::synchronize):
2119
2120             Compute size and delete unused files from the Blobs directory (link count == 1).
2121
2122         (WebKit::NetworkCache::BlobStorage::blobPath):
2123         (WebKit::NetworkCache::BlobStorage::add):
2124         (WebKit::NetworkCache::BlobStorage::get):
2125
2126             Interface for storing and retrieving data blobs. Blobs are deduplicated on add.
2127
2128         (WebKit::NetworkCache::BlobStorage::remove):
2129
2130             Removes the link but doesn't remove the blob even if there are no other clients. That happens on next synchronize().
2131
2132         (WebKit::NetworkCache::BlobStorage::shareCount):
2133
2134             Checks the link count to get the number of clients.
2135
2136         * NetworkProcess/cache/NetworkCacheBlobStorage.h: Added.
2137         (WebKit::NetworkCache::BlobStorage::approximateSize):
2138         * NetworkProcess/cache/NetworkCacheCoders.cpp:
2139         (WebKit::NetworkCache::Coder<SHA1::Digest>::encode):
2140         (WebKit::NetworkCache::Coder<SHA1::Digest>::decode):
2141         * NetworkProcess/cache/NetworkCacheCoders.h:
2142         * NetworkProcess/cache/NetworkCacheData.h:
2143         (WebKit::NetworkCache::Data::isEmpty):
2144         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
2145         (WebKit::NetworkCache::Data::empty):
2146         (WebKit::NetworkCache::Data::fromMap):
2147         (WebKit::NetworkCache::mapFile):
2148         (WebKit::NetworkCache::computeSHA1):
2149         (WebKit::NetworkCache::bytesEqual):
2150
2151             Add some helpers.
2152
2153         * NetworkProcess/cache/NetworkCacheEntry.cpp:
2154         (WebKit::NetworkCache::Entry::asJSON):
2155         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
2156         (WebKit::NetworkCache::IOChannel::IOChannel):
2157         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2158         (WebKit::NetworkCache::makeRecordDirectoryPath):
2159         (WebKit::NetworkCache::makeBlobDirectoryPath):
2160         (WebKit::NetworkCache::Storage::Storage):
2161         (WebKit::NetworkCache::Storage::approximateSize):
2162         (WebKit::NetworkCache::Storage::synchronize):
2163         (WebKit::NetworkCache::partitionPathForKey):
2164         (WebKit::NetworkCache::recordPathForKey):
2165         (WebKit::NetworkCache::bodyPath):
2166         (WebKit::NetworkCache::decodeRecordMetaData):
2167         (WebKit::NetworkCache::decodeRecordHeader):
2168         (WebKit::NetworkCache::createRecord):
2169         (WebKit::NetworkCache::encodeRecordMetaData):
2170         (WebKit::NetworkCache::encodeRecordHeader):
2171         (WebKit::NetworkCache::Storage::remove):
2172         (WebKit::NetworkCache::Storage::updateFileModificationTime):
2173         (WebKit::NetworkCache::Storage::dispatchReadOperation):
2174
2175             Read both the blob and the record entry.
2176
2177         (WebKit::NetworkCache::Storage::finishReadOperation):
2178
2179             Factor to a function.
2180
2181         (WebKit::NetworkCache::Storage::store):
2182         (WebKit::NetworkCache::Storage::traverse):
2183         (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
2184         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2185
2186             We don't need separate full write and header write paths anymore. Everything is treated
2187             as a full write and deduplication stops us writing the body again.
2188
2189             This simplifies the code and data structures.
2190
2191         (WebKit::NetworkCache::Storage::finishWriteOperation):
2192
2193             Factor to a function.
2194
2195         (WebKit::NetworkCache::Storage::clear):
2196         (WebKit::NetworkCache::deletionProbability):
2197
2198             Take the sharing count into account when computing deletion probability.
2199             It is less useful to delete a record that shares its body with others as data won't get deleted.
2200
2201         (WebKit::NetworkCache::Storage::shrinkIfNeeded):
2202         (WebKit::NetworkCache::Storage::shrink):
2203         (WebKit::NetworkCache::Storage::deleteOldVersions):
2204         (WebKit::NetworkCache::directoryPathForKey): Deleted.
2205         (WebKit::NetworkCache::filePathForKey): Deleted.
2206         (WebKit::NetworkCache::openFileForKey): Deleted.
2207         (WebKit::NetworkCache::decodeRecord): Deleted.
2208         (WebKit::NetworkCache::Storage::update): Deleted.
2209
2210             No need for separate update interface anymore. Regular store() avoids unnecessary body write.
2211
2212         (WebKit::NetworkCache::Storage::dispatchFullWriteOperation): Deleted.
2213         (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation): Deleted.
2214         * NetworkProcess/cache/NetworkCacheStorage.h:
2215         * WebKit2.xcodeproj/project.pbxproj:
2216
2217 2015-04-14  Chris Dumez  <cdumez@apple.com>
2218
2219         REGRESSION(r182603): [GTK] More than 500 crashes on the layout tests with the debug build.
2220         https://bugs.webkit.org/show_bug.cgi?id=143715
2221
2222         Reviewed by Darin Adler.
2223
2224         Enable assertions checking that calling editorState() does not cause a
2225         synchronous layout only on Mac and iOS. This assertion does not
2226         necessarily hold true on other ports as each one as its own
2227         platformEditorState() implementation. In particular, this assertion
2228         was being hit on GTK.
2229
2230         * WebProcess/WebPage/WebPage.cpp:
2231         (WebKit::WebPage::didChangeSelection):
2232
2233 2015-04-13  Alexey Proskuryakov  <ap@apple.com>
2234
2235         Build fixes after r182772.
2236
2237         * UIProcess/API/mac/WKView.mm:
2238         (-[WKView _updateAutomaticallyComputedFixedLayoutSize]): Make a CGSize, not an NSSize.
2239         (-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]): Moved implementation
2240         to the correct place.
2241         (-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]): Ditto.
2242         (-[WKView _layoutMode]): Use a memeber from _data directly, not via a method.
2243
2244 2015-04-13  Alexey Proskuryakov  <ap@apple.com>
2245
2246         More build fix.
2247
2248         * UIProcess/mac/PageClientImpl.mm:
2249         (WebKit::PageClientImpl::setDragImage):
2250
2251 2015-04-13  Hunseop Jeong  <hs85.jeong@samsung.com>
2252
2253         [EFL][GTK] Fix build break after r182753 
2254         https://bugs.webkit.org/show_bug.cgi?id=143689
2255
2256         Reviewed by Anders Carlsson.
2257
2258         * Platform/IPC/unix/ConnectionUnix.cpp:
2259         (IPC::Connection::processMessage):
2260         (IPC::Connection::sendOutgoingMessage):
2261         * Platform/unix/SharedMemoryUnix.cpp:
2262         (WebKit::SharedMemory::allocate):
2263         (WebKit::accessModeMMap):
2264         (WebKit::SharedMemory::map):
2265         (WebKit::SharedMemory::create): Deleted.
2266
2267 2015-04-13  Alexey Proskuryakov  <ap@apple.com>
2268
2269         Build fix.
2270
2271         * UIProcess/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setDragImage):
2272
2273 2015-04-13  Anders Carlsson  <andersca@apple.com>
2274
2275         Keep track of each shared memory object's protection when deciding whether to return our existing port
2276         https://bugs.webkit.org/show_bug.cgi?id=143687
2277
2278         Reviewed by Tim Horton.
2279
2280         * Platform/SharedMemory.h:
2281         * Platform/mac/SharedMemoryMac.cpp:
2282         (WebKit::machProtection):
2283         (WebKit::SharedMemory::create):
2284         (WebKit::SharedMemory::map):
2285         (WebKit::SharedMemory::createHandle):
2286
2287 2015-04-13  Tim Horton  <timothy_horton@apple.com>
2288
2289         Add a persistent, fixed scale factor to make it easy to scale down WK(Web)Views
2290         https://bugs.webkit.org/show_bug.cgi?id=143560
2291         <rdar://problem/16302047>
2292
2293         Reviewed by Darin Adler.
2294
2295         Add a new "view" scale factor to WKView and WKWebView.
2296
2297         Unlike page scale (or "magnification" in the API), view scale:
2298             - persists between page loads
2299             - persists between Web process crashes
2300             - is not user adjustable
2301             - can reliably be < 1
2302
2303         The page scale and view scale are multiplied together whenever we push
2304         a new page scale down into WebCore, so the implementation of view scale
2305         is transparent to WebCore, and acts effectively as a constant multiplier
2306         for the (user-adjustable) page scale factor.
2307
2308         * UIProcess/WebPageProxy.cpp:
2309         (WebKit::WebPageProxy::scaleView):
2310         Add scaleView, which updates our cached viewScaleFactor and pushes it to the Web process.
2311
2312         (WebKit::WebPageProxy::creationParameters):
2313         Plumb viewScaleFactor through the page creation parameters.
2314
2315         * UIProcess/WebPageProxy.h:
2316         (WebKit::WebPageProxy::viewScaleFactor): Added.
2317
2318         * WebProcess/WebPage/WebPage.cpp:
2319         (WebKit::WebPage::WebPage):
2320         If the viewScaleFactor is not 1 at creation time, call scalePage with a page scale of 1.
2321         Internally, scalePage will multiply in the viewScaleFactor and push it all to the Web process.
2322
2323         (WebKit::WebPage::scalePage):
2324         Multiply the page scale factor by the view scale factor before passing it to WebCore.
2325
2326         (WebKit::WebPage::scalePageInViewCoordinates):
2327         Early returns need to check the total scale, not just the new page scale.
2328
2329         (WebKit::WebPage::totalScaleFactor):
2330         The scale that we get back from WebCore::Page::pageScaleFactor is the product
2331         of WebKit2's view and page scales. So, here we'll call that the totalScaleFactor.
2332         (Might need a different name because it seems like "total" should include deviceScale too).
2333
2334         (WebKit::WebPage::pageScaleFactor):
2335         WebKit2's notion of the pageScaleFactor does not include the view scale, so
2336         divide it out of WebCore's page scale.
2337
2338         (WebKit::WebPage::scaleView):
2339         Apply a new view scale, maintaining the current scroll position.
2340
2341         * WebProcess/WebPage/WebPage.h:
2342         (WebKit::WebPage::viewScaleFactor):
2343         * WebProcess/WebPage/WebPage.messages.in:
2344
2345         * Shared/WebPageCreationParameters.cpp:
2346         (WebKit::WebPageCreationParameters::encode):
2347         (WebKit::WebPageCreationParameters::decode):
2348         * Shared/WebPageCreationParameters.h:
2349         Plumb viewScaleFactor through the page creation parameters.
2350
2351         * UIProcess/API/Cocoa/WKViewPrivate.h:
2352         * UIProcess/API/Cocoa/WKWebView.mm:
2353         (-[WKWebView _viewScale]):
2354         (-[WKWebView _setViewScale:]):
2355         * UIProcess/API/mac/WKView.mm:
2356         (-[WKView _viewScale]):
2357         (-[WKView _setViewScale:]):
2358         Push the new view scale to WebPage.
2359
2360         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2361         * UIProcess/API/Cocoa/WKWebView.mm:
2362         (-[WKWebView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]):
2363         (-[WKWebView _automaticallyComputesFixedLayoutSizeFromViewScale]):
2364         * UIProcess/API/mac/WKView.mm:
2365         (-[WKView setFrameSize:]):
2366         (-[WKView _updateAutomaticallyComputedFixedLayoutSize]):
2367         (-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]):
2368         (-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]):
2369         * UIProcess/API/mac/WKViewInternal.h:
2370         Add a new layout mode, "DynamicSizeComputedFromViewScale",
2371         which turns on fixed layout size mode, and sets the fixed layout size
2372         based on the view's frame and view scale. The fixed layout size is maintained
2373         as the frame of the view scaled by the inverse of the view scale. This
2374         makes it very easy to maintain a WK(Web)View that is scaled down by
2375         a constant amount, but is laid out as if it were not.
2376         
2377         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2378         (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
2379         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
2380         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
2381         Because the transient zoom mechanism touches layers that WebCore owns,
2382         it mostly need to operate with totalScaleFactor, because that is what WebCore sees.
2383
2384 2015-04-10  Brent Fulgham  <bfulgham@apple.com>
2385
2386         Expand test infrastructure to support scrolling tests
2387         https://bugs.webkit.org/show_bug.cgi?id=143286
2388         <rdar://problem/20375516>
2389
2390         Reviewed by Simon Fraser.
2391
2392         Extend the WK2 testing API to include a method for setting a JSC callback function to be triggered
2393         by the new WebCore::WheelEventTestTrigger singleton.
2394
2395         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2396         (WKBundlePageStartMonitoringScrollOperations): WK2 method that causes the testing system to begin tracking wheel events.
2397         (WKBundlePageRegisterScrollOperationCompletionCallback): WK2 method to set the callback function for testing.
2398         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2399
2400 2015-04-13  Enrica Casucci  <enrica@apple.com>
2401
2402         Clients of WKWebView should be able to override drag functions.
2403         https://bugs.webkit.org/show_bug.cgi?id=143618
2404
2405         Reviewed by Darin Adler.
2406
2407         WKWebView now implements the drag protocol functions and
2408         forwards the calls to the inner WKView.
2409         In the page client, when we receive a request to start drag
2410         from the WebProcess, we call _dragImageForView in WKView with
2411         the target view. The function calls dragImage on the given view,
2412         so that its clients can override the dragImage function.
2413
2414         * UIProcess/API/Cocoa/WKWebView.mm:
2415         (-[WKWebView draggingEntered:]):
2416         (-[WKWebView draggingUpdated:]):
2417         (-[WKWebView draggingExited:]):
2418         (-[WKWebView prepareForDragOperation:]):
2419         (-[WKWebView performDragOperation:]):
2420         * UIProcess/API/mac/WKView.mm:
2421         (-[WKView _dragImageForView:withImage:at:linkDrag:]):
2422         (-[WKView _setDragImage:at:linkDrag:]): Deleted.
2423         * UIProcess/API/mac/WKViewInternal.h:
2424         * UIProcess/mac/PageClientImpl.mm:
2425         (WebKit::PageClientImpl::setDragImage):
2426
2427 2015-04-13  Alex Christensen  <achristensen@webkit.org>
2428
2429         [iOS] Unreviewed build fix after r182760.
2430
2431         * Shared/WebCoreArgumentCoders.cpp:
2432         (IPC::encodeSharedBuffer):
2433         (IPC::decodeSharedBuffer):
2434         Update SharedMemory function names.
2435
2436 2015-04-13  Anders Carlsson  <andersca@apple.com>
2437
2438         Rename SharedMemory::create overloads
2439         https://bugs.webkit.org/show_bug.cgi?id=143679
2440
2441         Reviewed by Beth Dakin.
2442
2443         Rename the SharedMemory::create overload that allocates memory to SharedMemory::allocate,
2444         and the SharedMemory::create overload that maps in a handle to SharedMemory::map.
2445
2446         * Platform/SharedMemory.h:
2447         * Platform/mac/SharedMemoryMac.cpp:
2448         (WebKit::SharedMemory::allocate):
2449         (WebKit::SharedMemory::map):
2450         (WebKit::SharedMemory::create): Deleted.
2451         * Shared/ShareableBitmap.cpp:
2452         (WebKit::ShareableBitmap::createShareable):
2453         (WebKit::ShareableBitmap::create):
2454         * Shared/ShareableResource.cpp:
2455         (WebKit::ShareableResource::create):
2456         * Shared/ShareableResource.h:
2457         * Shared/WebCompiledContentExtension.cpp:
2458         (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
2459         * Shared/WebCompiledContentExtensionData.cpp:
2460         (WebKit::WebCompiledContentExtensionData::decode):
2461         * Shared/WebHitTestResult.cpp:
2462         (WebKit::WebHitTestResult::Data::Data):
2463         (WebKit::WebHitTestResult::Data::decode):
2464         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
2465         (WebKit::WebPasteboardProxy::getPasteboardBufferForType):
2466         (WebKit::WebPasteboardProxy::setPasteboardBufferForType):
2467         * UIProcess/VisitedLinkProvider.cpp:
2468         (WebKit::VisitedLinkProvider::resizeTable):
2469         * UIProcess/mac/WebPageProxyMac.mm:
2470         (WebKit::WebPageProxy::dataSelectionForPasteboard):
2471         (WebKit::WebPageProxy::setPromisedDataForImage):
2472         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2473         (WebKit::PDFPlugin::writeItemsToPasteboard):
2474         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2475         (WebKit::WebPlatformStrategies::bufferForType):
2476         (WebKit::WebPlatformStrategies::setBufferForType):
2477         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2478         (WebKit::WebDragClient::declareAndWriteDragImage):
2479         * WebProcess/WebPage/VisitedLinkTableController.cpp:
2480         (WebKit::VisitedLinkTableController::setVisitedLinkTable):
2481         * WebProcess/WebPage/mac/WebPageMac.mm:
2482         (WebKit::WebPage::getDataSelectionForPasteboard):
2483
2484 2015-04-13  Brady Eidson  <beidson@apple.com>
2485
2486         Share sheets from Share menus appear outside the browser window.
2487         <rdar://problem/20455592> and https://bugs.webkit.org/show_bug.cgi?id=143620
2488
2489         Reviewed by Darin Adler.
2490
2491         Refactor existing Sharing Service Picker code to also be used for the Share menu NSMenuItem.
2492
2493         * UIProcess/WebPageProxy.cpp:
2494         (WebKit::WebPageProxy::internalShowContextMenu):
2495         (WebKit::WebPageProxy::platformInitializeShareMenuItem):
2496         * UIProcess/WebPageProxy.h:
2497
2498         * UIProcess/mac/WKSharingServicePickerDelegate.h: Added.
2499         * UIProcess/mac/WKSharingServicePickerDelegate.mm: Added.
2500         (+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]):
2501         (-[WKSharingServicePickerDelegate menuProxy]):
2502         (-[WKSharingServicePickerDelegate setMenuProxy:]):
2503         (-[WKSharingServicePickerDelegate setPicker:]):
2504         (-[WKSharingServicePickerDelegate setFiltersEditingServices:]):
2505         (-[WKSharingServicePickerDelegate setHandlesEditingReplacement:]):
2506         (-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
2507         (-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]):
2508         (-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
2509         (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
2510         (-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]):
2511
2512         * UIProcess/mac/WebContextMenuProxyMac.mm:
2513         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2514         (+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]): Deleted.
2515         (-[WKSharingServicePickerDelegate menuProxy]): Deleted.
2516         (-[WKSharingServicePickerDelegate setMenuProxy:]): Deleted.
2517         (-[WKSharingServicePickerDelegate setPicker:]): Deleted.
2518         (-[WKSharingServicePickerDelegate setIncludeEditorServices:]): Deleted.
2519         (-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]): Deleted.
2520         (-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]): Deleted.
2521         (-[WKSharingServicePickerDelegate sharingService:willShareItems:]): Deleted.
2522         (-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Deleted.
2523         (-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]): Deleted.
2524
2525         * UIProcess/mac/WebPageProxyMac.mm:
2526         (WebKit::WebPageProxy::platformInitializeShareMenuItem):
2527
2528         * WebKit2.xcodeproj/project.pbxproj:
2529
2530 2015-04-13  Anders Carlsson  <andersca@apple.com>
2531
2532         Begin cleaning up the shared memory interface
2533         https://bugs.webkit.org/show_bug.cgi?id=143677
2534
2535         Reviewed by Andreas Kling.
2536
2537         Rename createFromVMBuffer to create and add a protection parameter (which is currently unused).
2538         Also, turn SharedMemory::Protection into a proper enum class.
2539
2540         * NetworkProcess/cache/NetworkCache.cpp:
2541         (WebKit::NetworkCache::Cache::store):
2542         * NetworkProcess/cache/NetworkCacheEntry.cpp:
2543         (WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
2544         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2545         (WebKit::tryGetShareableHandleFromCFData):
2546         * Platform/SharedMemory.h:
2547         * Platform/mac/SharedMemoryMac.cpp:
2548         (WebKit::SharedMemory::create):
2549         (WebKit::machProtection):
2550         (WebKit::SharedMemory::createHandle):
2551         (WebKit::SharedMemory::createFromVMBuffer): Deleted.
2552         * Shared/ContextMenuContextData.cpp:
2553         (WebKit::ContextMenuContextData::encode):
2554         (WebKit::ContextMenuContextData::decode):
2555         * Shared/ShareableBitmap.h:
2556         * Shared/ShareableResource.cpp:
2557         (WebKit::ShareableResource::create):
2558         (WebKit::ShareableResource::createHandle):
2559         * Shared/WebCompiledContentExtensionData.cpp:
2560         (WebKit::WebCompiledContentExtensionData::encode):
2561         (WebKit::WebCompiledContentExtensionData::decode):
2562         * Shared/WebHitTestResult.cpp:
2563         (WebKit::WebHitTestResult::Data::encode):
2564         (WebKit::WebHitTestResult::Data::decode):
2565         * UIProcess/API/APIUserContentExtensionStore.cpp:
2566         (API::createExtension):
2567         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
2568         (WebKit::WebPasteboardProxy::getPasteboardBufferForType):
2569         (WebKit::WebPasteboardProxy::setPasteboardBufferForType):
2570         (WebKit::WebPasteboardProxy::readBufferFromPasteboard):
2571         * UIProcess/VisitedLinkProvider.cpp:
2572         (WebKit::VisitedLinkProvider::sendTable):
2573         * UIProcess/mac/WKPrintingView.mm:
2574         (pageDidDrawToImage):
2575         * UIProcess/mac/WebPageProxyMac.mm:
2576         (WebKit::WebPageProxy::dataSelectionForPasteboard):
2577         (WebKit::WebPageProxy::setPromisedDataForImage):
2578         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2579         (WebKit::PDFPlugin::writeItemsToPasteboard):
2580         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2581         (WebKit::WebPlatformStrategies::bufferForType):
2582         (WebKit::WebPlatformStrategies::setBufferForType):
2583         (WebKit::WebPlatformStrategies::readBufferFromPasteboard):
2584         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2585         (WebKit::WebDragClient::declareAndWriteDragImage):
2586         * WebProcess/WebPage/VisitedLinkTableController.cpp:
2587         (WebKit::VisitedLinkTableController::setVisitedLinkTable):
2588         * WebProcess/WebPage/WebPage.cpp:
2589         (WebKit::WebPage::takeSnapshot):
2590         (WebKit::WebPage::drawRectToImage):
2591         * WebProcess/WebPage/mac/WebPageMac.mm:
2592         (WebKit::WebPage::getDataSelectionForPasteboard):
2593
2594 2015-04-10  Jon Honeycutt  <jhoneycutt@apple.com>
2595
2596         Cannot click "Next" button on Google two-factor auth setup page
2597
2598         <https://bugs.webkit.org/show_bug.cgi?id=143624>
2599         <rdar://problem/19175714>
2600
2601         This issue occurs when this site focuses the submit button. When it
2602         receives focus, we try to assist it. While we consider ourselves to be
2603         assisting it, we ignore further gesture inputs for that node, including
2604         the tap gesture.
2605
2606         To fix this, only assist input types that we know are assistable,
2607         including text fields, select and date elements, etc.
2608
2609         Reviewed by Darin Adler.
2610
2611         * UIProcess/ios/WKContentViewInteraction.mm:
2612         (isAssistableInputType):
2613         If the type is a known-assistable type, return true.
2614         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
2615         Call isAssistableInputType() to determine whether we should do any kind
2616         of assistance for this node.
2617
2618 2015-04-13  Beth Dakin  <bdakin@apple.com>
2619
2620         Add force property to MouseEvents
2621         https://bugs.webkit.org/show_bug.cgi?id=143569
2622         -and corresponding-
2623         rdar://problem/20472954
2624
2625         Reviewed by Darin Adler.
2626
2627         In order to accommodate adding force to all PlatformMouseEvents, we have to add it 
2628         to pass a caches pressure event to NativeWebMouseEvent and add force to 
2629         WebMouseEvent.
2630
2631         NativeWebMouseEvent now requires a second NSEvent for the pressureEvent. 
2632         * Shared/NativeWebMouseEvent.h:
2633
2634         WebMouseEvent takes a force parameter.
2635         * Shared/WebEvent.h:
2636         (WebKit::WebMouseEvent::force):
2637         * Shared/WebEventConversion.cpp:
2638         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2639         * Shared/WebMouseEvent.cpp:
2640         (WebKit::WebMouseEvent::WebMouseEvent):
2641         (WebKit::WebMouseEvent::encode):
2642         (WebKit::WebMouseEvent::decode):
2643         * Shared/mac/NativeWebMouseEventMac.mm:
2644         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2645         * Shared/mac/WebEventFactory.h:
2646         * Shared/mac/WebEventFactory.mm:
2647         (WebKit::WebEventFactory::createWebMouseEvent):
2648
2649         Cache the most recent pressureEvent in _data so that it can be sent along to the 
2650         NativeWebMouseEvent constructor.
2651         * UIProcess/API/mac/WKView.mm:
2652         (-[WKView pressureChangeWithEvent:]):
2653         (-[WKView acceptsFirstMouse:]):
2654         (-[WKView shouldDelayWindowOrderingForEvent:]):
2655         (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
2656         (-[WKView initWithFrame:processPool:configuration:webView:]):
2657
2658         WebMouseEvent takes a force parameter.
2659         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2660         (WebKit::PDFPlugin::showContextMenuAtPoint):
2661         * WebProcess/Plugins/PluginView.cpp:
2662         (WebKit::PluginView::createWebEvent):
2663
2664         MouseEvent and PlatformMouseEvent both take force parameters too.
2665         * WebProcess/WebPage/WebPage.cpp:
2666         (WebKit::WebPage::navigateToURLWithSimulatedClick):
2667         (WebKit::WebPage::contextMenuAtPointInWindow):
2668         (WebKit::WebPage::dragEnded):
2669         (WebKit::WebPage::simulateMouseDown):
2670         (WebKit::WebPage::simulateMouseUp):
2671         (WebKit::WebPage::simulateMouseMotion):
2672
2673         The functions that dispatch the force events no longer take a PlatformMouseEvent 
2674         as a parameter.
2675         * WebProcess/WebPage/mac/WebPageMac.mm:
2676         (WebKit::WebPage::inputDeviceForceDidChange):
2677         (WebKit::WebPage::immediateActionDidCancel):
2678
2679 2015-04-13  Andreas Kling  <akling@apple.com>
2680
2681         Don't segregate heap objects based on Structure immortality.
2682         <https://webkit.org/b/143638>
2683
2684         Reviewed by Darin Adler.
2685
2686         * WebProcess/Plugins/Netscape/JSNPObject.h:
2687
2688 2015-04-13  Timothy Horton  <timothy_horton@apple.com>
2689
2690         javascript: links in inline PDFs shouldn't execute JavaScript in the context of the host website
2691         https://bugs.webkit.org/show_bug.cgi?id=143642
2692         <rdar://problem/18259355>
2693
2694         Reviewed by Darin Adler.
2695
2696         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2697         (WebKit::PDFPlugin::clickedLink):
2698         Don't follow javascript: URLs.
2699
2700 2015-04-10  Alex Christensen  <achristensen@webkit.org>
2701
2702         [Content Extensions] Don't unmap shared memory while using it.
2703         https://bugs.webkit.org/show_bug.cgi?id=143625
2704
2705         Reviewed by Darin Adler.
2706
2707         * Shared/WebCompiledContentExtension.cpp:
2708         (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
2709         * Shared/WebCompiledContentExtensionData.h:
2710         (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
2711         * UIProcess/API/APIUserContentExtensionStore.cpp:
2712         (API::createExtension):
2713         Keep the Data object alive as long as the SharedMemory that uses it.
2714
2715 2015-04-12  Darin Adler  <darin@apple.com>
2716
2717         [Cocoa] Localizable strings are inconsistent and need to be regenerated
2718         https://bugs.webkit.org/show_bug.cgi?id=143661
2719
2720         Reviewed by Dan Bernstein.
2721
2722         * UIProcess/WebEditCommandProxy.cpp:
2723         (WebKit::WebEditCommandProxy::nameForEditAction): Also added a comment
2724         about the fact that we have two copies of all the localizable strings.
2725
2726 2015-04-12  Sungmann Cho  <sungmann.cho@navercorp.com>
2727
2728         Fix trival typos related to the word "coordinate".
2729         https://bugs.webkit.org/show_bug.cgi?id=143644
2730
2731         Reviewed by Alexey Proskuryakov.
2732
2733         No new tests, no behavior change.
2734
2735         * Shared/WebHitTestResult.cpp:
2736         (WebKit::WebHitTestResult::Data::encode):
2737         (WebKit::WebHitTestResult::Data::decode):
2738         * Shared/WebHitTestResult.h:
2739         * WebProcess/WebPage/mac/WebPageMac.mm:
2740         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2741         (WebKit::WebPage::lookupTextAtLocation):
2742
2743 2015-04-12  Sungmann Cho  <sungmann.cho@navercorp.com>
2744
2745         Remove PluginModuleInfo.cpp from WebKit2
2746         https://bugs.webkit.org/show_bug.cgi?id=143643
2747
2748         Reviewed by Darin Adler.
2749
2750         Remove PluginModuleInfo.cpp from WebKit2 because it is totally empty.
2751
2752         No new tests, no behavior change.
2753
2754         * CMakeLists.txt:
2755         * Shared/Plugins/PluginModuleInfo.cpp: Removed.
2756         * WebKit2.xcodeproj/project.pbxproj:
2757
2758 2015-04-11  Yusuke Suzuki  <utatane.tea@gmail.com>
2759
2760         [ES6] Enable Symbol in web pages
2761         https://bugs.webkit.org/show_bug.cgi?id=143375
2762
2763         Reviewed by Ryosuke Niwa.
2764
2765         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2766         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2767         * UIProcess/efl/WebInspectorProxyEfl.cpp:
2768         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2769         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2770         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2771         * UIProcess/mac/WebInspectorProxyMac.mm:
2772         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2773
2774 2015-04-08  Sam Weinig  <sam@webkit.org>
2775
2776         Allow LaunchServices to handle URLs on link navigations
2777         <rdar://problem/19446826>
2778         https://bugs.webkit.org/show_bug.cgi?id=143544
2779
2780         Reviewed by Anders Carlsson.
2781
2782         * UIProcess/Cocoa/NavigationState.mm:
2783         (WebKit::tryAppLink):
2784         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
2785         Only let LaunchServices have a crack at the URL if the navigation is:
2786             1) a main frame navigation
2787             2) a result of a user gesture
2788
2789 2015-04-10  Tim Horton  <timothy_horton@apple.com>
2790
2791         Replace setFixedLayoutSizeEnabled: with an enum of layout modes
2792         https://bugs.webkit.org/show_bug.cgi?id=143576
2793
2794         Reviewed by Simon Fraser.
2795
2796         * UIProcess/API/C/WKLayoutMode.h: Added.
2797         * UIProcess/API/Cocoa/WKViewPrivate.h:
2798         * UIProcess/API/Cocoa/WKWebView.mm:
2799         (-[WKWebView _layoutMode]):
2800         (-[WKWebView _setLayoutMode:]):
2801         (-[WKWebView _isFixedLayoutEnabled]): Deleted.
2802         (-[WKWebView _setFixedLayoutEnabled:]): Deleted.
2803         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2804         * UIProcess/API/Cocoa/_WKLayoutMode.h: Added.
2805         * UIProcess/API/mac/WKView.mm:
2806         (-[WKView _layoutMode]):
2807         (-[WKView _setLayoutMode:]):
2808         (-[WKView _isFixedLayoutEnabled]): Deleted.
2809         (-[WKView _setFixedLayoutEnabled:]): Deleted.
2810         * WebKit2.xcodeproj/project.pbxproj:
2811         Add enums for "layout mode". Currently we have two values: "ViewSize",
2812         which is the normal behavior, and "FixedSize", which is fixed layout mode.
2813         More values will come in the future.
2814
2815 2015-04-10  Anders Carlsson  <andersca@apple.com>
2816
2817         _WKWebsiteDataStore doesn't track and remove offline application cache entries
2818         https://bugs.webkit.org/show_bug.cgi?id=143614
2819         rdar://problem/20243235
2820
2821         Reviewed by Andreas Kling.
2822
2823         * Shared/WebsiteData/WebsiteDataTypes.h:
2824         Add WebsiteDataTypeOfflineWebApplicationCache.
2825
2826         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
2827         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
2828         (dataTypesToString):
2829         * UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
2830         (WebKit::toWebsiteDataTypes):
2831         (WebKit::toWKWebsiteDataTypes):
2832         Add WKWebsiteDataTypeOfflineWebApplicationCache.
2833
2834         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2835         (WebKit::WebsiteDataStore::fetchData):
2836         Create a custom application cache storage and fetch the origins from it.
2837
2838         (WebKit::WebsiteDataStore::removeData):
2839         Delete either all the cache entries (since we don't track time in the application cache),
2840         or the ones specified by the given entries.
2841
2842 2015-04-10  Eric Carlson  <eric.carlson@apple.com>
2843
2844         [Mac] Refactor MediaPlaybackTarget
2845         https://bugs.webkit.org/show_bug.cgi?id=143571
2846
2847         Reviewed by Jer Noble.
2848
2849         Pass a MediaPlaybackTargetContext across process boundary instead of a MediaPlaybackTarget.
2850         * Shared/WebCoreArgumentCoders.h:
2851         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode): New.
2852         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decode): New.
2853         * Shared/mac/WebCoreArgumentCoders.cpp:
2854         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): New.
2855         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): New.
2856         (IPC::ArgumentCoder<MediaPlaybackTarget>::encode): Deleted.
2857         (IPC::ArgumentCoder<MediaPlaybackTarget>::decode): Deleted.
2858         * UIProcess/WebPageProxy.cpp:
2859         (WebKit::WebPageProxy::didChoosePlaybackTarget): Take a Ref<MediaPlaybackTarget>&&.
2860         * UIProcess/WebPageProxy.h:
2861         * WebProcess/WebPage/WebPage.h:
2862         * WebProcess/WebPage/WebPage.messages.in:
2863         * WebProcess/WebPage/mac/WebPageMac.mm:
2864         (WebKit::WebPage::playbackTargetSelected): Take a Ref<MediaPlaybackTarget>&&.
2865
2866 2015-04-10  Hunseop Jeong  <hs85.jeong@samsung.com>
2867
2868         Fix some minor typos related to the WebProcessCreationParameter. 
2869         https://bugs.webkit.org/show_bug.cgi?id=143598
2870
2871         Reviewed by Csaba Osztrogonác.
2872
2873         No new tests, no behavior change.
2874
2875         * Shared/WebProcessCreationParameters.cpp:
2876         (WebKit::WebProcessCreationParameters::encode):
2877         (WebKit::WebProcessCreationParameters::decode):
2878         * Shared/WebProcessCreationParameters.h:
2879         * UIProcess/WebProcessPool.cpp:
2880         (WebKit::WebProcessPool::createNewWebProcess):
2881         * WebProcess/WebProcess.cpp:
2882         (WebKit::WebProcess::initializeWebProcess):
2883
2884 2015-04-09  Andy Estes  <aestes@apple.com>
2885
2886         [Cocoa] Add a HAVE(AVKIT) and use it
2887         https://bugs.webkit.org/show_bug.cgi?id=143593
2888
2889         Reviewed by David Kilzer.
2890
2891         * UIProcess/API/Cocoa/WKWebView.mm:
2892         (-[WKWebView _mayAutomaticallyShowVideoOptimized]): Returned false if !HAVE(AVKIT).
2893         * UIProcess/WebPageProxy.cpp:
2894         (WebKit::WebPageProxy::WebPageProxy): Removed the check for < iOS 8.2.
2895         (WebKit::WebPageProxy::reattachToWebProcess): Ditto.
2896         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2897         (WebKit::WebVideoFullscreenManagerProxy::create): Created a version of this function that returns nullptr if
2898         the minimum required version of iOS is less than 8.2 or if !HAVE(AVKIT).
2899         * WebProcess/WebPage/WebPage.cpp:
2900         (WebKit::WebPage::updatePreferences): Only called Settings::setAVKitEnabled(true) if HAVE(AVKIT).
2901
2902 2015-04-09  Hunseop Jeong  <hs85.jeong@samsung.com>
2903
2904         Use modern loops in WebProcess 
2905         https://bugs.webkit.org/show_bug.cgi?id=143302
2906
2907         Reviewed by Darin Adler.
2908
2909         Use modern range for-loops in WebProcess.
2910
2911         No new tests, no behavior change.
2912
2913         * WebProcess/WebProcess.cpp:
2914         (WebKit::WebProcess::initializeConnection):
2915         (WebKit::WebProcess::initializeWebProcess):
2916         (WebKit::WebProcess::focusedWebPage):
2917         (WebKit::WebProcess::webPageGroup):
2918         (WebKit::WebProcess::setTextCheckerState):
2919         (WebKit::WebProcess::resetAllGeolocationPermissions):
2920
2921 2015-04-09  Gordon Sheridan  <gordon_sheridan@apple.com>
2922
2923         Track IconDatabase retain counts for WebContent processes. Balance retain/releases for processes that terminate before successfully doing it themselves.
2924         https://bugs.webkit.org/show_bug.cgi?id=143517.
2925
2926         Reviewed by Brady Eidson.
2927
2928         * UIProcess/WebIconDatabase.messages.in:
2929         Move RetainIconForPageURL and ReleaseIconForPageURL messages to WebProcessProxy so they can be associated with the appropriate web process.
2930
2931         * UIProcess/WebProcessProxy.cpp:
2932         (WebKit::WebProcessProxy::connectionDidClose):
2933         Call releaseRemainingIconsForPageURLs() to balance retains/releases for this process.
2934
2935         (WebKit::WebProcessProxy::retainIconForPageURL):
2936         Track retain counts for page URLs and call through to WebIconDatabase.
2937
2938         (WebKit::WebProcessProxy::releaseIconForPageURL):
2939         Ditto.
2940
2941         (WebKit::WebProcessProxy::releaseRemainingIconsForPageURLs):
2942         Call releaseIconForPageURL() once for each outstanding retain count, for each page URL.
2943
2944         * UIProcess/WebProcessProxy.h:
2945         Declare methods for retainIconForPageURL(), releaseIconForPageURL(), and releaseRemainingIconsForPageURLs().
2946         Declare hash map to track number of retains per page URL.
2947
2948         * UIProcess/WebProcessProxy.messages.in:
2949         Moved RetainIconForPageURL and ReleaseIconForPageURL messages here from WebIconDatabase.
2950
2951         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
2952         (WebKit::WebIconDatabaseProxy::retainIconForPageURL):
2953         Modify the receiver of the message to be WebProcessProxy.
2954
2955         (WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
2956         Ditto.
2957
2958 2015-04-09  Chris Dumez  <cdumez@apple.com>
2959
2960         [WK2] Regression(r182194): The NetworkProcess is calling the wrong memory pressure handler before suspending
2961         https://bugs.webkit.org/show_bug.cgi?id=143575
2962         <rdar://problem/20484338>
2963
2964         Reviewed by Andreas Kling.
2965
2966         After r182194, the NetworkProcess is calling the memory pressure
2967         handler before getting suspended to free-up as much memory as possible
2968         at this point.
2969
2970         However, we were calling the default memory pressure handling code
2971         instead of the custom handler registered by the NetworkProcess. This
2972         patch fixes the problem.
2973
2974         * NetworkProcess/NetworkProcess.cpp:
2975         (WebKit::NetworkProcess::lowMemoryHandler):
2976         (WebKit::NetworkProcess::initializeNetworkProcess):
2977         (WebKit::NetworkProcess::processWillSuspend):
2978         * NetworkProcess/NetworkProcess.h:
2979
2980 2015-04-09  Brady Eidson  <beidson@apple.com>
2981
2982         REGRESSION (r182573): Action Menus no longer appear for WebKit2 views displaying an image
2983         rdar://problem/20486551 and https://bugs.webkit.org/show_bug.cgi?id=143574
2984
2985         Reviewed by Brent Fulgham.
2986
2987         * Shared/WebHitTestResult.cpp:
2988         (WebKit::WebHitTestResult::Data::Data): Clear up a name scoping issue.
2989
2990 2015-04-09  Chris Dumez  <cdumez@apple.com>
2991
2992         [WK2][iOS] editorState() should not cause a synchronous layout
2993         https://bugs.webkit.org/show_bug.cgi?id=142536
2994         <rdar://problem/20041506>
2995
2996         Reviewed by Enrica Casucci.
2997
2998         platformEditorState() on iOS does a synchronous layout to compute some
2999         of the EditorState members (e.g. caretRectAtStart / caretRectAtEnd).
3000         This is bad for performance as this is called every time the selection
3001         is changed (which happens for e.g. when you set the value of a focused
3002         HTMLInputElement).
3003
3004         This patch updates the behavior on iOS to only send a partial EditorState
3005         on selection change so that the UIProcess gets most of the information
3006         (the ones that do not require style recalc or layout) ASAP. A full Editor
3007         state is then sent after the asynchronous layout is done.
3008
3009         With this change, I see a 38% improvement on Speedometer (26.4 +/- 0.37
3010         -> 36.5 +/- 0.54) on iPhone 6 Plus.
3011
3012         * Shared/EditorState.cpp:
3013         (WebKit::EditorState::encode):
3014         (WebKit::EditorState::decode):
3015         (WebKit::EditorState::PostLayoutData::encode):
3016         (WebKit::EditorState::PostLayoutData::decode):
3017         * Shared/EditorState.h:
3018         (WebKit::EditorState::EditorState): Deleted.
3019         * UIProcess/ios/WKContentView.mm:
3020         (-[WKContentView _didCommitLayerTree:]):
3021         * UIProcess/ios/WKContentViewInteraction.mm:
3022         (WebKit::WKSelectionDrawingInfo::WKSelectionDrawingInfo):
3023         (-[WKContentView webSelectionRects]):
3024         (-[WKContentView _addShortcut:]):
3025         (-[WKContentView selectedText]):
3026         (-[WKContentView isReplaceAllowed]):
3027         (-[WKContentView _promptForReplace:]):
3028         (-[WKContentView _transliterateChinese:]):
3029         (-[WKContentView textStylingAtPosition:inDirection:]):
3030         (-[WKContentView canPerformAction:withSender:]):
3031         (-[WKContentView _showDictionary:]):
3032         (-[WKContentView _characterBeforeCaretSelection]):
3033         (-[WKContentView _characterInRelationToCaretSelection:]):
3034         (-[WKContentView _selectionAtDocumentStart]):
3035         (-[WKContentView selectedTextRange]):
3036         (-[WKContentView hasContent]):
3037         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3038         (WebKit::WebEditorClient::didChangeSelectionAndUpdateLayout):
3039         * WebProcess/WebCoreSupport/WebEditorClient.h:
3040         * WebProcess/WebPage/WebPage.cpp:
3041         (WebKit::WebPage::editorState):
3042         (WebKit::WebPage::didChangeSelection):
3043         (WebKit::WebPage::sendPostLayoutEditorStateIfNeeded):
3044         * WebProcess/WebPage/WebPage.h:
3045         * WebProcess/WebPage/efl/WebPageEfl.cpp:
3046         (WebKit::WebPage::platformEditorState):
3047         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
3048         (WebKit::WebPage::platformEditorState):
3049         * WebProcess/WebPage/ios/WebPageIOS.mm:
3050         (WebKit::WebPage::platformEditorState):
3051         * WebProcess/WebPage/mac/WebPageMac.mm:
3052         (WebKit::WebPage::platformEditorState):
3053
3054 2015-04-09  Antti Koivisto  <antti@apple.com>
3055
3056         Network Cache: Crash in WebCore::CachedResource::tryReplaceEncodedData
3057         https://bugs.webkit.org/show_bug.cgi?id=143562
3058
3059         Reviewed by Anders Carlsson.
3060
3061         If another thread comes and truncates the file before we map it we end up with a map that crashes when accessed.
3062
3063         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
3064         (WebKit::NetworkCache::IOChannel::IOChannel):
3065
3066             When creating a new file unlink any existing file instead of using O_TRUNC.
3067
3068 2015-04-09  Csaba Osztrogonác  <ossy@webkit.org>
3069
3070         [EFL][GTK] WebKit2's generate-forwarding-headers.pl runs too many times
3071         https://bugs.webkit.org/show_bug.cgi?id=142907
3072
3073         Unreviewed typo fix after r182595.
3074
3075         * PlatformGTK.cmake:
3076
3077 2015-04-09  Csaba Osztrogonác  <ossy@webkit.org>
3078
3079         [EFL][GTK] WebKit2's generate-forwarding-headers.pl runs too many times
3080         https://bugs.webkit.org/show_bug.cgi?id=142907
3081
3082         Reviewed by Carlos Garcia Campos.
3083
3084         * PlatformEfl.cmake:
3085         * PlatformGTK.cmake:
3086         * Scripts/generate-forwarding-headers.pl: Make it work with more path and platform arguments.
3087
3088 2015-04-08  Joseph Pecoraro  <pecoraro@apple.com>
3089
3090         Exception in console and broken right click after attempting to show context menu in Inspector
3091         https://bugs.webkit.org/show_bug.cgi?id=143556
3092
3093         Reviewed by Brady Eidson.
3094
3095         * Shared/mac/NativeContextMenuItem.mm:
3096         (WebKit::NativeContextMenuItem::NativeContextMenuItem):
3097         Add an ASSERT to immediately catch a menu item created with a nil native menu item.
3098
3099         * UIProcess/WebPageProxy.cpp:
3100         (WebKit::WebPageProxy::internalShowContextMenu):
3101         Gracefully handle a null share context menu item.
3102
3103 2015-04-08  Brent Fulgham  <bfulgham@apple.com>
3104
3105         [Mac] Unreviewed test fix after r182584
3106         https://bugs.webkit.org/show_bug.cgi?id=143452
3107
3108         Correct bit comparison to use the correct value for the Control-key
3109
3110         * Shared/mac/WebEventFactory.mm:
3111         (WebKit::typeForEvent):
3112
3113 2015-04-08  Jaehun Lim  <ljaehun.lim@samsung.com>
3114
3115         [EFL] Create PageUIClientEfl after sending CreateWebPage message
3116         https://bugs.webkit.org/show_bug.cgi?id=143514
3117
3118         Reviewed by Gyuyoung Kim.
3119
3120         UIProcess sends some messages to WebPage before WebPage is created. It makes some error logs on debug build.
3121         So this patch moves the initialization of m_pageUIClient after calling WKViewInitialize().
3122
3123         * UIProcess/API/efl/EwkView.cpp:
3124         (EwkView::EwkView):
3125
3126 2015-04-08  Brent Fulgham  <bfulgham@apple.com>
3127
3128         [Mac] WebKit is not honoring OS preferences for secondary click behaviors
3129         https://bugs.webkit.org/show_bug.cgi?id=143452
3130         <rdar://problem/20437483>
3131
3132         Reviewed by Tim Horton.
3133
3134         We cannot rely on the event's button number to decide behavior. The OS settings might have
3135         mapped middle button to context menu, etc. Instead, we should ask the OS (via NSMenu) what
3136         the proper button press behavior is.
3137
3138         * Shared/mac/WebEventFactory.mm:
3139         (WebKit::mouseButtonForEvent): Ask NSMenu what kind of button press we have received.
3140
3141 2015-04-08  Brady Eidson  <beidson@apple.com>
3142
3143         Expose the "Share" menu for links, images, and media.
3144         <rdar://problem/20435340> and https://bugs.webkit.org/show_bug.cgi?id=143502
3145
3146         Reviewed by Tim Horton.
3147
3148         * Shared/ContextMenuContextData.cpp:
3149         (WebKit::ContextMenuContextData::ContextMenuContextData):
3150
3151         * Shared/WebHitTestResult.cpp:
3152         (WebKit::WebHitTestResult::Data::Data):
3153         * Shared/WebHitTestResult.h:
3154
3155         * UIProcess/WebPageProxy.cpp:
3156         (WebKit::WebPageProxy::internalShowContextMenu):
3157
3158         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3159         (WebKit::WebContextMenuClient::shareMenuItem):
3160         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
3161
3162         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
3163         (WebKit::WebContextMenuClient::shareSelectedTextMenuItem): Deleted.
3164
3165         * WebProcess/WebPage/mac/WebPageMac.mm:
3166         (WebKit::WebPage::performActionMenuHitTestAtLocation):
3167
3168 2015-04-08  Anders Carlsson  <andersca@apple.com>
3169
3170         Add encoding and decoding of ints to WKRemoteObjectCoder
3171         https://bugs.webkit.org/show_bug.cgi?id=143538
3172
3173         Reviewed by Tim Horton.
3174
3175         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
3176         (-[WKRemoteObjectEncoder encodeInt:forKey:]):
3177         (-[WKRemoteObjectDecoder decodeIntForKey:]):
3178
3179 2015-04-08  Anders Carlsson  <andersca@apple.com>
3180
3181         Delete ApplicationCache static member functions
3182         https://bugs.webkit.org/show_bug.cgi?id=143534
3183
3184         Reviewed by Tim Horton.
3185
3186         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
3187         (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
3188         (WebKit::WebApplicationCacheManager::deleteAllEntries):
3189         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3190         (WebKit::InjectedBundle::clearApplicationCacheForOrigin):
3191         (WebKit::InjectedBundle::appCacheUsageForOrigin):
3192
3193 2015-04-08  Enrica Casucci  <enrica@apple.com>
3194
3195         32-bit build fix after r182554.
3196
3197         * UIProcess/API/mac/WKView.mm:
3198         (-[WKView resignFirstResponder]):
3199
3200 2015-04-08  Beth Dakin  <bdakin@apple.com>
3201
3202         Force events should not require preventDefault in order to fire
3203         https://bugs.webkit.org/show_bug.cgi?id=143503
3204         -and corresponding-
3205         rdar://problem/20458916
3206
3207         Reviewed by Tim Horton.
3208
3209         We no longer need m_lastActionMenuHitTestPreventsDefault since we’ll always 
3210         dispatch the events to Element.
3211         * WebProcess/WebPage/WebPage.cpp:
3212         (WebKit::WebPage::WebPage):
3213         * WebProcess/WebPage/WebPage.h:
3214         * WebProcess/WebPage/mac/WebPageMac.mm:
3215         (WebKit::WebPage::performActionMenuHitTestAtLocation):
3216         (WebKit::WebPage::inputDeviceForceDidChange):
3217         (WebKit::WebPage::immediateActionDidCancel):
3218
3219 2015-04-08  Enrica Casucci  <enrica@apple.com>
3220
3221         Calling makeFirstResponder on WKWebView doesn't work.
3222         https://bugs.webkit.org/show_bug.cgi?id=143482
3223         rdar://problem/20298166
3224
3225         Reviewed by Dan Bernstein.
3226
3227         Adding forwarding of the responder status to the WKView.
3228         We also need to avoid doing any cleanup in resignFirstResponder
3229         if we know we are about to regain responder status again.
3230         Same goes for becomeFirstResponder.
3231
3232         * UIProcess/API/Cocoa/WKWebView.mm:
3233         (-[WKWebView becomeFirstResponder]):
3234         (-[WKWebView acceptsFirstResponder]):
3235         * UIProcess/API/mac/WKView.mm:
3236         (-[WKView becomeFristResponder]):
3237         (-[WKView resignFirstResponder]):
3238
3239 2015-04-07  Tim Horton  <timothy_horton@apple.com>
3240
3241         Fix the build.
3242
3243         * UIProcess/API/mac/WKView.mm:
3244         (-[WKView _setFixedLayoutSize:]):
3245
3246 2015-04-07  Tim Horton  <timothy_horton@apple.com>
3247
3248         Expose and test fixedLayoutSize via modern WebKit SPI
3249         https://bugs.webkit.org/show_bug.cgi?id=143500
3250
3251         Reviewed by Simon Fraser.
3252
3253         * UIProcess/API/Cocoa/WKViewPrivate.h:
3254         * UIProcess/API/Cocoa/WKWebView.mm:
3255         (-[WKWebView _isFixedLayoutEnabled]):
3256         (-[WKWebView _setFixedLayoutEnabled:]):
3257         (-[WKWebView _fixedLayoutSize]):
3258         (-[WKWebView _setFixedLayoutSize:]):
3259         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3260         * UIProcess/API/mac/WKView.mm:
3261         (-[WKView _isFixedLayoutEnabled]):
3262         (-[WKView _setFixedLayoutEnabled:]):
3263         (-[WKView _fixedLayoutSize]):
3264         (-[WKView _setFixedLayoutSize:]):
3265         Add API for adjusting the fixed layout size, and whether or not we use it.
3266
3267         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3268         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
3269         Repair a mistake I made in r139822, where I brought odd TILED_BACKING_STORE-only
3270         logic (which disables scrollbars if fixedLayoutSize is enabled) to the rest of the ports.
3271         Put it back as TILED_BACKING_STORE-only.
3272
3273         Persist the fixedLayoutSize through view creation; we already persist the enabled state,
3274         but not the size, which doesn't make any sense.
3275
3276         * WebProcess/WebPage/WebPage.cpp:
3277         (WebKit::WebPage::fixedLayoutSize):
3278         * WebProcess/WebPage/WebPage.h:
3279         Add a fixedLayoutSize() getter.
3280
3281 2015-04-07  Brady Eidson  <beidson@apple.com>
3282
3283         ContextMenuItem refactoring
3284         https://bugs.webkit.org/show_bug.cgi?id=143485
3285
3286         Reviewed by Beth Dakin.
3287
3288         * Shared/mac/NativeContextMenuItem.mm:
3289         (WebKit::NativeContextMenuItem::NativeContextMenuItem):
3290
3291 2015-04-07  Simon Fraser  <simon.fraser@apple.com>
3292
3293         Add a new setting, AntialiasedFontDilationEnabled, exposed via WK2.
3294         https://bugs.webkit.org/show_bug.cgi?id=143495
3295
3296         Reviewed by Tim Horton.
3297         
3298         Exposed the antialiasedFontDilationEnabled setting via WK C SPI and Objective-C SPI.
3299
3300         * Shared/WebPreferencesDefinitions.h:
3301         * UIProcess/API/C/WKPreferences.cpp:
3302         (WKPreferencesSetAntialiasedFontDilationEnabled):
3303         (WKPreferencesGetAntialiasedFontDilationEnabled):
3304         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3305         * UIProcess/API/Cocoa/WKPreferences.mm:
3306         (-[WKPreferences _antialiasedFontDilationEnabled]):
3307         (-[WKPreferences _setAntialiasedFontDilationEnabled:]):
3308         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3309         * WebProcess/WebPage/WebPage.cpp:
3310         (WebKit::WebPage::updatePreferences):
3311
3312 2015-04-07  Beth Dakin  <bdakin@apple.com>
3313
3314         Should only propagate pressure events with relevant phases
3315         https://bugs.webkit.org/show_bug.cgi?id=143494
3316         -and corresponding-
3317         rdar://problem/20453738
3318
3319         Reviewed by Tim Horton.
3320
3321         We only care about the changed, began, and ended phases. 
3322         * UIProcess/API/mac/WKView.mm:
3323         (-[WKView pressureChangeWithEvent:]):
3324
3325 2015-04-07  Jer Noble  <jer.noble@apple.com>
3326
3327         Unreviewed build fix; make calls to new SPI conditional on iOS version.
3328
3329         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3330         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
3331
3332 2015-04-06  Anders Carlsson  <andersca@apple.com>
3333
3334         Create the web inspector process pool lazily
3335         https://bugs.webkit.org/show_bug.cgi?id=143456
3336         rdar://problem/20146520
3337
3338         Reviewed by Mark Lam.
3339
3340         Add and implement WebInspectorProxy::isInspectorProcessPool instead of always creating the inspector process pool
3341         when trying to determine if a given process pool is the inspector process pool.
3342
3343         This should speed up initialization somewhat and avoid creating a storage manager for example.
3344
3345         * UIProcess/WebInspectorProxy.cpp:
3346         (WebKit::WebInspectorProxy::inspectorProcessPool):
3347         (WebKit::WebInspectorProxy::isInspectorProcessPool):
3348         * UIProcess/WebInspectorProxy.h:
3349         * UIProcess/WebProcessProxy.cpp:
3350         (WebKit::WebProcessProxy::getLaunchOptions):
3351
3352 2015-04-06  Brady Eidson  <beidson@apple.com>
3353
3354         Combine ActionMenuHitTestResult with WebHitTestResult
3355         https://bugs.webkit.org/show_bug.cgi?id=143444
3356
3357         Reviewed by Beth Dakin.
3358
3359         * Shared/mac/ActionMenuHitTestResult.h: Removed.
3360         * Shared/mac/ActionMenuHitTestResult.mm: Removed.
3361
3362         * Shared/WebHitTestResult.cpp:
3363         (WebKit::WebHitTestResult::Data::Data):
3364         (WebKit::WebHitTestResult::Data::encode):
3365         (WebKit::WebHitTestResult::Data::decode):
3366         (WebKit::WebHitTestResult::Data::platformEncode):
3367         (WebKit::WebHitTestResult::Data::platformDecode):
3368         * Shared/WebHitTestResult.h:
3369         * Shared/mac/WebHitTestResult.mm: Added.
3370         (WebKit::WebHitTestResult::Data::platformEncode):
3371         (WebKit::WebHitTestResult::Data::platformDecode):
3372
3373         * UIProcess/API/mac/WKView.mm:
3374         (-[WKView _didPerformActionMenuHitTest:forImmediateAction:contentPreventsDefault:userData:]):
3375         (-[WKView _didPerformActionMenuHitTest:forImmediateAction:userData:]): Deleted.
3376         * UIProcess/API/mac/WKViewInternal.h:
3377         * UIProcess/PageClient.h:
3378         * UIProcess/WebPageProxy.cpp:
3379         (WebKit::WebPageProxy::didPerformActionMenuHitTest):
3380         * UIProcess/WebPageProxy.h:
3381         * UIProcess/WebPageProxy.messages.in:
3382         * UIProcess/mac/PageClientImpl.h:
3383         * UIProcess/mac/PageClientImpl.mm:
3384         (WebKit::PageClientImpl::didPerformActionMenuHitTest):
3385         * UIProcess/mac/WKActionMenuController.h:
3386         * UIProcess/mac/WKActionMenuController.mm:
3387         (-[WKActionMenuController willDestroyView:]):
3388         (-[WKActionMenuController _clearActionMenuState]):
3389         (-[WKActionMenuController didPerformActionMenuHitTest:userData:]):
3390         (-[WKActionMenuController _hitTestResultDataImage]):
3391         (-[WKActionMenuController _defaultMenuItemsForImage]):
3392         (-[WKActionMenuController _copyImage:]):
3393         (-[WKActionMenuController _addImageToPhotos:]):
3394         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
3395         (-[WKActionMenuController _defaultMenuItemsForEditableTextWithSuggestions]):
3396         (-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
3397         (-[WKActionMenuController _webHitTestResult]):
3398         (-[WKActionMenuController _defaultMenuItems]):
3399         (-[WKActionMenuController _hitTestResultImage]): Deleted.
3400         * UIProcess/mac/WKImmediateActionController.h:
3401         * UIProcess/mac/WKImmediateActionController.mm:
3402         (-[WKImmediateActionController willDestroyView:]):
3403         (-[WKImmediateActionController _clearImmediateActionState]):
3404         (-[WKImmediateActionController didPerformActionMenuHitTest:contentPreventsDefault:userData:]):
3405         (-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
3406         (-[WKImmediateActionController _webHitTestResult]):
3407         (-[WKImmediateActionController _defaultAnimationController]):
3408         (-[WKImmediateActionController _updateImmediateActionItem]):
3409         (-[WKImmediateActionController _menuItemForDataDetectedText]):
3410         (-[WKImmediateActionController _animationControllerForText]):
3411         (-[WKImmediateActionController didPerformActionMenuHitTest:userData:]): Deleted.
3412         * WebKit2.xcodeproj/project.pbxproj:
3413         * WebProcess/WebPage/mac/WebPageMac.mm:
3414         (WebKit::WebPage::performActionMenuHitTestAtLocation):
3415
3416 2015-04-06  Jer Noble  <jer.noble@apple.com>
3417
3418         Synchronize fullscreen animation between processes.
3419         https://bugs.webkit.org/show_bug.cgi?id=143131
3420
3421         Reviewed by Simon Fraser.
3422
3423         Support synchronize resizing by animating within the UIProcess. Since setVideoLayerFrameFenced() is now only
3424         ever called from within a 0-duration transaction, make that the official contract of the function and wrap
3425         the WebProcess side of that method in its own 0-duration transaction.
3426
3427         * Platform/spi/ios/BackBoardServicesSPI.h: Added.
3428         * Platform/spi/ios/UIKitSPI.h:
3429         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3430         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3431         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Remember the initial rect.
3432         (WebKit::WebVideoFullscreenManagerProxy::videoLayerFrame): Added; simple getter.
3433         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame): Use a different synchronization fence primative.
3434             Save the cached frame value.
3435         (WebKit::WebVideoFullscreenManagerProxy::videoLayerGravity): Added; simple getter.
3436         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity): Save the cached gravity value.
3437         * WebKit2.xcodeproj/project.pbxproj:
3438         * WebProcess/ios/WebVideoFullscreenManager.mm:
3439         (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced): Wrap in a 0-length transaction.
3440
3441 2015-04-06  Chris Dumez  <cdumez@apple.com>
3442
3443         [WK2][iOS] Regression(r182323): ASSERTION FAILED: WebCore::SQLiteDatabaseTracker::hasTransactionInProgress() in NetworkCache::Statistics::initialize()
3444         https://bugs.webkit.org/show_bug.cgi?id=143451
3445         <rdar://problem/20437994>
3446
3447         Reviewed by Anders Carlsson.
3448
3449         Initialize WebProcess::m_webSQLiteDatabaseTracker and
3450         NetworkProcess::m_webSQLiteDatabaseTracker in their respective class
3451         constructors instead of doing it later in the initializeWebProcess() /
3452         initializeNetworkProcess() methods.
3453
3454         If we do it later, it can happen that the tracker gets set after
3455         a SQLiteTransactionInProgressAutoCounter initialization and before
3456         the actual transaction. When this happens, the