[SOUP] Disable RC4
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-03-05  Michael Catanzaro  <mcatanzaro@igalia.com>
2
3         [SOUP] Disable RC4
4         https://bugs.webkit.org/show_bug.cgi?id=140014
5
6         Reviewed by Carlos Garcia Campos.
7
8         Disallow RC4-based ciphersuites when performing TLS negotiation,
9         because it is no longer considered secure.
10
11         * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
12         (main):
13         * WebProcess/EntryPoint/unix/WebProcessMain.cpp:
14         (main):
15
16 2015-03-04  Yusuke Suzuki  <utatane.tea@gmail.com>
17
18         Hide Promise with runtime flags under Cocoa JSContext API
19         https://bugs.webkit.org/show_bug.cgi?id=141965
20
21         Reviewed by Filip Pizlo.
22
23         Add new JSC runtime flag, PromiseDisabled.
24
25         * UIProcess/API/C/WKPreferencesRefPrivate.h:
26         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
27
28 2015-03-04  Beth Dakin  <bdakin@apple.com>
29
30         Attempted build fix.
31
32         * UIProcess/API/Cocoa/WKViewPrivate.h:
33
34 2015-03-04  Beth Dakin  <bdakin@apple.com>
35
36         Message UI process when contentSize changes
37         https://bugs.webkit.org/show_bug.cgi?id=142294
38         -and corresponding-
39         rdar://problem/19963165
40
41         Reviewed by Andreas Kling.
42
43         This patch un-ifdefs the didChangeContentSize message so that we can use it on Mac 
44         as well. 
45
46         New private method that subclasses can override when they need to do something 
47         with contentSize changes.
48         * UIProcess/API/Cocoa/WKViewPrivate.h:
49         * UIProcess/API/mac/WKView.mm:
50         (-[WKView _didChangeContentSize:]):
51         * UIProcess/PageClient.h:
52
53         Un-ifdef.
54         * UIProcess/WebPageProxy.cpp:
55         (WebKit::WebPageProxy::didChangeContentSize):
56         * UIProcess/WebPageProxy.h:
57         * UIProcess/WebPageProxy.messages.in:
58         * UIProcess/mac/PageClientImpl.h:
59         * UIProcess/mac/PageClientImpl.mm:
60         (WebKit::PageClientImpl::didChangeContentSize):
61         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
62         (WebKit::WebChromeClient::contentsSizeChanged):
63
64         Stubs for other platforms now that the pure-virtual is un-masked.
65         * UIProcess/ios/PageClientImplIOS.h:
66         * UIProcess/ios/PageClientImplIOS.mm:
67         (WebKit::PageClientImpl::didChangeContentSize):
68         * UIProcess/API/gtk/PageClientImpl.h:
69
70 2015-03-04  Antti Koivisto  <antti@apple.com>
71
72         Factor platform I/O out from NetworkCacheStorage
73         https://bugs.webkit.org/show_bug.cgi?id=142279
74
75         Reviewed by Chris Dumez.
76
77         * NetworkProcess/cache/NetworkCacheData.h: Added.
78         * NetworkProcess/cache/NetworkCacheDataCocoa.mm: Added.
79
80             NetworkCacheStorage::Data -> NetworkCacheData
81             Move to files of its own.
82
83         * NetworkProcess/cache/NetworkCacheIOChannel.h: Added.
84         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm: Added.
85
86             Add abstraction for dispatch IO channels.
87
88 2015-03-04  Joseph Pecoraro  <pecoraro@apple.com>
89
90         Remove WK_AVAILABLE and related macros when we cannot determine iOS/Mac version
91         https://bugs.webkit.org/show_bug.cgi?id=142252
92         rdar://problem/19983833
93
94         Reviewed by David Kilzer.
95
96         When mac / ios version was unable to be determined strip the WK_AVAILABLE
97         and WK_DEPRECATED macros to avoid outputing a broken macro.
98
99         * mac/postprocess-framework-headers.sh:
100
101 2015-03-04  Debarshi Ray  <debarshir@gnome.org>
102
103         [GTK] WebView should hold a reference on WebContext because non-default contexts are a reality
104         https://bugs.webkit.org/show_bug.cgi?id=142225
105
106         Reviewed by Carlos Garcia Campos.
107
108         * UIProcess/API/gtk/WebKitWebView.cpp:
109         (webkitWebViewRequestFavicon):
110         (webkitWebViewWatchForChangesInFavicon):
111         (webkitWebViewDisconnectFaviconDatabaseSignalHandlers):
112         (webkitWebViewConstructed):
113         (webkitWebViewGetProperty):
114         (webkitWebViewDispose):
115         (webkitWebViewLoadChanged):
116         (webkitWebViewLoadFailedWithTLSErrors):
117         (webkit_web_view_get_context):
118         (webkit_web_view_download_uri):
119
120 2015-03-03  Shivakumar JM  <shiva.jm@samsung.com>
121
122         Fix build warning in WebKit2/Shared module.
123         https://bugs.webkit.org/show_bug.cgi?id=142213
124
125         Reviewed by Simon Fraser.
126
127         Fix build warning by removing argument name from function.
128
129         * Shared/WebCoreArgumentCoders.cpp:
130         (IPC::pathPointCountApplierFunction):
131
132 2015-03-03  Andy Estes  <aestes@apple.com>
133
134         [Content Filtering] Separate unblock handling into its own class
135         https://bugs.webkit.org/show_bug.cgi?id=142251
136
137         Reviewed by Andreas Kling.
138
139         Adopted ContentFilterUnblockHandler.
140
141         * Shared/WebCoreArgumentCoders.h:
142         * Shared/mac/WebCoreArgumentCodersMac.mm:
143         (IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode):
144         (IPC::ArgumentCoder<ContentFilterUnblockHandler>::decode):
145         (IPC::ArgumentCoder<ContentFilter>::encode): Deleted.
146         (IPC::ArgumentCoder<ContentFilter>::decode): Deleted.
147         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
148         (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame):
149         * UIProcess/WebFrameProxy.cpp:
150         (WebKit::WebFrameProxy::didStartProvisionalLoad):
151         (WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction):
152         * UIProcess/WebFrameProxy.h:
153         (WebKit::WebFrameProxy::setContentFilterUnblockHandler):
154         (WebKit::WebFrameProxy::setContentFilterForBlockedLoad): Deleted.
155         * UIProcess/WebPageProxy.h:
156         * UIProcess/WebPageProxy.messages.in:
157         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
158         (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad):
159         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
160
161 2015-03-03  Chris Dumez  <cdumez@apple.com>
162
163         [WK2] Fix memory leak in _getCookieHeadersForTask
164         https://bugs.webkit.org/show_bug.cgi?id=142245
165
166         Reviewed by Alexey Proskuryakov.
167
168         Fix memory leak in _getCookieHeadersForTask. We are leaking the CFDictionary
169         returned by webKitCookieStorageCopyRequestHeaderFieldsForURL().
170
171         This patch addresses the issue by storing the return CFDictionary in a
172         RetainPtr<CFDictionaryRef>.
173
174         * Shared/mac/CookieStorageShim.mm:
175         (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
176
177 2015-03-03  Enrica Casucci  <enrica@apple.com>
178
179         Incomplete dictation results in text fields in a web page.
180         https://bugs.webkit.org/show_bug.cgi?id=142240
181         rdar://problem/19953432
182
183         Reviewed by Tim Horton.
184
185         The empty stub for insertDictationResult:withCorrectionIdentifier
186         must be removed. This way UIKit will call insertText and do the right thing.
187
188         * UIProcess/ios/WKContentViewInteraction.mm:
189         (-[WKContentView insertDictationResult:withCorrectionIdentifier:]): Deleted.
190
191 2015-03-03  Dean Jackson  <dino@apple.com>
192
193         Controls panel should have system blurry background
194         https://bugs.webkit.org/show_bug.cgi?id=142154
195         <rdar://problem/20000964>
196
197         Reviewed by Simon Fraser.
198
199         In order to replicate the system style of media controls
200         on OS X and iOS, we need to expose a special -webkit-appearance.
201         This patch adds the new property value, and implements
202         the iOS part of the appearance, which is a blurry shaded
203         background.
204
205         * Shared/mac/RemoteLayerBackingStore.mm:
206         (WebKit::RemoteLayerBackingStore::drawInContext): Add entries for
207         the new layer types, even though they are not correct yet.
208
209         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
210         (WebKit::updateCustomAppearance):
211         (WebKit::RemoteLayerTreePropertyApplier::applyProperties): UIBackdropViews
212         have a defined hierarchy that we don't create. We need to make sure we add our
213         children to the right subview.
214         * Shared/mac/RemoteLayerTreeTransaction.mm:
215         (WebKit::RemoteLayerTreeTransaction::description): Logging.
216
217         * UIProcess/ios/RemoteLayerTreeHostIOS.mm: Rename existing WKBackdropView
218         to WKSimpleBackdropView, and add a new WKBackdropView that inherits
219         from UIBackdropView.
220         (-[WKBackdropView hitTest:withEvent:]):
221         (-[WKBackdropView description]):
222         (WebKit::RemoteLayerTreeHost::createLayer): Handle the new LayerTypes.
223         * UIProcess/mac/RemoteLayerTreeHost.mm:
224         (WebKit::RemoteLayerTreeHost::createLayer):
225
226 2015-03-03  Chris Dumez  <cdumez@apple.com>
227
228         Access ApplicationCacheStorage global instance via singleton() static member function
229         https://bugs.webkit.org/show_bug.cgi?id=142239
230
231         Reviewed by Anders Carlsson.
232
233         Access ApplicationCacheStorage global instance via singleton() static
234         member function as per WebKit coding style.
235
236 2015-03-03  Joseph Pecoraro  <pecoraro@apple.com>
237
238         Build Fix: Add fall back handling in postprocess script for missing/unknown platform name.
239
240         Rubber-stamped by David Kilzer.
241
242         * mac/postprocess-framework-headers.sh:
243
244 2015-03-03  Enrica Casucci  <enrica@apple.com>
245
246         Build fix for iOS.
247
248         Unreviewed.
249
250         * UIProcess/ios/WKContentViewInteraction.mm: Adding forward declaration.
251
252 2015-03-03  Antti Koivisto  <antti@apple.com>
253
254         Include key to NetworkCacheStorage::Entry
255         https://bugs.webkit.org/show_bug.cgi?id=142215
256
257         Reviewed by Chris Dumez.
258
259         This simplified code. The key is saved as part of the entry so it makes logical sense too.
260
261         * NetworkProcess/cache/NetworkCache.cpp:
262         (WebKit::makeCacheKey):
263         (WebKit::encodeStorageEntry):
264         (WebKit::NetworkCache::retrieve):
265         (WebKit::NetworkCache::store):
266         (WebKit::NetworkCache::update):
267         (WebKit::NetworkCache::traverse):
268         (WebKit::entryAsJSON):
269         (WebKit::NetworkCache::dumpContentsToFile):
270         * NetworkProcess/cache/NetworkCacheKey.cpp:
271         (WebKit::NetworkCacheKey::operator=):
272         * NetworkProcess/cache/NetworkCacheKey.h:
273         (WebKit::NetworkCacheKey::isNull):
274         * NetworkProcess/cache/NetworkCacheStorage.h:
275         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
276         (WebKit::decodeEntry):
277         (WebKit::encodeEntryHeader):
278         (WebKit::retrieveFromMemory):
279         (WebKit::NetworkCacheStorage::retrieve):
280         (WebKit::NetworkCacheStorage::store):
281         (WebKit::NetworkCacheStorage::update):
282         (WebKit::NetworkCacheStorage::traverse):
283         (WebKit::NetworkCacheStorage::dispatchPendingWriteOperations):
284         (WebKit::NetworkCacheStorage::dispatchFullWriteOperation):
285         (WebKit::NetworkCacheStorage::dispatchHeaderWriteOperation):
286
287 2015-03-03  Antti Koivisto  <antti@apple.com>
288
289         Cache shrink leaves behind empty partition directories
290         https://bugs.webkit.org/show_bug.cgi?id=142217
291
292         Reviewed by Andreas Kling.
293
294         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
295         (WebKit::traverseCacheFiles):
296
297             No need for std::function.
298
299         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
300         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
301
302             After shrink traverse through the partition directories and try to delete them.
303             System knows if they are actually empty.
304
305 2015-03-03  Anders Carlsson  <andersca@apple.com>
306
307         Use the correct display name for website data for local files
308         https://bugs.webkit.org/show_bug.cgi?id=142228
309
310         Reviewed by Dan Bernstein.
311
312         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
313         (displayNameForLocalFiles):
314         Add new helper function.
315
316         (WebKit::WebsiteDataRecord::displayNameForCookieHostName):
317         Check if the hostname is kCFHTTPCookieLocalFileDomain.
318
319         (WebKit::WebsiteDataRecord::displayNameForOrigin):
320         Handle file URLs as well.
321
322 2015-03-03  Enrica Casucci  <enrica@apple.com>
323
324         Fixed typo in platform guard in http://trac.webkit.org/changeset/180939.
325
326         Unreviewed.
327
328         * UIProcess/ios/WKContentViewInteraction.mm:
329
330 2015-03-03  Enrica Casucci  <enrica@apple.com>
331
332         Adopt new API for keyboard interaction.
333         https://bugs.webkit.org/show_bug.cgi?id=142201
334         rdar://problem/19924949
335
336         Reviewed by Joseph Pecoraro.
337
338         * UIProcess/ios/WKContentViewInteraction.mm:
339         (-[WKContentView inputAssistantItem]):
340         (-[WKContentView _inputAssistantItem]):
341
342 2015-03-03  Carlos Garcia Campos  <cgarcia@igalia.com>
343
344         REGRESSION(r177075): WebProcess crashes when entering accelerating compositing mode before the WebView is realized
345         https://bugs.webkit.org/show_bug.cgi?id=142079
346
347         Reviewed by Žan Doberšek.
348
349         The problem is that the texture mapper and native window handler
350         are initialized when the LayerTreeHost is initialized, assuming
351         the UI process has already sent the native window handler to the
352         web process, but that doesn't always happen since we moved the
353         redirected window creation to realize in r177075.
354
355         * WebProcess/WebPage/DrawingArea.h:
356         (WebKit::DrawingArea::nativeSurfaceHandleForCompositing): Deleted.
357         * WebProcess/WebPage/DrawingAreaImpl.cpp:
358         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): Call
359         LayerTreeHost::setNativeSurfaceHandleForCompositing if we
360         already have a native window handle at this point.
361         (WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
362         Call LayerTreeHost::setNativeSurfaceHandleForCompositing also when
363         not using threaded compositing.
364         * WebProcess/WebPage/LayerTreeHost.h:
365         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
366         (WebKit::LayerTreeHostGtk::makeContextCurrent): Helper function to
367         ensure a context and making it current.
368         (WebKit::LayerTreeHostGtk::ensureTextureMapper): Ensure a texture
369         is created for the current context.
370         (WebKit::LayerTreeHostGtk::initialize): Use makeContextCurrent()
371         and ensureTextureMapper(), and remove the LayerTreeContext
372         initialization since that's is now always initialized in
373         setNativeSurfaceHandleForCompositing().
374         (WebKit::LayerTreeHostGtk::compositeLayersToContext): Use
375         makeContextCurrent() helper function and also call
376         ensureTextureMapper() just in case the texture could not be
377         created during initialization because the native window handle was
378         not yet available.
379         (WebKit::LayerTreeHostGtk::flushAndRenderLayers): Use makeContextCurrent().
380         (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
381         Initialize the LayerTreeContext.
382         (WebKit::LayerTreeHostGtk::glContext): Deleted.
383         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
384
385 2015-03-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
386
387         [WK2] Remove unnecessary create() factory functions.
388         https://bugs.webkit.org/show_bug.cgi?id=142161
389
390         Reviewed by Chris Dumez.
391
392         We can replace some create() factory functions with std::make_unique(). Because
393         it just returns new instance. Even some of those functions have used std::unique_ptr<>
394         instead of std::make_unique<>. Fixed all.
395
396         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
397         (WebKit::SQLiteIDBTransaction::create): Deleted.
398         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
399         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
400         * Platform/efl/DispatchQueueWorkItemEfl.h:
401         (WorkItem::dispatch):
402         (WorkItem::create): Deleted.
403         * UIProcess/API/gtk/PageClientImpl.h:
404         (WebKit::PageClientImpl::create): Deleted.
405         * UIProcess/API/gtk/WebKitTextChecker.h:
406         (WebKitTextChecker::create): Deleted.
407         * UIProcess/API/gtk/WebKitWebContext.cpp:
408         (webkitWebContextConstructed):
409         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
410         (webkitWebViewBaseConstructed):
411
412 2015-03-02  Brady Eidson  <beidson@apple.com>
413
414         Lots of: ERROR: Unhandled web process message WebPageGroupProxy:RemoveAllUserContentFilters
415         https://bugs.webkit.org/show_bug.cgi?id=142155
416
417         Reviewed by Simon Fraser.
418
419         * WebProcess/WebProcess.cpp:
420         (WebKit::WebProcess::didReceiveMessage): Return after handling WebPageGroupProxy messages
421           instead of logging an error.
422
423 2015-03-02  Antti Koivisto  <antti@apple.com>
424
425         Add way to dump cache meta data to file
426         https://bugs.webkit.org/show_bug.cgi?id=142183
427
428         Add a missing return so we don't try to decode a null entry.
429
430         * NetworkProcess/cache/NetworkCache.cpp:
431         (WebKit::NetworkCache::dumpContentsToFile):
432
433 2015-03-02  Anders Carlsson  <andersca@apple.com>
434
435         Return disk cache entries from the new disk cache
436         https://bugs.webkit.org/show_bug.cgi?id=142190
437
438         Reviewed by Antti Koivisto.
439
440         * NetworkProcess/NetworkProcess.cpp:
441         (WebKit::fetchDiskCacheEntries):
442         Call NetworkCache::traverse() to get all the cache entries, unique their origins and pass them back with the completion handler.
443
444         * NetworkProcess/cache/NetworkCache.cpp:
445         (WebKit::NetworkCache::traverse):
446         New helper function that traverses network cache entries.
447
448         * NetworkProcess/cache/NetworkCache.h:
449
450 2015-03-02  Antti Koivisto  <antti@apple.com>
451
452         Add way to dump cache meta data to file
453         https://bugs.webkit.org/show_bug.cgi?id=142183
454
455         Reviewed by Andreas Kling.
456
457         Dump goes to WebKitCache/dump.json. On OSX it can be triggered with
458
459         notifyutil -p com.apple.WebKit.Cache.dump
460
461         * NetworkProcess/cache/NetworkCache.cpp:
462         (WebKit::NetworkCache::initialize):
463         (WebKit::NetworkCache::dumpFilePath):
464         (WebKit::entryAsJSON):
465         (WebKit::NetworkCache::dumpContentsToFile):
466         (WebKit::NetworkCache::clear):
467
468             Also clear any dumps.
469
470         * NetworkProcess/cache/NetworkCache.h:
471         * NetworkProcess/cache/NetworkCacheStorage.h:
472         (WebKit::NetworkCacheStorage::baseDirectoryPath):
473         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
474         (WebKit::fileNameForKey):
475         (WebKit::filePathForKey):
476         (WebKit::openFile):
477         (WebKit::openFileForKey):
478         (WebKit::decodeEntryHeader):
479
480             Separate header decoding.
481
482         (WebKit::decodeEntry):
483         (WebKit::NetworkCacheStorage::traverse):
484
485             Add asynchronous cache traversal inteface.
486
487 2015-03-02  Anders Carlsson  <andersca@apple.com>
488
489         WebsiteDataStore should handle deleting cookies
490         https://bugs.webkit.org/show_bug.cgi?id=142185
491
492         Reviewed by Beth Dakin.
493
494         * NetworkProcess/NetworkProcess.cpp:
495         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
496         When asked to delete cookies, do so.
497
498         * NetworkProcess/NetworkProcess.h:
499         Update the deleteWebsiteDataForOrigins signature.
500
501         * NetworkProcess/NetworkProcess.messages.in:
502         Add cookieHostNames to DeleteWebsiteDataForOrigins.
503
504         * UIProcess/Network/NetworkProcessProxy.cpp:
505         (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
506         * UIProcess/Network/NetworkProcessProxy.h:
507         Update to take a vector of cookie host names.
508
509         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
510         (WebKit::WebsiteDataStore::removeData):
511         Figure out if we need to ask the network process to delete data.
512
513 2015-03-02  Anders Carlsson  <andersca@apple.com>
514
515         WebsiteDataStore should support getting cookie host names
516         https://bugs.webkit.org/show_bug.cgi?id=142178
517
518         Reviewed by Dan Bernstein.
519
520         * NetworkProcess/NetworkProcess.cpp:
521         (WebKit::NetworkProcess::fetchWebsiteData):
522         Assert that we're destroyed from the main thread since we end up copying the website data struct.
523
524         * Shared/WebsiteData/WebsiteData.cpp:
525         (WebKit::WebsiteData::encode):
526         (WebKit::WebsiteData::decode):
527         * Shared/WebsiteData/WebsiteData.h:
528         Add a hostnamesWithCookies member.
529
530         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
531         (WebKit::WebsiteDataRecord::displayNameForCookieHostName):
532         Add a new function that will return the display name for a cookie host name.
533
534         (WebKit::WebsiteDataRecord::addCookieHostName):
535         * UIProcess/WebsiteData/WebsiteDataRecord.h:
536         Add a hash set of cookie host names.
537
538         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
539         (WebKit::WebsiteDataStore::fetchData):
540         Create data records for each host name with cookies.
541
542 2015-03-02  Jer Noble  <jer.noble@apple.com>
543
544         [WK2][Mac] WebPageProxy::supressVisibilityUpdates() should suppress visibility updates.
545         https://bugs.webkit.org/show_bug.cgi?id=141907
546
547         Reviewed by Tim Horton.
548
549         At some point, the window/view/page visibility update code was refactored such that setting
550         WebPageProxy::setSuppressVisibilityUpdate() no longer suppressed visibility updates. This causes
551         full screen animations to become "flashy" when moving the WebView between the regular and full
552         screen window, as a HTMLMediaElement in the full screen animation will receive a "!visible"
553         notification and disconnect its rendering pipeline.
554
555         In WebPageProxy::viewStateDidChange(), respect m_suppressVisibilityUpdates and bail out early
556         if set. In WebPageProxy::setSuppressVisibilityUpdates(), trigger an explicit update after
557         clearing m_suppressVisibilityUpdates.
558
559         * UIProcess/WebPageProxy.cpp:
560         (WebKit::WebPageProxy::setSuppressVisibilityUpdates):
561         (WebKit::WebPageProxy::viewStateDidChange):
562         * UIProcess/WebPageProxy.h:
563         (WebKit::WebPageProxy::setSuppressVisibilityUpdates): Deleted.
564
565 2015-03-02  Jer Noble  <jer.noble@apple.com>
566
567         [WK1][WK2][Mac] Fullscreen animation is incorrect when page is scaled.
568         https://bugs.webkit.org/show_bug.cgi?id=142121
569
570         Reviewed by Simon Fraser.
571
572         Change the order of operations when entering or exiting fullscreen. Change the page scale to
573         1 before entering, so the final screen rect takes that scale into account, and vice-versa on
574         exiting.
575
576         * UIProcess/mac/WKFullScreenWindowController.mm:
577         (-[WKFullScreenWindowController enterFullScreen:]):
578         (-[WKFullScreenWindowController exitFullScreen]):
579
580 2015-03-01  Simon Fraser  <simon.fraser@apple.com>
581
582         Make clip-path work on <video>, <canvas> etc.
583         https://bugs.webkit.org/show_bug.cgi?id=138684
584
585         Reviewed by Darin Adler.
586         
587         Support encode/decode for WebCore Path objects, which is done by traversing
588         the path.
589
590         * Shared/WebCoreArgumentCoders.cpp:
591         (IPC::pathPointCountApplierFunction):
592         (IPC::pathEncodeApplierFunction):
593         (IPC::ArgumentCoder<Path>::encode):
594         (IPC::ArgumentCoder<Path>::decode):
595         * Shared/WebCoreArgumentCoders.h:
596         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
597         (WebKit::applyPropertiesToLayer): Actually apply the path and wind rule to the shape layer.
598         * Shared/mac/RemoteLayerTreeTransaction.h: Include path and wind rule in the layer properties.
599         * Shared/mac/RemoteLayerTreeTransaction.mm:
600         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
601         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode): Encode shape and wind rule.
602         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Decode shape and wind rule.
603         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
604         (WebKit::PlatformCALayerRemote::shapePath):
605         (WebKit::PlatformCALayerRemote::setShapePath):
606         (WebKit::PlatformCALayerRemote::shapeWindRule):
607         (WebKit::PlatformCALayerRemote::setShapeWindRule):
608         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
609
610 2015-03-01  Chris Dumez  <cdumez@apple.com>
611
612         Make NotificationCenter / Notification suspendable
613         https://bugs.webkit.org/show_bug.cgi?id=142117
614         <rdar://problem/19923085>
615
616         Reviewed by Andreas Kling.
617
618         Provide implementation for NotificationClient::hasPendingPermissionRequests().
619
620         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
621         (WebKit::NotificationPermissionRequestManager::hasPendingPermissionRequests):
622         * WebProcess/Notifications/NotificationPermissionRequestManager.h:
623         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
624         (WebKit::WebNotificationClient::hasPendingPermissionRequests):
625         * WebProcess/WebCoreSupport/WebNotificationClient.h:
626
627 2015-03-01  Antti Koivisto  <antti@apple.com>
628
629         Enable new disk cache on iOS
630         https://bugs.webkit.org/show_bug.cgi?id=142148
631
632         Reviewed by Sam Weinig.
633
634         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
635
636             iOS build fix.
637
638         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
639         (WebKit::registerUserDefaultsIfNeeded):
640
641             Disable the efficacy logging by default for now. It has significant performance impact.
642
643         * config.h:
644
645             Enable it.
646
647 2015-02-28  Anders Carlsson  <andersca@apple.com>
648
649         WebsiteDataStore should handle fetching and deleting local storage data
650         https://bugs.webkit.org/show_bug.cgi?id=142137
651
652         Reviewed by Sam Weinig.
653
654         * UIProcess/Storage/StorageManager.cpp:
655         (WebKit::StorageManager::deleteEntriesForOrigins):
656         Add a new function that deletes entries from multiple origins.
657
658         * UIProcess/Storage/StorageManager.h:
659         Add new members.
660
661         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
662         (WebKit::WebsiteDataStore::fetchData):
663         Fetch local storage data as well.
664
665         (WebKit::WebsiteDataStore::removeData):
666         Delete local storage data as well.
667
668 2015-02-28  Anders Carlsson  <andersca@apple.com>
669
670         Fetch cache origins from the network process
671         https://bugs.webkit.org/show_bug.cgi?id=142135
672
673         Reviewed by Dan Bernstein.
674
675         * NetworkProcess/NetworkProcess.cpp:
676         (WebKit::cfURLCacheOrigins):
677         Add a new helper function that returns a vector of CFURL cache origins.
678
679         (WebKit::fetchDiskCacheOrigins):
680         Fetch the disk cache origins and pass them along to the completion handler. Currently we don't handle the new disk cache.
681
682         (WebKit::NetworkProcess::fetchWebsiteData):
683         Create a callback aggregator and fetch disk cache origins if we're asked for it.
684
685         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
686         (WebKit::computeNetworkProcessAccessTypeForDataFetch):
687         New helper function that computes if we need to launch the network process in order to fetch data.
688
689         (WebKit::WebsiteDataStore::fetchData):
690         Fetch website data from the network process as well.
691
692 2015-02-28  Anders Carlsson  <andersca@apple.com>
693
694         Simplify WebResourceCacheManagerCFNet.mm code
695         https://bugs.webkit.org/show_bug.cgi?id=142134
696
697         Reviewed by Dan Bernstein.
698
699         - ENABLE(CACHE_PARTITIONING) is always true on Mac and iOS, so remove those #ifdefs.
700         - Make cfURLCacheHostNamesWithCallback and clearCFURLCacheForHostNames public
701           so they can be used by the new WebsiteDataStore code in an upcoming patch.
702         - Change cfURLCacheHostNamesWithCallback to take an std::function instead of a block.
703
704         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
705         (WebKit::WebResourceCacheManager::getCacheOrigins):
706         * WebProcess/ResourceCache/WebResourceCacheManager.h:
707         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm:
708         (WebKit::partitionName):
709         (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
710         (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames):
711         (WebKit::WebResourceCacheManager::cfURLCacheHostNames): Deleted.
712
713 2015-02-28  Commit Queue  <commit-queue@webkit.org>
714
715         Unreviewed, rolling out r180804.
716         https://bugs.webkit.org/show_bug.cgi?id=142131
717
718         Broke nightlies (Requested by ap on #webkit).
719
720         Reverted changeset:
721
722         "[WK2] Drop legacy WKBundlePageDiagnosticLoggingClient API"
723         https://bugs.webkit.org/show_bug.cgi?id=141176
724         http://trac.webkit.org/changeset/180804
725
726 2015-02-27  Hunseop Jeong  <hs85.jeong@samsung.com>
727
728         [EFL][GTK] Fix build break after r180790,180798 
729         https://bugs.webkit.org/show_bug.cgi?id=142127
730
731         Reviewed by Gyuyoung Kim.
732
733         * CMakeLists.txt:
734
735 2015-02-27  Chris Dumez  <cdumez@apple.com>
736
737         [WK2] Drop legacy WKBundlePageDiagnosticLoggingClient API
738         https://bugs.webkit.org/show_bug.cgi?id=141176
739
740         Reviewed by Sam Weinig.
741
742         Drop legacy WKBundlePageDiagnosticLoggingClient WK2 API as we are now
743         exposing this functionality via WKPageDiagnosticLoggingClient.h on
744         UIProcess side. The client-side has already been ported over.
745
746         * CMakeLists.txt:
747         * Shared/API/c/WKSharedAPICast.h:
748         (WebKit::toAPI): Deleted.
749         (WebKit::toDiagnosticLoggingResultType): Deleted.
750         * UIProcess/API/C/WKAPICast.h:
751         (WebKit::toAPI):
752         * UIProcess/API/C/WKDiagnosticLoggingResultType.h: Renamed from Source/WebKit2/Shared/API/c/WKDiagnosticLoggingResultType.h.
753         * WebKit2.xcodeproj/project.pbxproj:
754         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
755         (WKBundlePageSetDiagnosticLoggingClient): Deleted.
756         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
757         * WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h: Removed.
758         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp: Removed.
759         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h: Removed.
760         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
761         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
762         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
763         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
764         * WebProcess/WebPage/WebPage.cpp:
765         (WebKit::WebPage::WebPage):
766         (WebKit::WebPage::close):
767         (WebKit::WebPage::initializeInjectedBundleDiagnosticLoggingClient): Deleted.
768         * WebProcess/WebPage/WebPage.h:
769         (WebKit::WebPage::injectedBundleDiagnosticLoggingClient): Deleted.
770
771 2015-02-27  Anders Carlsson  <andersca@apple.com>
772
773         Rename WebResourceCacheManagerCFNet.cpp to WebResourceCacheManagerCFNet.mm
774
775         Rubber-stamped by Dan Bernstein.
776
777         This will let us use lambda to block conversion in a subsequent patch.
778
779         * WebKit2.xcodeproj/project.pbxproj:
780         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm: Renamed from Source/WebKit2/WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp.
781
782 2015-02-27  Commit Queue  <commit-queue@webkit.org>
783
784         Unreviewed, rolling out r180203 and r180210.
785         https://bugs.webkit.org/show_bug.cgi?id=142116
786
787         broke process suspension and tile map (Requested by thorton on
788         #webkit).
789
790         Reverted changesets:
791
792         "Adopt CAMachPort-as-layer-contents"
793         https://bugs.webkit.org/show_bug.cgi?id=141687
794         http://trac.webkit.org/changeset/180203
795
796         "Fix the !USE(IOSURFACE) build"
797         http://trac.webkit.org/changeset/180210
798
799 2015-02-27  Sam Weinig  <sam@webkit.org>
800
801         Add WebKit2 SPI to create a DOM File object
802         https://bugs.webkit.org/show_bug.cgi?id=142109
803
804         Reviewed by Tim Horton.
805
806         Add a new handle type for exposing a DOM File object to script. Follow
807         the pattern of WKBundleNodeHandleRef and WKBundleRangeHandleRef with the
808         new class WKBundleFileHandleRef. It can be created for a specific path,
809         and then the JS wrapper can be obtained via WKBundleFrameGetJavaScriptWrapperForFileForWorld.
810
811         * Shared/API/APIObject.h:
812         * Shared/API/c/WKBase.h:
813         * WebKit2.xcodeproj/project.pbxproj:
814         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
815         * WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.cpp: Added.
816         (WKBundleFileHandleGetTypeID):
817         (WKBundleFileHandleCreateWithPath):
818         * WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.h: Added.
819         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
820         (WKBundleFrameGetJavaScriptWrapperForFileForWorld):
821         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
822         * WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.cpp: Added.
823         (WebKit::domHandleCache):
824         (WebKit::InjectedBundleFileHandle::create):
825         (WebKit::InjectedBundleFileHandle::getOrCreate):
826         (WebKit::InjectedBundleFileHandle::InjectedBundleFileHandle):
827         (WebKit::InjectedBundleFileHandle::~InjectedBundleFileHandle):
828         (WebKit::InjectedBundleFileHandle::coreFile):
829         * WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.h: Added.
830         * WebProcess/WebPage/WebFrame.cpp:
831         (WebKit::WebFrame::jsWrapperForWorld):
832         * WebProcess/WebPage/WebFrame.h:
833
834 2015-02-27  Beth Dakin  <bdakin@apple.com>
835
836         Lookup panel dismisses when pages are loading in other tabs/windows
837         https://bugs.webkit.org/show_bug.cgi?id=142104
838         -and corresponding-
839         rdar://problem/19882137
840
841         Reviewed by Tim Horton.
842
843         Until rdar://problem/13875766 is resolved, we should only call into Lookup and 
844         DataDetectors for key windows.
845         * UIProcess/API/mac/WKView.mm:
846         (-[WKView _dismissContentRelativeChildWindows]):
847
848 2015-02-27  Anders Carlsson  <andersca@apple.com>
849
850         Add infrastructure for handling website data in the network process
851         https://bugs.webkit.org/show_bug.cgi?id=142092
852
853         Reviewed by Andreas Kling.
854
855         * NetworkProcess/NetworkProcess.cpp:
856         (WebKit::NetworkProcess::fetchWebsiteData):
857         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
858         Send back "Did" messages without actually doing anything for now.
859
860         * NetworkProcess/NetworkProcess.h:
861         Add new members.
862
863         * NetworkProcess/NetworkProcess.messages.in:
864         Add FetchWebsiteData and DeleteWebsiteDataForOrigins messages.
865
866         * UIProcess/Network/NetworkProcessProxy.cpp:
867         (WebKit::NetworkProcessProxy::~NetworkProcessProxy):
868         Assert that all maps are empty.
869
870         (WebKit::NetworkProcessProxy::fetchWebsiteData):
871         (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
872         Add callbacks and send fetch and delete messages respectively.
873
874         (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
875         Make sure to invoke all callbacks.
876
877         (WebKit::NetworkProcessProxy::didFetchWebsiteData):
878         Find the callback and invoke it.
879
880         (WebKit::NetworkProcessProxy::didDeleteWebsiteDataForOrigins):
881         Ditto.
882
883         * UIProcess/Network/NetworkProcessProxy.h:
884         Add new members.
885
886         * UIProcess/Network/NetworkProcessProxy.messages.in:
887         Add DidFetchWebsiteData and DidDeleteWebsiteDataForOrigins messages.
888
889         * UIProcess/WebProcessProxy.cpp:
890         (WebKit::WebProcessProxy::connectionDidClose):
891         Just pass an empty WebsiteData object.
892
893 2015-02-26  Enrica Casucci  <enrica@apple.com>
894
895         [WK2] REGRESSION(r180465): WebKit::WebPage::editorState() triggers a layout.
896         https://bugs.webkit.org/show_bug.cgi?id=142015
897
898         Reviewed by Alexey Proskuryakov.
899
900         We no longer compute the font information at selection
901         when we update the editor state.
902         Instead, we request the font information only when the selection
903         changes and the font panel is visible.
904         I added an observer to be notified of the font panel visibility
905         changes to update NSFontManager to reflect the font at the
906         current selection.
907
908         * Shared/EditorState.cpp:
909         (WebKit::EditorState::encode):
910         (WebKit::EditorState::decode):
911         * Shared/EditorState.h:
912         (WebKit::EditorState::EditorState):
913         * UIProcess/API/mac/WKView.mm:
914         (-[WKView updateFontPanelIfNeeded]):
915         (-[WKView _selectionChanged]):
916         (-[WKView addWindowObserversForWindow:]):
917         (-[WKView removeWindowObservers]):
918         (-[WKView observeValueForKeyPath:ofObject:change:context:]):
919         * UIProcess/WebPageProxy.h:
920         * UIProcess/WebPageProxy.messages.in:
921         * UIProcess/mac/WebPageProxyMac.mm:
922         (WebKit::WebPageProxy::fontAtSelection):
923         (WebKit::WebPageProxy::fontAtSelectionCallback):
924         * WebProcess/WebPage/WebPage.h:
925         * WebProcess/WebPage/WebPage.messages.in:
926         * WebProcess/WebPage/mac/WebPageMac.mm:
927         (WebKit::WebPage::platformEditorState):
928         (WebKit::WebPage::fontAtSelection):
929
930 2015-02-27  Brady Eidson  <beidson@apple.com>
931
932         Add API to remove a single content filter.
933         <rdar://problem/19977764> and https://bugs.webkit.org/show_bug.cgi?id=142088
934
935         Reviewed by Sam Weinig.
936
937         * Shared/WebPageGroupData.h:
938
939         * UIProcess/API/C/WKPageGroup.cpp:
940         (WKPageGroupRemoveUserContentFilter):
941
942         * UIProcess/API/C/WKPageGroup.h:
943         * UIProcess/API/Cocoa/WKUserContentController.mm:
944         (-[WKUserContentController _removeUserContentFilter:]):
945
946         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
947         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
948         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
949         (WebKit::WebUserContentControllerProxy::addProcess):
950         (WebKit::WebUserContentControllerProxy::addUserContentFilter):
951         (WebKit::WebUserContentControllerProxy::removeUserContentFilter):
952         (WebKit::WebUserContentControllerProxy::removeAllUserContentFilters):
953         * UIProcess/UserContent/WebUserContentControllerProxy.h:
954
955         * UIProcess/WebPageGroup.cpp:
956         (WebKit::WebPageGroup::addUserContentFilter):
957         (WebKit::WebPageGroup::removeUserContentFilter):
958         * UIProcess/WebPageGroup.h:
959
960         * WebProcess/UserContent/WebUserContentController.cpp:
961         (WebKit::WebUserContentController::removeUserContentFilter):
962         * WebProcess/UserContent/WebUserContentController.h:
963         * WebProcess/UserContent/WebUserContentController.messages.in:
964
965         * WebProcess/WebPage/WebPageGroupProxy.cpp:
966         (WebKit::WebPageGroupProxy::WebPageGroupProxy):
967         (WebKit::WebPageGroupProxy::removeUserContentFilter):
968         * WebProcess/WebPage/WebPageGroupProxy.h:
969         * WebProcess/WebPage/WebPageGroupProxy.messages.in:
970
971 2015-02-26  Anders Carlsson  <andersca@apple.com>
972
973         Add API to remove all website data for the given data records
974         https://bugs.webkit.org/show_bug.cgi?id=142060
975
976         Reviewed by Beth Dakin.
977
978         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
979         Add new method declaration.
980
981         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
982         (toWebsiteDataRecords):
983         Add a helper function that converts an NSArray of _WKWebsiteDataRecords to a Vector of WebsiteDataRecords.
984
985         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
986         Call through to the underlying WebsiteDataStore.
987
988         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
989         (WebKit::WebsiteDataStore::removeData):
990         Figure out which processes to call deleteWebsiteDataForOrigins for and do so. Add a callback aggregator so we can
991         call the completion handler at the right time.
992
993         * UIProcess/WebsiteData/WebsiteDataStore.h:
994         Add new members.
995
996         * WebProcess/WebProcess.cpp:
997         (WebKit::WebProcess::deleteWebsiteDataForOrigins):
998         Use the newly added MemoryCache member function to delete all resources matching the set of origins.
999
1000 2015-02-26  Chris Dumez  <cdumez@apple.com>
1001
1002         Rename DatabaseManager::manager() to DatabaseManager::singleton()
1003         https://bugs.webkit.org/show_bug.cgi?id=142054
1004
1005         Reviewed by Ryosuke Niwa.
1006
1007         Rename DatabaseManager::manager() to DatabaseManager::singleton() as
1008         per coding style and use WTF::NeverDestroyed.
1009
1010         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1011         (WebKit::WebChromeClient::exceededDatabaseQuota):
1012         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1013         (WebKit::WebDatabaseManager::initialize):
1014         (WebKit::WebDatabaseManager::getDatabasesByOrigin):
1015         (WebKit::WebDatabaseManager::getDatabaseOrigins):
1016         (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
1017         (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
1018         (WebKit::WebDatabaseManager::deleteAllDatabases):
1019         (WebKit::WebDatabaseManager::setQuotaForOrigin):
1020         * WebProcess/WebPage/WebPage.cpp:
1021         (WebKit::WebPage::updatePreferences):
1022
1023 2015-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
1024
1025         [Mac] [iOS] Parsing support for -apple-trailing-word
1026         https://bugs.webkit.org/show_bug.cgi?id=141939
1027
1028         Reviewed by Andreas Kling.
1029
1030         * Configurations/FeatureDefines.xcconfig:
1031
1032 2015-02-26  Brady Eidson  <beidson@apple.com>
1033
1034         Make WKPageGroupRemoveAllUserContentFilters actually remove all user content filters
1035         https://bugs.webkit.org/show_bug.cgi?id=142047
1036
1037         Reviewed by Geoff Garen.
1038
1039         * UIProcess/API/C/WKPageGroup.cpp:
1040         (WKPageGroupRemoveAllUserContentFilters): Remove all content filters instead of removing all user scripts.
1041
1042 2015-02-25  Anders Carlsson  <andersca@apple.com>
1043
1044         Add (unused for now) code to delete website data for a set of origins
1045         https://bugs.webkit.org/show_bug.cgi?id=142019
1046
1047         Reviewed by Beth Dakin.
1048
1049         * UIProcess/WebProcessProxy.cpp:
1050         (WebKit::WebProcessProxy::~WebProcessProxy):
1051         Assert that there are no pending callbacks.
1052
1053         (WebKit::WebProcessProxy::connectionDidClose):
1054         Invoke all the didDeleteWebsiteDataForOrigins callbacks.
1055
1056         (WebKit::WebProcessProxy::didDeleteWebsiteDataForOrigins):
1057         Grab the didDeleteWebsiteDataForOrigins and invoke it.
1058
1059         (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
1060         Add the pending callback and send a DeleteWebsiteDataForOrigins to the web process.
1061
1062         * UIProcess/WebProcessProxy.h:
1063         Add new members.
1064
1065         * UIProcess/WebProcessProxy.messages.in:
1066         Add a DidDeleteWebsiteDataForOrigins message.
1067
1068         * WebProcess/WebProcess.cpp:
1069         (WebKit::WebProcess::deleteWebsiteDataForOrigins):
1070         For now, just send back a DidDeleteWebsiteDataForOrigins message.
1071
1072         * WebProcess/WebProcess.h:
1073         Add new members.
1074
1075         * WebProcess/WebProcess.messages.in:
1076         Add a DeleteWebsiteDataForOrigins message.
1077
1078 2015-02-25  Shivakumar JM  <shiva.jm@samsung.com>
1079
1080         Fix build warning in WebKit2/UIProcess module.
1081         https://bugs.webkit.org/show_bug.cgi?id=142014
1082
1083         Reviewed by Anders Carlsson.
1084
1085         Fix build warning by using UNUSED_PARAM macro.
1086
1087         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1088         (WebKit::computeWebProcessAccessTypeForDataFetch):
1089
1090 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
1091
1092         Clarify some resizing terminology in ScrollView/FrameView
1093         https://bugs.webkit.org/show_bug.cgi?id=141996
1094
1095         Reviewed by Zalan Bujtas.
1096
1097         ScrollableArea/ScrollView/FrameView had some confusing terminology around
1098         contentsResized/visibleContentsResized/fixedLayoutSizeChanged.
1099         
1100         Clarify this by distinguishing between:
1101         1. Available size changes because of
1102             i) non-overlay scrollbar presence
1103            ii) ScrollableArea frame change
1104         2. Removing fixedLayoutSizeChanged() and just treating it like an
1105            available size change.
1106            
1107         contentsResized() is relegated to simply being a hook that allows Mac to
1108         flash overlay scrollbars.
1109         
1110         The confusingly named visibleContentsResized() is now updateContentsSize(),
1111         and is the way that a ScrollableArea tells its subclasss that it should recompute
1112         the size of the contents (i.e. do a layout).
1113
1114         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1115         (WebKit::PDFPlugin::scrollbarStyleChanged): Call the base class method,
1116         which takes care of 
1117
1118 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
1119
1120         Use an enum for scrollbar style
1121         https://bugs.webkit.org/show_bug.cgi?id=141985
1122
1123         Reviewed by Beth Dakin.
1124         
1125         Switch to an enum class for the scrollbar style (normal or overlay).
1126         
1127         Sadly it still has to be passed as an int across the process boundary.
1128
1129         * UIProcess/PageClient.h:
1130         * UIProcess/WebPageProxy.cpp:
1131         (WebKit::WebPageProxy::recommendedScrollbarStyleDidChange):
1132         * UIProcess/mac/PageClientImpl.h:
1133         * UIProcess/mac/PageClientImpl.mm:
1134         (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
1135         * WebProcess/Plugins/PDF/PDFPlugin.h:
1136         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1137         (WebKit::PDFPlugin::scrollbarStyleChanged):
1138         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1139         (WebKit::WebChromeClient::recommendedScrollbarStyleDidChange):
1140         * WebProcess/WebCoreSupport/WebChromeClient.h:
1141
1142 2015-02-24  Chris Dumez  <cdumez@apple.com>
1143
1144         [Mac][WK2] ASSERTION FAILED: m_sendPort in IPC::Connection::open()
1145         https://bugs.webkit.org/show_bug.cgi?id=141934
1146
1147         Reviewed by Darin Adler.
1148
1149         Speculative fix for "ASSERTION FAILED: m_sendPort" in
1150         IPC::Connection::open(). This assertion seems to indicate we ended
1151         up in IPC::Connection::open() with MACH_PORT_NULL as port.
1152
1153         I found that in XPCServiceInitializerDelegate::getConnectionIdentifier()
1154         we return true unconditionally, even though
1155         xpc_dictionary_copy_mach_send() can return MACH_PORT_NULL. This patch
1156         updates this method to add a check for MACH_PORT_NULL and return false
1157         in this case.
1158
1159         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
1160         (WebKit::XPCServiceInitializerDelegate::getConnectionIdentifier):
1161
1162 2015-02-24  Commit Queue  <commit-queue@webkit.org>
1163
1164         Unreviewed, rolling out r180599.
1165         https://bugs.webkit.org/show_bug.cgi?id=141998
1166
1167         Lots of new test failures (Requested by smfr on #webkit).
1168
1169         Reverted changeset:
1170
1171         "Parsing support for -webkit-trailing-word"
1172         https://bugs.webkit.org/show_bug.cgi?id=141939
1173         http://trac.webkit.org/changeset/180599
1174
1175 2015-02-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1176
1177         Fix build break on EFL and GTK port since r180585.
1178         https://bugs.webkit.org/show_bug.cgi?id=141994
1179
1180         Reviewed by Joseph Pecoraro.
1181
1182         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
1183         (WebKit::WebsiteDataRecord::displayNameForOrigin):
1184         * UIProcess/WebsiteData/WebsiteDataRecord.h:
1185         (WebKit::WebsiteDataRecord::WebsiteDataRecord):
1186
1187 2015-02-24  Myles C. Maxfield  <mmaxfield@apple.com>
1188
1189         [Mac] [iOS] Parsing support for -apple-trailing-word
1190         https://bugs.webkit.org/show_bug.cgi?id=141939
1191
1192         Reviewed by Andreas Kling.
1193
1194         * Configurations/FeatureDefines.xcconfig:
1195
1196 2015-02-24  Csaba Osztrogonác  <ossy@webkit.org>
1197
1198         Buildfix after r180585.
1199
1200         * CMakeLists.txt:
1201
1202 2015-02-24  Anders Carlsson  <andersca@apple.com>
1203
1204         Pass _WKWebsiteDataRecord objects to the fetchData completion handler
1205         https://bugs.webkit.org/show_bug.cgi?id=141984
1206
1207         Reviewed by Andreas Kling.
1208
1209         * Shared/Cocoa/APIObject.mm:
1210         (API::Object::newObject):
1211         Create _WKWebsiteDataRecord objects for WebsiteDataRecord API objects.
1212
1213         * UIProcess/API/APIWebsiteDataRecord.h:
1214         Add WebsiteDataRecord getter.
1215
1216         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
1217         Add displayName and dataTypes properties.
1218
1219         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
1220         (dataTypesToString):
1221         Helper function to convert dataTypes bit-fields to strings.
1222
1223         (-[_WKWebsiteDataRecord description]):
1224         Include the display name and data types in the description.
1225
1226         (-[_WKWebsiteDataRecord displayName]):
1227         Return the display name.
1228
1229         (-[_WKWebsiteDataRecord dataTypes]):
1230         Return the data types.
1231
1232         * UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
1233         (WebKit::toWebsiteDataTypes):
1234         Move this here from _WKWebsiteDataStore.mm.
1235
1236         (WebKit::toWKWebsiteDataTypes):
1237         Add new function to convert WebsiteDataTypes to WKWebsiteDataTypes.
1238
1239         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1240         (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1241         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1242         Qualify toWebsiteDataTypes calls.
1243
1244         * UIProcess/WebsiteData/WebsiteDataRecord.cpp: Added.
1245         (WebKit::WebsiteDataRecord::displayNameForOrigin):
1246         New helper that returns a display name given an origin.
1247
1248         (WebKit::WebsiteDataRecord::add):
1249         Add the origin as well as the type.
1250
1251         * UIProcess/WebsiteData/WebsiteDataRecord.h:
1252         Add new members.
1253
1254         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1255         (WebKit::WebsiteDataStore::fetchData):
1256         Loop through the entries and add them to the m_websiteDataRecords hash map, which
1257         is keyed off of the display name. Pass the m_websiteDataRecords values to the completion handler.
1258
1259         * WebKit2.xcodeproj/project.pbxproj:
1260
1261 2015-02-24  Csaba Osztrogonác  <ossy@webkit.org>
1262
1263         One more buildfix after r180575.
1264
1265         * UIProcess/WebProcessProxy.cpp:
1266         (WebKit::WebProcessProxy::connectionDidClose):
1267
1268 2015-02-24  Csaba Osztrogonác  <ossy@webkit.org>
1269
1270         URTBF after 180575.
1271
1272         * CMakeLists.txt:
1273
1274 2015-02-24  Anders Carlsson  <andersca@apple.com>
1275
1276         Implement more of the data fetching API
1277         https://bugs.webkit.org/show_bug.cgi?id=141975
1278
1279         Reviewed by Andreas Kling.
1280
1281         * Shared/WebsiteData/WebsiteData.cpp: Added.
1282         (WebKit::WebsiteData::Entry::encode):
1283         (WebKit::WebsiteData::Entry::decode):
1284         (WebKit::WebsiteData::encode):
1285         (WebKit::WebsiteData::decode):
1286         * Shared/WebsiteData/WebsiteData.h: Added.
1287         Add a new WebsiteData class that will store website data. Currently it only stores
1288         origin + website data type, but in the future it is going to store more things, like 
1289         host names that have cookies associated.
1290
1291         * UIProcess/WebProcessProxy.cpp:
1292         (WebKit::WebProcessProxy::~WebProcessProxy):
1293         Assert that we don't have any pending fetch data callbacks.
1294
1295         (WebKit::WebProcessProxy::connectionDidClose):
1296         Invoke any pending fetch website data callbacks.
1297
1298         (WebKit::WebProcessProxy::didFetchWebsiteData):
1299         Grab the callback and invoke it.
1300
1301         (WebKit::WebProcessProxy::fetchWebsiteData):
1302         Set up a pending callback and send a FetchWebsiteData message to the web process.
1303
1304         * UIProcess/WebProcessProxy.h:
1305         Add new member.
1306
1307         * UIProcess/WebProcessProxy.messages.in:
1308         Add a DidFetchWebsiteData message.
1309
1310         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1311         (WebKit::computeWebProcessAccessTypeForDataFetch):
1312         Return the web process access type for the given set of data types.
1313
1314         (WebKit::WebsiteDataStore::fetchData):
1315         Set up a callback aggregator that will assemble the needed website data into a vector of website data records.
1316
1317         (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
1318         (WebKit::computeWebProcessAccessTypeForDataRemoval):
1319         Rename these functions to indicate that they are about data removal.
1320
1321         (WebKit::WebsiteDataStore::removeData):
1322         Append "ForDataRemoval" to function calls.
1323
1324         * WebKit2.xcodeproj/project.pbxproj:
1325         Add new files.
1326
1327         * WebProcess/Storage/StorageAreaMap.cpp:
1328         (WebKit::StorageAreaMap::StorageAreaMap):
1329         Tighten types.
1330
1331         * WebProcess/WebProcess.cpp:
1332         (WebKit::WebProcess::fetchWebsiteData):
1333         For now, just fetch memory cache data.
1334
1335         * WebProcess/WebProcess.h:
1336         Add new members.
1337
1338         * WebProcess/WebProcess.messages.in:
1339         Add FetchWebsiteData message.
1340
1341 2015-02-24  Yusuke Suzuki  <utatane.tea@gmail.com>
1342
1343         REGRESSION(r179429): Can't type comments in Facebook
1344         https://bugs.webkit.org/show_bug.cgi?id=141859
1345
1346         Reviewed by Brent Fulgham.
1347
1348         Enable SymbolEnabled in inspector context.
1349
1350         * Shared/WebPreferencesDefinitions.h:
1351         * UIProcess/API/C/WKPreferences.cpp:
1352         (WKPreferencesSetJavaScriptRuntimeFlags):
1353         (WKPreferencesGetJavaScriptRuntimeFlags):
1354         (WKPreferencesSetJavaScriptExperimentsEnabled): Deleted.
1355         (WKPreferencesGetJavaScriptExperimentsEnabled): Deleted.
1356         * UIProcess/API/C/WKPreferencesRef.h:
1357         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1358         * UIProcess/API/Cocoa/WKPreferences.mm:
1359         (-[WKPreferences _javaScriptRuntimeFlags]):
1360         (-[WKPreferences _setJavaScriptRuntimeFlags:]):
1361         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1362         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1363         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1364         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1365         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1366         * UIProcess/mac/WebInspectorProxyMac.mm:
1367         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1368         * WebProcess/WebPage/WebPage.cpp:
1369         (WebKit::WebPage::updatePreferences):
1370         * mac/WebKit2.order:
1371
1372 2015-02-24  Anders Carlsson  <andersca@apple.com>
1373
1374         Tighten up some SecurityOrigin related code, use references where possible
1375         https://bugs.webkit.org/show_bug.cgi?id=141971
1376
1377         Reviewed by Antti Koivisto.
1378
1379         * DatabaseProcess/DatabaseProcess.cpp:
1380         (WebKit::DatabaseProcess::getIndexedDatabaseOrigins):
1381         * Shared/SecurityOriginData.cpp:
1382         (WebKit::SecurityOriginData::fromSecurityOrigin):
1383         (WebKit::SecurityOriginData::securityOrigin):
1384         * Shared/SecurityOriginData.h:
1385         * UIProcess/Storage/StorageManager.cpp:
1386         (WebKit::StorageManager::createTransientLocalStorageMap):
1387         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1388         (WebKit::WebIDBServerConnection::WebIDBServerConnection):
1389         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
1390         (WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins):
1391         * WebProcess/Storage/StorageAreaMap.cpp:
1392         (WebKit::StorageAreaMap::create):
1393         (WebKit::StorageAreaMap::StorageAreaMap):
1394         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
1395         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
1396         * WebProcess/Storage/StorageAreaMap.h:
1397         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1398         (WebKit::StorageNamespaceImpl::storageArea):
1399
1400 2015-02-24  Michael Catanzaro  <mcatanzaro@igalia.com>
1401
1402         Crash loading local file with WebPageProxy::loadAlternateHTMLString
1403         https://bugs.webkit.org/show_bug.cgi?id=141867
1404
1405         Reviewed by Anders Carlsson.
1406
1407         WebPageProxy::loadAlternateHTMLString needs to assume read access to unreachableURL as well
1408         as baseURL, because unreachableURL will get added to the back/forward list, causing us to
1409         crash later on when we notice the unexpected URL received in checkURLReceivedFromWebProcess.
1410
1411         * UIProcess/WebPageProxy.cpp:
1412         (WebKit::WebPageProxy::loadAlternateHTMLString):
1413
1414 2015-02-24  Ryuan Choi  <ryuan.choi@navercorp.com>
1415
1416         [EFL] Add message APIs to communicate between ewk_context and extensions
1417         https://bugs.webkit.org/show_bug.cgi?id=137660
1418
1419         Reviewed by Gyuyoung Kim.
1420
1421         * PlatformEfl.cmake: Added dependencies for ewk2UnitTestExtensionSample
1422         * UIProcess/API/efl/ewk_context.cpp:
1423         (EwkContext::EwkContext):
1424         (EwkContext::didReceiveMessageFromInjectedBundle):
1425         (EwkContext::setMessageFromExtensionCallback):
1426         (EwkContext::processReceivedMessageFromInjectedBundle):
1427         (ewk_context_message_post_to_extensions):
1428         (ewk_context_message_from_extensions_callback_set):
1429         (EwkContext::didReceiveSynchronousMessageFromInjectedBundle):
1430         Deleted to split synchronouse message APIs from asynchronuous message APIs.
1431         ewebkit will not support this until there are requirements.
1432         (EwkContext::setMessageFromInjectedBundleCallback): Renamed to setMessageFromExtensionCallback.
1433         (ewk_context_message_post_to_injected_bundle): Renamed to ewk_context_message_post_to_extensions.
1434         (ewk_context_message_from_injected_bundle_callback_set): Renamed to ewk_context_message_from_injected_bundle_callback_set.
1435         * UIProcess/API/efl/ewk_context.h:
1436         * UIProcess/API/efl/ewk_context_private.h:
1437         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
1438         Improved test case for ewk_context_new_with_extensions_path using the message APIs.
1439         (EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):
1440         (EWK2UnitTest::EWK2UnitTestBase::SetUp):
1441         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
1442         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
1443         (EWK2UnitTest::EWK2UnitTestEnvironment::extensionSample): Deleted.
1444         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
1445         * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
1446         Improved test case for ewk_context_new_with_extensions_path using the message APIs.
1447         * UIProcess/API/efl/tests/test_ewk2_context.cpp: Ditto.
1448         (EWK2ContextTestWithExtension::messageReceivedCallback):
1449         (EWK2ContextTestWithExtension::EWK2ContextTestWithExtension):
1450         (TEST_F):
1451         * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
1452         (toEwkExtendion):
1453         (EwkExtension::EwkExtension):
1454         (EwkExtension::didCreatePage):
1455         (EwkExtension::willDestroyPage):
1456         (EwkExtension::didReceiveMessage):
1457         (EwkExtension::didReceiveMessageToPage):
1458         (ewk_extension_message_post): Implemented to post message to ewk_context.
1459         * WebProcess/InjectedBundle/API/efl/ewk_extension.h:
1460         * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h:
1461         (EwkExtension::bundle):
1462         * WebProcess/efl/ExtensionManagerEfl.cpp:
1463         (WebKit::ExtensionManagerEfl::initialize):
1464         Fixed the bug when there are different shared objects in extension path.
1465         This is spotted while improving test case.
1466
1467 2015-02-23  Commit Queue  <commit-queue@webkit.org>
1468
1469         Unreviewed, rolling out r180547 and r180550.
1470         https://bugs.webkit.org/show_bug.cgi?id=141957
1471
1472         Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
1473
1474         Reverted changesets:
1475
1476         "REGRESSION(r179429): Can't type comments in Facebook"
1477         https://bugs.webkit.org/show_bug.cgi?id=141859
1478         http://trac.webkit.org/changeset/180547
1479
1480         "Constructor returning null should construct an object instead
1481         of null"
1482         https://bugs.webkit.org/show_bug.cgi?id=141640
1483         http://trac.webkit.org/changeset/180550
1484
1485 2015-02-23  Ryosuke Niwa  <rniwa@webkit.org>
1486
1487         Disable font loading events until our implementation gets updated to match the latest spec
1488         https://bugs.webkit.org/show_bug.cgi?id=141938
1489
1490         Reviewed by Andreas Kling.
1491
1492         * Configurations/FeatureDefines.xcconfig:
1493
1494 2015-02-23  Yusuke Suzuki  <utatane.tea@gmail.com>
1495
1496         REGRESSION(r179429): Can't type comments in Facebook
1497         https://bugs.webkit.org/show_bug.cgi?id=141859
1498
1499         Reviewed by Geoffrey Garen.
1500
1501         Enable SymbolEnabled in inspector context.
1502
1503         * Shared/WebPreferencesDefinitions.h:
1504         * UIProcess/API/C/WKPreferences.cpp:
1505         (WKPreferencesSetJavaScriptRuntimeFlags):
1506         (WKPreferencesGetJavaScriptRuntimeFlags):
1507         (WKPreferencesSetJavaScriptExperimentsEnabled): Deleted.
1508         (WKPreferencesGetJavaScriptExperimentsEnabled): Deleted.
1509         * UIProcess/API/C/WKPreferencesRef.h:
1510         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1511         * UIProcess/API/Cocoa/WKPreferences.mm:
1512         (-[WKPreferences _javaScriptRuntimeFlags]):
1513         (-[WKPreferences _setJavaScriptRuntimeFlags:]):
1514         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1515         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1516         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1517         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1518         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1519         * UIProcess/mac/WebInspectorProxyMac.mm:
1520         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1521         * WebProcess/WebPage/WebPage.cpp:
1522         (WebKit::WebPage::updatePreferences):
1523         * mac/WebKit2.order:
1524
1525 2015-02-23  Benjamin Poulain  <bpoulain@apple.com>
1526
1527         [iOS WK2] The WebProcess keep scrolling pages based on the last velocity after scrolling has been interrupted
1528         https://bugs.webkit.org/show_bug.cgi?id=141933
1529         rdar://problem/18746673
1530         rdar://problem/19711490
1531
1532         Reviewed by Simon Fraser.
1533
1534         The bug happened like this:
1535         1) The user scroll the page. WKContentView tracks the velocity and send
1536            the update rect + velocity to the WebProcess.
1537         2) The user interupts the scrolling but does not commit to either scrolling
1538            again or cancelling the scrolling.
1539            Since we were not notified of this state, the WebProcess still believed
1540            the velocity is stable.
1541         3) With any paint update, the WebProcess would account for the last velocity
1542            and try to guess the best repaint area. This would drift endlessly out
1543            of the view since the view is not really moving.
1544
1545         This patch fixes the issue by adding special handling for interrupted scrolling.
1546
1547         Kudos to Kurt Revis for providing us the required APIs.
1548
1549         * Shared/VisibleContentRectUpdateInfo.h:
1550         (WebKit::operator==):
1551         We can no longer filter VisibleContentRectUpdateInfo ignoring the velocity.
1552
1553         Typically, UIScrollView would call -scrollViewDidScroll: before being interrupted.
1554         If we filter based on the VisibleContentRectUpdateInfo, we have two identical
1555         states differing only by the velocity. If we filter the second update, the WebProcess
1556         would never know the velocity should be zero.
1557
1558         * UIProcess/API/Cocoa/WKWebView.mm:
1559         (-[WKWebView _scrollViewDidInterruptDecelerating:]):
1560         We get this callback when scrolling is interrupted. We just need to clear
1561         the velocity and re-send a new update for the current state.
1562
1563         (-[WKWebView _updateVisibleContentRects]):
1564         Do not consider an interrupted scroll as a stable state. We don't know if scrolling
1565         will resume or will stop.
1566
1567         * UIProcess/ios/WKContentView.h:
1568         * UIProcess/ios/WKContentView.mm:
1569         (-[WKContentView didInterruptScrolling]):
1570
1571 2015-02-23  Anders Carlsson  <andersca@apple.com>
1572
1573         Add API for fetching website data records to _WKWebsiteDataStore
1574         https://bugs.webkit.org/show_bug.cgi?id=141926
1575
1576         Reviewed by Beth Dakin.
1577
1578         * UIProcess/API/APIWebsiteDataRecord.cpp:
1579         (API::WebsiteDataRecord::create):
1580         (API::WebsiteDataRecord::WebsiteDataRecord):
1581         * UIProcess/API/APIWebsiteDataRecord.h:
1582         Update to take a WebsiteDataRecord parameter.
1583
1584         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1585         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1586         (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1587         Call down to the WebsiteDataStore.
1588
1589         * UIProcess/WebsiteData/WebsiteDataRecord.h: Added.
1590         This will be the data-container part of WebsiteDataRecord, but it's currently empty.
1591
1592         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1593         (WebKit::WebsiteDataStore::fetchData):
1594         Just dispatch the completion handler for now.
1595
1596         * UIProcess/WebsiteData/WebsiteDataStore.h:
1597         Add new member.
1598
1599         * WebKit2.xcodeproj/project.pbxproj:
1600         Add new files.
1601
1602 2015-02-23  Chris Dumez  <cdumez@apple.com>
1603
1604         Add support for diagnostic logging messages sampling
1605         https://bugs.webkit.org/show_bug.cgi?id=141823
1606         <rdar://problem/19899030>
1607
1608         Reviewed by Andreas Kling.
1609
1610         Add support for diagnostic logging messages sampling to decrease the
1611         impact of diagnostic logging on CPU usage, while still getting useful
1612         overall results. This patch adds a ShouldSample argument to
1613         logDiagnosticMessage*() functions and logs 5% of the messages when
1614         sampling. Sampling is turned on for keys that are known to be verbose
1615         (e.g. per resource load logging).
1616
1617         On the page load test I am tracking, CPU usage caused by diagnostic
1618         logging went down to 0.3% of UIProcess from 2.8% with this change.
1619
1620         * NetworkProcess/NetworkProcess.cpp:
1621         (WebKit::NetworkProcess::logDiagnosticMessage):
1622         (WebKit::NetworkProcess::logDiagnosticMessageWithResult):
1623         (WebKit::NetworkProcess::logDiagnosticMessageWithValue):
1624         * NetworkProcess/NetworkProcess.h:
1625         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
1626         (WebKit::NetworkCacheStatistics::recordNotUsingCacheForRequest):
1627         (WebKit::NetworkCacheStatistics::recordRetrievalFailure):
1628         (WebKit::NetworkCacheStatistics::recordRetrievedCachedEntry):
1629         * UIProcess/Network/NetworkProcessProxy.cpp:
1630         (WebKit::NetworkProcessProxy::logDiagnosticMessage):
1631         (WebKit::NetworkProcessProxy::logDiagnosticMessageWithResult):
1632         (WebKit::NetworkProcessProxy::logDiagnosticMessageWithValue):
1633         * UIProcess/Network/NetworkProcessProxy.h:
1634         * UIProcess/Network/NetworkProcessProxy.messages.in:
1635         * UIProcess/WebPageProxy.cpp:
1636         (WebKit::shouldLogDiagnosticMessage):
1637         (WebKit::WebPageProxy::logDiagnosticMessage):
1638         (WebKit::WebPageProxy::logDiagnosticMessageWithResult):
1639         (WebKit::WebPageProxy::logDiagnosticMessageWithValue):
1640         * UIProcess/WebPageProxy.h:
1641         * UIProcess/WebPageProxy.messages.in:
1642         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
1643         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
1644         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
1645         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
1646         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
1647         * WebProcess/WebPage/ios/WebPageIOS.mm:
1648         (WebKit::WebPage::willStartUserTriggeredZooming):
1649
1650 2015-02-23  Anders Carlsson  <andersca@apple.com>
1651
1652         Add a stubbed out _WKWebsiteDataRecord class
1653         https://bugs.webkit.org/show_bug.cgi?id=141919
1654
1655         Reviewed by Beth Dakin.
1656
1657         Also add the corresponding API::WebsiteDataRecord C++ class. A website data record is going to represent
1658         a set of associated websites and the types of website data that exist for said websites.
1659
1660         * Shared/API/APIObject.h:
1661         * UIProcess/API/APIWebsiteDataRecord.cpp: Added.
1662         * UIProcess/API/APIWebsiteDataRecord.h: Added.
1663         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h: Added.
1664         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm: Added.
1665         * UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h: Added.
1666         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1667         * WebKit2.xcodeproj/project.pbxproj:
1668
1669 2015-02-23  Timothy Horton  <timothy_horton@apple.com>
1670
1671         Reproducible crash in ViewGestureController::removeSwipeSnapshot()
1672         https://bugs.webkit.org/show_bug.cgi?id=141917
1673         <rdar://problem/19918590>
1674
1675         Reviewed by Brian Weinstein.
1676
1677         * UIProcess/mac/ViewGestureControllerMac.mm:
1678         (WebKit::ViewGestureController::removeSwipeSnapshot):
1679         If the snapshot was purged and we're showing a white snapshot, we won't
1680         be able to mark the (null) snapshot surface as volatile. Add a null check.
1681
1682 2015-02-23  Anders Carlsson  <andersca@apple.com>
1683
1684         Replace another straight-up cast with a toImpl call
1685         https://bugs.webkit.org/show_bug.cgi?id=141914
1686         rdar://problem/19913016
1687
1688         Reviewed by Andreas Kling.
1689
1690         This fixes a problem where Mail would not display message bodies.
1691
1692         * UIProcess/API/Cocoa/WKConnection.mm:
1693         (didReceiveMessage):
1694
1695 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
1696
1697         Scrollbars and ScrollAnimators must always have a ScrollableArea
1698         https://bugs.webkit.org/show_bug.cgi?id=141855
1699
1700         Reviewed by Simon Fraser.
1701         
1702         Change users of the scrollAnimator() method to expect a reference instead of a pointer.
1703
1704         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1705         (WebKit::PDFPlugin::createScrollbar):
1706         (WebKit::PDFPlugin::destroyScrollbar):
1707
1708 2015-02-20  Jessie Berlin  <jberlin@webkit.org>
1709
1710         Build fix after r180465.
1711
1712         * UIProcess/mac/PageClientImpl.h:
1713
1714 2015-02-20  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1715
1716         [GTK] Unreviewed build fix after r180449.
1717
1718         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
1719         (webkit_file_chooser_request_get_selected_files):
1720
1721 2015-02-20  Enrica Casucci  <enrica@apple.com>
1722
1723         [WK2] Add support for font panel on OS X.
1724         https://bugs.webkit.org/show_bug.cgi?id=141777
1725
1726         Reviewed by Tim Horton.
1727
1728         This patch adds the necessary hooks to WKView to support
1729         the font panel. It also includes refactoring of WebPage::editorState
1730         and WebPageProxy::editorStateChanged to separate the different platform
1731         specific tasks.
1732
1733         * Shared/EditorState.cpp:
1734         (WebKit::EditorState::encode):
1735         (WebKit::EditorState::decode):
1736         * Shared/EditorState.h:
1737         (WebKit::EditorState::EditorState):
1738         * UIProcess/API/mac/WKView.mm:
1739         (-[WKView _selectionChanged]):
1740         (-[WKView changeFont:]):
1741         * UIProcess/API/mac/WKViewInternal.h:
1742         * UIProcess/PageClient.h:
1743         * UIProcess/WebPageProxy.cpp:
1744         (WebKit::WebPageProxy::editorStateChanged): Deleted.
1745         * UIProcess/WebPageProxy.h:
1746         * UIProcess/efl/WebPageProxyEfl.cpp:
1747         (WebKit::WebPageProxy::editorStateChanged):
1748         * UIProcess/gtk/WebPageProxyGtk.cpp:
1749         (WebKit::WebPageProxy::editorStateChanged):
1750         * UIProcess/ios/WebPageProxyIOS.mm:
1751         (WebKit::WebPageProxy::editorStateChanged):
1752         * UIProcess/mac/PageClientImpl.h:
1753         * UIProcess/mac/PageClientImpl.mm:
1754         (WebKit::PageClientImpl::selectionDidChange):
1755         * UIProcess/mac/WebPageProxyMac.mm:
1756         (WebKit::WebPageProxy::setFont):
1757         (WebKit::WebPageProxy::editorStateChanged):
1758         * WebProcess/WebPage/WebPage.cpp:
1759         (WebKit::WebPage::editorState):
1760         * WebProcess/WebPage/WebPage.h:
1761         * WebProcess/WebPage/WebPage.messages.in:
1762         * WebProcess/WebPage/efl/WebPageEfl.cpp:
1763         (WebKit::WebPage::platformEditorState):
1764         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1765         (WebKit::WebPage::platformEditorState):
1766         * WebProcess/WebPage/ios/WebPageIOS.mm:
1767         (WebKit::WebPage::platformEditorState):
1768         * WebProcess/WebPage/mac/WebPageMac.mm:
1769         (WebKit::WebPage::platformEditorState):
1770         (WebKit::WebPage::setFont):
1771
1772 2015-02-20  Chris Dumez  <cdumez@apple.com>
1773
1774         [WK2] Add more detailed diagnostic logging for measuring network cache efficacy
1775         https://bugs.webkit.org/show_bug.cgi?id=141803
1776         <rdar://problem/19632080>
1777
1778         Reviewed by Antti Koivisto.
1779
1780         Add more detailed diagnostic logging for measuring network cache
1781         efficacy.
1782
1783         We want to know the reason the network cache is being by-passed, why
1784         the network cache decided not to cache a response and why it cannot
1785         reuse a cache entry.
1786
1787         This patch adds a new "UncachedReason" table to the SQLite database
1788         to store the reason the network cache is deciding not to cache a
1789         given response. This information is used later, when the resource is
1790         requested again to log the reason why the request cannot be satistied
1791         by the cache.
1792
1793         * NetworkProcess/cache/NetworkCache.cpp:
1794         (WebKit::decodeStorageEntry):
1795         (WebKit::canRetrieve):
1796         (WebKit::NetworkCache::retrieve):
1797         (WebKit::canStore):
1798         (WebKit::NetworkCache::store):
1799         * NetworkProcess/cache/NetworkCache.h:
1800         * NetworkProcess/cache/NetworkCacheStatistics.h:
1801         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
1802         (WebKit::NetworkCacheStatistics::initialize):
1803         (WebKit::NetworkCacheStatistics::recordNotCachingResponse):
1804         (WebKit::retrieveDecisionToDiagnosticKey):
1805         (WebKit::NetworkCacheStatistics::recordNotUsingCacheForRequest):
1806         (WebKit::storeDecisionToDiagnosticKey):
1807         (WebKit::NetworkCacheStatistics::recordRetrievalFailure):
1808         (WebKit::cachedEntryReuseFailureToDiagnosticKey):
1809         (WebKit::NetworkCacheStatistics::recordRetrievedCachedEntry):
1810         (WebKit::NetworkCacheStatistics::queryWasEverRequested):
1811         (WebKit::NetworkCacheStatistics::clear):
1812
1813 2015-02-20  Anders Carlsson  <andersca@apple.com>
1814
1815         API::String should just be a simple wrapper for WTF strings
1816         https://bugs.webkit.org/show_bug.cgi?id=141852
1817
1818         Reviewed by Beth Dakin.
1819
1820         Expose a StringView member function on API::String. Move all the WKString API implementations to WKString.cpp.
1821
1822         * Shared/API/APIString.h:
1823         * Shared/API/c/WKString.cpp:
1824         (WKStringIsEmpty):
1825         (WKStringGetLength):
1826         (WKStringGetCharacters):
1827         (WKStringGetMaximumUTF8CStringSize):
1828         (WKStringGetUTF8CString):
1829         (WKStringIsEqual):
1830         (WKStringIsEqualToUTF8CString):
1831         (WKStringIsEqualToUTF8CStringIgnoringCase):
1832
1833 2015-02-20  Anders Carlsson  <andersca@apple.com>
1834
1835         API::String::string() needs to return an isolated string copy
1836         https://bugs.webkit.org/show_bug.cgi?id=141846
1837
1838         Reviewed by Tim Horton.
1839
1840         Since we can expose API::String objects as NSStrings now, we need to make sure that
1841         we return copied strings so we won't mess up the StringImpl refcounts.
1842
1843         * Shared/API/APIString.h:
1844
1845 2015-02-20  Alexey Proskuryakov  <ap@apple.com>
1846
1847         Remove svn:keywords property.
1848
1849         As far as I can tell, the property had no effect on any of these files, but also,
1850         when it has effect it's likely harmful.
1851
1852         * Platform/spi/ios/DataDetectorsUISPI.h: Removed property svn:keywords.
1853         * Platform/spi/ios/ManagedConfigurationSPI.h: Removed property svn:keywords.
1854         * Platform/spi/ios/TextInputSPI.h: Removed property svn:keywords.
1855         * Scripts/webkit/LegacyMessageReceiver-expected.cpp: Removed property svn:keywords.
1856         * Scripts/webkit/LegacyMessages-expected.h: Removed property svn:keywords.
1857         * Scripts/webkit/MessageReceiver-expected.cpp: Removed property svn:keywords.
1858         * Scripts/webkit/MessageReceiverSuperclass-expected.cpp: Removed property svn:keywords.
1859         * Scripts/webkit/Messages-expected.h: Removed property svn:keywords.
1860         * Scripts/webkit/MessagesSuperclass-expected.h: Removed property svn:keywords.
1861         * UIProcess/ios/PageClientImplIOS.h: Removed property svn:keywords.
1862         * UIProcess/ios/WKActionSheet.h: Removed property svn:keywords.
1863         * UIProcess/ios/WKActionSheetAssistant.h: Removed property svn:keywords.
1864         * UIProcess/ios/WKContentView.h: Removed property svn:keywords.
1865         * UIProcess/ios/WKContentViewInteraction.h: Removed property svn:keywords.
1866         * UIProcess/ios/WKGeolocationProviderIOS.h: Removed property svn:keywords.
1867         * UIProcess/ios/WKScrollView.h: Removed property svn:keywords.
1868         * UIProcess/mac/PageClientImpl.h: Removed property svn:keywords.
1869         * UIProcess/mac/WKPrintingView.h: Removed property svn:keywords.
1870         * UIProcess/mac/WKTextInputWindowController.h: Removed property svn:keywords.
1871         * WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h: Removed property svn:keywords.
1872
1873 2015-02-20  Csaba Osztrogonác  <ossy@webkit.org>
1874
1875         EFL URTBF
1876
1877         * Platform/efl/DispatchQueueEfl.cpp:
1878
1879 2015-02-20  Csaba Osztrogonác  <ossy@webkit.org>
1880
1881         URTBF after r180410, WorkQueue.h is in WTF now.
1882
1883         * Platform/efl/DispatchQueueWorkItemEfl.h:
1884
1885 2015-02-20  Anders Carlsson  <andersca@apple.com>
1886
1887         Use toAPI when returning the object graph as a WKTypeRef
1888         https://bugs.webkit.org/show_bug.cgi?id=141841
1889
1890         Reviewed by Sam Weinig.
1891
1892         * UIProcess/API/Cocoa/WKProcessGroup.mm:
1893         (getInjectedBundleInitializationUserData):
1894
1895 2015-02-20  Eric Carlson  <eric.carlson@apple.com>
1896
1897         [iOS] cleanup AirPlay code
1898         https://bugs.webkit.org/show_bug.cgi?id=141811
1899
1900         Reviewed by Jer Noble.
1901
1902         * Configurations/FeatureDefines.xcconfig: IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
1903         * WebProcess/WebPage/WebPage.cpp:
1904         (WebKit::WebPage::updatePreferences): Ditto.
1905
1906 2015-02-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1907
1908         [WK2][EFL] Fix the build after r180362
1909         https://bugs.webkit.org/show_bug.cgi?id=141836
1910
1911         Reviewed by Carlos Garcia Campos.
1912
1913         As r180409, EFL port needs to add missing includes for several features,
1914         and needs to have a specific implementation of toAPI/toImple for EFL port.
1915
1916         * UIProcess/API/C/WKBatteryManager.cpp:
1917         * UIProcess/API/C/WKPage.cpp:
1918         * UIProcess/API/C/efl/WKAPICastEfl.h:
1919         (WebKit::toAPI):
1920         (WebKit::toImpl):
1921         * UIProcess/API/efl/ewk_url_scheme_request.cpp:
1922         * UIProcess/CoordinatedGraphics/WebViewClient.cpp:
1923         * UIProcess/efl/WebUIPopupMenuClient.cpp:
1924         * UIProcess/efl/WebViewEfl.cpp:
1925         * WebProcess/efl/ExtensionManagerEfl.cpp:
1926
1927 2015-02-20  Antti Koivisto  <antti@apple.com>
1928
1929         Move WorkQueue from WK2 to WTF
1930         https://bugs.webkit.org/show_bug.cgi?id=141797
1931
1932         Reviewed by Anders Carlsson.
1933
1934         * CMakeLists.txt:
1935         * DatabaseProcess/DatabaseProcess.h:
1936         * Platform/IPC/Connection.h:
1937         * Platform/WorkQueue.cpp: Removed.
1938         * Platform/WorkQueue.h: Removed.
1939         * Platform/efl/WorkQueueEfl.cpp: Removed.
1940         * Platform/gtk/WorkQueueGtk.cpp: Removed.
1941         * Platform/mac/WorkQueueMac.cpp: Removed.
1942         * PlatformEfl.cmake:
1943         * PlatformGTK.cmake:
1944         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
1945         * UIProcess/Launcher/ProcessLauncher.cpp:
1946         * UIProcess/Storage/LocalStorageDatabase.cpp:
1947         * UIProcess/Storage/LocalStorageDatabase.h:
1948         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1949         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
1950         * UIProcess/Storage/StorageManager.cpp:
1951         * UIProcess/Storage/StorageManager.h:
1952         * WebKit2.xcodeproj/project.pbxproj:
1953
1954 2015-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1955
1956         [WK2][GTK] Fix the build after r180362
1957         https://bugs.webkit.org/show_bug.cgi?id=141813
1958
1959         Reviewed by Žan Doberšek.
1960
1961         Add several missing includes and a specific implementation of
1962         toAPI/toImpl for GTK+ WebView.
1963
1964         * UIProcess/API/C/gtk/WKAPICastGtk.h:
1965         (WebKit::toAPI):
1966         (WebKit::toImpl):
1967         * UIProcess/API/C/gtk/WKView.cpp:
1968         * UIProcess/API/gtk/WebKitFormClient.cpp:
1969         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
1970         * UIProcess/gtk/WebInspectorClientGtk.cpp:
1971
1972 2015-02-19  Shivakumar JM  <shiva.jm@samsung.com>
1973
1974         Fix build warning in WebKit2/WebProcess and UIProcess module.
1975         https://bugs.webkit.org/show_bug.cgi?id=141794.
1976
1977         Reviewed by Anders Carlsson.
1978
1979         Fix build warning by using UNUSED_PARAM macro.
1980
1981         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1982         (WebKit::computeWebProcessAccessType):
1983         * WebProcess/WebProcess.cpp:
1984         (WebKit::WebProcess::deleteWebsiteData):
1985
1986 2015-02-19  Remy Demarest  <rdemarest@apple.com>
1987
1988         Make EnvironmentVariables::appendValue() handle the case where the existing value is an empty string.
1989         https://bugs.webkit.org/show_bug.cgi?id=141818.
1990
1991         Reviewed by Dan Bernstein.
1992
1993         * UIProcess/Launcher/mac/EnvironmentVariables.cpp:
1994         (WebKit::EnvironmentVariables::appendValue): If the existing value is an empty string, replace it rather than
1995         append to it.
1996
1997 2015-02-19  Anders Carlsson  <andersca@apple.com>
1998
1999         Make C SPI objects and modern API objects toll-free bridged
2000         https://bugs.webkit.org/show_bug.cgi?id=141808
2001
2002         Reviewed by Tim Horton.
2003
2004         * Shared/API/APIObject.h:
2005         (API::Object::wrap):
2006         (API::Object::unwrap):
2007         Add default implementations of wrap and unwrap. These just cast.
2008
2009         * Shared/API/c/WKArray.cpp:
2010         (WKArrayCreate):
2011         (WKArrayCreateAdoptingValues):
2012         (WKArrayGetItemAtIndex):
2013         * Shared/API/c/WKDictionary.cpp:
2014         (WKDictionaryGetItemForKey):
2015         Add toImpl and toAPI where necessary.
2016
2017         * Shared/API/c/WKSharedAPICast.h:
2018         Add API::Object::wrap in toAPI and unwrap in toImpl.
2019
2020         * Shared/API/c/WKType.cpp:
2021         (WKGetTypeID):
2022         (WKRetain):
2023         (WKRelease):
2024         Add missing toImpl calls.
2025
2026         * Shared/Cocoa/APIObject.mm:
2027         (API::Object::wrap):
2028         Return the APIObject Objective-C wrapper.
2029
2030         (API::Object::unwrap):
2031         Return the API::Object from the Objective-C object.
2032
2033         * Shared/Cocoa/WKObject.h:
2034         Add wrap and unwrap declarations.
2035
2036         * UIProcess/API/C/WKPage.cpp:
2037         * UIProcess/API/C/WKPageConfigurationRef.cpp:
2038         * UIProcess/API/C/WKPageGroup.cpp:
2039         * UIProcess/API/C/WKUserContentControllerRef.cpp:
2040         Add missing includes; toImpl now requires a complete type.
2041
2042 2015-02-19  Timothy Horton  <timothy_horton@apple.com>
2043
2044         Remove unused forward declaration from WKWebViewInternal.h
2045         https://bugs.webkit.org/show_bug.cgi?id=141806
2046
2047         Reviewed by Anders Carlsson.
2048
2049         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2050         The use of WebCore::Highlight moved to WKContentView.
2051
2052 2015-02-19  Anders Carlsson  <andersca@apple.com>
2053
2054         Use the real implementation type in our API cast traits
2055         https://bugs.webkit.org/show_bug.cgi?id=141805
2056
2057         Reviewed by Sam Weinig.
2058
2059         * Shared/API/c/WKSharedAPICast.h:
2060         (WebKit::toURLRef):
2061         (WebKit::toAPI): Deleted.
2062         (WebKit::toImpl): Deleted.
2063         * UIProcess/GenericCallback.h:
2064
2065 2015-02-19  Anders Carlsson  <andersca@apple.com>
2066
2067         Remove the stray storage manager from WebProcessPool
2068         https://bugs.webkit.org/show_bug.cgi?id=141800
2069
2070         Reviewed by Sam Weinig.
2071
2072         * UIProcess/API/mac/WKView.mm:
2073         (-[WKView dealloc]):
2074         (-[WKView initWithFrame:processPool:configuration:webView:]):
2075         (-[WKView _applicationWillTerminate:]): Deleted.
2076         Remove code that calls applicationWillTerminate on the WebPageProxy.
2077
2078         * UIProcess/WebKeyValueStorageManager.cpp:
2079         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
2080         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
2081         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
2082         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
2083         Get the storage manager from the website data store.
2084
2085         * UIProcess/WebPageProxy.cpp:
2086         (WebKit::WebPageProxy::WebPageProxy):
2087         (WebKit::WebPageProxy::close):
2088         Remove storage manager calls.
2089
2090         * UIProcess/WebProcessPool.cpp:
2091         (WebKit::WebProcessPool::WebProcessPool):
2092         (WebKit::WebProcessPool::applicationWillTerminate): Deleted.
2093         * UIProcess/WebProcessPool.h:
2094         Remove storage manager code.
2095
2096         * UIProcess/WebsiteData/WebsiteDataStore.h:
2097         (WebKit::WebsiteDataStore::storageManager):
2098         Add getter.
2099
2100 2015-02-19  Csaba Osztrogonác  <ossy@webkit.org>
2101
2102         [WK2] Unreviewed buildfix for non-Cocoa platforms.
2103
2104         * CMakeLists.txt:
2105         * UIProcess/WebsiteData/unix/WebsiteDataStoreUnix.cpp: Added.
2106         (WebKit::WebsiteDataStore::platformInitialize): Added.
2107         (WebKit::WebsiteDataStore::platformDestroy): Added.
2108
2109 2015-02-19  Anders Carlsson  <andersca@apple.com>
2110
2111         WebsiteDataStore should ensure that local storage is written before exiting
2112         https://bugs.webkit.org/show_bug.cgi?id=141798
2113
2114         Reviewed by Sam Weinig.
2115
2116         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: Added.
2117         (WebKit::dataStoresWithStorageManagers):
2118         (WebKit::WebsiteDataStore::platformInitialize):
2119         (WebKit::WebsiteDataStore::platformDestroy):
2120         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2121         (WebKit::WebsiteDataStore::WebsiteDataStore):
2122         (WebKit::WebsiteDataStore::~WebsiteDataStore):
2123         * UIProcess/WebsiteData/WebsiteDataStore.h:
2124         * WebKit2.xcodeproj/project.pbxproj:
2125
2126 2015-02-18  Chris Dumez  <cdumez@apple.com>
2127
2128         [WK2][iOS] Fix NetworkCache build
2129         https://bugs.webkit.org/show_bug.cgi?id=141778
2130
2131         Reviewed by Antti Koivisto.
2132
2133         Add missing header include to use round_page() on iOS.
2134
2135         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2136
2137 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
2138
2139         Remove input and output files from "Make Frameworks Symbolic Link" step
2140         https://bugs.webkit.org/show_bug.cgi?id=141769
2141
2142         Reviewed by Dan Bernstein.
2143
2144         * WebKit2.xcodeproj/project.pbxproj:
2145
2146 2015-02-18  Timothy Horton  <timothy_horton@apple.com>
2147
2148         Adopt WebCore::IOSurface in ImageBuffer
2149         https://bugs.webkit.org/show_bug.cgi?id=141751
2150
2151         Reviewed by Simon Fraser.
2152
2153         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2154         (InitWebCoreSystemInterface):
2155         Remove old WKSI IOSurface-related functions.
2156
2157 2015-02-18  Beth Dakin  <bdakin@apple.com>
2158
2159         iBooks immediate action blacklist should not even create the gesture recognizer
2160         https://bugs.webkit.org/show_bug.cgi?id=141768
2161         -and corresponding-
2162         rdar://problem/19806770
2163
2164         Reviewed by Tim Horton.
2165
2166         Move the runtime-application check to the point where the gesture recognizer is 
2167         created so that we can avoid doing so.
2168         * UIProcess/API/mac/WKView.mm:
2169         (-[WKView initWithFrame:processPool:configuration:webView:]):
2170         * UIProcess/mac/WKImmediateActionController.mm:
2171         (-[WKImmediateActionController _updateImmediateActionItem]):
2172
2173 2015-02-18  Chris Dumez  <cdumez@apple.com>
2174
2175         Access FontCache global instance via singleton() static member function
2176         https://bugs.webkit.org/show_bug.cgi?id=141726
2177
2178         Reviewed by Daniel Bates.
2179
2180         Access FontCache global instance via singleton() static member function,
2181         as per coding style.
2182
2183 2015-02-18  Timothy Horton  <timothy_horton@apple.com>
2184
2185         Add WKContext SPI to clear all visited links
2186         https://bugs.webkit.org/show_bug.cgi?id=141752
2187         <rdar://problem/9997966>
2188
2189         Reviewed by Dan Bernstein.
2190
2191         * UIProcess/API/C/WKContext.cpp:
2192         (WKContextClearVisitedLinks):
2193         * UIProcess/API/C/WKContext.h:
2194
2195 2015-02-17  Anders Carlsson  <andersca@apple.com>
2196
2197         Add API for clearing in-memory caches to WKWebsiteDataStore
2198         https://bugs.webkit.org/show_bug.cgi?id=141724
2199
2200         Reviewed by Tim Horton.
2201
2202         * Shared/WebsiteData/WebsiteDataTypes.h:
2203         Add WebsiteDataTypeMemoryCache.
2204
2205         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2206         Add WKWebsiteDataTypeMemoryCache.
2207
2208         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2209         (toWebsiteDataTypes):
2210         Handle WKWebsiteDataTypeMemoryCache and convert it to WebsiteDataTypeMemoryCache.
2211
2212         * UIProcess/WebProcessProxy.cpp:
2213         (WebKit::generateCallbackID):
2214         Generate a new callback.
2215
2216         (WebKit::WebProcessProxy::~WebProcessProxy):
2217         Assert that we don't have any pending callbacks.
2218
2219         (WebKit::WebProcessProxy::connectionDidClose):
2220         Invoke pending callbacks.
2221
2222         (WebKit::WebProcessProxy::canTerminateChildProcess):
2223         Don't try to terminate if we have pending callbacks.
2224
2225         (WebKit::WebProcessProxy::didDeleteWebsiteData):
2226         Take the callback and invoke it.
2227
2228         (WebKit::WebProcessProxy::deleteWebsiteData):
2229         Send a delete message.
2230
2231         * UIProcess/WebProcessProxy.h:
2232         Add new members.
2233
2234         * UIProcess/WebProcessProxy.messages.in:
2235         Add DidDeleteWebsiteData message.
2236
2237         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2238         (WebKit::computeNetworkProcessAccessType):
2239         Spell persistent correctly.
2240
2241         (WebKit::computeWebProcessAccessType):
2242         Return a web process access type given the a data type mask.
2243
2244         (WebKit::WebsiteDataStore::removeData):
2245         Ask any associated web processes to remove website data.
2246
2247         * WebProcess/WebProcess.cpp:
2248         (WebKit::WebProcess::deleteWebsiteData):
2249         Delete the memory cache if requested.
2250
2251         * WebProcess/WebProcess.h:
2252         Add new member.
2253
2254         * WebProcess/WebProcess.messages.in:
2255         Add DeleteWebsiteData message.
2256
2257 2015-02-17  Timothy Horton  <timothy_horton@apple.com>
2258
2259         REGRESSION (r178595): Clicking on DD highlights sometimes do not work
2260         https://bugs.webkit.org/show_bug.cgi?id=141728
2261         <rdar://problem/19825372>
2262
2263         Reviewed by Beth Dakin.
2264
2265         * UIProcess/mac/WKImmediateActionController.mm:
2266         (-[WKImmediateActionController _cancelImmediateActionIfNeeded]):
2267         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
2268         The change that r178595 intended to make was purely that things that we
2269         have no immediate actions for should cancel the immediate action gesture recognizer.
2270         Moving the DataDetectors activation code as well breaks strict ordering
2271         of immediate action callbacks vs. shouldUseActionsWithContext: that they depend on.
2272
2273 2015-02-17  Anders Carlsson  <andersca@apple.com>
2274
2275         Only create the WebKit.framework symlink in PrivateFrameworks when the platform is iphoneos
2276         https://bugs.webkit.org/show_bug.cgi?id=141710
2277         <rdar://problem/19719748>
2278
2279         Reviewed by Andreas Kling.
2280
2281         Don't create the symlink when building for the simulator.
2282
2283         * WebKit2.xcodeproj/project.pbxproj:
2284
2285 2015-02-17  Chris Dumez  <cdumez@apple.com>
2286
2287         Access MemoryPressureHandler global instance via a singleton() static member function
2288         https://bugs.webkit.org/show_bug.cgi?id=141691
2289
2290         Reviewed by Andreas Kling.
2291
2292         Access MemoryPressureHandler global instance via a singleton() static
2293         member function.
2294
2295         * NetworkProcess/NetworkProcess.cpp:
2296         (WebKit::NetworkProcess::initializeNetworkProcess):
2297         (WebKit::NetworkProcess::lowMemoryHandler): Deleted.
2298         * NetworkProcess/NetworkProcess.h:
2299         * PluginProcess/PluginProcess.cpp:
2300         (WebKit::PluginProcess::initializeProcess):
2301         (WebKit::PluginProcess::lowMemoryHandler): Deleted.
2302         * PluginProcess/PluginProcess.h:
2303         * WebProcess/WebPage/ios/WebPageIOS.mm:
2304         (WebKit::WebPage::updateVisibleContentRects):
2305         * WebProcess/WebProcess.cpp:
2306         (WebKit::WebProcess::initializeWebProcess):
2307         (WebKit::WebProcess::processWillSuspend):
2308
2309 2015-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2310
2311         [GTK] WebKitFrame objects are never released
2312         https://bugs.webkit.org/show_bug.cgi?id=141641
2313
2314         Reviewed by Martin Robinson.
2315
2316         Use a FrameDestructionObserver derived class to wrap our
2317         WebKitFrame objects and delete them when the frame is destroyed,
2318         instead of using willDestroyFrame callback of WKBundlePageLoaderClient
2319         that has never worked.
2320
2321         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp:
2322         (webkitFrameGetWebFrame):
2323         * WebProcess/InjectedBundle/API/gtk/WebKitFramePrivate.h:
2324         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
2325         (webkitFrameGetOrCreate):
2326         (webkitFrameDestroy):
2327         (webkitWebPageCreate):
2328         (willDestroyFrame): Deleted.
2329
2330 2015-02-16  Tim Horton  <timothy_horton@apple.com>
2331
2332         Fix the !USE(IOSURFACE) build
2333
2334         * Shared/mac/RemoteLayerBackingStore.mm:
2335         SOFT_LINK_MAY_FAIL makes a function that will be unused if !USE(IOSURFACE).
2336
2337 2015-02-16  Tim Horton  <timothy_horton@apple.com>
2338
2339         Sometimes RemoteLayerBackingStore ends up non-volatile while the process is suspended
2340         <rdar://problem/19842957>
2341         https://bugs.webkit.org/show_bug.cgi?id=141675
2342
2343         Reviewed by Simon Fraser.
2344
2345         Previously, it was possible to get a layer tree flush in between the
2346         process suspension cleanup code making surfaces volatile and the process
2347         actually being suspended (it was racy because the suspension requires
2348         a few IPC round trips). Depending on how far through the flush we got,
2349         we could sometimes end up either making new non-volatile backing store,
2350         or switching some recently-made-volatile backing store back to non-volatile.
2351         We don't want to have any non-volatile backing store while suspended.
2352
2353         * UIProcess/ProcessThrottler.cpp:
2354         (WebKit::ProcessThrottler::updateAssertion):
2355         Inform the WebProcess when it's going from suspended to runnable state.
2356
2357         * UIProcess/WebProcessProxy.cpp:
2358         (WebKit::WebProcessProxy::sendProcessDidResume):
2359         * UIProcess/WebProcessProxy.h:
2360         Forward the message along.
2361
2362         * WebProcess/WebProcess.cpp:
2363         (WebKit::WebProcess::processWillSuspend):
2364         (WebKit::WebProcess::cancelProcessWillSuspend):
2365         (WebKit::WebProcess::setAllLayerTreeStatesFrozen):
2366         (WebKit::WebProcess::processDidResume):
2367         Freeze all of this process' pages' layer trees when we start trying to suspend,
2368         and un-freeze them when either suspension is cancelled or we resume.
2369
2370         * WebProcess/WebProcess.h:
2371         * WebProcess/WebProcess.messages.in:
2372
2373 2015-02-16  Tim Horton  <timothy_horton@apple.com>
2374
2375         Adopt CAMachPort-as-layer-contents
2376         https://bugs.webkit.org/show_bug.cgi?id=141687
2377         <rdar://problem/19393233>
2378
2379         Reviewed by Simon Fraser.
2380
2381         * Shared/mac/RemoteLayerBackingStore.h:
2382         * Shared/mac/RemoteLayerBackingStore.mm:
2383         (WebKit::RemoteLayerBackingStore::decode):
2384         If we have CAMachPort, just keep the MachSendRight around.
2385
2386         (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
2387         If we have CAMachPort, make one and leak our send right into it. CAMachPort
2388         will adopt the port and destroy it when needed.
2389
2390         (WebKit::RemoteLayerBackingStore::setBufferVolatility):
2391         Tiny style fix.
2392
2393 2015-02-15  Sam Weinig  <sam@webkit.org>
2394
2395         Add experimental <attachment> element support
2396         https://bugs.webkit.org/show_bug.cgi?id=141626
2397
2398         Reviewed by Tim Horton.
2399
2400         * Configurations/FeatureDefines.xcconfig:
2401
2402 2015-02-16  Tim Horton  <timothy_horton@apple.com>
2403
2404         REGRESSION (r176459): Process suspension cleanup timer sometimes never stops
2405         https://bugs.webkit.org/show_bug.cgi?id=141669
2406
2407         Reviewed by Simon Fraser.
2408
2409         * WebProcess/WebProcess.cpp:
2410         (WebKit::WebProcess::markAllLayersVolatileIfPossible):
2411         r176459 accidentally removed the code to stop the cleanup timer
2412         in the case where we successfully finish marking layers volatile,
2413         causing the timer to continue running once the process comes back
2414         from a suspended state.
2415
2416 2015-02-16  Anders Carlsson  <andersca@apple.com>
2417
2418         Check for the assume_nonnull feature instead of noescape
2419         https://bugs.webkit.org/show_bug.cgi?id=141666
2420
2421         Reviewed by Dan Bernstein.
2422
2423         * Shared/API/Cocoa/WKFoundation.h:
2424
2425 2015-02-16  Anders Carlsson  <andersca@apple.com>
2426
2427         Add nullability qualifiers to all API headers
2428         https://bugs.webkit.org/show_bug.cgi?id=141652
2429         rdar://problem/19793630
2430
2431         Reviewed by Dan Bernstein.
2432
2433         * Shared/API/Cocoa/WKFoundation.h:
2434         Add a WK_NULLABLE_SPECIFIER macro.
2435
2436         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
2437         * UIProcess/API/Cocoa/WKFrameInfo.h:
2438         * UIProcess/API/Cocoa/WKNavigationAction.h:
2439         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
2440         * UIProcess/API/Cocoa/WKNavigationResponse.h:
2441         * UIProcess/API/Cocoa/WKScriptMessage.h:
2442         * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
2443         * UIProcess/API/Cocoa/WKUIDelegate.h:
2444         * UIProcess/API/Cocoa/WKUserContentController.h:
2445         * UIProcess/API/Cocoa/WKUserScript.h:
2446         * UIProcess/API/Cocoa/WKWebView.h:
2447         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2448         * UIProcess/API/Cocoa/WKWindowFeatures.h:
2449
2450         * mac/postprocess-framework-headers.sh:
2451         Handle the WK_NULLABLE_SPECIFIER macro. Change the WK_NULLABLE sed command to replace
2452         all occurrences of WK_NULLABLE instead of just the first one.
2453
2454 2015-02-16  Dan Bernstein  <mitz@apple.com>
2455
2456         Update SPI availability annotations 
2457         https://bugs.webkit.org/show_bug.cgi?id=141588
2458
2459         Reviewed by Anders Carlsson.
2460
2461         * Shared/API/Cocoa/WKFoundation.h: Added a definition of __NSi_8_3 for when building with
2462         an older SDK.
2463         * UIProcess/API/Cocoa/WKErrorPrivate.h:
2464         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2465
2466 2015-02-16  Antti Koivisto  <antti@apple.com>
2467
2468         Remove unused InjectedBundle::setCacheModel.
2469
2470         Rubber-stamped by Anders Carlsson.
2471
2472         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2473         (WebKit::InjectedBundle::setCacheModel): Deleted.
2474         * WebProcess/InjectedBundle/InjectedBundle.h:
2475
2476 2015-02-16  Anders Carlsson  <andersca@apple.com>
2477
2478         Build fix for versions of Xcode that support nullability but don't have the Foundation #defines.
2479
2480         * Shared/API/Cocoa/WKFoundation.h:
2481
2482 2015-02-16  Antti Koivisto  <antti@apple.com>
2483
2484         Develop/Disable Caches does not properly disable disk cache
2485         https://bugs.webkit.org/show_bug.cgi?id=141636
2486
2487         Reviewed by Anders Carlsson.
2488
2489         The menu item sets the cache model to "document viewer" to disable the caches (cache size 0).
2490         However the cache model was never passed to the network process after the initialization.
2491
2492         * NetworkProcess/NetworkProcess.messages.in:
2493         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2494         (WebKit::NetworkCacheStorage::retrieve):
2495         (WebKit::NetworkCacheStorage::store):
2496         (WebKit::NetworkCacheStorage::update):
2497
2498             Don't try to store or retrieve when the maximum cache size is set to zero.
2499
2500         * UIProcess/WebProcessPool.cpp:
2501         (WebKit::WebProcessPool::setCacheModel):
2502
2503            Message the network process too.
2504
2505         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2506         (WKBundleSetCacheModel): Deleted.
2507
2508             Remove the now unused SPI.
2509
2510         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2511
2512 2015-02-16  Antti Koivisto  <antti@apple.com>
2513
2514         Assertion in disk cache code with redirect to a non-http resource
2515         https://bugs.webkit.org/show_bug.cgi?id=141644
2516
2517         Reviewed by Anders Carlsson.
2518
2519         * NetworkProcess/NetworkResourceLoader.cpp:
2520         (WebKit::NetworkResourceLoader::didFinishLoading):
2521
2522             Check that response is HTTP before calling computeFreshnessLifetimeForHTTPFamily.
2523
2524         * NetworkProcess/cache/NetworkCache.cpp:
2525         (WebKit::canStore):
2526
2527             Deny storing non-HTTP responses to cache (though the above already covers this).
2528
2529 2015-02-13  Anders Carlsson  <andersca@apple.com>
2530
2531         Add support for nullability to the header postprocessing
2532         https://bugs.webkit.org/show_bug.cgi?id=141573
2533
2534         Reviewed by Darin Adler.
2535
2536         * Shared/API/Cocoa/WKFoundation.h:
2537         * UIProcess/API/Cocoa/WKBackForwardList.h:
2538         * mac/postprocess-framework-headers.sh:
2539
2540 2015-02-16  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2541
2542         [EFL] Rename WebContextEfl to WebProcessPoolEfl
2543         https://bugs.webkit.org/show_bug.cgi?id=141642
2544
2545         Reviewed by Csaba Osztrogonác.
2546
2547         Although we've renamed almost everything in r177716, this is still
2548         required after r177692.
2549
2550         * UIProcess/efl/WebProcessPoolEfl.cpp: Renamed from Source/WebKit2/UIProcess/efl/WebContextEfl.cpp.
2551
2552 2015-02-14  Alexey Proskuryakov  <ap@apple.com>
2553
2554         Build fix after <http://trac.webkit.org/changeset/180122>
2555
2556         * Platform/mac/StringUtilities.mm:
2557
2558 2015-02-14  Joseph Pecoraro  <pecoraro@apple.com>
2559
2560         [Mac] Possible DDActionContext leaks, RetainPtr cleanup
2561         https://bugs.webkit.org/show_bug.cgi?id=141613
2562
2563         Reviewed by Tim Horton.
2564
2565         * UIProcess/mac/WKActionMenuController.mm:
2566         (-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
2567         Adopt the allocated object.
2568
2569 2015-02-09  Brian J. Burg  <burg@cs.washington.edu>
2570
2571         Web Inspector: remove some unnecessary Inspector prefixes from class names in Inspector namespace
2572         https://bugs.webkit.org/show_bug.cgi?id=141372
2573
2574         Reviewed by Joseph Pecoraro.
2575
2576         * WebProcess/WebPage/WebInspector.cpp:
2577         (WebKit::WebInspector::remoteFrontendDisconnected):
2578
2579 2015-02-14  Beth Dakin  <bdakin@apple.com>
2580
2581         REGRESSION: Page opens with enlarged font after visiting PDF, navigating back, 
2582         then doing a process swap
2583         https://bugs.webkit.org/show_bug.cgi?id=141584
2584         -and corresponding-
2585         rdar://problem/18167729
2586
2587         Reviewed by Tim Horton.
2588
2589         This patch keeps the plugin zoom/scale factors separate from page zoom/scale 
2590         factors in the UI process since they are used for slightly different purposes for 
2591         plugins (i.e., PDFs) than they are for normal pages. Keeping track of the right 
2592         factor for the right type of document will ensure that we don’t use the wrong one.
2593
2594         * UIProcess/WebPageProxy.cpp:
2595         (WebKit::WebPageProxy::WebPageProxy):
2596         (WebKit::WebPageProxy::pageZoomFactor):
2597         (WebKit::WebPageProxy::pageScaleFactor):
2598         (WebKit::WebPageProxy::pluginScaleFactorDidChange):
2599         (WebKit::WebPageProxy::pluginZoomFactorDidChange):
2600         (WebKit::WebPageProxy::didCommitLoadForFrame):
2601         (WebKit::WebPageProxy::pageZoomFactorDidChange): Deleted.
2602         * UIProcess/WebPageProxy.h:
2603         (WebKit::WebPageProxy::pageZoomFactor): Deleted.
2604         (WebKit::WebPageProxy::pageScaleFactor): Deleted.
2605         * UIProcess/WebPageProxy.messages.in:
2606         * WebProcess/Plugins/PluginView.cpp:
2607         (WebKit::PluginView::setPageScaleFactor):
2608
2609 2015-02-14  Brian J. Burg  <burg@cs.washington.edu>
2610
2611         REGRESSION(r179573): Web Inspector toolbar is completely messed up on Mavericks
2612         https://bugs.webkit.org/show_bug.cgi?id=141555
2613
2614         Reviewed by Joseph Pecoraro.
2615
2616         The old WKView-based code called _setDrawsBackground:NO on the WKView for Mavericks.
2617         Simulate this old behavior by calling WebPageProxy::setDrawsBackground(false).
2618
2619         WKWebView's setOpaque:BOOL gives a flat background color instead of the intended
2620         gradient, so we can't use that method.
2621
2622         * UIProcess/mac/WebInspectorProxyMac.mm:
2623         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2624
2625 2015-02-13  Simon Fraser  <simon.fraser@apple.com>
2626
2627         Crash closing a tab when a context or popup menu is open
2628         https://bugs.webkit.org/show_bug.cgi?id=141582
2629         rdar://problem/17700475
2630
2631         Reviewed by Anders Carlsson.
2632
2633         If a context menu or a popup menu is open when a tab is programmatically closed,
2634         then we'd crash because both the WebContextMenuProxyMac/WebPopupMenuProxyMac
2635         and the WebPageProxy would be deleted while still in use, via messages
2636         handled via the nested event tracking runloop.
2637
2638         Fix by protecting those things while showing the popup. Also programmatically
2639         dismiss the popup when closing the WebPageProxy.
2640
2641         * UIProcess/WebContextMenuProxy.h:
2642         (WebKit::WebContextMenuProxy::cancelTracking):
2643         * UIProcess/WebPageProxy.cpp:
2644         (WebKit::WebPageProxy::close):
2645         (WebKit::WebPageProxy::showPopupMenu): Clean up some EFL-related confusion that we don't need.
2646         Retaining |this| will also retain m_activePopupMenu.
2647         (WebKit::WebPageProxy::hidePopupMenu):
2648         (WebKit::WebPageProxy::showContextMenu):
2649         (WebKit::WebPageProxy::resetState):
2650         * UIProcess/WebPopupMenuProxy.h:
2651         (WebKit::WebPopupMenuProxy::cancelTracking):
2652         * UIProcess/mac/WebContextMenuProxyMac.h:
2653         * UIProcess/mac/WebContextMenuProxyMac.mm:
2654         (WebKit::WebContextMenuProxyMac::showContextMenu):
2655         (WebKit::WebContextMenuProxyMac::cancelTracking):
2656         * UIProcess/mac/WebPopupMenuProxyMac.h: For popups, we need to remember if we were
2657         canceled to avoid trying to send events after closing.
2658         * UIProcess/mac/WebPopupMenuProxyMac.mm:
2659         (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
2660         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
2661         (WebKit::WebPopupMenuProxyMac::cancelTracking):
2662
2663 2015-02-13  Timothy Horton  <timothy_horton@apple.com>
2664
2665         Fix the iOS build.
2666
2667         * UIProcess/ios/ViewGestureControllerIOS.mm:
2668         (WebKit::ViewGestureController::removeSwipeSnapshot):
2669         * UIProcess/mac/ViewGestureController.h:
2670         This code is never used on iOS.
2671
2672 2015-02-13  Timothy Horton  <timothy_horton@apple.com>
2673
2674         Make WebCore::IOSurface have single ownership instead of refcounting
2675         https://bugs.webkit.org/show_bug.cgi?id=141578
2676
2677         Reviewed by Anders Carlsson.
2678
2679         * Shared/mac/RemoteLayerBackingStore.h:
2680         * Shared/mac/RemoteLayerBackingStore.mm:
2681         (WebKit::RemoteLayerBackingStore::Buffer::discard):
2682         * UIProcess/API/mac/WKView.mm:
2683         (-[WKView _takeViewSnapshot]):
2684         * UIProcess/mac/ViewGestureController.h:
2685         * UIProcess/mac/ViewGestureControllerMac.mm:
2686         (WebKit::ViewGestureController::beginSwipeGesture):
2687         (WebKit::ViewGestureController::removeSwipeSnapshot):
2688         * UIProcess/mac/ViewSnapshotStore.h:
2689         * UIProcess/mac/ViewSnapshotStore.mm:
2690         (WebKit::ViewSnapshot::create):
2691         (WebKit::ViewSnapshot::ViewSnapshot):
2692         (WebKit::ViewSnapshot::hasImage):
2693         Adjust to the single-ownership model.
2694
2695 2015-02-13  Brent Fulgham  <bfulgham@apple.com>
2696
2697         [iOS] Unreviewed build fix after r180076.
2698
2699         * UIProcess/WebPageProxy.cpp:
2700         (WebKit::WebPageProxy::creationParameters): We do not
2701         want to do this on iOS. 
2702         * UIProcess/WebPageProxy.h: No need to expose function
2703         on iOS (only Mac).
2704
2705 2015-02-13  Brent Fulgham  <bfulgham@apple.com>
2706
2707         [Mac, iOS] Adjust pagination behavior for Mail.app printing use
2708         https://bugs.webkit.org/show_bug.cgi?id=141569
2709         <rdar://problem/14912763>
2710
2711         Reviewed by Anders Carlsson.
2712
2713         * Shared/WebPageCreationParameters.cpp:
2714         (WebKit::WebPageCreationParameters::encode): Add new flag.
2715         (WebKit::WebPageCreationParameters::decode): Ditto.
2716         * Shared/WebPageCreationParameters.h: Ditto.
2717         * UIProcess/WebPageProxy.cpp:
2718         (WebKit::WebPageProxy::creationParameters): Set new page construction flag.
2719         * UIProcess/WebPageProxy.h:
2720         * UIProcess/mac/WebPageProxyMac.mm:
2721         (WebKit::WebPageProxy::paginationQuirkEnabled): Ask for new pagination flag
2722         when running as a Mail client.
2723         * WebProcess/WebPage/WebPage.cpp:
2724         (WebKit::WebPage::WebPage): Set up pagination based on desired settings.
2725
2726 2015-02-12  Simon Fraser  <simon.fraser@apple.com>
2727
2728         determinePrimarySnapshottedPlugIn() should only traverse visible Frames
2729         https://bugs.webkit.org/show_bug.cgi?id=141547
2730         Part of rdar://problem/18445733.
2731
2732         Reviewed by Anders Carlsson.
2733         
2734         Use FrameTree::traverseNextRendered() to avoid doing things in unrendered frames
2735         which are not guaranteed to have been laid out.
2736
2737         * WebProcess/WebPage/WebPage.cpp:
2738         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
2739
2740 2015-02-13  Antti Koivisto  <antti@apple.com>
2741
2742         WorkQueue should support concurrent queues
2743         https://bugs.webkit.org/show_bug.cgi?id=141559
2744
2745         Reviewed by Anders Carlsson.
2746
2747         * DatabaseProcess/DatabaseProcess.cpp:
2748         (WebKit::DatabaseProcess::DatabaseProcess):
2749         * Platform/IPC/Connection.h:
2750         * Platform/IPC/mac/ConnectionMac.mm:
2751         (IPC::Connection::open):
2752         * Platform/WorkQueue.cpp:
2753         (WorkQueue::create):
2754
2755             Also make create return a Ref.
2756
2757         (WorkQueue::WorkQueue):
2758         * Platform/WorkQueue.h:
2759
2760             Add queue type enum.
2761
2762         * Platform/efl/WorkQueueEfl.cpp:
2763         (WorkQueue::platformInitialize):
2764         * Platform/gtk/WorkQueueGtk.cpp:
2765         (WorkQueue::platformInitialize):
2766         * Platform/mac/WorkQueueMac.cpp:
2767         (WorkQueue::platformInitialize):
2768         * Shared/mac/SecItemShim.cpp:
2769         (WebKit::SecItemShim::initializeConnection):
2770         * Shared/mac/SecItemShim.h:
2771         * UIProcess/Launcher/ProcessLauncher.cpp:
2772         (WebKit::processLauncherWorkQueue):
2773         * UIProcess/mac/SecItemShimProxy.cpp:
2774         (WebKit::SecItemShimProxy::initializeConnection):
2775         * UIProcess/mac/SecItemShimProxy.h:
2776         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2777         (WebKit::PluginProcessConnectionManager::initializeConnection):
2778         * WebProcess/Plugins/PluginProcessConnectionManager.h:
2779         * WebProcess/WebPage/EventDispatcher.cpp:
2780         (WebKit::EventDispatcher::EventDispatcher):
2781         (WebKit::EventDispatcher::initializeConnection):
2782         * WebProcess/WebPage/EventDispatcher.h:
2783         * WebProcess/WebPage/ViewUpdateDispatcher.h:
2784
2785 2015-02-12  Anders Carlsson  <andersca@apple.com>
2786
2787         Clean up the framework postprocessing phase
2788         https://bugs.webkit.org/show_bug.cgi?id=141544
2789
2790         Reviewed by Dan Bernstein.
2791
2792         Rename WK_API_AVAILABILITY_ENABLED to WK_FRAMEWORK_HEADER_POSTPROCESSING_ENABLED to better match what
2793         it is we're doing. Also, rename the associated script. Remove a couple of now unnecessary #defines, and
2794         change everything we can to be feature-based instead of OS based.
2795
2796         * Configurations/WebKit.xcconfig:
2797         * Shared/API/Cocoa/WKFoundation.h:
2798         * WebKit2.xcodeproj/project.pbxproj:
2799         * mac/postprocess-framework-headers.sh: Renamed from Source/WebKit2/mac/rewrite-availability-macros.sh.
2800
2801 2015-02-12  Tim Horton  <timothy_horton@apple.com>
2802
2803         Crash removing RemoteLayerTreeDisplayRefreshMonitor from the drawing area's map
2804         https://bugs.webkit.org/show_bug.cgi?id=141545
2805         <rdar://problem/17712200>
2806
2807         Reviewed by Simon Fraser.
2808
2809         * WebProcess/WebPage/WebPage.cpp:
2810         (WebKit::WebPage::windowScreenDidChange):
2811         * WebProcess/WebPage/WebPage.h:
2812         * WebProcess/WebPage/WebPage.messages.in:
2813         windowScreenDidChange should take uint32_t, since that's what PlatformDisplayID is.
2814
2815         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2816         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
2817         RemoteLayerTreeDisplayRefreshMonitor is driven by the page's
2818         RemoteLayerTreeDrawingArea. Because of this, we cannot have the same
2819         sharing of DisplayRefreshMonitors that other platforms use.
2820         In order to ensure that we get a unique DisplayRefreshMonitor
2821         per-DrawingArea, give each page a unique DisplayID derived
2822         from WebPage's unique ID.
2823
2824 2015-02-12  Tim Horton  <timothy_horton@apple.com>
2825
2826         Crash under RemoteLayerTreeDrawingArea::flushLayers() when closing a tab
2827         https://bugs.webkit.org/show_bug.cgi?id=141541
2828
2829         Reviewed by Benjamin Poulain.
2830
2831         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2832         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2833         The WebPage pointer can become stale between when it is retrieved
2834         and dereferenced. Retrieve it by ID inside the dispatch_async block
2835         instead of outside of it.
2836
2837 2015-02-12  Antti Koivisto  <antti@apple.com>
2838
2839         WebKit persistent cache uses a lot of threads
2840         https://bugs.webkit.org/show_bug.cgi?id=141520
2841
2842         Reviewed by Andreas Kling.
2843
2844         Parallel retrieves are limited but stores are not. We may end up with lots of backround io
2845         dispatch queue threads if they don't complete fast enough.
2846
2847         This patch adds pending state for write operations similar to what retrieves already have
2848         and limits to number of active operations.
2849
2850         * NetworkProcess/cache/NetworkCacheStorage.h:
2851
2852             Combine StoreOperation and UpdateOperation and rename to WriteOperation.
2853             Rename RetrieveOperation to ReadOperation.
2854             The idea is to emphasize that these are disk operations.
2855
2856         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2857         (WebKit::NetworkCacheStorage::dispatchReadOperation):
2858         (WebKit::NetworkCacheStorage::dispatchPendingReadOperations):
2859         (WebKit::retrieveFromMemory):
2860         (WebKit::NetworkCacheStorage::retrieve):
2861         (WebKit::NetworkCacheStorage::store):
2862         (WebKit::NetworkCacheStorage::update):
2863         (WebKit::NetworkCacheStorage::dispatchPendingWriteOperations):
2864
2865             Only allow 3 parallel writes.
2866
2867         (WebKit::NetworkCacheStorage::dispatchFullWriteOperation):
2868         (WebKit::NetworkCacheStorage::dispatchHeaderWriteOperation):
2869
2870             More informative names.
2871
2872         (WebKit::NetworkCacheStorage::dispatchRetrieveOperation): Deleted.
2873         (WebKit::NetworkCacheStorage::dispatchPendingRetrieveOperations): Deleted.
2874         (WebKit::retrieveActive): Deleted.
2875
2876 2015-02-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2877
2878         [GTK] Add API to allow overriding the default color chooser implementation
2879         https://bugs.webkit.org/show_bug.cgi?id=98935
2880
2881         Reviewed by Gustavo Noronha Silva.
2882
2883         Add API to allow the user to override the default UI of color
2884         chooser. Similar to the file chooser API, a new run-color-chooser
2885         signal is added to WebKitWebView that passes a WebKitColorChooserRequest
2886         parameter to the signal.
2887
2888         Initial patch by Arnaud Renevier <a.renevier@sisa.samsung.com>.
2889
2890         * PlatformGTK.cmake: Add new files to compilation.
2891         * UIProcess/API/gtk/PageClientImpl.cpp:
2892         (WebKit::PageClientImpl::createColorPicker): Create a
2893         WebKitColorChooser is the view widget is a WebKitWebView or a
2894         WebColorPicker otherwise,
2895         * UIProcess/API/gtk/WebKitColorChooser.cpp: Added.
2896         (WebKit::WebKitColorChooser::create):
2897         (WebKit::WebKitColorChooser::WebKitColorChooser):
2898         (WebKit::WebKitColorChooser::~WebKitColorChooser):
2899         (WebKit::WebKitColorChooser::endPicker): Chain up to parent class
2900         when not having a request, or finish the request if we have one.
2901         (WebKit::WebKitColorChooser::colorChooserRequestFinished):
2902         (WebKit::WebKitColorChooser::colorChooserRequestRGBAChanged):
2903         (WebKit::WebKitColorChooser::showColorPicker): Create a new
2904         WebKitColorChooserRequest and emit WebKitWebView::run-color-chooser.
2905         If the signal is not handled, fallback to the default color
2906         chooser dialog implemented by the parent class.
2907         * UIProcess/API/gtk/WebKitColorChooser.h: Added.
2908         * UIProcess/API/gtk/WebKitColorChooserRequest.cpp: Added.
2909         (webkitColorChooserRequestGetProperty):
2910         (webkitColorChooserRequestSetProperty):
2911         (webkit_color_chooser_request_class_init):
2912         (webkit_color_chooser_request_set_rgba):
2913         (webkit_color_chooser_request_get_rgba):
2914         (webkit_color_chooser_request_get_element_rectangle):
2915         (webkit_color_chooser_request_finish):
2916         (webkit_color_chooser_request_cancel):
2917         (webkitColorChooserRequestCreate):
2918         * UIProcess/API/gtk/WebKitColorChooserRequest.h: Added.
2919         * UIProcess/API/gtk/WebKitColorChooserRequestPrivate.h: Added.
2920         * UIProcess/API/gtk/WebKitWebView.cpp:
2921         (webkit_web_view_class_init): Add run-color-chooser signal.
2922         (webkitWebViewEmitRunColorChooser): Emit run-color-chooser signal.
2923         * UIProcess/API/gtk/WebKitWebView.h:
2924         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
2925         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
2926         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitColorChooserRequest.
2927         * UIProcess/API/gtk/webkit2.h: Include WebKitColorChooserRequest.h
2928
2929 2015-02-11  Enrica Casucci  <enrica@apple.com>
2930
2931         iOS build fix.
2932
2933         Unreviewed.
2934
2935         * UIProcess/ios/WKContentViewInteraction.mm:
2936         (-[WKContentView inputAssistantItem]):
2937         (-[WKContentView _inputAssistantItem]):
2938
2939 2015-02-11  Chris Dumez  <cdumez@apple.com>
2940
2941         [WK2] Add logging to validate the network cache efficacy (Part 2)
2942         https://bugs.webkit.org/show_bug.cgi?id=141345
2943         <rdar://problem/19632080>
2944
2945         Reviewed by Sam Weinig.
2946
2947         Add diagnostic logging messages to validate the network cache efficacy.
2948         The following 4 messages are added:
2949         - networkCache / retrieval / success
2950         - networkCache / retrieval / unhandledRequestFailure
2951         - networkCache / retrieval / noLongerInCacheFailure
2952         - networkCache / retrieval / unusableCachedEntryFailure
2953
2954         The messages are sent via IPC from the NetworkProcess to the UIProcess,
2955         where the WebPageProxy code already handles diagnostic messages sent by
2956         the WebProcess.
2957
2958 2015-02-11  Tim Horton  <timothy_horton@apple.com>
2959
2960         REGRESSION (iOS 8): PDFs embedded in <object>/<embed> tag don't load at all
2961         https://bugs.webkit.org/show_bug.cgi?id=141457
2962         <rdar://problem/18221851>
2963
2964         Reviewed by Alexey Proskuryakov.
2965
2966         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2967         (WebKit::WebFrameLoaderClient::objectContentType):
2968         On iOS, if we don't know what to do with a PDF-in-object, treat it as an image.
2969
2970 2015-02-11  ChangSeok Oh  <changseok.oh@collabora.com>
2971
2972         Activate ReliefLogger of a memory pressure handler for linux system.
2973         https://bugs.webkit.org/show_bug.cgi?id=123611
2974
2975         Reviewed by Anders Carlsson.
2976
2977         * Shared/WebProcessCreationParameters.cpp:
2978         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
2979         Make the parameter, shouldEnableMemoryPressureReliefLogging shareable with COCOA else systems.
2980         (WebKit::WebProcessCreationParameters::encode): ditto.
2981         (WebKit::WebProcessCreationParameters::decode): ditto.
2982         * Shared/WebProcessCreationParameters.h:
2983         * UIProcess/WebProcessPool.cpp:
2984         (WebKit::WebProcessPool::createNewWebProcess): Set shouldEnableMemoryPressureReliefLogging
2985         to true for linux system.
2986         * WebProcess/WebProcess.cpp:
2987         (WebKit::WebProcess::initializeWebProcess): Pass the shouldEnableMemoryPressureReliefLogging value
2988         to MemoryPressureHandler::ReliefLogger::setLoggingEnabled().
2989
2990 2015-02-11  Yusuke Suzuki  <utatane.tea@gmail.com>
2991
2992         [GTK][EFL] Suppress a warning of unused params
2993         https://bugs.webkit.org/show_bug.cgi?id=141474
2994
2995         Reviewed by Darin Adler.
2996
2997         Drop unused argument name, `directoryName`.
2998
2999         * UIProcess/API/APIWebsiteDataStore.cpp:
3000         (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
3001
3002 2015-02-11  Carlos Garcia Campos  <cgarcia@igalia.com>
3003
3004         [GTK] Add default color chooser implementation using GtkColorChooserDialog
3005         https://bugs.webkit.org/show_bug.cgi?id=141392
3006
3007         Reviewed by Gustavo Noronha Silva.
3008
3009         * PlatformGTK.cmake: Add new files to compilation.
3010         * UIProcess/API/gtk/PageClientImpl.cpp:
3011         (WebKit::PageClientImpl::createColorPicker): Call WebColorPickerGtk::create().
3012         * UIProcess/gtk/WebColorPickerGtk.cpp: Added.
3013         (WebKit::WebColorPickerGtk::create):
3014         (WebKit::WebColorPickerGtk::WebColorPickerGtk):
3015         (WebKit::WebColorPickerGtk::~WebColorPickerGtk):
3016         (WebKit::WebColorPickerGtk::cancel): Set initial color.
3017         (WebKit::WebColorPickerGtk::endPicker): Destroy the color chooser dialog.
3018         (WebKit::WebColorPickerGtk::didChooseColor): Notify the client.
3019         (WebKit::WebColorPickerGtk::colorChooserDialogRGBAChangedCallback):
3020         Update the selected color.
3021         (WebKit::WebColorPickerGtk::colorChooserDialogResponseCallback):
3022         Cancel or finish the operation depending on the dialog response.
3023         (WebKit::WebColorPickerGtk::showColorPicker): Create a
3024         GtkColorChooserDialog to handle the color picker operation.
3025         * UIProcess/gtk/WebColorPickerGtk.h: Added.
3026         (WebKit::WebColorPickerGtk::initialColor):
3027
3028 2015-02-11  Commit Queue  <commit-queue@webkit.org>
3029
3030         Unreviewed, rolling out r179910.
3031         https://bugs.webkit.org/show_bug.cgi?id=141464
3032
3033         Caused assertions on debug bots (Requested by ap on #webkit).
3034
3035         Reverted changeset:
3036
3037         "[WK2] Add logging to validate the network cache efficacy
3038         (Part 2)"
3039         https://bugs.webkit.org/show_bug.cgi?id=141345
3040         http://trac.webkit.org/changeset/179910
3041
3042 2015-02-10  Chris Dumez  <cdumez@apple.com>
3043
3044         [WK2] Add logging to validate the network cache efficacy (Part 2)
3045         https://bugs.webkit.org/show_bug.cgi?id=141345
3046         <rdar://problem/19632080>
3047
3048         Reviewed by Antti Koivisto.
3049
3050         Add diagnostic logging messages to validate the network cache efficacy.
3051         The following 4 messages are added:
3052         - networkCache / retrieval / success
3053         - networkCache / retrieval / unhandledRequestFailure
3054         - networkCache / retrieval / noLongerInCacheFailure
3055         - networkCache / retrieval / unusableCachedEntryFailure
3056
3057         The messages are sent via IPC from the NetworkProcess to the UIProcess,
3058         where the WebPageProxy code already handles diagnostic messages sent by
3059         the WebProcess.
3060
3061 2015-02-10  Conrad Shultz  <conrad_shultz@apple.com>
3062
3063         Clients need the ability to hook into immediate action lifecycle
3064         https://bugs.webkit.org/show_bug.cgi?id=141449
3065
3066         Reviewed by Tim Horton.
3067
3068         * UIProcess/API/Cocoa/WKViewPrivate.h:
3069         Expose new methods.
3070
3071         * UIProcess/API/mac/WKView.mm:
3072         (-[WKView _prepareForImmediateActionAnimation]):
3073         (-[WKView _cancelImmediateActionAnimation]):
3074         (-[WKView _completeImmediateActionAnimation]):
3075         Stub implementations.
3076
3077         * UIProcess/mac/WKImmediateActionController.mm:
3078         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
3079         Send -_prepareForImmediateActionAnimation.
3080         (-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
3081         Send -_cancelImmediateActionAnimation.
3082         (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
3083         Send -_completeImmediateActionAnimation.
3084
3085 2015-02-10  Dan Bernstein  <mitz@apple.com>
3086
3087         <rdar://problem/19770264> Starting a navigation gesture dismisses the keyboard
3088
3089         Reviewed by Tim Horton.
3090
3091         * UIProcess/ios/ViewGestureControllerIOS.mm:
3092         (WebKit::ViewGestureController::beginSwipeGesture): Reordered the view hierarchy changes,
3093         such that m_liveSwipeView will not momentarily move out of the window, because that causes
3094         the window’s first responder to be set to nil (if it was a descendant of m_liveSwipView).
3095
3096 2015-02-10  Enrica Casucci  <enrica@apple.com>
3097
3098         Hit testing is misplaced when selecting on wikipedia page.
3099         https://bugs.webkit.org/show_bug.cgi?id=141410
3100         rdar://problem/19768211
3101
3102         Reviewed by Simon Fraser.
3103
3104         When loading a new document into the same WebPage object, we need
3105         to clear the assisted node, since there is no guarantee that the
3106         node will be blurred. The bug was caused by the use of a stale
3107         assisted node to constrain the point where the gesture occurs.
3108         The node was still valid, since the previous page was in the cache.
3109         I've added a ASSERT to check that, when constraining the point to
3110         node rectangle, the node is in the same document as the one we
3111         are performing hit test on. When the frame is detached, we clear
3112         the assisted node if the node is part of the document is the frame
3113         being detached.
3114
3115         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3116         (WebKit::WebFrameLoaderClient::detachedFromParent2):
3117         * WebProcess/WebPage/WebPage.h:
3118         * WebProcess/WebPage/ios/WebPageIOS.mm:
3119         (WebKit::constrainPoint):
3120         (WebKit::WebPage::resetAssistedNodeForFrame):
3121
3122 2015-02-10  Joseph Pecoraro  <pecoraro@apple.com>
3123
3124         [Cocoa] NSData over retain in WKBrowsingContextController loadData
3125         https://bugs.webkit.org/show_bug.cgi?id=141437
3126
3127         Reviewed by Anders Carlsson.
3128
3129         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3130         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
3131         API::Data::createWithoutCopying will automatically do the retaining / releasing for us.
3132
3133 2015-02-10  Zhuo Li  <zachli@apple.com>
3134
3135         [WK2] Add support for registering url schemes to bypass Content Security Policy.
3136         https://bugs.webkit.org/show_bug.cgi?id=140736
3137
3138         Reviewed by Anders Carlsson.
3139
3140         * Shared/WebProcessCreationParameters.cpp:
3141         (WebKit::WebProcessCreationParameters::encode):
3142         (WebKit::WebProcessCreationParameters::decode):
3143         * Shared/WebProcessCreationParameters.h:
3144         * UIProcess/API/C/WKContext.cpp:
3145         (WKContextRegisterURLSchemeAsBypassingContentSecurityPolicy):
3146         * UIProcess/API/C/WKContextPrivate.h:
3147         * UIProcess/WebProcessPool.cpp:
3148         (WebKit::WebProcessPool::createNewWebProcess):
3149         (WebKit::WebProcessPool::registerURLSchemeAsBypassingContentSecurityPolicy):
3150         * UIProcess/WebProcessPool.h:
3151         * WebProcess/WebProcess.cpp:
3152         (WebKit::WebProcess::initializeWebProcess):
3153         (WebKit::WebProcess::registerURLSchemeAsBypassingContentSecurityPolicy):
3154         * WebProcess/WebProcess.h:
3155         * WebProcess/WebProcess.messages.in:
3156
3157 2015-02-10  Sanghyup Lee  <sh53.lee@samsung.com>
3158
3159         [EFL] Use a variable to set flicking time instead of hardcoding
3160         https://bugs.webkit.org/show_bug.cgi?id=138950
3161
3162         Reviewed by Gyuyoung Kim.
3163
3164         Currently time of flick gesture animation is hardcoded as one second.
3165         This patch added a static variable to increase readability.
3166
3167         * UIProcess/API/efl/GestureRecognizer.cpp:
3168         (WebKit::GestureHandler::GestureHandler):
3169         (WebKit::GestureHandler::flickAnimatorCallback):
3170         (WebKit::GestureHandler::handleFlick):
3171
3172 2015-02-09  Enrica Casucci  <enrica@apple.com>
3173
3174         Selection flickers when trying to change size of selection.
3175         https://bugs.webkit.org/show_bug.cgi?id=141404
3176         rdar://problem/18824863
3177
3178         Reviewed by Benjamin Poulain.
3179
3180         When looking for the contracted range from the current range,
3181         we were incorrectly choosing a selection whose rectangle is empty
3182         as a best match candidate. This was throwing off all the logic
3183         and producing a contracted range whose rectangle was bigger than the
3184         expanded range, therefore producing a shrink threshold larger than the
3185         growth one.
3186
3187         * WebProcess/WebPage/ios/WebPageIOS.mm:
3188         (WebKit::WebPage::contractedRangeFromHandle):
3189
3190 2015-02-09  Brian J. Burg  <burg@cs.washington.edu>
3191
3192         REGRESSION(r179705): 2nd-level inspector availability no longer controlled by DeveloperExtrasEnabled user default
3193         https://bugs.webkit.org/show_bug.cgi?id=141343
3194
3195         Reviewed by Timothy Hatcher.
3196
3197         The regression was caused by the switch to using WKWebViewConfiguration and
3198         its default WebPreferences object, which is used to populate the inspector page's
3199         Settings object. This WebPreferences is initialized with no identifier, so
3200         only preferences in the FOR_EACH_WEBKIT_DEBUG_*_PREFERENCE macros are populated
3201         from NSUserDefaults.
3202
3203         The simplest fix is to move DeveloperExtrasEnabled into the DEBUG group.
3204
3205         Previously, each inspector level had a unique identifier such as
3206         __WebInspectorPageGroupLevelN__, and the n+1 level inspector was enabled
3207         by toggling __WebInspectorPageGroupLevelN__.WebKit2DeveloperExrasEnabled.
3208         With the move to the DEBUG group, the preference becomes simply
3209         WebKitDeveloperExtrasEnabled, which enables any level of inspector.
3210         (This does not clash with Safari's "Show Develop Menu" preference, which uses
3211         the key "WebKitDeveloperExtrasEnabledPreferenceKey")
3212
3213         * Shared/WebPreferencesDefinitions.h:
3214
3215 2015-02-08  Antti Koivisto  <antti@apple.com>
3216
3217         Measure cache size more accurately
3218         https://bugs.webkit.org/show_bug.cgi?id=141378
3219         <rdar://problem/19760224>
3220
3221         Reviewed by Chris Dumez.
3222
3223         Estimate the cache disk space usage from the actual entry sizes instead of the item count.
3224         This prevents large cache items from making the cache grow beyond its bounds.
3225
3226         * NetworkProcess/cache/NetworkCacheStorage.h:
3227         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
3228         (WebKit::NetworkCacheStorage::initialize):
3229         (WebKit::NetworkCacheStorage::removeEntry):
3230         (WebKit::NetworkCacheStorage::store):
3231         (WebKit::NetworkCacheStorage::clear):
3232         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
3233
3234 2015-02-09  Carlos Garcia Campos  <cgarcia@igalia.com>
3235
3236         REGRESSION(r179705): [GTK] The Web Inspector doesn't work after r179705
3237         https://bugs.webkit.org/show_bug.cgi?id=141333
3238
3239         Reviewed by Žan Doberšek.
3240
3241         Create an initialize WebPreferences for the inspector page. This
3242         was moved from cross-platform code to platform specific code.
3243
3244         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3245         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3246
3247 2015-02-08  Timothy Horton  <timothy_horton@apple.com>
3248
3249         Null deref in _clearImmediateActionState when closing a view with a DataDetectors popover open
3250         https://bugs.webkit.org/show_bug.cgi?id=141377
3251         <rdar://problem/19711203>
3252
3253         Reviewed by Darin Adler.
3254
3255         * UIProcess/mac/WKImmediateActionController.mm:
3256         (-[WKImmediateActionController _clearImmediateActionState]):
3257         We can have already detached the page when DataDetectors calls us back
3258         in interactionStoppedHandler. While we have kept a strong reference to the
3259         page in the interactionStoppedHandler block, _page is nulled out.
3260         It's OK to avoid doing this work, in any case, because closing a page
3261         tears down the TextIndicator anyway.
3262
3263 2015-02-08  Chris Dumez  <cdumez@apple.com>
3264
3265         [WK2] Add logging to validate the network cache efficacy (Part 1)
3266         https://bugs.webkit.org/show_bug.cgi?id=141269
3267         <rdar://problem/19632080>
3268
3269         Reviewed by Antti Koivisto.
3270
3271         Add console logging to validate the network cache efficacy. This will
3272         tell us if how the network cache satisties requests, in particular:
3273         - Request cannot be handled by the cache
3274         - Entry was not in the cache but is no longer there (pruned)
3275         - Entry is in the cache but is not usable
3276         - Entry is in the cache and is used.
3277
3278         This patch introduces a SQLite-based network cache statistics storage
3279         that is used to store requests we have seen before, and query if we
3280         have seen a request before. The storage is lightweight as it only
3281         stores hashes in the database, in a background thread.
3282
3283         The statistics cache is initially bootstapped from the network disk
3284         cache so that we have data initially and get as accurate statistics
3285         as possible from the start.
3286
3287         To maintain an acceptable level of performance, we have a hard limit
3288         on the number of unique requests that are retained set to 100000.
3289
3290         Diagnostic logging for this will be added in a follow-up patch.
3291
3292 2015-02-07  Chris Dumez  <cdumez@apple.com>
3293
3294         Add Vector::removeFirstMatching() / removeAllMatching() methods taking lambda functions
3295         https://bugs.webkit.org/show_bug.cgi?id=141321
3296
3297         Reviewed by Darin Adler.
3298
3299         Use new Vector::removeFirstMatching() / removeAllMatching() methods.
3300
3301 2015-02-07  Tim Horton  <timothy_horton@apple.com>
3302
3303         Add API::HistoryClient and split some things out of API::NavigationClient
3304         https://bugs.webkit.org/show_bug.cgi?id=141264
3305
3306         Reviewed by Darin Adler.
3307
3308         * UIProcess/API/APIHistoryClient.h: Added.
3309         (API::HistoryClient::~HistoryClient):
3310         (API::HistoryClient::didNavigateWithNavigationData):
3311         (API::HistoryClient::didPerformClientRedirect):
3312         (API::HistoryClient::didPerformServerRedirect):
3313         (API::HistoryClient::didUpdateHistoryTitle):
3314         * UIProcess/API/APINavigationClient.h:
3315         (API::NavigationClient::didNavigateWithNavigationData): Deleted.
3316         (API::NavigationClient::didPerformClientRedirect): Deleted.
3317         (API::NavigationClient::didPerformServerRedirect): Deleted.
3318         (API::NavigationClient::didUpdateHistoryTitle): Deleted.
3319         * UIProcess/Cocoa/NavigationState.h:
3320         * UIProcess/Cocoa/NavigationState.mm:
3321         (WebKit::NavigationState::createHistoryClient):
3322         (WebKit::NavigationState::HistoryClient::HistoryClient):
3323         (WebKit::NavigationState::HistoryClient::~HistoryClient):
3324         (WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
3325         (WebKit::NavigationState::HistoryClient::didPerformClientRedirect):
3326         (WebKit::NavigationState::HistoryClient::didPerformServerRedirect):
3327         (WebKit::NavigationState::HistoryClient::didUpdateHistoryTitle):
3328         (WebKit::NavigationState::NavigationClient::didNavigateWithNavigationData): Deleted.
3329         (WebKit::NavigationState::NavigationClient::didPerformClientRedirect): Deleted.
3330         (WebKit::NavigationState::NavigationClient::didPerformServerRedirect): Deleted.
3331         (WebKit::NavigationState::NavigationClient::didUpdateHistoryTitle): Deleted.
3332         * UIProcess/WebPageProxy.cpp:
3333         (WebKit::WebPageProxy::setHistoryClient):
3334         (WebKit::WebPageProxy::didNavigateWithNavigationData):
3335         (WebKit::WebPageProxy::didPerformClientRedirect):
3336         (WebKit::WebPageProxy::didPerformServerRedirect):
3337         (WebKit::WebPageProxy::didUpdateHistoryTitle):
3338         * UIProcess/WebPageProxy.h:
3339         Add a API::HistoryClient and move the few things that belong on it out of API::NavigationClient.
3340         Adjust accordingly in WebPageProxy and NavigationState.
3341
3342         * UIProcess/API/Cocoa/WKWebView.mm:
3343         (-[WKWebView initWithFrame:configuration:]):
3344         (-[WKWebView setNavigationDelegate:]):
3345         (-[WKWebView setUIDelegate:]):
3346         (-[WKWebView _setHistoryDelegate:]):
3347         Lazily push the NavigationState/UIDelegate clients down to WebPageProxy upon
3348         installation of a delegate, so that alternative (C SPI) delegate setters can
3349         be separately created.
3350
3351         * WebKit2.xcodeproj/project.pbxproj:
3352
3353 2015-02-07  Antti Koivisto  <antti@apple.com>
3354
3355         And as a further followup restore the 8bit test too.
3356
3357         * NetworkProcess/cache/NetworkCacheKey.cpp:
3358         (WebKit::hashString):
3359
3360 2015-02-07  Antti Koivisto  <antti@apple.com>
3361
3362         Use longer hashes for cache keys
3363         https://bugs.webkit.org/show_bug.cgi?id=141356
3364
3365         Rubber-stamped by Darin Adler.
3366
3367         Folloup and build fix.
3368
3369         * NetworkProcess/cache/NetworkCacheCoders.h:
3370         * NetworkProcess/cache/NetworkCacheKey.cpp:
3371         (WebKit::hashString):
3372
3373             Use containsOnlyASCII instead of is8Bit so both paths always compute the same hash.
3374
3375         * NetworkProcess/cache/NetworkCacheKey.h:
3376
3377 2015-02-07  Antti Koivisto  <antti@apple.com>
3378
3379         Remove a printf.
3380
3381         * NetworkProcess/cache/NetworkCache.cpp:
3382         (WebKit::NetworkCache::retrieve):
3383
3384 2015-02-07  Antti Koivisto  <antti@apple.com>
3385
3386         Use longer hashes for cache keys
3387         https://bugs.webkit.org/show_bug.cgi?id=141356
3388
3389         Reviewed by Darin Adler.
3390
3391         The current key hashes are 32bit. We should use longer hashes to eliminate collisions.
3392
3393         This patch switches us to using MD5 digests for the cache key hashes. As a result the file names for the cache
3394         entries grow from 8 to 32 character.
3395
3396         Note that we don't need a cryptographic hash (full cache keys are verified against the entries).
3397         MD5 just happens to be fast, convenient and available.
3398
3399         The patch also moves the whole cache hierarchy down to a versioned subdirectory ("WebKitCache/Version 2")
3400         and deletes any old style cache files if they exist.
3401
3402         * NetworkProcess/cache/NetworkCacheCoders.cpp:
3403         (WebKit::NetworkCacheCoder<MD5::Digest>::encode):
3404         (WebKit::NetworkCacheCoder<MD5::Digest>::decode):
3405         * NetworkProcess/cache/NetworkCacheCoders.h:
3406         * NetworkProcess/cache/NetworkCacheKey.cpp:
3407         (WebKit::NetworkCacheKey::NetworkCacheKey):
3408         (WebKit::hashString):
3409         (WebKit::NetworkCacheKey::computeHash):
3410         (WebKit::NetworkCacheKey::hashAsString):
3411         (WebKit::NetworkCacheKey::stringToHash):
3412         * NetworkProcess/cache/NetworkCacheKey.h:
3413         (WebKit::NetworkCacheKey::shortHash):
3414         (WebKit::NetworkCacheKey::toShortHash):
3415
3416             32bit hash to use in the bloom filter.
3417
3418         (WebKit::NetworkCacheKey::hashStringLength):
3419         * NetworkProcess/cache/NetworkCacheStorage.h:
3420
3421             Bump the version.
3422
3423         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
3424         (WebKit::traverseCacheFiles):
3425         (WebKit::makeVersionedDirectoryPath):
3426         (WebKit::NetworkCacheStorage::NetworkCacheStorage):
3427         (WebKit::NetworkCacheStorage::initialize):
3428         (WebKit::NetworkCacheStorage::removeEntry):
3429         (WebKit::NetworkCacheStorage::retrieve):
3430         (WebKit::NetworkCacheStorage::store):
3431         (WebKit::NetworkCacheStorage::update):
3432         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
3433         (WebKit::NetworkCacheStorage::deleteOldVersions):
3434
3435             Wipe out the version 1 cache.
3436
3437 2015-02-06  Chris Dumez  <cdumez@apple.com>
3438
3439         Have SQLiteStatement::database() return a reference
3440         https://bugs.webkit.org/show_bug.cgi?id=141348
3441
3442         Reviewed by Andreas Kling.
3443
3444         Have SQLiteStatement::database() return a reference as it can never
3445         return null.
3446
3447         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
3448         (WebKit::SQLiteIDBCursor::internalAdvanceOnce):
3449
3450 2015-02-06  Alexey Proskuryakov  <ap@apple.com>
3451
3452         Report network process crashes during layout tests
3453         https://bugs.webkit.org/show_bug.cgi?id=139646
3454
3455         Reviewed by Anders Carlsson.
3456
3457         Added a way to get network process pid, modeled after how we do this for web process.
3458
3459         * UIProcess/API/C/mac/WKContextPrivateMac.h:
3460         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3461         (WKContextGetNetworkProcessIdentifier):
3462         * UIProcess/WebProcessPool.cpp:
3463         (WebKit::WebProcessPool::networkProcessCrashed): Don't reset m_networkProcess until
3464         after calling the client, so that the client could retrieve its pid.
3465         (WebKit::WebProcessPool::networkProcessIdentifier):
3466         * UIProcess/WebProcessPool.h:
3467
3468 2015-02-05  Timothy Hatcher  <timothy@apple.com>
3469
3470         Support overriding the deviceScaleFactor per WKWebView/WKView
3471         https://bugs.webkit.org/show_bug.cgi?id=141311
3472
3473         Reviewed by Tim Horton.
3474
3475         * UIProcess/API/Cocoa/WKViewPrivate.h:
3476         * UIProcess/API/Cocoa/WKWebView.mm:
3477         (-[WKWebView _setOverrideDeviceScaleFactor:]):
3478         (-[WKWebView _overrideDeviceScaleFactor]):
3479         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3480         * UIProcess/API/mac/WKView.mm:
3481         (-[WKView _intrinsicDeviceScaleFactor]):
3482         (-[WKView _setOverrideDeviceScaleFactor:]):
3483         (-[WKView _overrideDeviceScaleFactor]):
3484
3485 2015-02-06  Carlos Garcia Campos  <cgarcia@igalia.com>
3486
3487         [GTK] Remove WebKitWebView::close-notification signal
3488         https://bugs.webkit.org/show_bug.cgi?id=141330
3489
3490         Reviewed by Gustavo Noronha Silva.
3491
3492         In favor of a WebKitNotification::closed signal and
3493         webkit_notification_close() method that both applications and
3494         WebKit can use to close a notification. This also fixes the
3495         onclose event that was not fired when the notification was
3496         closed. It also brings back padding space in WebKitWebViewClass.
3497
3498         * UIProcess/API/gtk/WebKitNotification.cpp:
3499         (webkit_notification_class_init): Add WebKitNotification::closed signal.
3500         (webkit_notification_close): Emit WebKitNotification::closed.
3501         * UIProcess/API/gtk/WebKitNotification.h:
3502         * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
3503         (WebKitNotificationProvider::notificationCloseCallback): Callback
3504         for WebKitNotification::closed signal that notifies the WebProcess
3505         and removes the notification from the map.
3506         (WebKitNotificationProvider::show): Connect to WebKitNotification::closed.
3507         (WebKitNotificationProvider::cancelNotificationByID): Call webkit_notification_close().
3508         * UIProcess/API/gtk/WebKitNotificationProvider.h:
3509         * UIProcess/API/gtk/WebKitWebView.cpp:
3510         (notifyNotificationClosed): The user closed the annotation, call
3511         webkit_notification_close().
3512         (webNotificationClosed): The WebKitNotification has been closed,
3513         close the libnotify notification if it hasn't been closed yet.
3514         (webkitWebViewShowNotification): Create the libnotifiy
3515         notification if needed and associate it to the WebKitNotification
3516         as user data. Connect to the closed signal of both, the libnotifiy
3517         notification and the WebKit notification.
3518         (webkitWebViewCloseNotification): Deleted.
3519         (webkit_web_view_class_init): Remove close-notification signal and
3520         the default hanlder.
3521         (webkitWebViewEmitCloseNotification): Deleted.
3522         * UIProcess/API/gtk/WebKitWebView.h:
3523         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
3524         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add webkit_notification_close.
3525
3526 2015-02-06  Carlos Garcia Campos  <cgarcia@igalia.com>
3527
3528         ASSERTION FAILED: !m_adoptionIsRequired in WTF::RefCountedBase::ref
3529         https://bugs.webkit.org/show_bug.cgi?id=141035
3530
3531         Reviewed by Sergio Villar Senin.
3532
3533         Rename PrinterListGtk::singleton() as PrinterListGtk::getOrCreate(), and
3534         make it return nullptr when the shared PrinterListGtk object is
3535         still being created. This can happen if the nested loop used by
3536         gtk_enumerate_printers dispatches a GSource that starts a new
3537         synchronous print operation. In th