1 2015-04-29 Simon Fraser <simon.fraser@apple.com>
3 Allow testing of plug-ins that handle wheel events.
4 https://bugs.webkit.org/show_bug.cgi?id=144413
6 Reviewed by Tim Horton.
8 Allow the Test Netscape Plug-in to pretend to handle wheel events,
9 so layout tests can use it.
11 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
12 (WebKit::NetscapePluginModule::determineQuirks):
14 2015-04-29 Filip Pizlo <fpizlo@apple.com>
16 JSTypeInfo should have an inline type flag to indicate if getCallData() has been overridden
17 https://bugs.webkit.org/show_bug.cgi?id=144397
19 Reviewed by Andreas Kling.
21 If you override getCallData() and you want to be called a "function", then you need to use the
22 new TypeOfShouldCallGetCallData flag.
24 * WebProcess/Plugins/Netscape/JSNPObject.h:
26 2015-04-29 Antti Koivisto <antti@apple.com>
28 ResourceLoadPriority should be enum class
29 https://bugs.webkit.org/show_bug.cgi?id=144326
31 Reviewed by Darin Adler.
33 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
34 (WebKit::NetworkConnectionToWebProcess::servePendingRequests): Deleted.
36 Remove this unused message.
38 * NetworkProcess/NetworkConnectionToWebProcess.h:
39 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
40 * NetworkProcess/cache/NetworkCache.cpp:
41 (WebKit::NetworkCache::makeStoreDecision):
42 (WebKit::NetworkCache::Cache::retrieve):
43 * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
44 (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
45 * WebProcess/Network/WebResourceLoadScheduler.cpp:
46 (WebKit::WebResourceLoadScheduler::servePendingRequests):
47 * WebProcess/Network/WebResourceLoadScheduler.h:
49 2015-04-29 Myles C. Maxfield <mmaxfield@apple.com>
51 [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
52 https://bugs.webkit.org/show_bug.cgi?id=132159
54 Reviewed by Darin Adler.
56 Add SPI to set the font whitelist.
58 * Shared/WebProcessCreationParameters.cpp:
59 (WebKit::WebProcessCreationParameters::encode):
60 (WebKit::WebProcessCreationParameters::decode):
61 * Shared/WebProcessCreationParameters.h:
62 * UIProcess/API/C/WKContext.cpp:
63 (WKContextSetFontWhitelist):
64 * UIProcess/API/C/WKContextPrivate.h:
65 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
66 (WebKit::WebProcessPool::platformInitializeWebProcess):
67 * UIProcess/WebProcessPool.cpp:
68 (WebKit::WebProcessPool::setFontWhitelist):
69 * UIProcess/WebProcessPool.h:
70 * WebProcess/cocoa/WebProcessCocoa.mm:
71 (WebKit::WebProcess::platformInitializeWebProcess):
73 2015-04-29 Martin Robinson <mrobinson@igalia.com>
75 [CMake] [GTK] Organize and clean up unused CMake variables
76 https://bugs.webkit.org/show_bug.cgi?id=144364
78 Reviewed by Gyuyoung Kim.
80 * PlatformGTK.cmake: Add variables specific to this project.
81 * webkit2gtk-web-extension.pc.in: Hardcode the GTK+ API version. It rarely changes.
82 * webkit2gtk.pc.in: Ditto.
84 2015-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
86 REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
87 https://bugs.webkit.org/show_bug.cgi?id=144388
89 Reviewed by Brady Eidson.
91 Move the WebContextMenuClient::shareMenuItem() implementation to
92 platform files, since platforms not supporting share menu item
93 should return a null ContextMenuIem instead.
95 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
96 (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
97 * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
98 (WebKit::WebContextMenuClient::shareMenuItem):
99 * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
100 (WebKit::WebContextMenuClient::shareMenuItem):
101 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
102 (WebKit::WebContextMenuClient::shareMenuItem):
104 2015-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
106 REGRESSION(r183467): [SOUP] isMainResource is no longer passed as resource load parameters to the network process
107 https://bugs.webkit.org/show_bug.cgi?id=144381
109 Reviewed by Darin Adler.
111 A requester enum value is passed now as part of the
112 ResourceRequest, but it's not encoded/decoded for soup.
114 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
115 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData): Encode requester.
116 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData): Decode requester.
118 2015-04-28 Carlos Garcia Campos <cgarcia@igalia.com>
120 [SOUP] Use xattrs to get/set the creation time of disk cache files
121 https://bugs.webkit.org/show_bug.cgi?id=144251
123 Reviewed by Martin Robinson.
125 The network process disk cache uses the creation time to compute a
126 worth value used to determine the order in which cached resources
127 are deleted when the cache is shrunk. In some operating systems
128 like Linux there's no st_birthtime in struct stat, but since cache
129 files are always created and deleted by us, we could use a custom
130 xattr to store and retrieve the creation time of cached resources.
132 * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
133 (WebKit::NetworkCache::fileTimes):
134 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
135 (WebKit::NetworkCache::IOChannel::IOChannel):
137 2015-04-28 Carlos Garcia Campos <cgarcia@igalia.com>
139 Network Cache: Do not create a SharedBuffer for mapped resources unless explicitly requested
140 https://bugs.webkit.org/show_bug.cgi?id=144337
142 Reviewed by Antti Koivisto.
144 We send a buffer or a memory mapped handler to the web process
145 depending on whether the resource body is mapped or not, but we
146 are always creating a shared buffer even for mapped resources.
147 Split initializeBufferFromStorageRecord() moving the mapped memory
148 handler initialization to its own method.
150 * NetworkProcess/cache/NetworkCacheEntry.cpp:
151 (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
152 Initialize the mapped memory handler if the body data is mapped.
153 (WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
154 Initialize the buffer by wrapping the mapped memory if the body
155 data is mapped, or using the body data directly otherwise.
156 (WebKit::NetworkCache::Entry::shareableResourceHandle): Call
157 initializeShareableResourceHandleFromStorageRecord() if the
159 * NetworkProcess/cache/NetworkCacheEntry.h:
161 2015-04-28 Simon Fraser <simon.fraser@apple.com>
163 Make a non-static version of FrameView::yPositionForRootContentLayer()
164 https://bugs.webkit.org/show_bug.cgi?id=144375
166 Reviewed by Andy Estes.
168 There were two calls to the static FrameView::yPositionForRootContentLayer()
169 which passed in all the arguments for the same FrameView. Make a member
170 function for convenience.
172 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
173 (WebKit::shadowLayerPositionForFrame):
175 2015-04-28 Ryuan Choi <ryuan.choi@navercorp.com>
177 [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
178 https://bugs.webkit.org/show_bug.cgi?id=143001
180 Reviewed by Gyuyoung Kim.
182 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
183 (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
184 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
185 (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
186 * WebProcess/WebCoreSupport/WebChromeClient.h:
187 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
188 (WebKit::WebFrameLoaderClient::dispatchDidLayout):
189 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
190 * WebProcess/WebPage/WebPage.cpp:
191 (WebKit::WebPage::setSize):
192 (WebKit::WebPage::setUseFixedLayout):
193 (WebKit::WebPage::canHandleUserEvents):
194 * WebProcess/WebPage/WebPage.h:
196 2015-04-28 Timothy Horton <timothy_horton@apple.com>
198 [TextIndicator] Yellow highlight takes too long to fade out on scroll
199 https://bugs.webkit.org/show_bug.cgi?id=144358
200 <rdar://problem/19451011>
202 Reviewed by Beth Dakin.
204 * UIProcess/API/Cocoa/WKViewPrivate.h:
205 * UIProcess/API/mac/WKView.mm:
206 (-[WKView renewGState]):
207 (-[WKView viewDidMoveToWindow]):
208 (-[WKView _dictionaryLookupPopoverWillClose:]):
209 (-[WKView _setTextIndicator:]):
210 (-[WKView _setTextIndicator:withLifetime:]):
211 (-[WKView _clearTextIndicatorWithAnimation:]):
212 (-[WKView magnifyWithEvent:]):
213 (-[WKView smartMagnifyWithEvent:]):
214 (-[WKView setMagnification:centeredAtPoint:]):
215 (-[WKView setMagnification:]):
216 (-[WKView _dismissContentRelativeChildWindows]):
217 (-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
218 (-[WKView _setTextIndicator:fadeOut:]): Deleted.
219 * UIProcess/API/mac/WKViewInternal.h:
220 * UIProcess/PageClient.h:
221 * UIProcess/WebPageProxy.cpp:
222 (WebKit::WebPageProxy::pageDidScroll):
223 (WebKit::WebPageProxy::setTextIndicator):
224 (WebKit::WebPageProxy::clearTextIndicator):
225 * UIProcess/WebPageProxy.h:
226 * UIProcess/WebPageProxy.messages.in:
227 * UIProcess/ios/PageClientImplIOS.h:
228 * UIProcess/ios/PageClientImplIOS.mm:
229 (WebKit::PageClientImpl::setTextIndicator):
230 (WebKit::PageClientImpl::clearTextIndicator):
231 * UIProcess/mac/PageClientImpl.h:
232 * UIProcess/mac/PageClientImpl.mm:
233 (WebKit::PageClientImpl::setTextIndicator):
234 (WebKit::PageClientImpl::clearTextIndicator):
235 (WebKit::PageClientImpl::didPerformDictionaryLookup):
236 (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
237 * UIProcess/mac/WKActionMenuController.mm:
238 (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
239 * UIProcess/mac/WKImmediateActionController.mm:
240 (-[WKImmediateActionController _defaultAnimationController]):
241 (-[WKImmediateActionController _animationControllerForDataDetectedText]):
242 (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
243 (-[WKImmediateActionController _animationControllerForText]):
244 * WebProcess/WebPage/FindController.cpp:
245 (WebKit::FindController::updateFindIndicator):
246 Make _setTextIndicator take a reference.
247 Add a variant of _setTextIndicator that takes a Lifetime.
248 Make _clearTextIndicatorWithAnimation take a DismissalAnimation.
249 Make dismissContentRelativeChildWindows take a parameter indicating
250 whether the dismissal should include animation or not (currently
251 only applies to TextIndicator).
252 Don't animate when dismissal occurs because of scrolling, zooming,
253 or other things in which the content will have changed significantly
254 underneath the indicator and shouldn't have a slowly-fading-out yellow highlight.
256 2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
258 Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
259 https://bugs.webkit.org/show_bug.cgi?id=144304
261 Reviewed by Geoffrey Garen.
263 Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
265 * Configurations/FeatureDefines.xcconfig:
267 2015-04-28 Commit Queue <commit-queue@webkit.org>
269 Unreviewed, rolling out r183514.
270 https://bugs.webkit.org/show_bug.cgi?id=144359
272 It broke cloop test bots (Requested by mcatanzaro on #webkit).
276 "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
277 https://bugs.webkit.org/show_bug.cgi?id=144304
278 http://trac.webkit.org/changeset/183514
280 2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
282 Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
283 https://bugs.webkit.org/show_bug.cgi?id=144304
285 Reviewed by Geoffrey Garen.
287 Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
289 * Configurations/FeatureDefines.xcconfig:
291 2015-04-28 Enrica Casucci <enrica@apple.com>
293 Add support for lookup on iOS.
294 https://bugs.webkit.org/show_bug.cgi?id=144342
295 rdar://problem/19994090
297 Reviewed by Tim Horton.
299 * UIProcess/WebPageProxy.h:
300 * UIProcess/ios/WKContentViewInteraction.mm:
301 (-[WKContentView _lookup:]):
302 (-[WKContentView canPerformAction:withSender:]):
303 * UIProcess/ios/WebPageProxyIOS.mm:
304 (WebKit::WebPageProxy::getLookupContextAtPoint):
305 * WebProcess/WebPage/WebPage.h:
306 * WebProcess/WebPage/WebPage.messages.in:
307 * WebProcess/WebPage/ios/WebPageIOS.mm:
308 (WebKit::WebPage::getLookupContextAtPoint):
310 2015-04-28 Brady Eidson <beidson@apple.com>
312 Consolidate most "frame load" arguments into FrameLoadRequest.
313 https://bugs.webkit.org/show_bug.cgi?id=144276
315 Reviewed by Alexey Proskuryakov.
317 * WebProcess/Plugins/PluginView.cpp:
318 (WebKit::PluginView::loadURL):
320 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
321 (WebKit::WebFrameLoaderClient::dispatchCreatePage):
323 * WebProcess/WebPage/WebInspector.cpp:
324 (WebKit::WebInspector::openInNewTab):
326 2015-04-28 Chris Dumez <cdumez@apple.com>
328 [WK2][Mac] Update WebContent process' sandbox profile for AWD
329 https://bugs.webkit.org/show_bug.cgi?id=144315
330 <rdar://problem/20719293>
332 Reviewed by Alexey Proskuryakov.
334 Update sandbox profile for AWD similarly to what was done for iOS in
337 * WebProcess/com.apple.WebProcess.sb.in:
339 2015-04-28 Antti Koivisto <antti@apple.com>
341 Network Cache: Disk cache getting filled by YouTube video data
342 https://bugs.webkit.org/show_bug.cgi?id=144259
344 Reviewed by Darin Adler.
346 MSE media is loaded via XHR and tends to eventually fill the cache.
348 YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
349 We can reduce disk writes and keep more useful resources around by not caching them
351 * NetworkProcess/NetworkResourceLoader.cpp:
352 (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
353 (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
354 * NetworkProcess/cache/NetworkCache.cpp:
355 (WebKit::NetworkCache::makeStoreDecision):
357 Don't store if the requester is XHR and response has video or audio content type.
359 * NetworkProcess/cache/NetworkCache.h:
360 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
361 (WebKit::NetworkCache::storeDecisionToDiagnosticKey):
362 * Shared/Network/NetworkResourceLoadParameters.cpp:
363 (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
364 (WebKit::NetworkResourceLoadParameters::encode):
365 (WebKit::NetworkResourceLoadParameters::decode):
366 * Shared/Network/NetworkResourceLoadParameters.h:
368 The requester type is now part of the ResourceRequest, no need for separate parameter.
370 * Shared/mac/WebCoreArgumentCodersMac.mm:
371 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
372 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
373 * WebProcess/Network/WebResourceLoadScheduler.cpp:
374 (WebKit::WebResourceLoadScheduler::scheduleLoad):
376 2015-04-28 Zan Dobersek <zdobersek@igalia.com>
378 [WK2] API::UserContentURLPattern creation functions should return Ref<>
379 https://bugs.webkit.org/show_bug.cgi?id=144225
381 Reviewed by Darin Adler.
383 Have API::UserContentURLPattern creation functions return Ref<>.
384 Call-sites are also updated, using and operating on the returned Ref<>
385 object where possible.
387 * Shared/API/APIUserContentURLPattern.h:
388 (API::UserContentURLPattern::create):
389 * Shared/API/c/WKUserContentURLPattern.cpp:
390 (WKUserContentURLPatternCreate):
392 2015-04-28 Zan Dobersek <zdobersek@igalia.com>
394 [WK2] API::URLRequest, API::URLResponse creation functions should return Ref<>
395 https://bugs.webkit.org/show_bug.cgi?id=144224
397 Reviewed by Darin Adler.
399 Have API::URLRequest and API::URLResponse creation functions return Ref<>.
400 The call-sites are also updated, using and operating on the returned Ref<> object
403 * Shared/API/APIURLRequest.h:
404 (API::URLRequest::create):
405 * Shared/API/APIURLResponse.h:
406 (API::URLResponse::create):
407 * Shared/API/c/WKURLRequest.cpp:
408 (WKURLRequestCreateWithWKURL):
409 * Shared/API/c/mac/WKURLRequestNS.mm:
410 (WKURLRequestCreateWithNSURLRequest):
411 * Shared/API/c/mac/WKURLResponseNS.mm:
412 (WKURLResponseCreateWithNSURLResponse):
413 * UIProcess/API/C/WKContext.cpp:
414 (WKContextSetDownloadClient):
415 * UIProcess/API/C/WKDownload.cpp:
416 (WKDownloadCopyRequest):
417 * UIProcess/API/C/WKNavigationDataRef.cpp:
418 (WKNavigationDataCopyOriginalRequest):
419 * UIProcess/API/C/WKPage.cpp:
420 (WKPageSetPagePolicyClient):
421 (WKPageSetPageUIClient):
422 * UIProcess/Cocoa/NavigationState.mm:
423 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
424 * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
425 (WebKit::WebSoupCustomProtocolRequestManagerClient::startLoading):
426 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
427 (willSendRequestForFrame):
428 * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
429 (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
430 (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
431 (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
433 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
435 [WK2] API::Point, API::Size, API::Rect creation functions should return Ref<>
436 https://bugs.webkit.org/show_bug.cgi?id=144223
438 Reviewed by Darin Adler.
440 Have API::Point, API::Size and API::Rect creation functions return Ref<>.
441 Call-sites are also updated, using and operating on the returned Ref<> object
444 * Shared/API/APIGeometry.h:
446 (API::Point::create):
448 * Shared/API/c/WKGeometry.cpp:
453 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
455 [WK2] API::Error creation functions should return Ref<>
456 https://bugs.webkit.org/show_bug.cgi?id=144222
458 Reviewed by Darin Adler.
460 Have API::Error creation functions return Ref<>.
461 The call-sites are also updated, using and operating
462 on the returned Ref<> object where possible.
464 * Shared/API/APIError.h:
465 (API::Error::create):
466 * Shared/API/c/cf/WKErrorCF.cpp:
467 (WKErrorCreateWithCFError):
468 * UIProcess/API/C/WKOriginDataManager.cpp:
469 (WKOriginDataManagerDeleteEntriesForOrigin):
470 (WKOriginDataManagerDeleteEntriesModifiedBetweenDates):
471 (WKOriginDataManagerDeleteAllEntries):
472 * UIProcess/API/C/WKPage.cpp:
473 (toGenericCallbackFunction):
474 (WKPageForceRepaint):
475 (WKPageValidateCommand):
476 (WKPageComputePagesForPrinting):
477 * UIProcess/API/C/WKPluginSiteDataManager.cpp:
478 (WKPluginSiteDataManagerClearSiteData):
479 (WKPluginSiteDataManagerClearAllSiteData):
480 * UIProcess/GenericCallback.h:
481 (WebKit::toGenericCallbackFunction):
482 * UIProcess/WebPageProxy.cpp:
483 (WebKit::WebPageProxy::printFinishedCallback):
485 2015-04-27 Sungmann Cho <sungmann.cho@navercorp.com>
487 [GTK] Remove unnecessary semicolon from WebKitNotificationProvider.h.
488 https://bugs.webkit.org/show_bug.cgi?id=144312
490 Reviewed by Martin Robinson.
492 No new tests, no behavior change.
494 * UIProcess/API/gtk/WebKitNotificationProvider.h:
496 2015-04-27 Brent Fulgham <bfulgham@apple.com>
498 PDF action menu fixes
499 https://bugs.webkit.org/show_bug.cgi?id=144299
500 <rdar://problem/20702215>
502 Reviewed by Tim Horton.
504 Make two corrections to how PDFs are handled:
505 1. When calculating the view rect for the user's selection, make sure
506 that we get coordinates for the correct PDF page. The existing code assumed
507 that the current PDFLayerControler's current page was correct, but this will
508 not be true if you zoom the PDF out so that several pages are displayed at
509 once. Each selection keeps track of the page it is referenced against.
511 2. Revise the offsets calculated for the TextIndicator to take into account
512 the font descender (as well as the ascender), and to adjust by the scaled
513 amount of margin around the selected text.
515 * WebProcess/Plugins/PDF/PDFPlugin.mm:
516 (WebKit::PDFPlugin::viewRectForSelection): Use correct page for calculating
518 * WebProcess/WebPage/mac/WebPageMac.mm:
519 (WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin): Include font 'descendant'
520 and (scaled) margin when adjusting the hit target for the TextIndicator to draw.
522 2015-04-27 Michael Catanzaro <mcatanzaro@igalia.com>
524 Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
525 https://bugs.webkit.org/show_bug.cgi?id=144193
527 Reviewed by Darin Adler.
531 2015-04-24 Jon Honeycutt <jhoneycutt@apple.com>
533 Context menus are not reshown after an orientation change
535 <https://bugs.webkit.org/show_bug.cgi?id=144143>
536 <rdar://problem/20679931>
538 Reviewed by Darin Adler.
540 * UIProcess/ios/WKActionSheet.mm:
541 (-[WKActionSheet updateSheetPosition]):
542 Return early if we're still in a rotation, not if the rotation is
545 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
547 [WK2] API::Dictionary creation functions should return Ref<>
548 https://bugs.webkit.org/show_bug.cgi?id=144221
550 Reviewed by Darin Adler.
552 Have API::Dictionary creation functions return Ref<>.
553 The call-sites are also updated, using and operating
554 on the returned Ref<> object where possible.
556 * Shared/API/APIDictionary.cpp:
557 (API::Dictionary::create):
558 * Shared/API/APIDictionary.h:
559 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
560 (createEncodedObject):
561 * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
562 (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
563 * Shared/API/c/WKDictionary.cpp:
564 (WKDictionaryCreate):
565 * Shared/API/c/WKMutableDictionary.cpp:
566 (WKMutableDictionaryCreate):
567 * Shared/Plugins/Netscape/PluginInformation.cpp:
568 (WebKit::createPluginInformationDictionary):
569 * Shared/Plugins/Netscape/PluginInformation.h:
570 * UIProcess/API/C/WKPage.cpp:
571 (WKPageSetPageUIClient):
572 * UIProcess/API/gtk/WebKitWebContext.cpp:
573 (webkit_web_context_prefetch_dns):
574 * UIProcess/API/gtk/WebKitWebView.cpp:
575 (webkit_web_view_get_snapshot):
576 * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
577 (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
578 * UIProcess/Plugins/PlugInAutoStartProvider.h:
579 * UIProcess/StatisticsRequest.cpp:
580 (WebKit::createDictionaryFromHashMap):
581 (WebKit::StatisticsRequest::completedRequest):
582 * UIProcess/WebFormClient.cpp:
583 (WebKit::WebFormClient::willSubmitForm):
584 * UIProcess/WebPageProxy.cpp:
585 (WebKit::WebPageProxy::didFailToInitializePlugin):
586 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
587 (didInitiateLoadForResource):
588 (willSendRequestForFrame):
589 (didReceiveResponseForResource):
590 (didReceiveContentLengthForResource):
591 (didFinishLoadForResource):
592 (didFailLoadForResource):
593 (webkitWebPageDidReceiveMessage):
594 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
595 (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
596 (WebKit::InjectedBundlePageFormClient::willSubmitForm):
598 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
600 [WK2] API::Data creation functions should return Ref<>
601 https://bugs.webkit.org/show_bug.cgi?id=144220
603 Reviewed by Darin Adler.
605 Have API::Data creation functions return Ref<>.
606 The call-sites are also updated, using and operating
607 on the returned Ref<> object where possible.
609 * Shared/API/APIData.h:
610 (API::Data::createWithoutCopying):
612 * Shared/API/c/WKData.cpp:
614 * Shared/API/c/mac/WKWebArchive.cpp:
615 (WKWebArchiveCopyData):
616 * Shared/API/c/mac/WKWebArchiveResource.cpp:
617 (WKWebArchiveResourceCopyData):
618 * Shared/APIWebArchive.h:
619 * Shared/APIWebArchive.mm:
620 (API::WebArchive::data):
621 * Shared/APIWebArchiveResource.h:
622 * Shared/APIWebArchiveResource.mm:
623 (API::WebArchiveResource::data):
624 * Shared/Cocoa/APIDataCocoa.mm:
625 (API::Data::createWithoutCopying):
626 * UIProcess/API/Cocoa/WKWebView.mm:
627 (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
628 * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
629 (webkitURISchemeRequestReadCallback):
630 * UIProcess/API/gtk/WebKitWebView.cpp:
631 (webkit_web_view_load_bytes):
632 * UIProcess/Downloads/DownloadProxy.cpp:
633 (WebKit::createData):
634 * UIProcess/WebPageProxy.cpp:
635 (WebKit::WebPageProxy::dataCallback):
636 (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder):
638 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
640 [WK2] API::URL creation functions should return Ref<>
641 https://bugs.webkit.org/show_bug.cgi?id=144219
643 Reviewed by Darin Adler.
645 Have API::URL creation functions return Ref<>.
646 The call-sites are also updated, using and operating in the
647 returned Ref<> object, where possible.
649 * Shared/API/APIURL.h:
651 * Shared/API/c/WKSharedAPICast.h:
652 (WebKit::toCopiedURLAPI):
653 * Shared/API/c/WKURL.cpp:
654 (WKURLCreateWithUTF8CString):
655 (WKURLCreateWithBaseURL):
656 * UIProcess/API/gtk/WebKitWebResource.cpp:
657 (webkit_web_resource_get_data):
658 * UIProcess/WebIconDatabase.cpp:
659 (WebKit::WebIconDatabase::didChangeIconForPageURL):
660 (WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):
661 * WebProcess/WebPage/WebPage.cpp:
662 (WebKit::WebPage::userAgent):
664 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
666 [WK2] API::String creation functions should return Ref<>
667 https://bugs.webkit.org/show_bug.cgi?id=144218
669 Reviewed by Darin Adler.
671 Have API::String creation functions return Ref<>.
672 The call-sites are also updated, using and operating on the returned
673 Ref<> object, where possible.
675 * Shared/API/APIString.h:
676 * Shared/API/c/WKPluginInformation.cpp:
677 (WKPluginInformationBundleIdentifierKey):
678 (WKPluginInformationBundleVersionKey):
679 (WKPluginInformationBundleShortVersionKey):
680 (WKPluginInformationPathKey):
681 (WKPluginInformationDisplayNameKey):
682 (WKPluginInformationDefaultLoadPolicyKey):
683 (WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
684 (WKPluginInformationHasSandboxProfileKey):
685 (WKPluginInformationFrameURLKey):
686 (WKPluginInformationMIMETypeKey):
687 (WKPluginInformationPageURLKey):
688 (WKPluginInformationPluginspageAttributeURLKey):
689 (WKPluginInformationPluginURLKey):
690 (WKPlugInInformationReplacementObscuredKey):
691 * Shared/API/c/WKSharedAPICast.h:
692 (WebKit::ProxyingRefPtr::ProxyingRefPtr):
693 (WebKit::toCopiedAPI):
694 * Shared/API/c/WKString.cpp:
695 (WKStringCreateWithUTF8CString):
696 (WKStringCreateWithJSString):
697 * UIProcess/API/C/WKDatabaseManager.cpp:
698 (WKDatabaseManagerGetOriginKey):
699 (WKDatabaseManagerGetOriginQuotaKey):
700 (WKDatabaseManagerGetOriginUsageKey):
701 (WKDatabaseManagerGetDatabaseDetailsKey):
702 (WKDatabaseManagerGetDatabaseDetailsNameKey):
703 (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
704 (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
705 (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
706 (WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
707 (WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
708 * UIProcess/API/C/WKKeyValueStorageManager.cpp:
709 (WKKeyValueStorageManagerGetOriginKey):
710 (WKKeyValueStorageManagerGetCreationTimeKey):
711 (WKKeyValueStorageManagerGetModificationTimeKey):
712 * UIProcess/API/C/WKPage.cpp:
713 (WKPageGetSessionHistoryURLValueType):
714 (WKPageGetSessionBackForwardListItemValueType):
715 (toGenericCallbackFunction):
716 (WKPageValidateCommand):
717 * UIProcess/WebProcessPool.cpp:
718 (WebKit::WebProcessPool::didReceiveInvalidMessage):
720 2015-04-27 Brady Eidson <beidson@apple.com>
722 Make 'enum NavigationType' be an enum class
723 https://bugs.webkit.org/show_bug.cgi?id=144270
725 Reviewed by Alex Christensen.
727 * Shared/API/c/WKSharedAPICast.h:
730 * Shared/NavigationActionData.cpp:
731 (WebKit::NavigationActionData::NavigationActionData):
733 * UIProcess/API/Cocoa/WKNavigationAction.mm:
734 (toWKNavigationType):
736 * UIProcess/API/gtk/WebKitPrivate.cpp:
737 (toWebKitNavigationType):
739 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
740 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
742 * WebProcess/WebPage/WebInspector.cpp:
743 (WebKit::WebInspector::openInNewTab):
745 2015-04-27 Brent Fulgham <bfulgham@apple.com>
747 REGRESSION(r182879): Images and video can no longer be downloaded
748 https://bugs.webkit.org/show_bug.cgi?id=144267
749 <rdar://problem/20702844>
751 Reviewed by Simon Fraser.
753 * UIProcess/mac/WKActionMenuController.mm:
754 (-[WKActionMenuController _createActionMenuItemForTag:]): Check for
755 "!WebCore::protocolIs(..., "file")" for image and media downloads.
757 2015-04-27 Csaba Osztrogonác <ossy@webkit.org>
759 [EFL] TestWebKitAPI's forwarding header generator should depend on WebKit2's generator
760 https://bugs.webkit.org/show_bug.cgi?id=143874
762 Reviewed by Gyuyoung Kim.
764 * PlatformEfl.cmake: Rename the generator to have consistent name with other generators.
765 * Scripts/generate-forwarding-headers.pl: Removed the unnecessary multiple include-path support.
767 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
769 [SOUP] Add initial implementation of NetworkProcess disk cache
770 https://bugs.webkit.org/show_bug.cgi?id=143872
772 Reviewed by Martin Robinson.
774 Implement the platform specific parts of the disk cache
775 implementation for Soup. It's mainly NetworkCache::Data and
776 NetworkCache::IOChannel.
779 * NetworkProcess/cache/NetworkCache.cpp:
780 (WebKit::NetworkCache::dumpFileChanged):
781 (WebKit::NetworkCache::Cache::initialize):
782 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
783 * NetworkProcess/cache/NetworkCacheData.h:
784 (WebKit::NetworkCache::Data::soupBuffer):
785 * NetworkProcess/cache/NetworkCacheDataSoup.cpp: Added.
786 (WebKit::NetworkCache::Data::Data):
787 (WebKit::NetworkCache::Data::empty):
788 (WebKit::NetworkCache::Data::data):
789 (WebKit::NetworkCache::Data::isNull):
790 (WebKit::NetworkCache::Data::apply):
791 (WebKit::NetworkCache::Data::subrange):
792 (WebKit::NetworkCache::concatenate):
793 (WebKit::NetworkCache::MapWrapper::~MapWrapper):
794 (WebKit::NetworkCache::deleteMapWrapper):
795 (WebKit::NetworkCache::mapFile):
796 (WebKit::NetworkCache::Data::adoptMap):
797 (WebKit::NetworkCache::computeSHA1):
798 (WebKit::NetworkCache::bytesEqual):
799 * NetworkProcess/cache/NetworkCacheIOChannel.h:
800 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp: Added.
801 (WebKit::NetworkCache::IOChannel::IOChannel):
802 (WebKit::NetworkCache::IOChannel::open):
803 (WebKit::NetworkCache::fillDataFromReadBuffer):
804 (WebKit::NetworkCache::inputStreamReadReadyCallback):
805 (WebKit::NetworkCache::IOChannel::read):
806 (WebKit::NetworkCache::IOChannel::readSync):
807 (WebKit::NetworkCache::outputStreamWriteReadyCallback):
808 (WebKit::NetworkCache::IOChannel::write):
809 * NetworkProcess/cache/NetworkCacheStorageSoup.cpp: Removed.
810 * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
811 * NetworkProcess/soup/NetworkProcessSoup.cpp:
812 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
813 (WebKit::NetworkProcess::platformSetCacheModel):
814 (WebKit::NetworkProcess::clearDiskCache):
817 2015-04-26 Yusuke Suzuki <utatane.tea@gmail.com>
819 [ES6] Implement ES6 template literals
820 https://bugs.webkit.org/show_bug.cgi?id=142691
822 Reviewed by Darin Adler.
824 Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
826 * Configurations/FeatureDefines.xcconfig:
828 2015-04-26 Sungmann Cho <sungmann.cho@navercorp.com>
830 Remove PluginView::renderer().
831 https://bugs.webkit.org/show_bug.cgi?id=144216
833 Reviewed by Darin Adler.
835 Nobody should have to know about the plug-in view's renderer except the plug-in view itself.
837 No new tests, no behavior change.
839 * WebProcess/Plugins/PDF/PDFPlugin.mm:
840 (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
841 (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
842 * WebProcess/Plugins/PluginView.cpp:
843 (WebKit::PluginView::renderer): Deleted.
844 * WebProcess/Plugins/PluginView.h:
846 2015-04-26 Doug Russell <d_russell@apple.com>
848 AX: richer text change notifications (142719)
849 https://bugs.webkit.org/show_bug.cgi?id=142719
851 Reviewed by Darin Adler.
853 Richer accessibility value change notifications. Introduce AXTextEditType,
854 postTextStateChangeNotification and postTextReplacementNotification to give assistive
855 tech apps more reliable context for responding to changes in web content. Also implement
856 a mechanism to post value changes in password form fields in coalesced ticks to thwart
857 analyzing the cadence of changes.
859 Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
860 and an overload of postTextReplacementNotification to give assistive tech apps more
861 reliable context for responding to changes in web content selection. Also block posting
862 selection changes on password fields.
864 * UIProcess/WebEditCommandProxy.cpp:
865 (WebKit::WebEditCommandProxy::nameForEditAction):
867 2015-04-26 Dan Bernstein <mitz@apple.com>
869 <rdar://problem/20702337> REGRESSION (r182952): Plug-in service fails to load because it links against WebKit2.framework
870 https://bugs.webkit.org/show_bug.cgi?id=144233
872 Reviewed by Simon Fraser.
874 Have the plug-in service link against WebKit.framework rather than WebKit2.framework.
876 * Configurations/PluginService.32.xcconfig: Removed linker flags for linking against WebKit2
877 and Foundation from the definition of OTHER_LDFLAGS. Since linking is no longer conditional,
878 we can just do it in the target’s Link Binary With Libraries build phase.
880 * Configurations/PluginService.64.xcconfig: Ditto.
882 * WebKit2.xcodeproj/project.pbxproj: Have Foundation and WebKit listed in the services’ Link
883 Binariy With Libraries build phases (one service already had WebKit).
885 2015-04-26 Dan Bernstein <mitz@apple.com>
889 * UIProcess/ios/forms/WKFileUploadPanel.mm:
890 (-[WKFileUploadPanel _showDocumentPickerMenu]): Suppressed deprecation warnings around use
891 of -[UIDocumentMenuViewController _setIgnoreApplicationEntitlementForImport:].
893 2015-04-25 Tim Horton <timothy_horton@apple.com>
895 Further update gesture swipe shadow style
896 https://bugs.webkit.org/show_bug.cgi?id=144215
897 <rdar://problem/19295843>
899 Reviewed by Dan Bernstein.
901 * Resources/mac/SwipeShadow.png: Removed.
902 * Resources/mac/SwipeShadow@2x.png: Removed.
903 * UIProcess/mac/ViewGestureController.h:
904 * UIProcess/mac/ViewGestureControllerMac.mm:
905 (WebKit::ViewGestureController::beginSwipeGesture):
906 * WebKit2.xcodeproj/project.pbxproj:
907 Use a CAGradientLayer instead of PNGs for the swipe shadow.
909 2015-04-25 Dan Bernstein <mitz@apple.com>
911 WebKit2 part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
912 https://bugs.webkit.org/show_bug.cgi?id=144201
914 Reviewed by Darin Adler.
916 Instead of TBD, we use the high version number to which it corresponds in CFAvailability.h,
919 * mac/MigrateHeadersFromWebKitLegacy.make: To detect not-yet-available declarations in
920 headers, look for "9876_5" rather than "TBA".
922 2015-04-24 Timothy Hatcher <timothy@apple.com>
924 Web Inspector: Remove native window dock controls
925 https://bugs.webkit.org/show_bug.cgi?id=144184
927 Reviewed by Joseph Pecoraro.
929 * Resources/DockBottom.pdf: Removed.
930 * Resources/DockBottomLegacy.pdf: Removed.
931 * Resources/DockRight.pdf: Removed.
932 * Resources/DockRightLegacy.pdf: Removed.
933 * UIProcess/WebInspectorProxy.h:
934 * UIProcess/mac/WebInspectorProxyMac.mm:
935 (WebKit::WebInspectorProxy::createInspectorWindow):
936 (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
937 * WebKit2.xcodeproj/project.pbxproj:
939 2015-04-25 Martin Robinson <mrobinson@igalia.com>
941 Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
942 https://bugs.webkit.org/show_bug.cgi?id=144182
944 Reviewed by Simon Fraser.
946 * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
948 2015-04-24 Simon Fraser <simon.fraser@apple.com>
950 Have the web inspector report accurate memory use for layers with detached backing store
951 https://bugs.webkit.org/show_bug.cgi?id=144179
953 Reviewed by Dean Jackson.
955 Remote layers can make their backing store volatile, so the backing only contributes
956 to reported memory use when attached.
958 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
960 2015-04-24 Andreas Kling <akling@apple.com>
962 theverge.com burning 100% CPU on iPad (due to window.screenX/Y)
963 <https://webkit.org/b/144175>
964 <rdar://problem/20694585>
966 Reviewed by Anders Carlsson.
968 Return an empty window rect on iOS WK2 builds. This avoids sending a synchronous
969 IPC request to the UI process that would give the same result, but spend way
970 more time and CPU cycles to do so.
972 With this change, theverge.com CPU usage goes from 100% to ~20% when idle.
974 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
975 (WebKit::WebChromeClient::windowRect):
977 2015-04-24 Brent Fulgham <bfulgham@apple.com>
979 TextIndicator for embedded PDFs is slightly offset
980 https://bugs.webkit.org/show_bug.cgi?id=144172
981 <rdar://problem/20691304>
983 Reviewed by Tim Horton.
985 When I converted the existing DOM Range logic to work with PDFSelections, I omitted the
986 step where the font ascent was used to adjust the origin used for the TextIndicator. This
987 patch determines the correct ascent for the range of characters in the selection, and
988 adjusts the offset by the difference between the ascent and the height of the selection rect.
990 Also, since the PDFSelection only supplies the bounding rect for the selection, I calculate
991 an equivalent text bounding box by insetting the rect by half the size of the ascent.
993 * WebProcess/Plugins/PDF/PDFPlugin.mm:
994 (WebKit::PDFPlugin::scaleFactor): Add accessor for PDF scale factor.
995 * WebProcess/Plugins/PDF/PDFPlugin.h:
996 * WebProcess/WebPage/mac/WebPageMac.mm:
997 (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Adjusted to take the
998 font ascent and scale factor into account.
1000 2015-04-24 David Kilzer <ddkilzer@apple.com>
1002 REGRESSION (r183293): Fix iOS EWS build by adding SPI declaration for +[UIPeripheralHost visiblePeripheralFrame]
1004 Fixes the following build failures:
1006 WebKit2/UIProcess/ios/WKPDFView.mm:740:45: error: class method '+visiblePeripheralFrame' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
1007 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
1008 ^~~~~~~~~~~~~~~~~~~~~~
1009 WebKit2/UIProcess/ios/WKPDFView.mm:740:12: error: no viable conversion from 'id' to 'CGRect'
1010 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
1011 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1013 * Platform/spi/ios/UIKitSPI.h:
1014 (+[UIPeripheralHost visiblePeripheralFrame]): Add declaration.
1016 2015-04-24 Anders Carlsson <andersca@apple.com>
1018 Change _WKWebsiteDataStore to hold on to an internal WKWebsiteDataStore
1019 https://bugs.webkit.org/show_bug.cgi?id=144171
1021 Reviewed by Tim Horton.
1023 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1024 (-[WKWebViewConfiguration _websiteDataStore]):
1025 (-[WKWebViewConfiguration _setWebsiteDataStore:]):
1026 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1027 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1028 (-[_WKWebsiteDataStore initWithDataStore:]):
1029 (+[_WKWebsiteDataStore defaultDataStore]):
1030 (+[_WKWebsiteDataStore nonPersistentDataStore]):
1031 (-[_WKWebsiteDataStore isNonPersistent]):
1032 (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1033 (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1034 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1035 * UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
1036 * WebKit2.xcodeproj/project.pbxproj:
1038 2015-04-24 Tim Horton <timothy_horton@apple.com>
1040 WKPDFView does not support password-protected PDFs
1041 https://bugs.webkit.org/show_bug.cgi?id=144162
1042 <rdar://problem/18411512>
1044 Reviewed by Andy Estes.
1046 * Platform/spi/ios/UIKitSPI.h:
1049 * UIProcess/ios/WKPDFView.h:
1050 * UIProcess/ios/WKPDFView.mm:
1051 (-[WKPDFView _didLoadPDFDocument]):
1052 (-[WKPDFView web_setContentProviderData:suggestedFilename:]):
1053 Move creation of the UIPDFDocument (only possible if the CGPDFDocument is unlocked)
1054 and initial setup of the page views out into _didLoadPDFDocument.
1056 If the CGPDFDocument is locked, we'll show some UI to unlock it; otherwise
1057 we'll continue on to _didLoadPDFDocument as previously.
1059 (-[WKPDFView web_setMinimumSize:]):
1060 Resize the password UI instead of the PDF pages if we have it.
1062 (-[WKPDFView _computePageAndDocumentFrames]):
1063 Don't bother doing any work revalidating PDF pages if the document is locked.
1065 (-[WKPDFView _updatePasswordEntryField]):
1066 Make sure that the UIDocumentPassword view is always the size of the scrollview.
1067 This takes care of rotation.
1069 (-[WKPDFView _keyboardDidShow:]):
1070 Make sure that we scroll the password field around, if necessary, to keep it
1071 on screen when editing begins.
1073 (-[WKPDFView _showPasswordEntryField]):
1074 (-[WKPDFView _hidePasswordEntryField]):
1075 Adjust the background color (to match the UIDocumentPasswordView) and disable zooming
1076 while it's up. The UIDocumentPassword view is installed into the scroll view
1077 to match UIWebView behavior.
1079 (-[WKPDFView userDidEnterPassword:forPasswordView:]):
1080 (-[WKPDFView didBeginEditingPassword:inView:]):
1081 (-[WKPDFView didEndEditingPassword:inView:]):
1082 (-[WKPDFView _didFailToUnlock]):
1083 Pop up a dialog informing the user that they entered the wrong password.
1085 (-[WKPDFView _tryToUnlockWithPassword:]):
1086 Try to unlock the document. If it succeeds, hide the unlock UI and go back to
1087 _didLoadPDFDocument.
1089 2015-04-24 Commit Queue <commit-queue@webkit.org>
1091 Unreviewed, rolling out r183266.
1092 https://bugs.webkit.org/show_bug.cgi?id=144164
1094 Broke 32-bit build and a test. (Requested by ap on #webkit).
1098 "AX: richer text change notifications (142719)"
1099 https://bugs.webkit.org/show_bug.cgi?id=142719
1100 http://trac.webkit.org/changeset/183266
1102 2015-04-24 Brent Fulgham <bfulgham@apple.com>
1104 REGRESSION: WebKit2.ActionMenusTest API test fails
1105 https://bugs.webkit.org/show_bug.cgi?id=144149
1106 <rdar://problem/20677770>
1108 Reviewed by Tim Horton.
1110 Tested by TestWebKitAPI
1112 The 'lookupTextAtLocation' method was not converting the NSEvent coordinates it
1113 was receiving from root view to the plugin view. Consequently, full page PDFs
1114 did hit testing correctly, but an <embed> PDF would not.
1116 Since 'existingSelectionContainsPoint' is exposed as API, I also modified it to
1117 expect 'root view' coordinates and perform the requisite conversions, rather
1118 than expecting 'plugin view' coordinates.
1120 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1121 (WebKit::PDFPlugin::existingSelectionContainsPoint): Expect 'root view' coordinates
1123 (WebKit::PDFPlugin::lookupTextAtLocation): Properly convert the passed 'root view'
1124 coordinates to the PDF's view coordinate space.
1125 * WebProcess/WebPage/mac/WebPageMac.mm:
1126 (WebKit::WebPage::performActionMenuHitTestAtLocation): Pass hit point using view coordinates,
1127 not content coordinates.
1129 2015-04-24 Anders Carlsson <andersca@apple.com>
1131 Address a review comment from Joe Pecoraro.
1133 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1135 2015-04-24 Anders Carlsson <andersca@apple.com>
1137 Rename -[WKWebsiteDataStore isNonPersistent] to -[WKWebsiteDataStore isPersistent]
1138 https://bugs.webkit.org/show_bug.cgi?id=144158
1140 Reviewed by Beth Dakin.
1142 * UIProcess/API/APIWebsiteDataStore.cpp:
1143 (API::WebsiteDataStore::isPersistent):
1144 (API::WebsiteDataStore::isNonPersistent): Deleted.
1145 * UIProcess/API/APIWebsiteDataStore.h:
1146 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1147 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1148 (-[WKWebsiteDataStore isPersistent]):
1149 (-[WKWebsiteDataStore isNonPersistent]): Deleted.
1150 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1151 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1152 (-[_WKWebsiteDataStore isNonPersistent]):
1153 * UIProcess/WebsiteData/WebsiteDataStore.h:
1155 2015-04-24 Brent Fulgham <bfulgham@apple.com>
1157 Immediate action not functional for embedded PDFs
1158 https://bugs.webkit.org/show_bug.cgi?id=143952
1159 <rdar://problem/19842365>
1161 Reviewed by Tim Horton.
1163 Add a new method to retrieve appropriate dictionary lookup content and update the
1164 hit test result with relevant dictionary content and the bounding rect of the
1167 * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add stub.
1168 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Initialize plugin type.
1169 * WebProcess/Plugins/PDF/PDFPlugin.h:
1170 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1171 (WebKit::rectInWindowSpaceForRectInLayoutSpace): New helper function to
1172 convert PDF 'in page' units to the equivalent view units.
1173 (WebKit::PDFPlugin::PDFPlugin): Initialize plugin type.
1174 (WebKit::PDFPlugin::viewRectForSelection): Query a provided PDFSelection for
1175 its bounding rect and return the result in view units.
1176 * WebProcess/Plugins/Plugin.h:
1177 * WebProcess/Plugins/PluginProxy.cpp: Initialize plugin type.
1178 * WebProcess/Plugins/PluginProxy.h: Add stub.
1179 * WebProcess/Plugins/PluginView.cpp:
1180 (WebKit::PluginView::viewRectForSelection): Added.
1181 * WebProcess/Plugins/PluginView.h:
1182 * WebProcess/WebPage/WebPage.h:
1183 * WebProcess/WebPage/mac/WebPageMac.mm:
1184 (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Added.
1185 (WebKit::textIndicatorTransitionForActionMenu): Added helper function.
1186 (WebKit::WebPage::performActionMenuHitTestAtLocation): Update the hit test information
1187 with relevant dictionary lookup content, and mark the result as a text node (if
1190 2015-04-24 Jer Noble <jer.noble@apple.com>
1192 [WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state actually changed.
1193 https://bugs.webkit.org/show_bug.cgi?id=144153
1195 Reviewed by Alexey Proskuryakov.
1197 Check the old state vs. the new state and only issue the change notification if the IsPlayingAudio state changed.
1199 * UIProcess/WebPageProxy.cpp:
1200 (WebKit::WebPageProxy::isPlayingMediaDidChange):
1202 2015-04-24 Antti Koivisto <antti@apple.com>
1204 CrashTracer: [USER] com.apple.WebKit.Networking at com.apple.WebKit: WebKit::NetworkResourceLoader::~NetworkResourceLoader + 14
1205 https://bugs.webkit.org/show_bug.cgi?id=144147
1207 Reviewed by Chris Dumez.
1209 Storage::storeBodyAsBlob copies the std::function callback for handling mapped bodies in a thread.
1210 This is thread safe only if the function copy is thread safe. It is currently not as we are capturing
1211 RefPtr<NetworkResourceLoader> and NetworkResourceLoader doesn't use thread safe refcounting.
1213 Fix by avoiding copying of the callback. Use same apporach for WriteOperation as we already use for
1214 ReadOperation: count the active operations in progress and delete WriteOperation when everything is
1215 finished. This way we don't need to copy the function out from WriteOperation.
1217 * NetworkProcess/cache/NetworkCacheStorage.cpp:
1218 (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
1219 (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
1221 Move definition here from the header.
1223 (WebKit::NetworkCache::Storage::~Storage):
1224 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
1226 Increment the operation count when storing a blob, call finishWriteOperation when done.
1228 (WebKit::NetworkCache::Storage::dispatchReadOperation):
1229 (WebKit::NetworkCache::Storage::finishReadOperation):
1231 Count active operations instead of finished operations. This makes the code clearer.
1233 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
1234 (WebKit::NetworkCache::Storage::finishWriteOperation):
1236 Mirror the way ReadOperations work.
1238 * NetworkProcess/cache/NetworkCacheStorage.h:
1239 (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation): Deleted.
1241 2015-04-24 Timothy Hatcher <timothy@apple.com>
1243 REGRESSION: Web Inspector: Start Timeline Recording in Develop menu broken
1244 https://bugs.webkit.org/show_bug.cgi?id=144150
1246 Reviewed by Brian Burg.
1248 * WebProcess/WebPage/WebInspectorUI.cpp:
1249 (WebKit::WebInspectorUI::evaluateCommandOnLoad): Properly treat bools as literals
1250 instead of strings by not using the string version of evaluateCommandOnLoad.
1252 2015-04-23 Anders Carlsson <andersca@apple.com>
1254 Add headerdocs for WKWebsiteDataRecord and WKWebsiteDataStore
1255 https://bugs.webkit.org/show_bug.cgi?id=144138
1257 Reviewed by Darin Adler.
1259 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1260 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1261 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1262 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1263 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1264 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1266 2015-04-24 Doug Russell <d_russell@apple.com>
1268 AX: richer text change notifications (142719)
1269 https://bugs.webkit.org/show_bug.cgi?id=142719
1271 Reviewed by Darin Adler.
1273 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.
1275 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.
1277 * UIProcess/WebEditCommandProxy.cpp:
1278 (WebKit::WebEditCommandProxy::nameForEditAction):
1280 2015-04-24 Darin Adler <darin@apple.com>
1282 Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
1283 https://bugs.webkit.org/show_bug.cgi?id=128007
1285 Reviewed by Anders Carlsson.
1287 * NetworkProcess/cache/NetworkCacheEncoder.h: Added an include now
1288 needed that was inherited from OwnPtr.h before.
1290 2015-04-24 Antti Koivisto <antti@apple.com>
1292 Network Cache: Make path functions members
1293 https://bugs.webkit.org/show_bug.cgi?id=144146
1295 Reviewed by Carlos Garcia Campos.
1297 This simplifies the code.
1299 * NetworkProcess/cache/NetworkCacheStorage.cpp:
1300 (WebKit::NetworkCache::Storage::partitionPathForKey):
1301 (WebKit::NetworkCache::Storage::recordPathForKey):
1302 (WebKit::NetworkCache::Storage::bodyPathForKey):
1303 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
1304 (WebKit::NetworkCache::Storage::remove):
1305 (WebKit::NetworkCache::Storage::dispatchReadOperation):
1306 (WebKit::NetworkCache::Storage::finishReadOperation):
1307 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
1308 (WebKit::NetworkCache::partitionPathForKey): Deleted.
1309 (WebKit::NetworkCache::recordPathForKey): Deleted.
1310 (WebKit::NetworkCache::bodyPathForKey): Deleted.
1311 * NetworkProcess/cache/NetworkCacheStorage.h:
1313 2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
1315 Unreviewed. Remove incorrect assert after r183189.
1317 In this case the assert was already there, but it's incorrect
1318 because we are handling uninitialized attachments below in the
1319 same function, and also when sending messages. So, if it's ok to
1320 send uninitialized attachments, it's ok to receive them. This
1321 didn't fail before r183189, because we were only invaliding the
1322 attachments by setting the file descriptor to -1, and they were
1323 handled as null attachments. After r183189, the move operator
1324 resets the moved attachment leaving it uninitialized again.
1326 * Platform/IPC/unix/ConnectionUnix.cpp:
1327 (IPC::Connection::processMessage):
1329 2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
1331 [SOUP] Use a webkit subdirectory for the disk cache
1332 https://bugs.webkit.org/show_bug.cgi?id=144048
1334 Reviewed by Martin Robinson.
1336 Recent versions of libsoup remove any file in cache dir not
1337 referenced by the index when the cache is loaded to workaround
1338 leaked resources when load/dump is unbalanced for whatever reason,
1339 like a crash. We currently use $XDG_CACHE_HOME/app-name as default
1340 disk cache directory, but that directory could be used by apps to
1341 cache other things, and the soup cache might end up deleting other
1342 stuff. The soup cache assumes the given directory is only for the
1343 disk cache, so we should ensure that.
1345 * NetworkProcess/soup/NetworkProcessSoup.cpp:
1346 (WebKit::NetworkProcess::platformInitializeNetworkProcess): Append
1347 webkit to the given disk cache and clear the previous soup cache if it exists.
1348 * WebProcess/soup/WebProcessSoup.cpp:
1349 (WebKit::WebProcess::platformInitializeWebProcess): Ditto.
1351 2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
1353 Unreviewed. Remove incorrect ASSERT added in r183176.
1355 We allow to encode null attachments.
1357 * Platform/unix/SharedMemoryUnix.cpp:
1358 (WebKit::SharedMemory::Handle::releaseAttachment):
1360 2015-04-23 Dan Bernstein <mitz@apple.com>
1362 <rdar://problem/20680694> Framework header postprocessing isn’t removing WK_DEPRECATED macros when it should.
1364 Reviewed by Andy Estes.
1366 * mac/postprocess-framework-headers.sh:
1368 2015-04-23 Simon Fraser <simon.fraser@apple.com>
1370 Make it possible to detach GraphicsLayerCA backing store
1371 https://bugs.webkit.org/show_bug.cgi?id=144140
1373 Reviewed by Tim Horton.
1375 This changes makes it possible to denote a GraphicsLayerCA's backing store
1376 as "attached" or not. When not attached, the backing store is made volatile
1377 and can be purged. This will be used in a future patch.
1379 * Shared/mac/RemoteLayerBackingStore.mm:
1380 (WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore): Whitespace.
1381 (WebKit::RemoteLayerBackingStore::display): If backingStoreWillBeDisplayed()
1382 returns true, this indicates that the backing store was brought out of the
1383 "unreachable" list, so return true even if the backing store doesn't require
1385 * Shared/mac/RemoteLayerBackingStoreCollection.h: C++11 initializer, and comments.
1386 * Shared/mac/RemoteLayerBackingStoreCollection.mm:
1387 (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
1388 (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed): Return true
1389 if the caller will need to submit the backing store in the current transaction.
1390 (WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable): This
1391 explicit dirtying is no longer necessary given the backingStoreWillBeDisplayed() change.
1392 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1393 (WebKit::applyPropertiesToLayer): Only set the layer's backing if we both have backing
1394 store, and it's attached.
1395 * Shared/mac/RemoteLayerTreeTransaction.h: New bit, and data member.
1396 * Shared/mac/RemoteLayerTreeTransaction.mm:
1397 (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
1398 (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1399 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1400 (WebKit::dumpChangedLayers):
1401 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1402 (WebKit::PlatformCALayerRemote::recursiveBuildTransaction): Only call display()
1403 on the backing store if it's attached.
1404 (WebKit::PlatformCALayerRemote::setBackingStoreAttached):
1405 (WebKit::PlatformCALayerRemote::backingStoreAttached):
1406 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1407 * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
1408 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1409 (WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):
1411 2015-04-23 Tim Horton <timothy_horton@apple.com>
1413 Quick Look preview popover is not dismissed on scroll in Mail
1414 https://bugs.webkit.org/show_bug.cgi?id=144119
1415 <rdar://problem/19752045>
1417 Reviewed by Anders Carlsson.
1419 * UIProcess/API/mac/WKView.mm:
1420 (-[WKView renewGState]):
1421 If we have a TextIndicator, dismiss all content relative child windows
1422 on renewGState, not just the TextIndicator itself.
1424 This will fix cases like Mail, where WebKit isn't driving the scrolling,
1425 and we have no way (except renewGState) to know that scrolling is happening.
1427 2015-04-23 Simon Fraser <simon.fraser@apple.com>
1429 Changing TiledBacking velocity should schedule a tile revalidation
1430 https://bugs.webkit.org/show_bug.cgi?id=144123
1432 Reviewed by Tim Horton.
1434 Drive-by fix: use the FrameView& that we have already.
1436 * WebProcess/WebPage/ios/WebPageIOS.mm:
1437 (WebKit::WebPage::updateVisibleContentRects):
1439 2015-04-23 Jer Noble <jer.noble@apple.com>
1441 [Mac] Disable QTKit by default on future OS X.
1442 https://bugs.webkit.org/show_bug.cgi?id=144082
1444 Reviewed by Darin Adler.
1446 QTKitEnabled defaults to false.
1448 * Shared/WebPreferencesDefinitions.h:
1450 2015-04-23 Jer Noble <jer.noble@apple.com>
1452 [WK2][Mac] Tweak the timing curve of the WebKit Fullscreen animation
1453 https://bugs.webkit.org/show_bug.cgi?id=144120
1455 Reviewed by Eric Carlson.
1457 Tweak the curve to ease-in faster when the fullscreen animation duration is short.
1459 * UIProcess/mac/WKFullScreenWindowController.mm:
1460 (timingFunctionForDuration):
1465 2015-04-23 Enrica Casucci <enrica@apple.com>
1467 iOS build fix after r183208.
1471 * UIProcess/ios/WKContentViewInteraction.mm:
1473 2015-04-22 Alexey Proskuryakov <ap@apple.com>
1475 [iOS] WebKit services should inherit environment variables for home
1476 https://bugs.webkit.org/show_bug.cgi?id=144078
1477 rdar://problem/20571678
1479 Reviewed by Dan Bernstein.
1481 Pass current environment variables as XPC bootstrap. Also while at it, made
1482 _CFBundleSetupXPCBootstrap not soft linked.
1484 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
1486 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1487 (WebKit::connectToService):
1489 2015-04-23 Enrica Casucci <enrica@apple.com>
1491 Support share button.
1492 https://bugs.webkit.org/show_bug.cgi?id=144077
1493 rdar://problem/19772892
1495 Reviewed by Darin Adler.
1497 * UIProcess/ios/WKContentViewInteraction.mm:
1498 (-[WKContentView _share:]):
1499 (-[WKContentView canPerformAction:withSender:]):
1500 (-[WKContentView _define:]):
1501 (-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
1502 (-[WKContentView moveByOffset:]):
1503 (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
1504 (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
1505 (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
1506 (-[WKContentView accessoryTab:]):
1507 (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
1508 (-[WKContentView executeEditCommandWithCallback:]):
1510 2015-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
1512 [UNIX] Do not allow copies of IPC::Attachment
1513 https://bugs.webkit.org/show_bug.cgi?id=144096
1515 Reviewed by Darin Adler.
1517 It ensures that the file descriptor ownership is always correctly
1518 transferred. This way we can remove the dispose() method to
1519 explicitly close the file descriptor and always close it in the
1520 Attachment destructor (unless explicitly transferred to
1521 IPC::Connection or SharedMemory). It simplifies the code and
1522 ensure we don't leak file descriptors.
1524 * Platform/IPC/ArgumentDecoder.cpp:
1525 (IPC::ArgumentDecoder::~ArgumentDecoder): Remove the code to
1526 explicitly dispose attachments.
1527 (IPC::ArgumentDecoder::removeAttachment): Use WTF::move().
1528 * Platform/IPC/ArgumentEncoder.cpp:
1529 (IPC::ArgumentEncoder::~ArgumentEncoder): Remove the code to
1530 explicitly dispose attachments.
1531 (IPC::ArgumentEncoder::addAttachment): Use WTF::move().
1532 (IPC::ArgumentEncoder::releaseAttachments): Simplify by using WTF::move().
1533 * Platform/IPC/ArgumentEncoder.h:
1534 * Platform/IPC/Attachment.cpp:
1535 (IPC::Attachment::encode): Move a copy of the attachment, and
1536 reset the file descriptor, since the ownership is passed to the encoder.
1537 * Platform/IPC/Attachment.h: Make copy constructor and assignment
1538 private to not allow public copies. The only copy allowed is done
1539 by Attachment::encode(). Make m_fileDescriptor mutable so that we
1540 can reset it in Attachment::encode() after passing the ownership
1542 * Platform/IPC/unix/AttachmentUnix.cpp:
1543 (IPC::Attachment::~Attachment): Close the file descriptor if it
1544 hasn't been released explicitly.
1545 (IPC::Attachment::dispose): Deleted.
1546 * Platform/IPC/unix/ConnectionUnix.cpp:
1547 (IPC::Connection::processMessage): Do not use AttachmentResourceGuard.
1548 (IPC::Connection::sendOutgoingMessage): Ditto.
1549 (IPC::AttachmentResourceGuard::AttachmentResourceGuard): Deleted.
1550 (IPC::AttachmentResourceGuard::~AttachmentResourceGuard): Deleted.
1551 * Platform/unix/SharedMemoryUnix.cpp:
1552 (WebKit::SharedMemory::Handle::~Handle): Do not call clear().
1553 (WebKit::SharedMemory::Handle::clear): Reset the attachment.
1554 * UIProcess/WebInspectorProxy.cpp:
1555 (WebKit::WebInspectorProxy::createInspectorPage): Use WTF::move().
1556 * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1557 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1558 Call releaseFileDescriptor() instead of fileDescritpro() since the
1559 ownership is passed to the connection.
1561 2015-04-23 Alexey Proskuryakov <ap@apple.com>
1565 * WebProcess/cocoa/WebProcessCocoa.mm: Correct the case of an include file name.
1567 2015-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
1569 Unreviewed. Fix debug build after r183176.
1571 * Platform/unix/SharedMemoryUnix.cpp:
1572 (WebKit::SharedMemory::Handle::decode):
1573 (WebKit::SharedMemory::createHandle):
1575 2015-04-23 Andreas Kling <akling@apple.com>
1577 There should only be one way to get the system memory size.
1578 <https://webkit.org/b/144081>
1580 Reviewed by Antti Koivisto.
1582 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1583 (WebKit::NetworkProcess::platformSetCacheModel):
1584 (WebKit::memorySize): Deleted.
1585 * WebProcess/cocoa/WebProcessCocoa.mm:
1586 (WebKit::WebProcess::platformSetCacheModel):
1587 (WebKit::memorySize): Deleted.
1589 2015-04-23 Chris Dumez <cdumez@apple.com>
1591 [WK2] WebDiagnosticLoggingClient is leaking
1592 https://bugs.webkit.org/show_bug.cgi?id=144089
1593 <rdar://problem/19706214>
1595 Reviewed by Darin Adler.
1597 WebDiagnosticLoggingClient is leaking. It is constructed inside WebPage
1598 constructor but there is no code destroying it.
1600 This patch adds a new xxxDestroyed() virtual function to
1601 DiagnosticLoggingClient and that is overriden in
1602 WebDiagnosticLoggingClient to call "delete this". This is the same
1603 pattern as for other WK2 clients (e.g. WebFrameLoaderClient,
1604 WebProgressTrackerClient).
1606 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
1607 (WebKit::WebDiagnosticLoggingClient::mainFrameDestroyed):
1608 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
1610 2015-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
1612 [UNIX] Simplify the file descriptor handling in SharedMemory
1613 https://bugs.webkit.org/show_bug.cgi?id=144046
1615 Reviewed by Darin Adler.
1617 Simplify the file descriptor handling and clarify its ownership by
1618 using IPC::Attachment in SharedMemory::Handle instead of fd and
1619 size members. SharedMemory::Handle::adoptFromAttachment() has been
1620 renamed as SharedMemory::Handle::adoptAttachment() and receives an
1621 IPC::Attachment. And SharedMemory::Handle::releaseToAttachment()
1622 has been renamed as SharedMemory::Handle::releaseAttachment().
1624 * Platform/IPC/Attachment.h: Add move constructor and move assigned operator.
1625 * Platform/IPC/Connection.h:
1626 (IPC::Connection::identifierIsNull): A file descriptor is null
1628 * Platform/IPC/unix/AttachmentUnix.cpp:
1629 (IPC::Attachment::Attachment):
1630 (IPC::Attachment::operator=):
1631 (IPC::Attachment::dispose): Reset the file descriptor after
1633 * Platform/IPC/unix/ConnectionUnix.cpp:
1634 (IPC::Connection::processMessage): Use
1635 SharedMemory::Handle::adoptAttachment() that receives an
1636 IPC::Attachment now.
1637 (IPC::Connection::sendOutgoingMessage): Use
1638 SharedMemory::Handle::releaseAttachment().
1639 * Platform/SharedMemory.h:
1640 * Platform/unix/SharedMemoryUnix.cpp:
1641 (WebKit::SharedMemory::Handle::Handle): Remove initializers for
1642 file descriptor and size members.
1643 (WebKit::SharedMemory::Handle::clear): Dispose the attachment.
1644 (WebKit::SharedMemory::Handle::isNull): Handle is null if the
1645 attachment file descriptor is -1.
1646 (WebKit::SharedMemory::Handle::encode): Use releaseAttachment().
1647 (WebKit::SharedMemory::Handle::decode): Use adoptAttachment().
1648 (WebKit::SharedMemory::Handle::releaseAttachment): Implement it
1650 (WebKit::SharedMemory::Handle::adoptAttachment): Ditto.
1651 (WebKit::SharedMemory::map): Use
1652 IPC::Attachment::releaseFileDescriptor() instead of manually
1653 changing the member.
1654 (WebKit::SharedMemory::createHandle): Initialize the handle
1655 attachment with the duplicated file descriptor and size.
1657 2015-04-22 Darin Adler <darin@apple.com>
1659 Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
1660 https://bugs.webkit.org/show_bug.cgi?id=143943
1662 Reviewed by Anders Carlsson.
1664 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
1665 Removed unneeded include.
1667 2015-04-22 Brent Fulgham <bfulgham@apple.com>
1669 VisibleSelection should only accept Range by reference
1670 https://bugs.webkit.org/show_bug.cgi?id=144047
1672 Reviewed by Tim Horton.
1674 Update all uses of VisibleSelection to pass a Range reference instead
1677 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1678 (WebKit::InjectedBundleRangeHandle::renderedImage):
1679 * WebProcess/WebPage/FindController.cpp:
1680 (WebKit::FindController::getImageForFindMatch):
1681 (WebKit::FindController::selectFindMatch):
1682 * WebProcess/WebPage/WebPage.cpp:
1683 (WebKit::WebPage::insertTextAsync):
1684 (WebKit::WebPage::setCompositionAsync):
1685 * WebProcess/WebPage/mac/WebPageMac.mm:
1686 (WebKit::WebPage::insertDictatedTextAsync):
1688 2015-04-22 Anders Carlsson <andersca@apple.com>
1690 Add WK_ARRAY and WK_SET annotations
1691 https://bugs.webkit.org/show_bug.cgi?id=144075
1692 rdar://problem/19417770
1694 Reviewed by Dan Bernstein.
1696 * Shared/API/Cocoa/WKFoundation.h:
1697 * UIProcess/API/Cocoa/WKBackForwardList.h:
1698 * UIProcess/API/Cocoa/WKUserContentController.h:
1699 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1700 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1701 * mac/postprocess-framework-headers.sh:
1703 2015-04-22 Brent Fulgham <bfulgham@apple.com>
1705 Unreviewed build fix after r183136.
1707 * WebProcess/WebPage/mac/WebPageMac.mm: Correct capitalization of
1708 'HTMLPluginImageElement.h' -> 'HTMLPlugInImageElement.h'
1710 2015-04-21 Brent Fulgham <bfulgham@apple.com>
1712 Extend action menus to support PDF
1713 https://bugs.webkit.org/show_bug.cgi?id=143895
1714 <rdar://problem/19003333>
1716 Reviewed by Tim Horton.
1718 If the mouse pointer is over a PDF, try to provide a relevant action menu for whatever
1719 content is under the mouse. For now, we only support copying text and handling URLs.
1721 If no text is selected, use the dictionary lookup service to find a semantically appropriate
1722 selection underneath the mouse. This is consistent with how normal text is treated in pure HTML
1723 views. If some text is already selected, and the mouse is over the existing selection, continue
1724 using the selected text. Otherwise, discard the old selection and select the most appropriate
1725 region under the mouse pointer.
1727 * Shared/API/c/WKActionMenuTypes.h: Add PDF menu option.
1728 * Shared/WebMouseEvent.cpp: Recognize mouse force events as valid mouse events.
1729 * UIProcess/mac/WKActionMenuController.mm:
1730 (-[WKActionMenuController _defaultMenuItemsForPDF]): Add simply copy text option.
1731 (-[WKActionMenuController _defaultMenuItems]): Recognize PDFs and add relevant action
1733 * WebProcess/Plugins/Netscape/NetscapePlugin.h: Provide stub for new method.
1734 * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Expose 'rectsForSelectionInLayerSpace',
1735 'rectsForAnnotationInLayoutSpace', 'layout', and 'currentPage'.
1736 * WebProcess/Plugins/PDF/PDFPlugin.h:
1737 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1738 (WebKit::PDFPlugin::getSelectionForWordAtPoint): Added.
1739 (WebKit::PDFPlugin::existingSelectionContainsPoint): Added.
1740 (WebKit::PDFPlugin::lookupTextAtLocation): Added.
1741 * WebProcess/Plugins/Plugin.h: Add declaration for new 'getSelectionForWordAtPoint' method.
1742 * WebProcess/Plugins/PluginProxy.h: Provide stub for new method.
1743 * WebProcess/Plugins/PluginView.cpp:
1744 (WebKit::PluginView::getSelectionForWordAtPoint): Added.
1745 (WebKit::PluginView::existingSelectionContainsPoint): Added.
1746 (WebKit::PluginView::lookupTextAtLocation): Added.
1747 * WebProcess/Plugins/PluginView.h:
1748 * WebProcess/WebPage/mac/WebPageMac.mm:
1749 (WebKit::WebPage::performActionMenuHitTestAtLocation): Update to support PDF documents and retrieve
1750 relevant content to support later action menu handling.
1752 2015-04-22 Eric Carlson <eric.carlson@apple.com>
1754 Update AirPlay sandbox rules
1755 https://bugs.webkit.org/show_bug.cgi?id=144062
1756 <rdar://problem/19869448>
1758 Reviewed by Alexey Proskuryakov.
1760 * WebProcess/com.apple.WebProcess.sb.in: Remove obsolete rules.
1762 2015-04-22 Alexey Proskuryakov <ap@apple.com>
1764 [Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
1765 https://bugs.webkit.org/show_bug.cgi?id=144052
1766 rdar://problem/19754404
1768 Reviewed by Darin Adler.
1770 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
1771 (main): Make XPC transaction tracking work again after a re-exec.
1773 2015-04-22 Zan Dobersek <zdobersek@igalia.com>
1775 [WK2] Have API::Array creation methods return Ref<>
1776 https://bugs.webkit.org/show_bug.cgi?id=143933
1778 Reviewed by Darin Adler.
1780 API::Array::create() and API::Array::createStringArray() should return Ref<> objects
1781 as the return values are never null. It's up to the caller to implicitly convert the
1782 returned objects to RefPtr<> if so required. All the call-sites have been updated to
1785 * Shared/API/APIArray.cpp:
1786 (API::Array::create):
1787 (API::Array::createStringArray):
1789 * Shared/API/APIArray.h:
1790 * Shared/API/APIDictionary.cpp:
1791 (API::Dictionary::keys):
1792 * Shared/API/APIDictionary.h:
1793 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1794 (ensureObjectStream):
1795 * Shared/API/c/WKArray.cpp:
1797 (WKArrayCreateAdoptingValues):
1798 * Shared/API/c/WKContextMenuItem.cpp:
1799 (WKContextMenuCopySubmenuItems):
1800 * Shared/API/c/WKDictionary.cpp:
1801 (WKDictionaryCopyKeys):
1802 * Shared/API/c/WKMutableArray.cpp:
1803 (WKMutableArrayCreate):
1804 * Shared/Cocoa/WKNSDictionary.mm:
1805 (-[WKNSDictionary keyEnumerator]):
1806 * Shared/SecurityOriginData.cpp:
1807 (WebKit::performAPICallbackWithSecurityOriginDataVector):
1808 * Shared/WebContextMenuItem.cpp:
1809 (WebKit::WebContextMenuItem::submenuItemsAsAPIArray):
1810 * Shared/WebContextMenuItem.h:
1811 * Shared/WebOpenPanelParameters.cpp:
1812 (WebKit::WebOpenPanelParameters::acceptMIMETypes):
1813 (WebKit::WebOpenPanelParameters::selectedFileNames):
1814 * Shared/WebOpenPanelParameters.h:
1815 * UIProcess/API/C/WKBackForwardListRef.cpp:
1816 (WKBackForwardListCopyBackListWithLimit):
1817 (WKBackForwardListCopyForwardListWithLimit):
1818 * UIProcess/API/C/WKGrammarDetail.cpp:
1819 (WKGrammarDetailCopyGuesses):
1820 * UIProcess/API/C/WKOpenPanelParameters.cpp:
1821 (WKOpenPanelParametersCopyAcceptedMIMETypes):
1822 (WKOpenPanelParametersCopySelectedFileNames):
1823 * UIProcess/API/C/WKPage.cpp:
1824 (WKPageSetPageContextMenuClient):
1825 (WKPageCopyRelatedPages):
1826 * UIProcess/API/Cocoa/WKBackForwardList.mm:
1827 (-[WKBackForwardList backList]):
1828 (-[WKBackForwardList forwardList]):
1829 * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
1831 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1832 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1833 * UIProcess/API/gtk/WebKitBackForwardList.cpp:
1834 (webkit_back_forward_list_get_back_list_with_limit):
1835 (webkit_back_forward_list_get_forward_list_with_limit):
1836 * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
1837 (webkit_file_chooser_request_get_mime_types):
1838 (webkit_file_chooser_request_get_mime_types_filter):
1839 (webkit_file_chooser_request_select_files):
1840 * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
1841 (WebKitNotificationProvider::notificationCloseCallback):
1842 * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
1843 (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
1844 * UIProcess/Notifications/WebNotificationProvider.cpp:
1845 (WebKit::WebNotificationProvider::clearNotifications):
1846 * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1847 (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
1848 * UIProcess/StatisticsRequest.cpp:
1849 (WebKit::StatisticsRequest::completedRequest):
1850 * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1851 (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
1852 * UIProcess/WebBackForwardList.cpp:
1853 (WebKit::WebBackForwardList::backList):
1854 (WebKit::WebBackForwardList::forwardList):
1855 (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit):
1856 (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit):
1857 * UIProcess/WebBackForwardList.h:
1858 * UIProcess/WebCookieManagerProxy.cpp:
1859 (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
1860 * UIProcess/WebDatabaseManagerProxy.cpp:
1861 (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
1862 (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
1863 * UIProcess/WebGrammarDetail.cpp:
1864 (WebKit::WebGrammarDetail::guesses):
1865 * UIProcess/WebGrammarDetail.h:
1866 * UIProcess/WebKeyValueStorageManager.cpp:
1867 (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1868 (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
1869 * UIProcess/WebMediaCacheManagerProxy.cpp:
1870 (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
1871 * UIProcess/WebOriginDataManagerProxy.cpp:
1872 (WebKit::WebOriginDataManagerProxy::didGetOrigins):
1873 * UIProcess/WebPageProxy.cpp:
1874 (WebKit::WebPageProxy::didFindStringMatches):
1875 * UIProcess/WebProcessPool.cpp:
1876 (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins):
1877 * UIProcess/ios/forms/WKFileUploadPanel.mm:
1878 (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
1879 (-[WKFileUploadPanel presentWithParameters:resultListener:]):
1880 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
1881 (-[WKWebProcessPlugInFrame childFrames]):
1882 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
1883 (WKBundleBackForwardListItemCopyChildren):
1884 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1885 (WKBundleFrameCopyChildFrames):
1886 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1887 (WKBundlePageCopyTrackedRepaintRects):
1888 * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
1889 (WebKit::InjectedBundleBackForwardListItem::children):
1890 * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
1891 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
1892 (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
1893 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1894 (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
1895 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1896 (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
1897 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1898 (WebKit::findLargestFrameInFrameSet):
1899 * WebProcess/WebPage/WebFrame.cpp:
1900 (WebKit::WebFrame::childFrames):
1901 * WebProcess/WebPage/WebFrame.h:
1902 * WebProcess/WebPage/WebPage.cpp:
1903 (WebKit::WebPage::trackedRepaintRects):
1904 * WebProcess/WebPage/WebPage.h:
1906 2015-04-21 Eric Carlson <eric.carlson@apple.com>
1908 [Mac] Use one playback target for all web processes
1909 https://bugs.webkit.org/show_bug.cgi?id=144009
1911 Reviewed by Tim Horton.
1913 Every WebPageProxy uses the WebMediaSessionManager singleton to talk to the playback target
1916 * UIProcess/PageClient.h:
1917 * UIProcess/WebPageProxy.cpp:
1918 (WebKit::WebPageProxy::WebPageProxy):
1919 (WebKit::WebPageProxy::resetState):
1920 (WebKit::WebPageProxy::isPlayingMediaDidChange):
1921 (WebKit::WebPageProxy::addPlaybackTargetPickerClient):
1922 (WebKit::WebPageProxy::removePlaybackTargetPickerClient):
1923 (WebKit::WebPageProxy::showPlaybackTargetPicker):
1924 (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
1925 (WebKit::WebPageProxy::setPlaybackTarget):
1926 (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
1927 (WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
1928 (WebKit::WebPageProxy::devicePickerProxy): Deleted.
1929 (WebKit::WebPageProxy::startingMonitoringPlaybackTargets): Deleted.
1930 (WebKit::WebPageProxy::stopMonitoringPlaybackTargets): Deleted.
1931 (WebKit::WebPageProxy::didChoosePlaybackTarget): Deleted.
1932 * UIProcess/WebPageProxy.h:
1933 (WebKit::WebPageProxy::isPlayingAudio):
1934 * UIProcess/WebPageProxy.messages.in:
1935 * UIProcess/mac/PageClientImpl.h:
1936 * UIProcess/mac/PageClientImpl.mm:
1937 (WebKit::PageClientImpl::mediaSessionManager):
1938 (WebKit::PageClientImpl::createPlaybackTargetPicker): Deleted.
1939 * UIProcess/mac/WebMediaSessionManagerMac.cpp: Added.
1940 (WebKit::WebMediaSessionManagerMac::singleton):
1941 (WebKit::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
1942 (WebKit::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
1943 (WebKit::WebMediaSessionManagerMac::targetPicker):
1944 * UIProcess/mac/WebMediaSessionManagerMac.h: Added.
1945 * WebProcess/Plugins/PluginView.h:
1946 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1947 (WebKit::WebChromeClient::isPlayingMediaDidChange):
1948 (WebKit::WebChromeClient::addPlaybackTargetPickerClient):
1949 (WebKit::WebChromeClient::removePlaybackTargetPickerClient):
1950 (WebKit::WebChromeClient::showPlaybackTargetPicker):
1951 (WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
1952 (WebKit::WebChromeClient::startingMonitoringPlaybackTargets): Deleted.
1953 (WebKit::WebChromeClient::stopMonitoringPlaybackTargets): Deleted.
1954 * WebProcess/WebCoreSupport/WebChromeClient.h:
1955 * WebProcess/WebPage/WebPage.h:
1956 * WebProcess/WebPage/WebPage.messages.in:
1957 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1958 (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
1959 * WebProcess/WebPage/mac/WebPageMac.mm:
1960 (WebKit::WebPage::playbackTargetSelected):
1961 (WebKit::WebPage::playbackTargetAvailabilityDidChange):
1962 (WebKit::WebPage::setShouldPlayToPlaybackTarget):
1964 2015-04-21 Anders Carlsson <andersca@apple.com>
1966 WKWebsiteDataStore doesn't track and remove IndexedDB databases
1967 https://bugs.webkit.org/show_bug.cgi?id=144032
1968 rdar://problem/20242856
1970 Reviewed by Tim Horton.
1972 * DatabaseProcess/DatabaseProcess.cpp:
1973 (WebKit::DatabaseProcess::fetchWebsiteData):
1974 (WebKit::DatabaseProcess::deleteWebsiteData):
1975 (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
1976 * DatabaseProcess/DatabaseProcess.h:
1977 * DatabaseProcess/DatabaseProcess.messages.in:
1978 * Shared/WebsiteData/WebsiteDataTypes.h:
1979 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1980 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
1981 (dataTypesToString):
1982 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
1983 (WebKit::toWebsiteDataTypes):
1984 (WebKit::toWKWebsiteDataTypes):
1985 * UIProcess/Databases/DatabaseProcessProxy.cpp:
1986 (WebKit::generateCallbackID):
1987 (WebKit::DatabaseProcessProxy::~DatabaseProcessProxy):
1988 (WebKit::DatabaseProcessProxy::fetchWebsiteData):
1989 (WebKit::DatabaseProcessProxy::deleteWebsiteData):
1990 (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
1991 (WebKit::DatabaseProcessProxy::didClose):
1992 (WebKit::DatabaseProcessProxy::didFetchWebsiteData):
1993 (WebKit::DatabaseProcessProxy::didDeleteWebsiteData):
1994 (WebKit::DatabaseProcessProxy::didDeleteWebsiteDataForOrigins):
1995 * UIProcess/Databases/DatabaseProcessProxy.h:
1996 * UIProcess/Databases/DatabaseProcessProxy.messages.in:
1997 * UIProcess/WebProcessPool.h:
1998 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1999 (WebKit::WebsiteDataStore::fetchData):
2000 (WebKit::WebsiteDataStore::removeData):
2002 2015-04-21 Anders Carlsson <andersca@apple.com>
2004 Add module maps for WebKit
2005 https://bugs.webkit.org/show_bug.cgi?id=144026
2006 rdar://problem/19665428
2008 Reviewed by Dan Bernstein.
2010 * Configurations/WebKit.xcconfig:
2011 * Modules/OSX.modulemap: Added.
2012 * Modules/iOS.modulemap: Added.
2014 2015-04-21 Tim Horton <timothy_horton@apple.com>
2016 Long pause under _takeViewSnapshot when screen updates are disabled
2017 https://bugs.webkit.org/show_bug.cgi?id=144017
2018 <rdar://problem/20548397>
2020 Reviewed by Simon Fraser.
2022 * UIProcess/API/mac/WKView.mm:
2023 (-[WKView _takeViewSnapshot]):
2024 Use CGSHWCaptureWindowList, for snapshotting that doesn't block on
2025 the next commit, and can succeed while screen updates are disabled
2028 2015-04-21 Chris Dumez <cdumez@apple.com>
2030 [WK2][NetworkCache] Better account of resource revalidations in efficacy logging
2031 https://bugs.webkit.org/show_bug.cgi?id=144014
2033 Reviewed by Antti Koivisto.
2035 Better account of resource revalidations in efficacy logging.
2036 Prevously, resources that were in the cache but needed revalidation
2037 were counted as retrieval successes, which is not entirely accurate.
2039 We now distinguish "is in the cache and is directly usable" from
2040 "is in the cache but needs revalidation". We also log how many of these
2041 revalidations are successful.
2043 * NetworkProcess/NetworkResourceLoader.cpp:
2044 (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2045 * NetworkProcess/cache/NetworkCache.cpp:
2046 (WebKit::NetworkCache::Cache::update):
2047 * NetworkProcess/cache/NetworkCache.h:
2048 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2049 (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
2050 (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
2051 * NetworkProcess/cache/NetworkCacheStatistics.h:
2053 2015-04-21 Dan Bernstein <mitz@apple.com>
2055 [Cocoa] Framework header postprocessing should respect additional definitions
2056 https://bugs.webkit.org/show_bug.cgi?id=144018
2058 Reviewed by Anders Carlsson.
2060 * mac/postprocess-framework-headers.sh: Read definitons from
2061 /usr/local/include/WebKitAdditions/Scripts/postprocess-framework-headers-definitions, and
2062 have them take precedence over OSX_VERSION and IOS_VERSION and supply additional options to
2065 2015-04-21 Anders Carlsson <andersca@apple.com>
2067 Fix block signatures
2068 https://bugs.webkit.org/show_bug.cgi?id=144002
2070 Reviewed by Andreas Kling.
2072 * UIProcess/API/Cocoa/WKUIDelegate.h:
2073 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2074 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2075 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2076 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2077 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2078 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2079 (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2080 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2081 * UIProcess/ios/WKPDFView.mm:
2082 (-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]):
2083 * UIProcess/ios/forms/WKFileUploadPanel.mm:
2084 (-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
2085 (-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
2086 (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
2088 2015-04-21 Timothy Horton <timothy_horton@apple.com>
2090 PDFs still don't snapshot properly in iOS Safari
2091 https://bugs.webkit.org/show_bug.cgi?id=143976
2092 <rdar://problem/18283459>
2094 Reviewed by Anders Carlsson.
2096 * UIProcess/WebPageProxy.cpp:
2097 (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
2098 * UIProcess/WebPageProxy.h:
2099 * UIProcess/API/Cocoa/WKWebView.mm:
2100 (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
2101 Inform the client that we've passed all reasonable layout milestones
2102 as soon as the custom content provider has been handed its data.
2103 WKPDFView, the only custom content provider, synchronously lays out
2104 its subviews upon initial receipt of data, so this works fine for it.
2105 This ensures that clients that normally depend on layout milestones firing
2106 won't break when a custom content view is installed.
2108 (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2109 Fall back to renderInContext: if the custom content view is not parented
2110 when a snapshot is requested.
2112 2015-04-21 Dan Bernstein <mitz@apple.com>
2114 Merged WKBackForwardListItem’s Internal category into the class extension in WKBackForwardListItemInternal.h.
2116 Reviewed by Anders Carlsson.
2118 * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
2119 (-[WKBackForwardListItem _item]):
2120 (-[WKBackForwardListItem _apiObject]):
2121 * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
2123 2015-04-21 Chris Dumez <cdumez@apple.com>
2125 Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
2126 https://bugs.webkit.org/show_bug.cgi?id=143970
2128 Reviewed by Darin Adler.
2130 Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
2131 constructor explicit as it copies the vector and it is easy to call it
2134 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2135 (WebKit::WebIDBServerConnection::setIndexKeys):
2136 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2138 2015-04-20 Dan Bernstein <mitz@apple.com>
2140 Expose more bundle form client functions as WKWebProcessPlugInFormDelegatePrivate methods
2141 https://bugs.webkit.org/show_bug.cgi?id=143973
2143 Reviewed by Anders Carlsson.
2145 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared new
2148 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Declared new frame
2150 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
2151 (-[WKWebProcessPlugInNodeHandle frame]): Added. Returns the node’s document’s frame. This is
2152 useful to delegates getting an array of nodes via the new method.
2154 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2155 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added overrides of
2156 shouldNotifyOnFormChanges and didAssociateFormControls, which call the new delegate methods.
2158 2015-04-20 Joseph Pecoraro <pecoraro@apple.com>
2160 Cleanup some StringBuilder use
2161 https://bugs.webkit.org/show_bug.cgi?id=143550
2163 Reviewed by Darin Adler.
2165 * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
2166 (WebKit::buildObjectStoreStatement):
2167 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2168 (WebKit::v2RecordsTableSchema):
2169 * Shared/Databases/IndexedDB/IDBUtilities.cpp:
2170 (WebKit::uniqueDatabaseIdentifier):
2171 * UIProcess/API/APIUserScript.cpp:
2172 (API::UserScript::generateUniqueURL):
2173 * UIProcess/WebProcessPool.cpp:
2174 (WebKit::WebProcessPool::didReceiveInvalidMessage):
2175 * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
2176 (WebKit::combinedSecurityOriginIdentifier):
2178 2015-04-20 Anders Carlsson <andersca@apple.com>
2180 Modify the WKWebsiteDataStore API to take a NSSet of types instead of a bitmask
2181 https://bugs.webkit.org/show_bug.cgi?id=143966
2183 Reviewed by Dan Bernstein.
2185 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
2186 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
2187 (dataTypesToString):
2188 (-[WKWebsiteDataRecord dataTypes]):
2189 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
2190 (WebKit::toWebsiteDataTypes):
2191 (WebKit::toWKWebsiteDataTypes):
2192 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2193 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2194 (+[WKWebsiteDataStore allWebsiteDataTypes]):
2195 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2196 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2197 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2198 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
2199 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2200 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2201 (toWKWebsiteDataTypes):
2202 (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2203 (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2204 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2206 2015-04-20 Beth Dakin <bdakin@apple.com>
2208 Should remove mouseForceClick and mouseForceCancelled from DOM force events
2209 https://bugs.webkit.org/show_bug.cgi?id=143904
2211 rdar://problem/20578842
2213 Reviewed by Dan Bernstein.
2215 * WebProcess/WebPage/mac/WebPageMac.mm:
2216 (WebKit::WebPage::immediateActionDidCancel):
2218 2015-04-20 Tim Horton <timothy_horton@apple.com>
2220 Implement immediate action support for tel: and mailto: URLs
2221 https://bugs.webkit.org/show_bug.cgi?id=143916
2222 <rdar://problem/19721711>
2224 Reviewed by Darin Adler.
2226 * Shared/API/c/WKImmediateActionTypes.h:
2227 * UIProcess/mac/WKImmediateActionController.mm:
2228 (-[WKImmediateActionController _defaultAnimationController]):
2229 (-[WKImmediateActionController _animationControllerForDataDetectedText]):
2230 (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
2231 (-[WKImmediateActionController _menuItemForDataDetectedText]): Deleted.
2232 Add _animationControllerForDataDetectedLink and use it when
2233 building immediate actions for tel: and mailto: links.
2235 2015-04-20 Alex Christensen <achristensen@webkit.org>
2237 Properly report errors from _WKUserContentExtensionStore.
2238 https://bugs.webkit.org/show_bug.cgi?id=143808
2240 Reviewed by Darin Adler.
2242 * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
2243 (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
2244 (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
2245 (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
2247 2015-04-18 Simon Fraser <simon.fraser@apple.com>
2249 REGRESSION (r181656): Animated tiled layers are missing content
2250 https://bugs.webkit.org/show_bug.cgi?id=143911
2251 rdar://problem/20596328
2253 Reviewed by Darin Adler.
2255 After r181656, all requestAnimationFrame was falling back to timers, and not
2256 using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
2259 Replace this confusing Optional<> code with simpler code that just forces the
2260 clients to make a DisplayRefreshMonitor if they can, first asking
2261 ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().
2263 Make lots of things into references, and use C++11 initialization in some places.
2265 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2266 (WebKit::WebChromeClient::createDisplayRefreshMonitor):
2267 * WebProcess/WebCoreSupport/WebChromeClient.h:
2269 2015-04-18 Dan Bernstein <mitz@apple.com>
2271 SwipeShadow images are installed on iOS
2272 https://bugs.webkit.org/show_bug.cgi?id=143915
2274 Reviewed by Tim Horton.
2276 * Configurations/WebKit.xcconfig: Added Resources/Mac/* to
2277 EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*]. We could move more resources there and remove
2278 individual patterns.
2279 * Resources/SwipeShadow.png: Moved to mac.
2280 * Resources/SwipeShadow@2x.png: Moved to mac.
2281 * Resources/mac: Added.
2282 * Resources/mac/SwipeShadow.png: Moved from Source/WebKit2/Resources/SwipeShadow.png.
2283 * Resources/mac/SwipeShadow@2x.png: Moved from Source/WebKit2/Resources/SwipeShadow@2x.png.
2284 * WebKit2.xcodeproj/project.pbxproj: Created mac group in the Resources group and moved
2285 SwipeShadow*.png into it. Updated for file moves.
2287 2015-04-18 Chris Dumez <cdumez@apple.com>
2289 Fix NetworkCache Statistics database bootstrapping after r182803
2290 https://bugs.webkit.org/show_bug.cgi?id=143890
2292 Reviewed by Darin Adler.
2294 Update the NetworkCache Statistics database bootstrapping code to use
2295 the records path instead of the version path. Also check that the
2296 filenames in the folder are valid hashes to discard the *-body files.
2298 * NetworkProcess/cache/NetworkCache.cpp:
2299 (WebKit::NetworkCache::Cache::recordsPath):
2300 (WebKit::NetworkCache::Cache::storagePath): Deleted.
2301 * NetworkProcess/cache/NetworkCache.h:
2302 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2303 (WebKit::NetworkCache::Statistics::initialize):
2304 (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
2305 (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
2307 2015-04-17 Tim Horton <timothy_horton@apple.com>
2309 Clients sometimes block for 500ms in waitForPossibleGeometryUpdates
2310 https://bugs.webkit.org/show_bug.cgi?id=143901
2311 <rdar://problem/20488655>
2313 Reviewed by Anders Carlsson.
2315 * Platform/IPC/Connection.cpp:
2316 (IPC::Connection::waitForMessage):
2317 InterruptWaitingIfSyncMessageArrives already cancels waitForMessage if
2318 a sync message arrives while waiting, but it should also avoid waiting
2319 if there's a sync message already in the queue when the waiting starts,
2320 as that will have the same nasty effect.
2322 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2323 (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
2324 If a synchronous message comes in from the Web process while we're waiting,
2325 cancel our synchronous wait for DidUpdateGeometry. This will cause the size
2326 change to not synchronize with the Web process' painting, but that is better
2327 than pointlessly blocking for 500ms.
2329 2015-04-17 Chris Dumez <cdumez@apple.com>
2331 Possible null pointer dereference in WebDiagnosticLoggingClient::logDiagnosticMessageWithValue()
2332 https://bugs.webkit.org/show_bug.cgi?id=143899
2333 <rdar://problem/20584215>
2335 Reviewed by Anders Carlsson.
2337 WebDiagnosticLoggingClient::logDiagnosticMessage*() methods failed to
2338 check that m_page.corePage() was non-null before dereferencing, thus
2339 causing crashes when it is null.
2341 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
2342 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
2343 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
2344 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
2346 2015-04-17 Yongjun Zhang <yongjun_zhang@apple.com>
2348 WebKit client should be able to add view controller for link preview.
2349 https://bugs.webkit.org/show_bug.cgi?id=143686
2351 Add delegate methods to WKUIDelegatePrivate so that a WebKit client can prepare a view controller
2352 for link preview and react to the dismissal of this view controller. Also connect WKContentView to
2353 preview gesture recognizer and forwards the delegate callbacks to corresponding delegate methods
2354 in WKUIDelegatePrivate.
2356 Reviewed by Beth Dakin.
2358 * Platform/spi/ios/UIKitSPI.h:
2359 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2360 * UIProcess/ios/WKContentView.mm:
2361 (-[WKContentView willMoveToWindow:]):
2362 * UIProcess/ios/WKContentViewInteraction.h:
2363 * UIProcess/ios/WKContentViewInteraction.mm:
2364 (-[WKContentView cleanupInteraction]):
2365 (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
2366 (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
2367 (-[WKContentView gestureRecognizerShouldBegin:]):
2368 (-[WKContentView previewViewControllerForPosition:inSourceView:]):
2369 (-[WKContentView commitPreviewViewController:]):
2370 (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
2371 (-[WKContentView didDismissPreviewViewController:committing:]):
2373 2015-04-17 Beth Dakin <bdakin@apple.com>
2375 Force mouse events should go through normal mouse event handling code paths
2376 https://bugs.webkit.org/show_bug.cgi?id=143749
2378 rdar://problem/20472895
2380 Reviewed by Dean Jackson.
2382 This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the
2383 NSEventTypePressures that is gets and sends those down to the web process.
2385 Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an
2386 NSEventTypePressure, the new name makes it clear how the second parameter differs
2388 * Shared/NativeWebMouseEvent.h:
2390 New event types for the new types of events.
2391 * Shared/WebEvent.h:
2392 * Shared/WebEventConversion.cpp:
2393 (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2394 * Shared/mac/NativeWebMouseEventMac.mm:
2395 (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2396 * Shared/mac/WebEventFactory.h:
2398 All of the square-peg, round-hole problems of massaging the NSEventTypePressures
2399 events into WebMouseEvents is taken care of here.
2400 * Shared/mac/WebEventFactory.mm:
2401 (WebKit::mouseButtonForEvent):
2402 (WebKit::globalPointForEvent):
2403 (WebKit::pointForEvent):
2404 (WebKit::WebEventFactory::createWebMouseEvent):
2406 Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent
2408 * UIProcess/API/mac/WKView.mm:
2409 (-[WKView pressureChangeWithEvent:]):
2411 Handle the new types.
2412 * UIProcess/WebPageProxy.cpp:
2413 (WebKit::WebPageProxy::didReceiveEvent):
2415 Can delete inputDeviceForceDidChange since it’s no longer used.
2416 (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
2417 * UIProcess/WebPageProxy.h:
2419 Handle the new types of mouse events properly.
2420 * WebProcess/WebPage/WebPage.cpp:
2421 (WebKit::handleMouseEvent):
2423 Delete inputDeviceForceDidChange() and m_lastForceStage.
2424 * WebProcess/WebPage/WebPage.h:
2425 * WebProcess/WebPage/WebPage.messages.in:
2426 * WebProcess/WebPage/mac/WebPageMac.mm:
2427 (WebKit::WebPage::inputDeviceForceDidChange): Deleted.
2429 Handle new WebEvent types.
2430 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2432 2015-04-17 Commit Queue <commit-queue@webkit.org>
2434 Unreviewed, rolling out r182912 and r182920.
2435 https://bugs.webkit.org/show_bug.cgi?id=143881
2437 Build breakage in some configurations (Requested by ap on
2440 Reverted changesets:
2442 "Force mouse events should go through normal mouse event
2443 handling code paths"
2444 https://bugs.webkit.org/show_bug.cgi?id=143749
2445 http://trac.webkit.org/changeset/182912
2447 http://trac.webkit.org/changeset/182920
2449 2015-04-17 Antti Koivisto <antti@apple.com>
2451 Network Cache: Read resource record and body in parallel
2452 https://bugs.webkit.org/show_bug.cgi?id=143879
2454 Reviewed by Chris Dumez.
2456 We currently first fetch the record file and then fetch the body blob if needed.
2457 We can do both operations in parallel to reduce latency.
2459 * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
2460 (WebKit::NetworkCache::traverseCacheFiles):
2462 Do all validation in the client.
2464 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2465 (WebKit::NetworkCache::Storage::synchronize):
2467 Maintain a bloom filter that contains the body blobs to avoid unnecessary IO attempts.
2468 Delete any unknown file in cache directory.
2470 (WebKit::NetworkCache::Storage::addToRecordFilter):
2472 More informative name for record filter.
2474 (WebKit::NetworkCache::Storage::mayContain):
2475 (WebKit::NetworkCache::Storage::readRecord):
2476 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
2477 (WebKit::NetworkCache::Storage::dispatchReadOperation):
2479 Start record read IO and body blob read IO in parallel.
2481 (WebKit::NetworkCache::Storage::finishReadOperation):
2483 The read is finished when we have both the record and the blob.
2485 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2486 (WebKit::NetworkCache::Storage::retrieve):
2487 (WebKit::NetworkCache::Storage::store):
2488 (WebKit::NetworkCache::Storage::traverse):
2489 (WebKit::NetworkCache::Storage::clear):
2490 (WebKit::NetworkCache::Storage::shrink):
2491 (WebKit::NetworkCache::Storage::addToContentsFilter): Deleted.
2492 (WebKit::NetworkCache::Storage::decodeRecord): Deleted.
2493 * NetworkProcess/cache/NetworkCacheStorage.h:
2494 (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
2496 ReadOperation is now mutable and gathers the read result.
2498 2015-04-16 Anders Carlsson <andersca@apple.com>
2500 Stop installing WebKit2.framework
2501 https://bugs.webkit.org/show_bug.cgi?id=143860
2502 rdar://problem/18298491
2504 Reviewed by Dan Bernstein.
2506 * Configurations/WebKit2.xcconfig:
2507 Set SKIP_INSTALL=YES for all SDKs except 10.9 where we still need it.
2509 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
2511 Unreviewed. Fix the build with ENABLE(NETWORK_CACHE) and !ENABLE(SHAREABLE_RESOURCE).
2513 * NetworkProcess/cache/NetworkCacheEntry.cpp:
2514 * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
2515 (WebKit::NetworkCache::fileTimes): There's no st_birthtime in Linux.
2517 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
2519 [SOUP] ResourceRequest cache policy is not encoded/decoded in IPC messages
2520 https://bugs.webkit.org/show_bug.cgi?id=143867
2522 Reviewed by Sergio Villar Senin.
2524 Encode/Decode the ResourceRequest cache policy.
2526 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
2527 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
2528 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
2530 2015-04-16 Sungmann Cho <sungmann.cho@navercorp.com>
2532 Use UNUSED_PARAM instead of the void casting to suppress unused parameter warnings.
2533 https://bugs.webkit.org/show_bug.cgi?id=143750
2535 Reviewed by Darin Adler.
2537 No new tests, no behavior change.
2539 * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
2540 (WebKit::NotificationPermissionRequestManager::NotificationPermissionRequestManager):
2542 2015-04-16 Brady Eidson <beidson@apple.com>
2544 Compiling a content extension fails when user's home directory is on a different volume from /var/tmp.
2545 https://bugs.webkit.org/show_bug.cgi?id=143834
2547 Reviewed by Anders Carlsson.
2549 * UIProcess/API/APIUserContentExtensionStore.cpp:
2550 (API::compiledToFile): Use moveFile() instead of renameFile()
2552 2015-04-16 Anders Carlsson <andersca@apple.com>
2554 Deprecate _WKWebsiteDataStore in favor of WKWebsiteDataStore
2555 https://bugs.webkit.org/show_bug.cgi?id=143844
2557 Reviewed by Dan Bernstein.
2559 * Shared/API/Cocoa/WKFoundation.h:
2560 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2561 (-[WKWebViewConfiguration _validate]):
2562 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2563 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
2564 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2565 * mac/postprocess-framework-headers.sh:
2567 2015-04-16 Alex Christensen <achristensen@webkit.org>
2569 Removed unused WKUserContentFilterRef.
2570 https://bugs.webkit.org/show_bug.cgi?id=143852
2572 Reviewed by Sam Weinig.
2574 * Shared/WebCompiledContentExtension.cpp:
2575 (WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient): Deleted.
2576 (WebKit::LegacyContentExtensionCompilationClient::writeBytecode): Deleted.
2577 (WebKit::LegacyContentExtensionCompilationClient::writeActions): Deleted.
2578 (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData): Deleted.
2579 * Shared/WebCompiledContentExtension.h:
2580 * UIProcess/API/C/WKUserContentFilterRef.cpp: Removed.
2581 * UIProcess/API/C/WKUserContentFilterRef.h: Removed.
2582 * UIProcess/API/C/WebKit2_C.h:
2583 * UIProcess/API/Cocoa/_WKUserContentFilter.h:
2584 * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
2585 (-[_WKUserContentFilter initWithName:serializedRules:]): Deleted.
2586 * WebKit2.xcodeproj/project.pbxproj:
2588 2015-04-16 Beth Dakin <bdakin@apple.com>
2590 Rubber-stamped by Tim Horton.
2592 Fixing a small mistake in http://trac.webkit.org/changeset/182912 which should
2593 make sure to use the most up-to-date pressure information when setting the force
2596 * Shared/mac/WebEventFactory.mm:
2597 (WebKit::WebEventFactory::createWebMouseEvent):
2599 2015-04-13 Jer Noble <jer.noble@apple.com>
2601 [iOS] When simultaneously exiting-and-entering fullscreen, WebVideoFullscreenManager/Proxy becomes confused about what video element it represents.
2602 https://bugs.webkit.org/show_bug.cgi?id=143680
2604 Reviewed by Simon Fraser.
2606 The original assumption of WebVideoFullscreenManager and -Proxy was that the two classes would represent a
2607 single video element and its full screen state. With multiple animations in and out of fullscreen combined with
2608 multiple fullscreen modes, this assumption no longer holds true.
2610 Rather than having a WebVideoFullscreenManager which /isa/ WebVideoFullscreenModelVideoElement, the manager now
2611 /hasa/ WebVideoFullscreenModelVideoElement (or has many such models). Ditto for WebVideoFullscreenManager and
2612 WebVideoFullscreenInterfaceAVKit. The WebVideoFullscreenInterfaceAVKit still needs a WebVideoFullscreenModel to
2613 communicate with, so a new wrapper class is used for that purpose, WebVideoFullscreenModelContext. Ditto for
2614 WebVideoFullscreenModelVideoElement and the new class WebVideoFullscreenInterfaceContext. These context classes
2615 are paired and share a contextId, allowing the manager and its proxy to route messages between the UIProcess's
2616 WebVideoFullscreenInterfaceAVKit to-and-from the WebProcess's WebVideoFullscreenModelVideoElement.
2618 Both the WebVideoFullscreenModelContext and the WebVideoFullscreenInterfaceContext take a back-pointer to their
2619 manager or manager proxy, and each method on the context simply calls the matching method on the manager and
2620 passes its contextId as a parameter.
2622 Both the WebVideoFullscreenManager and the WebVideoFullscreenManagerProxy pass that contextId in each of their
2623 cross-process messages.
2625 On the other side, the manager and proxy also have a map between contextIds and their matching
2626 WebVideoFullscreenModelVideoElement (in the case of WebVideoFullscreenManager) or
2627 WebVideoFullscreenInterfaceAVKit (in the case of WebVideoFullscreenManagerProxy).
2629 While this change is large by LoC, it is almost entirely boilerplate. The new and interesting pieces are these:
2631 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2632 (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy): No longer a WebVideoFullscreenInterfaceAVKit.
2633 (WebKit::WebVideoFullscreenManagerProxy::invalidate): Walk through the models and interfaces, invalidating each.
2634 (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface): Added. Return a new model and interface tuple.
2635 (WebKit::WebVideoFullscreenManagerProxy::ensureModelAndInterface): Added. Lazily create, and add to the m_contextMap
2636 a new model and interface object.
2637 (WebKit::WebVideoFullscreenManagerProxy::ensureModel): Return the model half of ensureModelAndInterface().
2638 (WebKit::WebVideoFullscreenManagerProxy::ensureInterface): Return the interface half of ensureModelAndInterface().
2639 (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen): Walk through the outstanding interface objects, and if
2640 any have a fullscreen mode which matches the about-to-be-fullscreen interface, request that that other interface
2642 * WebProcess/ios/WebVideoFullscreenManager.mm:
2643 (WebKit::nextContextId): Static, incrementing counter used as a contextId source.
2644 (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager): No longer a WebVideoFullscreenModelVideoElement.
2645 (WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager): Walk through the models and interfaces, invalidating each.
2646 (WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Added. Return a new model and interface tuple.
2647 (WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Added. Lazily create, and add to the m_contextMap
2648 a new model and interface object.
2649 (WebKit::WebVideoFullscreenManager::ensureModel): Return the model half of ensureModelAndInterface().
2650 (WebKit::WebVideoFullscreenManager::ensureInterface): Return the interface half of ensureModelAndInterface().
2652 New classes and methods which just forward on to their owning objects:
2654 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2655 (WebKit::WebVideoFullscreenModelContext::create):
2656 (WebKit::WebVideoFullscreenModelContext::~WebVideoFullscreenModelContext):
2657 (WebKit::WebVideoFullscreenModelContext::invalidate):
2658 (WebKit::WebVideoFullscreenModelContext::layerHost):
2659 (WebKit::WebVideoFullscreenModelContext::setLayerHost):
2660 (WebKit::WebVideoFullscreenModelContext::setInitialVideoLayerFrame):
2661 (WebKit::WebVideoFullscreenModelContext::WebVideoFullscreenModelContext):
2662 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2663 (WebKit::WebVideoFullscreenModelContext::play):
2664 (WebKit::WebVideoFullscreenModelContext::pause):
2665 (WebKit::WebVideoFullscreenModelContext::togglePlayState):
2666 (WebKit::WebVideoFullscreenModelContext::beginScrubbing):
2667 (WebKit::WebVideoFullscreenModelContext::endScrubbing):
2668 (WebKit::WebVideoFullscreenModelContext::seekToTime):
2669 (WebKit::WebVideoFullscreenModelContext::fastSeek):
2670 (WebKit::WebVideoFullscreenModelContext::beginScanningForward):
2671 (WebKit::WebVideoFullscreenModelContext::beginScanningBackward):
2672 (WebKit::WebVideoFullscreenModelContext::endScanning):
2673 (WebKit::WebVideoFullscreenModelContext::requestExitFullscreen):
2674 (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame):
2675 (WebKit::WebVideoFullscreenModelContext::videoLayerFrame):
2676 (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity):
2677 (WebKit::WebVideoFullscreenModelContext::videoLayerGravity):
2678 (WebKit::WebVideoFullscreenModelContext::selectAudioMediaOption):
2679 (WebKit::WebVideoFullscreenModelContext::selectLegibleMediaOption):
2680 (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged):
2681 (WebKit::WebVideoFullscreenModelContext::didSetupFullscreen):
2682 (WebKit::WebVideoFullscreenModelContext::didEnterFullscreen):
2683 (WebKit::WebVideoFullscreenModelContext::didExitFullscreen):
2684 (WebKit::WebVideoFullscreenModelContext::didCleanupFullscreen):
2685 (WebKit::WebVideoFullscreenModelContext::fullscreenMayReturnToInline):
2686 * WebProcess/ios/WebVideoFullscreenManager.h:
2687 (WebKit::WebVideoFullscreenInterfaceContext::create):
2688 (WebKit::WebVideoFullscreenInterfaceContext::invalidate):
2689 (WebKit::WebVideoFullscreenInterfaceContext::layerHostingContext):
2690 (WebKit::WebVideoFullscreenInterfaceContext::isAnimating):
2691 (WebKit::WebVideoFullscreenInterfaceContext::setIsAnimating):
2692 (WebKit::WebVideoFullscreenInterfaceContext::targetIsFullscreen):
2693 (WebKit::WebVideoFullscreenInterfaceContext::setTargetIsFullscreen):
2694 (WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode):
2695 (WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode):
2696 (WebKit::WebVideoFullscreenInterfaceContext::isFullscreen):
2697 (WebKit::WebVideoFullscreenInterfaceContext::setIsFullscreen):
2698 * WebProcess/ios/WebVideoFullscreenManager.mm:
2699 (WebKit::WebVideoFullscreenInterfaceContext::WebVideoFullscreenInterfaceContext):
2700 (WebKit::WebVideoFullscreenInterfaceContext::~WebVideoFullscreenInterfaceContext):
2701 (WebKit::WebVideoFullscreenInterfaceContext::setLayerHostingContext):
2702 (WebKit::WebVideoFullscreenInterfaceContext::resetMediaState):
2703 (WebKit::WebVideoFullscreenInterfaceContext::setDuration):
2704 (WebKit::WebVideoFullscreenInterfaceContext::setCurrentTime):
2705 (WebKit::WebVideoFullscreenInterfaceContext::setBufferedTime):
2706 (WebKit::WebVideoFullscreenInterfaceContext::setRate):
2707 (WebKit::WebVideoFullscreenInterfaceContext::setVideoDimensions):
2708 (WebKit::WebVideoFullscreenInterfaceContext::setSeekableRanges):
2709 (WebKit::WebVideoFullscreenInterfaceContext::setCanPlayFastReverse):
2710 (WebKit::WebVideoFullscreenInterfaceContext::setAudioMediaSelectionOptions):
2711 (WebKit::WebVideoFullscreenInterfaceContext::setLegibleMediaSelectionOptions):
2712 (WebKit::WebVideoFullscreenInterfaceContext::setExternalPlayback):
2714 Cross-process methods which now take a contextId parameter:
2716 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2717 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2718 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
2719 (WebKit::WebVideoFullscreenManagerProxy::resetMediaState):
2720 (WebKit::WebVideoFullscreenManagerProxy::setCurrentTime):
2721 (WebKit::WebVideoFullscreenManagerProxy::setBufferedTime):
2722 (WebKit::WebVideoFullscreenManagerProxy::setVideoDimensions):
2723 (WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
2724 (WebKit::WebVideoFullscreenManagerProxy::setCanPlayFastReverse):
2725 (WebKit::WebVideoFullscreenManagerProxy::setAudioMediaSelectionOptions):
2726 (WebKit::WebVideoFullscreenManagerProxy::setLegibleMediaSelectionOptions):
2727 (WebKit::WebVideoFullscreenManagerProxy::setExternalPlaybackProperties):
2728 (WebKit::WebVideoFullscreenManagerProxy::setDuration):
2729 (WebKit::WebVideoFullscreenManagerProxy::setRate):
2730 (WebKit::WebVideoFullscreenManagerProxy::exitFullscreen):
2731 (WebKit::WebVideoFullscreenManagerProxy::cleanupFullscreen):
2732 (WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline):
2733 (WebKit::WebVideoFullscreenManagerProxy::play):
2734 (WebKit::WebVideoFullscreenManagerProxy::pause):
2735 (WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
2736 (WebKit::WebVideoFullscreenManagerProxy::beginScrubbing):
2737 (WebKit::WebVideoFullscreenManagerProxy::endScrubbing):
2738 (WebKit::WebVideoFullscreenManagerProxy::seekToTime):
2739 (WebKit::WebVideoFullscreenManagerProxy::fastSeek):
2740 (WebKit::WebVideoFullscreenManagerProxy::beginScanningForward):
2741 (WebKit::WebVideoFullscreenManagerProxy::beginScanningBackward):
2742 (WebKit::WebVideoFullscreenManagerProxy::endScanning):
2743 (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
2744 (WebKit::WebVideoFullscreenManagerProxy::didSetupFullscreen):
2745 (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
2746 (WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
2747 (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen):
2748 (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
2749 (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
2750 (WebKit::WebVideoFullscreenManagerProxy::selectAudioMediaOption):
2751 (WebKit::WebVideoFullscreenManagerProxy::selectLegibleMediaOption):
2752 (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged):
2753 (WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
2754 (WebKit::WebVideoFullscreenManagerProxy::videoLayerFrame): Deleted.
2755 (WebKit::WebVideoFullscreenManagerProxy::videoLayerGravity): Deleted.
2756 * WebProcess/ios/WebVideoFullscreenManager.messages.in:
2757 * WebProcess/ios/WebVideoFullscreenManager.mm:
2758 (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
2759 (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
2760 (WebKit::WebVideoFullscreenManager::resetMediaState):
2761 (WebKit::WebVideoFullscreenManager::setDuration):
2762 (WebKit::WebVideoFullscreenManager::setCurrentTime):
2763 (WebKit::WebVideoFullscreenManager::setBufferedTime):
2764 (WebKit::WebVideoFullscreenManager::setRate):
2765 (WebKit::WebVideoFullscreenManager::setVideoDimensions):
2766 (WebKit::WebVideoFullscreenManager::setSeekableRanges):
2767 (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse):
2768 (WebKit::WebVideoFullscreenManager::setAudioMediaSelectionOptions):
2769 (WebKit::WebVideoFullscreenManager::setLegibleMediaSelectionOptions):
2770 (WebKit::WebVideoFullscreenManager::setExternalPlayback):
2771 (WebKit::WebVideoFullscreenManager::play):
2772 (WebKit::WebVideoFullscreenManager::pause):
2773 (WebKit::WebVideoFullscreenManager::togglePlayState):
2774 (WebKit::WebVideoFullscreenManager::beginScrubbing):
2775 (WebKit::WebVideoFullscreenManager::endScrubbing):
2776 (WebKit::WebVideoFullscreenManager::seekToTime):
2777 (WebKit::WebVideoFullscreenManager::fastSeek):
2778 (WebKit::WebVideoFullscreenManager::beginScanningForward):
2779 (WebKit::WebVideoFullscreenManager::beginScanningBackward):
2780 (WebKit::WebVideoFullscreenManager::endScanning):
2781 (WebKit::WebVideoFullscreenManager::requestExitFullscreen):
2782 (WebKit::WebVideoFullscreenManager::selectAudioMediaOption):
2783 (WebKit::WebVideoFullscreenManager::selectLegibleMediaOption):
2784 (WebKit::WebVideoFullscreenManager::fullscreenModeChanged):
2785 (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
2786 (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
2787 (WebKit::WebVideoFullscreenManager::didExitFullscreen):
2788 (WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
2789 (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
2790 (WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
2791 (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
2792 (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
2794 2015-04-16 Beth Dakin <bdakin@apple.com>
2796 Force mouse events should go through normal mouse event handling code paths
2797 https://bugs.webkit.org/show_bug.cgi?id=143749
2799 rdar://problem/20472895
2801 Reviewed by Dean Jackson.
2803 This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the
2804 NSEventTypePressures that is gets and sends those down to the web process.
2806 Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an
2807 NSEventTypePressure, the new name makes it clear how the second parameter differs
2809 * Shared/NativeWebMouseEvent.h:
2811 New event types for the new types of events.
2812 * Shared/WebEvent.h:
2813 * Shared/WebEventConversion.cpp:
2814 (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2815 * Shared/mac/NativeWebMouseEventMac.mm:
2816 (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2817 * Shared/mac/WebEventFactory.h:
2819 All of the square-peg, round-hole problems of massaging the NSEventTypePressures
2820 events into WebMouseEvents is taken care of here.
2821 * Shared/mac/WebEventFactory.mm:
2822 (WebKit::mouseButtonForEvent):
2823 (WebKit::globalPointForEvent):
2824 (WebKit::pointForEvent):
2825 (WebKit::WebEventFactory::createWebMouseEvent):
2827 Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent
2829 * UIProcess/API/mac/WKView.mm:
2830 (-[WKView pressureChangeWithEvent:]):
2832 Handle the new types.
2833 * UIProcess/WebPageProxy.cpp:
2834 (WebKit::WebPageProxy::didReceiveEvent):
2836 Can delete inputDeviceForceDidChange since it’s no longer used.
2837 (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
2838 * UIProcess/WebPageProxy.h:
2840 Handle the new types of mouse events properly.
2841 * WebProcess/WebPage/WebPage.cpp:
2842 (WebKit::handleMouseEvent):
2844 Delete inputDeviceForceDidChange() and m_lastForceStage.
2845 * WebProcess/WebPage/WebPage.h:
2846 * WebProcess/WebPage/WebPage.messages.in:
2847 * WebProcess/WebPage/mac/WebPageMac.mm:
2848 (WebKit::WebPage::inputDeviceForceDidChange): Deleted.
2850 Handle new WebEvent types.
2851 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2853 2015-04-16 Dan Bernstein <mitz@apple.com>
2855 <rdar://problem/20575744> Also include a definition of __NSd_{current deployment target} in WKFoundation.h.
2857 Reviewed by Tim Horton.
2859 * WebKit2.xcodeproj/project.pbxproj:
2861 2015-04-16 Timothy Horton <timothy_horton@apple.com>
2863 Provide a mechanism through the legacy SPI to know when swipe gestures begin and end
2864 https://bugs.webkit.org/show_bug.cgi?id=143740
2865 <rdar://problem/20468540>
2867 Reviewed by Dan Bernstein.
2869 In the C SPI, add three WKPageLoaderClient callbacks for the three
2870 navigation gesture events (did begin, will end, did end).
2872 * UIProcess/API/C/WKPageLoaderClient.h:
2875 * UIProcess/API/APILoaderClient.h:
2876 (API::LoaderClient::navigationGestureDidBegin):
2877 (API::LoaderClient::navigationGestureWillEnd):
2878 (API::LoaderClient::navigationGestureDidEnd):
2879 * UIProcess/WebPageProxy.cpp:
2880 (WebKit::WebPageProxy::navigationGestureDidBegin):
2881 (WebKit::WebPageProxy::navigationGestureWillEnd):
2882 (WebKit::WebPageProxy::navigationGestureDidEnd):
2883 Dispatch navigation gesture events to the loader client as well as
2884 (after a bounce through the PageClient) the navigation delegate.
2886 * UIProcess/API/C/WKPage.cpp:
2887 (WKPageSetPageLoaderClient):
2890 * UIProcess/mac/ViewGestureController.h:
2891 * UIProcess/mac/ViewGestureControllerMac.mm:
2892 (WebKit::ViewGestureController::trackSwipeGesture):
2893 (WebKit::ViewGestureController::willEndSwipeGesture):
2894 While we were already informing WebPageProxy of 'did begin' and 'did end'
2895 navigation gesture events, we were missing 'will end'. Add it.
2897 2015-04-16 Tim Horton <timothy_horton@apple.com>
2899 Dispatching multiple asynchronous animated resizes in parallel causes page scale to detach from reality
2900 https://bugs.webkit.org/show_bug.cgi?id=143812
2901 <rdar://problem/19866038>
2903 Reviewed by Simon Fraser.
2905 * Shared/VisibleContentRectUpdateInfo.h:
2906 (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
2907 No cats in transaction (more of these below, too).
2909 * UIProcess/WebPageProxy.h:
2910 * UIProcess/WebPageProxy.messages.in:
2911 * UIProcess/ios/WebPageProxyIOS.mm:
2912 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2913 (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
2914 * WebProcess/WebPage/WebPage.h:
2915 * WebProcess/WebPage/WebPage.messages.in:
2916 * WebProcess/WebPage/ios/WebPageIOS.mm:
2917 (WebKit::WebPage::handleTap):
2918 (WebKit::WebPage::commitPotentialTap):
2919 (WebKit::WebPage::dynamicViewportSizeUpdate):
2920 Add an incrementing ID to dynamicViewportSizeUpdates. The UI process keeps
2921 the current ID, and it is bounced through the Web process (dynamicViewportSizeUpdates)
2922 back to the UI process (dynamicViewportUpdateChangedTarget). If we have
2923 dispatched another dynamicViewportSizeUpdate in the interim, ignore
2924 the intermediate target.
2926 2015-04-16 Sungmann Cho <sungmann.cho@navercorp.com>
2928 Remove PluginController::isPluginVisible().
2929 https://bugs.webkit.org/show_bug.cgi?id=143830
2931 Reviewed by Darin Adler.
2933 PluginController::isPluginVisible() was introduced by http://webkit.org/b/60285.
2934 This method had been used only for WebKit2 on Windows, and no one uses it now.
2935 So we can remove it.
2937 No new tests, no behavior change.
2939 * PluginProcess/PluginControllerProxy.cpp:
2940 (WebKit::PluginControllerProxy::isPluginVisible): Deleted.
2941 * PluginProcess/PluginControllerProxy.h:
2942 * WebProcess/Plugins/PluginController.h:
2943 * WebProcess/Plugins/PluginView.cpp:
2944 (WebKit::PluginView::isPluginVisible): Deleted.
2945 * WebProcess/Plugins/PluginView.h:
2947 2015-04-16 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2949 [EFL] Disable a flaky ewk_context_network_process_model() API test
2950 https://bugs.webkit.org/show_bug.cgi?id=143824
2952 Reviewed by Csaba Osztrogonác.
2954 ewk_context_network_process_model has been often failed. Though Bug 142967
2955 was filed to fix this issue, it is not solved yet. To maintain EFL bot, this patch
2956 disables it until fixing it.
2958 * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2961 2015-04-16 Csaba Osztrogonác <ossy@webkit.org>
2963 [WK2] Forwarding headers generator shouldn't generate unnecessary headers
2964 https://bugs.webkit.org/show_bug.cgi?id=143820
2966 Reviewed by Carlos Garcia Campos.
2968 * Scripts/generate-forwarding-headers.pl:
2969 (collectNeededHeaders):
2971 2015-04-16 Csaba Osztrogonác <ossy@webkit.org>
2973 [GTK] Run forwarding headers generator unconditionally
2974 https://bugs.webkit.org/show_bug.cgi?id=143819
2976 Reviewed by Carlos Garcia Campos.
2978 * PlatformGTK.cmake:
2980 2015-04-15 Brent Fulgham <bfulgham@apple.com>
2982 [Mac] Disable "Save to Downloads" option for local files
2983 https://bugs.webkit.org/show_bug.cgi?id=143794
2985 Reviewed by Tim Horton.
2987 Disable the Image and Media download options if the download
2988 target is a local file. We can only download web resources;
2989 anything else is actually a no-op.
2991 * UIProcess/mac/WKActionMenuController.mm:
2992 (-[WKActionMenuController _defaultMenuItemsForVideo]):
2993 (-[WKActionMenuController _defaultMenuItemsForImage]):
2995 2015-04-15 Anders Carlsson <andersca@apple.com>
2997 Make websiteDataStore on WKWebViewConfiguration public
2998 https://bugs.webkit.org/show_bug.cgi?id=143810
3000 Reviewed by Dan Bernstein.
3002 * UIProcess/API/Cocoa/WKWebView.mm:
3003 (-[WKWebView initWithFrame:configuration:]):
3004 * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
3005 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3006 (-[WKWebViewConfiguration copyWithZone:]):
3007 (-[WKWebViewConfiguration websiteDataStore]):
3008 (-[WKWebViewConfiguration setWebsiteDataStore:]):
3009 (-[WKWebViewConfiguration _websiteDataStore]):
3010 (-[WKWebViewConfiguration _setWebsiteDataStore:]):
3012 2015-04-15 Anders Carlsson <andersca@apple.com>
3014 Make WKWebsiteDataStore public
3015 https://bugs.webkit.org/show_bug.cgi?id=143805
3017 Reviewed by Dan Bernstein.
3019 Rename the current _WKWebsiteDataStore to WKWebsiteDataStore. Make init unavailable and tighten up the
3020 types of the defaultDataStore and nonPersistentDataStore class methods.
3022 Add a new _WKWebsiteDataStore @interface and @implementation that derives from WKWebsiteDataStore
3023 and forwards the defaultDataStore and nonPersistentDataStore method calls.
3025 * Shared/API/Cocoa/WebKit.h:
3026 * Shared/Cocoa/APIObject.mm:
3027 (API::Object::newObject):
3028 * UIProcess/API/Cocoa/WKWebView.mm:
3029 (-[WKWebView initWithFrame:configuration:]):
3030 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3031 (-[WKWebViewConfiguration _websiteDataStore]):
3032 * UIProcess/API/Cocoa/WKWebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
3033 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm.
3034 (+[WKWebsiteDataStore defaultDataStore]):
3035 (+[WKWebsiteDataStore nonPersistentDataStore]):
3036 (-[WKWebsiteDataStore dealloc]):
3037 (-[WKWebsiteDataStore isNonPersistent]):
3038 (toSystemClockTime):
3039 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
3040 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
3041 (toWebsiteDataRecords):
3042 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
3043 (-[WKWebsiteDataStore _apiObject]):
3044 * UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h.
3046 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
3047 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3048 (+[_WKWebsiteDataStore defaultDataStore]):
3049 (+[_WKWebsiteDataStore nonPersistentDataStore]):
3050 (-[_WKWebsiteDataStore dealloc]): Deleted.
3051 (-[_WKWebsiteDataStore isNonPersistent]): Deleted.
3052 (toWebsiteDataTypes): Deleted.
3053 (toSystemClockTime): Deleted.
3054 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]): Deleted.
3055 (-[_WKWebsiteDataStore _apiObject]): Deleted.
3056 * WebKit2.xcodeproj/project.pbxproj:
3058 2015-04-15 Timothy Horton <timothy_horton@apple.com>
3060 Custom CSS cursors do not use -webkit-image-set on retina displays
3061 https://bugs.webkit.org/show_bug.cgi?id=120783
3063 Reviewed by Beth Dakin.
3064 Patch by Evan Wallace <evan.exe@gmail.com>.
3066 Serialize the cursor image scale for SetCursor messages so custom
3067 CSS cursors work with -webkit-image-set on retina displays.
3069 * Shared/WebCoreArgumentCoders.cpp:
3070 (CoreIPC::ArgumentCoder<Cursor>::encode):
3071 (CoreIPC::ArgumentCoder<Cursor>::decode):
3073 2015-04-15 Alex Christensen <achristensen@webkit.org>
3075 Progress towards CMake on Mac.
3076 https://bugs.webkit.org/show_bug.cgi?id=143785
3078 Reviewed by Csaba Osztrogonác.
3081 * PlatformEfl.cmake:
3082 * PlatformGTK.cmake:
3084 2015-04-15 Anders Carlsson <andersca@apple.com>
3086 Make WKWebsiteDataRecord public
3087 https://bugs.webkit.org/show_bug.cgi?id=143796
3089 Reviewed by Dan Bernstein.
3091 Rename _WKWebsiteDataRecord and associated files to WKWebsiteDataRecord and
3092 add a new _WKWebsiteDataRecord.h with a class @interface declaration that just
3093 inherits from WKWebsiteDataRecord. We don't need an @implementation since nobody is expected
3094 to allocate _WKWebsiteDataRecord objects.
3096 * Shared/API/Cocoa/WebKit.h:
3097 * Shared/Cocoa/APIObject.mm:
3098 (API::Object::newObject):
3099 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.h.
3100 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm.
3101 (-[WKWebsiteDataRecord dealloc]):
3102 (dataTypesToString):
3103 (-[WKWebsiteDataRecord description]):
3104 (-[WKWebsiteDataRecord displayName]):
3105 (-[WKWebsiteDataRecord dataTypes]):
3106 (-[WKWebsiteDataRecord _apiObject]):
3107 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h.
3109 (WebKit::toWebsiteDataTypes):
3110 (WebKit::toWKWebsiteDataTypes):
3111 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
3112 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3113 (toWebsiteDataRecords):
3114 * WebKit2.xcodeproj/project.pbxproj:
3116 2015-04-13 Jer Noble <jer.noble@apple.com>
3118 [Fullscreen] ChromeClient::exitVideoFullscreen() should take a pointer to a HTMLVideoElement.
3119 https://bugs.webkit.org/show_bug.cgi?id=143674
3121 Reviewed by Darin Adler.
3123 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3124 (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Takes a reference.
3125 (WebKit::WebChromeClient::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
3126 (WebKit::WebChromeClient::exitVideoFullscreen): Deleted.
3127 * WebProcess/WebCoreSupport/WebChromeClient.h:
3128 * WebProcess/ios/WebVideoFullscreenManager.h:
3129 * WebProcess/ios/WebVideoFullscreenManager.mm:
3130 (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
3131 (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
3132 (WebKit::WebVideoFullscreenManager::didEnterFullscreen): Pass a reference.
3133 (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.
3134 (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
3136 2015-04-15 Antti Koivisto <antti@apple.com>
3138 Network Cache: Inline small body data to record file
3139 https://bugs.webkit.org/show_bug.cgi?id=143783
3141 Reviewed by Chris Dumez.
3143 We currently save all body data as separate files. We can improve space efficiency and do less reads and writes
3144 by inlining smaller resource bodies with the header.
3146 * NetworkProcess/cache/NetworkCacheIOChannel.h:
3147 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
3148 (WebKit::NetworkCache::IOChannel::read):
3149 (WebKit::NetworkCache::IOChannel::readSync):
3150 (WebKit::NetworkCache::IOChannel::write):
3152 Add WorkQueue argument to allow specifying which queue the result is submitted to.
3154 * NetworkProcess/cache/NetworkCacheStorage.cpp:
3155 (WebKit::NetworkCache::decodeRecordMetaData):
3157 Add a boolean indicating whether the body is inlined.
3159 (WebKit::NetworkCache::decodeRecordHeader):
3160 (WebKit::NetworkCache::Storage::decodeRecord):
3161 (WebKit::NetworkCache::encodeRecordMetaData):
3162 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
3163 (WebKit::NetworkCache::Storage::encodeRecord):
3164 (WebKit::NetworkCache::Storage::dispatchReadOperation):
3166 Read the record first, then read the blob if needed.
3167 Submit the read operation directly from the main queue. Only thing we do is opening an IO channel
3168 and that uses O_NONBLOCK.
3169 Process the read results in the IO work queue where we now do the blob retrieval.
3171 (WebKit::NetworkCache::shouldStoreBodyAsBlob):
3173 The current threshold for saving a separate blob is 16KB.
3175 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
3176 (WebKit::NetworkCache::Storage::traverse):
3177 (WebKit::NetworkCache::createRecord): Deleted.
3178 (WebKit::NetworkCache::encodeRecordHeader): Deleted.
3179 * NetworkProcess/cache/NetworkCacheStorage.h:
3181 2015-04-15 Tim Horton <timothy_horton@apple.com>
3183 Non-local keyboards don't update scroll view parameters
3184 https://bugs.webkit.org/show_bug.cgi?id=143791
3185 <rdar://problem/18974020>
3187 * Platform/spi/ios/UIKitSPI.h:
3190 2015-04-15 Tim Horton <timothy_horton@apple.com>
3192 Non-local keyboards don't update scroll view parameters
3193 https://bugs.webkit.org/show_bug.cgi?id=143791
3194 <rdar://problem/18974020>
3196 Reviewed by Enrica Casucci.
3198 * UIProcess/API/Cocoa/WKWebView.mm:
3199 (-[WKWebView _shouldUpdateKeyboardWithInfo:]):
3200 (-[WKWebView _keyboardWillChangeFrame:]):
3201 (-[WKWebView _keyboardWillShow:]):
3202 Make sure that we update scroll view parameters (obscured insets, etc.)
3203 if we have a non-local keyboard, in addition to the cases where we have an assisted node.
3205 2015-04-15 Dan Bernstein <mitz@apple.com>
3207 <rdar://problem/20549298> No matching __NSi_ definition for postprocessed value of WK_{MAC,IOS}_TBA
3208 https://bugs.webkit.org/show_bug.cgi?id=143786
3210 Reviewed by Anders Carlsson.
3212 * Shared/API/Cocoa/WKFoundation.h: Added a placeholder for the postprocessing script to
3213 insert a definition of __NSi_* for the current deployment target. Import CoreFoundation.h so
3214 that we can check if the macro is already defined.
3215 * WebKit2.xcodeproj/project.pbxproj: In the Postprocess WKFoundation.h script build phase,
3216 replace the placeholder with a definition of __NSi_{current deployment target} if not
3219 2015-04-14 Anders Carlsson <andersca@apple.com>
3221 Make creating send rights from shared memory more robust
3222 https://bugs.webkit.org/show_bug.cgi?id=143730
3223 rdar://problem/16595870
3225 Reviewed by Darin Adler.
3227 This cleans up creation of handles and send rights and also fixes a bug where it would be impossible
3228 to send more than 128 MB of shared memory in a single object.
3230 * Platform/SharedMemory.h:
3231 * Platform/mac/SharedMemoryMac.cpp:
3232 (WebKit::makeMemoryEntry):
3233 New helper function that creates a memory entry send right. This uses MAP_MEM_VM_SHARE which ensures
3234 that memory objects larger than 128 MB will be handled correctly.
3236 (WebKit::SharedMemory::create):
3237 Call makeMemoryEntry.
3239 (WebKit::SharedMemory::createHandle):
3240 Call createSendRight.
3242 (WebKit::SharedMemory::createSendRight):
3243 Call makeMemoryEntry and add the necessary assertions.
3245 2015-04-15 Eric Carlson <eric.carlson@apple.com>
3247 Generalize "isPlayingAudio" to include other media characteristics
3248 https://bugs.webkit.org/show_bug.cgi?id=143713
3250 Reviewed by Jer Noble.
3252 * UIProcess/API/C/WKPage.cpp:
3253 (toGenericCallbackFunction): Scope CallbackBase.
3254 (WKPageForceRepaint): Ditto.
3255 (WKPageValidateCommand): Ditto.
3256 (WKPageComputePagesForPrinting): Ditto.
3258 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
3259 (-[_WKThumbnailView _requestSnapshotIfNeeded]): Ditto.
3261 * UIProcess/API/mac/WKView.mm:
3262 (-[WKView becomeFirstResponder]): Ditto.
3263 (-[WKView updateFontPanelIfNeeded]): Ditto.
3264 (-[WKView validateUserInterfaceItem:]): Ditto.
3265 (-[WKView startSpeaking:]): Ditto.
3266 (-[WKView selectedRangeWithCompletionHandler:]): Ditto.
3267 (-[WKView markedRangeWithCompletionHandler:]): Ditto.
3268 (-[WKView hasMarkedTextWithCompletionHandler:]): Ditto.
3269 (-[WKView attributedSubstringForProposedRange:completionHandler:]): Ditto.
3270 (-[WKView firstRectForCharacterRange:completionHandler:]): Ditto.
3271 (-[WKView characterIndexForPoint:completionHandler:]): Ditto.
3273 * UIProcess/WebPageProxy.cpp:
3274 (WebKit::WebPageProxy::isPlayingMediaDidChange): Rename from isPlayingAudioDidChange.
3275 (WebKit::WebPageProxy::isPlayingAudioDidChange): Deleted.
3276 * UIProcess/WebPageProxy.h:
3278 * UIProcess/WebPageProxy.messages.in:
3280 * UIProcess/mac/WKFullScreenWindowController.mm:
3281 (-[WKFullScreenWindowController dealloc]): Scope CallbackBase.
3282 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.
3284 * UIProcess/mac/WKPrintingView.mm:
3285 (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ditto.
3286 (-[WKPrintingView _askPageToComputePageRects]): Ditto.
3287 (-[WKPrintingView _drawPreview:]): Ditto.
3289 * WebProcess/Plugins/PluginView.cpp:
3290 (WebKit::PluginView::setPluginIsPlayingAudio):
3291 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3292 (WebKit::WebChromeClient::isPlayingMediaDidChange):
3293 (WebKit::WebChromeClient::isPlayingAudioDidChange): Deleted.
3294 * WebProcess/WebCoreSupport/WebChromeClient.h:
3296 2015-04-15 Antti Koivisto <antti@apple.com>
3298 Network Cache: Add thread-safe accessors for storage paths
3299 https://bugs.webkit.org/show_bug.cgi?id=143668
3301 Reviewed by Darin Adler.
3303 Less need to use StringCapture.
3305 * NetworkProcess/cache/NetworkCache.cpp:
3306 (WebKit::NetworkCache::Cache::dumpFilePath):
3307 (WebKit::NetworkCache::Cache::storagePath):
3308 * NetworkProcess/cache/NetworkCacheStorage.cpp:
3309 (WebKit::NetworkCache::makeRecordsDirectoryPath):
3310 (WebKit::NetworkCache::Storage::Storage):
3311 (WebKit::NetworkCache::Storage::basePath):
3312 (WebKit::NetworkCache::Storage::versionPath):
3313 (WebKit::NetworkCache::Storage::recordsPath):
3314 (WebKit::NetworkCache::Storage::synchronize):
3315 (WebKit::NetworkCache::Storage::remove):
3316 (WebKit::NetworkCache::Storage::dispatchReadOperation):
3317 (WebKit::NetworkCache::Storage::finishReadOperation):
3318 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
3319 (WebKit::NetworkCache::Storage::traverse):
3320 (WebKit::NetworkCache::Storage::clear):
3321 (WebKit::NetworkCache::Storage::shrink):
3322 (WebKit::NetworkCache::Storage::deleteOldVersions):
3323 (WebKit::NetworkCache::makeRecordDirectoryPath): Deleted.
3324 * NetworkProcess/cache/NetworkCacheStorage.h:
3325 (WebKit::NetworkCache::Storage::baseDirectoryPath): Deleted.
3326 (WebKit::NetworkCache::Storage::directoryPath): Deleted.
3328 2015-04-14 Tim Horton <timothy_horton@apple.com>
3330 Update gesture swipe shadow style
3331 https://bugs.webkit.org/show_bug.cgi?id=143616
3332 <rdar://problem/19295843>
3334 Reviewed by Darin Adler.
3336 * UIProcess/mac/ViewGestureController.h:
3337 * UIProcess/mac/ViewGestureControllerMac.mm:
3338 (WebKit::ViewGestureController::beginSwipeGesture):
3339 For the modern shadow style, use a layer stretched along the edge of the swiping content
3340 with the newly added PNGs as the layer contents.
3342 Add a dimming layer over the lower layer of content which fades in/out
3345 (WebKit::ViewGestureController::handleSwipeGesture):
3346 Fade the dimming layer in and out during the entire swipe.
3347 Fade the shadow layer out during the last few pixels of the swipe.
3349 (WebKit::ViewGestureController::removeSwipeSnapshot):
3350 Unparent the new layers.
3352 * WebKit2.xcodeproj/project.pbxproj:
3353 * Resources/SwipeShadow.png:
3354 * Resources/SwipeShadow@2x.png:
3355 Add the new resources.
3357 2015-04-14 Brian Weinstein <bweinstein@apple.com>
3359 Add SPI to clear HSTS hosts added since a date.
3360 https://bugs.webkit.org/show_bug.cgi?id=143726
3362 rdar://problem/16664597
3364 Reviewed by Anders Carlsson.
3366 * UIProcess/API/C/mac/WKContextPrivateMac.h:
3367 * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3368 (WKContextResetHSTSHostsAddedAfterDate): Call into the WebProcessPool.
3369 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3370 (WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate): Call CFNetwork SPI to clear HSTS hosts added
3371 after the given date.
3372 * UIProcess/WebProcessPool.h:
3374 2015-04-14 Anders Carlsson <andersca@apple.com>
3376 More work on making the SharedMemory interface more sane
3377 https://bugs.webkit.org/show_bug.cgi?id=143718
3379 Reviewed by Andreas Kling.
3381 Get rid of m_shouldVMDeallocateData. The idea is that shared memory created by calling
3382 SharedMemory::allocate has a non-null m_data pointer, and a null m_port. Shared memory created
3383 by calling SharedMemory::create with a pointer and a length has a non-null port but a null m_data
3384 since the data can be unmapped by the caller and we don't want to hold on to dangling pointers.
3386 * Platform/SharedMemory.h:
3387 (WebKit::SharedMemory::data):
3388 * Platform/mac/SharedMemoryMac.cpp:
3389 (WebKit::SharedMemory::allocate):
3390 (WebKit::SharedMemory::create):
3391 (WebKit::SharedMemory::map):
3392 (WebKit::SharedMemory::~SharedMemory):
3393 (WebKit::SharedMemory::createHandle):
3395 2015-04-14 Antti Koivisto <antti@apple.com>
3397 Network Cache: Deduplicate body data
3398 https://bugs.webkit.org/show_bug.cgi?id=143652
3400 Reviewed by Darin Adler.
3402 It is common to have cache entries with identical body data. This happens when the same resource is loaded from
3403 a different URL (https vs http, slash vs no-slash at end, etc.). It also happens when the same URL is
3404 referenced from different cache partitions.
3406 We can improve disk space efficiency and use less memory by sharing identical body data between cache entries.
3408 This patch splits the body data out from the record file. The new record file contains meta data and response
3409 headers only. Body data is stored using the new BlobStorage interface. Files are deduplicated by computing
3410 SHA1 hash over the data and looking for an existing blob with the same hash. If found the existing entry
3411 is reused by creating a hard link to it.
3413 The new disk structure looks like this:
3418 0A3C9A970ADA27FAE9BD7BC630BAD0B929C293C0
3419 0A6B8060BA77DF92C82A2FD7AF58F79524D8F34C
3423 0B8645B04E7EC78C178B7460052601C2
3424 0B8645B04E7EC78C178B7460052601C2-body
3425 0CB1A3638D1C5A09C5E3283A74FA040B
3426 0CB1A3638D1C5A09C5E3283A74FA040B-body
3429 Each record file has an associated -body which is a hard link to a file in the Blobs directory.
3431 The patch increases effective capacity by 10-20% with a typical cache. It also saves memory especially when identical
3432 resources are used in multiple tabs.
3434 Currently all >0 sized resources are stored as shared blobs. In future small resources should be integrated into record
3435 files and blobs used for larger files only.
3437 * NetworkProcess/cache/NetworkCache.cpp:
3438 (WebKit::NetworkCache::Cache::store):
3439 (WebKit::NetworkCache::Cache::update):
3441 Adopt the new storage interface.
3443 (WebKit::NetworkCache::Cache::dumpContentsToFile):
3444 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp: Added.
3445 (WebKit::NetworkCache::BlobStorage::BlobStorage):
3446 (WebKit::NetworkCache::BlobStorage::synchronize):
3448 Compute size and delete unused files from the Blobs directory (link count == 1).
3450 (WebKit::NetworkCache::BlobStorage::blobPath):
3451 (WebKit::NetworkCache::BlobStorage::add):
3452 (WebKit::NetworkCache::BlobStorage::get):
3454 Interface for storing and retrieving data blobs. Blobs are deduplicated on add.
3456 (WebKit::NetworkCache::BlobStorage::remove):