1 2015-03-13 Alex Christensen <achristensen@webkit.org>
3 Progress towards CMake on Mac.
4 https://bugs.webkit.org/show_bug.cgi?id=142680
6 Reviewed by Gyuyoung Kim.
8 * PlatformMac.cmake: Added.
10 2015-03-13 Commit Queue <commit-queue@webkit.org>
12 Unreviewed, rolling out r181483.
13 https://bugs.webkit.org/show_bug.cgi?id=142688
15 Caused use-after-free on many tests (Requested by ap on
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
24 2015-03-13 Eric Carlson <eric.carlson@apple.com>
26 [Mac] Enable WIRELESS_PLAYBACK_TARGET
27 https://bugs.webkit.org/show_bug.cgi?id=142635
29 Reviewed by Darin Adler.
31 * Configurations/FeatureDefines.xcconfig:
33 2015-03-13 Timothy Horton <timothy_horton@apple.com>
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>
39 Reviewed by Benjamin Poulain.
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.
47 2015-03-13 Mark Lam <mark.lam@apple.com>
49 Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
50 <https://webkit.org/b/142674>
52 Reviewed by Filip Pizlo.
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:
61 2015-03-10 Conrad Shultz <conrad_shultz@apple.com>
63 Allow clients to selectively disable plug-ins
64 https://bugs.webkit.org/show_bug.cgi?id=142506
66 Reviewed by Anders Carlsson.
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:
71 1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
74 2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
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.
80 4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
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.
85 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
86 (WebKit::NetscapePluginModule::getPluginInfo):
87 Set new PluginInfo members.
89 * Shared/WebCoreArgumentCoders.cpp:
90 (IPC::ArgumentCoder<PluginInfo>::encode):
91 Handle new PluginInfo members.
92 (IPC::ArgumentCoder<PluginInfo>::decode):
95 * Shared/WebProcessCreationParameters.h:
96 Declare a member to store client plug-in policies.
98 * Shared/WebProcessCreationParameters.cpp:
99 (WebKit::WebProcessCreationParameters::encode):
101 (WebKit::WebProcessCreationParameters::decode):
104 * UIProcess/API/C/WKAPICast.h:
105 (WebKit::toWKPluginLoadClientPolicy):
106 Teach how to cast between WebCore and WebKit2 policy definitions.
107 (WebKit::toPluginLoadClientPolicy):
110 * UIProcess/API/C/WKPluginLoadPolicy.h:
111 Declare WKPluginLoadClientPolicy, matching PluginLoadClientPolicy in WebCore.
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().
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.
129 * WebProcess/Plugins/PDF/PDFPlugin.mm:
130 (WebKit::PDFPlugin::pluginInfo):
131 Set new PluginInfo member.
133 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
134 (WebKit::pluginSupportsExtension):
135 Adopt getWebVisibleMimesAndPluginIndices().
136 (WebKit::WebFrameLoaderClient::objectContentType):
137 Update to reflect reflect function rename.
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.
156 * WebProcess/WebPage/WebPage.cpp:
157 (WebKit::WebPage::canShowMIMEType):
158 Update to reflect function rename.
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().
169 * WebProcess/WebProcess.messages.in:
170 Add messages for setting and clearing policies.
172 2015-03-12 Jon Honeycutt <jhoneycutt@apple.com>
174 Use UIDocumentMenuViewController to allow selection of files from
175 iCloud Drive in WKFileUploadPanel
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>
181 Reviewed by Andy Estes.
183 * Platform/spi/ios/UIKitSPI.h:
184 Include UIDocumentMenuViewController_Private.h if it exists. If not,
185 declare this new SPI.
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.
193 If we can get a UIImage from the file, create a thumbnail from it.
194 Otherwise, call fallbackIconForFile().
197 Code moved from -[_WKVideoFileUploadItem displayImage].
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.
204 (-[_WKFileUploadItem initWithFileURL:]):
205 Added an initializer that takes a file URL.
207 (-[_WKFileUploadItem fileURL]):
208 (-[_WKImageFileUploadItem initWithFileURL:originalImage:]):
209 (-[_WKVideoFileUploadItem displayImage]):
211 Inherit from UIDocumentPickerDelegate and UIDocumentMenuDelegate. Add
212 an ivar for the document menu controller.
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
224 Return the UTIs for the <input> element's "accept" attribute's MIME
227 (-[WKFileUploadPanel _mediaTypesForPickerSourceType:]):
228 Call UTIsForMIMETypes(). Fall back to available source types for this
231 (-[WKFileUploadPanel _documentPickerMenuMediaTypes]):
232 Call UTIsForMIMETypes(). Fall back to the all-encompassing
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.
241 (-[WKFileUploadPanel _showMediaSourceSelectionSheet]):
242 Changed to use -_cameraButtonLabel and
243 -_presentForCurrentInterfaceIdiom:.
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.
250 (-[WKFileUploadPanel _presentForCurrentInterfaceIdiom:]):
251 (-[WKFileUploadPanel documentMenu:didPickDocumentPicker:]):
252 (-[WKFileUploadPanel documentMenuWasCancelled:]):
253 (-[WKFileUploadPanel documentPicker:didPickDocumentAtURL:]):
254 (-[WKFileUploadPanel documentPickerWasCancelled:]):
255 (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
257 (-[_WKImageFileUploadItem initWithFilePath:originalImage:]): Deleted.
258 (-[_WKImageFileUploadItem fileURL]): Deleted.
259 (-[_WKVideoFileUploadItem initWithFilePath:mediaURL:]): Deleted.
260 (-[_WKVideoFileUploadItem fileURL]): Deleted.
262 2015-03-11 Enrica Casucci <enrica@apple.com>
264 Adopt new API for keyboard event handling.
265 https://bugs.webkit.org/show_bug.cgi?id=142602
266 rdar://problem/19966087
268 Reviewed by Sam Weinig.
272 * UIProcess/ios/WKContentViewInteraction.mm:
273 (-[WKContentView _didHandleKeyEvent:]):
275 2015-03-12 Alexey Proskuryakov <ap@apple.com>
277 testRunner.setAlwaysAcceptCookies does not work with NetworkProcess
278 https://bugs.webkit.org/show_bug.cgi?id=138687
280 Reviewed by Carlos Garcia Campos.
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.
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.
296 2015-03-12 Anders Carlsson <andersca@apple.com>
298 WKErrorDomain should be declared nonnull
299 https://bugs.webkit.org/show_bug.cgi?id=142628
301 Reviewed by Antti Koivisto.
303 Add WK_ASSUME_NONNULL_BEGIN and WK_ASSUME_NONNULL_END so everything will be implicitly nonnull.
305 * UIProcess/API/Cocoa/WKError.h:
307 2015-03-12 Ian Henderson <ian@ianhenderson.org>
309 PDFs don't snapshot properly in iOS Safari
310 https://bugs.webkit.org/show_bug.cgi?id=142623
312 Reviewed by Tim Horton.
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.
319 2015-03-12 Eric Carlson <eric.carlson@apple.com>
321 [Mac] Update AirPlay handling
322 https://bugs.webkit.org/show_bug.cgi?id=142541
324 Unreviewed, respond to post-review comments and add previously reviewed changes
325 missed by a bungled merge.
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:
343 2015-03-11 Antti Koivisto <antti@apple.com>
345 Cache traversal missing large entries
346 https://bugs.webkit.org/show_bug.cgi?id=142601
348 Reviewed by Andreas Kling.
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.
353 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
354 (WebKit::NetworkCache::IOChannel::read):
356 Partial reads only receive one callback with 'done' set to true.
357 Ensure we actually return data in this case.
359 * NetworkProcess/cache/NetworkCacheStorage.cpp:
360 (WebKit::NetworkCache::decodeEntryHeader):
364 2015-03-11 Eric Carlson <eric.carlson@apple.com>
366 [Mac] Update AirPlay handling
367 https://bugs.webkit.org/show_bug.cgi?id=142541
369 Reviewed by Sam Weinig.
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:
432 2015-03-11 Myles C. Maxfield <mmaxfield@apple.com>
438 * Shared/Downloads/mac/DownloadMac.mm:
439 (WebKit::Download::start):
440 (WebKit::Download::resume):
442 2015-03-10 Sam Weinig <sam@webkit.org>
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
448 Reviewed by Anders Carlsson.
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.
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.
475 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
476 (-[WKWebProcessPlugInNodeHandle HTMLInputElementIsAutoFilled]):
477 (-[WKWebProcessPlugInNodeHandle setHTMLInputElementIsAutoFilled:]):
478 Update for new spelling of AutoFill.
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.
487 (WKBundleNodeHandleGetHTMLInputElementAutoFillButtonEnabled):
488 (WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabled):
489 (WKBundleNodeHandleGetHTMLInputElementAutoFillButtonBounds):
492 (WKBundleNodeHandleGetHTMLInputElementAutofilled):
493 (WKBundleNodeHandleSetHTMLInputElementAutofilled):
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.
526 2015-03-11 Timothy Horton <timothy_horton@apple.com>
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
531 Reviewed by Simon Fraser.
533 * Shared/WebPreferencesDefinitions.h:
534 * WebProcess/WebPage/WebPage.cpp:
535 (WebKit::WebPage::updatePreferences):
536 Flip the pref on by default.
538 2015-03-11 Carlos Garcia Campos <cgarcia@igalia.com>
540 [GTK] Do not look for child processes in the UI process binary path
541 https://bugs.webkit.org/show_bug.cgi?id=135752
543 Reviewed by Gustavo Noronha Silva.
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
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.
556 2015-03-10 Antti Koivisto <antti@apple.com>
558 Add interface to delete disk cache entries
559 https://bugs.webkit.org/show_bug.cgi?id=142546
561 Reviewed by Anders Carlsson.
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):
570 Move deletion to a serial queue so we can't create large number of threads.
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):
578 2015-03-10 Chris Dumez <cdumez@apple.com>
580 5 tests fail on Apple Mac WK2 performance bots
581 https://bugs.webkit.org/show_bug.cgi?id=142485
583 Reviewed by Andreas Kling.
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()).
591 * Shared/mac/SandboxExtensionMac.mm:
592 (WebKit::SandboxExtension::createHandle):
594 2015-03-10 Timothy Horton <timothy_horton@apple.com>
598 * Shared/Downloads/ios/DownloadIOS.mm:
599 (WebKit::Download::startWithHandle):
600 * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
601 (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:connection:]):
603 2015-03-10 Carlos Garcia Campos <cgarcia@igalia.com>
605 [GTK] Contents not shown when entering AC mode unless the window is resized
606 https://bugs.webkit.org/show_bug.cgi?id=142347
608 Reviewed by Žan Doberšek.
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.
620 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
621 (webkitWebViewBaseEnterAcceleratedCompositingMode):
622 * UIProcess/DrawingAreaProxyImpl.h:
623 (WebKit::DrawingAreaProxyImpl::forceResize):
625 2015-03-10 Csaba Osztrogonác <ossy@webkit.org>
627 [cmake] Handle unused parameter warnings as build errors except in WebKit2
628 https://bugs.webkit.org/show_bug.cgi?id=142338
630 Reviewed by Gyuyoung Kim.
634 2015-03-10 Dan Bernstein <mitz@apple.com>
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
639 Reviewed by Sam Weinig.
641 * UIProcess/API/Cocoa/WKWebView.mm:
642 (-[WKWebView initWithFrame:configuration:]): Initialize
643 webPageConfiguration.treatsSHA1SignedCertificatesAsInsecure from the WKWebViewConfiguration.
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.
651 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declared new
652 _treatsSHA1SignedCertificatesAsInsecure property.
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:
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.
667 2015-03-09 Geoffrey Garen <ggaren@apple.com>
669 bmalloc: tryFastMalloc shouldn't crash
670 https://bugs.webkit.org/show_bug.cgi?id=142443
672 Reviewed by Anders Carlsson.
674 Part 1: Stop using tryFastRealloc.
676 * Shared/ShareableBitmap.cpp:
677 (WebKit::ShareableBitmap::resize): Deleted.
678 * Shared/ShareableBitmap.h: Removed the resize function because it has
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:
685 (1) Might be more memory-efficient, since you don't have to keep the old
686 one around while allocating the new one.
688 (2) Avoids the overhead of realloc() copying the contents of the old
689 backing store even though we only want uninitialized memory.
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
697 2015-03-09 Martin Robinson <mrobinson@igalia.com>
699 [EFL] Move DispatchQueue to WTF
700 https://bugs.webkit.org/show_bug.cgi?id=142493
702 Reviewed by Csaba Osztrogonác.
704 * PlatformEfl.cmake: Remove DispatchQueue from the source list.
706 2015-03-08 Dean Jackson <dino@apple.com>
708 [iOS Media] Video buffer progress missing on iPhones
709 https://bugs.webkit.org/show_bug.cgi?id=142462
711 Reviewed by Eric Carlson.
713 Coordinate the SetBufferedTime message between the Web and UI
716 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: New message SetBufferedTime.
717 * WebProcess/ios/WebVideoFullscreenManager.h:
718 * WebProcess/ios/WebVideoFullscreenManager.mm:
719 (WebKit::WebVideoFullscreenManager::setBufferedTime):
721 2015-03-08 Sam Weinig <sam@webkit.org>
723 [Content Extensions] Add scaffolding for the WKUserContentExtensionStore
724 https://bugs.webkit.org/show_bug.cgi?id=142464
726 Reviewed by Dan Bernstein.
728 * Shared/API/APIObject.h:
729 Add a UserContentExtensionStore type and move the UserContentExtension type into the correct section (UIProcess).
731 * Shared/API/c/WKBase.h:
732 Add the WKUserContentExtensionStoreRef C-SPI type.
734 * Shared/Cocoa/APIObject.mm:
735 (API::Object::newObject):
736 Add allocation support for UserContentExtensionStore (and UserContentExtension while we are there, it will be
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.
745 * UIProcess/API/C/WKAPICast.h:
746 Add casting for the UserContentExtensionStore.
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.
758 Stub out SPI for the UserContentExtensionStore.
760 * WebKit2.xcodeproj/project.pbxproj:
764 2015-03-08 Sam Weinig <sam@webkit.org>
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
770 Reviewed by Dan Bernstein.
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:].
780 2015-03-08 Sam Weinig <sam@webkit.org>
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
785 Reviewed by Dan Bernstein.
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.
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.
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.
811 * UIProcess/API/C/WKUserContentFilterRef.cpp:
812 (WKUserContentFilterCreate):
813 * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
814 (-[_WKUserContentFilter initWithName:serializedRules:]):
815 Switch to using WebCompiledContentExtension::createFromCompiledContentExtensionData().
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.
823 2015-03-08 Carlos Garcia Campos <cgarcia@igalia.com>
825 Remove willDestroyFrame in WKBundlePageLoaderClient
826 https://bugs.webkit.org/show_bug.cgi?id=142389
828 Reviewed by Anders Carlsson.
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.
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):
848 2015-03-06 Sam Weinig <sam@webkit.org>
850 [Content Extensions] Move compiling of content extensions to the UIProcess
851 https://bugs.webkit.org/show_bug.cgi?id=142402
853 Reviewed by Benjamin Poulain.
855 * Shared/API/APIObject.h:
856 Rename UserContentFilter type to UserContentExtension to match new unified naming.
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
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.
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.
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.
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.
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.
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.
924 * UIProcess/API/Cocoa/_WKUserContentFilterInternal.h:
926 Update for rename of APIUserContentFilter -> UserContentExtension.
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.
967 2015-03-06 Dean Jackson <dino@apple.com>
969 Support "plus-lighter" in mix-blend mode
970 https://bugs.webkit.org/show_bug.cgi?id=142416
971 <rdar://problem/19993979>
973 Reviewed by Darin Adler and Sam Weinig.
975 Output the appropriate blending type when logging.
977 * Shared/mac/RemoteLayerTreeTransaction.mm:
978 (WebKit::RemoteLayerTreeTextStream::operator<<):
980 2015-03-06 Beth Dakin <bdakin@apple.com>
982 REGRESSION (r180782): Data Detector popovers are not dismissed on scroll or zoom
983 https://bugs.webkit.org/show_bug.cgi?id=142371
985 rdar://problem/20059224
987 Reviewed by Tim Horton.
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:]):
1002 2015-03-06 Jeremy Jones <jeremyj@apple.com>
1004 Scroll to make the video element visible when exiting fullscreen.
1005 https://bugs.webkit.org/show_bug.cgi?id=141439
1007 Reviewed by Simon Fraser.
1009 This patch will restore interface state when exiting fullscreen.
1010 Adds preparedToReturnToInline to continue exiting once the interface is updated.
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):
1023 2015-03-06 Antti Koivisto <antti@apple.com>
1025 Rename NetworkCacheStorageCocoa.mm to NetworkCacheStorage.cpp
1026 https://bugs.webkit.org/show_bug.cgi?id=142401
1028 Rubber-stamped by Anders Carlsson.
1030 It is now fully cross-platform.
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:
1037 2015-03-06 Antti Koivisto <antti@apple.com>
1039 Don't use dispatch_semaphore in NetworkCacheStorage
1040 https://bugs.webkit.org/show_bug.cgi?id=142395
1042 Reviewed by Anders Carlsson.
1044 * NetworkProcess/cache/NetworkCacheIOChannel.h:
1045 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
1046 (WebKit::NetworkCache::IOChannel::read):
1047 (WebKit::NetworkCache::IOChannel::readSync):
1049 Add readSync to encapsulate the semaphore.
1051 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1052 (WebKit::NetworkCache::Storage::traverse):
1054 2015-03-06 Antti Koivisto <antti@apple.com>
1056 Move dispatch_data use behind NetworkCache::Data abstraction
1057 https://bugs.webkit.org/show_bug.cgi?id=142392
1059 Reviewed by Anders Carlsson.
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.
1081 2015-03-06 Antti Koivisto <antti@apple.com>
1083 Use WTF abstraction for page size in NetworkCacheStorage
1084 https://bugs.webkit.org/show_bug.cgi?id=142396
1086 Reviewed by Darin Adler.
1088 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1089 (WebKit::NetworkCache::decodeEntryMetaData):
1090 (WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
1092 2015-03-06 Myles C. Maxfield <mmaxfield@apple.com>
1094 [iOS] SVG fonts are garbled
1095 https://bugs.webkit.org/show_bug.cgi?id=142377
1097 Reviewed by Simon Fraser.
1099 * Configurations/FeatureDefines.xcconfig:
1101 2015-03-06 Zan Dobersek <zdobersek@igalia.com>
1103 Unguarded GTK-specific member and method usage in DrawingAreaImpl
1104 https://bugs.webkit.org/show_bug.cgi?id=142391
1106 Reviewed by Carlos Garcia Campos.
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.
1113 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1114 (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
1116 2015-03-06 David Kilzer <ddkilzer@apple.com>
1118 REGRESSION (r181140): WebKit2 fails to build on Mavericks buildbot
1120 Work around Xcode dependency tracking issues by making changes
1121 to source files that need to be recompiled.
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.
1128 2015-03-05 Antti Koivisto <antti@apple.com>
1130 Move disk cache classes to namespace
1131 https://bugs.webkit.org/show_bug.cgi?id=142339
1133 Reviewed by Anders Carlsson.
1135 Move everything to NetworkCache namespace.
1137 2015-03-05 Carlos Garcia Campos <cgarcia@igalia.com>
1139 REGRESSION(r180924): ASSERTION FAILED: !from.isEmpty() in WebCore::TransformationMatrix::rectToRect
1140 https://bugs.webkit.org/show_bug.cgi?id=142345
1142 Reviewed by Martin Robinson.
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.
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:
1167 2015-03-05 Anders Carlsson <andersca@apple.com>
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
1173 Reviewed by Tim Horton.
1175 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1176 (-[WKRemoteObjectEncoder encodeInt32:forKey:]):
1177 (-[WKRemoteObjectDecoder decodeInt32ForKey:]):
1179 2015-03-05 Chris Dumez <cdumez@apple.com>
1181 NetworkCache efficacy logging is using too much CPU
1182 https://bugs.webkit.org/show_bug.cgi?id=142186
1183 <rdar://problem/19632080>
1185 Reviewed by Antti Koivisto.
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).
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).
1197 Now that CPU usage is more acceptable, this patch re-enables the
1198 network cache efficicy logging.
1200 * NetworkProcess/cache/NetworkCacheStatistics.h:
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().
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.
1223 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1224 (WebKit::registerUserDefaultsIfNeeded):
1225 Re-enable the network cache efficacy logging.
1227 2015-03-05 Antti Koivisto <antti@apple.com>
1229 Switch NetworkCacheStorage to WorkQueue abstraction
1230 https://bugs.webkit.org/show_bug.cgi?id=142337
1232 Reviewed by Anders Carlsson.
1234 Don't use dispatch_async directly.
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):
1252 2015-03-05 Lukasz Bialek <l.bialek@samsung.com>
1254 [EFL][WK2] Crash when "Download Linked File" from MiniBrowser context menu is clicked
1255 https://bugs.webkit.org/show_bug.cgi?id=131162
1257 Reviewed by Gyuyoung Kim.
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).
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.
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
1300 2015-03-05 Michael Catanzaro <mcatanzaro@igalia.com>
1303 https://bugs.webkit.org/show_bug.cgi?id=140014
1305 Reviewed by Carlos Garcia Campos.
1307 Disallow RC4-based ciphersuites when performing TLS negotiation,
1308 because it is no longer considered secure.
1310 * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
1312 * WebProcess/EntryPoint/unix/WebProcessMain.cpp:
1315 2015-03-04 Yusuke Suzuki <utatane.tea@gmail.com>
1317 Hide Promise with runtime flags under Cocoa JSContext API
1318 https://bugs.webkit.org/show_bug.cgi?id=141965
1320 Reviewed by Filip Pizlo.
1322 Add new JSC runtime flag, PromiseDisabled.
1324 * UIProcess/API/C/WKPreferencesRefPrivate.h:
1325 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1327 2015-03-04 Beth Dakin <bdakin@apple.com>
1329 Attempted build fix.
1331 * UIProcess/API/Cocoa/WKViewPrivate.h:
1333 2015-03-04 Beth Dakin <bdakin@apple.com>
1335 Message UI process when contentSize changes
1336 https://bugs.webkit.org/show_bug.cgi?id=142294
1338 rdar://problem/19963165
1340 Reviewed by Andreas Kling.
1342 This patch un-ifdefs the didChangeContentSize message so that we can use it on Mac
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:
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):
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:
1369 2015-03-04 Antti Koivisto <antti@apple.com>
1371 Factor platform I/O out from NetworkCacheStorage
1372 https://bugs.webkit.org/show_bug.cgi?id=142279
1374 Reviewed by Chris Dumez.
1376 * NetworkProcess/cache/NetworkCacheData.h: Added.
1377 * NetworkProcess/cache/NetworkCacheDataCocoa.mm: Added.
1379 NetworkCacheStorage::Data -> NetworkCacheData
1380 Move to files of its own.
1382 * NetworkProcess/cache/NetworkCacheIOChannel.h: Added.
1383 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm: Added.
1385 Add abstraction for dispatch IO channels.
1387 2015-03-04 Joseph Pecoraro <pecoraro@apple.com>
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
1393 Reviewed by David Kilzer.
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.
1398 * mac/postprocess-framework-headers.sh:
1400 2015-03-04 Debarshi Ray <debarshir@gnome.org>
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
1405 Reviewed by Carlos Garcia Campos.
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):
1419 2015-03-03 Shivakumar JM <shiva.jm@samsung.com>
1421 Fix build warning in WebKit2/Shared module.
1422 https://bugs.webkit.org/show_bug.cgi?id=142213
1424 Reviewed by Simon Fraser.
1426 Fix build warning by removing argument name from function.
1428 * Shared/WebCoreArgumentCoders.cpp:
1429 (IPC::pathPointCountApplierFunction):
1431 2015-03-03 Andy Estes <aestes@apple.com>
1433 [Content Filtering] Separate unblock handling into its own class
1434 https://bugs.webkit.org/show_bug.cgi?id=142251
1436 Reviewed by Andreas Kling.
1438 Adopted ContentFilterUnblockHandler.
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:
1460 2015-03-03 Chris Dumez <cdumez@apple.com>
1462 [WK2] Fix memory leak in _getCookieHeadersForTask
1463 https://bugs.webkit.org/show_bug.cgi?id=142245
1465 Reviewed by Alexey Proskuryakov.
1467 Fix memory leak in _getCookieHeadersForTask. We are leaking the CFDictionary
1468 returned by webKitCookieStorageCopyRequestHeaderFieldsForURL().
1470 This patch addresses the issue by storing the return CFDictionary in a
1471 RetainPtr<CFDictionaryRef>.
1473 * Shared/mac/CookieStorageShim.mm:
1474 (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
1476 2015-03-03 Enrica Casucci <enrica@apple.com>
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
1482 Reviewed by Tim Horton.
1484 The empty stub for insertDictationResult:withCorrectionIdentifier
1485 must be removed. This way UIKit will call insertText and do the right thing.
1487 * UIProcess/ios/WKContentViewInteraction.mm:
1488 (-[WKContentView insertDictationResult:withCorrectionIdentifier:]): Deleted.
1490 2015-03-03 Dean Jackson <dino@apple.com>
1492 Controls panel should have system blurry background
1493 https://bugs.webkit.org/show_bug.cgi?id=142154
1494 <rdar://problem/20000964>
1496 Reviewed by Simon Fraser.
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
1504 * Shared/mac/RemoteLayerBackingStore.mm:
1505 (WebKit::RemoteLayerBackingStore::drawInContext): Add entries for
1506 the new layer types, even though they are not correct yet.
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.
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):
1525 2015-03-03 Chris Dumez <cdumez@apple.com>
1527 Access ApplicationCacheStorage global instance via singleton() static member function
1528 https://bugs.webkit.org/show_bug.cgi?id=142239
1530 Reviewed by Anders Carlsson.
1532 Access ApplicationCacheStorage global instance via singleton() static
1533 member function as per WebKit coding style.
1535 2015-03-03 Joseph Pecoraro <pecoraro@apple.com>
1537 Build Fix: Add fall back handling in postprocess script for missing/unknown platform name.
1539 Rubber-stamped by David Kilzer.
1541 * mac/postprocess-framework-headers.sh:
1543 2015-03-03 Enrica Casucci <enrica@apple.com>
1549 * UIProcess/ios/WKContentViewInteraction.mm: Adding forward declaration.
1551 2015-03-03 Antti Koivisto <antti@apple.com>
1553 Include key to NetworkCacheStorage::Entry
1554 https://bugs.webkit.org/show_bug.cgi?id=142215
1556 Reviewed by Chris Dumez.
1558 This simplified code. The key is saved as part of the entry so it makes logical sense too.
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):
1586 2015-03-03 Antti Koivisto <antti@apple.com>
1588 Cache shrink leaves behind empty partition directories
1589 https://bugs.webkit.org/show_bug.cgi?id=142217
1591 Reviewed by Andreas Kling.
1593 * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
1594 (WebKit::traverseCacheFiles):
1596 No need for std::function.
1598 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1599 (WebKit::NetworkCacheStorage::shrinkIfNeeded):
1601 After shrink traverse through the partition directories and try to delete them.
1602 System knows if they are actually empty.
1604 2015-03-03 Anders Carlsson <andersca@apple.com>
1606 Use the correct display name for website data for local files
1607 https://bugs.webkit.org/show_bug.cgi?id=142228
1609 Reviewed by Dan Bernstein.
1611 * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
1612 (displayNameForLocalFiles):
1613 Add new helper function.
1615 (WebKit::WebsiteDataRecord::displayNameForCookieHostName):
1616 Check if the hostname is kCFHTTPCookieLocalFileDomain.
1618 (WebKit::WebsiteDataRecord::displayNameForOrigin):
1619 Handle file URLs as well.
1621 2015-03-03 Enrica Casucci <enrica@apple.com>
1623 Fixed typo in platform guard in http://trac.webkit.org/changeset/180939.
1627 * UIProcess/ios/WKContentViewInteraction.mm:
1629 2015-03-03 Enrica Casucci <enrica@apple.com>
1631 Adopt new API for keyboard interaction.
1632 https://bugs.webkit.org/show_bug.cgi?id=142201
1633 rdar://problem/19924949
1635 Reviewed by Joseph Pecoraro.
1637 * UIProcess/ios/WKContentViewInteraction.mm:
1638 (-[WKContentView inputAssistantItem]):
1639 (-[WKContentView _inputAssistantItem]):
1641 2015-03-03 Carlos Garcia Campos <cgarcia@igalia.com>
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
1646 Reviewed by Žan Doberšek.
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.
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
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:
1684 2015-03-02 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1686 [WK2] Remove unnecessary create() factory functions.
1687 https://bugs.webkit.org/show_bug.cgi?id=142161
1689 Reviewed by Chris Dumez.
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.
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):
1711 2015-03-02 Brady Eidson <beidson@apple.com>
1713 Lots of: ERROR: Unhandled web process message WebPageGroupProxy:RemoveAllUserContentFilters
1714 https://bugs.webkit.org/show_bug.cgi?id=142155
1716 Reviewed by Simon Fraser.
1718 * WebProcess/WebProcess.cpp:
1719 (WebKit::WebProcess::didReceiveMessage): Return after handling WebPageGroupProxy messages
1720 instead of logging an error.
1722 2015-03-02 Antti Koivisto <antti@apple.com>
1724 Add way to dump cache meta data to file
1725 https://bugs.webkit.org/show_bug.cgi?id=142183
1727 Add a missing return so we don't try to decode a null entry.
1729 * NetworkProcess/cache/NetworkCache.cpp:
1730 (WebKit::NetworkCache::dumpContentsToFile):
1732 2015-03-02 Anders Carlsson <andersca@apple.com>
1734 Return disk cache entries from the new disk cache
1735 https://bugs.webkit.org/show_bug.cgi?id=142190
1737 Reviewed by Antti Koivisto.
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.
1743 * NetworkProcess/cache/NetworkCache.cpp:
1744 (WebKit::NetworkCache::traverse):
1745 New helper function that traverses network cache entries.
1747 * NetworkProcess/cache/NetworkCache.h:
1749 2015-03-02 Antti Koivisto <antti@apple.com>
1751 Add way to dump cache meta data to file
1752 https://bugs.webkit.org/show_bug.cgi?id=142183
1754 Reviewed by Andreas Kling.
1756 Dump goes to WebKitCache/dump.json. On OSX it can be triggered with
1758 notifyutil -p com.apple.WebKit.Cache.dump
1760 * NetworkProcess/cache/NetworkCache.cpp:
1761 (WebKit::NetworkCache::initialize):
1762 (WebKit::NetworkCache::dumpFilePath):
1763 (WebKit::entryAsJSON):
1764 (WebKit::NetworkCache::dumpContentsToFile):
1765 (WebKit::NetworkCache::clear):
1767 Also clear any dumps.
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):
1776 (WebKit::openFileForKey):
1777 (WebKit::decodeEntryHeader):
1779 Separate header decoding.
1781 (WebKit::decodeEntry):
1782 (WebKit::NetworkCacheStorage::traverse):
1784 Add asynchronous cache traversal inteface.
1786 2015-03-02 Anders Carlsson <andersca@apple.com>
1788 WebsiteDataStore should handle deleting cookies
1789 https://bugs.webkit.org/show_bug.cgi?id=142185
1791 Reviewed by Beth Dakin.
1793 * NetworkProcess/NetworkProcess.cpp:
1794 (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
1795 When asked to delete cookies, do so.
1797 * NetworkProcess/NetworkProcess.h:
1798 Update the deleteWebsiteDataForOrigins signature.
1800 * NetworkProcess/NetworkProcess.messages.in:
1801 Add cookieHostNames to DeleteWebsiteDataForOrigins.
1803 * UIProcess/Network/NetworkProcessProxy.cpp:
1804 (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
1805 * UIProcess/Network/NetworkProcessProxy.h:
1806 Update to take a vector of cookie host names.
1808 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1809 (WebKit::WebsiteDataStore::removeData):
1810 Figure out if we need to ask the network process to delete data.
1812 2015-03-02 Anders Carlsson <andersca@apple.com>
1814 WebsiteDataStore should support getting cookie host names
1815 https://bugs.webkit.org/show_bug.cgi?id=142178
1817 Reviewed by Dan Bernstein.
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.
1823 * Shared/WebsiteData/WebsiteData.cpp:
1824 (WebKit::WebsiteData::encode):
1825 (WebKit::WebsiteData::decode):
1826 * Shared/WebsiteData/WebsiteData.h:
1827 Add a hostnamesWithCookies member.
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.
1833 (WebKit::WebsiteDataRecord::addCookieHostName):
1834 * UIProcess/WebsiteData/WebsiteDataRecord.h:
1835 Add a hash set of cookie host names.
1837 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1838 (WebKit::WebsiteDataStore::fetchData):
1839 Create data records for each host name with cookies.
1841 2015-03-02 Jer Noble <jer.noble@apple.com>
1843 [WK2][Mac] WebPageProxy::supressVisibilityUpdates() should suppress visibility updates.
1844 https://bugs.webkit.org/show_bug.cgi?id=141907
1846 Reviewed by Tim Horton.
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.
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.
1858 * UIProcess/WebPageProxy.cpp:
1859 (WebKit::WebPageProxy::setSuppressVisibilityUpdates):
1860 (WebKit::WebPageProxy::viewStateDidChange):
1861 * UIProcess/WebPageProxy.h:
1862 (WebKit::WebPageProxy::setSuppressVisibilityUpdates): Deleted.
1864 2015-03-02 Jer Noble <jer.noble@apple.com>
1866 [WK1][WK2][Mac] Fullscreen animation is incorrect when page is scaled.
1867 https://bugs.webkit.org/show_bug.cgi?id=142121
1869 Reviewed by Simon Fraser.
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
1875 * UIProcess/mac/WKFullScreenWindowController.mm:
1876 (-[WKFullScreenWindowController enterFullScreen:]):
1877 (-[WKFullScreenWindowController exitFullScreen]):
1879 2015-03-01 Simon Fraser <simon.fraser@apple.com>
1881 Make clip-path work on <video>, <canvas> etc.
1882 https://bugs.webkit.org/show_bug.cgi?id=138684
1884 Reviewed by Darin Adler.
1886 Support encode/decode for WebCore Path objects, which is done by traversing
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:
1909 2015-03-01 Chris Dumez <cdumez@apple.com>
1911 Make NotificationCenter / Notification suspendable
1912 https://bugs.webkit.org/show_bug.cgi?id=142117
1913 <rdar://problem/19923085>
1915 Reviewed by Andreas Kling.
1917 Provide implementation for NotificationClient::hasPendingPermissionRequests().
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:
1926 2015-03-01 Antti Koivisto <antti@apple.com>
1928 Enable new disk cache on iOS
1929 https://bugs.webkit.org/show_bug.cgi?id=142148
1931 Reviewed by Sam Weinig.
1933 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1937 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1938 (WebKit::registerUserDefaultsIfNeeded):
1940 Disable the efficacy logging by default for now. It has significant performance impact.
1946 2015-02-28 Anders Carlsson <andersca@apple.com>
1948 WebsiteDataStore should handle fetching and deleting local storage data
1949 https://bugs.webkit.org/show_bug.cgi?id=142137
1951 Reviewed by Sam Weinig.
1953 * UIProcess/Storage/StorageManager.cpp:
1954 (WebKit::StorageManager::deleteEntriesForOrigins):
1955 Add a new function that deletes entries from multiple origins.
1957 * UIProcess/Storage/StorageManager.h:
1960 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1961 (WebKit::WebsiteDataStore::fetchData):
1962 Fetch local storage data as well.
1964 (WebKit::WebsiteDataStore::removeData):
1965 Delete local storage data as well.
1967 2015-02-28 Anders Carlsson <andersca@apple.com>
1969 Fetch cache origins from the network process
1970 https://bugs.webkit.org/show_bug.cgi?id=142135
1972 Reviewed by Dan Bernstein.
1974 * NetworkProcess/NetworkProcess.cpp:
1975 (WebKit::cfURLCacheOrigins):
1976 Add a new helper function that returns a vector of CFURL cache origins.
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.
1981 (WebKit::NetworkProcess::fetchWebsiteData):
1982 Create a callback aggregator and fetch disk cache origins if we're asked for it.
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.
1988 (WebKit::WebsiteDataStore::fetchData):
1989 Fetch website data from the network process as well.
1991 2015-02-28 Anders Carlsson <andersca@apple.com>
1993 Simplify WebResourceCacheManagerCFNet.mm code
1994 https://bugs.webkit.org/show_bug.cgi?id=142134
1996 Reviewed by Dan Bernstein.
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.
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.
2012 2015-02-28 Commit Queue <commit-queue@webkit.org>
2014 Unreviewed, rolling out r180804.
2015 https://bugs.webkit.org/show_bug.cgi?id=142131
2017 Broke nightlies (Requested by ap on #webkit).
2021 "[WK2] Drop legacy WKBundlePageDiagnosticLoggingClient API"
2022 https://bugs.webkit.org/show_bug.cgi?id=141176
2023 http://trac.webkit.org/changeset/180804
2025 2015-02-27 Hunseop Jeong <hs85.jeong@samsung.com>
2027 [EFL][GTK] Fix build break after r180790,180798
2028 https://bugs.webkit.org/show_bug.cgi?id=142127
2030 Reviewed by Gyuyoung Kim.
2034 2015-02-27 Chris Dumez <cdumez@apple.com>
2036 [WK2] Drop legacy WKBundlePageDiagnosticLoggingClient API
2037 https://bugs.webkit.org/show_bug.cgi?id=141176
2039 Reviewed by Sam Weinig.
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.
2046 * Shared/API/c/WKSharedAPICast.h:
2047 (WebKit::toAPI): Deleted.
2048 (WebKit::toDiagnosticLoggingResultType): Deleted.
2049 * UIProcess/API/C/WKAPICast.h:
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.
2070 2015-02-27 Anders Carlsson <andersca@apple.com>
2072 Rename WebResourceCacheManagerCFNet.cpp to WebResourceCacheManagerCFNet.mm
2074 Rubber-stamped by Dan Bernstein.
2076 This will let us use lambda to block conversion in a subsequent patch.
2078 * WebKit2.xcodeproj/project.pbxproj:
2079 * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm: Renamed from Source/WebKit2/WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp.
2081 2015-02-27 Commit Queue <commit-queue@webkit.org>
2083 Unreviewed, rolling out r180203 and r180210.
2084 https://bugs.webkit.org/show_bug.cgi?id=142116
2086 broke process suspension and tile map (Requested by thorton on
2089 Reverted changesets:
2091 "Adopt CAMachPort-as-layer-contents"
2092 https://bugs.webkit.org/show_bug.cgi?id=141687
2093 http://trac.webkit.org/changeset/180203
2095 "Fix the !USE(IOSURFACE) build"
2096 http://trac.webkit.org/changeset/180210
2098 2015-02-27 Sam Weinig <sam@webkit.org>
2100 Add WebKit2 SPI to create a DOM File object
2101 https://bugs.webkit.org/show_bug.cgi?id=142109
2103 Reviewed by Tim Horton.
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.
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:
2133 2015-02-27 Beth Dakin <bdakin@apple.com>
2135 Lookup panel dismisses when pages are loading in other tabs/windows
2136 https://bugs.webkit.org/show_bug.cgi?id=142104
2138 rdar://problem/19882137
2140 Reviewed by Tim Horton.
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]):
2147 2015-02-27 Anders Carlsson <andersca@apple.com>
2149 Add infrastructure for handling website data in the network process
2150 https://bugs.webkit.org/show_bug.cgi?id=142092
2152 Reviewed by Andreas Kling.
2154 * NetworkProcess/NetworkProcess.cpp:
2155 (WebKit::NetworkProcess::fetchWebsiteData):
2156 (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
2157 Send back "Did" messages without actually doing anything for now.
2159 * NetworkProcess/NetworkProcess.h:
2162 * NetworkProcess/NetworkProcess.messages.in:
2163 Add FetchWebsiteData and DeleteWebsiteDataForOrigins messages.
2165 * UIProcess/Network/NetworkProcessProxy.cpp:
2166 (WebKit::NetworkProcessProxy::~NetworkProcessProxy):
2167 Assert that all maps are empty.
2169 (WebKit::NetworkProcessProxy::fetchWebsiteData):
2170 (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
2171 Add callbacks and send fetch and delete messages respectively.
2173 (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
2174 Make sure to invoke all callbacks.
2176 (WebKit::NetworkProcessProxy::didFetchWebsiteData):
2177 Find the callback and invoke it.
2179 (WebKit::NetworkProcessProxy::didDeleteWebsiteDataForOrigins):
2182 * UIProcess/Network/NetworkProcessProxy.h:
2185 * UIProcess/Network/NetworkProcessProxy.messages.in:
2186 Add DidFetchWebsiteData and DidDeleteWebsiteDataForOrigins messages.
2188 * UIProcess/WebProcessProxy.cpp:
2189 (WebKit::WebProcessProxy::connectionDidClose):
2190 Just pass an empty WebsiteData object.
2192 2015-02-26 Enrica Casucci <enrica@apple.com>
2194 [WK2] REGRESSION(r180465): WebKit::WebPage::editorState() triggers a layout.
2195 https://bugs.webkit.org/show_bug.cgi?id=142015
2197 Reviewed by Alexey Proskuryakov.
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
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):
2229 2015-02-27 Brady Eidson <beidson@apple.com>
2231 Add API to remove a single content filter.
2232 <rdar://problem/19977764> and https://bugs.webkit.org/show_bug.cgi?id=142088
2234 Reviewed by Sam Weinig.
2236 * Shared/WebPageGroupData.h:
2238 * UIProcess/API/C/WKPageGroup.cpp:
2239 (WKPageGroupRemoveUserContentFilter):
2241 * UIProcess/API/C/WKPageGroup.h:
2242 * UIProcess/API/Cocoa/WKUserContentController.mm:
2243 (-[WKUserContentController _removeUserContentFilter:]):
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:
2254 * UIProcess/WebPageGroup.cpp:
2255 (WebKit::WebPageGroup::addUserContentFilter):
2256 (WebKit::WebPageGroup::removeUserContentFilter):
2257 * UIProcess/WebPageGroup.h:
2259 * WebProcess/UserContent/WebUserContentController.cpp:
2260 (WebKit::WebUserContentController::removeUserContentFilter):
2261 * WebProcess/UserContent/WebUserContentController.h:
2262 * WebProcess/UserContent/WebUserContentController.messages.in:
2264 * WebProcess/WebPage/WebPageGroupProxy.cpp:
2265 (WebKit::WebPageGroupProxy::WebPageGroupProxy):
2266 (WebKit::WebPageGroupProxy::removeUserContentFilter):
2267 * WebProcess/WebPage/WebPageGroupProxy.h:
2268 * WebProcess/WebPage/WebPageGroupProxy.messages.in:
2270 2015-02-26 Anders Carlsson <andersca@apple.com>
2272 Add API to remove all website data for the given data records
2273 https://bugs.webkit.org/show_bug.cgi?id=142060
2275 Reviewed by Beth Dakin.
2277 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2278 Add new method declaration.
2280 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2281 (toWebsiteDataRecords):
2282 Add a helper function that converts an NSArray of _WKWebsiteDataRecords to a Vector of WebsiteDataRecords.
2284 (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2285 Call through to the underlying WebsiteDataStore.
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.
2292 * UIProcess/WebsiteData/WebsiteDataStore.h:
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.
2299 2015-02-26 Chris Dumez <cdumez@apple.com>
2301 Rename DatabaseManager::manager() to DatabaseManager::singleton()
2302 https://bugs.webkit.org/show_bug.cgi?id=142054
2304 Reviewed by Ryosuke Niwa.
2306 Rename DatabaseManager::manager() to DatabaseManager::singleton() as
2307 per coding style and use WTF::NeverDestroyed.
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):
2322 2015-02-26 Myles C. Maxfield <mmaxfield@apple.com>
2324 [Mac] [iOS] Parsing support for -apple-trailing-word
2325 https://bugs.webkit.org/show_bug.cgi?id=141939
2327 Reviewed by Andreas Kling.
2329 * Configurations/FeatureDefines.xcconfig:
2331 2015-02-26 Brady Eidson <beidson@apple.com>
2333 Make WKPageGroupRemoveAllUserContentFilters actually remove all user content filters
2334 https://bugs.webkit.org/show_bug.cgi?id=142047
2336 Reviewed by Geoff Garen.
2338 * UIProcess/API/C/WKPageGroup.cpp:
2339 (WKPageGroupRemoveAllUserContentFilters): Remove all content filters instead of removing all user scripts.
2341 2015-02-25 Anders Carlsson <andersca@apple.com>
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
2346 Reviewed by Beth Dakin.
2348 * UIProcess/WebProcessProxy.cpp:
2349 (WebKit::WebProcessProxy::~WebProcessProxy):
2350 Assert that there are no pending callbacks.
2352 (WebKit::WebProcessProxy::connectionDidClose):
2353 Invoke all the didDeleteWebsiteDataForOrigins callbacks.
2355 (WebKit::WebProcessProxy::didDeleteWebsiteDataForOrigins):
2356 Grab the didDeleteWebsiteDataForOrigins and invoke it.
2358 (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
2359 Add the pending callback and send a DeleteWebsiteDataForOrigins to the web process.
2361 * UIProcess/WebProcessProxy.h:
2364 * UIProcess/WebProcessProxy.messages.in:
2365 Add a DidDeleteWebsiteDataForOrigins message.
2367 * WebProcess/WebProcess.cpp:
2368 (WebKit::WebProcess::deleteWebsiteDataForOrigins):
2369 For now, just send back a DidDeleteWebsiteDataForOrigins message.
2371 * WebProcess/WebProcess.h:
2374 * WebProcess/WebProcess.messages.in:
2375 Add a DeleteWebsiteDataForOrigins message.
2377 2015-02-25 Shivakumar JM <shiva.jm@samsung.com>
2379 Fix build warning in WebKit2/UIProcess module.
2380 https://bugs.webkit.org/show_bug.cgi?id=142014
2382 Reviewed by Anders Carlsson.
2384 Fix build warning by using UNUSED_PARAM macro.
2386 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2387 (WebKit::computeWebProcessAccessTypeForDataFetch):
2389 2015-02-24 Simon Fraser <simon.fraser@apple.com>
2391 Clarify some resizing terminology in ScrollView/FrameView
2392 https://bugs.webkit.org/show_bug.cgi?id=141996
2394 Reviewed by Zalan Bujtas.
2396 ScrollableArea/ScrollView/FrameView had some confusing terminology around
2397 contentsResized/visibleContentsResized/fixedLayoutSizeChanged.
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.
2406 contentsResized() is relegated to simply being a hook that allows Mac to
2407 flash overlay scrollbars.
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).
2413 * WebProcess/Plugins/PDF/PDFPlugin.mm:
2414 (WebKit::PDFPlugin::scrollbarStyleChanged): Call the base class method,
2417 2015-02-24 Simon Fraser <simon.fraser@apple.com>
2419 Use an enum for scrollbar style
2420 https://bugs.webkit.org/show_bug.cgi?id=141985
2422 Reviewed by Beth Dakin.
2424 Switch to an enum class for the scrollbar style (normal or overlay).
2426 Sadly it still has to be passed as an int across the process boundary.
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:
2441 2015-02-24 Chris Dumez <cdumez@apple.com>
2443 [Mac][WK2] ASSERTION FAILED: m_sendPort in IPC::Connection::open()
2444 https://bugs.webkit.org/show_bug.cgi?id=141934
2446 Reviewed by Darin Adler.
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.
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
2458 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
2459 (WebKit::XPCServiceInitializerDelegate::getConnectionIdentifier):
2461 2015-02-24 Commit Queue <commit-queue@webkit.org>
2463 Unreviewed, rolling out r180599.
2464 https://bugs.webkit.org/show_bug.cgi?id=141998
2466 Lots of new test failures (Requested by smfr on #webkit).
2470 "Parsing support for -webkit-trailing-word"
2471 https://bugs.webkit.org/show_bug.cgi?id=141939
2472 http://trac.webkit.org/changeset/180599
2474 2015-02-24 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2476 Fix build break on EFL and GTK port since r180585.
2477 https://bugs.webkit.org/show_bug.cgi?id=141994
2479 Reviewed by Joseph Pecoraro.
2481 * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
2482 (WebKit::WebsiteDataRecord::displayNameForOrigin):
2483 * UIProcess/WebsiteData/WebsiteDataRecord.h:
2484 (WebKit::WebsiteDataRecord::WebsiteDataRecord):
2486 2015-02-24 Myles C. Maxfield <mmaxfield@apple.com>
2488 [Mac] [iOS] Parsing support for -apple-trailing-word
2489 https://bugs.webkit.org/show_bug.cgi?id=141939
2491 Reviewed by Andreas Kling.
2493 * Configurations/FeatureDefines.xcconfig:
2495 2015-02-24 Csaba Osztrogonác <ossy@webkit.org>
2497 Buildfix after r180585.
2501 2015-02-24 Anders Carlsson <andersca@apple.com>
2503 Pass _WKWebsiteDataRecord objects to the fetchData completion handler
2504 https://bugs.webkit.org/show_bug.cgi?id=141984
2506 Reviewed by Andreas Kling.
2508 * Shared/Cocoa/APIObject.mm:
2509 (API::Object::newObject):
2510 Create _WKWebsiteDataRecord objects for WebsiteDataRecord API objects.
2512 * UIProcess/API/APIWebsiteDataRecord.h:
2513 Add WebsiteDataRecord getter.
2515 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
2516 Add displayName and dataTypes properties.
2518 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
2519 (dataTypesToString):
2520 Helper function to convert dataTypes bit-fields to strings.
2522 (-[_WKWebsiteDataRecord description]):
2523 Include the display name and data types in the description.
2525 (-[_WKWebsiteDataRecord displayName]):
2526 Return the display name.
2528 (-[_WKWebsiteDataRecord dataTypes]):
2529 Return the data types.
2531 * UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
2532 (WebKit::toWebsiteDataTypes):
2533 Move this here from _WKWebsiteDataStore.mm.
2535 (WebKit::toWKWebsiteDataTypes):
2536 Add new function to convert WebsiteDataTypes to WKWebsiteDataTypes.
2538 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2539 (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2540 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2541 Qualify toWebsiteDataTypes calls.
2543 * UIProcess/WebsiteData/WebsiteDataRecord.cpp: Added.
2544 (WebKit::WebsiteDataRecord::displayNameForOrigin):
2545 New helper that returns a display name given an origin.
2547 (WebKit::WebsiteDataRecord::add):
2548 Add the origin as well as the type.
2550 * UIProcess/WebsiteData/WebsiteDataRecord.h:
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.
2558 * WebKit2.xcodeproj/project.pbxproj:
2560 2015-02-24 Csaba Osztrogonác <ossy@webkit.org>
2562 One more buildfix after r180575.
2564 * UIProcess/WebProcessProxy.cpp:
2565 (WebKit::WebProcessProxy::connectionDidClose):
2567 2015-02-24 Csaba Osztrogonác <ossy@webkit.org>
2573 2015-02-24 Anders Carlsson <andersca@apple.com>
2575 Implement more of the data fetching API
2576 https://bugs.webkit.org/show_bug.cgi?id=141975
2578 Reviewed by Andreas Kling.
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.
2590 * UIProcess/WebProcessProxy.cpp:
2591 (WebKit::WebProcessProxy::~WebProcessProxy):
2592 Assert that we don't have any pending fetch data callbacks.
2594 (WebKit::WebProcessProxy::connectionDidClose):
2595 Invoke any pending fetch website data callbacks.
2597 (WebKit::WebProcessProxy::didFetchWebsiteData):
2598 Grab the callback and invoke it.
2600 (WebKit::WebProcessProxy::fetchWebsiteData):
2601 Set up a pending callback and send a FetchWebsiteData message to the web process.
2603 * UIProcess/WebProcessProxy.h:
2606 * UIProcess/WebProcessProxy.messages.in:
2607 Add a DidFetchWebsiteData message.
2609 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2610 (WebKit::computeWebProcessAccessTypeForDataFetch):
2611 Return the web process access type for the given set of data types.
2613 (WebKit::WebsiteDataStore::fetchData):
2614 Set up a callback aggregator that will assemble the needed website data into a vector of website data records.
2616 (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
2617 (WebKit::computeWebProcessAccessTypeForDataRemoval):
2618 Rename these functions to indicate that they are about data removal.
2620 (WebKit::WebsiteDataStore::removeData):
2621 Append "ForDataRemoval" to function calls.
2623 * WebKit2.xcodeproj/project.pbxproj:
2626 * WebProcess/Storage/StorageAreaMap.cpp:
2627 (WebKit::StorageAreaMap::StorageAreaMap):
2630 * WebProcess/WebProcess.cpp:
2631 (WebKit::WebProcess::fetchWebsiteData):
2632 For now, just fetch memory cache data.
2634 * WebProcess/WebProcess.h:
2637 * WebProcess/WebProcess.messages.in:
2638 Add FetchWebsiteData message.
2640 2015-02-24 Yusuke Suzuki <utatane.tea@gmail.com>
2642 REGRESSION(r179429): Can't type comments in Facebook
2643 https://bugs.webkit.org/show_bug.cgi?id=141859
2645 Reviewed by Brent Fulgham.
2647 Enable SymbolEnabled in inspector context.
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:
2671 2015-02-24 Anders Carlsson <andersca@apple.com>
2673 Tighten up some SecurityOrigin related code, use references where possible
2674 https://bugs.webkit.org/show_bug.cgi?id=141971
2676 Reviewed by Antti Koivisto.
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):
2699 2015-02-24 Michael Catanzaro <mcatanzaro@igalia.com>
2701 Crash loading local file with WebPageProxy::loadAlternateHTMLString
2702 https://bugs.webkit.org/show_bug.cgi?id=141867
2704 Reviewed by Anders Carlsson.
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.
2710 * UIProcess/WebPageProxy.cpp:
2711 (WebKit::WebPageProxy::loadAlternateHTMLString):
2713 2015-02-24 Ryuan Choi <ryuan.choi@navercorp.com>
2715 [EFL] Add message APIs to communicate between ewk_context and extensions
2716 https://bugs.webkit.org/show_bug.cgi?id=137660
2718 Reviewed by Gyuyoung Kim.
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):
2750 * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
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.
2766 2015-02-23 Commit Queue <commit-queue@webkit.org>
2768 Unreviewed, rolling out r180547 and r180550.
2769 https://bugs.webkit.org/show_bug.cgi?id=141957
2771 Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
2773 Reverted changesets:
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
2779 "Constructor returning null should construct an object instead
2781 https://bugs.webkit.org/show_bug.cgi?id=141640
2782 http://trac.webkit.org/changeset/180550
2784 2015-02-23 Ryosuke Niwa <rniwa@webkit.org>
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
2789 Reviewed by Andreas Kling.
2791 * Configurations/FeatureDefines.xcconfig:
2793 2015-02-23 Yusuke Suzuki <utatane.tea@gmail.com>
2795 REGRESSION(r179429): Can't type comments in Facebook
2796 https://bugs.webkit.org/show_bug.cgi?id=141859
2798 Reviewed by Geoffrey Garen.
2800 Enable SymbolEnabled in inspector context.
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:
2824 2015-02-23 Benjamin Poulain <bpoulain@apple.com>
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
2831 Reviewed by Simon Fraser.
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.
2844 This patch fixes the issue by adding special handling for interrupted scrolling.
2846 Kudos to Kurt Revis for providing us the required APIs.
2848 * Shared/VisibleContentRectUpdateInfo.h:
2849 (WebKit::operator==):
2850 We can no longer filter VisibleContentRectUpdateInfo ignoring the velocity.
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.
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.
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.
2866 * UIProcess/ios/WKContentView.h:
2867 * UIProcess/ios/WKContentView.mm:
2868 (-[WKContentView didInterruptScrolling]):
2870 2015-02-23 Anders Carlsson <andersca@apple.com>
2872 Add API for fetching website data records to _WKWebsiteDataStore
2873 https://bugs.webkit.org/show_bug.cgi?id=141926
2875 Reviewed by Beth Dakin.
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.
2883 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2884 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2885 (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2886 Call down to the WebsiteDataStore.
2888 * UIProcess/WebsiteData/WebsiteDataRecord.h: Added.
2889 This will be the data-container part of WebsiteDataRecord, but it's currently empty.
2891 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2892 (WebKit::WebsiteDataStore::fetchData):
2893 Just dispatch the completion handler for now.
2895 * UIProcess/WebsiteData/WebsiteDataStore.h:
2898 * WebKit2.xcodeproj/project.pbxproj:
2901 2015-02-23 Chris Dumez <cdumez@apple.com>
2903 Add support for diagnostic logging messages sampling
2904 https://bugs.webkit.org/show_bug.cgi?id=141823
2905 <rdar://problem/19899030>
2907 Reviewed by Andreas Kling.
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).
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.
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):
2949 2015-02-23 Anders Carlsson <andersca@apple.com>
2951 Add a stubbed out _WKWebsiteDataRecord class
2952 https://bugs.webkit.org/show_bug.cgi?id=141919
2954 Reviewed by Beth Dakin.
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.
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:
2968 2015-02-23 Timothy Horton <timothy_horton@apple.com>
2970 Reproducible crash in ViewGestureController::removeSwipeSnapshot()
2971 https://bugs.webkit.org/show_bug.cgi?id=141917
2972 <rdar://problem/19918590>
2974 Reviewed by Brian Weinstein.
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.
2981 2015-02-23 Anders Carlsson <andersca@apple.com>
2983 Replace another straight-up cast with a toImpl call
2984 https://bugs.webkit.org/show_bug.cgi?id=141914
2985 rdar://problem/19913016
2987 Reviewed by Andreas Kling.
2989 This fixes a problem where Mail would not display message bodies.
2991 * UIProcess/API/Cocoa/WKConnection.mm:
2992 (didReceiveMessage):
2994 2015-02-20 Brent Fulgham <bfulgham@apple.com>
2996 Scrollbars and ScrollAnimators must always have a ScrollableArea
2997 https://bugs.webkit.org/show_bug.cgi?id=141855
2999 Reviewed by Simon Fraser.
3001 Change users of the scrollAnimator() method to expect a reference instead of a pointer.
3003 * WebProcess/Plugins/PDF/PDFPlugin.mm:
3004 (WebKit::PDFPlugin::createScrollbar):
3005 (WebKit::PDFPlugin::destroyScrollbar):
3007 2015-02-20 Jessie Berlin <jberlin@webkit.org>
3009 Build fix after r180465.
3011 * UIProcess/mac/PageClientImpl.h:
3013 2015-02-20 Carlos Alberto Lopez Perez <clopez@igalia.com>
3015 [GTK] Unreviewed build fix after r180449.
3017 * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
3018 (webkit_file_chooser_request_get_selected_files):
3020 2015-02-20 Enrica Casucci <enrica@apple.com>
3022 [WK2] Add support for font panel on OS X.
3023 https://bugs.webkit.org/show_bug.cgi?id=141777
3025 Reviewed by Tim Horton.
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
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):
3071 2015-02-20 Chris Dumez <cdumez@apple.com>
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>
3077 Reviewed by Antti Koivisto.
3079 Add more detailed diagnostic logging for measuring network cache
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.
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
3092 * NetworkProcess/cache/NetworkCache.cpp:
3093 (WebKit::decodeStorageEntry):
3094 (WebKit::canRetrieve):
3095 (WebKit::NetworkCache::retrieve):
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):
3112 2015-02-20 Anders Carlsson <andersca@apple.com>
3114 API::String should just be a simple wrapper for WTF strings
3115 https://bugs.webkit.org/show_bug.cgi?id=141852
3117 Reviewed by Beth Dakin.
3119 Expose a StringView member function on API::String. Move all the WKString API implementations to WKString.cpp.
3121 * Shared/API/APIString.h:
3122 * Shared/API/c/WKString.cpp:
3124 (WKStringGetLength):
3125 (WKStringGetCharacters):
3126 (WKStringGetMaximumUTF8CStringSize):
3127 (WKStringGetUTF8CString):
3129 (WKStringIsEqualToUTF8CString):
3130 (WKStringIsEqualToUTF8CStringIgnoringCase):
3132 2015-02-20 Anders Carlsson <andersca@apple.com>
3134 API::String::string() needs to return an isolated string copy
3135 https://bugs.webkit.org/show_bug.cgi?id=141846
3137 Reviewed by Tim Horton.
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.
3142 * Shared/API/APIString.h:
3144 2015-02-20 Alexey Proskuryakov <ap@apple.com>
3146 Remove svn:keywords property.
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.
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.
3172 2015-02-20 Csaba Osztrogonác <ossy@webkit.org>
3176 * Platform/efl/DispatchQueueEfl.cpp:
3178 2015-02-20 Csaba Osztrogonác <ossy@webkit.org>
3180 URTBF after r180410, WorkQueue.h is in WTF now.
3182 * Platform/efl/DispatchQueueWorkItemEfl.h:
3184 2015-02-20 Anders Carlsson <andersca@apple.com>
3186 Use toAPI when returning the object graph as a WKTypeRef
3187 https://bugs.webkit.org/show_bug.cgi?id=141841
3189 Reviewed by Sam Weinig.
3191 * UIProcess/API/Cocoa/WKProcessGroup.mm:
3192 (getInjectedBundleInitializationUserData):
3194 2015-02-20 Eric Carlson <eric.carlson@apple.com>
3196 [iOS] cleanup AirPlay code
3197 https://bugs.webkit.org/show_bug.cgi?id=141811
3199 Reviewed by Jer Noble.
3201 * Configurations/FeatureDefines.xcconfig: IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
3202 * WebProcess/WebPage/WebPage.cpp:
3203 (WebKit::WebPage::updatePreferences): Ditto.
3205 2015-02-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3207 [WK2][EFL] Fix the build after r180362
3208 https://bugs.webkit.org/show_bug.cgi?id=141836
3210 Reviewed by Carlos Garcia Campos.
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.
3215 * UIProcess/API/C/WKBatteryManager.cpp:
3216 * UIProcess/API/C/WKPage.cpp:
3217 * UIProcess/API/C/efl/WKAPICastEfl.h:
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:
3226 2015-02-20 Antti Koivisto <antti@apple.com>
3228 Move WorkQueue from WK2 to WTF
3229 https://bugs.webkit.org/show_bug.cgi?id=141797
3231 Reviewed by Anders Carlsson.
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:
3253 2015-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
3255 [WK2][GTK] Fix the build after r180362
3256 https://bugs.webkit.org/show_bug.cgi?id=141813
3258 Reviewed by Žan Doberšek.
3260 Add several missing includes and a specific implementation of
3261 toAPI/toImpl for GTK+ WebView.
3263 * UIProcess/API/C/gtk/WKAPICastGtk.h:
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:
3271 2015-02-19 Shivakumar JM <shiva.jm@samsung.com>
3273 Fix build warning in WebKit2/WebProcess and UIProcess module.
3274 https://bugs.webkit.org/show_bug.cgi?id=141794.
3276 Reviewed by Anders Carlsson.
3278 Fix build warning by using UNUSED_PARAM macro.
3280 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3281 (WebKit::computeWebProcessAccessType):
3282 * WebProcess/WebProcess.cpp:
3283 (WebKit::WebProcess::deleteWebsiteData):
3285 2015-02-19 Remy Demarest <rdemarest@apple.com>
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.
3290 Reviewed by Dan Bernstein.
3292 * UIProcess/Launcher/mac/EnvironmentVariables.cpp:
3293 (WebKit::EnvironmentVariables::appendValue): If the existing value is an empty string, replace it rather than
3296 2015-02-19 Anders Carlsson <andersca@apple.com>
3298 Make C SPI objects and modern API objects toll-free bridged
3299 https://bugs.webkit.org/show_bug.cgi?id=141808
3301 Reviewed by Tim Horton.
3303 * Shared/API/APIObject.h:
3304 (API::Object::wrap):
3305 (API::Object::unwrap):
3306 Add default implementations of wrap and unwrap. These just cast.
3308 * Shared/API/c/WKArray.cpp:
3310 (WKArrayCreateAdoptingValues):
3311 (WKArrayGetItemAtIndex):
3312 * Shared/API/c/WKDictionary.cpp:
3313 (WKDictionaryGetItemForKey):
3314 Add toImpl and toAPI where necessary.
3316 * Shared/API/c/WKSharedAPICast.h:
3317 Add API::Object::wrap in toAPI and unwrap in toImpl.
3319 * Shared/API/c/WKType.cpp:
3323 Add missing toImpl calls.
3325 * Shared/Cocoa/APIObject.mm:
3326 (API::Object::wrap):
3327 Return the APIObject Objective-C wrapper.
3329 (API::Object::unwrap):
3330 Return the API::Object from the Objective-C object.
3332 * Shared/Cocoa/WKObject.h:
3333 Add wrap and unwrap declarations.
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.
3341 2015-02-19 Timothy Horton <timothy_horton@apple.com>
3343 Remove unused forward declaration from WKWebViewInternal.h
3344 https://bugs.webkit.org/show_bug.cgi?id=141806
3346 Reviewed by Anders Carlsson.
3348 * UIProcess/API/Cocoa/WKWebViewInternal.h:
3349 The use of WebCore::Highlight moved to WKContentView.
3351 2015-02-19 Anders Carlsson <andersca@apple.com>
3353 Use the real implementation type in our API cast traits
3354 https://bugs.webkit.org/show_bug.cgi?id=141805
3356 Reviewed by Sam Weinig.
3358 * Shared/API/c/WKSharedAPICast.h:
3360 (WebKit::toAPI): Deleted.
3361 (WebKit::toImpl): Deleted.
3362 * UIProcess/GenericCallback.h:
3364 2015-02-19 Anders Carlsson <andersca@apple.com>
3366 Remove the stray storage manager from WebProcessPool
3367 https://bugs.webkit.org/show_bug.cgi?id=141800
3369 Reviewed by Sam Weinig.
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.
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.
3384 * UIProcess/WebPageProxy.cpp:
3385 (WebKit::WebPageProxy::WebPageProxy):
3386 (WebKit::WebPageProxy::close):
3387 Remove storage manager calls.
3389 * UIProcess/WebProcessPool.cpp:
3390 (WebKit::WebProcessPool::WebProcessPool):
3391 (WebKit::WebProcessPool::applicationWillTerminate): Deleted.
3392 * UIProcess/WebProcessPool.h:
3393 Remove storage manager code.
3395 * UIProcess/WebsiteData/WebsiteDataStore.h:
3396 (WebKit::WebsiteDataStore::storageManager):
3399 2015-02-19 Csaba Osztrogonác <ossy@webkit.org>
3401 [WK2] Unreviewed buildfix for non-Cocoa platforms.
3404 * UIProcess/WebsiteData/unix/WebsiteDataStoreUnix.cpp: Added.
3405 (WebKit::WebsiteDataStore::platformInitialize): Added.
3406 (WebKit::WebsiteDataStore::platformDestroy): Added.
3408 2015-02-19 Anders Carlsson <andersca@apple.com>
3410 WebsiteDataStore should ensure that local storage is written before exiting
3411 https://bugs.webkit.org/show_bug.cgi?id=141798
3413 Reviewed by Sam Weinig.
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:
3425 2015-02-18 Chris Dumez <cdumez@apple.com>
3427 [WK2][iOS] Fix NetworkCache build
3428 https://bugs.webkit.org/show_bug.cgi?id=141778
3430 Reviewed by Antti Koivisto.
3432 Add missing header include to use round_page() on iOS.
3434 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
3436 2015-02-18 Alexey Proskuryakov <ap@apple.com>
3438 Remove input and output files from "Make Frameworks Symbolic Link" step
3439 https://bugs.webkit.org/show_bug.cgi?id=141769
3441 Reviewed by Dan Bernstein.
3443 * WebKit2.xcodeproj/project.pbxproj:
3445 2015-02-18 Timothy Horton <timothy_horton@apple.com>
3447 Adopt WebCore::IOSurface in ImageBuffer
3448 https://bugs.webkit.org/show_bug.cgi?id=141751
3450 Reviewed by Simon Fraser.
3452 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3453 (InitWebCoreSystemInterface):
3454 Remove old WKSI IOSurface-related functions.
3456 2015-02-18 Beth Dakin <bdakin@apple.com>
3458 iBooks immediate action blacklist should not even create the gesture recognizer
3459 https://bugs.webkit.org/show_bug.cgi?id=141768
3461 rdar://problem/19806770
3463 Reviewed by Tim Horton.
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]):
3472 2015-02-18 Chris Dumez <cdumez@apple.com>
3474 Access FontCache global instance via singleton() static member function
3475 https://bugs.webkit.org/show_bug.cgi?id=141726
3477 Reviewed by Daniel Bates.
3479 Access FontCache global instance via singleton() static member function,
3480 as per coding style.
3482 2015-02-18 Timothy Horton <timothy_horton@apple.com>
3484 Add WKContext SPI to clear all visited links
3485 https://bugs.webkit.org/show_bug.cgi?id=141752
3486 <rdar://problem/9997966>
3488 Reviewed by Dan Bernstein.
3490 * UIProcess/API/C/WKContext.cpp:
3491 (WKContextClearVisitedLinks):
3492 * UIProcess/API/C/WKContext.h:
3494 2015-02-17 Anders Carlsson <andersca@apple.com>
3496 Add API for clearing in-memory caches to WKWebsiteDataStore
3497 https://bugs.webkit.org/show_bug.cgi?id=141724
3499 Reviewed by Tim Horton.
3501 * Shared/WebsiteData/WebsiteDataTypes.h:
3502 Add WebsiteDataTypeMemoryCache.
3504 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
3505 Add WKWebsiteDataTypeMemoryCache.
3507 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3508 (toWebsiteDataTypes):
3509 Handle WKWebsiteDataTypeMemoryCache and convert it to WebsiteDataTypeMemoryCache.
3511 * UIProcess/WebProcessProxy.cpp:
3512 (WebKit::generateCallbackID):
3513 Generate a new callback.