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