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