1 2015-04-28 Enrica Casucci <enrica@apple.com>
3 Add support for lookup on iOS.
4 https://bugs.webkit.org/show_bug.cgi?id=144342
5 rdar://problem/19994090
7 Reviewed by Tim Horton.
9 * UIProcess/WebPageProxy.h:
10 * UIProcess/ios/WKContentViewInteraction.mm:
11 (-[WKContentView _lookup:]):
12 (-[WKContentView canPerformAction:withSender:]):
13 * UIProcess/ios/WebPageProxyIOS.mm:
14 (WebKit::WebPageProxy::getLookupContextAtPoint):
15 * WebProcess/WebPage/WebPage.h:
16 * WebProcess/WebPage/WebPage.messages.in:
17 * WebProcess/WebPage/ios/WebPageIOS.mm:
18 (WebKit::WebPage::getLookupContextAtPoint):
20 2015-04-28 Brady Eidson <beidson@apple.com>
22 Consolidate most "frame load" arguments into FrameLoadRequest.
23 https://bugs.webkit.org/show_bug.cgi?id=144276
25 Reviewed by Alexey Proskuryakov.
27 * WebProcess/Plugins/PluginView.cpp:
28 (WebKit::PluginView::loadURL):
30 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
31 (WebKit::WebFrameLoaderClient::dispatchCreatePage):
33 * WebProcess/WebPage/WebInspector.cpp:
34 (WebKit::WebInspector::openInNewTab):
36 2015-04-28 Chris Dumez <cdumez@apple.com>
38 [WK2][Mac] Update WebContent process' sandbox profile for AWD
39 https://bugs.webkit.org/show_bug.cgi?id=144315
40 <rdar://problem/20719293>
42 Reviewed by Alexey Proskuryakov.
44 Update sandbox profile for AWD similarly to what was done for iOS in
47 * WebProcess/com.apple.WebProcess.sb.in:
49 2015-04-28 Antti Koivisto <antti@apple.com>
51 Network Cache: Disk cache getting filled by YouTube video data
52 https://bugs.webkit.org/show_bug.cgi?id=144259
54 Reviewed by Darin Adler.
56 MSE media is loaded via XHR and tends to eventually fill the cache.
58 YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
59 We can reduce disk writes and keep more useful resources around by not caching them
61 * NetworkProcess/NetworkResourceLoader.cpp:
62 (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
63 (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
64 * NetworkProcess/cache/NetworkCache.cpp:
65 (WebKit::NetworkCache::makeStoreDecision):
67 Don't store if the requester is XHR and response has video or audio content type.
69 * NetworkProcess/cache/NetworkCache.h:
70 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
71 (WebKit::NetworkCache::storeDecisionToDiagnosticKey):
72 * Shared/Network/NetworkResourceLoadParameters.cpp:
73 (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
74 (WebKit::NetworkResourceLoadParameters::encode):
75 (WebKit::NetworkResourceLoadParameters::decode):
76 * Shared/Network/NetworkResourceLoadParameters.h:
78 The requester type is now part of the ResourceRequest, no need for separate parameter.
80 * Shared/mac/WebCoreArgumentCodersMac.mm:
81 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
82 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
83 * WebProcess/Network/WebResourceLoadScheduler.cpp:
84 (WebKit::WebResourceLoadScheduler::scheduleLoad):
86 2015-04-28 Zan Dobersek <zdobersek@igalia.com>
88 [WK2] API::UserContentURLPattern creation functions should return Ref<>
89 https://bugs.webkit.org/show_bug.cgi?id=144225
91 Reviewed by Darin Adler.
93 Have API::UserContentURLPattern creation functions return Ref<>.
94 Call-sites are also updated, using and operating on the returned Ref<>
95 object where possible.
97 * Shared/API/APIUserContentURLPattern.h:
98 (API::UserContentURLPattern::create):
99 * Shared/API/c/WKUserContentURLPattern.cpp:
100 (WKUserContentURLPatternCreate):
102 2015-04-28 Zan Dobersek <zdobersek@igalia.com>
104 [WK2] API::URLRequest, API::URLResponse creation functions should return Ref<>
105 https://bugs.webkit.org/show_bug.cgi?id=144224
107 Reviewed by Darin Adler.
109 Have API::URLRequest and API::URLResponse creation functions return Ref<>.
110 The call-sites are also updated, using and operating on the returned Ref<> object
113 * Shared/API/APIURLRequest.h:
114 (API::URLRequest::create):
115 * Shared/API/APIURLResponse.h:
116 (API::URLResponse::create):
117 * Shared/API/c/WKURLRequest.cpp:
118 (WKURLRequestCreateWithWKURL):
119 * Shared/API/c/mac/WKURLRequestNS.mm:
120 (WKURLRequestCreateWithNSURLRequest):
121 * Shared/API/c/mac/WKURLResponseNS.mm:
122 (WKURLResponseCreateWithNSURLResponse):
123 * UIProcess/API/C/WKContext.cpp:
124 (WKContextSetDownloadClient):
125 * UIProcess/API/C/WKDownload.cpp:
126 (WKDownloadCopyRequest):
127 * UIProcess/API/C/WKNavigationDataRef.cpp:
128 (WKNavigationDataCopyOriginalRequest):
129 * UIProcess/API/C/WKPage.cpp:
130 (WKPageSetPagePolicyClient):
131 (WKPageSetPageUIClient):
132 * UIProcess/Cocoa/NavigationState.mm:
133 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
134 * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
135 (WebKit::WebSoupCustomProtocolRequestManagerClient::startLoading):
136 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
137 (willSendRequestForFrame):
138 * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
139 (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
140 (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
141 (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
143 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
145 [WK2] API::Point, API::Size, API::Rect creation functions should return Ref<>
146 https://bugs.webkit.org/show_bug.cgi?id=144223
148 Reviewed by Darin Adler.
150 Have API::Point, API::Size and API::Rect creation functions return Ref<>.
151 Call-sites are also updated, using and operating on the returned Ref<> object
154 * Shared/API/APIGeometry.h:
156 (API::Point::create):
158 * Shared/API/c/WKGeometry.cpp:
163 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
165 [WK2] API::Error creation functions should return Ref<>
166 https://bugs.webkit.org/show_bug.cgi?id=144222
168 Reviewed by Darin Adler.
170 Have API::Error creation functions return Ref<>.
171 The call-sites are also updated, using and operating
172 on the returned Ref<> object where possible.
174 * Shared/API/APIError.h:
175 (API::Error::create):
176 * Shared/API/c/cf/WKErrorCF.cpp:
177 (WKErrorCreateWithCFError):
178 * UIProcess/API/C/WKOriginDataManager.cpp:
179 (WKOriginDataManagerDeleteEntriesForOrigin):
180 (WKOriginDataManagerDeleteEntriesModifiedBetweenDates):
181 (WKOriginDataManagerDeleteAllEntries):
182 * UIProcess/API/C/WKPage.cpp:
183 (toGenericCallbackFunction):
184 (WKPageForceRepaint):
185 (WKPageValidateCommand):
186 (WKPageComputePagesForPrinting):
187 * UIProcess/API/C/WKPluginSiteDataManager.cpp:
188 (WKPluginSiteDataManagerClearSiteData):
189 (WKPluginSiteDataManagerClearAllSiteData):
190 * UIProcess/GenericCallback.h:
191 (WebKit::toGenericCallbackFunction):
192 * UIProcess/WebPageProxy.cpp:
193 (WebKit::WebPageProxy::printFinishedCallback):
195 2015-04-27 Sungmann Cho <sungmann.cho@navercorp.com>
197 [GTK] Remove unnecessary semicolon from WebKitNotificationProvider.h.
198 https://bugs.webkit.org/show_bug.cgi?id=144312
200 Reviewed by Martin Robinson.
202 No new tests, no behavior change.
204 * UIProcess/API/gtk/WebKitNotificationProvider.h:
206 2015-04-27 Brent Fulgham <bfulgham@apple.com>
208 PDF action menu fixes
209 https://bugs.webkit.org/show_bug.cgi?id=144299
210 <rdar://problem/20702215>
212 Reviewed by Tim Horton.
214 Make two corrections to how PDFs are handled:
215 1. When calculating the view rect for the user's selection, make sure
216 that we get coordinates for the correct PDF page. The existing code assumed
217 that the current PDFLayerControler's current page was correct, but this will
218 not be true if you zoom the PDF out so that several pages are displayed at
219 once. Each selection keeps track of the page it is referenced against.
221 2. Revise the offsets calculated for the TextIndicator to take into account
222 the font descender (as well as the ascender), and to adjust by the scaled
223 amount of margin around the selected text.
225 * WebProcess/Plugins/PDF/PDFPlugin.mm:
226 (WebKit::PDFPlugin::viewRectForSelection): Use correct page for calculating
228 * WebProcess/WebPage/mac/WebPageMac.mm:
229 (WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin): Include font 'descendant'
230 and (scaled) margin when adjusting the hit target for the TextIndicator to draw.
232 2015-04-27 Michael Catanzaro <mcatanzaro@igalia.com>
234 Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
235 https://bugs.webkit.org/show_bug.cgi?id=144193
237 Reviewed by Darin Adler.
241 2015-04-24 Jon Honeycutt <jhoneycutt@apple.com>
243 Context menus are not reshown after an orientation change
245 <https://bugs.webkit.org/show_bug.cgi?id=144143>
246 <rdar://problem/20679931>
248 Reviewed by Darin Adler.
250 * UIProcess/ios/WKActionSheet.mm:
251 (-[WKActionSheet updateSheetPosition]):
252 Return early if we're still in a rotation, not if the rotation is
255 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
257 [WK2] API::Dictionary creation functions should return Ref<>
258 https://bugs.webkit.org/show_bug.cgi?id=144221
260 Reviewed by Darin Adler.
262 Have API::Dictionary creation functions return Ref<>.
263 The call-sites are also updated, using and operating
264 on the returned Ref<> object where possible.
266 * Shared/API/APIDictionary.cpp:
267 (API::Dictionary::create):
268 * Shared/API/APIDictionary.h:
269 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
270 (createEncodedObject):
271 * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
272 (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
273 * Shared/API/c/WKDictionary.cpp:
274 (WKDictionaryCreate):
275 * Shared/API/c/WKMutableDictionary.cpp:
276 (WKMutableDictionaryCreate):
277 * Shared/Plugins/Netscape/PluginInformation.cpp:
278 (WebKit::createPluginInformationDictionary):
279 * Shared/Plugins/Netscape/PluginInformation.h:
280 * UIProcess/API/C/WKPage.cpp:
281 (WKPageSetPageUIClient):
282 * UIProcess/API/gtk/WebKitWebContext.cpp:
283 (webkit_web_context_prefetch_dns):
284 * UIProcess/API/gtk/WebKitWebView.cpp:
285 (webkit_web_view_get_snapshot):
286 * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
287 (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
288 * UIProcess/Plugins/PlugInAutoStartProvider.h:
289 * UIProcess/StatisticsRequest.cpp:
290 (WebKit::createDictionaryFromHashMap):
291 (WebKit::StatisticsRequest::completedRequest):
292 * UIProcess/WebFormClient.cpp:
293 (WebKit::WebFormClient::willSubmitForm):
294 * UIProcess/WebPageProxy.cpp:
295 (WebKit::WebPageProxy::didFailToInitializePlugin):
296 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
297 (didInitiateLoadForResource):
298 (willSendRequestForFrame):
299 (didReceiveResponseForResource):
300 (didReceiveContentLengthForResource):
301 (didFinishLoadForResource):
302 (didFailLoadForResource):
303 (webkitWebPageDidReceiveMessage):
304 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
305 (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
306 (WebKit::InjectedBundlePageFormClient::willSubmitForm):
308 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
310 [WK2] API::Data creation functions should return Ref<>
311 https://bugs.webkit.org/show_bug.cgi?id=144220
313 Reviewed by Darin Adler.
315 Have API::Data creation functions return Ref<>.
316 The call-sites are also updated, using and operating
317 on the returned Ref<> object where possible.
319 * Shared/API/APIData.h:
320 (API::Data::createWithoutCopying):
322 * Shared/API/c/WKData.cpp:
324 * Shared/API/c/mac/WKWebArchive.cpp:
325 (WKWebArchiveCopyData):
326 * Shared/API/c/mac/WKWebArchiveResource.cpp:
327 (WKWebArchiveResourceCopyData):
328 * Shared/APIWebArchive.h:
329 * Shared/APIWebArchive.mm:
330 (API::WebArchive::data):
331 * Shared/APIWebArchiveResource.h:
332 * Shared/APIWebArchiveResource.mm:
333 (API::WebArchiveResource::data):
334 * Shared/Cocoa/APIDataCocoa.mm:
335 (API::Data::createWithoutCopying):
336 * UIProcess/API/Cocoa/WKWebView.mm:
337 (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
338 * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
339 (webkitURISchemeRequestReadCallback):
340 * UIProcess/API/gtk/WebKitWebView.cpp:
341 (webkit_web_view_load_bytes):
342 * UIProcess/Downloads/DownloadProxy.cpp:
343 (WebKit::createData):
344 * UIProcess/WebPageProxy.cpp:
345 (WebKit::WebPageProxy::dataCallback):
346 (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder):
348 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
350 [WK2] API::URL creation functions should return Ref<>
351 https://bugs.webkit.org/show_bug.cgi?id=144219
353 Reviewed by Darin Adler.
355 Have API::URL creation functions return Ref<>.
356 The call-sites are also updated, using and operating in the
357 returned Ref<> object, where possible.
359 * Shared/API/APIURL.h:
361 * Shared/API/c/WKSharedAPICast.h:
362 (WebKit::toCopiedURLAPI):
363 * Shared/API/c/WKURL.cpp:
364 (WKURLCreateWithUTF8CString):
365 (WKURLCreateWithBaseURL):
366 * UIProcess/API/gtk/WebKitWebResource.cpp:
367 (webkit_web_resource_get_data):
368 * UIProcess/WebIconDatabase.cpp:
369 (WebKit::WebIconDatabase::didChangeIconForPageURL):
370 (WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):
371 * WebProcess/WebPage/WebPage.cpp:
372 (WebKit::WebPage::userAgent):
374 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
376 [WK2] API::String creation functions should return Ref<>
377 https://bugs.webkit.org/show_bug.cgi?id=144218
379 Reviewed by Darin Adler.
381 Have API::String creation functions return Ref<>.
382 The call-sites are also updated, using and operating on the returned
383 Ref<> object, where possible.
385 * Shared/API/APIString.h:
386 * Shared/API/c/WKPluginInformation.cpp:
387 (WKPluginInformationBundleIdentifierKey):
388 (WKPluginInformationBundleVersionKey):
389 (WKPluginInformationBundleShortVersionKey):
390 (WKPluginInformationPathKey):
391 (WKPluginInformationDisplayNameKey):
392 (WKPluginInformationDefaultLoadPolicyKey):
393 (WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
394 (WKPluginInformationHasSandboxProfileKey):
395 (WKPluginInformationFrameURLKey):
396 (WKPluginInformationMIMETypeKey):
397 (WKPluginInformationPageURLKey):
398 (WKPluginInformationPluginspageAttributeURLKey):
399 (WKPluginInformationPluginURLKey):
400 (WKPlugInInformationReplacementObscuredKey):
401 * Shared/API/c/WKSharedAPICast.h:
402 (WebKit::ProxyingRefPtr::ProxyingRefPtr):
403 (WebKit::toCopiedAPI):
404 * Shared/API/c/WKString.cpp:
405 (WKStringCreateWithUTF8CString):
406 (WKStringCreateWithJSString):
407 * UIProcess/API/C/WKDatabaseManager.cpp:
408 (WKDatabaseManagerGetOriginKey):
409 (WKDatabaseManagerGetOriginQuotaKey):
410 (WKDatabaseManagerGetOriginUsageKey):
411 (WKDatabaseManagerGetDatabaseDetailsKey):
412 (WKDatabaseManagerGetDatabaseDetailsNameKey):
413 (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
414 (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
415 (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
416 (WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
417 (WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
418 * UIProcess/API/C/WKKeyValueStorageManager.cpp:
419 (WKKeyValueStorageManagerGetOriginKey):
420 (WKKeyValueStorageManagerGetCreationTimeKey):
421 (WKKeyValueStorageManagerGetModificationTimeKey):
422 * UIProcess/API/C/WKPage.cpp:
423 (WKPageGetSessionHistoryURLValueType):
424 (WKPageGetSessionBackForwardListItemValueType):
425 (toGenericCallbackFunction):
426 (WKPageValidateCommand):
427 * UIProcess/WebProcessPool.cpp:
428 (WebKit::WebProcessPool::didReceiveInvalidMessage):
430 2015-04-27 Brady Eidson <beidson@apple.com>
432 Make 'enum NavigationType' be an enum class
433 https://bugs.webkit.org/show_bug.cgi?id=144270
435 Reviewed by Alex Christensen.
437 * Shared/API/c/WKSharedAPICast.h:
440 * Shared/NavigationActionData.cpp:
441 (WebKit::NavigationActionData::NavigationActionData):
443 * UIProcess/API/Cocoa/WKNavigationAction.mm:
444 (toWKNavigationType):
446 * UIProcess/API/gtk/WebKitPrivate.cpp:
447 (toWebKitNavigationType):
449 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
450 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
452 * WebProcess/WebPage/WebInspector.cpp:
453 (WebKit::WebInspector::openInNewTab):
455 2015-04-27 Brent Fulgham <bfulgham@apple.com>
457 REGRESSION(r182879): Images and video can no longer be downloaded
458 https://bugs.webkit.org/show_bug.cgi?id=144267
459 <rdar://problem/20702844>
461 Reviewed by Simon Fraser.
463 * UIProcess/mac/WKActionMenuController.mm:
464 (-[WKActionMenuController _createActionMenuItemForTag:]): Check for
465 "!WebCore::protocolIs(..., "file")" for image and media downloads.
467 2015-04-27 Csaba Osztrogonác <ossy@webkit.org>
469 [EFL] TestWebKitAPI's forwarding header generator should depend on WebKit2's generator
470 https://bugs.webkit.org/show_bug.cgi?id=143874
472 Reviewed by Gyuyoung Kim.
474 * PlatformEfl.cmake: Rename the generator to have consistent name with other generators.
475 * Scripts/generate-forwarding-headers.pl: Removed the unnecessary multiple include-path support.
477 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
479 [SOUP] Add initial implementation of NetworkProcess disk cache
480 https://bugs.webkit.org/show_bug.cgi?id=143872
482 Reviewed by Martin Robinson.
484 Implement the platform specific parts of the disk cache
485 implementation for Soup. It's mainly NetworkCache::Data and
486 NetworkCache::IOChannel.
489 * NetworkProcess/cache/NetworkCache.cpp:
490 (WebKit::NetworkCache::dumpFileChanged):
491 (WebKit::NetworkCache::Cache::initialize):
492 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
493 * NetworkProcess/cache/NetworkCacheData.h:
494 (WebKit::NetworkCache::Data::soupBuffer):
495 * NetworkProcess/cache/NetworkCacheDataSoup.cpp: Added.
496 (WebKit::NetworkCache::Data::Data):
497 (WebKit::NetworkCache::Data::empty):
498 (WebKit::NetworkCache::Data::data):
499 (WebKit::NetworkCache::Data::isNull):
500 (WebKit::NetworkCache::Data::apply):
501 (WebKit::NetworkCache::Data::subrange):
502 (WebKit::NetworkCache::concatenate):
503 (WebKit::NetworkCache::MapWrapper::~MapWrapper):
504 (WebKit::NetworkCache::deleteMapWrapper):
505 (WebKit::NetworkCache::mapFile):
506 (WebKit::NetworkCache::Data::adoptMap):
507 (WebKit::NetworkCache::computeSHA1):
508 (WebKit::NetworkCache::bytesEqual):
509 * NetworkProcess/cache/NetworkCacheIOChannel.h:
510 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp: Added.
511 (WebKit::NetworkCache::IOChannel::IOChannel):
512 (WebKit::NetworkCache::IOChannel::open):
513 (WebKit::NetworkCache::fillDataFromReadBuffer):
514 (WebKit::NetworkCache::inputStreamReadReadyCallback):
515 (WebKit::NetworkCache::IOChannel::read):
516 (WebKit::NetworkCache::IOChannel::readSync):
517 (WebKit::NetworkCache::outputStreamWriteReadyCallback):
518 (WebKit::NetworkCache::IOChannel::write):
519 * NetworkProcess/cache/NetworkCacheStorageSoup.cpp: Removed.
520 * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
521 * NetworkProcess/soup/NetworkProcessSoup.cpp:
522 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
523 (WebKit::NetworkProcess::platformSetCacheModel):
524 (WebKit::NetworkProcess::clearDiskCache):
527 2015-04-26 Yusuke Suzuki <utatane.tea@gmail.com>
529 [ES6] Implement ES6 template literals
530 https://bugs.webkit.org/show_bug.cgi?id=142691
532 Reviewed by Darin Adler.
534 Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
536 * Configurations/FeatureDefines.xcconfig:
538 2015-04-26 Sungmann Cho <sungmann.cho@navercorp.com>
540 Remove PluginView::renderer().
541 https://bugs.webkit.org/show_bug.cgi?id=144216
543 Reviewed by Darin Adler.
545 Nobody should have to know about the plug-in view's renderer except the plug-in view itself.
547 No new tests, no behavior change.
549 * WebProcess/Plugins/PDF/PDFPlugin.mm:
550 (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
551 (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
552 * WebProcess/Plugins/PluginView.cpp:
553 (WebKit::PluginView::renderer): Deleted.
554 * WebProcess/Plugins/PluginView.h:
556 2015-04-26 Doug Russell <d_russell@apple.com>
558 AX: richer text change notifications (142719)
559 https://bugs.webkit.org/show_bug.cgi?id=142719
561 Reviewed by Darin Adler.
563 Richer accessibility value change notifications. Introduce AXTextEditType,
564 postTextStateChangeNotification and postTextReplacementNotification to give assistive
565 tech apps more reliable context for responding to changes in web content. Also implement
566 a mechanism to post value changes in password form fields in coalesced ticks to thwart
567 analyzing the cadence of changes.
569 Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
570 and an overload of postTextReplacementNotification to give assistive tech apps more
571 reliable context for responding to changes in web content selection. Also block posting
572 selection changes on password fields.
574 * UIProcess/WebEditCommandProxy.cpp:
575 (WebKit::WebEditCommandProxy::nameForEditAction):
577 2015-04-26 Dan Bernstein <mitz@apple.com>
579 <rdar://problem/20702337> REGRESSION (r182952): Plug-in service fails to load because it links against WebKit2.framework
580 https://bugs.webkit.org/show_bug.cgi?id=144233
582 Reviewed by Simon Fraser.
584 Have the plug-in service link against WebKit.framework rather than WebKit2.framework.
586 * Configurations/PluginService.32.xcconfig: Removed linker flags for linking against WebKit2
587 and Foundation from the definition of OTHER_LDFLAGS. Since linking is no longer conditional,
588 we can just do it in the target’s Link Binary With Libraries build phase.
590 * Configurations/PluginService.64.xcconfig: Ditto.
592 * WebKit2.xcodeproj/project.pbxproj: Have Foundation and WebKit listed in the services’ Link
593 Binariy With Libraries build phases (one service already had WebKit).
595 2015-04-26 Dan Bernstein <mitz@apple.com>
599 * UIProcess/ios/forms/WKFileUploadPanel.mm:
600 (-[WKFileUploadPanel _showDocumentPickerMenu]): Suppressed deprecation warnings around use
601 of -[UIDocumentMenuViewController _setIgnoreApplicationEntitlementForImport:].
603 2015-04-25 Tim Horton <timothy_horton@apple.com>
605 Further update gesture swipe shadow style
606 https://bugs.webkit.org/show_bug.cgi?id=144215
607 <rdar://problem/19295843>
609 Reviewed by Dan Bernstein.
611 * Resources/mac/SwipeShadow.png: Removed.
612 * Resources/mac/SwipeShadow@2x.png: Removed.
613 * UIProcess/mac/ViewGestureController.h:
614 * UIProcess/mac/ViewGestureControllerMac.mm:
615 (WebKit::ViewGestureController::beginSwipeGesture):
616 * WebKit2.xcodeproj/project.pbxproj:
617 Use a CAGradientLayer instead of PNGs for the swipe shadow.
619 2015-04-25 Dan Bernstein <mitz@apple.com>
621 WebKit2 part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
622 https://bugs.webkit.org/show_bug.cgi?id=144201
624 Reviewed by Darin Adler.
626 Instead of TBD, we use the high version number to which it corresponds in CFAvailability.h,
629 * mac/MigrateHeadersFromWebKitLegacy.make: To detect not-yet-available declarations in
630 headers, look for "9876_5" rather than "TBA".
632 2015-04-24 Timothy Hatcher <timothy@apple.com>
634 Web Inspector: Remove native window dock controls
635 https://bugs.webkit.org/show_bug.cgi?id=144184
637 Reviewed by Joseph Pecoraro.
639 * Resources/DockBottom.pdf: Removed.
640 * Resources/DockBottomLegacy.pdf: Removed.
641 * Resources/DockRight.pdf: Removed.
642 * Resources/DockRightLegacy.pdf: Removed.
643 * UIProcess/WebInspectorProxy.h:
644 * UIProcess/mac/WebInspectorProxyMac.mm:
645 (WebKit::WebInspectorProxy::createInspectorWindow):
646 (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
647 * WebKit2.xcodeproj/project.pbxproj:
649 2015-04-25 Martin Robinson <mrobinson@igalia.com>
651 Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
652 https://bugs.webkit.org/show_bug.cgi?id=144182
654 Reviewed by Simon Fraser.
656 * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
658 2015-04-24 Simon Fraser <simon.fraser@apple.com>
660 Have the web inspector report accurate memory use for layers with detached backing store
661 https://bugs.webkit.org/show_bug.cgi?id=144179
663 Reviewed by Dean Jackson.
665 Remote layers can make their backing store volatile, so the backing only contributes
666 to reported memory use when attached.
668 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
670 2015-04-24 Andreas Kling <akling@apple.com>
672 theverge.com burning 100% CPU on iPad (due to window.screenX/Y)
673 <https://webkit.org/b/144175>
674 <rdar://problem/20694585>
676 Reviewed by Anders Carlsson.
678 Return an empty window rect on iOS WK2 builds. This avoids sending a synchronous
679 IPC request to the UI process that would give the same result, but spend way
680 more time and CPU cycles to do so.
682 With this change, theverge.com CPU usage goes from 100% to ~20% when idle.
684 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
685 (WebKit::WebChromeClient::windowRect):
687 2015-04-24 Brent Fulgham <bfulgham@apple.com>
689 TextIndicator for embedded PDFs is slightly offset
690 https://bugs.webkit.org/show_bug.cgi?id=144172
691 <rdar://problem/20691304>
693 Reviewed by Tim Horton.
695 When I converted the existing DOM Range logic to work with PDFSelections, I omitted the
696 step where the font ascent was used to adjust the origin used for the TextIndicator. This
697 patch determines the correct ascent for the range of characters in the selection, and
698 adjusts the offset by the difference between the ascent and the height of the selection rect.
700 Also, since the PDFSelection only supplies the bounding rect for the selection, I calculate
701 an equivalent text bounding box by insetting the rect by half the size of the ascent.
703 * WebProcess/Plugins/PDF/PDFPlugin.mm:
704 (WebKit::PDFPlugin::scaleFactor): Add accessor for PDF scale factor.
705 * WebProcess/Plugins/PDF/PDFPlugin.h:
706 * WebProcess/WebPage/mac/WebPageMac.mm:
707 (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Adjusted to take the
708 font ascent and scale factor into account.
710 2015-04-24 David Kilzer <ddkilzer@apple.com>
712 REGRESSION (r183293): Fix iOS EWS build by adding SPI declaration for +[UIPeripheralHost visiblePeripheralFrame]
714 Fixes the following build failures:
716 WebKit2/UIProcess/ios/WKPDFView.mm:740:45: error: class method '+visiblePeripheralFrame' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
717 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
718 ^~~~~~~~~~~~~~~~~~~~~~
719 WebKit2/UIProcess/ios/WKPDFView.mm:740:12: error: no viable conversion from 'id' to 'CGRect'
720 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
721 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
723 * Platform/spi/ios/UIKitSPI.h:
724 (+[UIPeripheralHost visiblePeripheralFrame]): Add declaration.
726 2015-04-24 Anders Carlsson <andersca@apple.com>
728 Change _WKWebsiteDataStore to hold on to an internal WKWebsiteDataStore
729 https://bugs.webkit.org/show_bug.cgi?id=144171
731 Reviewed by Tim Horton.
733 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
734 (-[WKWebViewConfiguration _websiteDataStore]):
735 (-[WKWebViewConfiguration _setWebsiteDataStore:]):
736 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
737 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
738 (-[_WKWebsiteDataStore initWithDataStore:]):
739 (+[_WKWebsiteDataStore defaultDataStore]):
740 (+[_WKWebsiteDataStore nonPersistentDataStore]):
741 (-[_WKWebsiteDataStore isNonPersistent]):
742 (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
743 (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
744 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
745 * UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
746 * WebKit2.xcodeproj/project.pbxproj:
748 2015-04-24 Tim Horton <timothy_horton@apple.com>
750 WKPDFView does not support password-protected PDFs
751 https://bugs.webkit.org/show_bug.cgi?id=144162
752 <rdar://problem/18411512>
754 Reviewed by Andy Estes.
756 * Platform/spi/ios/UIKitSPI.h:
759 * UIProcess/ios/WKPDFView.h:
760 * UIProcess/ios/WKPDFView.mm:
761 (-[WKPDFView _didLoadPDFDocument]):
762 (-[WKPDFView web_setContentProviderData:suggestedFilename:]):
763 Move creation of the UIPDFDocument (only possible if the CGPDFDocument is unlocked)
764 and initial setup of the page views out into _didLoadPDFDocument.
766 If the CGPDFDocument is locked, we'll show some UI to unlock it; otherwise
767 we'll continue on to _didLoadPDFDocument as previously.
769 (-[WKPDFView web_setMinimumSize:]):
770 Resize the password UI instead of the PDF pages if we have it.
772 (-[WKPDFView _computePageAndDocumentFrames]):
773 Don't bother doing any work revalidating PDF pages if the document is locked.
775 (-[WKPDFView _updatePasswordEntryField]):
776 Make sure that the UIDocumentPassword view is always the size of the scrollview.
777 This takes care of rotation.
779 (-[WKPDFView _keyboardDidShow:]):
780 Make sure that we scroll the password field around, if necessary, to keep it
781 on screen when editing begins.
783 (-[WKPDFView _showPasswordEntryField]):
784 (-[WKPDFView _hidePasswordEntryField]):
785 Adjust the background color (to match the UIDocumentPasswordView) and disable zooming
786 while it's up. The UIDocumentPassword view is installed into the scroll view
787 to match UIWebView behavior.
789 (-[WKPDFView userDidEnterPassword:forPasswordView:]):
790 (-[WKPDFView didBeginEditingPassword:inView:]):
791 (-[WKPDFView didEndEditingPassword:inView:]):
792 (-[WKPDFView _didFailToUnlock]):
793 Pop up a dialog informing the user that they entered the wrong password.
795 (-[WKPDFView _tryToUnlockWithPassword:]):
796 Try to unlock the document. If it succeeds, hide the unlock UI and go back to
799 2015-04-24 Commit Queue <commit-queue@webkit.org>
801 Unreviewed, rolling out r183266.
802 https://bugs.webkit.org/show_bug.cgi?id=144164
804 Broke 32-bit build and a test. (Requested by ap on #webkit).
808 "AX: richer text change notifications (142719)"
809 https://bugs.webkit.org/show_bug.cgi?id=142719
810 http://trac.webkit.org/changeset/183266
812 2015-04-24 Brent Fulgham <bfulgham@apple.com>
814 REGRESSION: WebKit2.ActionMenusTest API test fails
815 https://bugs.webkit.org/show_bug.cgi?id=144149
816 <rdar://problem/20677770>
818 Reviewed by Tim Horton.
820 Tested by TestWebKitAPI
822 The 'lookupTextAtLocation' method was not converting the NSEvent coordinates it
823 was receiving from root view to the plugin view. Consequently, full page PDFs
824 did hit testing correctly, but an <embed> PDF would not.
826 Since 'existingSelectionContainsPoint' is exposed as API, I also modified it to
827 expect 'root view' coordinates and perform the requisite conversions, rather
828 than expecting 'plugin view' coordinates.
830 * WebProcess/Plugins/PDF/PDFPlugin.mm:
831 (WebKit::PDFPlugin::existingSelectionContainsPoint): Expect 'root view' coordinates
833 (WebKit::PDFPlugin::lookupTextAtLocation): Properly convert the passed 'root view'
834 coordinates to the PDF's view coordinate space.
835 * WebProcess/WebPage/mac/WebPageMac.mm:
836 (WebKit::WebPage::performActionMenuHitTestAtLocation): Pass hit point using view coordinates,
837 not content coordinates.
839 2015-04-24 Anders Carlsson <andersca@apple.com>
841 Address a review comment from Joe Pecoraro.
843 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
845 2015-04-24 Anders Carlsson <andersca@apple.com>
847 Rename -[WKWebsiteDataStore isNonPersistent] to -[WKWebsiteDataStore isPersistent]
848 https://bugs.webkit.org/show_bug.cgi?id=144158
850 Reviewed by Beth Dakin.
852 * UIProcess/API/APIWebsiteDataStore.cpp:
853 (API::WebsiteDataStore::isPersistent):
854 (API::WebsiteDataStore::isNonPersistent): Deleted.
855 * UIProcess/API/APIWebsiteDataStore.h:
856 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
857 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
858 (-[WKWebsiteDataStore isPersistent]):
859 (-[WKWebsiteDataStore isNonPersistent]): Deleted.
860 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
861 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
862 (-[_WKWebsiteDataStore isNonPersistent]):
863 * UIProcess/WebsiteData/WebsiteDataStore.h:
865 2015-04-24 Brent Fulgham <bfulgham@apple.com>
867 Immediate action not functional for embedded PDFs
868 https://bugs.webkit.org/show_bug.cgi?id=143952
869 <rdar://problem/19842365>
871 Reviewed by Tim Horton.
873 Add a new method to retrieve appropriate dictionary lookup content and update the
874 hit test result with relevant dictionary content and the bounding rect of the
877 * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add stub.
878 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Initialize plugin type.
879 * WebProcess/Plugins/PDF/PDFPlugin.h:
880 * WebProcess/Plugins/PDF/PDFPlugin.mm:
881 (WebKit::rectInWindowSpaceForRectInLayoutSpace): New helper function to
882 convert PDF 'in page' units to the equivalent view units.
883 (WebKit::PDFPlugin::PDFPlugin): Initialize plugin type.
884 (WebKit::PDFPlugin::viewRectForSelection): Query a provided PDFSelection for
885 its bounding rect and return the result in view units.
886 * WebProcess/Plugins/Plugin.h:
887 * WebProcess/Plugins/PluginProxy.cpp: Initialize plugin type.
888 * WebProcess/Plugins/PluginProxy.h: Add stub.
889 * WebProcess/Plugins/PluginView.cpp:
890 (WebKit::PluginView::viewRectForSelection): Added.
891 * WebProcess/Plugins/PluginView.h:
892 * WebProcess/WebPage/WebPage.h:
893 * WebProcess/WebPage/mac/WebPageMac.mm:
894 (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Added.
895 (WebKit::textIndicatorTransitionForActionMenu): Added helper function.
896 (WebKit::WebPage::performActionMenuHitTestAtLocation): Update the hit test information
897 with relevant dictionary lookup content, and mark the result as a text node (if
900 2015-04-24 Jer Noble <jer.noble@apple.com>
902 [WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state actually changed.
903 https://bugs.webkit.org/show_bug.cgi?id=144153
905 Reviewed by Alexey Proskuryakov.
907 Check the old state vs. the new state and only issue the change notification if the IsPlayingAudio state changed.
909 * UIProcess/WebPageProxy.cpp:
910 (WebKit::WebPageProxy::isPlayingMediaDidChange):
912 2015-04-24 Antti Koivisto <antti@apple.com>
914 CrashTracer: [USER] com.apple.WebKit.Networking at com.apple.WebKit: WebKit::NetworkResourceLoader::~NetworkResourceLoader + 14
915 https://bugs.webkit.org/show_bug.cgi?id=144147
917 Reviewed by Chris Dumez.
919 Storage::storeBodyAsBlob copies the std::function callback for handling mapped bodies in a thread.
920 This is thread safe only if the function copy is thread safe. It is currently not as we are capturing
921 RefPtr<NetworkResourceLoader> and NetworkResourceLoader doesn't use thread safe refcounting.
923 Fix by avoiding copying of the callback. Use same apporach for WriteOperation as we already use for
924 ReadOperation: count the active operations in progress and delete WriteOperation when everything is
925 finished. This way we don't need to copy the function out from WriteOperation.
927 * NetworkProcess/cache/NetworkCacheStorage.cpp:
928 (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
929 (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
931 Move definition here from the header.
933 (WebKit::NetworkCache::Storage::~Storage):
934 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
936 Increment the operation count when storing a blob, call finishWriteOperation when done.
938 (WebKit::NetworkCache::Storage::dispatchReadOperation):
939 (WebKit::NetworkCache::Storage::finishReadOperation):
941 Count active operations instead of finished operations. This makes the code clearer.
943 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
944 (WebKit::NetworkCache::Storage::finishWriteOperation):
946 Mirror the way ReadOperations work.
948 * NetworkProcess/cache/NetworkCacheStorage.h:
949 (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation): Deleted.
951 2015-04-24 Timothy Hatcher <timothy@apple.com>
953 REGRESSION: Web Inspector: Start Timeline Recording in Develop menu broken
954 https://bugs.webkit.org/show_bug.cgi?id=144150
956 Reviewed by Brian Burg.
958 * WebProcess/WebPage/WebInspectorUI.cpp:
959 (WebKit::WebInspectorUI::evaluateCommandOnLoad): Properly treat bools as literals
960 instead of strings by not using the string version of evaluateCommandOnLoad.
962 2015-04-23 Anders Carlsson <andersca@apple.com>
964 Add headerdocs for WKWebsiteDataRecord and WKWebsiteDataStore
965 https://bugs.webkit.org/show_bug.cgi?id=144138
967 Reviewed by Darin Adler.
969 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
970 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
971 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
972 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
973 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
974 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
976 2015-04-24 Doug Russell <d_russell@apple.com>
978 AX: richer text change notifications (142719)
979 https://bugs.webkit.org/show_bug.cgi?id=142719
981 Reviewed by Darin Adler.
983 Richer accessibility value change notifications. Introduce AXTextEditType, postTextStateChangeNotification and postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content. Also implement a mechanism to post value changes in password form fields in coalesced ticks to thwart analyzing the cadence of changes.
985 Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent, and an overload of postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content selection. Also block posting selection changes on password fields.
987 * UIProcess/WebEditCommandProxy.cpp:
988 (WebKit::WebEditCommandProxy::nameForEditAction):
990 2015-04-24 Darin Adler <darin@apple.com>
992 Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
993 https://bugs.webkit.org/show_bug.cgi?id=128007
995 Reviewed by Anders Carlsson.
997 * NetworkProcess/cache/NetworkCacheEncoder.h: Added an include now
998 needed that was inherited from OwnPtr.h before.
1000 2015-04-24 Antti Koivisto <antti@apple.com>
1002 Network Cache: Make path functions members
1003 https://bugs.webkit.org/show_bug.cgi?id=144146
1005 Reviewed by Carlos Garcia Campos.
1007 This simplifies the code.
1009 * NetworkProcess/cache/NetworkCacheStorage.cpp:
1010 (WebKit::NetworkCache::Storage::partitionPathForKey):
1011 (WebKit::NetworkCache::Storage::recordPathForKey):
1012 (WebKit::NetworkCache::Storage::bodyPathForKey):
1013 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
1014 (WebKit::NetworkCache::Storage::remove):
1015 (WebKit::NetworkCache::Storage::dispatchReadOperation):
1016 (WebKit::NetworkCache::Storage::finishReadOperation):
1017 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
1018 (WebKit::NetworkCache::partitionPathForKey): Deleted.
1019 (WebKit::NetworkCache::recordPathForKey): Deleted.
1020 (WebKit::NetworkCache::bodyPathForKey): Deleted.
1021 * NetworkProcess/cache/NetworkCacheStorage.h:
1023 2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
1025 Unreviewed. Remove incorrect assert after r183189.
1027 In this case the assert was already there, but it's incorrect
1028 because we are handling uninitialized attachments below in the
1029 same function, and also when sending messages. So, if it's ok to
1030 send uninitialized attachments, it's ok to receive them. This
1031 didn't fail before r183189, because we were only invaliding the
1032 attachments by setting the file descriptor to -1, and they were
1033 handled as null attachments. After r183189, the move operator
1034 resets the moved attachment leaving it uninitialized again.
1036 * Platform/IPC/unix/ConnectionUnix.cpp:
1037 (IPC::Connection::processMessage):
1039 2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
1041 [SOUP] Use a webkit subdirectory for the disk cache
1042 https://bugs.webkit.org/show_bug.cgi?id=144048
1044 Reviewed by Martin Robinson.
1046 Recent versions of libsoup remove any file in cache dir not
1047 referenced by the index when the cache is loaded to workaround
1048 leaked resources when load/dump is unbalanced for whatever reason,
1049 like a crash. We currently use $XDG_CACHE_HOME/app-name as default
1050 disk cache directory, but that directory could be used by apps to
1051 cache other things, and the soup cache might end up deleting other
1052 stuff. The soup cache assumes the given directory is only for the
1053 disk cache, so we should ensure that.
1055 * NetworkProcess/soup/NetworkProcessSoup.cpp:
1056 (WebKit::NetworkProcess::platformInitializeNetworkProcess): Append
1057 webkit to the given disk cache and clear the previous soup cache if it exists.
1058 * WebProcess/soup/WebProcessSoup.cpp:
1059 (WebKit::WebProcess::platformInitializeWebProcess): Ditto.
1061 2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
1063 Unreviewed. Remove incorrect ASSERT added in r183176.
1065 We allow to encode null attachments.
1067 * Platform/unix/SharedMemoryUnix.cpp:
1068 (WebKit::SharedMemory::Handle::releaseAttachment):
1070 2015-04-23 Dan Bernstein <mitz@apple.com>
1072 <rdar://problem/20680694> Framework header postprocessing isn’t removing WK_DEPRECATED macros when it should.
1074 Reviewed by Andy Estes.
1076 * mac/postprocess-framework-headers.sh:
1078 2015-04-23 Simon Fraser <simon.fraser@apple.com>
1080 Make it possible to detach GraphicsLayerCA backing store
1081 https://bugs.webkit.org/show_bug.cgi?id=144140
1083 Reviewed by Tim Horton.
1085 This changes makes it possible to denote a GraphicsLayerCA's backing store
1086 as "attached" or not. When not attached, the backing store is made volatile
1087 and can be purged. This will be used in a future patch.
1089 * Shared/mac/RemoteLayerBackingStore.mm:
1090 (WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore): Whitespace.
1091 (WebKit::RemoteLayerBackingStore::display): If backingStoreWillBeDisplayed()
1092 returns true, this indicates that the backing store was brought out of the
1093 "unreachable" list, so return true even if the backing store doesn't require
1095 * Shared/mac/RemoteLayerBackingStoreCollection.h: C++11 initializer, and comments.
1096 * Shared/mac/RemoteLayerBackingStoreCollection.mm:
1097 (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
1098 (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed): Return true
1099 if the caller will need to submit the backing store in the current transaction.
1100 (WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable): This
1101 explicit dirtying is no longer necessary given the backingStoreWillBeDisplayed() change.
1102 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1103 (WebKit::applyPropertiesToLayer): Only set the layer's backing if we both have backing
1104 store, and it's attached.
1105 * Shared/mac/RemoteLayerTreeTransaction.h: New bit, and data member.
1106 * Shared/mac/RemoteLayerTreeTransaction.mm:
1107 (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
1108 (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1109 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1110 (WebKit::dumpChangedLayers):
1111 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1112 (WebKit::PlatformCALayerRemote::recursiveBuildTransaction): Only call display()
1113 on the backing store if it's attached.
1114 (WebKit::PlatformCALayerRemote::setBackingStoreAttached):
1115 (WebKit::PlatformCALayerRemote::backingStoreAttached):
1116 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1117 * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
1118 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1119 (WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):
1121 2015-04-23 Tim Horton <timothy_horton@apple.com>
1123 Quick Look preview popover is not dismissed on scroll in Mail
1124 https://bugs.webkit.org/show_bug.cgi?id=144119
1125 <rdar://problem/19752045>
1127 Reviewed by Anders Carlsson.
1129 * UIProcess/API/mac/WKView.mm:
1130 (-[WKView renewGState]):
1131 If we have a TextIndicator, dismiss all content relative child windows
1132 on renewGState, not just the TextIndicator itself.
1134 This will fix cases like Mail, where WebKit isn't driving the scrolling,
1135 and we have no way (except renewGState) to know that scrolling is happening.
1137 2015-04-23 Simon Fraser <simon.fraser@apple.com>
1139 Changing TiledBacking velocity should schedule a tile revalidation
1140 https://bugs.webkit.org/show_bug.cgi?id=144123
1142 Reviewed by Tim Horton.
1144 Drive-by fix: use the FrameView& that we have already.
1146 * WebProcess/WebPage/ios/WebPageIOS.mm:
1147 (WebKit::WebPage::updateVisibleContentRects):
1149 2015-04-23 Jer Noble <jer.noble@apple.com>
1151 [Mac] Disable QTKit by default on future OS X.
1152 https://bugs.webkit.org/show_bug.cgi?id=144082
1154 Reviewed by Darin Adler.
1156 QTKitEnabled defaults to false.
1158 * Shared/WebPreferencesDefinitions.h:
1160 2015-04-23 Jer Noble <jer.noble@apple.com>
1162 [WK2][Mac] Tweak the timing curve of the WebKit Fullscreen animation
1163 https://bugs.webkit.org/show_bug.cgi?id=144120
1165 Reviewed by Eric Carlson.
1167 Tweak the curve to ease-in faster when the fullscreen animation duration is short.
1169 * UIProcess/mac/WKFullScreenWindowController.mm:
1170 (timingFunctionForDuration):
1175 2015-04-23 Enrica Casucci <enrica@apple.com>
1177 iOS build fix after r183208.
1181 * UIProcess/ios/WKContentViewInteraction.mm:
1183 2015-04-22 Alexey Proskuryakov <ap@apple.com>
1185 [iOS] WebKit services should inherit environment variables for home
1186 https://bugs.webkit.org/show_bug.cgi?id=144078
1187 rdar://problem/20571678
1189 Reviewed by Dan Bernstein.
1191 Pass current environment variables as XPC bootstrap. Also while at it, made
1192 _CFBundleSetupXPCBootstrap not soft linked.
1194 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
1196 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1197 (WebKit::connectToService):
1199 2015-04-23 Enrica Casucci <enrica@apple.com>
1201 Support share button.
1202 https://bugs.webkit.org/show_bug.cgi?id=144077
1203 rdar://problem/19772892
1205 Reviewed by Darin Adler.
1207 * UIProcess/ios/WKContentViewInteraction.mm:
1208 (-[WKContentView _share:]):
1209 (-[WKContentView canPerformAction:withSender:]):
1210 (-[WKContentView _define:]):
1211 (-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
1212 (-[WKContentView moveByOffset:]):
1213 (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
1214 (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
1215 (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
1216 (-[WKContentView accessoryTab:]):
1217 (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
1218 (-[WKContentView executeEditCommandWithCallback:]):
1220 2015-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
1222 [UNIX] Do not allow copies of IPC::Attachment
1223 https://bugs.webkit.org/show_bug.cgi?id=144096
1225 Reviewed by Darin Adler.
1227 It ensures that the file descriptor ownership is always correctly
1228 transferred. This way we can remove the dispose() method to
1229 explicitly close the file descriptor and always close it in the
1230 Attachment destructor (unless explicitly transferred to
1231 IPC::Connection or SharedMemory). It simplifies the code and
1232 ensure we don't leak file descriptors.
1234 * Platform/IPC/ArgumentDecoder.cpp:
1235 (IPC::ArgumentDecoder::~ArgumentDecoder): Remove the code to
1236 explicitly dispose attachments.
1237 (IPC::ArgumentDecoder::removeAttachment): Use WTF::move().
1238 * Platform/IPC/ArgumentEncoder.cpp:
1239 (IPC::ArgumentEncoder::~ArgumentEncoder): Remove the code to
1240 explicitly dispose attachments.
1241 (IPC::ArgumentEncoder::addAttachment): Use WTF::move().
1242 (IPC::ArgumentEncoder::releaseAttachments): Simplify by using WTF::move().
1243 * Platform/IPC/ArgumentEncoder.h:
1244 * Platform/IPC/Attachment.cpp:
1245 (IPC::Attachment::encode): Move a copy of the attachment, and
1246 reset the file descriptor, since the ownership is passed to the encoder.
1247 * Platform/IPC/Attachment.h: Make copy constructor and assignment
1248 private to not allow public copies. The only copy allowed is done
1249 by Attachment::encode(). Make m_fileDescriptor mutable so that we
1250 can reset it in Attachment::encode() after passing the ownership
1252 * Platform/IPC/unix/AttachmentUnix.cpp:
1253 (IPC::Attachment::~Attachment): Close the file descriptor if it
1254 hasn't been released explicitly.
1255 (IPC::Attachment::dispose): Deleted.
1256 * Platform/IPC/unix/ConnectionUnix.cpp:
1257 (IPC::Connection::processMessage): Do not use AttachmentResourceGuard.
1258 (IPC::Connection::sendOutgoingMessage): Ditto.
1259 (IPC::AttachmentResourceGuard::AttachmentResourceGuard): Deleted.
1260 (IPC::AttachmentResourceGuard::~AttachmentResourceGuard): Deleted.
1261 * Platform/unix/SharedMemoryUnix.cpp:
1262 (WebKit::SharedMemory::Handle::~Handle): Do not call clear().
1263 (WebKit::SharedMemory::Handle::clear): Reset the attachment.
1264 * UIProcess/WebInspectorProxy.cpp:
1265 (WebKit::WebInspectorProxy::createInspectorPage): Use WTF::move().
1266 * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1267 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1268 Call releaseFileDescriptor() instead of fileDescritpro() since the
1269 ownership is passed to the connection.
1271 2015-04-23 Alexey Proskuryakov <ap@apple.com>
1275 * WebProcess/cocoa/WebProcessCocoa.mm: Correct the case of an include file name.
1277 2015-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
1279 Unreviewed. Fix debug build after r183176.
1281 * Platform/unix/SharedMemoryUnix.cpp:
1282 (WebKit::SharedMemory::Handle::decode):
1283 (WebKit::SharedMemory::createHandle):
1285 2015-04-23 Andreas Kling <akling@apple.com>
1287 There should only be one way to get the system memory size.
1288 <https://webkit.org/b/144081>
1290 Reviewed by Antti Koivisto.
1292 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1293 (WebKit::NetworkProcess::platformSetCacheModel):
1294 (WebKit::memorySize): Deleted.
1295 * WebProcess/cocoa/WebProcessCocoa.mm:
1296 (WebKit::WebProcess::platformSetCacheModel):
1297 (WebKit::memorySize): Deleted.
1299 2015-04-23 Chris Dumez <cdumez@apple.com>
1301 [WK2] WebDiagnosticLoggingClient is leaking
1302 https://bugs.webkit.org/show_bug.cgi?id=144089
1303 <rdar://problem/19706214>
1305 Reviewed by Darin Adler.
1307 WebDiagnosticLoggingClient is leaking. It is constructed inside WebPage
1308 constructor but there is no code destroying it.
1310 This patch adds a new xxxDestroyed() virtual function to
1311 DiagnosticLoggingClient and that is overriden in
1312 WebDiagnosticLoggingClient to call "delete this". This is the same
1313 pattern as for other WK2 clients (e.g. WebFrameLoaderClient,
1314 WebProgressTrackerClient).
1316 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
1317 (WebKit::WebDiagnosticLoggingClient::mainFrameDestroyed):
1318 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
1320 2015-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
1322 [UNIX] Simplify the file descriptor handling in SharedMemory
1323 https://bugs.webkit.org/show_bug.cgi?id=144046
1325 Reviewed by Darin Adler.
1327 Simplify the file descriptor handling and clarify its ownership by
1328 using IPC::Attachment in SharedMemory::Handle instead of fd and
1329 size members. SharedMemory::Handle::adoptFromAttachment() has been
1330 renamed as SharedMemory::Handle::adoptAttachment() and receives an
1331 IPC::Attachment. And SharedMemory::Handle::releaseToAttachment()
1332 has been renamed as SharedMemory::Handle::releaseAttachment().
1334 * Platform/IPC/Attachment.h: Add move constructor and move assigned operator.
1335 * Platform/IPC/Connection.h:
1336 (IPC::Connection::identifierIsNull): A file descriptor is null
1338 * Platform/IPC/unix/AttachmentUnix.cpp:
1339 (IPC::Attachment::Attachment):
1340 (IPC::Attachment::operator=):
1341 (IPC::Attachment::dispose): Reset the file descriptor after
1343 * Platform/IPC/unix/ConnectionUnix.cpp:
1344 (IPC::Connection::processMessage): Use
1345 SharedMemory::Handle::adoptAttachment() that receives an
1346 IPC::Attachment now.
1347 (IPC::Connection::sendOutgoingMessage): Use
1348 SharedMemory::Handle::releaseAttachment().
1349 * Platform/SharedMemory.h:
1350 * Platform/unix/SharedMemoryUnix.cpp:
1351 (WebKit::SharedMemory::Handle::Handle): Remove initializers for
1352 file descriptor and size members.
1353 (WebKit::SharedMemory::Handle::clear): Dispose the attachment.
1354 (WebKit::SharedMemory::Handle::isNull): Handle is null if the
1355 attachment file descriptor is -1.
1356 (WebKit::SharedMemory::Handle::encode): Use releaseAttachment().
1357 (WebKit::SharedMemory::Handle::decode): Use adoptAttachment().
1358 (WebKit::SharedMemory::Handle::releaseAttachment): Implement it
1360 (WebKit::SharedMemory::Handle::adoptAttachment): Ditto.
1361 (WebKit::SharedMemory::map): Use
1362 IPC::Attachment::releaseFileDescriptor() instead of manually
1363 changing the member.
1364 (WebKit::SharedMemory::createHandle): Initialize the handle
1365 attachment with the duplicated file descriptor and size.
1367 2015-04-22 Darin Adler <darin@apple.com>
1369 Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
1370 https://bugs.webkit.org/show_bug.cgi?id=143943
1372 Reviewed by Anders Carlsson.
1374 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
1375 Removed unneeded include.
1377 2015-04-22 Brent Fulgham <bfulgham@apple.com>
1379 VisibleSelection should only accept Range by reference
1380 https://bugs.webkit.org/show_bug.cgi?id=144047
1382 Reviewed by Tim Horton.
1384 Update all uses of VisibleSelection to pass a Range reference instead
1387 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1388 (WebKit::InjectedBundleRangeHandle::renderedImage):
1389 * WebProcess/WebPage/FindController.cpp:
1390 (WebKit::FindController::getImageForFindMatch):
1391 (WebKit::FindController::selectFindMatch):
1392 * WebProcess/WebPage/WebPage.cpp:
1393 (WebKit::WebPage::insertTextAsync):
1394 (WebKit::WebPage::setCompositionAsync):
1395 * WebProcess/WebPage/mac/WebPageMac.mm:
1396 (WebKit::WebPage::insertDictatedTextAsync):
1398 2015-04-22 Anders Carlsson <andersca@apple.com>
1400 Add WK_ARRAY and WK_SET annotations
1401 https://bugs.webkit.org/show_bug.cgi?id=144075
1402 rdar://problem/19417770
1404 Reviewed by Dan Bernstein.
1406 * Shared/API/Cocoa/WKFoundation.h:
1407 * UIProcess/API/Cocoa/WKBackForwardList.h:
1408 * UIProcess/API/Cocoa/WKUserContentController.h:
1409 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1410 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1411 * mac/postprocess-framework-headers.sh:
1413 2015-04-22 Brent Fulgham <bfulgham@apple.com>
1415 Unreviewed build fix after r183136.
1417 * WebProcess/WebPage/mac/WebPageMac.mm: Correct capitalization of
1418 'HTMLPluginImageElement.h' -> 'HTMLPlugInImageElement.h'
1420 2015-04-21 Brent Fulgham <bfulgham@apple.com>
1422 Extend action menus to support PDF
1423 https://bugs.webkit.org/show_bug.cgi?id=143895
1424 <rdar://problem/19003333>
1426 Reviewed by Tim Horton.
1428 If the mouse pointer is over a PDF, try to provide a relevant action menu for whatever
1429 content is under the mouse. For now, we only support copying text and handling URLs.
1431 If no text is selected, use the dictionary lookup service to find a semantically appropriate
1432 selection underneath the mouse. This is consistent with how normal text is treated in pure HTML
1433 views. If some text is already selected, and the mouse is over the existing selection, continue
1434 using the selected text. Otherwise, discard the old selection and select the most appropriate
1435 region under the mouse pointer.
1437 * Shared/API/c/WKActionMenuTypes.h: Add PDF menu option.
1438 * Shared/WebMouseEvent.cpp: Recognize mouse force events as valid mouse events.
1439 * UIProcess/mac/WKActionMenuController.mm:
1440 (-[WKActionMenuController _defaultMenuItemsForPDF]): Add simply copy text option.
1441 (-[WKActionMenuController _defaultMenuItems]): Recognize PDFs and add relevant action
1443 * WebProcess/Plugins/Netscape/NetscapePlugin.h: Provide stub for new method.
1444 * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Expose 'rectsForSelectionInLayerSpace',
1445 'rectsForAnnotationInLayoutSpace', 'layout', and 'currentPage'.
1446 * WebProcess/Plugins/PDF/PDFPlugin.h:
1447 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1448 (WebKit::PDFPlugin::getSelectionForWordAtPoint): Added.
1449 (WebKit::PDFPlugin::existingSelectionContainsPoint): Added.
1450 (WebKit::PDFPlugin::lookupTextAtLocation): Added.
1451 * WebProcess/Plugins/Plugin.h: Add declaration for new 'getSelectionForWordAtPoint' method.
1452 * WebProcess/Plugins/PluginProxy.h: Provide stub for new method.
1453 * WebProcess/Plugins/PluginView.cpp:
1454 (WebKit::PluginView::getSelectionForWordAtPoint): Added.
1455 (WebKit::PluginView::existingSelectionContainsPoint): Added.
1456 (WebKit::PluginView::lookupTextAtLocation): Added.
1457 * WebProcess/Plugins/PluginView.h:
1458 * WebProcess/WebPage/mac/WebPageMac.mm:
1459 (WebKit::WebPage::performActionMenuHitTestAtLocation): Update to support PDF documents and retrieve
1460 relevant content to support later action menu handling.
1462 2015-04-22 Eric Carlson <eric.carlson@apple.com>
1464 Update AirPlay sandbox rules
1465 https://bugs.webkit.org/show_bug.cgi?id=144062
1466 <rdar://problem/19869448>
1468 Reviewed by Alexey Proskuryakov.
1470 * WebProcess/com.apple.WebProcess.sb.in: Remove obsolete rules.
1472 2015-04-22 Alexey Proskuryakov <ap@apple.com>
1474 [Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
1475 https://bugs.webkit.org/show_bug.cgi?id=144052
1476 rdar://problem/19754404
1478 Reviewed by Darin Adler.
1480 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
1481 (main): Make XPC transaction tracking work again after a re-exec.
1483 2015-04-22 Zan Dobersek <zdobersek@igalia.com>
1485 [WK2] Have API::Array creation methods return Ref<>
1486 https://bugs.webkit.org/show_bug.cgi?id=143933
1488 Reviewed by Darin Adler.
1490 API::Array::create() and API::Array::createStringArray() should return Ref<> objects
1491 as the return values are never null. It's up to the caller to implicitly convert the
1492 returned objects to RefPtr<> if so required. All the call-sites have been updated to
1495 * Shared/API/APIArray.cpp:
1496 (API::Array::create):
1497 (API::Array::createStringArray):
1499 * Shared/API/APIArray.h:
1500 * Shared/API/APIDictionary.cpp:
1501 (API::Dictionary::keys):
1502 * Shared/API/APIDictionary.h:
1503 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1504 (ensureObjectStream):
1505 * Shared/API/c/WKArray.cpp:
1507 (WKArrayCreateAdoptingValues):
1508 * Shared/API/c/WKContextMenuItem.cpp:
1509 (WKContextMenuCopySubmenuItems):
1510 * Shared/API/c/WKDictionary.cpp:
1511 (WKDictionaryCopyKeys):
1512 * Shared/API/c/WKMutableArray.cpp:
1513 (WKMutableArrayCreate):
1514 * Shared/Cocoa/WKNSDictionary.mm:
1515 (-[WKNSDictionary keyEnumerator]):
1516 * Shared/SecurityOriginData.cpp:
1517 (WebKit::performAPICallbackWithSecurityOriginDataVector):
1518 * Shared/WebContextMenuItem.cpp:
1519 (WebKit::WebContextMenuItem::submenuItemsAsAPIArray):
1520 * Shared/WebContextMenuItem.h:
1521 * Shared/WebOpenPanelParameters.cpp:
1522 (WebKit::WebOpenPanelParameters::acceptMIMETypes):
1523 (WebKit::WebOpenPanelParameters::selectedFileNames):
1524 * Shared/WebOpenPanelParameters.h:
1525 * UIProcess/API/C/WKBackForwardListRef.cpp:
1526 (WKBackForwardListCopyBackListWithLimit):
1527 (WKBackForwardListCopyForwardListWithLimit):
1528 * UIProcess/API/C/WKGrammarDetail.cpp:
1529 (WKGrammarDetailCopyGuesses):
1530 * UIProcess/API/C/WKOpenPanelParameters.cpp:
1531 (WKOpenPanelParametersCopyAcceptedMIMETypes):
1532 (WKOpenPanelParametersCopySelectedFileNames):
1533 * UIProcess/API/C/WKPage.cpp:
1534 (WKPageSetPageContextMenuClient):
1535 (WKPageCopyRelatedPages):
1536 * UIProcess/API/Cocoa/WKBackForwardList.mm:
1537 (-[WKBackForwardList backList]):
1538 (-[WKBackForwardList forwardList]):
1539 * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
1541 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1542 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1543 * UIProcess/API/gtk/WebKitBackForwardList.cpp:
1544 (webkit_back_forward_list_get_back_list_with_limit):
1545 (webkit_back_forward_list_get_forward_list_with_limit):
1546 * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
1547 (webkit_file_chooser_request_get_mime_types):
1548 (webkit_file_chooser_request_get_mime_types_filter):
1549 (webkit_file_chooser_request_select_files):
1550 * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
1551 (WebKitNotificationProvider::notificationCloseCallback):
1552 * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
1553 (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
1554 * UIProcess/Notifications/WebNotificationProvider.cpp:
1555 (WebKit::WebNotificationProvider::clearNotifications):
1556 * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1557 (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
1558 * UIProcess/StatisticsRequest.cpp:
1559 (WebKit::StatisticsRequest::completedRequest):
1560 * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1561 (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
1562 * UIProcess/WebBackForwardList.cpp:
1563 (WebKit::WebBackForwardList::backList):
1564 (WebKit::WebBackForwardList::forwardList):
1565 (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit):
1566 (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit):
1567 * UIProcess/WebBackForwardList.h:
1568 * UIProcess/WebCookieManagerProxy.cpp:
1569 (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
1570 * UIProcess/WebDatabaseManagerProxy.cpp:
1571 (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
1572 (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
1573 * UIProcess/WebGrammarDetail.cpp:
1574 (WebKit::WebGrammarDetail::guesses):
1575 * UIProcess/WebGrammarDetail.h:
1576 * UIProcess/WebKeyValueStorageManager.cpp:
1577 (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1578 (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
1579 * UIProcess/WebMediaCacheManagerProxy.cpp:
1580 (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
1581 * UIProcess/WebOriginDataManagerProxy.cpp:
1582 (WebKit::WebOriginDataManagerProxy::didGetOrigins):
1583 * UIProcess/WebPageProxy.cpp:
1584 (WebKit::WebPageProxy::didFindStringMatches):
1585 * UIProcess/WebProcessPool.cpp:
1586 (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins):
1587 * UIProcess/ios/forms/WKFileUploadPanel.mm:
1588 (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
1589 (-[WKFileUploadPanel presentWithParameters:resultListener:]):
1590 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
1591 (-[WKWebProcessPlugInFrame childFrames]):
1592 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
1593 (WKBundleBackForwardListItemCopyChildren):
1594 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1595 (WKBundleFrameCopyChildFrames):
1596 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1597 (WKBundlePageCopyTrackedRepaintRects):
1598 * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
1599 (WebKit::InjectedBundleBackForwardListItem::children):
1600 * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
1601 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
1602 (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
1603 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1604 (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
1605 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1606 (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
1607 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1608 (WebKit::findLargestFrameInFrameSet):
1609 * WebProcess/WebPage/WebFrame.cpp:
1610 (WebKit::WebFrame::childFrames):
1611 * WebProcess/WebPage/WebFrame.h:
1612 * WebProcess/WebPage/WebPage.cpp:
1613 (WebKit::WebPage::trackedRepaintRects):
1614 * WebProcess/WebPage/WebPage.h:
1616 2015-04-21 Eric Carlson <eric.carlson@apple.com>
1618 [Mac] Use one playback target for all web processes
1619 https://bugs.webkit.org/show_bug.cgi?id=144009
1621 Reviewed by Tim Horton.
1623 Every WebPageProxy uses the WebMediaSessionManager singleton to talk to the playback target
1626 * UIProcess/PageClient.h:
1627 * UIProcess/WebPageProxy.cpp:
1628 (WebKit::WebPageProxy::WebPageProxy):
1629 (WebKit::WebPageProxy::resetState):
1630 (WebKit::WebPageProxy::isPlayingMediaDidChange):
1631 (WebKit::WebPageProxy::addPlaybackTargetPickerClient):
1632 (WebKit::WebPageProxy::removePlaybackTargetPickerClient):
1633 (WebKit::WebPageProxy::showPlaybackTargetPicker):
1634 (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
1635 (WebKit::WebPageProxy::setPlaybackTarget):
1636 (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
1637 (WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
1638 (WebKit::WebPageProxy::devicePickerProxy): Deleted.
1639 (WebKit::WebPageProxy::startingMonitoringPlaybackTargets): Deleted.
1640 (WebKit::WebPageProxy::stopMonitoringPlaybackTargets): Deleted.
1641 (WebKit::WebPageProxy::didChoosePlaybackTarget): Deleted.
1642 * UIProcess/WebPageProxy.h:
1643 (WebKit::WebPageProxy::isPlayingAudio):
1644 * UIProcess/WebPageProxy.messages.in:
1645 * UIProcess/mac/PageClientImpl.h:
1646 * UIProcess/mac/PageClientImpl.mm:
1647 (WebKit::PageClientImpl::mediaSessionManager):
1648 (WebKit::PageClientImpl::createPlaybackTargetPicker): Deleted.
1649 * UIProcess/mac/WebMediaSessionManagerMac.cpp: Added.
1650 (WebKit::WebMediaSessionManagerMac::singleton):
1651 (WebKit::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
1652 (WebKit::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
1653 (WebKit::WebMediaSessionManagerMac::targetPicker):
1654 * UIProcess/mac/WebMediaSessionManagerMac.h: Added.
1655 * WebProcess/Plugins/PluginView.h:
1656 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1657 (WebKit::WebChromeClient::isPlayingMediaDidChange):
1658 (WebKit::WebChromeClient::addPlaybackTargetPickerClient):
1659 (WebKit::WebChromeClient::removePlaybackTargetPickerClient):
1660 (WebKit::WebChromeClient::showPlaybackTargetPicker):
1661 (WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
1662 (WebKit::WebChromeClient::startingMonitoringPlaybackTargets): Deleted.
1663 (WebKit::WebChromeClient::stopMonitoringPlaybackTargets): Deleted.
1664 * WebProcess/WebCoreSupport/WebChromeClient.h:
1665 * WebProcess/WebPage/WebPage.h:
1666 * WebProcess/WebPage/WebPage.messages.in:
1667 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1668 (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
1669 * WebProcess/WebPage/mac/WebPageMac.mm:
1670 (WebKit::WebPage::playbackTargetSelected):
1671 (WebKit::WebPage::playbackTargetAvailabilityDidChange):
1672 (WebKit::WebPage::setShouldPlayToPlaybackTarget):
1674 2015-04-21 Anders Carlsson <andersca@apple.com>
1676 WKWebsiteDataStore doesn't track and remove IndexedDB databases
1677 https://bugs.webkit.org/show_bug.cgi?id=144032
1678 rdar://problem/20242856
1680 Reviewed by Tim Horton.
1682 * DatabaseProcess/DatabaseProcess.cpp:
1683 (WebKit::DatabaseProcess::fetchWebsiteData):
1684 (WebKit::DatabaseProcess::deleteWebsiteData):
1685 (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
1686 * DatabaseProcess/DatabaseProcess.h:
1687 * DatabaseProcess/DatabaseProcess.messages.in:
1688 * Shared/WebsiteData/WebsiteDataTypes.h:
1689 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1690 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
1691 (dataTypesToString):
1692 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
1693 (WebKit::toWebsiteDataTypes):
1694 (WebKit::toWKWebsiteDataTypes):
1695 * UIProcess/Databases/DatabaseProcessProxy.cpp:
1696 (WebKit::generateCallbackID):
1697 (WebKit::DatabaseProcessProxy::~DatabaseProcessProxy):
1698 (WebKit::DatabaseProcessProxy::fetchWebsiteData):
1699 (WebKit::DatabaseProcessProxy::deleteWebsiteData):
1700 (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
1701 (WebKit::DatabaseProcessProxy::didClose):
1702 (WebKit::DatabaseProcessProxy::didFetchWebsiteData):
1703 (WebKit::DatabaseProcessProxy::didDeleteWebsiteData):
1704 (WebKit::DatabaseProcessProxy::didDeleteWebsiteDataForOrigins):
1705 * UIProcess/Databases/DatabaseProcessProxy.h:
1706 * UIProcess/Databases/DatabaseProcessProxy.messages.in:
1707 * UIProcess/WebProcessPool.h:
1708 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1709 (WebKit::WebsiteDataStore::fetchData):
1710 (WebKit::WebsiteDataStore::removeData):
1712 2015-04-21 Anders Carlsson <andersca@apple.com>
1714 Add module maps for WebKit
1715 https://bugs.webkit.org/show_bug.cgi?id=144026
1716 rdar://problem/19665428
1718 Reviewed by Dan Bernstein.
1720 * Configurations/WebKit.xcconfig:
1721 * Modules/OSX.modulemap: Added.
1722 * Modules/iOS.modulemap: Added.
1724 2015-04-21 Tim Horton <timothy_horton@apple.com>
1726 Long pause under _takeViewSnapshot when screen updates are disabled
1727 https://bugs.webkit.org/show_bug.cgi?id=144017
1728 <rdar://problem/20548397>
1730 Reviewed by Simon Fraser.
1732 * UIProcess/API/mac/WKView.mm:
1733 (-[WKView _takeViewSnapshot]):
1734 Use CGSHWCaptureWindowList, for snapshotting that doesn't block on
1735 the next commit, and can succeed while screen updates are disabled
1738 2015-04-21 Chris Dumez <cdumez@apple.com>
1740 [WK2][NetworkCache] Better account of resource revalidations in efficacy logging
1741 https://bugs.webkit.org/show_bug.cgi?id=144014
1743 Reviewed by Antti Koivisto.
1745 Better account of resource revalidations in efficacy logging.
1746 Prevously, resources that were in the cache but needed revalidation
1747 were counted as retrieval successes, which is not entirely accurate.
1749 We now distinguish "is in the cache and is directly usable" from
1750 "is in the cache but needs revalidation". We also log how many of these
1751 revalidations are successful.
1753 * NetworkProcess/NetworkResourceLoader.cpp:
1754 (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
1755 * NetworkProcess/cache/NetworkCache.cpp:
1756 (WebKit::NetworkCache::Cache::update):
1757 * NetworkProcess/cache/NetworkCache.h:
1758 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1759 (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
1760 (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
1761 * NetworkProcess/cache/NetworkCacheStatistics.h:
1763 2015-04-21 Dan Bernstein <mitz@apple.com>
1765 [Cocoa] Framework header postprocessing should respect additional definitions
1766 https://bugs.webkit.org/show_bug.cgi?id=144018
1768 Reviewed by Anders Carlsson.
1770 * mac/postprocess-framework-headers.sh: Read definitons from
1771 /usr/local/include/WebKitAdditions/Scripts/postprocess-framework-headers-definitions, and
1772 have them take precedence over OSX_VERSION and IOS_VERSION and supply additional options to
1775 2015-04-21 Anders Carlsson <andersca@apple.com>
1777 Fix block signatures
1778 https://bugs.webkit.org/show_bug.cgi?id=144002
1780 Reviewed by Andreas Kling.
1782 * UIProcess/API/Cocoa/WKUIDelegate.h:
1783 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1784 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1785 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1786 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1787 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1788 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1789 (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1790 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1791 * UIProcess/ios/WKPDFView.mm:
1792 (-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]):
1793 * UIProcess/ios/forms/WKFileUploadPanel.mm:
1794 (-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
1795 (-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
1796 (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
1798 2015-04-21 Timothy Horton <timothy_horton@apple.com>
1800 PDFs still don't snapshot properly in iOS Safari
1801 https://bugs.webkit.org/show_bug.cgi?id=143976
1802 <rdar://problem/18283459>
1804 Reviewed by Anders Carlsson.
1806 * UIProcess/WebPageProxy.cpp:
1807 (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
1808 * UIProcess/WebPageProxy.h:
1809 * UIProcess/API/Cocoa/WKWebView.mm:
1810 (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
1811 Inform the client that we've passed all reasonable layout milestones
1812 as soon as the custom content provider has been handed its data.
1813 WKPDFView, the only custom content provider, synchronously lays out
1814 its subviews upon initial receipt of data, so this works fine for it.
1815 This ensures that clients that normally depend on layout milestones firing
1816 won't break when a custom content view is installed.
1818 (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
1819 Fall back to renderInContext: if the custom content view is not parented
1820 when a snapshot is requested.
1822 2015-04-21 Dan Bernstein <mitz@apple.com>
1824 Merged WKBackForwardListItem’s Internal category into the class extension in WKBackForwardListItemInternal.h.
1826 Reviewed by Anders Carlsson.
1828 * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
1829 (-[WKBackForwardListItem _item]):
1830 (-[WKBackForwardListItem _apiObject]):
1831 * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
1833 2015-04-21 Chris Dumez <cdumez@apple.com>
1835 Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
1836 https://bugs.webkit.org/show_bug.cgi?id=143970
1838 Reviewed by Darin Adler.
1840 Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
1841 constructor explicit as it copies the vector and it is easy to call it
1844 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1845 (WebKit::WebIDBServerConnection::setIndexKeys):
1846 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1848 2015-04-20 Dan Bernstein <mitz@apple.com>
1850 Expose more bundle form client functions as WKWebProcessPlugInFormDelegatePrivate methods
1851 https://bugs.webkit.org/show_bug.cgi?id=143973
1853 Reviewed by Anders Carlsson.
1855 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared new
1858 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Declared new frame
1860 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
1861 (-[WKWebProcessPlugInNodeHandle frame]): Added. Returns the node’s document’s frame. This is
1862 useful to delegates getting an array of nodes via the new method.
1864 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1865 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added overrides of
1866 shouldNotifyOnFormChanges and didAssociateFormControls, which call the new delegate methods.
1868 2015-04-20 Joseph Pecoraro <pecoraro@apple.com>
1870 Cleanup some StringBuilder use
1871 https://bugs.webkit.org/show_bug.cgi?id=143550
1873 Reviewed by Darin Adler.
1875 * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
1876 (WebKit::buildObjectStoreStatement):
1877 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1878 (WebKit::v2RecordsTableSchema):
1879 * Shared/Databases/IndexedDB/IDBUtilities.cpp:
1880 (WebKit::uniqueDatabaseIdentifier):
1881 * UIProcess/API/APIUserScript.cpp:
1882 (API::UserScript::generateUniqueURL):
1883 * UIProcess/WebProcessPool.cpp:
1884 (WebKit::WebProcessPool::didReceiveInvalidMessage):
1885 * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
1886 (WebKit::combinedSecurityOriginIdentifier):
1888 2015-04-20 Anders Carlsson <andersca@apple.com>
1890 Modify the WKWebsiteDataStore API to take a NSSet of types instead of a bitmask
1891 https://bugs.webkit.org/show_bug.cgi?id=143966
1893 Reviewed by Dan Bernstein.
1895 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1896 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
1897 (dataTypesToString):
1898 (-[WKWebsiteDataRecord dataTypes]):
1899 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
1900 (WebKit::toWebsiteDataTypes):
1901 (WebKit::toWKWebsiteDataTypes):
1902 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1903 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1904 (+[WKWebsiteDataStore allWebsiteDataTypes]):
1905 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1906 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1907 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1908 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
1909 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1910 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1911 (toWKWebsiteDataTypes):
1912 (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1913 (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1914 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1916 2015-04-20 Beth Dakin <bdakin@apple.com>
1918 Should remove mouseForceClick and mouseForceCancelled from DOM force events
1919 https://bugs.webkit.org/show_bug.cgi?id=143904
1921 rdar://problem/20578842
1923 Reviewed by Dan Bernstein.
1925 * WebProcess/WebPage/mac/WebPageMac.mm:
1926 (WebKit::WebPage::immediateActionDidCancel):
1928 2015-04-20 Tim Horton <timothy_horton@apple.com>
1930 Implement immediate action support for tel: and mailto: URLs
1931 https://bugs.webkit.org/show_bug.cgi?id=143916
1932 <rdar://problem/19721711>
1934 Reviewed by Darin Adler.
1936 * Shared/API/c/WKImmediateActionTypes.h:
1937 * UIProcess/mac/WKImmediateActionController.mm:
1938 (-[WKImmediateActionController _defaultAnimationController]):
1939 (-[WKImmediateActionController _animationControllerForDataDetectedText]):
1940 (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
1941 (-[WKImmediateActionController _menuItemForDataDetectedText]): Deleted.
1942 Add _animationControllerForDataDetectedLink and use it when
1943 building immediate actions for tel: and mailto: links.
1945 2015-04-20 Alex Christensen <achristensen@webkit.org>
1947 Properly report errors from _WKUserContentExtensionStore.
1948 https://bugs.webkit.org/show_bug.cgi?id=143808
1950 Reviewed by Darin Adler.
1952 * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
1953 (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
1954 (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
1955 (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
1957 2015-04-18 Simon Fraser <simon.fraser@apple.com>
1959 REGRESSION (r181656): Animated tiled layers are missing content
1960 https://bugs.webkit.org/show_bug.cgi?id=143911
1961 rdar://problem/20596328
1963 Reviewed by Darin Adler.
1965 After r181656, all requestAnimationFrame was falling back to timers, and not
1966 using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
1969 Replace this confusing Optional<> code with simpler code that just forces the
1970 clients to make a DisplayRefreshMonitor if they can, first asking
1971 ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().
1973 Make lots of things into references, and use C++11 initialization in some places.
1975 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1976 (WebKit::WebChromeClient::createDisplayRefreshMonitor):
1977 * WebProcess/WebCoreSupport/WebChromeClient.h:
1979 2015-04-18 Dan Bernstein <mitz@apple.com>
1981 SwipeShadow images are installed on iOS
1982 https://bugs.webkit.org/show_bug.cgi?id=143915
1984 Reviewed by Tim Horton.
1986 * Configurations/WebKit.xcconfig: Added Resources/Mac/* to
1987 EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*]. We could move more resources there and remove
1988 individual patterns.
1989 * Resources/SwipeShadow.png: Moved to mac.
1990 * Resources/SwipeShadow@2x.png: Moved to mac.
1991 * Resources/mac: Added.
1992 * Resources/mac/SwipeShadow.png: Moved from Source/WebKit2/Resources/SwipeShadow.png.
1993 * Resources/mac/SwipeShadow@2x.png: Moved from Source/WebKit2/Resources/SwipeShadow@2x.png.
1994 * WebKit2.xcodeproj/project.pbxproj: Created mac group in the Resources group and moved
1995 SwipeShadow*.png into it. Updated for file moves.
1997 2015-04-18 Chris Dumez <cdumez@apple.com>
1999 Fix NetworkCache Statistics database bootstrapping after r182803
2000 https://bugs.webkit.org/show_bug.cgi?id=143890
2002 Reviewed by Darin Adler.
2004 Update the NetworkCache Statistics database bootstrapping code to use
2005 the records path instead of the version path. Also check that the
2006 filenames in the folder are valid hashes to discard the *-body files.
2008 * NetworkProcess/cache/NetworkCache.cpp:
2009 (WebKit::NetworkCache::Cache::recordsPath):
2010 (WebKit::NetworkCache::Cache::storagePath): Deleted.
2011 * NetworkProcess/cache/NetworkCache.h:
2012 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2013 (WebKit::NetworkCache::Statistics::initialize):
2014 (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
2015 (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
2017 2015-04-17 Tim Horton <timothy_horton@apple.com>
2019 Clients sometimes block for 500ms in waitForPossibleGeometryUpdates
2020 https://bugs.webkit.org/show_bug.cgi?id=143901
2021 <rdar://problem/20488655>
2023 Reviewed by Anders Carlsson.
2025 * Platform/IPC/Connection.cpp:
2026 (IPC::Connection::waitForMessage):
2027 InterruptWaitingIfSyncMessageArrives already cancels waitForMessage if
2028 a sync message arrives while waiting, but it should also avoid waiting
2029 if there's a sync message already in the queue when the waiting starts,
2030 as that will have the same nasty effect.
2032 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2033 (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
2034 If a synchronous message comes in from the Web process while we're waiting,
2035 cancel our synchronous wait for DidUpdateGeometry. This will cause the size
2036 change to not synchronize with the Web process' painting, but that is better
2037 than pointlessly blocking for 500ms.
2039 2015-04-17 Chris Dumez <cdumez@apple.com>
2041 Possible null pointer dereference in WebDiagnosticLoggingClient::logDiagnosticMessageWithValue()
2042 https://bugs.webkit.org/show_bug.cgi?id=143899
2043 <rdar://problem/20584215>
2045 Reviewed by Anders Carlsson.
2047 WebDiagnosticLoggingClient::logDiagnosticMessage*() methods failed to
2048 check that m_page.corePage() was non-null before dereferencing, thus
2049 causing crashes when it is null.
2051 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
2052 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
2053 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
2054 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
2056 2015-04-17 Yongjun Zhang <yongjun_zhang@apple.com>
2058 WebKit client should be able to add view controller for link preview.
2059 https://bugs.webkit.org/show_bug.cgi?id=143686
2061 Add delegate methods to WKUIDelegatePrivate so that a WebKit client can prepare a view controller
2062 for link preview and react to the dismissal of this view controller. Also connect WKContentView to
2063 preview gesture recognizer and forwards the delegate callbacks to corresponding delegate methods
2064 in WKUIDelegatePrivate.
2066 Reviewed by Beth Dakin.
2068 * Platform/spi/ios/UIKitSPI.h:
2069 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2070 * UIProcess/ios/WKContentView.mm:
2071 (-[WKContentView willMoveToWindow:]):
2072 * UIProcess/ios/WKContentViewInteraction.h:
2073 * UIProcess/ios/WKContentViewInteraction.mm:
2074 (-[WKContentView cleanupInteraction]):
2075 (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
2076 (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
2077 (-[WKContentView gestureRecognizerShouldBegin:]):
2078 (-[WKContentView previewViewControllerForPosition:inSourceView:]):
2079 (-[WKContentView commitPreviewViewController:]):
2080 (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
2081 (-[WKContentView didDismissPreviewViewController:committing:]):
2083 2015-04-17 Beth Dakin <bdakin@apple.com>
2085 Force mouse events should go through normal mouse event handling code paths
2086 https://bugs.webkit.org/show_bug.cgi?id=143749
2088 rdar://problem/20472895
2090 Reviewed by Dean Jackson.
2092 This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the
2093 NSEventTypePressures that is gets and sends those down to the web process.
2095 Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an
2096 NSEventTypePressure, the new name makes it clear how the second parameter differs
2098 * Shared/NativeWebMouseEvent.h:
2100 New event types for the new types of events.
2101 * Shared/WebEvent.h:
2102 * Shared/WebEventConversion.cpp:
2103 (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2104 * Shared/mac/NativeWebMouseEventMac.mm:
2105 (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2106 * Shared/mac/WebEventFactory.h:
2108 All of the square-peg, round-hole problems of massaging the NSEventTypePressures
2109 events into WebMouseEvents is taken care of here.
2110 * Shared/mac/WebEventFactory.mm:
2111 (WebKit::mouseButtonForEvent):
2112 (WebKit::globalPointForEvent):
2113 (WebKit::pointForEvent):
2114 (WebKit::WebEventFactory::createWebMouseEvent):
2116 Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent
2118 * UIProcess/API/mac/WKView.mm:
2119 (-[WKView pressureChangeWithEvent:]):
2121 Handle the new types.
2122 * UIProcess/WebPageProxy.cpp:
2123 (WebKit::WebPageProxy::didReceiveEvent):
2125 Can delete inputDeviceForceDidChange since it’s no longer used.
2126 (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
2127 * UIProcess/WebPageProxy.h:
2129 Handle the new types of mouse events properly.
2130 * WebProcess/WebPage/WebPage.cpp:
2131 (WebKit::handleMouseEvent):
2133 Delete inputDeviceForceDidChange() and m_lastForceStage.
2134 * WebProcess/WebPage/WebPage.h:
2135 * WebProcess/WebPage/WebPage.messages.in:
2136 * WebProcess/WebPage/mac/WebPageMac.mm:
2137 (WebKit::WebPage::inputDeviceForceDidChange): Deleted.
2139 Handle new WebEvent types.
2140 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2142 2015-04-17 Commit Queue <commit-queue@webkit.org>
2144 Unreviewed, rolling out r182912 and r182920.
2145 https://bugs.webkit.org/show_bug.cgi?id=143881
2147 Build breakage in some configurations (Requested by ap on
2150 Reverted changesets:
2152 "Force mouse events should go through normal mouse event
2153 handling code paths"
2154 https://bugs.webkit.org/show_bug.cgi?id=143749
2155 http://trac.webkit.org/changeset/182912
2157 http://trac.webkit.org/changeset/182920
2159 2015-04-17 Antti Koivisto <antti@apple.com>
2161 Network Cache: Read resource record and body in parallel
2162 https://bugs.webkit.org/show_bug.cgi?id=143879
2164 Reviewed by Chris Dumez.
2166 We currently first fetch the record file and then fetch the body blob if needed.
2167 We can do both operations in parallel to reduce latency.
2169 * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
2170 (WebKit::NetworkCache::traverseCacheFiles):
2172 Do all validation in the client.
2174 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2175 (WebKit::NetworkCache::Storage::synchronize):
2177 Maintain a bloom filter that contains the body blobs to avoid unnecessary IO attempts.
2178 Delete any unknown file in cache directory.
2180 (WebKit::NetworkCache::Storage::addToRecordFilter):
2182 More informative name for record filter.
2184 (WebKit::NetworkCache::Storage::mayContain):
2185 (WebKit::NetworkCache::Storage::readRecord):
2186 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
2187 (WebKit::NetworkCache::Storage::dispatchReadOperation):
2189 Start record read IO and body blob read IO in parallel.
2191 (WebKit::NetworkCache::Storage::finishReadOperation):
2193 The read is finished when we have both the record and the blob.
2195 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2196 (WebKit::NetworkCache::Storage::retrieve):
2197 (WebKit::NetworkCache::Storage::store):
2198 (WebKit::NetworkCache::Storage::traverse):
2199 (WebKit::NetworkCache::Storage::clear):
2200 (WebKit::NetworkCache::Storage::shrink):
2201 (WebKit::NetworkCache::Storage::addToContentsFilter): Deleted.
2202 (WebKit::NetworkCache::Storage::decodeRecord): Deleted.
2203 * NetworkProcess/cache/NetworkCacheStorage.h:
2204 (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
2206 ReadOperation is now mutable and gathers the read result.
2208 2015-04-16 Anders Carlsson <andersca@apple.com>
2210 Stop installing WebKit2.framework
2211 https://bugs.webkit.org/show_bug.cgi?id=143860
2212 rdar://problem/18298491
2214 Reviewed by Dan Bernstein.
2216 * Configurations/WebKit2.xcconfig:
2217 Set SKIP_INSTALL=YES for all SDKs except 10.9 where we still need it.
2219 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
2221 Unreviewed. Fix the build with ENABLE(NETWORK_CACHE) and !ENABLE(SHAREABLE_RESOURCE).
2223 * NetworkProcess/cache/NetworkCacheEntry.cpp:
2224 * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
2225 (WebKit::NetworkCache::fileTimes): There's no st_birthtime in Linux.
2227 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
2229 [SOUP] ResourceRequest cache policy is not encoded/decoded in IPC messages
2230 https://bugs.webkit.org/show_bug.cgi?id=143867
2232 Reviewed by Sergio Villar Senin.
2234 Encode/Decode the ResourceRequest cache policy.
2236 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
2237 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
2238 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
2240 2015-04-16 Sungmann Cho <sungmann.cho@navercorp.com>
2242 Use UNUSED_PARAM instead of the void casting to suppress unused parameter warnings.
2243 https://bugs.webkit.org/show_bug.cgi?id=143750
2245 Reviewed by Darin Adler.
2247 No new tests, no behavior change.
2249 * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
2250 (WebKit::NotificationPermissionRequestManager::NotificationPermissionRequestManager):
2252 2015-04-16 Brady Eidson <beidson@apple.com>
2254 Compiling a content extension fails when user's home directory is on a different volume from /var/tmp.
2255 https://bugs.webkit.org/show_bug.cgi?id=143834
2257 Reviewed by Anders Carlsson.
2259 * UIProcess/API/APIUserContentExtensionStore.cpp:
2260 (API::compiledToFile): Use moveFile() instead of renameFile()
2262 2015-04-16 Anders Carlsson <andersca@apple.com>
2264 Deprecate _WKWebsiteDataStore in favor of WKWebsiteDataStore
2265 https://bugs.webkit.org/show_bug.cgi?id=143844
2267 Reviewed by Dan Bernstein.
2269 * Shared/API/Cocoa/WKFoundation.h:
2270 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2271 (-[WKWebViewConfiguration _validate]):
2272 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2273 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
2274 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2275 * mac/postprocess-framework-headers.sh:
2277 2015-04-16 Alex Christensen <achristensen@webkit.org>
2279 Removed unused WKUserContentFilterRef.
2280 https://bugs.webkit.org/show_bug.cgi?id=143852
2282 Reviewed by Sam Weinig.
2284 * Shared/WebCompiledContentExtension.cpp:
2285 (WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient): Deleted.
2286 (WebKit::LegacyContentExtensionCompilationClient::writeBytecode): Deleted.
2287 (WebKit::LegacyContentExtensionCompilationClient::writeActions): Deleted.
2288 (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData): Deleted.
2289 * Shared/WebCompiledContentExtension.h:
2290 * UIProcess/API/C/WKUserContentFilterRef.cpp: Removed.
2291 * UIProcess/API/C/WKUserContentFilterRef.h: Removed.
2292 * UIProcess/API/C/WebKit2_C.h:
2293 * UIProcess/API/Cocoa/_WKUserContentFilter.h:
2294 * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
2295 (-[_WKUserContentFilter initWithName:serializedRules:]): Deleted.
2296 * WebKit2.xcodeproj/project.pbxproj:
2298 2015-04-16 Beth Dakin <bdakin@apple.com>
2300 Rubber-stamped by Tim Horton.
2302 Fixing a small mistake in http://trac.webkit.org/changeset/182912 which should
2303 make sure to use the most up-to-date pressure information when setting the force
2306 * Shared/mac/WebEventFactory.mm:
2307 (WebKit::WebEventFactory::createWebMouseEvent):
2309 2015-04-13 Jer Noble <jer.noble@apple.com>
2311 [iOS] When simultaneously exiting-and-entering fullscreen, WebVideoFullscreenManager/Proxy becomes confused about what video element it represents.
2312 https://bugs.webkit.org/show_bug.cgi?id=143680
2314 Reviewed by Simon Fraser.
2316 The original assumption of WebVideoFullscreenManager and -Proxy was that the two classes would represent a
2317 single video element and its full screen state. With multiple animations in and out of fullscreen combined with
2318 multiple fullscreen modes, this assumption no longer holds true.
2320 Rather than having a WebVideoFullscreenManager which /isa/ WebVideoFullscreenModelVideoElement, the manager now
2321 /hasa/ WebVideoFullscreenModelVideoElement (or has many such models). Ditto for WebVideoFullscreenManager and
2322 WebVideoFullscreenInterfaceAVKit. The WebVideoFullscreenInterfaceAVKit still needs a WebVideoFullscreenModel to
2323 communicate with, so a new wrapper class is used for that purpose, WebVideoFullscreenModelContext. Ditto for
2324 WebVideoFullscreenModelVideoElement and the new class WebVideoFullscreenInterfaceContext. These context classes
2325 are paired and share a contextId, allowing the manager and its proxy to route messages between the UIProcess's
2326 WebVideoFullscreenInterfaceAVKit to-and-from the WebProcess's WebVideoFullscreenModelVideoElement.
2328 Both the WebVideoFullscreenModelContext and the WebVideoFullscreenInterfaceContext take a back-pointer to their
2329 manager or manager proxy, and each method on the context simply calls the matching method on the manager and
2330 passes its contextId as a parameter.
2332 Both the WebVideoFullscreenManager and the WebVideoFullscreenManagerProxy pass that contextId in each of their
2333 cross-process messages.
2335 On the other side, the manager and proxy also have a map between contextIds and their matching
2336 WebVideoFullscreenModelVideoElement (in the case of WebVideoFullscreenManager) or
2337 WebVideoFullscreenInterfaceAVKit (in the case of WebVideoFullscreenManagerProxy).
2339 While this change is large by LoC, it is almost entirely boilerplate. The new and interesting pieces are these:
2341 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2342 (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy): No longer a WebVideoFullscreenInterfaceAVKit.
2343 (WebKit::WebVideoFullscreenManagerProxy::invalidate): Walk through the models and interfaces, invalidating each.
2344 (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface): Added. Return a new model and interface tuple.
2345 (WebKit::WebVideoFullscreenManagerProxy::ensureModelAndInterface): Added. Lazily create, and add to the m_contextMap
2346 a new model and interface object.
2347 (WebKit::WebVideoFullscreenManagerProxy::ensureModel): Return the model half of ensureModelAndInterface().
2348 (WebKit::WebVideoFullscreenManagerProxy::ensureInterface): Return the interface half of ensureModelAndInterface().
2349 (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen): Walk through the outstanding interface objects, and if
2350 any have a fullscreen mode which matches the about-to-be-fullscreen interface, request that that other interface
2352 * WebProcess/ios/WebVideoFullscreenManager.mm:
2353 (WebKit::nextContextId): Static, incrementing counter used as a contextId source.
2354 (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager): No longer a WebVideoFullscreenModelVideoElement.
2355 (WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager): Walk through the models and interfaces, invalidating each.
2356 (WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Added. Return a new model and interface tuple.
2357 (WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Added. Lazily create, and add to the m_contextMap
2358 a new model and interface object.
2359 (WebKit::WebVideoFullscreenManager::ensureModel): Return the model half of ensureModelAndInterface().
2360 (WebKit::WebVideoFullscreenManager::ensureInterface): Return the interface half of ensureModelAndInterface().
2362 New classes and methods which just forward on to their owning objects:
2364 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2365 (WebKit::WebVideoFullscreenModelContext::create):
2366 (WebKit::WebVideoFullscreenModelContext::~WebVideoFullscreenModelContext):
2367 (WebKit::WebVideoFullscreenModelContext::invalidate):
2368 (WebKit::WebVideoFullscreenModelContext::layerHost):
2369 (WebKit::WebVideoFullscreenModelContext::setLayerHost):
2370 (WebKit::WebVideoFullscreenModelContext::setInitialVideoLayerFrame):
2371 (WebKit::WebVideoFullscreenModelContext::WebVideoFullscreenModelContext):
2372 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2373 (WebKit::WebVideoFullscreenModelContext::play):
2374 (WebKit::WebVideoFullscreenModelContext::pause):
2375 (WebKit::WebVideoFullscreenModelContext::togglePlayState):
2376 (WebKit::WebVideoFullscreenModelContext::beginScrubbing):
2377 (WebKit::WebVideoFullscreenModelContext::endScrubbing):
2378 (WebKit::WebVideoFullscreenModelContext::seekToTime):
2379 (WebKit::WebVideoFullscreenModelContext::fastSeek):
2380 (WebKit::WebVideoFullscreenModelContext::beginScanningForward):
2381 (WebKit::WebVideoFullscreenModelContext::beginScanningBackward):
2382 (WebKit::WebVideoFullscreenModelContext::endScanning):
2383 (WebKit::WebVideoFullscreenModelContext::requestExitFullscreen):
2384 (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame):
2385 (WebKit::WebVideoFullscreenModelContext::videoLayerFrame):
2386 (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity):
2387 (WebKit::WebVideoFullscreenModelContext::videoLayerGravity):
2388 (WebKit::WebVideoFullscreenModelContext::selectAudioMediaOption):
2389 (WebKit::WebVideoFullscreenModelContext::selectLegibleMediaOption):
2390 (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged):
2391 (WebKit::WebVideoFullscreenModelContext::didSetupFullscreen):
2392 (WebKit::WebVideoFullscreenModelContext::didEnterFullscreen):
2393 (WebKit::WebVideoFullscreenModelContext::didExitFullscreen):
2394 (WebKit::WebVideoFullscreenModelContext::didCleanupFullscreen):
2395 (WebKit::WebVideoFullscreenModelContext::fullscreenMayReturnToInline):
2396 * WebProcess/ios/WebVideoFullscreenManager.h:
2397 (WebKit::WebVideoFullscreenInterfaceContext::create):
2398 (WebKit::WebVideoFullscreenInterfaceContext::invalidate):
2399 (WebKit::WebVideoFullscreenInterfaceContext::layerHostingContext):
2400 (WebKit::WebVideoFullscreenInterfaceContext::isAnimating):
2401 (WebKit::WebVideoFullscreenInterfaceContext::setIsAnimating):
2402 (WebKit::WebVideoFullscreenInterfaceContext::targetIsFullscreen):
2403 (WebKit::WebVideoFullscreenInterfaceContext::setTargetIsFullscreen):
2404 (WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode):
2405 (WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode):
2406 (WebKit::WebVideoFullscreenInterfaceContext::isFullscreen):
2407 (WebKit::WebVideoFullscreenInterfaceContext::setIsFullscreen):
2408 * WebProcess/ios/WebVideoFullscreenManager.mm:
2409 (WebKit::WebVideoFullscreenInterfaceContext::WebVideoFullscreenInterfaceContext):
2410 (WebKit::WebVideoFullscreenInterfaceContext::~WebVideoFullscreenInterfaceContext):
2411 (WebKit::WebVideoFullscreenInterfaceContext::setLayerHostingContext):
2412 (WebKit::WebVideoFullscreenInterfaceContext::resetMediaState):
2413 (WebKit::WebVideoFullscreenInterfaceContext::setDuration):
2414 (WebKit::WebVideoFullscreenInterfaceContext::setCurrentTime):
2415 (WebKit::WebVideoFullscreenInterfaceContext::setBufferedTime):
2416 (WebKit::WebVideoFullscreenInterfaceContext::setRate):
2417 (WebKit::WebVideoFullscreenInterfaceContext::setVideoDimensions):
2418 (WebKit::WebVideoFullscreenInterfaceContext::setSeekableRanges):
2419 (WebKit::WebVideoFullscreenInterfaceContext::setCanPlayFastReverse):
2420 (WebKit::WebVideoFullscreenInterfaceContext::setAudioMediaSelectionOptions):
2421 (WebKit::WebVideoFullscreenInterfaceContext::setLegibleMediaSelectionOptions):
2422 (WebKit::WebVideoFullscreenInterfaceContext::setExternalPlayback):
2424 Cross-process methods which now take a contextId parameter:
2426 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2427 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2428 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
2429 (WebKit::WebVideoFullscreenManagerProxy::resetMediaState):
2430 (WebKit::WebVideoFullscreenManagerProxy::setCurrentTime):
2431 (WebKit::WebVideoFullscreenManagerProxy::setBufferedTime):
2432 (WebKit::WebVideoFullscreenManagerProxy::setVideoDimensions):
2433 (WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
2434 (WebKit::WebVideoFullscreenManagerProxy::setCanPlayFastReverse):
2435 (WebKit::WebVideoFullscreenManagerProxy::setAudioMediaSelectionOptions):
2436 (WebKit::WebVideoFullscreenManagerProxy::setLegibleMediaSelectionOptions):
2437 (WebKit::WebVideoFullscreenManagerProxy::setExternalPlaybackProperties):
2438 (WebKit::WebVideoFullscreenManagerProxy::setDuration):
2439 (WebKit::WebVideoFullscreenManagerProxy::setRate):
2440 (WebKit::WebVideoFullscreenManagerProxy::exitFullscreen):
2441 (WebKit::WebVideoFullscreenManagerProxy::cleanupFullscreen):
2442 (WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline):
2443 (WebKit::WebVideoFullscreenManagerProxy::play):
2444 (WebKit::WebVideoFullscreenManagerProxy::pause):
2445 (WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
2446 (WebKit::WebVideoFullscreenManagerProxy::beginScrubbing):
2447 (WebKit::WebVideoFullscreenManagerProxy::endScrubbing):
2448 (WebKit::WebVideoFullscreenManagerProxy::seekToTime):
2449 (WebKit::WebVideoFullscreenManagerProxy::fastSeek):
2450 (WebKit::WebVideoFullscreenManagerProxy::beginScanningForward):
2451 (WebKit::WebVideoFullscreenManagerProxy::beginScanningBackward):
2452 (WebKit::WebVideoFullscreenManagerProxy::endScanning):
2453 (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
2454 (WebKit::WebVideoFullscreenManagerProxy::didSetupFullscreen):
2455 (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
2456 (WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
2457 (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen):
2458 (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
2459 (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
2460 (WebKit::WebVideoFullscreenManagerProxy::selectAudioMediaOption):
2461 (WebKit::WebVideoFullscreenManagerProxy::selectLegibleMediaOption):
2462 (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged):
2463 (WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
2464 (WebKit::WebVideoFullscreenManagerProxy::videoLayerFrame): Deleted.
2465 (WebKit::WebVideoFullscreenManagerProxy::videoLayerGravity): Deleted.
2466 * WebProcess/ios/WebVideoFullscreenManager.messages.in:
2467 * WebProcess/ios/WebVideoFullscreenManager.mm:
2468 (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
2469 (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
2470 (WebKit::WebVideoFullscreenManager::resetMediaState):
2471 (WebKit::WebVideoFullscreenManager::setDuration):
2472 (WebKit::WebVideoFullscreenManager::setCurrentTime):
2473 (WebKit::WebVideoFullscreenManager::setBufferedTime):
2474 (WebKit::WebVideoFullscreenManager::setRate):
2475 (WebKit::WebVideoFullscreenManager::setVideoDimensions):
2476 (WebKit::WebVideoFullscreenManager::setSeekableRanges):
2477 (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse):
2478 (WebKit::WebVideoFullscreenManager::setAudioMediaSelectionOptions):
2479 (WebKit::WebVideoFullscreenManager::setLegibleMediaSelectionOptions):
2480 (WebKit::WebVideoFullscreenManager::setExternalPlayback):
2481 (WebKit::WebVideoFullscreenManager::play):
2482 (WebKit::WebVideoFullscreenManager::pause):
2483 (WebKit::WebVideoFullscreenManager::togglePlayState):
2484 (WebKit::WebVideoFullscreenManager::beginScrubbing):
2485 (WebKit::WebVideoFullscreenManager::endScrubbing):
2486 (WebKit::WebVideoFullscreenManager::seekToTime):
2487 (WebKit::WebVideoFullscreenManager::fastSeek):
2488 (WebKit::WebVideoFullscreenManager::beginScanningForward):
2489 (WebKit::WebVideoFullscreenManager::beginScanningBackward):
2490 (WebKit::WebVideoFullscreenManager::endScanning):
2491 (WebKit::WebVideoFullscreenManager::requestExitFullscreen):
2492 (WebKit::WebVideoFullscreenManager::selectAudioMediaOption):
2493 (WebKit::WebVideoFullscreenManager::selectLegibleMediaOption):
2494 (WebKit::WebVideoFullscreenManager::fullscreenModeChanged):
2495 (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
2496 (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
2497 (WebKit::WebVideoFullscreenManager::didExitFullscreen):
2498 (WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
2499 (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
2500 (WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
2501 (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
2502 (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
2504 2015-04-16 Beth Dakin <bdakin@apple.com>
2506 Force mouse events should go through normal mouse event handling code paths
2507 https://bugs.webkit.org/show_bug.cgi?id=143749
2509 rdar://problem/20472895
2511 Reviewed by Dean Jackson.
2513 This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the
2514 NSEventTypePressures that is gets and sends those down to the web process.
2516 Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an
2517 NSEventTypePressure, the new name makes it clear how the second parameter differs
2519 * Shared/NativeWebMouseEvent.h:
2521 New event types for the new types of events.
2522 * Shared/WebEvent.h:
2523 * Shared/WebEventConversion.cpp:
2524 (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2525 * Shared/mac/NativeWebMouseEventMac.mm:
2526 (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2527 * Shared/mac/WebEventFactory.h:
2529 All of the square-peg, round-hole problems of massaging the NSEventTypePressures
2530 events into WebMouseEvents is taken care of here.
2531 * Shared/mac/WebEventFactory.mm:
2532 (WebKit::mouseButtonForEvent):
2533 (WebKit::globalPointForEvent):
2534 (WebKit::pointForEvent):
2535 (WebKit::WebEventFactory::createWebMouseEvent):
2537 Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent
2539 * UIProcess/API/mac/WKView.mm:
2540 (-[WKView pressureChangeWithEvent:]):
2542 Handle the new types.
2543 * UIProcess/WebPageProxy.cpp:
2544 (WebKit::WebPageProxy::didReceiveEvent):
2546 Can delete inputDeviceForceDidChange since it’s no longer used.
2547 (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
2548 * UIProcess/WebPageProxy.h:
2550 Handle the new types of mouse events properly.
2551 * WebProcess/WebPage/WebPage.cpp:
2552 (WebKit::handleMouseEvent):
2554 Delete inputDeviceForceDidChange() and m_lastForceStage.
2555 * WebProcess/WebPage/WebPage.h:
2556 * WebProcess/WebPage/WebPage.messages.in:
2557 * WebProcess/WebPage/mac/WebPageMac.mm:
2558 (WebKit::WebPage::inputDeviceForceDidChange): Deleted.
2560 Handle new WebEvent types.
2561 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2563 2015-04-16 Dan Bernstein <mitz@apple.com>
2565 <rdar://problem/20575744> Also include a definition of __NSd_{current deployment target} in WKFoundation.h.
2567 Reviewed by Tim Horton.
2569 * WebKit2.xcodeproj/project.pbxproj:
2571 2015-04-16 Timothy Horton <timothy_horton@apple.com>
2573 Provide a mechanism through the legacy SPI to know when swipe gestures begin and end
2574 https://bugs.webkit.org/show_bug.cgi?id=143740
2575 <rdar://problem/20468540>
2577 Reviewed by Dan Bernstein.
2579 In the C SPI, add three WKPageLoaderClient callbacks for the three
2580 navigation gesture events (did begin, will end, did end).
2582 * UIProcess/API/C/WKPageLoaderClient.h:
2585 * UIProcess/API/APILoaderClient.h:
2586 (API::LoaderClient::navigationGestureDidBegin):
2587 (API::LoaderClient::navigationGestureWillEnd):
2588 (API::LoaderClient::navigationGestureDidEnd):
2589 * UIProcess/WebPageProxy.cpp:
2590 (WebKit::WebPageProxy::navigationGestureDidBegin):
2591 (WebKit::WebPageProxy::navigationGestureWillEnd):
2592 (WebKit::WebPageProxy::navigationGestureDidEnd):
2593 Dispatch navigation gesture events to the loader client as well as
2594 (after a bounce through the PageClient) the navigation delegate.
2596 * UIProcess/API/C/WKPage.cpp:
2597 (WKPageSetPageLoaderClient):
2600 * UIProcess/mac/ViewGestureController.h:
2601 * UIProcess/mac/ViewGestureControllerMac.mm:
2602 (WebKit::ViewGestureController::trackSwipeGesture):
2603 (WebKit::ViewGestureController::willEndSwipeGesture):
2604 While we were already informing WebPageProxy of 'did begin' and 'did end'
2605 navigation gesture events, we were missing 'will end'. Add it.
2607 2015-04-16 Tim Horton <timothy_horton@apple.com>
2609 Dispatching multiple asynchronous animated resizes in parallel causes page scale to detach from reality
2610 https://bugs.webkit.org/show_bug.cgi?id=143812
2611 <rdar://problem/19866038>
2613 Reviewed by Simon Fraser.
2615 * Shared/VisibleContentRectUpdateInfo.h:
2616 (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
2617 No cats in transaction (more of these below, too).
2619 * UIProcess/WebPageProxy.h:
2620 * UIProcess/WebPageProxy.messages.in:
2621 * UIProcess/ios/WebPageProxyIOS.mm:
2622 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2623 (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
2624 * WebProcess/WebPage/WebPage.h:
2625 * WebProcess/WebPage/WebPage.messages.in:
2626 * WebProcess/WebPage/ios/WebPageIOS.mm:
2627 (WebKit::WebPage::handleTap):
2628 (WebKit::WebPage::commitPotentialTap):
2629 (WebKit::WebPage::dynamicViewportSizeUpdate):
2630 Add an incrementing ID to dynamicViewportSizeUpdates. The UI process keeps
2631 the current ID, and it is bounced through the Web process (dynamicViewportSizeUpdates)
2632 back to the UI process (dynamicViewportUpdateChangedTarget). If we have
2633 dispatched another dynamicViewportSizeUpdate in the interim, ignore
2634 the intermediate target.
2636 2015-04-16 Sungmann Cho <sungmann.cho@navercorp.com>
2638 Remove PluginController::isPluginVisible().
2639 https://bugs.webkit.org/show_bug.cgi?id=143830
2641 Reviewed by Darin Adler.
2643 PluginController::isPluginVisible() was introduced by http://webkit.org/b/60285.
2644 This method had been used only for WebKit2 on Windows, and no one uses it now.
2645 So we can remove it.
2647 No new tests, no behavior change.
2649 * PluginProcess/PluginControllerProxy.cpp:
2650 (WebKit::PluginControllerProxy::isPluginVisible): Deleted.
2651 * PluginProcess/PluginControllerProxy.h:
2652 * WebProcess/Plugins/PluginController.h:
2653 * WebProcess/Plugins/PluginView.cpp:
2654 (WebKit::PluginView::isPluginVisible): Deleted.
2655 * WebProcess/Plugins/PluginView.h:
2657 2015-04-16 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2659 [EFL] Disable a flaky ewk_context_network_process_model() API test
2660 https://bugs.webkit.org/show_bug.cgi?id=143824
2662 Reviewed by Csaba Osztrogonác.
2664 ewk_context_network_process_model has been often failed. Though Bug 142967
2665 was filed to fix this issue, it is not solved yet. To maintain EFL bot, this patch
2666 disables it until fixing it.
2668 * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2671 2015-04-16 Csaba Osztrogonác <ossy@webkit.org>
2673 [WK2] Forwarding headers generator shouldn't generate unnecessary headers
2674 https://bugs.webkit.org/show_bug.cgi?id=143820
2676 Reviewed by Carlos Garcia Campos.
2678 * Scripts/generate-forwarding-headers.pl:
2679 (collectNeededHeaders):
2681 2015-04-16 Csaba Osztrogonác <ossy@webkit.org>
2683 [GTK] Run forwarding headers generator unconditionally
2684 https://bugs.webkit.org/show_bug.cgi?id=143819
2686 Reviewed by Carlos Garcia Campos.
2688 * PlatformGTK.cmake:
2690 2015-04-15 Brent Fulgham <bfulgham@apple.com>
2692 [Mac] Disable "Save to Downloads" option for local files
2693 https://bugs.webkit.org/show_bug.cgi?id=143794
2695 Reviewed by Tim Horton.
2697 Disable the Image and Media download options if the download
2698 target is a local file. We can only download web resources;
2699 anything else is actually a no-op.
2701 * UIProcess/mac/WKActionMenuController.mm:
2702 (-[WKActionMenuController _defaultMenuItemsForVideo]):
2703 (-[WKActionMenuController _defaultMenuItemsForImage]):
2705 2015-04-15 Anders Carlsson <andersca@apple.com>
2707 Make websiteDataStore on WKWebViewConfiguration public
2708 https://bugs.webkit.org/show_bug.cgi?id=143810
2710 Reviewed by Dan Bernstein.
2712 * UIProcess/API/Cocoa/WKWebView.mm:
2713 (-[WKWebView initWithFrame:configuration:]):
2714 * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2715 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2716 (-[WKWebViewConfiguration copyWithZone:]):
2717 (-[WKWebViewConfiguration websiteDataStore]):
2718 (-[WKWebViewConfiguration setWebsiteDataStore:]):
2719 (-[WKWebViewConfiguration _websiteDataStore]):
2720 (-[WKWebViewConfiguration _setWebsiteDataStore:]):
2722 2015-04-15 Anders Carlsson <andersca@apple.com>
2724 Make WKWebsiteDataStore public
2725 https://bugs.webkit.org/show_bug.cgi?id=143805
2727 Reviewed by Dan Bernstein.
2729 Rename the current _WKWebsiteDataStore to WKWebsiteDataStore. Make init unavailable and tighten up the
2730 types of the defaultDataStore and nonPersistentDataStore class methods.
2732 Add a new _WKWebsiteDataStore @interface and @implementation that derives from WKWebsiteDataStore
2733 and forwards the defaultDataStore and nonPersistentDataStore method calls.
2735 * Shared/API/Cocoa/WebKit.h:
2736 * Shared/Cocoa/APIObject.mm:
2737 (API::Object::newObject):
2738 * UIProcess/API/Cocoa/WKWebView.mm:
2739 (-[WKWebView initWithFrame:configuration:]):
2740 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2741 (-[WKWebViewConfiguration _websiteDataStore]):
2742 * UIProcess/API/Cocoa/WKWebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
2743 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm.
2744 (+[WKWebsiteDataStore defaultDataStore]):
2745 (+[WKWebsiteDataStore nonPersistentDataStore]):
2746 (-[WKWebsiteDataStore dealloc]):
2747 (-[WKWebsiteDataStore isNonPersistent]):
2748 (toSystemClockTime):
2749 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2750 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2751 (toWebsiteDataRecords):
2752 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2753 (-[WKWebsiteDataStore _apiObject]):
2754 * UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h.
2756 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2757 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2758 (+[_WKWebsiteDataStore defaultDataStore]):
2759 (+[_WKWebsiteDataStore nonPersistentDataStore]):
2760 (-[_WKWebsiteDataStore dealloc]): Deleted.
2761 (-[_WKWebsiteDataStore isNonPersistent]): Deleted.
2762 (toWebsiteDataTypes): Deleted.
2763 (toSystemClockTime): Deleted.
2764 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]): Deleted.
2765 (-[_WKWebsiteDataStore _apiObject]): Deleted.
2766 * WebKit2.xcodeproj/project.pbxproj:
2768 2015-04-15 Timothy Horton <timothy_horton@apple.com>
2770 Custom CSS cursors do not use -webkit-image-set on retina displays
2771 https://bugs.webkit.org/show_bug.cgi?id=120783
2773 Reviewed by Beth Dakin.
2774 Patch by Evan Wallace <evan.exe@gmail.com>.
2776 Serialize the cursor image scale for SetCursor messages so custom
2777 CSS cursors work with -webkit-image-set on retina displays.
2779 * Shared/WebCoreArgumentCoders.cpp:
2780 (CoreIPC::ArgumentCoder<Cursor>::encode):
2781 (CoreIPC::ArgumentCoder<Cursor>::decode):
2783 2015-04-15 Alex Christensen <achristensen@webkit.org>
2785 Progress towards CMake on Mac.
2786 https://bugs.webkit.org/show_bug.cgi?id=143785
2788 Reviewed by Csaba Osztrogonác.
2791 * PlatformEfl.cmake:
2792 * PlatformGTK.cmake:
2794 2015-04-15 Anders Carlsson <andersca@apple.com>
2796 Make WKWebsiteDataRecord public
2797 https://bugs.webkit.org/show_bug.cgi?id=143796
2799 Reviewed by Dan Bernstein.
2801 Rename _WKWebsiteDataRecord and associated files to WKWebsiteDataRecord and
2802 add a new _WKWebsiteDataRecord.h with a class @interface declaration that just
2803 inherits from WKWebsiteDataRecord. We don't need an @implementation since nobody is expected
2804 to allocate _WKWebsiteDataRecord objects.
2806 * Shared/API/Cocoa/WebKit.h:
2807 * Shared/Cocoa/APIObject.mm:
2808 (API::Object::newObject):
2809 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.h.
2810 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm.
2811 (-[WKWebsiteDataRecord dealloc]):
2812 (dataTypesToString):
2813 (-[WKWebsiteDataRecord description]):
2814 (-[WKWebsiteDataRecord displayName]):
2815 (-[WKWebsiteDataRecord dataTypes]):
2816 (-[WKWebsiteDataRecord _apiObject]):
2817 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h.
2819 (WebKit::toWebsiteDataTypes):
2820 (WebKit::toWKWebsiteDataTypes):
2821 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
2822 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2823 (toWebsiteDataRecords):
2824 * WebKit2.xcodeproj/project.pbxproj:
2826 2015-04-13 Jer Noble <jer.noble@apple.com>
2828 [Fullscreen] ChromeClient::exitVideoFullscreen() should take a pointer to a HTMLVideoElement.
2829 https://bugs.webkit.org/show_bug.cgi?id=143674
2831 Reviewed by Darin Adler.
2833 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2834 (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Takes a reference.
2835 (WebKit::WebChromeClient::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
2836 (WebKit::WebChromeClient::exitVideoFullscreen): Deleted.
2837 * WebProcess/WebCoreSupport/WebChromeClient.h:
2838 * WebProcess/ios/WebVideoFullscreenManager.h:
2839 * WebProcess/ios/WebVideoFullscreenManager.mm:
2840 (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
2841 (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
2842 (WebKit::WebVideoFullscreenManager::didEnterFullscreen): Pass a reference.
2843 (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.
2844 (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
2846 2015-04-15 Antti Koivisto <antti@apple.com>
2848 Network Cache: Inline small body data to record file
2849 https://bugs.webkit.org/show_bug.cgi?id=143783
2851 Reviewed by Chris Dumez.
2853 We currently save all body data as separate files. We can improve space efficiency and do less reads and writes
2854 by inlining smaller resource bodies with the header.
2856 * NetworkProcess/cache/NetworkCacheIOChannel.h:
2857 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
2858 (WebKit::NetworkCache::IOChannel::read):
2859 (WebKit::NetworkCache::IOChannel::readSync):
2860 (WebKit::NetworkCache::IOChannel::write):
2862 Add WorkQueue argument to allow specifying which queue the result is submitted to.
2864 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2865 (WebKit::NetworkCache::decodeRecordMetaData):
2867 Add a boolean indicating whether the body is inlined.
2869 (WebKit::NetworkCache::decodeRecordHeader):
2870 (WebKit::NetworkCache::Storage::decodeRecord):
2871 (WebKit::NetworkCache::encodeRecordMetaData):
2872 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
2873 (WebKit::NetworkCache::Storage::encodeRecord):
2874 (WebKit::NetworkCache::Storage::dispatchReadOperation):
2876 Read the record first, then read the blob if needed.
2877 Submit the read operation directly from the main queue. Only thing we do is opening an IO channel
2878 and that uses O_NONBLOCK.
2879 Process the read results in the IO work queue where we now do the blob retrieval.
2881 (WebKit::NetworkCache::shouldStoreBodyAsBlob):
2883 The current threshold for saving a separate blob is 16KB.
2885 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2886 (WebKit::NetworkCache::Storage::traverse):
2887 (WebKit::NetworkCache::createRecord): Deleted.
2888 (WebKit::NetworkCache::encodeRecordHeader): Deleted.
2889 * NetworkProcess/cache/NetworkCacheStorage.h:
2891 2015-04-15 Tim Horton <timothy_horton@apple.com>
2893 Non-local keyboards don't update scroll view parameters
2894 https://bugs.webkit.org/show_bug.cgi?id=143791
2895 <rdar://problem/18974020>
2897 * Platform/spi/ios/UIKitSPI.h:
2900 2015-04-15 Tim Horton <timothy_horton@apple.com>
2902 Non-local keyboards don't update scroll view parameters
2903 https://bugs.webkit.org/show_bug.cgi?id=143791
2904 <rdar://problem/18974020>
2906 Reviewed by Enrica Casucci.
2908 * UIProcess/API/Cocoa/WKWebView.mm:
2909 (-[WKWebView _shouldUpdateKeyboardWithInfo:]):
2910 (-[WKWebView _keyboardWillChangeFrame:]):
2911 (-[WKWebView _keyboardWillShow:]):
2912 Make sure that we update scroll view parameters (obscured insets, etc.)
2913 if we have a non-local keyboard, in addition to the cases where we have an assisted node.
2915 2015-04-15 Dan Bernstein <mitz@apple.com>
2917 <rdar://problem/20549298> No matching __NSi_ definition for postprocessed value of WK_{MAC,IOS}_TBA
2918 https://bugs.webkit.org/show_bug.cgi?id=143786
2920 Reviewed by Anders Carlsson.
2922 * Shared/API/Cocoa/WKFoundation.h: Added a placeholder for the postprocessing script to
2923 insert a definition of __NSi_* for the current deployment target. Import CoreFoundation.h so
2924 that we can check if the macro is already defined.
2925 * WebKit2.xcodeproj/project.pbxproj: In the Postprocess WKFoundation.h script build phase,
2926 replace the placeholder with a definition of __NSi_{current deployment target} if not
2929 2015-04-14 Anders Carlsson <andersca@apple.com>
2931 Make creating send rights from shared memory more robust
2932 https://bugs.webkit.org/show_bug.cgi?id=143730
2933 rdar://problem/16595870
2935 Reviewed by Darin Adler.
2937 This cleans up creation of handles and send rights and also fixes a bug where it would be impossible
2938 to send more than 128 MB of shared memory in a single object.
2940 * Platform/SharedMemory.h:
2941 * Platform/mac/SharedMemoryMac.cpp:
2942 (WebKit::makeMemoryEntry):
2943 New helper function that creates a memory entry send right. This uses MAP_MEM_VM_SHARE which ensures
2944 that memory objects larger than 128 MB will be handled correctly.
2946 (WebKit::SharedMemory::create):
2947 Call makeMemoryEntry.
2949 (WebKit::SharedMemory::createHandle):
2950 Call createSendRight.
2952 (WebKit::SharedMemory::createSendRight):
2953 Call makeMemoryEntry and add the necessary assertions.
2955 2015-04-15 Eric Carlson <eric.carlson@apple.com>
2957 Generalize "isPlayingAudio" to include other media characteristics
2958 https://bugs.webkit.org/show_bug.cgi?id=143713
2960 Reviewed by Jer Noble.
2962 * UIProcess/API/C/WKPage.cpp:
2963 (toGenericCallbackFunction): Scope CallbackBase.
2964 (WKPageForceRepaint): Ditto.
2965 (WKPageValidateCommand): Ditto.
2966 (WKPageComputePagesForPrinting): Ditto.
2968 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
2969 (-[_WKThumbnailView _requestSnapshotIfNeeded]): Ditto.
2971 * UIProcess/API/mac/WKView.mm:
2972 (-[WKView becomeFirstResponder]): Ditto.
2973 (-[WKView updateFontPanelIfNeeded]): Ditto.
2974 (-[WKView validateUserInterfaceItem:]): Ditto.
2975 (-[WKView startSpeaking:]): Ditto.
2976 (-[WKView selectedRangeWithCompletionHandler:]): Ditto.
2977 (-[WKView markedRangeWithCompletionHandler:]): Ditto.
2978 (-[WKView hasMarkedTextWithCompletionHandler:]): Ditto.
2979 (-[WKView attributedSubstringForProposedRange:completionHandler:]): Ditto.
2980 (-[WKView firstRectForCharacterRange:completionHandler:]): Ditto.
2981 (-[WKView characterIndexForPoint:completionHandler:]): Ditto.
2983 * UIProcess/WebPageProxy.cpp:
2984 (WebKit::WebPageProxy::isPlayingMediaDidChange): Rename from isPlayingAudioDidChange.
2985 (WebKit::WebPageProxy::isPlayingAudioDidChange): Deleted.
2986 * UIProcess/WebPageProxy.h:
2988 * UIProcess/WebPageProxy.messages.in:
2990 * UIProcess/mac/WKFullScreenWindowController.mm:
2991 (-[WKFullScreenWindowController dealloc]): Scope CallbackBase.
2992 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.
2994 * UIProcess/mac/WKPrintingView.mm:
2995 (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ditto.
2996 (-[WKPrintingView _askPageToComputePageRects]): Ditto.
2997 (-[WKPrintingView _drawPreview:]): Ditto.
2999 * WebProcess/Plugins/PluginView.cpp:
3000 (WebKit::PluginView::setPluginIsPlayingAudio):
3001 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3002 (WebKit::WebChromeClient::isPlayingMediaDidChange):
3003 (WebKit::WebChromeClient::isPlayingAudioDidChange): Deleted.
3004 * WebProcess/WebCoreSupport/WebChromeClient.h:
3006 2015-04-15 Antti Koivisto <antti@apple.com>
3008 Network Cache: Add thread-safe accessors for storage paths
3009 https://bugs.webkit.org/show_bug.cgi?id=143668
3011 Reviewed by Darin Adler.
3013 Less need to use StringCapture.
3015 * NetworkProcess/cache/NetworkCache.cpp:
3016 (WebKit::NetworkCache::Cache::dumpFilePath):
3017 (WebKit::NetworkCache::Cache::storagePath):
3018 * NetworkProcess/cache/NetworkCacheStorage.cpp:
3019 (WebKit::NetworkCache::makeRecordsDirectoryPath):
3020 (WebKit::NetworkCache::Storage::Storage):
3021 (WebKit::NetworkCache::Storage::basePath):
3022 (WebKit::NetworkCache::Storage::versionPath):
3023 (WebKit::NetworkCache::Storage::recordsPath):
3024 (WebKit::NetworkCache::Storage::synchronize):
3025 (WebKit::NetworkCache::Storage::remove):
3026 (WebKit::NetworkCache::Storage::dispatchReadOperation):
3027 (WebKit::NetworkCache::Storage::finishReadOperation):
3028 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
3029 (WebKit::NetworkCache::Storage::traverse):
3030 (WebKit::NetworkCache::Storage::clear):
3031 (WebKit::NetworkCache::Storage::shrink):
3032 (WebKit::NetworkCache::Storage::deleteOldVersions):
3033 (WebKit::NetworkCache::makeRecordDirectoryPath): Deleted.
3034 * NetworkProcess/cache/NetworkCacheStorage.h:
3035 (WebKit::NetworkCache::Storage::baseDirectoryPath): Deleted.
3036 (WebKit::NetworkCache::Storage::directoryPath): Deleted.
3038 2015-04-14 Tim Horton <timothy_horton@apple.com>
3040 Update gesture swipe shadow style
3041 https://bugs.webkit.org/show_bug.cgi?id=143616
3042 <rdar://problem/19295843>
3044 Reviewed by Darin Adler.
3046 * UIProcess/mac/ViewGestureController.h:
3047 * UIProcess/mac/ViewGestureControllerMac.mm:
3048 (WebKit::ViewGestureController::beginSwipeGesture):
3049 For the modern shadow style, use a layer stretched along the edge of the swiping content
3050 with the newly added PNGs as the layer contents.
3052 Add a dimming layer over the lower layer of content which fades in/out
3055 (WebKit::ViewGestureController::handleSwipeGesture):
3056 Fade the dimming layer in and out during the entire swipe.
3057 Fade the shadow layer out during the last few pixels of the swipe.
3059 (WebKit::ViewGestureController::removeSwipeSnapshot):
3060 Unparent the new layers.
3062 * WebKit2.xcodeproj/project.pbxproj:
3063 * Resources/SwipeShadow.png:
3064 * Resources/SwipeShadow@2x.png:
3065 Add the new resources.
3067 2015-04-14 Brian Weinstein <bweinstein@apple.com>
3069 Add SPI to clear HSTS hosts added since a date.
3070 https://bugs.webkit.org/show_bug.cgi?id=143726
3072 rdar://problem/16664597
3074 Reviewed by Anders Carlsson.
3076 * UIProcess/API/C/mac/WKContextPrivateMac.h:
3077 * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3078 (WKContextResetHSTSHostsAddedAfterDate): Call into the WebProcessPool.
3079 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3080 (WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate): Call CFNetwork SPI to clear HSTS hosts added
3081 after the given date.
3082 * UIProcess/WebProcessPool.h:
3084 2015-04-14 Anders Carlsson <andersca@apple.com>
3086 More work on making the SharedMemory interface more sane
3087 https://bugs.webkit.org/show_bug.cgi?id=143718
3089 Reviewed by Andreas Kling.
3091 Get rid of m_shouldVMDeallocateData. The idea is that shared memory created by calling
3092 SharedMemory::allocate has a non-null m_data pointer, and a null m_port. Shared memory created
3093 by calling SharedMemory::create with a pointer and a length has a non-null port but a null m_data
3094 since the data can be unmapped by the caller and we don't want to hold on to dangling pointers.
3096 * Platform/SharedMemory.h:
3097 (WebKit::SharedMemory::data):
3098 * Platform/mac/SharedMemoryMac.cpp:
3099 (WebKit::SharedMemory::allocate):
3100 (WebKit::SharedMemory::create):
3101 (WebKit::SharedMemory::map):
3102 (WebKit::SharedMemory::~SharedMemory):
3103 (WebKit::SharedMemory::createHandle):
3105 2015-04-14 Antti Koivisto <antti@apple.com>
3107 Network Cache: Deduplicate body data
3108 https://bugs.webkit.org/show_bug.cgi?id=143652
3110 Reviewed by Darin Adler.
3112 It is common to have cache entries with identical body data. This happens when the same resource is loaded from
3113 a different URL (https vs http, slash vs no-slash at end, etc.). It also happens when the same URL is
3114 referenced from different cache partitions.
3116 We can improve disk space efficiency and use less memory by sharing identical body data between cache entries.
3118 This patch splits the body data out from the record file. The new record file contains meta data and response
3119 headers only. Body data is stored using the new BlobStorage interface. Files are deduplicated by computing
3120 SHA1 hash over the data and looking for an existing blob with the same hash. If found the existing entry
3121 is reused by creating a hard link to it.
3123 The new disk structure looks like this:
3128 0A3C9A970ADA27FAE9BD7BC630BAD0B929C293C0
3129 0A6B8060BA77DF92C82A2FD7AF58F79524D8F34C
3133 0B8645B04E7EC78C178B7460052601C2
3134 0B8645B04E7EC78C178B7460052601C2-body
3135 0CB1A3638D1C5A09C5E3283A74FA040B
3136 0CB1A3638D1C5A09C5E3283A74FA040B-body
3139 Each record file has an associated -body which is a hard link to a file in the Blobs directory.
3141 The patch increases effective capacity by 10-20% with a typical cache. It also saves memory especially when identical
3142 resources are used in multiple tabs.
3144 Currently all >0 sized resources are stored as shared blobs. In future small resources should be integrated into record
3145 files and blobs used for larger files only.
3147 * NetworkProcess/cache/NetworkCache.cpp:
3148 (WebKit::NetworkCache::Cache::store):
3149 (WebKit::NetworkCache::Cache::update):
3151 Adopt the new storage interface.
3153 (WebKit::NetworkCache::Cache::dumpContentsToFile):
3154 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp: Added.
3155 (WebKit::NetworkCache::BlobStorage::BlobStorage):
3156 (WebKit::NetworkCache::BlobStorage::synchronize):
3158 Compute size and delete unused files from the Blobs directory (link count == 1).
3160 (WebKit::NetworkCache::BlobStorage::blobPath):
3161 (WebKit::NetworkCache::BlobStorage::add):
3162 (WebKit::NetworkCache::BlobStorage::get):
3164 Interface for storing and retrieving data blobs. Blobs are deduplicated on add.
3166 (WebKit::NetworkCache::BlobStorage::remove):
3168 Removes the link but doesn't remove the blob even if there are no other clients. That happens on next synchronize().
3170 (WebKit::NetworkCache::BlobStorage::shareCount):
3172 Checks the link count to get the number of clients.
3174 * NetworkProcess/cache/NetworkCacheBlobStorage.h: Added.
3175 (WebKit::NetworkCache::BlobStorage::approximateSize):
3176 * NetworkProcess/cache/NetworkCacheCoders.cpp:
3177 (WebKit::NetworkCache::Coder<SHA1::Digest>::encode):
3178 (WebKit::NetworkCache::Coder<SHA1::Digest>::decode):
3179 * NetworkProcess/cache/NetworkCacheCoders.h:
3180 * NetworkProcess/cache/NetworkCacheData.h:
3181 (WebKit::NetworkCache::Data::isEmpty):
3182 * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
3183 (WebKit::NetworkCache::Data::empty):
3184 (WebKit::NetworkCache::Data::fromMap):
3185 (WebKit::NetworkCache::mapFile):
3186 (WebKit::NetworkCache::computeSHA1):
3187 (WebKit::NetworkCache::bytesEqual):
3191 * NetworkProcess/cache/NetworkCacheEntry.cpp:
3192 (WebKit::NetworkCache::Entry::asJSON):
3193 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
3194 (WebKit::NetworkCache::IOChannel::IOChannel):
3195 * NetworkProcess/cache/NetworkCacheStorage.cpp:
3196 (WebKit::NetworkCache::makeRecordDirectoryPath):
3197 (WebKit::NetworkCache::makeBlobDirectoryPath):
3198 (WebKit::NetworkCache::Storage::Storage):
3199 (WebKit::NetworkCache::Storage::approximateSize):
3200 (WebKit::NetworkCache::Storage::synchronize):
3201 (WebKit::NetworkCache::partitionPathForKey):
3202 (WebKit::NetworkCache::recordPathForKey):
3203 (WebKit::NetworkCache::bodyPath):
3204 (WebKit::NetworkCache::decodeRecordMetaData):
3205 (WebKit::NetworkCache::decodeRecordHeader):
3206 (WebKit::NetworkCache::createRecord):
3207 (WebKit::NetworkCache::encodeRecordMetaData):
3208 (WebKit::NetworkCache::encodeRecordHeader):
3209 (WebKit::NetworkCache::Storage::remove):
3210 (WebKit::NetworkCache::Storage::updateFileModificationTime):
3211 (WebKit::NetworkCache::Storage::dispatchReadOperation):
3213 Read both the blob and the record entry.
3215 (WebKit::NetworkCache::Storage::finishReadOperation):
3217 Factor to a function.
3219 (WebKit::NetworkCache::Storage::store):
3220 (WebKit::NetworkCache::Storage::traverse):
3221 (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
3222 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
3224 We don't need separate full write and header write paths anymore. Everything is treated
3225 as a full write and deduplication stops us writing the body again.
3227 This simplifies the code and data structures.
3229 (WebKit::NetworkCache::Storage::finishWriteOperation):
3231 Factor to a function.
3233 (WebKit::NetworkCache::Storage::clear):
3234 (WebKit::NetworkCache::deletionProbability):
3236 Take the sharing count into account when computing deletion probability.
3237 It is less useful to delete a record that shares its body with others as data won't get deleted.
3239 (WebKit::NetworkCache::Storage::shrinkIfNeeded):
3240 (WebKit::NetworkCache::Storage::shrink):
3241 (WebKit::NetworkCache::Storage::deleteOldVersions):
3242 (WebKit::NetworkCache::directoryPathForKey): Deleted.
3243 (WebKit::NetworkCache::filePathForKey): Deleted.
3244 (WebKit::NetworkCache::openFileForKey): Deleted.
3245 (WebKit::NetworkCache::decodeRecord): Deleted.
3246 (WebKit::NetworkCache::Storage::update): Deleted.
3248 No need for separate update interface anymore. Regular store() avoids unnecessary body write.
3250 (WebKit::NetworkCache::Storage::dispatchFullWriteOperation): Deleted.
3251 (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation): Deleted.
3252 * NetworkProcess/cache/NetworkCacheStorage.h:
3253 * WebKit2.xcodeproj/project.pbxproj:
3255 2015-04-14 Chris Dumez <cdumez@apple.com>
3257 REGRESSION(r182603): [GTK] More than 500 crashes on the layout tests with the debug build.
3258 https://bugs.webkit.org/show_bug.cgi?id=143715
3260 Reviewed by Darin Adler.
3262 Enable assertions checking that calling editorState() does not cause a
3263 synchronous layout only on Mac and iOS. This assertion does not
3264 necessarily hold true on other ports as each one as its own
3265 platformEditorState() implementation. In particular, this assertion
3266 was being hit on GTK.
3268 * WebProcess/WebPage/WebPage.cpp:
3269 (WebKit::WebPage::didChangeSelection):
3271 2015-04-13 Alexey Proskuryakov <ap@apple.com>
3273 Build fixes after r182772.
3275 * UIProcess/API/mac/WKView.mm:
3276 (-[WKView _updateAutomaticallyComputedFixedLayoutSize]): Make a CGSize, not an NSSize.
3277 (-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]): Moved implementation
3278 to the correct place.
3279 (-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]): Ditto.
3280 (-[WKView _layoutMode]): Use a memeber from _data directly, not via a method.
3282 2015-04-13 Alexey Proskuryakov <ap@apple.com>
3286 * UIProcess/mac/PageClientImpl.mm:
3287 (WebKit::PageClientImpl::setDragImage):
3289 2015-04-13 Hunseop Jeong <hs85.jeong@samsung.com>
3291 [EFL][GTK] Fix build break after r182753
3292 https://bugs.webkit.org/show_bug.cgi?id=143689
3294 Reviewed by Anders Carlsson.
3296 * Platform/IPC/unix/ConnectionUnix.cpp:
3297 (IPC::Connection::processMessage):
3298 (IPC::Connection::sendOutgoingMessage):
3299 * Platform/unix/SharedMemoryUnix.cpp:
3300 (WebKit::SharedMemory::allocate):
3301 (WebKit::accessModeMMap):
3302 (WebKit::SharedMemory::map):
3303 (WebKit::SharedMemory::create): Deleted.
3305 2015-04-13 Alexey Proskuryakov <ap@apple.com>
3309 * UIProcess/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setDragImage):
3311 2015-04-13 Anders Carlsson <andersca@apple.com>
3313 Keep track of each shared memory object's protection when deciding whether to return our existing port
3314 https://bugs.webkit.org/show_bug.cgi?id=143687
3316 Reviewed by Tim Horton.
3318 * Platform/SharedMemory.h:
3319 * Platform/mac/SharedMemoryMac.cpp:
3320 (WebKit::machProtection):
3321 (WebKit::SharedMemory::create):
3322 (WebKit::SharedMemory::map):
3323 (WebKit::SharedMemory::createHandle):
3325 2015-04-13 Tim Horton <timothy_horton@apple.com>
3327 Add a persistent, fixed scale factor to make it easy to scale down WK(Web)Views
3328 https://bugs.webkit.org/show_bug.cgi?id=143560
3329 <rdar://problem/16302047>
3331 Reviewed by Darin Adler.
3333 Add a new "view" scale factor to WKView and WKWebView.
3335 Unlike page scale (or "magnification" in the API), view scale:
3336 - persists between page loads
3337 - persists between Web process crashes
3338 - is not user adjustable
3339 - can reliably be < 1
3341 The page scale and view scale are multiplied together whenever we push
3342 a new page scale down into WebCore, so the implementation of view scale
3343 is transparent to WebCore, and acts effectively as a constant multiplier
3344 for the (user-adjustable) page scale factor.
3346 * UIProcess/WebPageProxy.cpp:
3347 (WebKit::WebPageProxy::scaleView):
3348 Add scaleView, which updates our cached viewScaleFactor and pushes it to the Web process.
3350 (WebKit::WebPageProxy::creationParameters):
3351 Plumb viewScaleFactor through the page creation parameters.
3353 * UIProcess/WebPageProxy.h:
3354 (WebKit::WebPageProxy::viewScaleFactor): Added.
3356 * WebProcess/WebPage/WebPage.cpp:
3357 (WebKit::WebPage::WebPage):
3358 If the viewScaleFactor is not 1 at creation time, call scalePage with a page scale of 1.
3359 Internally, scalePage will multiply in the viewScaleFactor and push it all to the Web process.
3361 (WebKit::WebPage::scalePage):
3362 Multiply the page scale factor by the view scale factor before passing it to WebCore.
3364 (WebKit::WebPage::scalePageInViewCoordinates):
3365 Early returns need to check the total scale, not just the new page scale.
3367 (WebKit::WebPage::totalScaleFactor):
3368 The scale that we get back from WebCore::Page::pageScaleFactor is the product
3369 of WebKit2's view and page scales. So, here we'll call that the totalScaleFactor.
3370 (Might need a different name because it seems like "total" should include deviceScale too).
3372 (WebKit::WebPage::pageScaleFactor):
3373 WebKit2's notion of the pageScaleFactor does not include the view scale, so
3374 divide it out of WebCore's page scale.
3376 (WebKit::WebPage::scaleView):
3377 Apply a new view scale, maintaining the current scroll position.
3379 * WebProcess/WebPage/WebPage.h:
3380 (WebKit::WebPage::viewScaleFactor):
3381 * WebProcess/WebPage/WebPage.messages.in:
3383 * Shared/WebPageCreationParameters.cpp:
3384 (WebKit::WebPageCreationParameters::encode):
3385 (WebKit::WebPageCreationParameters::decode):
3386 * Shared/WebPageCreationParameters.h:
3387 Plumb viewScaleFactor through the page creation parameters.
3389 * UIProcess/API/Cocoa/WKViewPrivate.h:
3390 * UIProcess/API/Cocoa/WKWebView.mm:
3391 (-[WKWebView _viewScale]):
3392 (-[WKWebView _setViewScale:]):
3393 * UIProcess/API/mac/WKView.mm:
3394 (-[WKView _viewScale]):
3395 (-[WKView _setViewScale:]):
3396 Push the new view scale to WebPage.
3398 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3399 * UIProcess/API/Cocoa/WKWebView.mm:
3400 (-[WKWebView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]):
3401 (-[WKWebView _automaticallyComputesFixedLayoutSizeFromViewScale]):
3402 * UIProcess/API/mac/WKView.mm:
3403 (-[WKView setFrameSize:]):
3404 (-[WKView _updateAutomaticallyComputedFixedLayoutSize]):
3405 (-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]):
3406 (-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]):
3407 * UIProcess/API/mac/WKViewInternal.h:
3408 Add a new layout mode, "DynamicSizeComputedFromViewScale",
3409 which turns on fixed layout size mode, and sets the fixed layout size
3410 based on the view's frame and view scale. The fixed layout size is maintained
3411 as the frame of the view scaled by the inverse of the view scale. This
3412 makes it very easy to maintain a WK(Web)View that is scaled down by
3413 a constant amount, but is laid out as if it were not.
3415 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3416 (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
3417 (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
3418 (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
3419 Because the transient zoom mechanism touches layers that WebCore owns,
3420 it mostly need to operate with totalScaleFactor, because that is what WebCore sees.
3422 2015-04-10 Brent Fulgham <bfulgham@apple.com>
3424 Expand test infrastructure to support scrolling tests
3425 https://bugs.webkit.org/show_bug.cgi?id=143286
3426 <rdar://problem/20375516>
3428 Reviewed by Simon Fraser.
3430 Extend the WK2 testing API to include a method for setting a JSC callback function to be triggered
3431 by the new WebCore::WheelEventTestTrigger singleton.
3433 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3434 (WKBundlePageStartMonitoringScrollOperations): WK2 method that causes the testing system to begin tracking wheel events.
3435 (WKBundlePageRegisterScrollOperationCompletionCallback): WK2 method to set the callback function for testing.
3436 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3438 2015-04-13 Enrica Casucci <enrica@apple.com>
3440 Clients of WKWebView should be able to override drag functions.
3441 https://bugs.webkit.org/show_bug.cgi?id=143618
3443 Reviewed by Darin Adler.
3445 WKWebView now implements the drag protocol functions and
3446 forwards the calls to the inner WKView.
3447 In the page client, when we receive a request to start drag
3448 from the WebProcess, we call _dragImageForView in WKView with
3449 the target view. The function calls dragImage on the given view,
3450 so that its clients can override the dragImage function.
3452 * UIProcess/API/Cocoa/WKWebView.mm: