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