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