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