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