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