5d4f0ed53b5c3a3a87354a4cf2eccb0e13703dfb
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-03-19  Chris Dumez  <cdumez@apple.com>
2
3         The network cache should ignore "cache-control: no-cache, must-revalidate" on history navigation
4         https://bugs.webkit.org/show_bug.cgi?id=142831
5         <rdar://problem/20209957>
6
7         Reviewed by Antti Koivisto.
8
9         The network cache should ignore "no-cache" and "must-revalidate" as
10         Cache-Control policy for history navigations to avoid unnecessary
11         revalidation in this case. Our memory cache already behaves this way.
12
13         On history navigation, our disk cache implementation currently
14         revalidates unconditionally resources if "cache-control: no-cache" is
15         used. It also revalidates expired resources if "cache-control:
16         must-revalidate" is used. This is sub-optimal.
17
18         RFC 7234 does not require us to do so [1]:
19         """
20           User agents often have history mechanisms, such as "Back" buttons and
21           history lists, that can be used to redisplay a representation
22           retrieved earlier in a session.
23
24           The freshness model (Section 4.2) does not necessarily apply to
25           history mechanisms.  That is, a history mechanism can display a
26           previous representation even if it has expired.
27         """
28
29         Chrome and IE9+ [2] already ignore "cache-control: must-revalidate" on history navigation.
30
31         [1] https://tools.ietf.org/html/rfc7234#page-32
32         [2] http://blogs.msdn.com/b/ie/archive/2010/07/14/caching-improvements-in-internet-explorer-9.aspx
33
34         Test: http/tests/cache/disk-cache-validation-back-navigation-policy.html
35
36         * NetworkProcess/cache/NetworkCache.cpp:
37         (WebKit::NetworkCache::decodeStorageEntry):
38
39 2015-03-18  Simon Fraser  <simon.fraser@apple.com>
40
41         Don't paint PDFs on every scroll
42         https://bugs.webkit.org/show_bug.cgi?id=142857
43         rdar://problem/20130207
44
45         Reviewed by Tim Horton.
46         
47         Don't push a scale factor onto the PDF layer controller if it hasn't
48         changed, since doing so causes a repaint.
49
50         * WebProcess/Plugins/PDF/PDFPlugin.mm:
51         (WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):
52
53 2015-03-18  Anders Carlsson  <andersca@apple.com>
54
55         Use && instead of & when deciding if the network cache should be cleared
56         https://bugs.webkit.org/show_bug.cgi?id=142845
57
58         Reviewed by Antti Koivisto.
59
60         * NetworkProcess/NetworkProcess.cpp:
61         (WebKit::NetworkProcess::deleteWebsiteData):
62
63 2015-03-18  Anders Carlsson  <andersca@apple.com>
64
65         Add WKContextGetWebsiteDataStore API
66         https://bugs.webkit.org/show_bug.cgi?id=142832
67         rdar://problem/16544715
68
69         Reviewed by Sam Weinig.
70
71         Also add WKWebsiteDataStoreRef which is toll-free bridged to _WKWebsiteDataStore.
72
73         * Shared/API/c/WKBase.h:
74         Add new declaration.
75
76         * UIProcess/API/APIWebsiteDataStore.cpp:
77         (API::WebsiteDataStore::create):
78         * UIProcess/API/APIWebsiteDataStore.h:
79         Add a new function that takes a configuration.
80
81         * UIProcess/API/C/WKAPICast.h:
82         Add cast.
83
84         * UIProcess/API/C/WKContext.cpp:
85         (WKContextGetWebsiteDataStore):
86         Return the context's website data store.
87
88         * UIProcess/API/C/WKContext.h:
89         Add new declaration.
90
91         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: Added.
92         * UIProcess/API/C/WKWebsiteDataStoreRef.h: Added.
93         Add new files.
94
95         * UIProcess/WebKeyValueStorageManager.cpp:
96         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
97         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
98         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
99         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
100         Update now that WebProcessPool holds on to an API::WebsiteDataStore.
101
102         * UIProcess/WebProcessPool.cpp:
103         (WebKit::WebProcessPool::WebProcessPool):
104         (WebKit::WebProcessPool::createWebPage):
105         * UIProcess/WebProcessPool.h:
106         WebProcessPool should hold on to an API::WebsiteDataStore instead of a WebKit::WebsiteDataStore.
107
108         * WebKit2.xcodeproj/project.pbxproj:
109         Add new files.
110
111 2015-03-18  Tim Horton  <timothy_horton@apple.com>
112
113         Cannot invoke action menus anymore
114         https://bugs.webkit.org/show_bug.cgi?id=142797
115         <rdar://problem/20032670>
116
117         * UIProcess/API/mac/WKView.mm:
118         Need one more respondsToSelector check.
119
120 2015-03-18  Chris Dumez  <cdumez@apple.com>
121
122         [WK2] Log the number of network cache requests that we have never seen before
123         https://bugs.webkit.org/show_bug.cgi?id=142828
124         <rdar://problem/19632130>
125
126         Reviewed by Antti Koivisto.
127
128         Log the number of network cache requests that we have never seen before
129         using diagnostic logging.
130
131         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
132         (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
133         (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
134
135 2015-03-17  Antti Koivisto  <antti@apple.com>
136
137         Prune least valuable cache entries first
138         https://bugs.webkit.org/show_bug.cgi?id=142810
139         rdar://problem/19632130
140
141         Reviewed by Darin Adler.
142
143         When pruning the cache estimate relative value of each entry using formula
144
145         age = current time - creation time
146         accessAge = last access time - creation time
147         value = accessAge / age
148
149         That is, we value entries that have been accessed recently and survived in the cache longest.
150
151         The most valuable entries don't get deleted at all while the deletion probablity ramps up for
152         lower value entries.
153
154         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
155         (WebKit::NetworkCache::fileTimes):
156
157             Get the creation time and access time for a file.
158
159         (WebKit::NetworkCache::updateFileAccessTimeIfNeeded):
160
161             Update access time manually if the file system doesn't do it automatically.
162
163         * NetworkProcess/cache/NetworkCacheIOChannel.h:
164         (WebKit::NetworkCache::IOChannel::path):
165         (WebKit::NetworkCache::IOChannel::type):
166         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
167         (WebKit::NetworkCache::IOChannel::IOChannel):
168         (WebKit::NetworkCache::IOChannel::open):
169
170             Remember the file path and move most of the work to constructor.
171
172         * NetworkProcess/cache/NetworkCacheStorage.cpp:
173         (WebKit::NetworkCache::Storage::Storage):
174         (WebKit::NetworkCache::Storage::remove):
175         (WebKit::NetworkCache::Storage::updateFileAccessTime):
176         (WebKit::NetworkCache::Storage::dispatchReadOperation):
177         (WebKit::NetworkCache::deletionProbability):
178
179             Compute the probability based on entry age and access time.
180
181         (WebKit::NetworkCache::Storage::shrinkIfNeeded):
182         * NetworkProcess/cache/NetworkCacheStorage.h:
183         (WebKit::NetworkCache::Storage::serialBackgroundIOQueue):
184         (WebKit::NetworkCache::Storage::deleteQueue): Deleted.
185
186             More generic name.
187
188 2015-03-18  Chris Dumez  <cdumez@apple.com>
189
190         [WK2] Log total number of network cache queries using diagnostic logging
191         https://bugs.webkit.org/show_bug.cgi?id=142803
192         <rdar://problem/19632130>
193
194         Reviewed by Antti Koivisto.
195
196         Log total number of network cache queries using diagnostic logging.
197
198         * NetworkProcess/cache/NetworkCache.cpp:
199         (WebKit::NetworkCache::Cache::retrieve):
200         * NetworkProcess/cache/NetworkCacheStatistics.h:
201         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
202         (WebKit::NetworkCache::Statistics::recordCacheRetrievalRequest):
203
204 2015-03-18  Chris Dumez  <cdumez@apple.com>
205
206         [WK2] We should not even try the network cache for non-HTTP protocol requests
207         https://bugs.webkit.org/show_bug.cgi?id=142802
208         <rdar://problem/19632130>
209
210         Reviewed by Antti Koivisto.
211
212         We should not even try the network cache for non-HTTP protocol requests
213         and the network cache cannot handle those.
214
215         * NetworkProcess/NetworkResourceLoader.cpp:
216         (WebKit::NetworkResourceLoader::start):
217         * NetworkProcess/cache/NetworkCache.cpp:
218         (WebKit::NetworkCache::canRetrieve):
219         (WebKit::NetworkCache::Cache::retrieve):
220         * NetworkProcess/cache/NetworkCache.h:
221         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
222         (WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):
223
224 2015-03-17  Conrad Shultz  <conrad_shultz@apple.com>
225
226         Ignore some deprecation warnings
227         https://bugs.webkit.org/show_bug.cgi?id=142813
228
229         Reviewed by Mark Rowe.
230
231         Fixing the deprecations is tracked by: <rdar://problem/20201450>
232
233         * UIProcess/mac/WebPopupMenuProxyMac.mm:
234         (WebKit::WebPopupMenuProxyMac::populate):
235
236 2015-03-17  Ryuan Choi  <ryuan.choi@navercorp.com>
237
238         [EFL] Expose JavaScript binding interface through ewk_extension
239         https://bugs.webkit.org/show_bug.cgi?id=142033
240
241         Reviewed by Gyuyoung Kim.
242
243         * PlatformEfl.cmake:
244         * UIProcess/API/efl/tests/extensions/extension_sample.cpp: Registered test object for new test case.
245         * UIProcess/API/efl/tests/test_ewk2_javascript_binding.cpp: Added simple binding API test case.
246         (EWK2ContextTestWithExtension::messageReceivedCallback):
247         (EWK2ContextTestWithExtension::EWK2ContextTestWithExtension):
248         (TEST_F):
249         * WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h:
250         * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
251         (EwkExtension::didCreatePage):
252         (EwkExtension::willDestroyPage):
253         * WebProcess/InjectedBundle/API/efl/ewk_extension.h:
254         * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h:
255         * WebProcess/InjectedBundle/API/efl/ewk_page.cpp: Added.
256         (toEwkPage):
257         (EwkPage::EwkPage):
258         (EwkPage::append):
259         (EwkPage::remove):
260         (EwkPage::didFinishDocumentLoadForFrame):
261         (ewk_page_js_global_context_get):
262         (ewk_page_client_register):
263         (ewk_page_client_unregister):
264         * WebProcess/InjectedBundle/API/efl/ewk_page.h: Added.
265         * WebProcess/InjectedBundle/API/efl/ewk_page_private.h: Added.
266         (EwkPage::page):
267         * efl/ewebkit2-extension.pc.in:
268
269 2015-03-17  Tim Horton  <timothy_horton@apple.com>
270
271         Cannot invoke action menus anymore
272         https://bugs.webkit.org/show_bug.cgi?id=142797
273         <rdar://problem/20032670>
274
275         * UIProcess/API/mac/WKView.mm:
276         Need a respondsToSelector check.
277
278 2015-03-17  Tim Horton  <timothy_horton@apple.com>
279
280         Cannot invoke action menus anymore
281         https://bugs.webkit.org/show_bug.cgi?id=142797
282         <rdar://problem/20032670>
283
284         Reviewed by Beth Dakin.
285
286         * UIProcess/API/mac/WKView.mm:
287         Don't process mouse events that would make an action menu; call super
288         and let AppKit take care of it. We have to duplicate the macro so that
289         we can avoid calling super for the internal-only methods.
290         Also, otherMouseMoved is simply not a thing, so remove it.
291
292 2015-03-17  Beth Dakin  <bdakin@apple.com>
293
294         DOM mouse events have weird timing for force clickable elements in Safari 8.0.3 on 
295         10.10.2
296         https://bugs.webkit.org/show_bug.cgi?id=142700
297         -and corresponding-
298         rdar://problem/20165168
299
300         Reviewed by Tim Horton.
301
302         No need to tell the WKImmediateActionController about mouse down any more since we 
303         are expecting it at the beginning of an immediate action interaction.
304         * UIProcess/API/mac/WKView.mm:
305         (-[WKView mouseDown:]):
306
307         Set the delaysPrimaryMouseButtonEvents to NO for the 
308         _immediateActionGestureRecognizer. This will cause AppKit to send up the mouse 
309         events at the expected time.
310         (-[WKView initWithFrame:processPool:configuration:webView:]):
311
312         WebCore::EventHandler now needs to know if an immediate action cancelled or 
313         completed. This plumbs that information down.
314         * UIProcess/WebPageProxy.cpp:
315         (WebKit::WebPageProxy::immediateActionDidCancel):
316         (WebKit::WebPageProxy::immediateActionDidComplete):
317         * UIProcess/WebPageProxy.h:
318         * UIProcess/mac/WKImmediateActionController.h:
319         * UIProcess/mac/WKImmediateActionController.mm:
320         (-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
321         (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
322         (-[WKImmediateActionController wkView:willHandleMouseDown:]): Deleted.
323         * WebProcess/WebPage/WebPage.h:
324         * WebProcess/WebPage/WebPage.messages.in:
325
326         Call EventHandler::setImmediateActionStage() with the appropriate stage.
327         * WebProcess/WebPage/mac/WebPageMac.mm:
328         (WebKit::WebPage::performActionMenuHitTestAtLocation):
329         (WebKit::WebPage::immediateActionDidCancel):
330         (WebKit::WebPage::immediateActionDidComplete):
331
332 2015-03-17  Timothy Horton  <timothy_horton@apple.com>
333
334         Reproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
335         https://bugs.webkit.org/show_bug.cgi?id=142776
336         <rdar://problem/18921338>
337
338         Reviewed by Alexey Proskuryakov.
339
340         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
341         (WebKit::WebChromeClient::createDisplayRefreshMonitor):
342         * WebProcess/WebCoreSupport/WebChromeClient.h:
343         Adjust to the new signature.
344
345 2015-03-17  Antti Koivisto  <antti@apple.com>
346
347         Disk cache should support Vary: Cookie
348         https://bugs.webkit.org/show_bug.cgi?id=142770
349         rdar://problem/19764945
350
351         Reviewed by Anders Carlsson.
352
353         Cookies are not part of the original request but are added by the networking layer when submitting the request.
354         Fetch them explicitly when resolving Vary: Cookie.
355
356         The implementation is not perfect as it fetches the cookie for the cache entry when saving a Vary:Cookie response,
357         not when making the request. In principle the cookie may have changed in-between. This should be enough to handle
358         reasonable cases though. Fetching cookies for every request might be too expensive for this rarely used feature.
359
360         * NetworkProcess/cache/NetworkCache.cpp:
361         (WebKit::NetworkCache::headerValueForVary):
362         (WebKit::NetworkCache::encodeStorageEntry):
363         (WebKit::NetworkCache::verifyVaryingRequestHeaders):
364
365 2015-03-17  Zan Dobersek  <zdobersek@igalia.com>
366
367         [WK2] Use C++ lambdas in IPC::Connection
368         https://bugs.webkit.org/show_bug.cgi?id=138018
369
370         Reviewed by Anders Carlsson.
371
372         Replace uses of WTF::bind() in the IPC::Connection class with C++ lambdas.
373
374         * Platform/IPC/Connection.cpp:
375         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
376         (IPC::Connection::invalidate):
377         (IPC::Connection::sendMessage):
378         (IPC::Connection::processIncomingMessage): Simplify the error messages so we
379         don't have to format strings on-the-fly, removing the issues of cross-thread
380         string copying altogether.
381         (IPC::Connection::dispatchDidReceiveInvalidMessage): The parameters are now
382         of the StringReference type.
383         (IPC::Connection::enqueueIncomingMessage):
384         * Platform/IPC/Connection.h:
385         * Platform/IPC/mac/ConnectionMac.mm:
386         (IPC::Connection::receiveSourceEventHandler):
387         * Platform/IPC/unix/ConnectionUnix.cpp:
388         (IPC::Connection::open):
389
390 2015-03-17  Zan Dobersek  <zdobersek@igalia.com>
391
392         [CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
393         https://bugs.webkit.org/show_bug.cgi?id=142530
394
395         Reviewed by Darin Adler.
396
397         * CMakeLists.txt: Replace the Source/ThirdParty/ANGLE/include/GLSLANG entry
398         in the list of inclusion directories for WebKit2 with Source/ThirdParty/ANGLE,
399         possible due to the new forwarding header for ANGLE's ShaderLang.h.
400
401 2015-03-17  Gwang Yoon Hwang  <yoon@igalia.com>
402
403         REGRESSION(r180924): Unable to build WebKitGTK+ with threaded compositor
404
405         Unreviewed build fix.
406
407         * WebProcess/WebPage/LayerTreeHost.h:
408         Remove duplicated declaration of setNativeSurfaceHandleForCompositing.
409
410 2015-03-16  Ryosuke Niwa  <rniwa@webkit.org>
411
412         Enable ES6 classes by default
413         https://bugs.webkit.org/show_bug.cgi?id=142774
414
415         Reviewed by Gavin Barraclough.
416
417         * Configurations/FeatureDefines.xcconfig:
418
419 2015-03-16  Conrad Shultz  <conrad_shultz@apple.com>
420
421         Don't pass nil as a fireDate for NSTimer
422         https://bugs.webkit.org/show_bug.cgi?id=142765
423
424         Reviewed by Dan Bernstein.
425
426         While we're here, switch to a selector that conforms to documented NSTimer API.
427
428         * UIProcess/mac/WKFullScreenWindowController.mm:
429         (-[WKFullScreenWindowController cancelOperation:]):
430         Set the timer's fireDate as the future date matching the former interval; update the selector.
431         (-[WKFullScreenWindowController _watchdogTimerFired:]):
432         Timer callback; wrap -exitFullScreen.
433
434 2015-03-16  Alex Christensen  <achristensen@webkit.org>
435
436         Progress towards CMake on Mac
437         https://bugs.webkit.org/show_bug.cgi?id=142747
438
439         Reviewed by Chris Dumez.
440
441         * PlatformMac.cmake:
442         Started adding Mac-specific directories and headers.
443
444 2015-03-16  Alexey Proskuryakov  <ap@apple.com>
445
446         ASSERT(m_plugin) on plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html
447         https://bugs.webkit.org/show_bug.cgi?id=142637
448
449         Reviewed by Dean Jackson.
450
451         * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pluginSnapshotTimerFired):
452         m_plugin can be legitimately null.
453
454 2015-03-16  Csaba Osztrogonác  <ossy@webkit.org>
455
456         One more URTBF after r181578.
457
458         * WebProcess/WebPage/WebPage.cpp:
459         (WebKit::WebPage::updatePreferences):
460
461 2015-03-16  Csaba Osztrogonác  <ossy@webkit.org>
462
463         URTBF after r181578.
464
465         * WebProcess/InjectedBundle/InjectedBundle.cpp:
466         (WebKit::InjectedBundle::setCSSAnimationTriggersEnabled): Copy/paste error fixed.
467
468 2015-03-16  Dean Jackson  <dino@apple.com>
469
470         Expose WK2 preference for Animation Triggers runtime flag
471         https://bugs.webkit.org/show_bug.cgi?id=142744
472
473         Reviewed by Anders Carlsson.
474
475         Expose CSSAnimationTriggersEnabled, linking it to the runtime enabled
476         feature flag.
477
478         * Shared/WebPreferencesDefinitions.h:
479         * UIProcess/API/C/WKPreferences.cpp:
480         (WKPreferencesSetCSSAnimationTriggersEnabled):
481         (WKPreferencesGetCSSAnimationTriggersEnabled):
482         * UIProcess/API/C/WKPreferencesRefPrivate.h:
483         * WebProcess/InjectedBundle/InjectedBundle.cpp:
484         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
485         (WebKit::InjectedBundle::setCSSAnimationTriggersEnabled):
486         * WebProcess/InjectedBundle/InjectedBundle.h:
487         * WebProcess/WebPage/WebPage.cpp:
488         (WebKit::WebPage::updatePreferences):
489
490 2015-03-16  Conrad Shultz  <conrad_shultz@apple.com>
491
492         Allow clients to selectively disable plug-ins
493         https://bugs.webkit.org/show_bug.cgi?id=142506
494
495         Reviewed by Anders Carlsson.
496
497         Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
498         from the page). As part of this:
499
500         1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
501            set of plug-ins.
502
503         2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
504            down the stack.
505
506         3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
507            a concrete implementation thereof in WebPlatformStrategies in WebKit2.
508
509         4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
510
511         While currently only used in a very limited manner, the new declarative plug-in policies are written generically
512         so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
513
514         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
515         (WebKit::NetscapePluginModule::getPluginInfo):
516         Set new PluginInfo members.
517
518         * Shared/WebCoreArgumentCoders.cpp:
519         (IPC::ArgumentCoder<PluginInfo>::encode):
520         Handle new PluginInfo members.
521         (IPC::ArgumentCoder<PluginInfo>::decode):
522         Ditto.
523
524         * Shared/WebProcessCreationParameters.h:
525         Declare a member to store client plug-in policies.
526
527         * Shared/WebProcessCreationParameters.cpp:
528         (WebKit::WebProcessCreationParameters::encode):
529         Encode the policies.
530         (WebKit::WebProcessCreationParameters::decode):
531         Decode the policies.
532
533         * UIProcess/API/C/WKAPICast.h:
534         (WebKit::toWKPluginLoadClientPolicy):
535         Teach how to cast between WebCore and WebKit2 policy definitions.
536         (WebKit::toPluginLoadClientPolicy):
537         Ditto.
538
539         * UIProcess/API/C/WKPluginLoadPolicy.h:
540         Declare WKPluginLoadClientPolicy, matching PluginLoadClientPolicy in WebCore.
541
542         * UIProcess/API/C/mac/WKContextPrivateMac.h:
543         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
544         (WKContextSetPluginLoadClientPolicy):
545         New function; wrap WebProcessPool::setPluginLoadClientPolicy().
546         (WKContextClearPluginClientPolicies):
547         New function; wrap WebProcessPool::clearPluginClientPolicies().
548
549         * UIProcess/WebProcessPool.h:
550         * UIProcess/WebProcessPool.cpp:
551         (WebKit::WebProcessPool::createNewWebProcess):
552         Copy any client plug-in policies to the new process' creation parameters.
553         (WebKit::WebProcessPool::setPluginLoadClientPolicy):
554         Send SetPluginLoadClientPolicy to all processes and stash the passed-in policy info.
555         (WebKit::WebProcessPool::clearPluginClientPolicies):
556         Send ClearPluginClientPolicies to all processes and clear any stashed policy info.
557
558         * WebProcess/Plugins/PDF/PDFPlugin.mm:
559         (WebKit::PDFPlugin::pluginInfo):
560         Set new PluginInfo member.
561
562         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
563         (WebKit::pluginSupportsExtension):
564         Adopt getWebVisibleMimesAndPluginIndices().
565         (WebKit::WebFrameLoaderClient::objectContentType):
566         Update to reflect reflect function rename.
567
568         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
569         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
570         (WebKit::WebPlatformStrategies::getPluginInfo):
571         Pass the Page to populatePluginCache().
572         (WebKit::WebPlatformStrategies::getWebVisiblePluginInfo):
573         New member function; wrap getPluginInfo(); if appropriate, filter out plug-ins the client has asked
574         to block on the current page.
575         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
576         New member function; map empty inputs to a wildcard character and insert the new policy into the nested map.
577         (WebKit::WebPlatformStrategies::clearPluginClientPolicies):
578         New member function; empty m_hostsToPluginIdentifierData.
579         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
580         New member function; look up the most specific policy for the given plug-in and host.
581         (WebKit::WebPlatformStrategies::populatePluginCache):
582         If appropriate, set the client load policy on the plug-ins; do this irrespective of whether the cache has
583         been populated since the Page, and therefore host, may change.
584
585         * WebProcess/WebPage/WebPage.cpp:
586         (WebKit::WebPage::canShowMIMEType):
587         Update to reflect function rename.
588
589         * WebProcess/WebProcess.h:
590         * WebProcess/WebProcess.cpp:
591         (WebKit::WebProcess::initializeWebProcess):
592         Enumerate and process the client plug-in policies in the creation parameters.
593         (WebKit::WebProcess::setPluginLoadClientPolicy):
594         New member function; wrap PluginStrategy::setPluginLoadClientPolicy.
595         (WebKit::WebProcess::clearPluginClientPolicies):
596         New member function; wrap PluginStrategy::clearPluginClientPolicies().
597
598         * WebProcess/WebProcess.messages.in:
599         Add messages for setting and clearing policies.
600
601 2015-03-16  Carlos Garcia Campos  <cgarcia@igalia.com>
602
603         Unreviewed. Add new Notification classes to GTK+ API documentation.
604
605         Add WebKitNotification and WebKitNotificationPermissionRequest to
606         the documentation and fix some other typos causing warnings when
607         generating HTML documentation.
608
609         * UIProcess/API/gtk/WebKitUserContent.cpp:
610         * UIProcess/API/gtk/WebKitWebView.cpp:
611         (webkit_web_view_class_init):
612         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
613
614 2015-03-16  Przemyslaw Piorkowski  <p.piorkowski@samsung.com>
615
616         [EFL][WK2] REGRESSION(r178526): test_ewk2_storage_manager has been failed for a long time
617         https://bugs.webkit.org/show_bug.cgi?id=141249
618
619         Reviewed by Gyuyoung Kim.
620
621         * PlatformEfl.cmake: Enable test_ewk2_storage_manager for EFL port - it is passing now.
622
623 2015-03-16  David Kilzer  <ddkilzer@apple.com>
624
625         [iOS] REGRESSION (r181511): Most layout tests crash with a NULL deref
626
627         Follow-up fix for:
628         [iOS] Presenting a modal sheet on top of a WKWebView causes it to lose focused, active state
629         <http://webkit.org/b/142702>
630
631         * UIProcess/ios/PageClientImplIOS.mm:
632         (WebKit::PageClientImpl::isViewWindowActive): Add NULL check for m_webView.
633         (WebKit::PageClientImpl::isViewFocused): Ditto.
634
635 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
636
637         Clean up related to wheelEvent names
638         https://bugs.webkit.org/show_bug.cgi?id=142713
639
640         Reviewed by Anders Carlsson.
641
642         Add EventNames::isWheelEventType() and use it in places that test for the
643         two wheel event names.
644
645         * WebProcess/Plugins/PluginView.cpp:
646         (WebKit::PluginView::handleEvent):
647
648 2015-03-15  Dan Bernstein  <mitz@apple.com>
649
650         [iOS] Presenting a modal sheet on top of a WKWebView causes it to lose focused, active state
651         https://bugs.webkit.org/show_bug.cgi?id=142702
652
653         Reviewed by Anders Carlsson.
654
655         * UIProcess/API/Cocoa/WKWebView.mm:
656         (-[WKWebView becomeFirstResponder]): Override to delegate first responder status to the
657         WKContentView if possible.
658         (-[WKWebView _retainActiveFocusedState]): New SPI that prevents view hierarchy changes from
659         affecting the active and focused state of the view. Increments a counter ivar and returns a
660         completion block (which callers must call when they’re done) that decrements it back.
661         * UIProcess/API/Cocoa/WKWebViewInternal.h: Declared new _activeFocusedStateRetainCount ivar
662         with @package access.
663         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new method.
664
665         * UIProcess/ios/PageClientImplIOS.mm:
666         (WebKit::PageClientImpl::isViewWindowActive): Return true if active/focused state is to be
667         maintained despite not being visible.
668         (WebKit::PageClientImpl::isViewFocused): Return true if active/focused state is to be
669         maintained despite not being active.
670
671         * UIProcess/ios/WKContentViewInteraction.mm:
672         (-[WKContentView resignFirstResponder]): Don’t blur the assisted node if active/focused
673         state is to be maintained.
674
675 2015-03-14  Simon Fraser  <simon.fraser@apple.com>
676
677         Clean up use of flags in localToContainer-type functions
678         https://bugs.webkit.org/show_bug.cgi?id=142704
679
680         Reviewed by Alexey Proskuryakov.
681         
682         Pass UseTransforms explicitly to localToContainerPoint()
683
684         * WebProcess/WebPage/ios/WebPageIOS.mm:
685         (WebKit::WebPage::getAssistedNodeInformation):
686
687 2015-03-14  Brent Fulgham  <bfulgham@apple.com>
688
689         [iOS] scroll snap points are animating to the wrong positions.
690         https://bugs.webkit.org/show_bug.cgi?id=142705
691         <rdar://problem/20136946>
692
693         Reviewed by Simon Fraser.
694
695         Scroll snapping was landing in the wrong place on iOS because of two problems:
696         (1) It was searching for the closest snap offset point using unscaled 'screen' pixels,
697         which caused it to always choose one of the earliest snap point options.
698         (2) It was then selecting a scaled snap point coordinate and passing it back to UIKit
699         to animate the snap. This caused it to select a target point beyond the 'screen' pixel
700         we want to hit.
701         
702         The solution to both problems are to scale the scroll destination UIKit suggests so that
703         we search among the scaled points with a valid value. Then, we need to scale the returned
704         value back to screen units before handing it back to UIKit to process.
705
706         * UIProcess/API/Cocoa/WKWebView.mm:
707         (-[WKWebView scrollViewWillBeginDragging:]): Drive-by fix. Get rid of extra ';' at
708         the end of the line.
709         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
710         (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling):
711
712 2015-03-14  Dean Jackson  <dino@apple.com>
713
714         Feature flag for Animations Level 2
715         https://bugs.webkit.org/show_bug.cgi?id=142699
716         <rdar://problem/20165097>
717
718         Reviewed by Brent Fulgham.
719
720         Add ENABLE_CSS_ANIMATIONS_LEVEL_2 and a runtime flag animationTriggersEnabled.
721
722         * Configurations/FeatureDefines.xcconfig:
723
724 2015-03-14  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
725
726         [GStreamer] share GL context in pipeline
727         https://bugs.webkit.org/show_bug.cgi?id=142693
728
729         Reviewed by Philippe Normand.
730
731         * WebProcess/gtk/WebProcessMainGtk.cpp: Enable XInitThreads() if
732         GSTREAMER_GL is used, since GstGL elements use another thread for
733         queuing GL operations.
734
735 2015-03-13  Alex Christensen  <achristensen@webkit.org>
736
737         Progress towards CMake on Mac.
738         https://bugs.webkit.org/show_bug.cgi?id=142680
739
740         Reviewed by Gyuyoung Kim.
741
742         * PlatformMac.cmake: Added.
743
744 2015-03-13  Commit Queue  <commit-queue@webkit.org>
745
746         Unreviewed, rolling out r181483.
747         https://bugs.webkit.org/show_bug.cgi?id=142688
748
749         Caused use-after-free on many tests (Requested by ap on
750         #webkit).
751
752         Reverted changeset:
753
754         "Allow clients to selectively disable plug-ins"
755         https://bugs.webkit.org/show_bug.cgi?id=142506
756         http://trac.webkit.org/changeset/181483
757
758 2015-03-13  Eric Carlson  <eric.carlson@apple.com>
759
760         [Mac] Enable WIRELESS_PLAYBACK_TARGET
761         https://bugs.webkit.org/show_bug.cgi?id=142635
762
763         Reviewed by Darin Adler.
764
765         * Configurations/FeatureDefines.xcconfig:
766
767 2015-03-13  Timothy Horton  <timothy_horton@apple.com>
768
769         Sites that use a device-width viewport but don't have enough height to fill the view are scaled up
770         https://bugs.webkit.org/show_bug.cgi?id=142664
771         <rdar://problem/18859470>
772
773         Reviewed by Benjamin Poulain.
774
775         * UIProcess/ios/WKScrollView.mm:
776         (-[WKScrollView _rubberBandOffsetForOffset:maxOffset:minOffset:range:outside:]):
777         Now that the WKContentView can (without pinching) be smaller than the unobscured
778         region of the WKWebView, we need to take that into account when deciding where
779         to retarget scrolling.
780
781 2015-03-13  Mark Lam  <mark.lam@apple.com>
782
783         Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
784         <https://webkit.org/b/142674>
785
786         Reviewed by Filip Pizlo.
787
788         * WebProcess/WebPage/EventDispatcher.cpp:
789         (WebKit::EventDispatcher::EventDispatcher):
790         * WebProcess/WebPage/EventDispatcher.h:
791         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
792         (WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
793         * WebProcess/WebPage/ViewUpdateDispatcher.h:
794
795 2015-03-10  Conrad Shultz  <conrad_shultz@apple.com>
796
797         Allow clients to selectively disable plug-ins
798         https://bugs.webkit.org/show_bug.cgi?id=142506
799
800         Reviewed by Anders Carlsson.
801
802         Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
803         from the page). As part of this:
804
805         1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
806            set of plug-ins.
807
808         2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
809            down the stack.
810
811         3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
812            a concrete implementation thereof in WebPlatformStrategies in WebKit2.
813
814         4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
815
816         While currently only used in a very limited manner, the new declarative plug-in policies are written generically
817         so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
818
819         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
820         (WebKit::NetscapePluginModule::getPluginInfo):
821         Set new PluginInfo members.
822
823         * Shared/WebCoreArgumentCoders.cpp:
824         (IPC::ArgumentCoder<PluginInfo>::encode):
825         Handle new PluginInfo members.
826         (IPC::ArgumentCoder<PluginInfo>::decode):
827         Ditto.
828
829         * Shared/WebProcessCreationParameters.h:
830         Declare a member to store client plug-in policies.
831
832         * Shared/WebProcessCreationParameters.cpp:
833         (WebKit::WebProcessCreationParameters::encode):
834         Encode the policies.
835         (WebKit::WebProcessCreationParameters::decode):
836         Decode the policies.
837
838         * UIProcess/API/C/WKAPICast.h:
839         (WebKit::toWKPluginLoadClientPolicy):
840         Teach how to cast between WebCore and WebKit2 policy definitions.
841         (WebKit::toPluginLoadClientPolicy):
842         Ditto.
843
844         * UIProcess/API/C/WKPluginLoadPolicy.h:
845         Declare WKPluginLoadClientPolicy, matching PluginLoadClientPolicy in WebCore.
846
847         * UIProcess/API/C/mac/WKContextPrivateMac.h:
848         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
849         (WKContextSetPluginLoadClientPolicy):
850         New function; wrap WebProcessPool::setPluginLoadClientPolicy().
851         (WKContextClearPluginClientPolicies):
852         New function; wrap WebProcessPool::clearPluginClientPolicies().
853
854         * UIProcess/WebProcessPool.h:
855         * UIProcess/WebProcessPool.cpp:
856         (WebKit::WebProcessPool::createNewWebProcess):
857         Copy any client plug-in policies to the new process' creation parameters.
858         (WebKit::WebProcessPool::setPluginLoadClientPolicy):
859         Send SetPluginLoadClientPolicy to all processes and stash the passed-in policy info.
860         (WebKit::WebProcessPool::clearPluginClientPolicies):
861         Send ClearPluginClientPolicies to all processes and clear any stashed policy info.
862
863         * WebProcess/Plugins/PDF/PDFPlugin.mm:
864         (WebKit::PDFPlugin::pluginInfo):
865         Set new PluginInfo member.
866
867         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
868         (WebKit::pluginSupportsExtension):
869         Adopt getWebVisibleMimesAndPluginIndices().
870         (WebKit::WebFrameLoaderClient::objectContentType):
871         Update to reflect reflect function rename.
872
873         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
874         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
875         (WebKit::WebPlatformStrategies::getPluginInfo):
876         Pass the Page to populatePluginCache().
877         (WebKit::WebPlatformStrategies::getWebVisiblePluginInfo):
878         New member function; wrap getPluginInfo(); if appropriate, filter out plug-ins the client has asked
879         to block on the current page.
880         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
881         New member function; map empty inputs to a wildcard character and insert the new policy into the nested map.
882         (WebKit::WebPlatformStrategies::clearPluginClientPolicies):
883         New member function; empty m_hostsToPluginIdentifierData.
884         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
885         New member function; look up the most specific policy for the given plug-in and host.
886         (WebKit::WebPlatformStrategies::populatePluginCache):
887         If appropriate, set the client load policy on the plug-ins; do this irrespective of whether the cache has
888         been populated since the Page, and therefore host, may change.
889
890         * WebProcess/WebPage/WebPage.cpp:
891         (WebKit::WebPage::canShowMIMEType):
892         Update to reflect function rename.
893
894         * WebProcess/WebProcess.h:
895         * WebProcess/WebProcess.cpp:
896         (WebKit::WebProcess::initializeWebProcess):
897         Enumerate and process the client plug-in policies in the creation parameters.
898         (WebKit::WebProcess::setPluginLoadClientPolicy):
899         New member function; wrap PluginStrategy::setPluginLoadClientPolicy.
900         (WebKit::WebProcess::clearPluginClientPolicies):
901         New member function; wrap PluginStrategy::clearPluginClientPolicies().
902
903         * WebProcess/WebProcess.messages.in:
904         Add messages for setting and clearing policies.
905
906 2015-03-12  Jon Honeycutt  <jhoneycutt@apple.com>
907
908         Use UIDocumentMenuViewController to allow selection of files from
909         iCloud Drive in WKFileUploadPanel
910
911         Part of <https://bugs.webkit.org/show_bug.cgi?id=142596> WebKit on
912         iOS should support file upload from iCloud Drive
913         <rdar://problem/12178991>
914
915         Reviewed by Andy Estes.
916
917         * Platform/spi/ios/UIKitSPI.h:
918         Include UIDocumentMenuViewController_Private.h if it exists. If not,
919         declare this new SPI.
920
921         * UIProcess/ios/forms/WKFileUploadPanel.mm:
922         (fallbackIconForFile):
923         Create a UIDocumentInteractionController for the file, and return a
924         thumbnail image from its smallest icon.
925
926         (iconForImageFile):
927         If we can get a UIImage from the file, create a thumbnail from it.
928         Otherwise, call fallbackIconForFile().
929
930         (iconForVideoFile):
931         Code moved from -[_WKVideoFileUploadItem displayImage].
932
933         (iconForFile):
934         Get the file's extension, and get the extension's preferred UTI. If the
935         UTI is an image type, call iconForImageFile(). If it's a video type,
936         call iconForVideoFile(). Otherwise, return the fallback icon.
937
938         (-[_WKFileUploadItem initWithFileURL:]):
939         Added an initializer that takes a file URL.
940
941         (-[_WKFileUploadItem fileURL]):
942         (-[_WKImageFileUploadItem initWithFileURL:originalImage:]):
943         (-[_WKVideoFileUploadItem displayImage]):
944         (WKFileUploadPanel):
945         Inherit from UIDocumentPickerDelegate and UIDocumentMenuDelegate. Add
946         an ivar for the document menu controller.
947
948         (-[WKFileUploadPanel dealloc]):
949         (-[WKFileUploadPanel presentWithParameters:resultListener:]):
950         If instances of UIDocumentMenuViewController respond to
951         -_setIgnoreApplicationEntitlementForImport:, meaning we can disable the
952         assertion that the current app has the iCloud Documents entitlement,
953         then show the document picker menu. Otherwise, show the current source
954         selection UI. The runtime check will be removed when a newer UIKit is
955         available.
956
957         (UTIsForMIMETypes):
958         Return the UTIs for the <input> element's "accept" attribute's MIME
959         type list.
960
961         (-[WKFileUploadPanel _mediaTypesForPickerSourceType:]):
962         Call UTIsForMIMETypes(). Fall back to available source types for this
963         picker type.
964
965         (-[WKFileUploadPanel _documentPickerMenuMediaTypes]):
966         Call UTIsForMIMETypes(). Fall back to the all-encompassing
967         "public.item" UTI.
968
969         (-[WKFileUploadPanel _photoLibraryButtonLabel]):
970         (-[WKFileUploadPanel _cameraButtonLabel]):
971         Factored out of -_showMediaSourceSelectionSheet. Return the
972         appropriate label for the camera button, based on whether it can take a
973         photo or video, or return nil if the camera is not available.
974
975         (-[WKFileUploadPanel _showMediaSourceSelectionSheet]):
976         Changed to use -_cameraButtonLabel and
977         -_presentForCurrentInterfaceIdiom:.
978
979         (-[WKFileUploadPanel _showDocumentPickerMenu]):
980         Create a UIDocumentMenuViewController, and populate it with options to
981         open the photo library or take a picture or video. If iCloud Drive or
982         other document sources are available, they will be added automatically.
983
984         (-[WKFileUploadPanel _presentForCurrentInterfaceIdiom:]):
985         (-[WKFileUploadPanel documentMenu:didPickDocumentPicker:]):
986         (-[WKFileUploadPanel documentMenuWasCancelled:]):
987         (-[WKFileUploadPanel documentPicker:didPickDocumentAtURL:]):
988         (-[WKFileUploadPanel documentPickerWasCancelled:]):
989         (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
990
991         (-[_WKImageFileUploadItem initWithFilePath:originalImage:]): Deleted.
992         (-[_WKImageFileUploadItem fileURL]): Deleted.
993         (-[_WKVideoFileUploadItem initWithFilePath:mediaURL:]): Deleted.
994         (-[_WKVideoFileUploadItem fileURL]): Deleted.
995
996 2015-03-11  Enrica Casucci  <enrica@apple.com>
997
998         Adopt new API for keyboard event handling.
999         https://bugs.webkit.org/show_bug.cgi?id=142602
1000         rdar://problem/19966087
1001
1002         Reviewed by Sam Weinig.
1003
1004         Adopts the new API.
1005
1006         * UIProcess/ios/WKContentViewInteraction.mm:
1007         (-[WKContentView _didHandleKeyEvent:]):
1008
1009 2015-03-12  Alexey Proskuryakov  <ap@apple.com>
1010
1011         testRunner.setAlwaysAcceptCookies does not work with NetworkProcess
1012         https://bugs.webkit.org/show_bug.cgi?id=138687
1013
1014         Reviewed by Carlos Garcia Campos.
1015
1016         * UIProcess/WebCookieManagerProxy.cpp:
1017         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): Don't change system-wide
1018         cookie accept policy when in testing mode. Also, update the policy in WebProcesses too,
1019         as we still do some networking there.
1020
1021         * UIProcess/WebProcessPool.h:
1022         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1023         (WKBundleSetAlwaysAcceptCookies): Deleted.
1024         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1025         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1026         (WebKit::InjectedBundle::setAlwaysAcceptCookies): Deleted.
1027         * WebProcess/InjectedBundle/InjectedBundle.h:
1028         Remove WKBundleSetAlwaysAcceptCookies SPI, as WKTR now uses an API in UI process.
1029
1030 2015-03-12  Anders Carlsson  <andersca@apple.com>
1031
1032         WKErrorDomain should be declared nonnull
1033         https://bugs.webkit.org/show_bug.cgi?id=142628
1034
1035         Reviewed by Antti Koivisto.
1036
1037         Add WK_ASSUME_NONNULL_BEGIN and WK_ASSUME_NONNULL_END so everything will be implicitly nonnull.
1038
1039         * UIProcess/API/Cocoa/WKError.h:
1040
1041 2015-03-12  Ian Henderson  <ian@ianhenderson.org>
1042
1043         PDFs don't snapshot properly in iOS Safari
1044         https://bugs.webkit.org/show_bug.cgi?id=142623
1045
1046         Reviewed by Tim Horton.
1047
1048         * UIProcess/API/Cocoa/WKWebView.mm:
1049         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
1050         If we have a _customContentView, use UIView snapshotting instead of
1051         trying to snapshot the web page.
1052
1053 2015-03-12  Eric Carlson  <eric.carlson@apple.com>
1054
1055         [Mac] Update AirPlay handling
1056         https://bugs.webkit.org/show_bug.cgi?id=142541
1057
1058         Unreviewed, respond to post-review comments and add previously reviewed changes
1059         missed by a bungled merge.
1060
1061         * Shared/mac/WebCoreArgumentCodersMac.mm:
1062         * UIProcess/WebMediaPlaybackTargetPickerProxy.cpp:
1063         (WebKit::WebMediaPlaybackTargetPickerProxy::~WebMediaPlaybackTargetPickerProxy):
1064         * UIProcess/mac/PageClientImpl.h:
1065         * UIProcess/mac/PageClientImpl.mm:
1066         (WebKit::PageClientImpl::createPlaybackTargetPicker):
1067         * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h: Added.
1068         * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm: Added.
1069         * WebKit2.xcodeproj/project.pbxproj:
1070         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1071         * WebProcess/WebCoreSupport/WebChromeClient.h:
1072         * WebProcess/WebPage/WebPage.h:
1073         * WebProcess/WebPage/WebPage.messages.in:
1074         * WebProcess/WebPage/mac/WebPageMac.mm:
1075         * WebProcess/com.apple.WebProcess.sb.in:
1076
1077 2015-03-11  Antti Koivisto  <antti@apple.com>
1078
1079         Cache traversal missing large entries
1080         https://bugs.webkit.org/show_bug.cgi?id=142601
1081
1082         Reviewed by Andreas Kling.
1083
1084         When traversing cache entries we only read the header data from disk. This didn't work
1085         correctly for entries larger than the read size.
1086
1087         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
1088         (WebKit::NetworkCache::IOChannel::read):
1089
1090             Partial reads only receive one callback with 'done' set to true.
1091             Ensure we actually return data in this case.
1092
1093         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1094         (WebKit::NetworkCache::decodeEntryHeader):
1095
1096             Add some logging.
1097
1098 2015-03-11  Eric Carlson  <eric.carlson@apple.com>
1099
1100         [Mac] Update AirPlay handling
1101         https://bugs.webkit.org/show_bug.cgi?id=142541
1102
1103         Reviewed by Sam Weinig.
1104
1105         * Shared/WebCoreArgumentCoders.h:
1106         * Shared/mac/WebCoreArgumentCodersMac.mm:
1107         (IPC::ArgumentCoder<AVPlaybackTarget>::encode):
1108         (IPC::ArgumentCoder<AVPlaybackTarget>::decode):
1109         * UIProcess/PageClient.h:
1110         * UIProcess/WebAVPlaybackTargetPickerProxy.cpp: Added.
1111         (WebKit::WebAVPlaybackTargetPickerProxy::WebAVPlaybackTargetPickerProxy):
1112         (WebKit::WebAVPlaybackTargetPickerProxy::~WebAVPlaybackTargetPickerProxy):
1113         (WebKit::WebAVPlaybackTargetPickerProxy::showPlaybackTargetPicker):
1114         (WebKit::WebAVPlaybackTargetPickerProxy::startingMonitoringPlaybackTargets):
1115         (WebKit::WebAVPlaybackTargetPickerProxy::stopMonitoringPlaybackTargets):
1116         * UIProcess/WebAVPlaybackTargetPickerProxy.h: Added.
1117         (WebKit::WebAVPlaybackTargetPickerProxy::Client::~Client):
1118         * UIProcess/WebPageProxy.cpp:
1119         (WebKit::WebPageProxy::devicePickerProxy):
1120         (WebKit::WebPageProxy::showPlaybackTargetPicker):
1121         (WebKit::WebPageProxy::startingMonitoringPlaybackTargets):
1122         (WebKit::WebPageProxy::stopMonitoringPlaybackTargets):
1123         (WebKit::WebPageProxy::didChoosePlaybackTarget):
1124         (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
1125         * UIProcess/WebPageProxy.h:
1126         * UIProcess/WebPageProxy.messages.in:
1127         * UIProcess/mac/PageClientImpl.h:
1128         * UIProcess/mac/PageClientImpl.mm:
1129         (WebKit::PageClientImpl::createPlaybackTargetPicker):
1130         * UIProcess/mac/WebAVPlaybackTargetPickerProxyMac.h: Added.
1131         * UIProcess/mac/WebAVPlaybackTargetPickerProxyMac.mm: Added.
1132         (WebKit::WebAVPlaybackTargetPickerProxyMac::create):
1133         (WebKit::WebAVPlaybackTargetPickerProxyMac::WebAVPlaybackTargetPickerProxyMac):
1134         (WebKit::WebAVPlaybackTargetPickerProxyMac::~WebAVPlaybackTargetPickerProxyMac):
1135         (WebKit::WebAVPlaybackTargetPickerProxyMac::outputeDeviceAvailabilityChangedTimerFired):
1136         (WebKit::WebAVPlaybackTargetPickerProxyMac::availableDevicesDidChange):
1137         (WebKit::WebAVPlaybackTargetPickerProxyMac::devicePicker):
1138         (WebKit::WebAVPlaybackTargetPickerProxyMac::showPlaybackTargetPicker):
1139         (WebKit::WebAVPlaybackTargetPickerProxyMac::currentDeviceDidChange):
1140         (WebKit::WebAVPlaybackTargetPickerProxyMac::startingMonitoringPlaybackTargets):
1141         (WebKit::WebAVPlaybackTargetPickerProxyMac::stopMonitoringPlaybackTargets):
1142         (-[WebAVOutputDevicePickerMenuControllerHelper initWithCallback:]):
1143         (-[WebAVOutputDevicePickerMenuControllerHelper clearCallback]):
1144         (-[WebAVOutputDevicePickerMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]):
1145         * WebKit2.xcodeproj/project.pbxproj:
1146         * WebProcess/WebCoreSupport/WebAVPlaybackTargetPicker.cpp: Added.
1147         (WebKit::WebAVPlaybackTargetPicker::WebAVPlaybackTargetPicker):
1148         (WebKit::WebAVPlaybackTargetPicker::showPlaybackDevicePicker):
1149         (WebKit::WebAVPlaybackTargetPicker::configureWireLessTargetMonitoring):
1150         (WebKit::WebAVPlaybackTargetPicker::addClient):
1151         (WebKit::WebAVPlaybackTargetPicker::removeClient):
1152         (WebKit::WebAVPlaybackTargetPicker::didChoosePlaybackTarget):
1153         (WebKit::WebAVPlaybackTargetPicker::playbackTargetAvailabilityDidChange):
1154         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1155         (WebKit::WebChromeClient::showPlaybackTargetPicker):
1156         (WebKit::WebChromeClient::startingMonitoringPlaybackTargets):
1157         (WebKit::WebChromeClient::stopMonitoringPlaybackTargets):
1158         * WebProcess/WebCoreSupport/WebChromeClient.h:
1159         * WebProcess/WebPage/WebPage.h:
1160         * WebProcess/WebPage/WebPage.messages.in:
1161         * WebProcess/WebPage/mac/WebPageMac.mm:
1162         (WebKit::WebPage::playbackTargetSelected):
1163         (WebKit::WebPage::playbackTargetAvailabilityDidChange):
1164         * WebProcess/com.apple.WebProcess.sb.in:
1165
1166 2015-03-11  Myles C. Maxfield  <mmaxfield@apple.com>
1167
1168         Fix the build
1169
1170         Unreviewed.
1171
1172         * Shared/Downloads/mac/DownloadMac.mm:
1173         (WebKit::Download::start):
1174         (WebKit::Download::resume):
1175
1176 2015-03-10  Sam Weinig  <sam@webkit.org>
1177
1178         Allow adding a button in input elements for auto fill related functionality
1179         <rdar://problem/19782066>
1180         https://bugs.webkit.org/show_bug.cgi?id=142564
1181
1182         Reviewed by Anders Carlsson.
1183
1184         - Adds new SPI to respond to clicks on the AutoFill button (both bundle and UIProcess).
1185         - Adds new SPI to enable/disable the display of the AutoFill button on an element.
1186         - Adds new SPI to get the bounds of the AutoFill button.
1187         - Updates spelling of AutoFill to be consistent.
1188
1189         * UIProcess/API/APIUIClient.h:
1190         (API::UIClient::didClickAutoFillButton):
1191         * UIProcess/API/C/WKPage.cpp:
1192         (WKPageSetPageUIClient):
1193         * UIProcess/API/C/WKPageUIClient.h:
1194         * UIProcess/WebPageProxy.cpp:
1195         (WebKit::WebPageProxy::handleAutoFillButtonClick):
1196         * UIProcess/WebPageProxy.h:
1197         * UIProcess/WebPageProxy.messages.in:
1198         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
1199         (API::InjectedBundle::PageUIClient::didClickAutoFillButton):
1200         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1201         (WebKit::InjectedBundlePageUIClient::didClickAutoFillButton):
1202         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
1203         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1204         (WebKit::WebChromeClient::handleAutoFillButtonClick):
1205         * WebProcess/WebCoreSupport/WebChromeClient.h:
1206         * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
1207         Pipe the didClickAutoFillButton to the SPI layer.
1208
1209         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
1210         (-[WKWebProcessPlugInNodeHandle HTMLInputElementIsAutoFilled]):
1211         (-[WKWebProcessPlugInNodeHandle setHTMLInputElementIsAutoFilled:]):
1212         Update for new spelling of AutoFill.
1213
1214         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
1215         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
1216         (WKBundleNodeHandleGetHTMLInputElementAutoFilled):
1217         (WKBundleNodeHandleSetHTMLInputElementAutoFilled):
1218         Added. Replaces WKBundleNodeHandleGetHTMLInputElementAutofilled/WKBundleNodeHandleSetHTMLInputElementAutofilled
1219         which are now deprecated due to inconsistent spelling of AutoFill.
1220
1221         (WKBundleNodeHandleGetHTMLInputElementAutoFillButtonEnabled):
1222         (WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabled):
1223         (WKBundleNodeHandleGetHTMLInputElementAutoFillButtonBounds):
1224         Added.
1225
1226         (WKBundleNodeHandleGetHTMLInputElementAutofilled):
1227         (WKBundleNodeHandleSetHTMLInputElementAutofilled):
1228         Deprecated.
1229
1230         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1231         (WebKit::InjectedBundleNodeHandle::getOrCreate):
1232         (WebKit::InjectedBundleNodeHandle::create):
1233         (WebKit::InjectedBundleNodeHandle::InjectedBundleNodeHandle):
1234         (WebKit::InjectedBundleNodeHandle::~InjectedBundleNodeHandle):
1235         (WebKit::InjectedBundleNodeHandle::coreNode):
1236         (WebKit::InjectedBundleNodeHandle::document):
1237         (WebKit::InjectedBundleNodeHandle::elementBounds):
1238         (WebKit::InjectedBundleNodeHandle::renderRect):
1239         (WebKit::InjectedBundleNodeHandle::renderedImage):
1240         (WebKit::InjectedBundleNodeHandle::visibleRange):
1241         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
1242         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFilled):
1243         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFilled):
1244         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFillButtonEnabled):
1245         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFillButtonEnabled):
1246         (WebKit::InjectedBundleNodeHandle::htmlInputElementAutoFillButtonBounds):
1247         (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
1248         (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
1249         (WebKit::InjectedBundleNodeHandle::isTextField):
1250         (WebKit::InjectedBundleNodeHandle::htmlTableCellElementCellAbove):
1251         (WebKit::InjectedBundleNodeHandle::documentFrame):
1252         (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
1253         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
1254         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled): Deleted.
1255         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled): Deleted.
1256         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
1257         Fix-up InjectedBundleNodeHandle to store its underlying Node in a Ref, rather than a RefPtr.
1258         Add helpers to implement the new SPI for WKBundleNodeHandleRef.
1259
1260 2015-03-11  Timothy Horton  <timothy_horton@apple.com>
1261
1262         Make it possible to zoom on pages that claim to lay out to device size and then fail to do so
1263         https://bugs.webkit.org/show_bug.cgi?id=142549
1264
1265         Reviewed by Simon Fraser.
1266
1267         * Shared/WebPreferencesDefinitions.h:
1268         * WebProcess/WebPage/WebPage.cpp:
1269         (WebKit::WebPage::updatePreferences):
1270         Flip the pref on by default.
1271
1272 2015-03-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1273
1274         [GTK] Do not look for child processes in the UI process binary path
1275         https://bugs.webkit.org/show_bug.cgi?id=135752
1276
1277         Reviewed by Gustavo Noronha Silva.
1278
1279         It's only useful for internal tools and tests, but never when
1280         installed, since we don't install the processes in the bin dir but
1281         in the libexec dir.
1282
1283         * Shared/gtk/ProcessExecutablePathGtk.cpp:
1284         (WebKit::findWebKitProcess): Only look or the executables in the
1285         UI process binary path or WEBKIT_EXEC_PATH for development builds.
1286         * UIProcess/API/gtk/WebKitWebContext.cpp:
1287         (injectedBundleDirectory): Only check
1288         WEBKIT_INJECTED_BUNDLE_PATH env var for development builds.
1289
1290 2015-03-10  Antti Koivisto  <antti@apple.com>
1291
1292         Add interface to delete disk cache entries
1293         https://bugs.webkit.org/show_bug.cgi?id=142546
1294
1295         Reviewed by Anders Carlsson.
1296
1297         * NetworkProcess/cache/NetworkCache.cpp:
1298         (WebKit::NetworkCache::Cache::remove):
1299         * NetworkProcess/cache/NetworkCache.h:
1300         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1301         (WebKit::NetworkCache::Storage::Storage):
1302         (WebKit::NetworkCache::Storage::remove):
1303
1304             Move deletion to a serial queue so we can't create large number of threads.
1305
1306         (WebKit::NetworkCache::Storage::dispatchReadOperation):
1307         (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
1308         (WebKit::NetworkCache::Storage::removeEntry): Deleted.
1309         * NetworkProcess/cache/NetworkCacheStorage.h:
1310         (WebKit::NetworkCache::Storage::deleteQueue):
1311
1312 2015-03-10  Chris Dumez  <cdumez@apple.com>
1313
1314         5 tests fail on Apple Mac WK2 performance bots
1315         https://bugs.webkit.org/show_bug.cgi?id=142485
1316
1317         Reviewed by Andreas Kling.
1318
1319         Only log errors in debug builds if SandboxExtension::createHandle() fails
1320         so that performance tests don't fail because of it. Such error is not
1321         fatal and is expected under certain circumstances. In particular,
1322         SandboxExtension::createHandle() is sometimes called for non-existing
1323         files (e.g. from NetworkResourceLoadParameters::encode()).
1324
1325         * Shared/mac/SandboxExtensionMac.mm:
1326         (WebKit::SandboxExtension::createHandle):
1327
1328 2015-03-10  Timothy Horton  <timothy_horton@apple.com>
1329
1330         Fix the build
1331
1332         * Shared/Downloads/ios/DownloadIOS.mm:
1333         (WebKit::Download::startWithHandle):
1334         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
1335         (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:connection:]):
1336
1337 2015-03-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1338
1339         [GTK] Contents not shown when entering AC mode unless the window is resized
1340         https://bugs.webkit.org/show_bug.cgi?id=142347
1341
1342         Reviewed by Žan Doberšek.
1343
1344         The problem is once again that we are now creating the redirected
1345         X window in realize method. When entering AC mode we resize the
1346         redirected window to the drawing area size. Since the size hasn't
1347         changed from the drawing area point of view, the web process is
1348         not notified. The WebProcess always uses the window size, instead
1349         of the root layer size, to make sure it's in sync, see the comment
1350         in LayerTreeHostGtk::compositeLayersToContext(). So, we need to
1351         enforce a resize when we change the size of the redirected window
1352         when entering AC mode.
1353
1354         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1355         (webkitWebViewBaseEnterAcceleratedCompositingMode):
1356         * UIProcess/DrawingAreaProxyImpl.h:
1357         (WebKit::DrawingAreaProxyImpl::forceResize):
1358
1359 2015-03-10  Csaba Osztrogonác  <ossy@webkit.org>
1360
1361         [cmake] Handle unused parameter warnings as build errors except in WebKit2
1362         https://bugs.webkit.org/show_bug.cgi?id=142338
1363
1364         Reviewed by Gyuyoung Kim.
1365
1366         * CMakeLists.txt:
1367
1368 2015-03-10  Dan Bernstein  <mitz@apple.com>
1369
1370         WebKit2 part of <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
1371         https://bugs.webkit.org/show_bug.cgi?id=142461
1372
1373         Reviewed by Sam Weinig.
1374
1375         * UIProcess/API/Cocoa/WKWebView.mm:
1376         (-[WKWebView initWithFrame:configuration:]): Initialize
1377         webPageConfiguration.treatsSHA1SignedCertificatesAsInsecure from the WKWebViewConfiguration.
1378
1379         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1380         Added _treatsSHA1SignedCertificatesAsInsecure ivar.
1381         (-[WKWebViewConfiguration copyWithZone:]): Copy _treatsSHA1SignedCertificatesAsInsecure.
1382         (-[WKWebViewConfiguration _treatsSHA1SignedCertificatesAsInsecure]): Added this getter.
1383         (-[WKWebViewConfiguration _setTreatsSHA1SignedCertificatesAsInsecure:]): Added this setter.
1384
1385         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declared new
1386         _treatsSHA1SignedCertificatesAsInsecure property.
1387
1388         * UIProcess/PageLoadState.cpp:
1389         (WebKit::PageLoadState::didCommitLoad): Use new hasInsecureContent parameter to initialize
1390         hasInsecureContent parameter in the uncommitted state.
1391         * UIProcess/PageLoadState.h:
1392
1393         * UIProcess/WebPageProxy.cpp:
1394         (WebKit::WebPageProxy::WebPageProxy): Initialize new m_treatsSHA1CertificatesAsInsecure
1395         member variable from the WebPageConfiguration.
1396         (WebKit::WebPageProxy::didCommitLoadForFrame): Pass true for the new hasInsecureContent to
1397         PageLoadState::didCommitLoad if we are treating SHA1-signed certificates as insecure and
1398         the certificate info contains a non-root SHA1-signed certificate.
1399         * UIProcess/WebPageProxy.h: Added m_treatsSHA1CertificatesAsInsecure member variable.
1400
1401 2015-03-09  Geoffrey Garen  <ggaren@apple.com>
1402
1403         bmalloc: tryFastMalloc shouldn't crash
1404         https://bugs.webkit.org/show_bug.cgi?id=142443
1405
1406         Reviewed by Anders Carlsson.
1407
1408         Part 1: Stop using tryFastRealloc.
1409
1410         * Shared/ShareableBitmap.cpp:
1411         (WebKit::ShareableBitmap::resize): Deleted.
1412         * Shared/ShareableBitmap.h: Removed the resize function because it has
1413         no clients.
1414
1415         * WebProcess/Plugins/PluginProxy.cpp:
1416         (WebKit::PluginProxy::updateBackingStore): Changed to allocate a new
1417         backing store instead of resizing the old one. This has three advantages:
1418
1419         (1) Might be more memory-efficient, since you don't have to keep the old
1420         one around while allocating the new one.
1421
1422         (2) Avoids the overhead of realloc() copying the contents of the old
1423         backing store even though we only want uninitialized memory.
1424
1425         (3) Makes resize failure consistent with initial allocation failure.
1426         Previously, while initial allocation failure would set the backing store
1427         to null, resize failure would keep the old wrong backing store and then
1428         tell it not to paint. Now, resize failure also sets the backing store to
1429         null.
1430
1431 2015-03-09  Martin Robinson  <mrobinson@igalia.com>
1432
1433         [EFL] Move DispatchQueue to WTF
1434         https://bugs.webkit.org/show_bug.cgi?id=142493
1435
1436         Reviewed by Csaba Osztrogonác.
1437
1438         * PlatformEfl.cmake: Remove DispatchQueue from the source list.
1439
1440 2015-03-08  Dean Jackson  <dino@apple.com>
1441
1442         [iOS Media] Video buffer progress missing on iPhones
1443         https://bugs.webkit.org/show_bug.cgi?id=142462
1444
1445         Reviewed by Eric Carlson.
1446
1447         Coordinate the SetBufferedTime message between the Web and UI
1448         processes.
1449
1450         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: New message SetBufferedTime.
1451         * WebProcess/ios/WebVideoFullscreenManager.h:
1452         * WebProcess/ios/WebVideoFullscreenManager.mm:
1453         (WebKit::WebVideoFullscreenManager::setBufferedTime):
1454
1455 2015-03-08  Sam Weinig  <sam@webkit.org>
1456
1457         [Content Extensions] Add scaffolding for the WKUserContentExtensionStore
1458         https://bugs.webkit.org/show_bug.cgi?id=142464
1459
1460         Reviewed by Dan Bernstein.
1461
1462         * Shared/API/APIObject.h:
1463         Add a UserContentExtensionStore type and move the UserContentExtension type into the correct section (UIProcess).
1464
1465         * Shared/API/c/WKBase.h:
1466         Add the WKUserContentExtensionStoreRef C-SPI type.
1467
1468         * Shared/Cocoa/APIObject.mm:
1469         (API::Object::newObject):
1470         Add allocation support for UserContentExtensionStore (and UserContentExtension while we are there, it will be
1471         needed shortly).
1472
1473         * UIProcess/API/APIUserContentExtensionStore.cpp: Added.
1474         (API::UserContentExtensionStore::UserContentExtensionStore):
1475         (API::UserContentExtensionStore::~UserContentExtensionStore):
1476         * UIProcess/API/APIUserContentExtensionStore.h: Added.
1477         Stub out the UserContentExtensionStore.
1478
1479         * UIProcess/API/C/WKAPICast.h:
1480         Add casting for the UserContentExtensionStore.
1481
1482         * UIProcess/API/C/WKUserContentExtensionStoreRef.cpp: Added.
1483         (WKUserContentExtensionStoreGetTypeID):
1484         * UIProcess/API/C/WKUserContentExtensionStoreRef.h: Added.
1485         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h: Added.
1486         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm: Added.
1487         (-[_WKUserContentExtensionStore init]):
1488         (-[_WKUserContentExtensionStore dealloc]):
1489         (-[_WKUserContentExtensionStore _apiObject]):
1490         * UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h: Added.
1491         (WebKit::wrapper):
1492         Stub out SPI for the UserContentExtensionStore.
1493
1494         * WebKit2.xcodeproj/project.pbxproj:
1495         * CMakeLists.txt:
1496         Add new files.
1497
1498 2015-03-08  Sam Weinig  <sam@webkit.org>
1499
1500         AX: Expose a frame's accessible name through WK2 C SPI
1501         <rdar://problem/19653068>
1502         https://bugs.webkit.org/show_bug.cgi?id=142468
1503
1504         Reviewed by Dan Bernstein.
1505
1506         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1507         (WKBundleFrameSetAccessibleName):
1508         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
1509         * WebProcess/WebPage/WebFrame.cpp:
1510         (WebKit::WebFrame::setAccessibleName):
1511         * WebProcess/WebPage/WebFrame.h:
1512         Add SPI to set a frame's accessible name. This matches the Legacy WebKit SPI -[WebFrame setAccessibleName:]. 
1513
1514 2015-03-08  Sam Weinig  <sam@webkit.org>
1515
1516         [Content Extensions] Pass compiled content extensions as read-only shared memory rather than copying them
1517         https://bugs.webkit.org/show_bug.cgi?id=142458
1518
1519         Reviewed by Dan Bernstein.
1520
1521         * Shared/WebCompiledContentExtensionData.cpp:
1522         (WebKit::WebCompiledContentExtensionData::encode):
1523         (WebKit::WebCompiledContentExtensionData::decode):
1524         * Shared/WebCompiledContentExtensionData.h:
1525         (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
1526         Store the compiled data as a SharedMemory block with offset/size pairs for the
1527         bytecode and actions. While the bytecode offset is currently always 0, this won't
1528         be the case when we map these in from files due to metadata that will be placed
1529         at the top of the files.
1530
1531         * Shared/WebCompiledContentExtension.h:
1532         * Shared/WebCompiledContentExtension.cpp:
1533         (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
1534         Temporary creation helper. In subsequent patches, this will be removed and replaced
1535         by always passing in shared/mapped data.
1536
1537         (WebKit::WebCompiledContentExtension::create):
1538         (WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
1539         (WebKit::WebCompiledContentExtension::bytecode):
1540         (WebKit::WebCompiledContentExtension::bytecodeLength):
1541         (WebKit::WebCompiledContentExtension::actions):
1542         (WebKit::WebCompiledContentExtension::actionsLength):
1543         Convert to work with the new WebCompiledContentExtension format.
1544         
1545         * UIProcess/API/C/WKUserContentFilterRef.cpp:
1546         (WKUserContentFilterCreate):
1547         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
1548         (-[_WKUserContentFilter initWithName:serializedRules:]):
1549         Switch to using WebCompiledContentExtension::createFromCompiledContentExtensionData().
1550
1551         * WebProcess/UserContent/WebUserContentController.cpp:
1552         (WebKit::WebUserContentController::addUserContentExtensions):
1553         * WebProcess/WebPage/WebPageGroupProxy.cpp:
1554         (WebKit::WebPageGroupProxy::addUserContentExtension):
1555         Update to pass the WebCompiledContentExtensionData directly to the WebCompiledContentExtension.
1556
1557 2015-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1558
1559         Remove willDestroyFrame in WKBundlePageLoaderClient
1560         https://bugs.webkit.org/show_bug.cgi?id=142389
1561
1562         Reviewed by Anders Carlsson.
1563
1564         I added willDestroyFrame in r154540 but I realized recently that
1565         it has never actually worked. Adding the callback to
1566         WKBundlePageLoaderClient was the first mistake, since frames are
1567         handled by WebProcess and DidDestroyFrame message is indeed a
1568         WebProcessProxy not a WebPageProxy one. Second mistake was calling
1569         the callback from WebFrameLoaderClient::frameLoaderDestroyed(),
1570         since at that point the frame has already been detached from the
1571         page and so WebFrame::page() always returns nullptr. So, this in
1572         fact dead code and since r180211 nobody is using it.
1573
1574         * WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
1575         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1576         (webkitWebPageCreate): Use verion 6 instead of version 7 of loader client.
1577         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1578         (WebKit::InjectedBundlePageLoaderClient::willDestroyFrame): Deleted.
1579         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1580         (WebKit::WebFrameLoaderClient::frameLoaderDestroyed):
1581
1582 2015-03-06  Sam Weinig  <sam@webkit.org>
1583
1584         [Content Extensions] Move compiling of content extensions to the UIProcess
1585         https://bugs.webkit.org/show_bug.cgi?id=142402
1586
1587         Reviewed by Benjamin Poulain.
1588
1589         * Shared/API/APIObject.h:
1590         Rename UserContentFilter type to UserContentExtension to match new unified naming.
1591
1592         * Shared/WebCompiledContentExtension.cpp: Added.
1593         (WebKit::WebCompiledContentExtension::create):
1594         (WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
1595         (WebKit::WebCompiledContentExtension::~WebCompiledContentExtension):
1596         (WebKit::WebCompiledContentExtension::bytecode):
1597         (WebKit::WebCompiledContentExtension::bytecodeLength):
1598         (WebKit::WebCompiledContentExtension::actions):
1599         (WebKit::WebCompiledContentExtension::actionsLength):
1600         * Shared/WebCompiledContentExtension.h: Added.
1601         Add new WebKit2 implementation of CompiledContentExtension. Right now it is the same as the old
1602         WebCore based CompiledContentExtension, but in subsequent patches, it will use shared/file backed
1603         memory.
1604
1605         * Shared/WebCompiledContentExtensionData.cpp: Added.
1606         (WebKit::WebCompiledContentExtensionData::encode):
1607         (WebKit::WebCompiledContentExtensionData::decode):
1608         * Shared/WebCompiledContentExtensionData.h: Added.
1609         Add encodable/decodable holder for the compiled content extension data for use in IPC. Right
1610         now it is doing the naive thing and always copying the data, but in subsequent patches, it will
1611         use shared/file backed memory.
1612
1613         * Shared/WebPageGroupData.cpp:
1614         (WebKit::WebPageGroupData::encode):
1615         (WebKit::WebPageGroupData::decode):
1616         * Shared/WebPageGroupData.h:
1617         Rename member to match new unification on the name userContentExtension. Change the value from
1618         the serialized JSON (as a String) to WebCompiledContentExtensionData.
1619
1620         * UIProcess/API/APIUserContentExtension.cpp: Copied from Source/WebKit2/UIProcess/API/APIUserContentFilter.cpp.
1621         (API::UserContentExtension::UserContentExtension):
1622         (API::UserContentExtension::~UserContentExtension):
1623         (API::UserContentFilter::UserContentFilter): Deleted.
1624         (API::UserContentFilter::~UserContentFilter): Deleted.
1625         * UIProcess/API/APIUserContentExtension.h: Copied from Source/WebKit2/UIProcess/API/APIUserContentFilter.h.
1626         * UIProcess/API/APIUserContentFilter.cpp: Removed.
1627         * UIProcess/API/APIUserContentFilter.h: Removed.
1628         Renamed UserContentFilter to APIUserContentExtension. Updated to store the compiled extension (as a WebCompiledContentExtension)
1629         rather than the serialized JSON.
1630
1631         * UIProcess/API/C/WKAPICast.h:
1632         * UIProcess/API/C/WKPageGroup.cpp:
1633         (WKPageGroupAddUserContentFilter):
1634         (WKPageGroupRemoveUserContentFilter):
1635         (WKPageGroupRemoveAllUserContentFilters):
1636         * UIProcess/API/C/WKUserContentControllerRef.cpp:
1637         (WKUserContentControllerAddUserContentFilter):
1638         (WKUserContentControllerRemoveAllUserContentFilters):
1639         * UIProcess/API/Cocoa/WKUserContentController.mm:
1640         (-[WKUserContentController _addUserContentFilter:]):
1641         (-[WKUserContentController _removeUserContentFilter:]):
1642         (-[WKUserContentController _removeAllUserContentFilters]):
1643         Update for rename of APIUserContentFilter -> UserContentExtension.
1644
1645         * UIProcess/API/C/WKUserContentFilterRef.cpp:
1646         (WKUserContentFilterGetTypeID):
1647         (WKUserContentFilterCreate):
1648         Update for rename of APIUserContentFilter -> UserContentExtension. Also make WKUserContentFilterCreate eagerly
1649         compile rule list to a WebCompiledContentExtensionData.
1650
1651         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
1652         (-[_WKUserContentFilter initWithName:serializedRules:]):
1653         (-[_WKUserContentFilter dealloc]):
1654         (-[_WKUserContentFilter _apiObject]):
1655         Update for rename of APIUserContentFilter -> UserContentExtension. Also make initWithName:serializedRules: eagerly
1656         compile rule list to a WebCompiledContentExtensionData.
1657
1658         * UIProcess/API/Cocoa/_WKUserContentFilterInternal.h:
1659         (WebKit::wrapper):
1660         Update for rename of APIUserContentFilter -> UserContentExtension.
1661
1662         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1663         (WebKit::WebUserContentControllerProxy::addProcess):
1664         (WebKit::WebUserContentControllerProxy::addUserContentExtension):
1665         (WebKit::WebUserContentControllerProxy::removeUserContentExtension):
1666         (WebKit::WebUserContentControllerProxy::removeAllUserContentExtensions):
1667         (WebKit::WebUserContentControllerProxy::addUserContentFilter): Deleted.
1668         (WebKit::WebUserContentControllerProxy::removeUserContentFilter): Deleted.
1669         (WebKit::WebUserContentControllerProxy::removeAllUserContentFilters): Deleted.
1670         * UIProcess/UserContent/WebUserContentControllerProxy.h:
1671         * UIProcess/WebPageGroup.cpp:
1672         (WebKit::WebPageGroup::addUserContentExtension):
1673         (WebKit::WebPageGroup::removeUserContentExtension):
1674         (WebKit::WebPageGroup::removeAllUserContentExtensions):
1675         (WebKit::WebPageGroup::addUserContentFilter): Deleted.
1676         (WebKit::WebPageGroup::removeUserContentFilter): Deleted.
1677         (WebKit::WebPageGroup::removeAllUserContentFilters): Deleted.
1678         * UIProcess/WebPageGroup.h:
1679         * WebKit2.xcodeproj/project.pbxproj:
1680         * WebProcess/UserContent/WebUserContentController.cpp:
1681         (WebKit::WebUserContentController::addUserContentExtensions):
1682         (WebKit::WebUserContentController::removeUserContentExtension):
1683         (WebKit::WebUserContentController::removeAllUserContentExtensions):
1684         (WebKit::WebUserContentController::addUserContentFilters): Deleted.
1685         (WebKit::WebUserContentController::removeUserContentFilter): Deleted.
1686         (WebKit::WebUserContentController::removeAllUserContentFilters): Deleted.
1687         * WebProcess/UserContent/WebUserContentController.h:
1688         * WebProcess/UserContent/WebUserContentController.messages.in:
1689         * WebProcess/WebPage/WebPageGroupProxy.cpp:
1690         (WebKit::WebPageGroupProxy::WebPageGroupProxy):
1691         (WebKit::WebPageGroupProxy::addUserContentExtension):
1692         (WebKit::WebPageGroupProxy::removeUserContentExtension):
1693         (WebKit::WebPageGroupProxy::removeAllUserContentExtensions):
1694         (WebKit::WebPageGroupProxy::addUserContentFilter): Deleted.
1695         (WebKit::WebPageGroupProxy::removeUserContentFilter): Deleted.
1696         (WebKit::WebPageGroupProxy::removeAllUserContentFilters): Deleted.
1697         * WebProcess/WebPage/WebPageGroupProxy.h:
1698         * WebProcess/WebPage/WebPageGroupProxy.messages.in:
1699         Pipe the compiled extension from the UIProcess to the WebProcess.
1700
1701 2015-03-06  Dean Jackson  <dino@apple.com>
1702
1703         Support "plus-lighter" in mix-blend mode
1704         https://bugs.webkit.org/show_bug.cgi?id=142416
1705         <rdar://problem/19993979>
1706
1707         Reviewed by Darin Adler and Sam Weinig.
1708
1709         Output the appropriate blending type when logging.
1710
1711         * Shared/mac/RemoteLayerTreeTransaction.mm:
1712         (WebKit::RemoteLayerTreeTextStream::operator<<):
1713
1714 2015-03-06  Beth Dakin  <bdakin@apple.com>
1715
1716         REGRESSION (r180782): Data Detector popovers are not dismissed on scroll or zoom
1717         https://bugs.webkit.org/show_bug.cgi?id=142371
1718         -and corresponding-
1719         rdar://problem/20059224
1720
1721         Reviewed by Tim Horton.
1722
1723         This patch has the WKImmediateActionController keep track of whether or not it has 
1724         an active immediate action. Then we only call into Lookup and DD if the window is 
1725         key OR if the WKView’s immediateActionController has an active action.
1726         * UIProcess/API/mac/WKView.mm:
1727         (-[WKView _dismissContentRelativeChildWindows]):
1728         * UIProcess/mac/WKImmediateActionController.h:
1729         * UIProcess/mac/WKImmediateActionController.mm:
1730         (-[WKImmediateActionController initWithPage:view:recognizer:]):
1731         (-[WKImmediateActionController willDestroyView:]):
1732         (-[WKImmediateActionController _clearImmediateActionState]):
1733         (-[WKImmediateActionController hasActiveImmediateAction]):
1734         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
1735
1736 2015-03-06  Jeremy Jones  <jeremyj@apple.com>
1737
1738         Scroll to make the video element visible when exiting fullscreen.
1739         https://bugs.webkit.org/show_bug.cgi?id=141439
1740
1741         Reviewed by Simon Fraser.
1742
1743         This patch will restore interface state when exiting fullscreen.
1744         Adds preparedToReturnToInline to continue exiting once the interface is updated.
1745
1746         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1747         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
1748         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1749         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
1750         (WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
1751         (WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline): added.
1752         * WebProcess/ios/WebVideoFullscreenManager.h:
1753         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
1754         * WebProcess/ios/WebVideoFullscreenManager.mm:
1755         (WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
1756
1757 2015-03-06  Antti Koivisto  <antti@apple.com>
1758
1759         Rename NetworkCacheStorageCocoa.mm to NetworkCacheStorage.cpp
1760         https://bugs.webkit.org/show_bug.cgi?id=142401
1761
1762         Rubber-stamped by Anders Carlsson.
1763
1764         It is now fully cross-platform.
1765
1766         * NetworkProcess/cache/NetworkCacheStorage.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm.
1767         (WebKit::NetworkCache::Storage::shrinkIfNeeded):
1768         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm: Removed.
1769         * WebKit2.xcodeproj/project.pbxproj:
1770
1771 2015-03-06  Antti Koivisto  <antti@apple.com>
1772
1773         Don't use dispatch_semaphore in NetworkCacheStorage
1774         https://bugs.webkit.org/show_bug.cgi?id=142395
1775
1776         Reviewed by Anders Carlsson.
1777
1778         * NetworkProcess/cache/NetworkCacheIOChannel.h:
1779         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
1780         (WebKit::NetworkCache::IOChannel::read):
1781         (WebKit::NetworkCache::IOChannel::readSync):
1782
1783             Add readSync to encapsulate the semaphore.
1784
1785         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1786         (WebKit::NetworkCache::Storage::traverse):
1787
1788 2015-03-06  Antti Koivisto  <antti@apple.com>
1789
1790         Move dispatch_data use behind NetworkCache::Data abstraction
1791         https://bugs.webkit.org/show_bug.cgi?id=142392
1792
1793         Reviewed by Anders Carlsson.
1794
1795         * NetworkProcess/cache/NetworkCacheData.h:
1796         (WebKit::NetworkCache::DispatchPtr::DispatchPtr):
1797         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
1798         (WebKit::NetworkCache::Data::Data):
1799         (WebKit::NetworkCache::Data::apply):
1800         (WebKit::NetworkCache::Data::subrange):
1801         (WebKit::NetworkCache::concatenate):
1802         (WebKit::NetworkCache::mapFile):
1803         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
1804         (WebKit::NetworkCache::IOChannel::read):
1805         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1806         (WebKit::NetworkCache::hashData):
1807         (WebKit::NetworkCache::decodeEntryMetaData):
1808         (WebKit::NetworkCache::decodeEntryHeader):
1809         (WebKit::NetworkCache::decodeEntry):
1810         (WebKit::NetworkCache::encodeEntryMetaData):
1811         (WebKit::NetworkCache::encodeEntryHeader):
1812         (WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
1813         (WebKit::NetworkCache::mapFile): Deleted.
1814
1815 2015-03-06  Antti Koivisto  <antti@apple.com>
1816
1817         Use WTF abstraction for page size in NetworkCacheStorage
1818         https://bugs.webkit.org/show_bug.cgi?id=142396
1819
1820         Reviewed by Darin Adler.
1821
1822         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1823         (WebKit::NetworkCache::decodeEntryMetaData):
1824         (WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
1825
1826 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
1827
1828         [iOS] SVG fonts are garbled
1829         https://bugs.webkit.org/show_bug.cgi?id=142377
1830
1831         Reviewed by Simon Fraser.
1832
1833         * Configurations/FeatureDefines.xcconfig:
1834
1835 2015-03-06  Zan Dobersek  <zdobersek@igalia.com>
1836
1837         Unguarded GTK-specific member and method usage in DrawingAreaImpl
1838         https://bugs.webkit.org/show_bug.cgi?id=142391
1839
1840         Reviewed by Carlos Garcia Campos.
1841
1842         r180924 introduced unguarded use of m_nativeSurfaceHandleForCompositing
1843         and LayerTreeHost::setNativeSurfaceHandleForCompositing() in DrawingAreaImpl.
1844         Definitions for both of these are guarded with USE(TEXTURE_MAPPER_GL) and PLATFORM(GTK),
1845         so their use should be as well.
1846
1847         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1848         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
1849
1850 2015-03-06  David Kilzer  <ddkilzer@apple.com>
1851
1852         REGRESSION (r181140): WebKit2 fails to build on Mavericks buildbot
1853
1854         Work around Xcode dependency tracking issues by making changes
1855         to source files that need to be recompiled.
1856
1857         * NetworkProcess/NetworkProcess.cpp: Update copyright.  Include
1858         NetworkCache.h since it didn't appear to be included by
1859         NetworkCacheCoders.h.
1860         * NetworkProcess/cocoa/NetworkProcessCocoa.mm: Update copyright.
1861
1862 2015-03-05  Antti Koivisto  <antti@apple.com>
1863
1864         Move disk cache classes to namespace
1865         https://bugs.webkit.org/show_bug.cgi?id=142339
1866
1867         Reviewed by Anders Carlsson.
1868
1869         Move everything to NetworkCache namespace. 
1870
1871 2015-03-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1872
1873         REGRESSION(r180924): ASSERTION FAILED: !from.isEmpty() in WebCore::TransformationMatrix::rectToRect
1874         https://bugs.webkit.org/show_bug.cgi?id=142345
1875
1876         Reviewed by Martin Robinson.
1877
1878         This was caused by r180924 that postpones the creation of the
1879         TextureMapper, which could cause that a layer has not yet a size
1880         when TextureMapper::paint() is called. This patch moves the
1881         creation of the TextureMapper to
1882         LayerTreeHostGtk::setNativeSurfaceHandleForCompositing(), so that
1883         it's created as soon as it's possible to create. This method is
1884         called by the drawing area right after creating the
1885         LayerTreeHostGtk if it already have a handler, or when the handle
1886         is received from the UI process.
1887
1888         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1889         (WebKit::LayerTreeHostGtk::initialize): Remove the
1890         nsureTextureMapper call because at this point the layer context ID
1891         is always 0, so it's impossible to create the TextureMapper.
1892         (WebKit::LayerTreeHostGtk::compositeLayersToContext): Remove the
1893         ensureTextureMapper call from here too, since at this point, if we
1894         have a context, we should also have a TextureMapper. Add an ASSERT
1895         right before using the TextureMapper.
1896         (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
1897         Create the TextureMapper here.
1898         (WebKit::LayerTreeHostGtk::ensureTextureMapper): Deleted.
1899         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
1900
1901 2015-03-05  Anders Carlsson  <andersca@apple.com>
1902
1903         WKWebView Encoder for remote object communication does not implement encodeInt32:forKey:
1904         https://bugs.webkit.org/show_bug.cgi?id=142356
1905         rdar://problem/20058952
1906
1907         Reviewed by Tim Horton.
1908
1909         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1910         (-[WKRemoteObjectEncoder encodeInt32:forKey:]):
1911         (-[WKRemoteObjectDecoder decodeInt32ForKey:]):
1912
1913 2015-03-05  Chris Dumez  <cdumez@apple.com>
1914
1915         NetworkCache efficacy logging is using too much CPU
1916         https://bugs.webkit.org/show_bug.cgi?id=142186
1917         <rdar://problem/19632080>
1918
1919         Reviewed by Antti Koivisto.
1920
1921         NetworkCache efficacy logging was using too much CPU mostly due to
1922         database writes. Logging was using ~11.3% of the NetworkProcess'
1923         CPU usage (~9.2% for writes / ~1.3% for reads).
1924
1925         This patch buffers writes requests in memory and only writes them
1926         to disk every 10 seconds. We are thus writing to this less frequently
1927         and writing more at once, in a single SQL transaction. After this
1928         change, efficacy logging only accounts for ~3.5% of the NetworkProcess'
1929         CPU activity (1.5% for writes / 1.2% for reads).
1930
1931         Now that CPU usage is more acceptable, this patch re-enables the
1932         network cache efficicy logging.
1933
1934         * NetworkProcess/cache/NetworkCacheStatistics.h:
1935
1936         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
1937         (WebKit::executeSQLCommand):
1938         (WebKit::executeSQLStatement):
1939         Call step() instead of executeCommand() because:
1940         - The input statement is already prepared.
1941         - step() does not finalize() the statement and thus we caller can
1942           reuse it after calling reset().
1943
1944         (WebKit::NetworkCacheStatistics::NetworkCacheStatistics):
1945         (WebKit::NetworkCacheStatistics::initialize):
1946         (WebKit::NetworkCacheStatistics::bootstrapFromNetworkCache):
1947         (WebKit::NetworkCacheStatistics::recordNotCachingResponse):
1948         (WebKit::NetworkCacheStatistics::recordNotUsingCacheForRequest):
1949         (WebKit::NetworkCacheStatistics::recordRetrievalFailure):
1950         (WebKit::NetworkCacheStatistics::markAsRequested):
1951         (WebKit::NetworkCacheStatistics::writeTimerFired):
1952         (WebKit::NetworkCacheStatistics::queryWasEverRequested):
1953         (WebKit::NetworkCacheStatistics::addHashesToDatabase):
1954         (WebKit::NetworkCacheStatistics::addStoreDecisionsToDatabase):
1955         (WebKit::NetworkCacheStatistics::addHashToDatabase): Deleted.
1956
1957         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1958         (WebKit::registerUserDefaultsIfNeeded):
1959         Re-enable the network cache efficacy logging.
1960
1961 2015-03-05  Antti Koivisto  <antti@apple.com>
1962
1963         Switch NetworkCacheStorage to WorkQueue abstraction
1964         https://bugs.webkit.org/show_bug.cgi?id=142337
1965
1966         Reviewed by Anders Carlsson.
1967
1968         Don't use dispatch_async directly.
1969
1970         * NetworkProcess/cache/NetworkCacheStorage.h:
1971         (WebKit::NetworkCacheStorage::ioQueue):
1972         (WebKit::NetworkCacheStorage::backgroundIOQueue):
1973         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1974         (WebKit::NetworkCacheStorage::NetworkCacheStorage):
1975         (WebKit::NetworkCacheStorage::initialize):
1976         (WebKit::NetworkCacheStorage::removeEntry):
1977         (WebKit::NetworkCacheStorage::dispatchReadOperation):
1978         (WebKit::retrieveFromMemory):
1979         (WebKit::NetworkCacheStorage::traverse):
1980         (WebKit::NetworkCacheStorage::dispatchFullWriteOperation):
1981         (WebKit::NetworkCacheStorage::dispatchHeaderWriteOperation):
1982         (WebKit::NetworkCacheStorage::clear):
1983         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
1984         (WebKit::NetworkCacheStorage::deleteOldVersions):
1985
1986 2015-03-05  Lukasz Bialek  <l.bialek@samsung.com>
1987
1988         [EFL][WK2] Crash when "Download Linked File" from MiniBrowser context menu is clicked
1989         https://bugs.webkit.org/show_bug.cgi?id=131162
1990
1991         Reviewed by Gyuyoung Kim.
1992
1993         "Download Linked File" crashes because of null-pointer exception of Download Job.
1994         Due to architectural difficulties, easy fix is not possible (EwkView is needed in
1995         DownloadManager to create DownloadJobs and it is only used to notify the client 
1996         about download (finished, error, cancel) via smart callback using EwkView (Evas_Object).
1997
1998         Propose a new callbacks which are view independent and detach EFL's DownloadManager
1999         from EwkView. It makes DownloadManagerEFL consistent with WKContextDownload.
2000         Fix the crash and restore download functionality.
2001
2002         * PlatformEfl.cmake:
2003         Enable newly reimplemented tests
2004         * UIProcess/API/efl/EwkViewCallbacks.h:
2005         Remove old callback mechanism
2006         * UIProcess/API/efl/ewk_context.cpp:
2007         (ewk_context_download_callbacks_set):
2008         * UIProcess/API/efl/ewk_context.h:
2009         Declare new callback functions and registration functions
2010         * UIProcess/API/efl/ewk_download_job.cpp:
2011         (EwkDownloadJob::EwkDownloadJob):
2012         (EwkDownloadJob::view): Deleted.
2013         * UIProcess/API/efl/ewk_download_job.h:
2014         * UIProcess/API/efl/ewk_download_job_private.h:
2015         (EwkDownloadJob::create):
2016         Remove EwkView dependency
2017         * UIProcess/API/efl/ewk_view.h:
2018         * UIProcess/API/efl/tests/test_ewk2_download_job.cpp:
2019         Alter tests to new callback mechanism
2020         * UIProcess/efl/DownloadManagerEfl.cpp:
2021         (WebKit::DownloadManagerEfl::decideDestinationWithSuggestedFilename):
2022         (WebKit::DownloadManagerEfl::didStart):
2023         (WebKit::DownloadManagerEfl::didFail):
2024         (WebKit::DownloadManagerEfl::didCancel):
2025         (WebKit::DownloadManagerEfl::didFinish):
2026         (WebKit::DownloadManagerEfl::DownloadManagerEfl):
2027         (WebKit::DownloadManagerEfl::registerDownloadJob):
2028         (WebKit::DownloadManagerEfl::setCallbacks):
2029         * UIProcess/efl/DownloadManagerEfl.h:
2030         * UIProcess/efl/WebViewEfl.cpp:
2031         (WebKit::WebViewEfl::handleDownloadRequest):
2032         Add support of new callback mechanism
2033
2034 2015-03-05  Michael Catanzaro  <mcatanzaro@igalia.com>
2035
2036         [SOUP] Disable RC4
2037         https://bugs.webkit.org/show_bug.cgi?id=140014
2038
2039         Reviewed by Carlos Garcia Campos.
2040
2041         Disallow RC4-based ciphersuites when performing TLS negotiation,
2042         because it is no longer considered secure.
2043
2044         * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
2045         (main):
2046         * WebProcess/EntryPoint/unix/WebProcessMain.cpp:
2047         (main):
2048
2049 2015-03-04  Yusuke Suzuki  <utatane.tea@gmail.com>
2050
2051         Hide Promise with runtime flags under Cocoa JSContext API
2052         https://bugs.webkit.org/show_bug.cgi?id=141965
2053
2054         Reviewed by Filip Pizlo.
2055
2056         Add new JSC runtime flag, PromiseDisabled.
2057
2058         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2059         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2060
2061 2015-03-04  Beth Dakin  <bdakin@apple.com>
2062
2063         Attempted build fix.
2064
2065         * UIProcess/API/Cocoa/WKViewPrivate.h:
2066
2067 2015-03-04  Beth Dakin  <bdakin@apple.com>
2068
2069         Message UI process when contentSize changes
2070         https://bugs.webkit.org/show_bug.cgi?id=142294
2071         -and corresponding-
2072         rdar://problem/19963165
2073
2074         Reviewed by Andreas Kling.
2075
2076         This patch un-ifdefs the didChangeContentSize message so that we can use it on Mac 
2077         as well. 
2078
2079         New private method that subclasses can override when they need to do something 
2080         with contentSize changes.
2081         * UIProcess/API/Cocoa/WKViewPrivate.h:
2082         * UIProcess/API/mac/WKView.mm:
2083         (-[WKView _didChangeContentSize:]):
2084         * UIProcess/PageClient.h:
2085
2086         Un-ifdef.
2087         * UIProcess/WebPageProxy.cpp:
2088         (WebKit::WebPageProxy::didChangeContentSize):
2089         * UIProcess/WebPageProxy.h:
2090         * UIProcess/WebPageProxy.messages.in:
2091         * UIProcess/mac/PageClientImpl.h:
2092         * UIProcess/mac/PageClientImpl.mm:
2093         (WebKit::PageClientImpl::didChangeContentSize):
2094         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2095         (WebKit::WebChromeClient::contentsSizeChanged):
2096
2097         Stubs for other platforms now that the pure-virtual is un-masked.
2098         * UIProcess/ios/PageClientImplIOS.h:
2099         * UIProcess/ios/PageClientImplIOS.mm:
2100         (WebKit::PageClientImpl::didChangeContentSize):
2101         * UIProcess/API/gtk/PageClientImpl.h:
2102
2103 2015-03-04  Antti Koivisto  <antti@apple.com>
2104
2105         Factor platform I/O out from NetworkCacheStorage
2106         https://bugs.webkit.org/show_bug.cgi?id=142279
2107
2108         Reviewed by Chris Dumez.
2109
2110         * NetworkProcess/cache/NetworkCacheData.h: Added.
2111         * NetworkProcess/cache/NetworkCacheDataCocoa.mm: Added.
2112
2113             NetworkCacheStorage::Data -> NetworkCacheData
2114             Move to files of its own.
2115
2116         * NetworkProcess/cache/NetworkCacheIOChannel.h: Added.
2117         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm: Added.
2118
2119             Add abstraction for dispatch IO channels.
2120
2121 2015-03-04  Joseph Pecoraro  <pecoraro@apple.com>
2122
2123         Remove WK_AVAILABLE and related macros when we cannot determine iOS/Mac version
2124         https://bugs.webkit.org/show_bug.cgi?id=142252
2125         rdar://problem/19983833
2126
2127         Reviewed by David Kilzer.
2128
2129         When mac / ios version was unable to be determined strip the WK_AVAILABLE
2130         and WK_DEPRECATED macros to avoid outputing a broken macro.
2131
2132         * mac/postprocess-framework-headers.sh:
2133
2134 2015-03-04  Debarshi Ray  <debarshir@gnome.org>
2135
2136         [GTK] WebView should hold a reference on WebContext because non-default contexts are a reality
2137         https://bugs.webkit.org/show_bug.cgi?id=142225
2138
2139         Reviewed by Carlos Garcia Campos.
2140
2141         * UIProcess/API/gtk/WebKitWebView.cpp:
2142         (webkitWebViewRequestFavicon):
2143         (webkitWebViewWatchForChangesInFavicon):
2144         (webkitWebViewDisconnectFaviconDatabaseSignalHandlers):
2145         (webkitWebViewConstructed):
2146         (webkitWebViewGetProperty):
2147         (webkitWebViewDispose):
2148         (webkitWebViewLoadChanged):
2149         (webkitWebViewLoadFailedWithTLSErrors):
2150         (webkit_web_view_get_context):
2151         (webkit_web_view_download_uri):
2152
2153 2015-03-03  Shivakumar JM  <shiva.jm@samsung.com>
2154
2155         Fix build warning in WebKit2/Shared module.
2156         https://bugs.webkit.org/show_bug.cgi?id=142213
2157
2158         Reviewed by Simon Fraser.
2159
2160         Fix build warning by removing argument name from function.
2161
2162         * Shared/WebCoreArgumentCoders.cpp:
2163         (IPC::pathPointCountApplierFunction):
2164
2165 2015-03-03  Andy Estes  <aestes@apple.com>
2166
2167         [Content Filtering] Separate unblock handling into its own class
2168         https://bugs.webkit.org/show_bug.cgi?id=142251
2169
2170         Reviewed by Andreas Kling.
2171
2172         Adopted ContentFilterUnblockHandler.
2173
2174         * Shared/WebCoreArgumentCoders.h:
2175         * Shared/mac/WebCoreArgumentCodersMac.mm:
2176         (IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode):
2177         (IPC::ArgumentCoder<ContentFilterUnblockHandler>::decode):
2178         (IPC::ArgumentCoder<ContentFilter>::encode): Deleted.
2179         (IPC::ArgumentCoder<ContentFilter>::decode): Deleted.
2180         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2181         (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame):
2182         * UIProcess/WebFrameProxy.cpp:
2183         (WebKit::WebFrameProxy::didStartProvisionalLoad):
2184         (WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction):
2185         * UIProcess/WebFrameProxy.h:
2186         (WebKit::WebFrameProxy::setContentFilterUnblockHandler):
2187         (WebKit::WebFrameProxy::setContentFilterForBlockedLoad): Deleted.
2188         * UIProcess/WebPageProxy.h:
2189         * UIProcess/WebPageProxy.messages.in:
2190         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2191         (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad):
2192         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2193
2194 2015-03-03  Chris Dumez  <cdumez@apple.com>
2195
2196         [WK2] Fix memory leak in _getCookieHeadersForTask
2197         https://bugs.webkit.org/show_bug.cgi?id=142245
2198
2199         Reviewed by Alexey Proskuryakov.
2200
2201         Fix memory leak in _getCookieHeadersForTask. We are leaking the CFDictionary
2202         returned by webKitCookieStorageCopyRequestHeaderFieldsForURL().
2203
2204         This patch addresses the issue by storing the return CFDictionary in a
2205         RetainPtr<CFDictionaryRef>.
2206
2207         * Shared/mac/CookieStorageShim.mm:
2208         (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
2209
2210 2015-03-03  Enrica Casucci  <enrica@apple.com>
2211
2212         Incomplete dictation results in text fields in a web page.
2213         https://bugs.webkit.org/show_bug.cgi?id=142240
2214         rdar://problem/19953432
2215
2216         Reviewed by Tim Horton.
2217
2218         The empty stub for insertDictationResult:withCorrectionIdentifier
2219         must be removed. This way UIKit will call insertText and do the right thing.
2220
2221         * UIProcess/ios/WKContentViewInteraction.mm:
2222         (-[WKContentView insertDictationResult:withCorrectionIdentifier:]): Deleted.
2223
2224 2015-03-03  Dean Jackson  <dino@apple.com>
2225
2226         Controls panel should have system blurry background
2227         https://bugs.webkit.org/show_bug.cgi?id=142154
2228         <rdar://problem/20000964>
2229
2230         Reviewed by Simon Fraser.
2231
2232         In order to replicate the system style of media controls
2233         on OS X and iOS, we need to expose a special -webkit-appearance.
2234         This patch adds the new property value, and implements
2235         the iOS part of the appearance, which is a blurry shaded
2236         background.
2237
2238         * Shared/mac/RemoteLayerBackingStore.mm:
2239         (WebKit::RemoteLayerBackingStore::drawInContext): Add entries for
2240         the new layer types, even though they are not correct yet.
2241
2242         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2243         (WebKit::updateCustomAppearance):
2244         (WebKit::RemoteLayerTreePropertyApplier::applyProperties): UIBackdropViews
2245         have a defined hierarchy that we don't create. We need to make sure we add our
2246         children to the right subview.
2247         * Shared/mac/RemoteLayerTreeTransaction.mm:
2248         (WebKit::RemoteLayerTreeTransaction::description): Logging.
2249
2250         * UIProcess/ios/RemoteLayerTreeHostIOS.mm: Rename existing WKBackdropView
2251         to WKSimpleBackdropView, and add a new WKBackdropView that inherits
2252         from UIBackdropView.
2253         (-[WKBackdropView hitTest:withEvent:]):
2254         (-[WKBackdropView description]):
2255         (WebKit::RemoteLayerTreeHost::createLayer): Handle the new LayerTypes.
2256         * UIProcess/mac/RemoteLayerTreeHost.mm:
2257         (WebKit::RemoteLayerTreeHost::createLayer):
2258
2259 2015-03-03  Chris Dumez  <cdumez@apple.com>
2260
2261         Access ApplicationCacheStorage global instance via singleton() static member function
2262         https://bugs.webkit.org/show_bug.cgi?id=142239
2263
2264         Reviewed by Anders Carlsson.
2265
2266         Access ApplicationCacheStorage global instance via singleton() static
2267         member function as per WebKit coding style.
2268
2269 2015-03-03  Joseph Pecoraro  <pecoraro@apple.com>
2270
2271         Build Fix: Add fall back handling in postprocess script for missing/unknown platform name.
2272
2273         Rubber-stamped by David Kilzer.
2274
2275         * mac/postprocess-framework-headers.sh:
2276
2277 2015-03-03  Enrica Casucci  <enrica@apple.com>
2278
2279         Build fix for iOS.
2280
2281         Unreviewed.
2282
2283         * UIProcess/ios/WKContentViewInteraction.mm: Adding forward declaration.
2284
2285 2015-03-03  Antti Koivisto  <antti@apple.com>
2286
2287         Include key to NetworkCacheStorage::Entry
2288         https://bugs.webkit.org/show_bug.cgi?id=142215
2289
2290         Reviewed by Chris Dumez.
2291
2292         This simplified code. The key is saved as part of the entry so it makes logical sense too.
2293
2294         * NetworkProcess/cache/NetworkCache.cpp:
2295         (WebKit::makeCacheKey):
2296         (WebKit::encodeStorageEntry):
2297         (WebKit::NetworkCache::retrieve):
2298         (WebKit::NetworkCache::store):
2299         (WebKit::NetworkCache::update):
2300         (WebKit::NetworkCache::traverse):
2301         (WebKit::entryAsJSON):
2302         (WebKit::NetworkCache::dumpContentsToFile):
2303         * NetworkProcess/cache/NetworkCacheKey.cpp:
2304         (WebKit::NetworkCacheKey::operator=):
2305         * NetworkProcess/cache/NetworkCacheKey.h:
2306         (WebKit::NetworkCacheKey::isNull):
2307         * NetworkProcess/cache/NetworkCacheStorage.h:
2308         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2309         (WebKit::decodeEntry):
2310         (WebKit::encodeEntryHeader):
2311         (WebKit::retrieveFromMemory):
2312         (WebKit::NetworkCacheStorage::retrieve):
2313         (WebKit::NetworkCacheStorage::store):
2314         (WebKit::NetworkCacheStorage::update):
2315         (WebKit::NetworkCacheStorage::traverse):
2316         (WebKit::NetworkCacheStorage::dispatchPendingWriteOperations):
2317         (WebKit::NetworkCacheStorage::dispatchFullWriteOperation):
2318         (WebKit::NetworkCacheStorage::dispatchHeaderWriteOperation):
2319
2320 2015-03-03  Antti Koivisto  <antti@apple.com>
2321
2322         Cache shrink leaves behind empty partition directories
2323         https://bugs.webkit.org/show_bug.cgi?id=142217
2324
2325         Reviewed by Andreas Kling.
2326
2327         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
2328         (WebKit::traverseCacheFiles):
2329
2330             No need for std::function.
2331
2332         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2333         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
2334
2335             After shrink traverse through the partition directories and try to delete them.
2336             System knows if they are actually empty.
2337
2338 2015-03-03  Anders Carlsson  <andersca@apple.com>
2339
2340         Use the correct display name for website data for local files
2341         https://bugs.webkit.org/show_bug.cgi?id=142228
2342
2343         Reviewed by Dan Bernstein.
2344
2345         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
2346         (displayNameForLocalFiles):
2347         Add new helper function.
2348
2349         (WebKit::WebsiteDataRecord::displayNameForCookieHostName):
2350         Check if the hostname is kCFHTTPCookieLocalFileDomain.
2351
2352         (WebKit::WebsiteDataRecord::displayNameForOrigin):
2353         Handle file URLs as well.
2354
2355 2015-03-03  Enrica Casucci  <enrica@apple.com>
2356
2357         Fixed typo in platform guard in http://trac.webkit.org/changeset/180939.
2358
2359         Unreviewed.
2360
2361         * UIProcess/ios/WKContentViewInteraction.mm:
2362
2363 2015-03-03  Enrica Casucci  <enrica@apple.com>
2364
2365         Adopt new API for keyboard interaction.
2366         https://bugs.webkit.org/show_bug.cgi?id=142201
2367         rdar://problem/19924949
2368
2369         Reviewed by Joseph Pecoraro.
2370
2371         * UIProcess/ios/WKContentViewInteraction.mm:
2372         (-[WKContentView inputAssistantItem]):
2373         (-[WKContentView _inputAssistantItem]):
2374
2375 2015-03-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2376
2377         REGRESSION(r177075): WebProcess crashes when entering accelerating compositing mode before the WebView is realized
2378         https://bugs.webkit.org/show_bug.cgi?id=142079
2379
2380         Reviewed by Žan Doberšek.
2381
2382         The problem is that the texture mapper and native window handler
2383         are initialized when the LayerTreeHost is initialized, assuming
2384         the UI process has already sent the native window handler to the
2385         web process, but that doesn't always happen since we moved the
2386         redirected window creation to realize in r177075.
2387
2388         * WebProcess/WebPage/DrawingArea.h:
2389         (WebKit::DrawingArea::nativeSurfaceHandleForCompositing): Deleted.
2390         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2391         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): Call
2392         LayerTreeHost::setNativeSurfaceHandleForCompositing if we
2393         already have a native window handle at this point.
2394         (WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
2395         Call LayerTreeHost::setNativeSurfaceHandleForCompositing also when
2396         not using threaded compositing.
2397         * WebProcess/WebPage/LayerTreeHost.h:
2398         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2399         (WebKit::LayerTreeHostGtk::makeContextCurrent): Helper function to
2400         ensure a context and making it current.
2401         (WebKit::LayerTreeHostGtk::ensureTextureMapper): Ensure a texture
2402         is created for the current context.
2403         (WebKit::LayerTreeHostGtk::initialize): Use makeContextCurrent()
2404         and ensureTextureMapper(), and remove the LayerTreeContext
2405         initialization since that's is now always initialized in
2406         setNativeSurfaceHandleForCompositing().
2407         (WebKit::LayerTreeHostGtk::compositeLayersToContext): Use
2408         makeContextCurrent() helper function and also call
2409         ensureTextureMapper() just in case the texture could not be
2410         created during initialization because the native window handle was
2411         not yet available.
2412         (WebKit::LayerTreeHostGtk::flushAndRenderLayers): Use makeContextCurrent().
2413         (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
2414         Initialize the LayerTreeContext.
2415         (WebKit::LayerTreeHostGtk::glContext): Deleted.
2416         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2417
2418 2015-03-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2419
2420         [WK2] Remove unnecessary create() factory functions.
2421         https://bugs.webkit.org/show_bug.cgi?id=142161
2422
2423         Reviewed by Chris Dumez.
2424
2425         We can replace some create() factory functions with std::make_unique(). Because
2426         it just returns new instance. Even some of those functions have used std::unique_ptr<>
2427         instead of std::make_unique<>. Fixed all.
2428
2429         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
2430         (WebKit::SQLiteIDBTransaction::create): Deleted.
2431         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2432         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
2433         * Platform/efl/DispatchQueueWorkItemEfl.h:
2434         (WorkItem::dispatch):
2435         (WorkItem::create): Deleted.
2436         * UIProcess/API/gtk/PageClientImpl.h:
2437         (WebKit::PageClientImpl::create): Deleted.
2438         * UIProcess/API/gtk/WebKitTextChecker.h:
2439         (WebKitTextChecker::create): Deleted.
2440         * UIProcess/API/gtk/WebKitWebContext.cpp:
2441         (webkitWebContextConstructed):
2442         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2443         (webkitWebViewBaseConstructed):
2444
2445 2015-03-02  Brady Eidson  <beidson@apple.com>
2446
2447         Lots of: ERROR: Unhandled web process message WebPageGroupProxy:RemoveAllUserContentFilters
2448         https://bugs.webkit.org/show_bug.cgi?id=142155
2449
2450         Reviewed by Simon Fraser.
2451
2452         * WebProcess/WebProcess.cpp:
2453         (WebKit::WebProcess::didReceiveMessage): Return after handling WebPageGroupProxy messages
2454           instead of logging an error.
2455
2456 2015-03-02  Antti Koivisto  <antti@apple.com>
2457
2458         Add way to dump cache meta data to file
2459         https://bugs.webkit.org/show_bug.cgi?id=142183
2460
2461         Add a missing return so we don't try to decode a null entry.
2462
2463         * NetworkProcess/cache/NetworkCache.cpp:
2464         (WebKit::NetworkCache::dumpContentsToFile):
2465
2466 2015-03-02  Anders Carlsson  <andersca@apple.com>
2467
2468         Return disk cache entries from the new disk cache
2469         https://bugs.webkit.org/show_bug.cgi?id=142190
2470
2471         Reviewed by Antti Koivisto.
2472
2473         * NetworkProcess/NetworkProcess.cpp:
2474         (WebKit::fetchDiskCacheEntries):
2475         Call NetworkCache::traverse() to get all the cache entries, unique their origins and pass them back with the completion handler.
2476
2477         * NetworkProcess/cache/NetworkCache.cpp:
2478         (WebKit::NetworkCache::traverse):
2479         New helper function that traverses network cache entries.
2480
2481         * NetworkProcess/cache/NetworkCache.h:
2482
2483 2015-03-02  Antti Koivisto  <antti@apple.com>
2484
2485         Add way to dump cache meta data to file
2486         https://bugs.webkit.org/show_bug.cgi?id=142183
2487
2488         Reviewed by Andreas Kling.
2489
2490         Dump goes to WebKitCache/dump.json. On OSX it can be triggered with
2491
2492         notifyutil -p com.apple.WebKit.Cache.dump
2493
2494         * NetworkProcess/cache/NetworkCache.cpp:
2495         (WebKit::NetworkCache::initialize):
2496         (WebKit::NetworkCache::dumpFilePath):
2497         (WebKit::entryAsJSON):
2498         (WebKit::NetworkCache::dumpContentsToFile):
2499         (WebKit::NetworkCache::clear):
2500
2501             Also clear any dumps.
2502
2503         * NetworkProcess/cache/NetworkCache.h:
2504         * NetworkProcess/cache/NetworkCacheStorage.h:
2505         (WebKit::NetworkCacheStorage::baseDirectoryPath):
2506         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2507         (WebKit::fileNameForKey):
2508         (WebKit::filePathForKey):
2509         (WebKit::openFile):
2510         (WebKit::openFileForKey):
2511         (WebKit::decodeEntryHeader):
2512
2513             Separate header decoding.
2514
2515         (WebKit::decodeEntry):
2516         (WebKit::NetworkCacheStorage::traverse):
2517
2518             Add asynchronous cache traversal inteface.
2519
2520 2015-03-02  Anders Carlsson  <andersca@apple.com>
2521
2522         WebsiteDataStore should handle deleting cookies
2523         https://bugs.webkit.org/show_bug.cgi?id=142185
2524
2525         Reviewed by Beth Dakin.
2526
2527         * NetworkProcess/NetworkProcess.cpp:
2528         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
2529         When asked to delete cookies, do so.
2530
2531         * NetworkProcess/NetworkProcess.h:
2532         Update the deleteWebsiteDataForOrigins signature.
2533
2534         * NetworkProcess/NetworkProcess.messages.in:
2535         Add cookieHostNames to DeleteWebsiteDataForOrigins.
2536
2537         * UIProcess/Network/NetworkProcessProxy.cpp:
2538         (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
2539         * UIProcess/Network/NetworkProcessProxy.h:
2540         Update to take a vector of cookie host names.
2541
2542         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2543         (WebKit::WebsiteDataStore::removeData):
2544         Figure out if we need to ask the network process to delete data.
2545
2546 2015-03-02  Anders Carlsson  <andersca@apple.com>
2547
2548         WebsiteDataStore should support getting cookie host names
2549         https://bugs.webkit.org/show_bug.cgi?id=142178
2550
2551         Reviewed by Dan Bernstein.
2552
2553         * NetworkProcess/NetworkProcess.cpp:
2554         (WebKit::NetworkProcess::fetchWebsiteData):
2555         Assert that we're destroyed from the main thread since we end up copying the website data struct.
2556
2557         * Shared/WebsiteData/WebsiteData.cpp:
2558         (WebKit::WebsiteData::encode):
2559         (WebKit::WebsiteData::decode):
2560         * Shared/WebsiteData/WebsiteData.h:
2561         Add a hostnamesWithCookies member.
2562
2563         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
2564         (WebKit::WebsiteDataRecord::displayNameForCookieHostName):
2565         Add a new function that will return the display name for a cookie host name.
2566
2567         (WebKit::WebsiteDataRecord::addCookieHostName):
2568         * UIProcess/WebsiteData/WebsiteDataRecord.h:
2569         Add a hash set of cookie host names.
2570
2571         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2572         (WebKit::WebsiteDataStore::fetchData):
2573         Create data records for each host name with cookies.
2574
2575 2015-03-02  Jer Noble  <jer.noble@apple.com>
2576
2577         [WK2][Mac] WebPageProxy::supressVisibilityUpdates() should suppress visibility updates.
2578         https://bugs.webkit.org/show_bug.cgi?id=141907
2579
2580         Reviewed by Tim Horton.
2581
2582         At some point, the window/view/page visibility update code was refactored such that setting
2583         WebPageProxy::setSuppressVisibilityUpdate() no longer suppressed visibility updates. This causes
2584         full screen animations to become "flashy" when moving the WebView between the regular and full
2585         screen window, as a HTMLMediaElement in the full screen animation will receive a "!visible"
2586         notification and disconnect its rendering pipeline.
2587
2588         In WebPageProxy::viewStateDidChange(), respect m_suppressVisibilityUpdates and bail out early
2589         if set. In WebPageProxy::setSuppressVisibilityUpdates(), trigger an explicit update after
2590         clearing m_suppressVisibilityUpdates.
2591
2592         * UIProcess/WebPageProxy.cpp:
2593         (WebKit::WebPageProxy::setSuppressVisibilityUpdates):
2594         (WebKit::WebPageProxy::viewStateDidChange):
2595         * UIProcess/WebPageProxy.h:
2596         (WebKit::WebPageProxy::setSuppressVisibilityUpdates): Deleted.
2597
2598 2015-03-02  Jer Noble  <jer.noble@apple.com>
2599
2600         [WK1][WK2][Mac] Fullscreen animation is incorrect when page is scaled.
2601         https://bugs.webkit.org/show_bug.cgi?id=142121
2602
2603         Reviewed by Simon Fraser.
2604
2605         Change the order of operations when entering or exiting fullscreen. Change the page scale to
2606         1 before entering, so the final screen rect takes that scale into account, and vice-versa on
2607         exiting.
2608
2609         * UIProcess/mac/WKFullScreenWindowController.mm:
2610         (-[WKFullScreenWindowController enterFullScreen:]):
2611         (-[WKFullScreenWindowController exitFullScreen]):
2612
2613 2015-03-01  Simon Fraser  <simon.fraser@apple.com>
2614
2615         Make clip-path work on <video>, <canvas> etc.
2616         https://bugs.webkit.org/show_bug.cgi?id=138684
2617
2618         Reviewed by Darin Adler.
2619         
2620         Support encode/decode for WebCore Path objects, which is done by traversing
2621         the path.
2622
2623         * Shared/WebCoreArgumentCoders.cpp:
2624         (IPC::pathPointCountApplierFunction):
2625         (IPC::pathEncodeApplierFunction):
2626         (IPC::ArgumentCoder<Path>::encode):
2627         (IPC::ArgumentCoder<Path>::decode):
2628         * Shared/WebCoreArgumentCoders.h:
2629         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2630         (WebKit::applyPropertiesToLayer): Actually apply the path and wind rule to the shape layer.
2631         * Shared/mac/RemoteLayerTreeTransaction.h: Include path and wind rule in the layer properties.
2632         * Shared/mac/RemoteLayerTreeTransaction.mm:
2633         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
2634         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode): Encode shape and wind rule.
2635         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Decode shape and wind rule.
2636         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2637         (WebKit::PlatformCALayerRemote::shapePath):
2638         (WebKit::PlatformCALayerRemote::setShapePath):
2639         (WebKit::PlatformCALayerRemote::shapeWindRule):
2640         (WebKit::PlatformCALayerRemote::setShapeWindRule):
2641         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2642
2643 2015-03-01  Chris Dumez  <cdumez@apple.com>
2644
2645         Make NotificationCenter / Notification suspendable
2646         https://bugs.webkit.org/show_bug.cgi?id=142117
2647         <rdar://problem/19923085>
2648
2649         Reviewed by Andreas Kling.
2650
2651         Provide implementation for NotificationClient::hasPendingPermissionRequests().
2652
2653         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
2654         (WebKit::NotificationPermissionRequestManager::hasPendingPermissionRequests):
2655         * WebProcess/Notifications/NotificationPermissionRequestManager.h:
2656         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
2657         (WebKit::WebNotificationClient::hasPendingPermissionRequests):
2658         * WebProcess/WebCoreSupport/WebNotificationClient.h:
2659
2660 2015-03-01  Antti Koivisto  <antti@apple.com>
2661
2662         Enable new disk cache on iOS
2663         https://bugs.webkit.org/show_bug.cgi?id=142148
2664
2665         Reviewed by Sam Weinig.
2666
2667         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2668
2669             iOS build fix.
2670
2671         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2672         (WebKit::registerUserDefaultsIfNeeded):
2673
2674             Disable the efficacy logging by default for now. It has significant performance impact.
2675
2676         * config.h:
2677
2678             Enable it.
2679
2680 2015-02-28  Anders Carlsson  <andersca@apple.com>
2681
2682         WebsiteDataStore should handle fetching and deleting local storage data
2683         https://bugs.webkit.org/show_bug.cgi?id=142137
2684
2685         Reviewed by Sam Weinig.
2686
2687         * UIProcess/Storage/StorageManager.cpp:
2688         (WebKit::StorageManager::deleteEntriesForOrigins):
2689         Add a new function that deletes entries from multiple origins.
2690
2691         * UIProcess/Storage/StorageManager.h:
2692         Add new members.
2693
2694         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2695         (WebKit::WebsiteDataStore::fetchData):
2696         Fetch local storage data as well.
2697
2698         (WebKit::WebsiteDataStore::removeData):
2699         Delete local storage data as well.
2700
2701 2015-02-28  Anders Carlsson  <andersca@apple.com>
2702
2703         Fetch cache origins from the network process
2704         https://bugs.webkit.org/show_bug.cgi?id=142135
2705
2706         Reviewed by Dan Bernstein.
2707
2708         * NetworkProcess/NetworkProcess.cpp:
2709         (WebKit::cfURLCacheOrigins):
2710         Add a new helper function that returns a vector of CFURL cache origins.
2711
2712         (WebKit::fetchDiskCacheOrigins):
2713         Fetch the disk cache origins and pass them along to the completion handler. Currently we don't handle the new disk cache.
2714
2715         (WebKit::NetworkProcess::fetchWebsiteData):
2716         Create a callback aggregator and fetch disk cache origins if we're asked for it.
2717
2718         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2719         (WebKit::computeNetworkProcessAccessTypeForDataFetch):
2720         New helper function that computes if we need to launch the network process in order to fetch data.
2721
2722         (WebKit::WebsiteDataStore::fetchData):
2723         Fetch website data from the network process as well.
2724
2725 2015-02-28  Anders Carlsson  <andersca@apple.com>
2726
2727         Simplify WebResourceCacheManagerCFNet.mm code
2728         https://bugs.webkit.org/show_bug.cgi?id=142134
2729
2730         Reviewed by Dan Bernstein.
2731
2732         - ENABLE(CACHE_PARTITIONING) is always true on Mac and iOS, so remove those #ifdefs.
2733         - Make cfURLCacheHostNamesWithCallback and clearCFURLCacheForHostNames public
2734           so they can be used by the new WebsiteDataStore code in an upcoming patch.
2735         - Change cfURLCacheHostNamesWithCallback to take an std::function instead of a block.
2736
2737         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
2738         (WebKit::WebResourceCacheManager::getCacheOrigins):
2739         * WebProcess/ResourceCache/WebResourceCacheManager.h:
2740         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm:
2741         (WebKit::partitionName):
2742         (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
2743         (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames):
2744         (WebKit::WebResourceCacheManager::cfURLCacheHostNames): Deleted.
2745
2746 2015-02-28  Commit Queue  <commit-queue@webkit.org>
2747
2748         Unreviewed, rolling out r180804.
2749         https://bugs.webkit.org/show_bug.cgi?id=142131
2750
2751         Broke nightlies (Requested by ap on #webkit).
2752
2753         Reverted changeset:
2754
2755         "[WK2] Drop legacy WKBundlePageDiagnosticLoggingClient API"
2756         https://bugs.webkit.org/show_bug.cgi?id=141176
2757         http://trac.webkit.org/changeset/180804
2758
2759 2015-02-27  Hunseop Jeong  <hs85.jeong@samsung.com>
2760
2761         [EFL][GTK] Fix build break after r180790,180798 
2762         https://bugs.webkit.org/show_bug.cgi?id=142127
2763
2764         Reviewed by Gyuyoung Kim.
2765
2766         * CMakeLists.txt:
2767
2768 2015-02-27  Chris Dumez  <cdumez@apple.com>
2769
2770         [WK2] Drop legacy WKBundlePageDiagnosticLoggingClient API
2771         https://bugs.webkit.org/show_bug.cgi?id=141176
2772
2773         Reviewed by Sam Weinig.
2774
2775         Drop legacy WKBundlePageDiagnosticLoggingClient WK2 API as we are now
2776         exposing this functionality via WKPageDiagnosticLoggingClient.h on
2777         UIProcess side. The client-side has already been ported over.
2778
2779         * CMakeLists.txt:
2780         * Shared/API/c/WKSharedAPICast.h:
2781         (WebKit::toAPI): Deleted.
2782         (WebKit::toDiagnosticLoggingResultType): Deleted.
2783         * UIProcess/API/C/WKAPICast.h:
2784         (WebKit::toAPI):
2785         * UIProcess/API/C/WKDiagnosticLoggingResultType.h: Renamed from Source/WebKit2/Shared/API/c/WKDiagnosticLoggingResultType.h.
2786         * WebKit2.xcodeproj/project.pbxproj:
2787         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2788         (WKBundlePageSetDiagnosticLoggingClient): Deleted.
2789         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2790         * WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h: Removed.
2791         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp: Removed.
2792         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h: Removed.
2793         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
2794         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
2795         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
2796         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
2797         * WebProcess/WebPage/WebPage.cpp:
2798         (WebKit::WebPage::WebPage):
2799         (WebKit::WebPage::close):
2800         (WebKit::WebPage::initializeInjectedBundleDiagnosticLoggingClient): Deleted.
2801         * WebProcess/WebPage/WebPage.h:
2802         (WebKit::WebPage::injectedBundleDiagnosticLoggingClient): Deleted.
2803
2804 2015-02-27  Anders Carlsson  <andersca@apple.com>
2805
2806         Rename WebResourceCacheManagerCFNet.cpp to WebResourceCacheManagerCFNet.mm
2807
2808         Rubber-stamped by Dan Bernstein.
2809
2810         This will let us use lambda to block conversion in a subsequent patch.
2811
2812         * WebKit2.xcodeproj/project.pbxproj:
2813         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm: Renamed from Source/WebKit2/WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp.
2814
2815 2015-02-27  Commit Queue  <commit-queue@webkit.org>
2816
2817         Unreviewed, rolling out r180203 and r180210.
2818         https://bugs.webkit.org/show_bug.cgi?id=142116
2819
2820         broke process suspension and tile map (Requested by thorton on
2821         #webkit).
2822
2823         Reverted changesets:
2824
2825         "Adopt CAMachPort-as-layer-contents"
2826         https://bugs.webkit.org/show_bug.cgi?id=141687
2827         http://trac.webkit.org/changeset/180203
2828
2829         "Fix the !USE(IOSURFACE) build"
2830         http://trac.webkit.org/changeset/180210
2831
2832 2015-02-27  Sam Weinig  <sam@webkit.org>
2833
2834         Add WebKit2 SPI to create a DOM File object
2835         https://bugs.webkit.org/show_bug.cgi?id=142109
2836
2837         Reviewed by Tim Horton.
2838
2839         Add a new handle type for exposing a DOM File object to script. Follow
2840         the pattern of WKBundleNodeHandleRef and WKBundleRangeHandleRef with the
2841         new class WKBundleFileHandleRef. It can be created for a specific path,
2842         and then the JS wrapper can be obtained via WKBundleFrameGetJavaScriptWrapperForFileForWorld.
2843
2844         * Shared/API/APIObject.h:
2845         * Shared/API/c/WKBase.h:
2846         * WebKit2.xcodeproj/project.pbxproj:
2847         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
2848         * WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.cpp: Added.
2849         (WKBundleFileHandleGetTypeID):
2850         (WKBundleFileHandleCreateWithPath):
2851         * WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.h: Added.
2852         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2853         (WKBundleFrameGetJavaScriptWrapperForFileForWorld):
2854         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2855         * WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.cpp: Added.
2856         (WebKit::domHandleCache):
2857         (WebKit::InjectedBundleFileHandle::create):
2858         (WebKit::InjectedBundleFileHandle::getOrCreate):
2859         (WebKit::InjectedBundleFileHandle::InjectedBundleFileHandle):
2860         (WebKit::InjectedBundleFileHandle::~InjectedBundleFileHandle):
2861         (WebKit::InjectedBundleFileHandle::coreFile):
2862         * WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.h: Added.
2863         * WebProcess/WebPage/WebFrame.cpp:
2864         (WebKit::WebFrame::jsWrapperForWorld):
2865         * WebProcess/WebPage/WebFrame.h:
2866
2867 2015-02-27  Beth Dakin  <bdakin@apple.com>
2868
2869         Lookup panel dismisses when pages are loading in other tabs/windows
2870         https://bugs.webkit.org/show_bug.cgi?id=142104
2871         -and corresponding-
2872         rdar://problem/19882137
2873
2874         Reviewed by Tim Horton.
2875
2876         Until rdar://problem/13875766 is resolved, we should only call into Lookup and 
2877         DataDetectors for key windows.
2878         * UIProcess/API/mac/WKView.mm:
2879         (-[WKView _dismissContentRelativeChildWindows]):
2880
2881 2015-02-27  Anders Carlsson  <andersca@apple.com>
2882
2883         Add infrastructure for handling website data in the network process
2884         https://bugs.webkit.org/show_bug.cgi?id=142092
2885
2886         Reviewed by Andreas Kling.
2887
2888         * NetworkProcess/NetworkProcess.cpp:
2889         (WebKit::NetworkProcess::fetchWebsiteData):
2890         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
2891         Send back "Did" messages without actually doing anything for now.
2892
2893         * NetworkProcess/NetworkProcess.h:
2894         Add new members.
2895
2896         * NetworkProcess/NetworkProcess.messages.in:
2897         Add FetchWebsiteData and DeleteWebsiteDataForOrigins messages.
2898
2899         * UIProcess/Network/NetworkProcessProxy.cpp:
2900         (WebKit::NetworkProcessProxy::~NetworkProcessProxy):
2901         Assert that all maps are empty.
2902
2903         (WebKit::NetworkProcessProxy::fetchWebsiteData):
2904         (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
2905         Add callbacks and send fetch and delete messages respectively.
2906
2907         (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
2908         Make sure to invoke all callbacks.
2909
2910         (WebKit::NetworkProcessProxy::didFetchWebsiteData):
2911         Find the callback and invoke it.
2912
2913         (WebKit::NetworkProcessProxy::didDeleteWebsiteDataForOrigins):
2914         Ditto.
2915
2916         * UIProcess/Network/NetworkProcessProxy.h:
2917         Add new members.
2918
2919         * UIProcess/Network/NetworkProcessProxy.messages.in:
2920         Add DidFetchWebsiteData and DidDeleteWebsiteDataForOrigins messages.
2921
2922         * UIProcess/WebProcessProxy.cpp:
2923         (WebKit::WebProcessProxy::connectionDidClose):
2924         Just pass an empty WebsiteData object.
2925
2926 2015-02-26  Enrica Casucci  <enrica@apple.com>
2927
2928         [WK2] REGRESSION(r180465): WebKit::WebPage::editorState() triggers a layout.
2929         https://bugs.webkit.org/show_bug.cgi?id=142015
2930
2931         Reviewed by Alexey Proskuryakov.
2932
2933         We no longer compute the font information at selection
2934         when we update the editor state.
2935         Instead, we request the font information only when the selection
2936         changes and the font panel is visible.
2937         I added an observer to be notified of the font panel visibility
2938         changes to update NSFontManager to reflect the font at the
2939         current selection.
2940
2941         * Shared/EditorState.cpp:
2942         (WebKit::EditorState::encode):
2943         (WebKit::EditorState::decode):
2944         * Shared/EditorState.h:
2945         (WebKit::EditorState::EditorState):
2946         * UIProcess/API/mac/WKView.mm:
2947         (-[WKView updateFontPanelIfNeeded]):
2948         (-[WKView _selectionChanged]):
2949         (-[WKView addWindowObserversForWindow:]):
2950         (-[WKView removeWindowObservers]):
2951         (-[WKView observeValueForKeyPath:ofObject:change:context:]):
2952         * UIProcess/WebPageProxy.h:
2953         * UIProcess/WebPageProxy.messages.in:
2954         * UIProcess/mac/WebPageProxyMac.mm:
2955         (WebKit::WebPageProxy::fontAtSelection):
2956         (WebKit::WebPageProxy::fontAtSelectionCallback):
2957         * WebProcess/WebPage/WebPage.h:
2958         * WebProcess/WebPage/WebPage.messages.in:
2959         * WebProcess/WebPage/mac/WebPageMac.mm:
2960         (WebKit::WebPage::platformEditorState):
2961         (WebKit::WebPage::fontAtSelection):
2962
2963 2015-02-27  Brady Eidson  <beidson@apple.com>
2964
2965         Add API to remove a single content filter.
2966         <rdar://problem/19977764> and https://bugs.webkit.org/show_bug.cgi?id=142088
2967
2968         Reviewed by Sam Weinig.
2969
2970         * Shared/WebPageGroupData.h:
2971
2972         * UIProcess/API/C/WKPageGroup.cpp:
2973         (WKPageGroupRemoveUserContentFilter):
2974
2975         * UIProcess/API/C/WKPageGroup.h:
2976         * UIProcess/API/Cocoa/WKUserContentController.mm:
2977         (-[WKUserContentController _removeUserContentFilter:]):
2978
2979         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
2980         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
2981         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
2982         (WebKit::WebUserContentControllerProxy::addProcess):
2983         (WebKit::WebUserContentControllerProxy::addUserContentFilter):
2984         (WebKit::WebUserContentControllerProxy::removeUserContentFilter):
2985         (WebKit::WebUserContentControllerProxy::removeAllUserContentFilters):
2986         * UIProcess/UserContent/WebUserContentControllerProxy.h:
2987
2988         * UIProcess/WebPageGroup.cpp:
2989         (WebKit::WebPageGroup::addUserContentFilter):
2990         (WebKit::WebPageGroup::removeUserContentFilter):
2991         * UIProcess/WebPageGroup.h:
2992
2993         * WebProcess/UserContent/WebUserContentController.cpp:
2994         (WebKit::WebUserContentController::removeUserContentFilter):
2995         * WebProcess/UserContent/WebUserContentController.h:
2996         * WebProcess/UserContent/WebUserContentController.messages.in:
2997
2998         * WebProcess/WebPage/WebPageGroupProxy.cpp:
2999         (WebKit::WebPageGroupProxy::WebPageGroupProxy):
3000         (WebKit::WebPageGroupProxy::removeUserContentFilter):
3001         * WebProcess/WebPage/WebPageGroupProxy.h:
3002         * WebProcess/WebPage/WebPageGroupProxy.messages.in:
3003
3004 2015-02-26  Anders Carlsson  <andersca@apple.com>
3005
3006         Add API to remove all website data for the given data records
3007         https://bugs.webkit.org/show_bug.cgi?id=142060
3008
3009         Reviewed by Beth Dakin.
3010
3011         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
3012         Add new method declaration.
3013
3014         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3015         (toWebsiteDataRecords):
3016         Add a helper function that converts an NSArray of _WKWebsiteDataRecords to a Vector of WebsiteDataRecords.
3017
3018         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
3019         Call through to the underlying WebsiteDataStore.
3020
3021         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3022         (WebKit::WebsiteDataStore::removeData):
3023         Figure out which processes to call deleteWebsiteDataForOrigins for and do so. Add a callback aggregator so we can
3024         call the completion handler at the right time.
3025
3026         * UIProcess/WebsiteData/WebsiteDataStore.h:
3027         Add new members.
3028
3029         * WebProcess/WebProcess.cpp:
3030         (WebKit::WebProcess::deleteWebsiteDataForOrigins):
3031         Use the newly added MemoryCache member function to delete all resources matching the set of origins.
3032
3033 2015-02-26  Chris Dumez  <cdumez@apple.com>
3034
3035         Rename DatabaseManager::manager() to DatabaseManager::singleton()
3036         https://bugs.webkit.org/show_bug.cgi?id=142054
3037
3038         Reviewed by Ryosuke Niwa.
3039
3040         Rename DatabaseManager::manager() to DatabaseManager::singleton() as
3041         per coding style and use WTF::NeverDestroyed.
3042
3043         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3044         (WebKit::WebChromeClient::exceededDatabaseQuota):
3045         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
3046         (WebKit::WebDatabaseManager::initialize):
3047         (WebKit::WebDatabaseManager::getDatabasesByOrigin):
3048         (WebKit::WebDatabaseManager::getDatabaseOrigins):
3049         (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
3050         (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
3051         (WebKit::WebDatabaseManager::deleteAllDatabases):
3052         (WebKit::WebDatabaseManager::setQuotaForOrigin):
3053         * WebProcess/WebPage/WebPage.cpp:
3054         (WebKit::WebPage::updatePreferences):
3055
3056 2015-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
3057
3058         [Mac] [iOS] Parsing support for -apple-trailing-word
3059         https://bugs.webkit.org/show_bug.cgi?id=141939
3060
3061         Reviewed by Andreas Kling.
3062
3063         * Configurations/FeatureDefines.xcconfig:
3064
3065 2015-02-26  Brady Eidson  <beidson@apple.com>
3066
3067         Make WKPageGroupRemoveAllUserContentFilters actually remove all user content filters
3068         https://bugs.webkit.org/show_bug.cgi?id=142047
3069
3070         Reviewed by Geoff Garen.
3071
3072         * UIProcess/API/C/WKPageGroup.cpp:
3073         (WKPageGroupRemoveAllUserContentFilters): Remove all content filters instead of removing all user scripts.
3074
3075 2015-02-25  Anders Carlsson  <andersca@apple.com>
3076
3077         Add (unused for now) code to delete website data for a set of origins
3078         https://bugs.webkit.org/show_bug.cgi?id=142019
3079
3080         Reviewed by Beth Dakin.
3081
3082         * UIProcess/WebProcessProxy.cpp:
3083         (WebKit::WebProcessProxy::~WebProcessProxy):
3084         Assert that there are no pending callbacks.
3085
3086         (WebKit::WebProcessProxy::connectionDidClose):
3087         Invoke all the didDeleteWebsiteDataForOrigins callbacks.
3088
3089         (WebKit::WebProcessProxy::didDeleteWebsiteDataForOrigins):
3090         Grab the didDeleteWebsiteDataForOrigins and invoke it.
3091
3092         (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
3093         Add the pending callback and send a DeleteWebsiteDataForOrigins to the web process.
3094
3095         * UIProcess/WebProcessProxy.h:
3096         Add new members.
3097
3098         * UIProcess/WebProcessProxy.messages.in:
3099         Add a DidDeleteWebsiteDataForOrigins message.
3100
3101         * WebProcess/WebProcess.cpp:
3102         (WebKit::WebProcess::deleteWebsiteDataForOrigins):
3103         For now, just send back a DidDeleteWebsiteDataForOrigins message.
3104
3105         * WebProcess/WebProcess.h:
3106         Add new members.
3107
3108         * WebProcess/WebProcess.messages.in:
3109         Add a DeleteWebsiteDataForOrigins message.
3110
3111 2015-02-25  Shivakumar JM  <shiva.jm@samsung.com>
3112
3113         Fix build warning in WebKit2/UIProcess module.
3114         https://bugs.webkit.org/show_bug.cgi?id=142014
3115
3116         Reviewed by Anders Carlsson.
3117
3118         Fix build warning by using UNUSED_PARAM macro.
3119
3120         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3121         (WebKit::computeWebProcessAccessTypeForDataFetch):
3122
3123 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
3124
3125         Clarify some resizing terminology in ScrollView/FrameView
3126         https://bugs.webkit.org/show_bug.cgi?id=141996
3127
3128         Reviewed by Zalan Bujtas.
3129
3130         ScrollableArea/ScrollView/FrameView had some confusing terminology around
3131         contentsResized/visibleContentsResized/fixedLayoutSizeChanged.
3132         
3133         Clarify this by distinguishing between:
3134         1. Available size changes because of
3135             i) non-overlay scrollbar presence
3136            ii) ScrollableArea frame change
3137         2. Removing fixedLayoutSizeChanged() and just treating it like an
3138            available size change.
3139            
3140         contentsResized() is relegated to simply being a hook that allows Mac to
3141         flash overlay scrollbars.
3142         
3143         The confusingly named visibleContentsResized() is now updateContentsSize(),
3144         and is the way that a ScrollableArea tells its subclasss that it should recompute
3145         the size of the contents (i.e. do a layout).
3146
3147         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3148         (WebKit::PDFPlugin::scrollbarStyleChanged): Call the base class method,
3149         which takes care of 
3150
3151 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
3152
3153         Use an enum for scrollbar style
3154         https://bugs.webkit.org/show_bug.cgi?id=141985
3155
3156         Reviewed by Beth Dakin.
3157         
3158         Switch to an enum class for the scrollbar style (normal or overlay).
3159         
3160         Sadly it still has to be passed as an int across the process boundary.
3161
3162         * UIProcess/PageClient.h:
3163         * UIProcess/WebPageProxy.cpp:
3164         (WebKit::WebPageProxy::recommendedScrollbarStyleDidChange):
3165         * UIProcess/mac/PageClientImpl.h:
3166         * UIProcess/mac/PageClientImpl.mm:
3167         (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
3168         * WebProcess/Plugins/PDF/PDFPlugin.h:
3169         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3170         (WebKit::PDFPlugin::scrollbarStyleChanged):
3171         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3172         (WebKit::WebChromeClient::recommendedScrollbarStyleDidChange):
3173         * WebProcess/WebCoreSupport/WebChromeClient.h:
3174
3175 2015-02-24  Chris Dumez  <cdumez@apple.com>
3176
3177         [Mac][WK2] ASSERTION FAILED: m_sendPort in IPC::Connection::open()
3178         https://bugs.webkit.org/show_bug.cgi?id=141934
3179
3180         Reviewed by Darin Adler.
3181
3182         Speculative fix for "ASSERTION FAILED: m_sendPort" in
3183         IPC::Connection::open(). This assertion seems to indicate we ended
3184         up in IPC::Connection::open() with MACH_PORT_NULL as port.
3185
3186         I found that in XPCServiceInitializerDelegate::getConnectionIdentifier()
3187         we return true unconditionally, even though
3188         xpc_dictionary_copy_mach_send() can return MACH_PORT_NULL. This patch
3189         updates this method to add a check for MACH_PORT_NULL and return false
3190         in this case.
3191
3192         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
3193         (WebKit::XPCServiceInitializerDelegate::getConnectionIdentifier):
3194
3195 2015-02-24  Commit Queue  <commit-queue@webkit.org>
3196
3197         Unreviewed, rolling out r180599.
3198         https://bugs.webkit.org/show_bug.cgi?id=141998
3199
3200         Lots of new test failures (Requested by smfr on #webkit).
3201
3202         Reverted changeset:
3203
3204         "Parsing support for -webkit-trailing-word"
3205         https://bugs.webkit.org/show_bug.cgi?id=141939
3206         http://trac.webkit.org/changeset/180599
3207
3208 2015-02-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3209
3210         Fix build break on EFL and GTK port since r180585.
3211         https://bugs.webkit.org/show_bug.cgi?id=141994
3212
3213         Reviewed by Joseph Pecoraro.
3214
3215         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
3216         (WebKit::WebsiteDataRecord::displayNameForOrigin):
3217         * UIProcess/WebsiteData/WebsiteDataRecord.h:
3218         (WebKit::WebsiteDataRecord::WebsiteDataRecord):
3219
3220 2015-02-24  Myles C. Maxfield  <mmaxfield@apple.com>
3221
3222         [Mac] [iOS] Parsing support for -apple-trailing-word
3223         https://bugs.webkit.org/show_bug.cgi?id=141939
3224
3225         Reviewed by Andreas Kling.
3226
3227         * Configurations/FeatureDefines.xcconfig:
3228
3229 2015-02-24  Csaba Osztrogonác  <ossy@webkit.org>
3230
3231         Buildfix after r180585.
3232
3233         * CMakeLists.txt:
3234
3235 2015-02-24  Anders Carlsson  <andersca@apple.com>
3236
3237         Pass _WKWebsiteDataRecord objects to the fetchData completion handler
3238         https://bugs.webkit.org/show_bug.cgi?id=141984
3239
3240         Reviewed by Andreas Kling.
3241
3242         * Shared/Cocoa/APIObject.mm:
3243         (API::Object::newObject):
3244         Create _WKWebsiteDataRecord objects for WebsiteDataRecord API objects.
3245
3246         * UIProcess/API/APIWebsiteDataRecord.h:
3247         Add WebsiteDataRecord getter.
3248
3249         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
3250         Add displayName and dataTypes properties.
3251
3252         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
3253         (dataTypesToString):
3254         Helper function to convert dataTypes bit-fields to strings.
3255
3256         (-[_WKWebsiteDataRecord description]):
3257         Include the display name and data types in the description.
3258
3259         (-[_WKWebsiteDataRecord displayName]):
3260         Return the display name.
3261
3262         (-[_WKWebsiteDataRecord dataTypes]):
3263         Return the data types.
3264
3265         * UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
3266         (WebKit::toWebsiteDataTypes):
3267         Move this here from _WKWebsiteDataStore.mm.
3268
3269         (WebKit::toWKWebsiteDataTypes):
3270         Add new function to convert WebsiteDataTypes to WKWebsiteDataTypes.
3271
3272         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3273         (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
3274         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
3275         Qualify toWebsiteDataTypes calls.
3276
3277         * UIProcess/WebsiteData/WebsiteDataRecord.cpp: Added.
3278         (WebKit::WebsiteDataRecord::displayNameForOrigin):
3279         New helper that returns a display name given an origin.
3280
3281         (WebKit::WebsiteDataRecord::add):
3282         Add the origin as well as the type.
3283
3284         * UIProcess/WebsiteData/WebsiteDataRecord.h:
3285         Add new members.
3286
3287         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3288         (WebKit::WebsiteDataStore::fetchData):
3289         Loop through the entries and add them to the m_websiteDataRecords hash map, which
3290         is keyed off of the display name. Pass the m_websiteDataRecords values to the completion handler.
3291
3292         * WebKit2.xcodeproj/project.pbxproj:
3293
3294 2015-02-24  Csaba Osztrogonác  <ossy@webkit.org>
3295
3296         One more buildfix after r180575.
3297
3298         * UIProcess/WebProcessProxy.cpp:
3299         (WebKit::WebProcessProxy::connectionDidClose):
3300
3301 2015-02-24  Csaba Osztrogonác  <ossy@webkit.org>
3302
3303         URTBF after 180575.
3304
3305         * CMakeLists.txt:
3306
3307 2015-02-24  Anders Carlsson  <andersca@apple.com>
3308
3309         Implement more of the data fetching API
3310         https://bugs.webkit.org/show_bug.cgi?id=141975
3311
3312         Reviewed by Andreas Kling.
3313
3314         * Shared/WebsiteData/WebsiteData.cpp: Added.
3315         (WebKit::WebsiteData::Entry::encode):
3316         (WebKit::WebsiteData::Entry::decode):
3317         (WebKit::WebsiteData::encode):
3318         (WebKit::WebsiteData::decode):
3319         * Shared/WebsiteData/WebsiteData.h: Added.
3320         Add a new WebsiteData class that will store website data. Currently it only stores
3321         origin + website data type, but in the future it is going to store more things, like 
3322         host names that have cookies associated.
3323
3324         * UIProcess/WebProcessProxy.cpp:
3325         (WebKit::WebProcessProxy::~WebProcessProxy):
3326         Assert that we don't have any pending fetch data callbacks.
3327
3328         (WebKit::WebProcessProxy::connectionDidClose):
3329         Invoke any pending fetch website data callbacks.
3330
3331         (WebKit::WebProcessProxy::didFetchWebsiteData):
3332         Grab the callback and invoke it.
3333
3334         (WebKit::WebProcessProxy::fetchWebsiteData):
3335         Set up a pending callback and send a FetchWebsiteData message to the web process.
3336
3337         * UIProcess/WebProcessProxy.h:
3338         Add new member.
3339
3340         * UIProcess/WebProcessProxy.messages.in:
3341         Add a DidFetchWebsiteData message.
3342
3343         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3344         (WebKit::computeWebProcessAccessTypeForDataFetch):
3345         Return the web process access type for the given set of data types.
3346
3347         (WebKit::WebsiteDataStore::fetchData):
3348         Set up a callback aggregator that will assemble the needed website data into a vector of website data records.
3349
3350         (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
3351         (WebKit::computeWebProcessAccessTypeForDataRemoval):
3352         Rename these functions to indicate that they are about data removal.
3353
3354         (WebKit::WebsiteDataStore::removeData):
3355         Append "ForDataRemoval" to function calls.
3356
3357         * WebKit2.xcodeproj/project.pbxproj:
3358         Add new files.
3359
3360         * WebProcess/Storage/StorageAreaMap.cpp:
3361         (WebKit::StorageAreaMap::StorageAreaMap):
3362         Tighten types.
3363
3364         * WebProcess/WebProcess.cpp:
3365         (WebKit::WebProcess::fetchWebsiteData):
3366         For now, just fetch memory cache data.
3367
3368         * WebProcess/WebProcess.h:
3369         Add new members.
3370
3371         * WebProcess/WebProcess.messages.in:
3372         Add FetchWebsiteData message.
3373
3374 2015-02-24  Yusuke Suzuki  <utatane.tea@gmail.com>
3375
3376         REGRESSION(r179429): Can't type comments in Facebook
3377         https://bugs.webkit.org/show_bug.cgi?id=141859
3378
3379         Reviewed by Brent Fulgham.
3380
3381         Enable SymbolEnabled in inspector context.
3382
3383         * Shared/WebPreferencesDefinitions.h:
3384         * UIProcess/API/C/WKPreferences.cpp:
3385         (WKPreferencesSetJavaScriptRuntimeFlags):
3386         (WKPreferencesGetJavaScriptRuntimeFlags):
3387         (WKPreferencesSetJavaScriptExperimentsEnabled): Deleted.
3388         (WKPreferencesGetJavaScriptExperimentsEnabled): Deleted.
3389         * UIProcess/API/C/WKPreferencesRef.h:
3390         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3391         * UIProcess/API/Cocoa/WKPreferences.mm:
3392         (-[WKPreferences _javaScriptRuntimeFlags]):
3393         (-[WKPreferences _setJavaScriptRuntimeFlags:]):
3394         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3395         * UIProcess/efl/WebInspectorProxyEfl.cpp:
3396         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3397         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3398         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3399         * UIProcess/mac/WebInspectorProxyMac.mm:
3400         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3401         * WebProcess/WebPage/WebPage.cpp:
3402         (WebKit::WebPage::updatePreferences):
3403         * mac/WebKit2.order:
3404
3405 2015-02-24  Anders Carlsson  <andersca@apple.com>
3406
3407         Tighten up some SecurityOrigin related code, use references where possible
3408         https://bugs.webkit.org/show_bug.cgi?id=141971
3409
3410         Reviewed by Antti Koivisto.
3411
3412         * DatabaseProcess/DatabaseProcess.cpp:
3413         (WebKit::DatabaseProcess::getIndexedDatabaseOrigins):
3414         * Shared/SecurityOriginData.cpp:
3415         (WebKit::SecurityOriginData::fromSecurityOrigin):
3416         (WebKit::SecurityOriginData::securityOrigin):
3417         * Shared/SecurityOriginData.h:
3418         * UIProcess/Storage/StorageManager.cpp:
3419         (WebKit::StorageManager::createTransientLocalStorageMap):
3420         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
3421         (WebKit::WebIDBServerConnection::WebIDBServerConnection):
3422         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
3423         (WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins):
3424         * WebProcess/Storage/StorageAreaMap.cpp:
3425         (WebKit::StorageAreaMap::create):
3426         (WebKit::StorageAreaMap::StorageAreaMap):
3427         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
3428         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
3429         * WebProcess/Storage/StorageAreaMap.h:
3430         * WebProcess/Storage/StorageNamespaceImpl.cpp:
3431         (WebKit::StorageNamespaceImpl::storageArea):
3432
3433 2015-02-24  Michael Catanzaro  <mcatanzaro@igalia.com>
3434
3435         Crash loading local file with WebPageProxy::loadAlternateHTMLString
3436         https://bugs.webkit.org/show_bug.cgi?id=141867
3437
3438         Reviewed by Anders Carlsson.
3439
3440         WebPageProxy::loadAlternateHTMLString needs to assume read access to unreachableURL as well
3441         as baseURL, because unreachableURL will get added to the back/forward list, causing us to
3442         crash later on when we notice the unexpected URL received in checkURLReceivedFromWebProcess.
3443
3444         * UIProcess/WebPageProxy.cpp:
3445         (WebKit::WebPageProxy::loadAlternateHTMLString):
3446
3447 2015-02-24  Ryuan Choi  <ryuan.choi@navercorp.com>
3448
3449         [EFL] Add message APIs to communicate between ewk_context and extensions
3450         https://bugs.webkit.org/show_bug.cgi?id=137660
3451
3452         Reviewed by Gyuyoung Kim.
3453
3454         * PlatformEfl.cmake: Added dependencies for ewk2UnitTestExtensionSample
3455         * UIProcess/API/efl/ewk_context.cpp:
3456         (EwkContext::EwkContext):
3457         (EwkContext::didReceiveMessageFromInjectedBundle):
3458         (EwkContext::setMessageFromExtensionCallback):
3459         (EwkContext::processReceivedMessageFromInjectedBundle):
3460         (ewk_context_message_post_to_extensions):
3461         (ewk_context_message_from_extensions_callback_set):
3462         (EwkContext::didReceiveSynchronousMessageFromInjectedBundle):
3463         Deleted to split synchronouse message APIs from asynchronuous message APIs.
3464         ewebkit will not support this until there are requirements.
3465         (EwkContext::setMessageFromInjectedBundleCallback): Renamed to setMessageFromExtensionCallback.
3466         (ewk_context_message_post_to_injected_bundle): Renamed to ewk_context_message_post_to_extensions.
3467         (ewk_context_message_from_injected_bundle_callback_set): Renamed to ewk_context_message_from_injected_bundle_callback_set.
3468         * UIProcess/API/efl/ewk_context.h:
3469         * UIProcess/API/efl/ewk_context_private.h:
3470         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
3471         Improved test case for ewk_context_new_with_extensions_path using the message APIs.
3472         (EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):
3473         (EWK2UnitTest::EWK2UnitTestBase::SetUp):
3474         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
3475         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
3476         (EWK2UnitTest::EWK2UnitTestEnvironment::extensionSample): Deleted.
3477         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
3478         * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
3479         Improved test case for ewk_context_new_with_extensions_path using the message APIs.
3480         * UIProcess/API/efl/tests/test_ewk2_context.cpp: Ditto.
3481         (EWK2ContextTestWithExtension::messageReceivedCallback):
3482         (EWK2ContextTestWithExtension::EWK2ContextTestWithExtension):
3483         (TEST_F):
3484         * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
3485         (toEwkExtendion):
3486         (EwkExtension::EwkExtension):
3487         (EwkExtension::didCreatePage):
3488         (EwkExtension::willDestroyPage):
3489         (EwkExtension::didReceiveMessage):
3490         (EwkExtension::didReceiveMessageToPage):
3491         (ewk_extension_message_post): Implemented to post message to ewk_context.
3492         * WebProcess/InjectedBundle/API/efl/ewk_extension.h:
3493         * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h:
3494         (EwkExtension::bundle):
3495         * WebProcess/efl/ExtensionManagerEfl.cpp:
3496         (WebKit::ExtensionManagerEfl::initialize):
3497         Fixed the bug when there are different shared objects in extension path.
3498         This is spotted while improving test case.
3499
3500 2015-02-23  Commit Queue  <commit-queue@webkit.org>
3501
3502         Unreviewed, rolling out r180547 and r180550.
3503         https://bugs.webkit.org/show_bug.cgi?id=141957
3504
3505         Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
3506
3507         Reverted changesets:
3508
3509         "REGRESSION(r179429): Can't type comments in Facebook"
3510         https://bugs.webkit.org/show_bug.cgi?id=141859
3511         http://trac.webkit.org/changeset/180547
3512
3513         "Constructor returning null should construct an object instead
3514         of null"
3515         https://bugs.webkit.org/show_bug.cgi?id=141640
3516         http://trac.webkit.org/changeset/180550
3517
3518 2015-02-23  Ryosuke Niwa  <rniwa@webkit.org>
3519
3520         Disable font loading events until our implementation gets updated to match the latest spec
3521         https://bugs.webkit.org/show_bug.cgi?id=141938
3522
3523         Reviewed by Andreas Kling.
3524
3525         * Configurations/FeatureDefines.xcconfig:
3526
3527 2015-02-23  Yusuke Suzuki  <utatane.tea@gmail.com>
3528
3529         REGRESSION(r179429): Can't type comments in Facebook
3530         https://bugs.webkit.org/show_bug.cgi?id=141859
3531
3532         Reviewed by Geoffrey Garen.
3533
3534         Enable SymbolEnabled in inspector context.
3535
3536         * Shared/WebPreferencesDefinitions.h:
3537         * UIProcess/API/C/WKPreferences.cpp:
3538         (WKPreferencesSetJavaScriptRuntimeFlags):
3539         (WKPreferencesGetJavaScriptRuntimeFlags):
3540         (WKPreferencesSetJavaScriptExperimentsEnabled): Deleted.
3541         (WKPreferencesGetJavaScriptExperimentsEnabled): Deleted.
3542         * UIProcess/API/C/WKPreferencesRef.h:
3543         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3544         * UIProcess/API/Cocoa/WKPreferences.mm:
3545         (-[WKPreferences _javaScriptRuntimeFlags]):
3546         (-[WKPreferences _setJavaScriptRuntimeFlags:]):
3547         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3548         * UIProcess/efl/WebInspectorProxyEfl.cpp:
3549         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3550         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3551         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3552         * UIProcess/mac/WebInspectorProxyMac.mm:
3553         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3554         * WebProcess/WebPage/WebPage.cpp:
3555         (WebKit::WebPage::updatePreferences):
3556         * mac/WebKit2.order:
3557
3558 2015-02-23  Benjamin Poulain  <bpoulain@apple.com>
3559
3560         [iOS WK2] The WebProcess keep scrolling pages based on the last velocity after scrolling has been interrupted
3561         https://bugs.webkit.org/show_bug.cgi?id=141933
3562         rdar://problem/18746673
3563         rdar://problem/19711490
3564
3565         Reviewed by Simon Fraser.
3566
3567         The bug happened like this:
3568         1) The user scroll the page. WKContentView tracks the velocity and send
3569            the update rect + velocity to the WebProcess.
3570         2) The user interupts the scrolling but does not commit to either scrolling
3571            again or cancelling the scrolling.
3572            Since we were not notified of this state, the WebProcess still believed
3573            the velocity is stable.
3574         3) With any paint update, the WebProcess would account for the last velocity
3575            and try to guess the best repaint area. This would drift endlessly out
3576            of the view since the view is not really moving.
3577
3578         This patch fixes the issue by adding special handling for interrupted scrolling.
3579
3580         Kudos to Kurt Revis for providing us the required APIs.
3581
3582         * Shared/VisibleContentRectUpdateInfo.h:
3583         (WebKit::operator==):
3584         We can no longer filter VisibleContentRectUpdateInfo ignoring the velocity.
3585
3586         Typically, UIScrollView would call -scrollViewDidScroll: before being interrupted.
3587         If we filter based on the VisibleContentRectUpdateInfo, we have two identical
3588         states differing only by the velocity. If we filter the second update, the WebProcess
3589         would never know the velocity should be zero.
3590
3591         * UIProcess/API/Cocoa/WKWebView.mm:
3592         (-[WKWebView _scrollViewDidInterruptDecelerating:]):
3593         We get this callback when scrolling is interrupted. We just need to clear
3594         the velocity and re-send a new update for the current state.
3595
3596         (-[WKWebView _updateVisibleContentRects]):
3597         Do not consider an interrupted scroll as a stable state. We don't know if scrolling
3598         will resume or will stop.
3599
3600         * UIProcess/ios/WKContentView.h:
3601         * UIProcess/ios/WKContentView.mm:
3602         (-[WKContentView didInterruptScrolling]):
3603
3604 2015-02-23  Anders Carlsson  <andersca@apple.com>
3605
3606         Add API for fetching website data records to _WKWebsiteDataStore
3607         https://bugs.webkit.org/show_bug.cgi?id=141926
3608
3609         Reviewed by Beth Dakin.
3610
3611         * UIProcess/API/APIWebsiteDataRecord.cpp:
3612         (API::WebsiteDataRecord::create):
3613         (API::WebsiteDataRecord::WebsiteDataRecord):
3614         * UIProcess/API/APIWebsiteDataRecord.h:
3615         Update to take a WebsiteDataRecord parameter.
3616
3617         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
3618         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3619         (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
3620         Call down to the WebsiteDataStore.
3621
3622         * UIProcess/WebsiteData/WebsiteDataRecord.h: Added.
3623         This will be the data-container part of WebsiteDataRecord, but it's currently empty.
3624
3625         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3626         (WebKit::WebsiteDataStore::fetchData):
3627         Just dispatch the completion handler for now.
3628
3629         * UIProcess/WebsiteData/WebsiteDataStore.h:
3630         Add new member.
3631
3632         * WebKit2.xcodeproj/project.pbxproj:
3633         Add new files.
3634
3635 2015-02-23  Chris Dumez  <cdumez@apple.com>
3636
3637         Add support for diagnostic logging messages sampling
3638         https://bugs.webkit.org/show_bug.cgi?id=141823
3639         <rdar://problem/19899030>
3640
3641         Reviewed by Andreas Kling.
3642
3643         Add support for diagnostic logging messages sampling to decrease the
3644         impact of diagnostic logging on CPU usage, while still getting useful
3645         overall results. This patch adds a ShouldSample argument to
3646         logDiagnosticMessage*() functions and logs 5% of the messages when
3647         sampling. Sampling is turned on for keys that are known to be verbose
3648         (e.g. per resource load logging).
3649
3650         On the page load test I am tracking, CPU usage caused by diagnostic
3651         logging went down to 0.3% of UIProcess from 2.8% with this change.
3652
3653         * NetworkProcess/NetworkProcess.cpp:
3654         (WebKit::NetworkProcess::logDiagnosticMessage):
3655         (WebKit::NetworkProcess::logDiagnosticMessageWithResult):
3656         (WebKit::NetworkProcess::logDiagnosticMessageWithValue):
3657         * NetworkProcess/NetworkProcess.h:
3658         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
3659         (WebKit::NetworkCacheStatistics::recordNotUsingCacheForRequest):
3660         (WebKit::NetworkCacheStatistics::recordRetrievalFailure):
3661         (WebKit::NetworkCacheStatistics::recordRetrievedCachedEntry):
3662         * UIProcess/Network/NetworkProcessProxy.cpp:
3663         (WebKit::NetworkProcessProxy::logDiagnosticMessage):
3664         (WebKit::NetworkProcessProxy::logDiagnosticMessageWithResult):
3665         (WebKit::NetworkProcessProxy::logDiagnosticMessageWithValue):
3666         * UIProcess/Network/NetworkProcessProxy.h:
3667         * UIProcess/Network/NetworkProcessProxy.messages.in:
3668         * UIProcess/WebPageProxy.cpp:
3669         (WebKit::shouldLogDiagnosticMessage):
3670         (WebKit::WebPageProxy::logDiagnosticMessage):
3671         (WebKit::WebPageProxy::logDiagnosticMessageWithResult):
3672         (WebKit::WebPageProxy::logDiagnosticMessageWithValue):
3673         * UIProcess/WebPageProxy.h:
3674         * UIProcess/WebPageProxy.messages.in:
3675         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
3676         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
3677         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
3678         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
3679         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
3680         * WebProcess/WebPage/ios/WebPageIOS.mm:
3681         (WebKit::WebPage::willStartUserTriggeredZooming):
3682
3683 2015-02-23  Anders Carlsson  <andersca@apple.com>
3684
3685         Add a stubbed out _WKWebsiteDataRecord class
3686         https://bugs.webkit.org/show_bug.cgi?id=141919
3687
3688         Reviewed by Beth Dakin.
3689
3690         Also add the corresponding API::WebsiteDataRecord C++ class. A website data record is going to represent
3691         a set of associated websites and the types of website data that exist for said websites.
3692
3693         * Shared/API/APIObject.h:
3694         * UIProcess/API/APIWebsiteDataRecord.cpp: Added.
3695         * UIProcess/API/APIWebsiteDataRecord.h: Added.
3696         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h: Added.
3697         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm: Added.
3698         * UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h: Added.
3699         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
3700         * WebKit2.xcodeproj/project.pbxproj:
3701
3702 2015-02-23  Timothy Horton  <timothy_horton@apple.com>
3703
3704         Reproducible crash in ViewGestureController::removeSwipeSnapshot()
3705         https://bugs.webkit.org/show_bug.cgi?id=141917
3706         <rdar://problem/19918590>
3707
3708         Reviewed by Brian Weinstein.
3709
3710         * UIProcess/mac/ViewGestureControllerMac.mm:
3711         (WebKit::ViewGestureController::removeSwipeSnapshot):
3712         If the snapshot was purged and we're showing a white snapshot, we won't
3713         be able to mark the (null) snapshot surface as volatile. Add a null check.
3714
3715 2015-02-23  Anders Carlsson  <andersca@apple.com>
3716
3717         Replace another straight-up cast with a toImpl call
3718         https://bugs.webkit.org/show_bug.cgi?id=141914
3719         rdar://problem/19913016
3720
3721         Reviewed by Andreas Kling.
3722
3723         This fixes a problem where Mail would not display message bodies.
3724
3725         * UIProcess/API/Cocoa/WKConnection.mm:
3726         (didReceiveMessage):
3727
3728 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
3729
3730         Scrollbars and ScrollAnimators must always have a ScrollableArea
3731         https://bugs.webkit.org/show_bug.cgi?id=141855
3732
3733         Reviewed by Simon Fraser.
3734         
3735         Change users of the scrollAnimator() method to expect a reference instead of a pointer.
3736
3737         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3738         (WebKit::PDFPlugin::createScrollbar):
3739         (WebKit::PDFPlugin::destroyScrollbar):
3740
3741 2015-02-20  Jessie Berlin  <jberlin@webkit.org>
3742
3743         Build fix after r180465.
3744
3745         * UIProcess/mac/PageClientImpl.h:
3746
3747 2015-02-20  Carlos Alberto Lopez Perez  <clopez@igalia.com>
3748
3749         [GTK] Unreviewed build fix after r180449.
3750
3751         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
3752         (webkit_file_chooser_request_get_selected_files):
3753
3754 2015-02-20  Enrica Casucci  <enrica@apple.com>
3755
3756         [WK2] Add support for font panel on OS X.
3757         https://bugs.webkit.org/show_bug.cgi?id=141777
3758
3759         Reviewed by Tim Horton.
3760
3761         This patch adds the necessary hooks to WKView to support
3762         the font panel. It also includes refactoring of WebPage::editorState
3763         and WebPageProxy::editorStateChanged to separate the different platform
3764         specific tasks.
3765
3766         * Shared/EditorState.cpp:
3767         (WebKit::EditorState::encode):
3768         (WebKit::EditorState::decode):
3769         * Shared/EditorState.h:
3770         (WebKit::EditorState::EditorState):
3771         * UIProcess/API/mac/WKView.mm:
3772         (-[WKView _selectionChanged]):
3773         (-[WKView changeFont:]):
3774         * UIProcess/API/mac/WKViewInternal.h:
3775         * UIProcess/PageClient.h:
3776         * UIProcess/WebPageProxy.cpp:
3777         (WebKit::WebPageProxy::editorStateChanged): Deleted.
3778         * UIProcess/WebPageProxy.h:
3779         * UIProcess/efl/WebPageProxyEfl.cpp:
3780         (WebKit::WebPageProxy::editorStateChanged):
3781         * UIProcess/gtk/WebPageProxyGtk.cpp:
3782         (WebKit::WebPageProxy::editorStateChanged):
3783         * UIProcess/ios/WebPageProxyIOS.mm:
3784         (WebKit::WebPageProxy::editorStateChanged):
3785         * UIProcess/mac/PageClientImpl.h:
3786         * UIProcess/mac/PageClientImpl.mm:
3787         (WebKit::PageClientImpl::selectionDidChange):
3788         * UIProcess/mac/WebPageProxyMac.mm:
3789         (WebKit::WebPageProxy::setFont):
3790         (WebKit::WebPageProxy::editorStateChanged):
3791         * WebProcess/WebPage/WebPage.cpp:
3792         (WebKit::WebPage::editorState):
3793         * WebProcess/WebPage/WebPage.h:
3794         * WebProcess/WebPage/WebPage.messages.in:
3795         * WebProcess/WebPage/efl/WebPageEfl.cpp:
3796         (WebKit::WebPage::platformEditorState):
3797         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
3798         (WebKit::WebPage::platformEditorState):
3799         * WebProcess/WebPage/ios/WebPageIOS.mm:
3800         (WebKit::WebPage::platformEditorState):
3801         * WebProcess/WebPage/mac/WebPageMac.mm:
3802         (WebKit::WebPage::platformEditorState):
3803         (WebKit::WebPage::setFont):
3804
3805 2015-02-20  Chris Dumez  <cdumez@apple.com>
3806
3807         [WK2] Add more detailed diagnostic logging for measuring network cache efficacy
3808         https://bugs.webkit.org/show_bug.cgi?id=141803
3809         <rdar://problem/19632080>
3810
3811         Reviewed by Antti Koivisto.
3812
3813         Add more detailed diagnostic logging for measuring network cache
3814         efficacy.
3815
3816         We want to know the reason the network cache is being by-passed, why
3817         the network cache decided not to cache a response and why it cannot
3818         reuse a cache entry.
3819
3820         This patch adds a new "UncachedReason" table to the SQLite database
3821         to store the reason the network cache is deciding not to cache a
3822         given response. This information is used later, when the resource is
3823         requested again to log the reason why the request cannot be satistied
3824         by the cache.
3825
3826         * NetworkProcess/cache/NetworkCache.cpp:
3827         (WebKit::decodeStorageEntry):
3828         (WebKit::canRetrieve):
3829         (WebKit::NetworkCache::retrieve):
3830         (WebKit::canStore):
3831         (WebKit::NetworkCache::store):
3832         * NetworkProcess/cache/NetworkCache.h:
3833         * NetworkProcess/cache/NetworkCacheStatistics.h:
3834         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
3835         (WebKit::NetworkCacheStatistics::initialize):
3836         (WebKit::NetworkCacheStatistics::recordNotCachingResponse):
3837         (WebKit::retrieveDecisionToDiagnosticKey):
3838         (WebKit::NetworkCacheStatistics::recordNotUsingCacheForRequest):
3839         (WebKit::storeDecisionToDiagnosticKey):
3840         (WebKit::NetworkCacheStatistics::recordRetrievalFailure):
3841         (WebKit::cachedEntryReuseFailureToDiagnosticKey):
3842         (WebKit::NetworkCacheStatistics::recordRetrievedCachedEntry):
3843         (WebKit::NetworkCacheStatistics::queryWasEverRequested):
3844         (WebKit::NetworkCacheStatistics::clear):
3845
3846 2015-02-20  Anders Carlsson  <andersca@apple.com>
3847
3848         API::String should just be a simple wrapper for WTF strings
3849         https://bugs.webkit.org/show_bug.cgi?id=141852
3850
3851         Reviewed by Beth Dakin.
3852
3853         Expose a StringView member function on API::String. Move all the WKString API implementations to WKString.cpp.
3854
3855         * Shared/API/APIString.h:
3856         * Shared/API/c/WKString.cpp:
3857         (WKStringIsEmpty):
3858         (WKStringGetLength):
3859         (WKStringGetCharacters):
3860         (WKStringGetMaximumUTF8CStringSize):
3861         (WKStringGetUTF8CString):
3862         (WKStringIsEqual):
3863         (WKStringIsEqualToUTF8CString):
3864         (WKStringIsEqualToUTF8CStringIgnoringCase):
3865
3866 2015-02-20  Anders Carlsson  <andersca@apple.com>
3867
3868         API::String::string() needs to return an isolated string copy
3869         https://bugs.webkit.org/show_bug.cgi?id=141846
3870
3871         Reviewed by Tim Horton.
3872
3873         Since we can expose API::String objects as NSStrings now, we need to make sure that
3874         we return copied strings so we won't mess up the StringImpl refcounts.
3875
3876         * Shared/API/APIString.h:
3877
3878 2015-02-20  Alexey Proskuryakov  <ap@apple.com>
3879
3880         Remove svn:keywords property.
3881
3882         As far as I can tell, the property had no effect on any of these files, but also,
3883         when it has effect it's likely harmful.
3884
3885         * Platform/spi/ios/DataDetectorsUISPI.h: Removed property svn:keywords.
3886         * Platform/spi/ios/ManagedConfigurationSPI.h: Removed property svn:keywords.
3887         * Platform/spi/ios/TextInputSPI.h: Removed property svn:keywords.
3888         * Scripts/webkit/LegacyMessageReceiver-expected.cpp: Removed property svn:keywords.
3889         * Scripts/webkit/LegacyMessages-expected.h: Removed property svn:keywords.
3890         * Scripts/webkit/MessageReceiver-expected.cpp: Removed property svn:keywords.
3891         * Scripts/webkit/MessageReceiverSuperclass-expected.cpp: Removed property svn:keywords.
3892         * Scripts/webkit/Messages-expected.h: Removed property svn:keywords.
3893         * Scripts/webkit/MessagesSuperclass-expected.h: Removed property svn:keywords.
3894         * UIProcess/ios/PageClientImplIOS.h: Removed property svn:keywords.
3895         * UIProcess/ios/WKActionSheet.h: Removed property svn:keywords.
3896         * UIProcess/ios/WKActionSheetAssistant.h: Removed property svn:keywords.
3897         * UIProcess/ios/WKContentView.h: Removed property svn:keywords.
3898         * UIProcess/ios/WKContentViewInteraction.h: Removed property svn:keywords.
3899         * UIProcess/ios/WKGeolocationProviderIOS.h: Removed property svn:keywords.
3900         * UIProcess/ios/WKScrollView.h: Removed property svn:keywords.
3901         * UIProcess/mac/PageClientImpl.h: Removed property svn:keywords.
3902         * UIProcess/mac/WKPrintingView.h: Removed property svn:keywords.
3903         * UIProcess/mac/WKTextInputWindowController.h: Removed property svn:keywords.
3904         * WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h: Removed property svn:keywords.
3905
3906 2015-02-20  Csaba Osztrogonác  <ossy@webkit.org>
3907
3908         EFL URTBF
3909
3910         * Platform/efl/DispatchQueueEfl.cpp:
3911
3912 2015-02-20  Csaba Osztrogonác  <ossy@webkit.org>
3913
3914         URTBF after r180410, WorkQueue.h is in WTF now.
3915
3916         * Platform/efl/DispatchQueueWorkItemEfl.h:
3917
3918 2015-02-20  Anders Carlsson  <andersca@apple.com>
3919
3920         Use toAPI when returning the object graph as a WKTypeRef
3921         https://bugs.webkit.org/show_bug.cgi?id=141841
3922
3923         Reviewed by Sam Weinig.
3924
3925         * UIProcess/API/Cocoa/WKProcessGroup.mm:
3926         (getInjectedBundleInitializationUserData):
3927
3928 2015-02-20  Eric Carlson  <eric.carlson@apple.com>
3929
3930         [iOS] cleanup AirPlay code
3931         https://bugs.webkit.org/show_bug.cgi?id=141811
3932
3933         Reviewed by Jer Noble.
3934
3935         * Configurations/FeatureDefines.xcconfig: IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
3936         * WebProcess/WebPage/WebPage.cpp:
3937         (WebKit::WebPage::updatePreferences): Ditto.
3938
3939 2015-02-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3940
3941         [WK2][EFL] Fix the build after r180362
3942         https://bugs.webkit.org/show_bug.cgi?id=141836
3943
3944         Reviewed by Carlos Garcia Campos.
3945
3946         As r180409, EFL port needs to add missing includes for several features,
3947         and needs to have a specific implementation of toAPI/toImple for EFL port.
3948
3949         * UIProcess/API/C/WKBatteryManager.cpp:
3950         * UIProcess/API/C/WKPage.cpp:
3951         * UIProcess/API/C/efl/WKAPICastEfl.h:
3952         (WebKit::toAPI):
3953         (WebKit::toImpl):
3954         * UIProcess/API/efl/ewk_url_scheme_request.cpp:
3955         * UIProcess/CoordinatedGraphics/WebViewClient.cpp:
3956         * UIProcess/efl/WebUIPopupMenuClient.cpp:
3957         * UIProcess/efl/WebViewEfl.cpp:
3958         * WebProcess/efl/ExtensionManagerEfl.cpp:
3959
3960 2015-02-20  Antti Koivisto  <antti@apple.com>
3961
3962         Move WorkQueue from WK2 to WTF
3963         https://bugs.webkit.org/show_bug.cgi?id=141797
3964
3965         Reviewed by Anders Carlsson.
3966
3967         * CMakeLists.txt:
3968         * DatabaseProcess/DatabaseProcess.h:
3969         * Platform/IPC/Connection.h:
3970         * Platform/WorkQueue.cpp: Removed.
3971         * Platform/WorkQueue.h: Removed.
3972         * Platform/efl/WorkQueueEfl.cpp: Removed.
3973         * Platform/gtk/WorkQueueGtk.cpp: Removed.
3974         * Platform/mac/WorkQueueMac.cpp: Removed.
3975         * PlatformEfl.cmake:
3976         * PlatformGTK.cmake:
3977         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
3978         * UIProcess/Launcher/ProcessLauncher.cpp:
3979         * UIProcess/Storage/LocalStorageDatabase.cpp:
3980         * UIProcess/Storage/LocalStorageDatabase.h:
3981         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
3982         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
3983         * UIProcess/Storage/StorageManager.cpp:
3984         * UIProcess/Storage/StorageManager.h:
3985         * WebKit2.xcodeproj/project.pbxproj:
3986
3987 2015-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3988
3989         [WK2][GTK] Fix the build after r180362
3990         https://bugs.webkit.org/show_bug.cgi?id=141813
3991
3992         Reviewed by Žan Doberšek.
3993
3994         Add several missing includes and a specific implementation of
3995         toAPI/toImpl for GTK+ WebView.
3996
3997         * UIProcess/API/C/gtk/WKAPICastGtk.h:
3998         (WebKit::toAPI):
3999         (WebKit::toImpl):
4000         * UIProcess/API/C/gtk/WKView.cpp:
4001         * UIProcess/API/gtk/WebKitFormClient.cpp:
4002         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
4003         * UIProcess/gtk/WebInspectorClientGtk.cpp:
4004
4005 2015-02-19  Shivakumar JM  <shiva.jm@samsung.com>
4006
4007         Fix build warning in WebKit2/WebProcess and UIProcess module.
4008         https://bugs.webkit.org/show_bug.cgi?id=141794.
4009
4010         Reviewed by Anders Carlsson.
4011
4012         Fix build warning by using UNUSED_PARAM macro.
4013
4014         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
4015         (WebKit::computeWebProcessAccessType):
4016         * WebProcess/WebProcess.cpp:
4017         (WebKit::WebProcess::deleteWebsiteData):
4018
4019 2015-02-19  Remy Demarest  <rdemarest@apple.com>
4020
4021         Make EnvironmentVariables::appendValue() handle the case where the existing value is an empty string.
4022         https://bugs.webkit.org/show_bug.cgi?id=141818.
4023
4024         Reviewed by Dan Bernstein.
4025
4026         * UIProcess/Launcher/mac/EnvironmentVariables.cpp:
4027         (WebKit::EnvironmentVariables::appendValue): If the existing value is an empty string, replace it rather than
4028         append to it.
4029
4030 2015-02-19  Anders Carlsson  <andersca@apple.com>
4031
4032         Make C SPI objects and modern API objects toll-free bridged
4033         https://bugs.webkit.org/show_bug.cgi?id=141808
4034
4035         Reviewed by Tim Horton.
4036
4037         * Shared/API/APIObject.h:
4038         (API::Object::wrap):
4039         (API::Object::unwrap):
4040         Add default implementations of wrap and unwrap. These just cast.
4041
4042         * Shared/API/c/WKArray.cpp:
4043         (WKArrayCreate):
4044         (WKArrayCreateAdoptingValues):
4045         (WKArrayGetItemAtIndex):
4046         * Shared/API/c/WKDictionary.cpp:
4047         (WKDictionaryGetItemForKey):
4048         Add toImpl and toAPI where necessary.
4049
4050         * Shared/API/c/WKSharedAPICast.h:
4051         Add API::Object::wrap in toAPI and unwrap in toImpl.
4052
4053         * Shared/API/c/WKType.cpp:
4054         (WKGetTypeID):
4055         (WKRetain):
4056         (WKRelease):
4057         Add missing toImpl calls.
4058
4059         * Shared/Cocoa/APIObject.mm:
4060         (API::Object::wrap):
4061         Return the APIObject Objective-C wrapper.
4062
4063         (API::Object::unwrap):
4064         Return the API::Object from the Objective-C object.
4065
4066         * Shared/Cocoa/WKObject.h:
4067         Add wrap and unwrap declarations.
4068
4069         * UIProcess/API/C/WKPage.cpp:
4070         * UIProcess/API/C/WKPageConfigurationRef.cpp:
4071         * UIProcess/API/C/WKPageGroup.cpp:
4072         * UIProcess/API/C/WKUserContentControllerRef.cpp:
4073         Add missing includes; toImpl now requires a complete type.
4074
4075 2015-02-19  Timothy Horton  <timothy_horton@apple.com>
4076
4077         Remove unused forward declaration from WKWebViewInternal.h
4078         https://bugs.webkit.org/show_bug.cgi?id=141806
4079
4080         Reviewed by Anders Carlsson.
4081
4082         * UIProcess/API/Cocoa/WKWebViewInternal.h:
4083         The use of WebCore::Highlight moved to WKContentView.
4084
4085 2015-02-19  Anders Carlsson  <andersca@apple.com>
4086
4087         Use the real implementation type in our API cast traits
4088         https://bugs.webkit.org/show_bug.cgi?id=141805
4089
4090         Reviewed by Sam Weinig.
4091
4092         * Shared/API/c/WKSharedAPICast.h:
4093         (WebKit::toURLRef):
4094         (WebKit::toAPI): Deleted.
4095         (WebKit::toImpl): Deleted.
4096         * UIProcess/GenericCallback.h:
4097
4098 2015-02-19  Anders Carlsson  <andersca@apple.com>
4099
4100         Remove the stray storage manager from WebProcessPool
4101         https://bugs.webkit.org/show_bug.cgi?id=141800
4102
4103         Reviewed by Sam Weinig.
4104
4105         * UIProcess/API/mac/WKView.mm:
4106         (-[WKView dealloc]):
4107         (-[WKView initWithFrame:processPool:configuration:webView:]):
4108         (-[WKView _applicationWillTerminate:]): Deleted.
4109         Remove code that calls applicationWillTerminate on the WebPageProxy.
4110
4111         * UIProcess/WebKeyValueStorageManager.cpp:
4112         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
4113         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
4114         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
4115         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
4116         Get the storage manager from the website data store.
4117
4118         * UIProcess/WebPageProxy.cpp:
4119         (WebKit::WebPageProxy::WebPageProxy):