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