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