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