1 2015-04-29 Filip Pizlo <fpizlo@apple.com>
3 JSTypeInfo should have an inline type flag to indicate if getCallData() has been overridden
4 https://bugs.webkit.org/show_bug.cgi?id=144397
6 Reviewed by Andreas Kling.
8 If you override getCallData() and you want to be called a "function", then you need to use the
9 new TypeOfShouldCallGetCallData flag.
11 * WebProcess/Plugins/Netscape/JSNPObject.h:
13 2015-04-29 Antti Koivisto <antti@apple.com>
15 ResourceLoadPriority should be enum class
16 https://bugs.webkit.org/show_bug.cgi?id=144326
18 Reviewed by Darin Adler.
20 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
21 (WebKit::NetworkConnectionToWebProcess::servePendingRequests): Deleted.
23 Remove this unused message.
25 * NetworkProcess/NetworkConnectionToWebProcess.h:
26 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
27 * NetworkProcess/cache/NetworkCache.cpp:
28 (WebKit::NetworkCache::makeStoreDecision):
29 (WebKit::NetworkCache::Cache::retrieve):
30 * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
31 (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
32 * WebProcess/Network/WebResourceLoadScheduler.cpp:
33 (WebKit::WebResourceLoadScheduler::servePendingRequests):
34 * WebProcess/Network/WebResourceLoadScheduler.h:
36 2015-04-29 Myles C. Maxfield <mmaxfield@apple.com>
38 [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
39 https://bugs.webkit.org/show_bug.cgi?id=132159
41 Reviewed by Darin Adler.
43 Add SPI to set the font whitelist.
45 * Shared/WebProcessCreationParameters.cpp:
46 (WebKit::WebProcessCreationParameters::encode):
47 (WebKit::WebProcessCreationParameters::decode):
48 * Shared/WebProcessCreationParameters.h:
49 * UIProcess/API/C/WKContext.cpp:
50 (WKContextSetFontWhitelist):
51 * UIProcess/API/C/WKContextPrivate.h:
52 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
53 (WebKit::WebProcessPool::platformInitializeWebProcess):
54 * UIProcess/WebProcessPool.cpp:
55 (WebKit::WebProcessPool::setFontWhitelist):
56 * UIProcess/WebProcessPool.h:
57 * WebProcess/cocoa/WebProcessCocoa.mm:
58 (WebKit::WebProcess::platformInitializeWebProcess):
60 2015-04-29 Martin Robinson <mrobinson@igalia.com>
62 [CMake] [GTK] Organize and clean up unused CMake variables
63 https://bugs.webkit.org/show_bug.cgi?id=144364
65 Reviewed by Gyuyoung Kim.
67 * PlatformGTK.cmake: Add variables specific to this project.
68 * webkit2gtk-web-extension.pc.in: Hardcode the GTK+ API version. It rarely changes.
69 * webkit2gtk.pc.in: Ditto.
71 2015-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
73 REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
74 https://bugs.webkit.org/show_bug.cgi?id=144388
76 Reviewed by Brady Eidson.
78 Move the WebContextMenuClient::shareMenuItem() implementation to
79 platform files, since platforms not supporting share menu item
80 should return a null ContextMenuIem instead.
82 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
83 (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
84 * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
85 (WebKit::WebContextMenuClient::shareMenuItem):
86 * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
87 (WebKit::WebContextMenuClient::shareMenuItem):
88 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
89 (WebKit::WebContextMenuClient::shareMenuItem):
91 2015-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
93 REGRESSION(r183467): [SOUP] isMainResource is no longer passed as resource load parameters to the network process
94 https://bugs.webkit.org/show_bug.cgi?id=144381
96 Reviewed by Darin Adler.
98 A requester enum value is passed now as part of the
99 ResourceRequest, but it's not encoded/decoded for soup.
101 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
102 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData): Encode requester.
103 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData): Decode requester.
105 2015-04-28 Carlos Garcia Campos <cgarcia@igalia.com>
107 [SOUP] Use xattrs to get/set the creation time of disk cache files
108 https://bugs.webkit.org/show_bug.cgi?id=144251
110 Reviewed by Martin Robinson.
112 The network process disk cache uses the creation time to compute a
113 worth value used to determine the order in which cached resources
114 are deleted when the cache is shrunk. In some operating systems
115 like Linux there's no st_birthtime in struct stat, but since cache
116 files are always created and deleted by us, we could use a custom
117 xattr to store and retrieve the creation time of cached resources.
119 * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
120 (WebKit::NetworkCache::fileTimes):
121 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
122 (WebKit::NetworkCache::IOChannel::IOChannel):
124 2015-04-28 Carlos Garcia Campos <cgarcia@igalia.com>
126 Network Cache: Do not create a SharedBuffer for mapped resources unless explicitly requested
127 https://bugs.webkit.org/show_bug.cgi?id=144337
129 Reviewed by Antti Koivisto.
131 We send a buffer or a memory mapped handler to the web process
132 depending on whether the resource body is mapped or not, but we
133 are always creating a shared buffer even for mapped resources.
134 Split initializeBufferFromStorageRecord() moving the mapped memory
135 handler initialization to its own method.
137 * NetworkProcess/cache/NetworkCacheEntry.cpp:
138 (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
139 Initialize the mapped memory handler if the body data is mapped.
140 (WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
141 Initialize the buffer by wrapping the mapped memory if the body
142 data is mapped, or using the body data directly otherwise.
143 (WebKit::NetworkCache::Entry::shareableResourceHandle): Call
144 initializeShareableResourceHandleFromStorageRecord() if the
146 * NetworkProcess/cache/NetworkCacheEntry.h:
148 2015-04-28 Simon Fraser <simon.fraser@apple.com>
150 Make a non-static version of FrameView::yPositionForRootContentLayer()
151 https://bugs.webkit.org/show_bug.cgi?id=144375
153 Reviewed by Andy Estes.
155 There were two calls to the static FrameView::yPositionForRootContentLayer()
156 which passed in all the arguments for the same FrameView. Make a member
157 function for convenience.
159 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
160 (WebKit::shadowLayerPositionForFrame):
162 2015-04-28 Ryuan Choi <ryuan.choi@navercorp.com>
164 [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
165 https://bugs.webkit.org/show_bug.cgi?id=143001
167 Reviewed by Gyuyoung Kim.
169 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
170 (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
171 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
172 (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
173 * WebProcess/WebCoreSupport/WebChromeClient.h:
174 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
175 (WebKit::WebFrameLoaderClient::dispatchDidLayout):
176 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
177 * WebProcess/WebPage/WebPage.cpp:
178 (WebKit::WebPage::setSize):
179 (WebKit::WebPage::setUseFixedLayout):
180 (WebKit::WebPage::canHandleUserEvents):
181 * WebProcess/WebPage/WebPage.h:
183 2015-04-28 Timothy Horton <timothy_horton@apple.com>
185 [TextIndicator] Yellow highlight takes too long to fade out on scroll
186 https://bugs.webkit.org/show_bug.cgi?id=144358
187 <rdar://problem/19451011>
189 Reviewed by Beth Dakin.
191 * UIProcess/API/Cocoa/WKViewPrivate.h:
192 * UIProcess/API/mac/WKView.mm:
193 (-[WKView renewGState]):
194 (-[WKView viewDidMoveToWindow]):
195 (-[WKView _dictionaryLookupPopoverWillClose:]):
196 (-[WKView _setTextIndicator:]):
197 (-[WKView _setTextIndicator:withLifetime:]):
198 (-[WKView _clearTextIndicatorWithAnimation:]):
199 (-[WKView magnifyWithEvent:]):
200 (-[WKView smartMagnifyWithEvent:]):
201 (-[WKView setMagnification:centeredAtPoint:]):
202 (-[WKView setMagnification:]):
203 (-[WKView _dismissContentRelativeChildWindows]):
204 (-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
205 (-[WKView _setTextIndicator:fadeOut:]): Deleted.
206 * UIProcess/API/mac/WKViewInternal.h:
207 * UIProcess/PageClient.h:
208 * UIProcess/WebPageProxy.cpp:
209 (WebKit::WebPageProxy::pageDidScroll):
210 (WebKit::WebPageProxy::setTextIndicator):
211 (WebKit::WebPageProxy::clearTextIndicator):
212 * UIProcess/WebPageProxy.h:
213 * UIProcess/WebPageProxy.messages.in:
214 * UIProcess/ios/PageClientImplIOS.h:
215 * UIProcess/ios/PageClientImplIOS.mm:
216 (WebKit::PageClientImpl::setTextIndicator):
217 (WebKit::PageClientImpl::clearTextIndicator):
218 * UIProcess/mac/PageClientImpl.h:
219 * UIProcess/mac/PageClientImpl.mm:
220 (WebKit::PageClientImpl::setTextIndicator):
221 (WebKit::PageClientImpl::clearTextIndicator):
222 (WebKit::PageClientImpl::didPerformDictionaryLookup):
223 (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
224 * UIProcess/mac/WKActionMenuController.mm:
225 (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
226 * UIProcess/mac/WKImmediateActionController.mm:
227 (-[WKImmediateActionController _defaultAnimationController]):
228 (-[WKImmediateActionController _animationControllerForDataDetectedText]):
229 (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
230 (-[WKImmediateActionController _animationControllerForText]):
231 * WebProcess/WebPage/FindController.cpp:
232 (WebKit::FindController::updateFindIndicator):
233 Make _setTextIndicator take a reference.
234 Add a variant of _setTextIndicator that takes a Lifetime.
235 Make _clearTextIndicatorWithAnimation take a DismissalAnimation.
236 Make dismissContentRelativeChildWindows take a parameter indicating
237 whether the dismissal should include animation or not (currently
238 only applies to TextIndicator).
239 Don't animate when dismissal occurs because of scrolling, zooming,
240 or other things in which the content will have changed significantly
241 underneath the indicator and shouldn't have a slowly-fading-out yellow highlight.
243 2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
245 Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
246 https://bugs.webkit.org/show_bug.cgi?id=144304
248 Reviewed by Geoffrey Garen.
250 Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
252 * Configurations/FeatureDefines.xcconfig:
254 2015-04-28 Commit Queue <commit-queue@webkit.org>
256 Unreviewed, rolling out r183514.
257 https://bugs.webkit.org/show_bug.cgi?id=144359
259 It broke cloop test bots (Requested by mcatanzaro on #webkit).
263 "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
264 https://bugs.webkit.org/show_bug.cgi?id=144304
265 http://trac.webkit.org/changeset/183514
267 2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
269 Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
270 https://bugs.webkit.org/show_bug.cgi?id=144304
272 Reviewed by Geoffrey Garen.
274 Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
276 * Configurations/FeatureDefines.xcconfig:
278 2015-04-28 Enrica Casucci <enrica@apple.com>
280 Add support for lookup on iOS.
281 https://bugs.webkit.org/show_bug.cgi?id=144342
282 rdar://problem/19994090
284 Reviewed by Tim Horton.
286 * UIProcess/WebPageProxy.h:
287 * UIProcess/ios/WKContentViewInteraction.mm:
288 (-[WKContentView _lookup:]):
289 (-[WKContentView canPerformAction:withSender:]):
290 * UIProcess/ios/WebPageProxyIOS.mm:
291 (WebKit::WebPageProxy::getLookupContextAtPoint):
292 * WebProcess/WebPage/WebPage.h:
293 * WebProcess/WebPage/WebPage.messages.in:
294 * WebProcess/WebPage/ios/WebPageIOS.mm:
295 (WebKit::WebPage::getLookupContextAtPoint):
297 2015-04-28 Brady Eidson <beidson@apple.com>
299 Consolidate most "frame load" arguments into FrameLoadRequest.
300 https://bugs.webkit.org/show_bug.cgi?id=144276
302 Reviewed by Alexey Proskuryakov.
304 * WebProcess/Plugins/PluginView.cpp:
305 (WebKit::PluginView::loadURL):
307 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
308 (WebKit::WebFrameLoaderClient::dispatchCreatePage):
310 * WebProcess/WebPage/WebInspector.cpp:
311 (WebKit::WebInspector::openInNewTab):
313 2015-04-28 Chris Dumez <cdumez@apple.com>
315 [WK2][Mac] Update WebContent process' sandbox profile for AWD
316 https://bugs.webkit.org/show_bug.cgi?id=144315
317 <rdar://problem/20719293>
319 Reviewed by Alexey Proskuryakov.
321 Update sandbox profile for AWD similarly to what was done for iOS in
324 * WebProcess/com.apple.WebProcess.sb.in:
326 2015-04-28 Antti Koivisto <antti@apple.com>
328 Network Cache: Disk cache getting filled by YouTube video data
329 https://bugs.webkit.org/show_bug.cgi?id=144259
331 Reviewed by Darin Adler.
333 MSE media is loaded via XHR and tends to eventually fill the cache.
335 YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
336 We can reduce disk writes and keep more useful resources around by not caching them
338 * NetworkProcess/NetworkResourceLoader.cpp:
339 (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
340 (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
341 * NetworkProcess/cache/NetworkCache.cpp:
342 (WebKit::NetworkCache::makeStoreDecision):
344 Don't store if the requester is XHR and response has video or audio content type.
346 * NetworkProcess/cache/NetworkCache.h:
347 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
348 (WebKit::NetworkCache::storeDecisionToDiagnosticKey):
349 * Shared/Network/NetworkResourceLoadParameters.cpp:
350 (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
351 (WebKit::NetworkResourceLoadParameters::encode):
352 (WebKit::NetworkResourceLoadParameters::decode):
353 * Shared/Network/NetworkResourceLoadParameters.h:
355 The requester type is now part of the ResourceRequest, no need for separate parameter.
357 * Shared/mac/WebCoreArgumentCodersMac.mm:
358 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
359 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
360 * WebProcess/Network/WebResourceLoadScheduler.cpp:
361 (WebKit::WebResourceLoadScheduler::scheduleLoad):
363 2015-04-28 Zan Dobersek <zdobersek@igalia.com>
365 [WK2] API::UserContentURLPattern creation functions should return Ref<>
366 https://bugs.webkit.org/show_bug.cgi?id=144225
368 Reviewed by Darin Adler.
370 Have API::UserContentURLPattern creation functions return Ref<>.
371 Call-sites are also updated, using and operating on the returned Ref<>
372 object where possible.
374 * Shared/API/APIUserContentURLPattern.h:
375 (API::UserContentURLPattern::create):
376 * Shared/API/c/WKUserContentURLPattern.cpp:
377 (WKUserContentURLPatternCreate):
379 2015-04-28 Zan Dobersek <zdobersek@igalia.com>
381 [WK2] API::URLRequest, API::URLResponse creation functions should return Ref<>
382 https://bugs.webkit.org/show_bug.cgi?id=144224
384 Reviewed by Darin Adler.
386 Have API::URLRequest and API::URLResponse creation functions return Ref<>.
387 The call-sites are also updated, using and operating on the returned Ref<> object
390 * Shared/API/APIURLRequest.h:
391 (API::URLRequest::create):
392 * Shared/API/APIURLResponse.h:
393 (API::URLResponse::create):
394 * Shared/API/c/WKURLRequest.cpp:
395 (WKURLRequestCreateWithWKURL):
396 * Shared/API/c/mac/WKURLRequestNS.mm:
397 (WKURLRequestCreateWithNSURLRequest):
398 * Shared/API/c/mac/WKURLResponseNS.mm:
399 (WKURLResponseCreateWithNSURLResponse):
400 * UIProcess/API/C/WKContext.cpp:
401 (WKContextSetDownloadClient):
402 * UIProcess/API/C/WKDownload.cpp:
403 (WKDownloadCopyRequest):
404 * UIProcess/API/C/WKNavigationDataRef.cpp:
405 (WKNavigationDataCopyOriginalRequest):
406 * UIProcess/API/C/WKPage.cpp:
407 (WKPageSetPagePolicyClient):
408 (WKPageSetPageUIClient):
409 * UIProcess/Cocoa/NavigationState.mm:
410 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
411 * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
412 (WebKit::WebSoupCustomProtocolRequestManagerClient::startLoading):
413 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
414 (willSendRequestForFrame):
415 * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
416 (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
417 (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
418 (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
420 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
422 [WK2] API::Point, API::Size, API::Rect creation functions should return Ref<>
423 https://bugs.webkit.org/show_bug.cgi?id=144223
425 Reviewed by Darin Adler.
427 Have API::Point, API::Size and API::Rect creation functions return Ref<>.
428 Call-sites are also updated, using and operating on the returned Ref<> object
431 * Shared/API/APIGeometry.h:
433 (API::Point::create):
435 * Shared/API/c/WKGeometry.cpp:
440 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
442 [WK2] API::Error creation functions should return Ref<>
443 https://bugs.webkit.org/show_bug.cgi?id=144222
445 Reviewed by Darin Adler.
447 Have API::Error creation functions return Ref<>.
448 The call-sites are also updated, using and operating
449 on the returned Ref<> object where possible.
451 * Shared/API/APIError.h:
452 (API::Error::create):
453 * Shared/API/c/cf/WKErrorCF.cpp:
454 (WKErrorCreateWithCFError):
455 * UIProcess/API/C/WKOriginDataManager.cpp:
456 (WKOriginDataManagerDeleteEntriesForOrigin):
457 (WKOriginDataManagerDeleteEntriesModifiedBetweenDates):
458 (WKOriginDataManagerDeleteAllEntries):
459 * UIProcess/API/C/WKPage.cpp:
460 (toGenericCallbackFunction):
461 (WKPageForceRepaint):
462 (WKPageValidateCommand):
463 (WKPageComputePagesForPrinting):
464 * UIProcess/API/C/WKPluginSiteDataManager.cpp:
465 (WKPluginSiteDataManagerClearSiteData):
466 (WKPluginSiteDataManagerClearAllSiteData):
467 * UIProcess/GenericCallback.h:
468 (WebKit::toGenericCallbackFunction):
469 * UIProcess/WebPageProxy.cpp:
470 (WebKit::WebPageProxy::printFinishedCallback):
472 2015-04-27 Sungmann Cho <sungmann.cho@navercorp.com>
474 [GTK] Remove unnecessary semicolon from WebKitNotificationProvider.h.
475 https://bugs.webkit.org/show_bug.cgi?id=144312
477 Reviewed by Martin Robinson.
479 No new tests, no behavior change.
481 * UIProcess/API/gtk/WebKitNotificationProvider.h:
483 2015-04-27 Brent Fulgham <bfulgham@apple.com>
485 PDF action menu fixes
486 https://bugs.webkit.org/show_bug.cgi?id=144299
487 <rdar://problem/20702215>
489 Reviewed by Tim Horton.
491 Make two corrections to how PDFs are handled:
492 1. When calculating the view rect for the user's selection, make sure
493 that we get coordinates for the correct PDF page. The existing code assumed
494 that the current PDFLayerControler's current page was correct, but this will
495 not be true if you zoom the PDF out so that several pages are displayed at
496 once. Each selection keeps track of the page it is referenced against.
498 2. Revise the offsets calculated for the TextIndicator to take into account
499 the font descender (as well as the ascender), and to adjust by the scaled
500 amount of margin around the selected text.
502 * WebProcess/Plugins/PDF/PDFPlugin.mm:
503 (WebKit::PDFPlugin::viewRectForSelection): Use correct page for calculating
505 * WebProcess/WebPage/mac/WebPageMac.mm:
506 (WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin): Include font 'descendant'
507 and (scaled) margin when adjusting the hit target for the TextIndicator to draw.
509 2015-04-27 Michael Catanzaro <mcatanzaro@igalia.com>
511 Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
512 https://bugs.webkit.org/show_bug.cgi?id=144193
514 Reviewed by Darin Adler.
518 2015-04-24 Jon Honeycutt <jhoneycutt@apple.com>
520 Context menus are not reshown after an orientation change
522 <https://bugs.webkit.org/show_bug.cgi?id=144143>
523 <rdar://problem/20679931>
525 Reviewed by Darin Adler.
527 * UIProcess/ios/WKActionSheet.mm:
528 (-[WKActionSheet updateSheetPosition]):
529 Return early if we're still in a rotation, not if the rotation is
532 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
534 [WK2] API::Dictionary creation functions should return Ref<>
535 https://bugs.webkit.org/show_bug.cgi?id=144221
537 Reviewed by Darin Adler.
539 Have API::Dictionary creation functions return Ref<>.
540 The call-sites are also updated, using and operating
541 on the returned Ref<> object where possible.
543 * Shared/API/APIDictionary.cpp:
544 (API::Dictionary::create):
545 * Shared/API/APIDictionary.h:
546 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
547 (createEncodedObject):
548 * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
549 (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
550 * Shared/API/c/WKDictionary.cpp:
551 (WKDictionaryCreate):
552 * Shared/API/c/WKMutableDictionary.cpp:
553 (WKMutableDictionaryCreate):
554 * Shared/Plugins/Netscape/PluginInformation.cpp:
555 (WebKit::createPluginInformationDictionary):
556 * Shared/Plugins/Netscape/PluginInformation.h:
557 * UIProcess/API/C/WKPage.cpp:
558 (WKPageSetPageUIClient):
559 * UIProcess/API/gtk/WebKitWebContext.cpp:
560 (webkit_web_context_prefetch_dns):
561 * UIProcess/API/gtk/WebKitWebView.cpp:
562 (webkit_web_view_get_snapshot):
563 * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
564 (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
565 * UIProcess/Plugins/PlugInAutoStartProvider.h:
566 * UIProcess/StatisticsRequest.cpp:
567 (WebKit::createDictionaryFromHashMap):
568 (WebKit::StatisticsRequest::completedRequest):
569 * UIProcess/WebFormClient.cpp:
570 (WebKit::WebFormClient::willSubmitForm):
571 * UIProcess/WebPageProxy.cpp:
572 (WebKit::WebPageProxy::didFailToInitializePlugin):
573 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
574 (didInitiateLoadForResource):
575 (willSendRequestForFrame):
576 (didReceiveResponseForResource):
577 (didReceiveContentLengthForResource):
578 (didFinishLoadForResource):
579 (didFailLoadForResource):
580 (webkitWebPageDidReceiveMessage):
581 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
582 (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
583 (WebKit::InjectedBundlePageFormClient::willSubmitForm):
585 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
587 [WK2] API::Data creation functions should return Ref<>
588 https://bugs.webkit.org/show_bug.cgi?id=144220
590 Reviewed by Darin Adler.
592 Have API::Data creation functions return Ref<>.
593 The call-sites are also updated, using and operating
594 on the returned Ref<> object where possible.
596 * Shared/API/APIData.h:
597 (API::Data::createWithoutCopying):
599 * Shared/API/c/WKData.cpp:
601 * Shared/API/c/mac/WKWebArchive.cpp:
602 (WKWebArchiveCopyData):
603 * Shared/API/c/mac/WKWebArchiveResource.cpp:
604 (WKWebArchiveResourceCopyData):
605 * Shared/APIWebArchive.h:
606 * Shared/APIWebArchive.mm:
607 (API::WebArchive::data):
608 * Shared/APIWebArchiveResource.h:
609 * Shared/APIWebArchiveResource.mm:
610 (API::WebArchiveResource::data):
611 * Shared/Cocoa/APIDataCocoa.mm:
612 (API::Data::createWithoutCopying):
613 * UIProcess/API/Cocoa/WKWebView.mm:
614 (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
615 * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
616 (webkitURISchemeRequestReadCallback):
617 * UIProcess/API/gtk/WebKitWebView.cpp:
618 (webkit_web_view_load_bytes):
619 * UIProcess/Downloads/DownloadProxy.cpp:
620 (WebKit::createData):
621 * UIProcess/WebPageProxy.cpp:
622 (WebKit::WebPageProxy::dataCallback):
623 (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder):
625 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
627 [WK2] API::URL creation functions should return Ref<>
628 https://bugs.webkit.org/show_bug.cgi?id=144219
630 Reviewed by Darin Adler.
632 Have API::URL creation functions return Ref<>.
633 The call-sites are also updated, using and operating in the
634 returned Ref<> object, where possible.
636 * Shared/API/APIURL.h:
638 * Shared/API/c/WKSharedAPICast.h:
639 (WebKit::toCopiedURLAPI):
640 * Shared/API/c/WKURL.cpp:
641 (WKURLCreateWithUTF8CString):
642 (WKURLCreateWithBaseURL):
643 * UIProcess/API/gtk/WebKitWebResource.cpp:
644 (webkit_web_resource_get_data):
645 * UIProcess/WebIconDatabase.cpp:
646 (WebKit::WebIconDatabase::didChangeIconForPageURL):
647 (WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):
648 * WebProcess/WebPage/WebPage.cpp:
649 (WebKit::WebPage::userAgent):
651 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
653 [WK2] API::String creation functions should return Ref<>
654 https://bugs.webkit.org/show_bug.cgi?id=144218
656 Reviewed by Darin Adler.
658 Have API::String creation functions return Ref<>.
659 The call-sites are also updated, using and operating on the returned
660 Ref<> object, where possible.
662 * Shared/API/APIString.h:
663 * Shared/API/c/WKPluginInformation.cpp:
664 (WKPluginInformationBundleIdentifierKey):
665 (WKPluginInformationBundleVersionKey):
666 (WKPluginInformationBundleShortVersionKey):
667 (WKPluginInformationPathKey):
668 (WKPluginInformationDisplayNameKey):
669 (WKPluginInformationDefaultLoadPolicyKey):
670 (WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
671 (WKPluginInformationHasSandboxProfileKey):
672 (WKPluginInformationFrameURLKey):
673 (WKPluginInformationMIMETypeKey):
674 (WKPluginInformationPageURLKey):
675 (WKPluginInformationPluginspageAttributeURLKey):
676 (WKPluginInformationPluginURLKey):
677 (WKPlugInInformationReplacementObscuredKey):
678 * Shared/API/c/WKSharedAPICast.h:
679 (WebKit::ProxyingRefPtr::ProxyingRefPtr):
680 (WebKit::toCopiedAPI):
681 * Shared/API/c/WKString.cpp:
682 (WKStringCreateWithUTF8CString):
683 (WKStringCreateWithJSString):
684 * UIProcess/API/C/WKDatabaseManager.cpp:
685 (WKDatabaseManagerGetOriginKey):
686 (WKDatabaseManagerGetOriginQuotaKey):
687 (WKDatabaseManagerGetOriginUsageKey):
688 (WKDatabaseManagerGetDatabaseDetailsKey):
689 (WKDatabaseManagerGetDatabaseDetailsNameKey):
690 (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
691 (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
692 (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
693 (WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
694 (WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
695 * UIProcess/API/C/WKKeyValueStorageManager.cpp:
696 (WKKeyValueStorageManagerGetOriginKey):
697 (WKKeyValueStorageManagerGetCreationTimeKey):
698 (WKKeyValueStorageManagerGetModificationTimeKey):
699 * UIProcess/API/C/WKPage.cpp:
700 (WKPageGetSessionHistoryURLValueType):
701 (WKPageGetSessionBackForwardListItemValueType):
702 (toGenericCallbackFunction):
703 (WKPageValidateCommand):
704 * UIProcess/WebProcessPool.cpp:
705 (WebKit::WebProcessPool::didReceiveInvalidMessage):
707 2015-04-27 Brady Eidson <beidson@apple.com>
709 Make 'enum NavigationType' be an enum class
710 https://bugs.webkit.org/show_bug.cgi?id=144270
712 Reviewed by Alex Christensen.
714 * Shared/API/c/WKSharedAPICast.h:
717 * Shared/NavigationActionData.cpp:
718 (WebKit::NavigationActionData::NavigationActionData):
720 * UIProcess/API/Cocoa/WKNavigationAction.mm:
721 (toWKNavigationType):
723 * UIProcess/API/gtk/WebKitPrivate.cpp:
724 (toWebKitNavigationType):
726 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
727 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
729 * WebProcess/WebPage/WebInspector.cpp:
730 (WebKit::WebInspector::openInNewTab):
732 2015-04-27 Brent Fulgham <bfulgham@apple.com>
734 REGRESSION(r182879): Images and video can no longer be downloaded
735 https://bugs.webkit.org/show_bug.cgi?id=144267
736 <rdar://problem/20702844>
738 Reviewed by Simon Fraser.
740 * UIProcess/mac/WKActionMenuController.mm:
741 (-[WKActionMenuController _createActionMenuItemForTag:]): Check for
742 "!WebCore::protocolIs(..., "file")" for image and media downloads.
744 2015-04-27 Csaba Osztrogonác <ossy@webkit.org>
746 [EFL] TestWebKitAPI's forwarding header generator should depend on WebKit2's generator
747 https://bugs.webkit.org/show_bug.cgi?id=143874
749 Reviewed by Gyuyoung Kim.
751 * PlatformEfl.cmake: Rename the generator to have consistent name with other generators.
752 * Scripts/generate-forwarding-headers.pl: Removed the unnecessary multiple include-path support.
754 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
756 [SOUP] Add initial implementation of NetworkProcess disk cache
757 https://bugs.webkit.org/show_bug.cgi?id=143872
759 Reviewed by Martin Robinson.
761 Implement the platform specific parts of the disk cache
762 implementation for Soup. It's mainly NetworkCache::Data and
763 NetworkCache::IOChannel.
766 * NetworkProcess/cache/NetworkCache.cpp:
767 (WebKit::NetworkCache::dumpFileChanged):
768 (WebKit::NetworkCache::Cache::initialize):
769 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
770 * NetworkProcess/cache/NetworkCacheData.h:
771 (WebKit::NetworkCache::Data::soupBuffer):
772 * NetworkProcess/cache/NetworkCacheDataSoup.cpp: Added.
773 (WebKit::NetworkCache::Data::Data):
774 (WebKit::NetworkCache::Data::empty):
775 (WebKit::NetworkCache::Data::data):
776 (WebKit::NetworkCache::Data::isNull):
777 (WebKit::NetworkCache::Data::apply):
778 (WebKit::NetworkCache::Data::subrange):
779 (WebKit::NetworkCache::concatenate):
780 (WebKit::NetworkCache::MapWrapper::~MapWrapper):
781 (WebKit::NetworkCache::deleteMapWrapper):
782 (WebKit::NetworkCache::mapFile):
783 (WebKit::NetworkCache::Data::adoptMap):
784 (WebKit::NetworkCache::computeSHA1):
785 (WebKit::NetworkCache::bytesEqual):
786 * NetworkProcess/cache/NetworkCacheIOChannel.h:
787 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp: Added.
788 (WebKit::NetworkCache::IOChannel::IOChannel):
789 (WebKit::NetworkCache::IOChannel::open):
790 (WebKit::NetworkCache::fillDataFromReadBuffer):
791 (WebKit::NetworkCache::inputStreamReadReadyCallback):
792 (WebKit::NetworkCache::IOChannel::read):
793 (WebKit::NetworkCache::IOChannel::readSync):
794 (WebKit::NetworkCache::outputStreamWriteReadyCallback):
795 (WebKit::NetworkCache::IOChannel::write):
796 * NetworkProcess/cache/NetworkCacheStorageSoup.cpp: Removed.
797 * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
798 * NetworkProcess/soup/NetworkProcessSoup.cpp:
799 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
800 (WebKit::NetworkProcess::platformSetCacheModel):
801 (WebKit::NetworkProcess::clearDiskCache):
804 2015-04-26 Yusuke Suzuki <utatane.tea@gmail.com>
806 [ES6] Implement ES6 template literals
807 https://bugs.webkit.org/show_bug.cgi?id=142691
809 Reviewed by Darin Adler.
811 Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
813 * Configurations/FeatureDefines.xcconfig:
815 2015-04-26 Sungmann Cho <sungmann.cho@navercorp.com>
817 Remove PluginView::renderer().
818 https://bugs.webkit.org/show_bug.cgi?id=144216
820 Reviewed by Darin Adler.
822 Nobody should have to know about the plug-in view's renderer except the plug-in view itself.
824 No new tests, no behavior change.
826 * WebProcess/Plugins/PDF/PDFPlugin.mm:
827 (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
828 (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
829 * WebProcess/Plugins/PluginView.cpp:
830 (WebKit::PluginView::renderer): Deleted.
831 * WebProcess/Plugins/PluginView.h:
833 2015-04-26 Doug Russell <d_russell@apple.com>
835 AX: richer text change notifications (142719)
836 https://bugs.webkit.org/show_bug.cgi?id=142719
838 Reviewed by Darin Adler.
840 Richer accessibility value change notifications. Introduce AXTextEditType,
841 postTextStateChangeNotification and postTextReplacementNotification to give assistive
842 tech apps more reliable context for responding to changes in web content. Also implement
843 a mechanism to post value changes in password form fields in coalesced ticks to thwart
844 analyzing the cadence of changes.
846 Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
847 and an overload of postTextReplacementNotification to give assistive tech apps more
848 reliable context for responding to changes in web content selection. Also block posting
849 selection changes on password fields.
851 * UIProcess/WebEditCommandProxy.cpp:
852 (WebKit::WebEditCommandProxy::nameForEditAction):
854 2015-04-26 Dan Bernstein <mitz@apple.com>
856 <rdar://problem/20702337> REGRESSION (r182952): Plug-in service fails to load because it links against WebKit2.framework
857 https://bugs.webkit.org/show_bug.cgi?id=144233
859 Reviewed by Simon Fraser.
861 Have the plug-in service link against WebKit.framework rather than WebKit2.framework.
863 * Configurations/PluginService.32.xcconfig: Removed linker flags for linking against WebKit2
864 and Foundation from the definition of OTHER_LDFLAGS. Since linking is no longer conditional,
865 we can just do it in the target’s Link Binary With Libraries build phase.
867 * Configurations/PluginService.64.xcconfig: Ditto.
869 * WebKit2.xcodeproj/project.pbxproj: Have Foundation and WebKit listed in the services’ Link
870 Binariy With Libraries build phases (one service already had WebKit).
872 2015-04-26 Dan Bernstein <mitz@apple.com>
876 * UIProcess/ios/forms/WKFileUploadPanel.mm:
877 (-[WKFileUploadPanel _showDocumentPickerMenu]): Suppressed deprecation warnings around use
878 of -[UIDocumentMenuViewController _setIgnoreApplicationEntitlementForImport:].
880 2015-04-25 Tim Horton <timothy_horton@apple.com>
882 Further update gesture swipe shadow style
883 https://bugs.webkit.org/show_bug.cgi?id=144215
884 <rdar://problem/19295843>
886 Reviewed by Dan Bernstein.
888 * Resources/mac/SwipeShadow.png: Removed.
889 * Resources/mac/SwipeShadow@2x.png: Removed.
890 * UIProcess/mac/ViewGestureController.h:
891 * UIProcess/mac/ViewGestureControllerMac.mm:
892 (WebKit::ViewGestureController::beginSwipeGesture):
893 * WebKit2.xcodeproj/project.pbxproj:
894 Use a CAGradientLayer instead of PNGs for the swipe shadow.
896 2015-04-25 Dan Bernstein <mitz@apple.com>
898 WebKit2 part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
899 https://bugs.webkit.org/show_bug.cgi?id=144201
901 Reviewed by Darin Adler.
903 Instead of TBD, we use the high version number to which it corresponds in CFAvailability.h,
906 * mac/MigrateHeadersFromWebKitLegacy.make: To detect not-yet-available declarations in
907 headers, look for "9876_5" rather than "TBA".
909 2015-04-24 Timothy Hatcher <timothy@apple.com>
911 Web Inspector: Remove native window dock controls
912 https://bugs.webkit.org/show_bug.cgi?id=144184
914 Reviewed by Joseph Pecoraro.
916 * Resources/DockBottom.pdf: Removed.
917 * Resources/DockBottomLegacy.pdf: Removed.
918 * Resources/DockRight.pdf: Removed.
919 * Resources/DockRightLegacy.pdf: Removed.
920 * UIProcess/WebInspectorProxy.h:
921 * UIProcess/mac/WebInspectorProxyMac.mm:
922 (WebKit::WebInspectorProxy::createInspectorWindow):
923 (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
924 * WebKit2.xcodeproj/project.pbxproj:
926 2015-04-25 Martin Robinson <mrobinson@igalia.com>
928 Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
929 https://bugs.webkit.org/show_bug.cgi?id=144182
931 Reviewed by Simon Fraser.
933 * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
935 2015-04-24 Simon Fraser <simon.fraser@apple.com>
937 Have the web inspector report accurate memory use for layers with detached backing store
938 https://bugs.webkit.org/show_bug.cgi?id=144179
940 Reviewed by Dean Jackson.
942 Remote layers can make their backing store volatile, so the backing only contributes
943 to reported memory use when attached.
945 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
947 2015-04-24 Andreas Kling <akling@apple.com>
949 theverge.com burning 100% CPU on iPad (due to window.screenX/Y)
950 <https://webkit.org/b/144175>
951 <rdar://problem/20694585>
953 Reviewed by Anders Carlsson.
955 Return an empty window rect on iOS WK2 builds. This avoids sending a synchronous
956 IPC request to the UI process that would give the same result, but spend way
957 more time and CPU cycles to do so.
959 With this change, theverge.com CPU usage goes from 100% to ~20% when idle.
961 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
962 (WebKit::WebChromeClient::windowRect):
964 2015-04-24 Brent Fulgham <bfulgham@apple.com>
966 TextIndicator for embedded PDFs is slightly offset
967 https://bugs.webkit.org/show_bug.cgi?id=144172
968 <rdar://problem/20691304>
970 Reviewed by Tim Horton.
972 When I converted the existing DOM Range logic to work with PDFSelections, I omitted the
973 step where the font ascent was used to adjust the origin used for the TextIndicator. This
974 patch determines the correct ascent for the range of characters in the selection, and
975 adjusts the offset by the difference between the ascent and the height of the selection rect.
977 Also, since the PDFSelection only supplies the bounding rect for the selection, I calculate
978 an equivalent text bounding box by insetting the rect by half the size of the ascent.
980 * WebProcess/Plugins/PDF/PDFPlugin.mm:
981 (WebKit::PDFPlugin::scaleFactor): Add accessor for PDF scale factor.
982 * WebProcess/Plugins/PDF/PDFPlugin.h:
983 * WebProcess/WebPage/mac/WebPageMac.mm:
984 (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Adjusted to take the
985 font ascent and scale factor into account.
987 2015-04-24 David Kilzer <ddkilzer@apple.com>
989 REGRESSION (r183293): Fix iOS EWS build by adding SPI declaration for +[UIPeripheralHost visiblePeripheralFrame]
991 Fixes the following build failures:
993 WebKit2/UIProcess/ios/WKPDFView.mm:740:45: error: class method '+visiblePeripheralFrame' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
994 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
995 ^~~~~~~~~~~~~~~~~~~~~~
996 WebKit2/UIProcess/ios/WKPDFView.mm:740:12: error: no viable conversion from 'id' to 'CGRect'
997 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
998 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1000 * Platform/spi/ios/UIKitSPI.h:
1001 (+[UIPeripheralHost visiblePeripheralFrame]): Add declaration.
1003 2015-04-24 Anders Carlsson <andersca@apple.com>
1005 Change _WKWebsiteDataStore to hold on to an internal WKWebsiteDataStore
1006 https://bugs.webkit.org/show_bug.cgi?id=144171
1008 Reviewed by Tim Horton.
1010 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1011 (-[WKWebViewConfiguration _websiteDataStore]):
1012 (-[WKWebViewConfiguration _setWebsiteDataStore:]):
1013 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1014 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1015 (-[_WKWebsiteDataStore initWithDataStore:]):
1016 (+[_WKWebsiteDataStore defaultDataStore]):
1017 (+[_WKWebsiteDataStore nonPersistentDataStore]):
1018 (-[_WKWebsiteDataStore isNonPersistent]):
1019 (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1020 (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1021 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1022 * UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
1023 * WebKit2.xcodeproj/project.pbxproj:
1025 2015-04-24 Tim Horton <timothy_horton@apple.com>
1027 WKPDFView does not support password-protected PDFs
1028 https://bugs.webkit.org/show_bug.cgi?id=144162
1029 <rdar://problem/18411512>
1031 Reviewed by Andy Estes.
1033 * Platform/spi/ios/UIKitSPI.h:
1036 * UIProcess/ios/WKPDFView.h:
1037 * UIProcess/ios/WKPDFView.mm:
1038 (-[WKPDFView _didLoadPDFDocument]):
1039 (-[WKPDFView web_setContentProviderData:suggestedFilename:]):
1040 Move creation of the UIPDFDocument (only possible if the CGPDFDocument is unlocked)
1041 and initial setup of the page views out into _didLoadPDFDocument.
1043 If the CGPDFDocument is locked, we'll show some UI to unlock it; otherwise
1044 we'll continue on to _didLoadPDFDocument as previously.
1046 (-[WKPDFView web_setMinimumSize:]):
1047 Resize the password UI instead of the PDF pages if we have it.
1049 (-[WKPDFView _computePageAndDocumentFrames]):
1050 Don't bother doing any work revalidating PDF pages if the document is locked.
1052 (-[WKPDFView _updatePasswordEntryField]):
1053 Make sure that the UIDocumentPassword view is always the size of the scrollview.
1054 This takes care of rotation.
1056 (-[WKPDFView _keyboardDidShow:]):
1057 Make sure that we scroll the password field around, if necessary, to keep it
1058 on screen when editing begins.
1060 (-[WKPDFView _showPasswordEntryField]):
1061 (-[WKPDFView _hidePasswordEntryField]):
1062 Adjust the background color (to match the UIDocumentPasswordView) and disable zooming
1063 while it's up. The UIDocumentPassword view is installed into the scroll view
1064 to match UIWebView behavior.
1066 (-[WKPDFView userDidEnterPassword:forPasswordView:]):
1067 (-[WKPDFView didBeginEditingPassword:inView:]):
1068 (-[WKPDFView didEndEditingPassword:inView:]):
1069 (-[WKPDFView _didFailToUnlock]):
1070 Pop up a dialog informing the user that they entered the wrong password.
1072 (-[WKPDFView _tryToUnlockWithPassword:]):
1073 Try to unlock the document. If it succeeds, hide the unlock UI and go back to
1074 _didLoadPDFDocument.
1076 2015-04-24 Commit Queue <commit-queue@webkit.org>
1078 Unreviewed, rolling out r183266.
1079 https://bugs.webkit.org/show_bug.cgi?id=144164
1081 Broke 32-bit build and a test. (Requested by ap on #webkit).
1085 "AX: richer text change notifications (142719)"
1086 https://bugs.webkit.org/show_bug.cgi?id=142719
1087 http://trac.webkit.org/changeset/183266
1089 2015-04-24 Brent Fulgham <bfulgham@apple.com>
1091 REGRESSION: WebKit2.ActionMenusTest API test fails
1092 https://bugs.webkit.org/show_bug.cgi?id=144149
1093 <rdar://problem/20677770>
1095 Reviewed by Tim Horton.
1097 Tested by TestWebKitAPI
1099 The 'lookupTextAtLocation' method was not converting the NSEvent coordinates it
1100 was receiving from root view to the plugin view. Consequently, full page PDFs
1101 did hit testing correctly, but an <embed> PDF would not.
1103 Since 'existingSelectionContainsPoint' is exposed as API, I also modified it to
1104 expect 'root view' coordinates and perform the requisite conversions, rather
1105 than expecting 'plugin view' coordinates.
1107 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1108 (WebKit::PDFPlugin::existingSelectionContainsPoint): Expect 'root view' coordinates
1110 (WebKit::PDFPlugin::lookupTextAtLocation): Properly convert the passed 'root view'
1111 coordinates to the PDF's view coordinate space.
1112 * WebProcess/WebPage/mac/WebPageMac.mm:
1113 (WebKit::WebPage::performActionMenuHitTestAtLocation): Pass hit point using view coordinates,
1114 not content coordinates.
1116 2015-04-24 Anders Carlsson <andersca@apple.com>
1118 Address a review comment from Joe Pecoraro.
1120 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1122 2015-04-24 Anders Carlsson <andersca@apple.com>
1124 Rename -[WKWebsiteDataStore isNonPersistent] to -[WKWebsiteDataStore isPersistent]
1125 https://bugs.webkit.org/show_bug.cgi?id=144158
1127 Reviewed by Beth Dakin.
1129 * UIProcess/API/APIWebsiteDataStore.cpp:
1130 (API::WebsiteDataStore::isPersistent):
1131 (API::WebsiteDataStore::isNonPersistent): Deleted.
1132 * UIProcess/API/APIWebsiteDataStore.h:
1133 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1134 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1135 (-[WKWebsiteDataStore isPersistent]):
1136 (-[WKWebsiteDataStore isNonPersistent]): Deleted.
1137 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1138 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1139 (-[_WKWebsiteDataStore isNonPersistent]):
1140 * UIProcess/WebsiteData/WebsiteDataStore.h:
1142 2015-04-24 Brent Fulgham <bfulgham@apple.com>
1144 Immediate action not functional for embedded PDFs
1145 https://bugs.webkit.org/show_bug.cgi?id=143952
1146 <rdar://problem/19842365>
1148 Reviewed by Tim Horton.
1150 Add a new method to retrieve appropriate dictionary lookup content and update the
1151 hit test result with relevant dictionary content and the bounding rect of the
1154 * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add stub.
1155 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Initialize plugin type.
1156 * WebProcess/Plugins/PDF/PDFPlugin.h:
1157 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1158 (WebKit::rectInWindowSpaceForRectInLayoutSpace): New helper function to
1159 convert PDF 'in page' units to the equivalent view units.
1160 (WebKit::PDFPlugin::PDFPlugin): Initialize plugin type.
1161 (WebKit::PDFPlugin::viewRectForSelection): Query a provided PDFSelection for
1162 its bounding rect and return the result in view units.
1163 * WebProcess/Plugins/Plugin.h:
1164 * WebProcess/Plugins/PluginProxy.cpp: Initialize plugin type.
1165 * WebProcess/Plugins/PluginProxy.h: Add stub.
1166 * WebProcess/Plugins/PluginView.cpp:
1167 (WebKit::PluginView::viewRectForSelection): Added.
1168 * WebProcess/Plugins/PluginView.h:
1169 * WebProcess/WebPage/WebPage.h:
1170 * WebProcess/WebPage/mac/WebPageMac.mm:
1171 (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Added.
1172 (WebKit::textIndicatorTransitionForActionMenu): Added helper function.
1173 (WebKit::WebPage::performActionMenuHitTestAtLocation): Update the hit test information
1174 with relevant dictionary lookup content, and mark the result as a text node (if
1177 2015-04-24 Jer Noble <jer.noble@apple.com>
1179 [WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state actually changed.
1180 https://bugs.webkit.org/show_bug.cgi?id=144153
1182 Reviewed by Alexey Proskuryakov.
1184 Check the old state vs. the new state and only issue the change notification if the IsPlayingAudio state changed.
1186 * UIProcess/WebPageProxy.cpp:
1187 (WebKit::WebPageProxy::isPlayingMediaDidChange):
1189 2015-04-24 Antti Koivisto <antti@apple.com>
1191 CrashTracer: [USER] com.apple.WebKit.Networking at com.apple.WebKit: WebKit::NetworkResourceLoader::~NetworkResourceLoader + 14
1192 https://bugs.webkit.org/show_bug.cgi?id=144147
1194 Reviewed by Chris Dumez.
1196 Storage::storeBodyAsBlob copies the std::function callback for handling mapped bodies in a thread.
1197 This is thread safe only if the function copy is thread safe. It is currently not as we are capturing
1198 RefPtr<NetworkResourceLoader> and NetworkResourceLoader doesn't use thread safe refcounting.
1200 Fix by avoiding copying of the callback. Use same apporach for WriteOperation as we already use for
1201 ReadOperation: count the active operations in progress and delete WriteOperation when everything is
1202 finished. This way we don't need to copy the function out from WriteOperation.
1204 * NetworkProcess/cache/NetworkCacheStorage.cpp:
1205 (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
1206 (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
1208 Move definition here from the header.
1210 (WebKit::NetworkCache::Storage::~Storage):
1211 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
1213 Increment the operation count when storing a blob, call finishWriteOperation when done.
1215 (WebKit::NetworkCache::Storage::dispatchReadOperation):
1216 (WebKit::NetworkCache::Storage::finishReadOperation):
1218 Count active operations instead of finished operations. This makes the code clearer.
1220 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
1221 (WebKit::NetworkCache::Storage::finishWriteOperation):
1223 Mirror the way ReadOperations work.
1225 * NetworkProcess/cache/NetworkCacheStorage.h:
1226 (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation): Deleted.
1228 2015-04-24 Timothy Hatcher <timothy@apple.com>
1230 REGRESSION: Web Inspector: Start Timeline Recording in Develop menu broken
1231 https://bugs.webkit.org/show_bug.cgi?id=144150
1233 Reviewed by Brian Burg.
1235 * WebProcess/WebPage/WebInspectorUI.cpp:
1236 (WebKit::WebInspectorUI::evaluateCommandOnLoad): Properly treat bools as literals
1237 instead of strings by not using the string version of evaluateCommandOnLoad.
1239 2015-04-23 Anders Carlsson <andersca@apple.com>
1241 Add headerdocs for WKWebsiteDataRecord and WKWebsiteDataStore
1242 https://bugs.webkit.org/show_bug.cgi?id=144138
1244 Reviewed by Darin Adler.
1246 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1247 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1248 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1249 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1250 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1251 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1253 2015-04-24 Doug Russell <d_russell@apple.com>
1255 AX: richer text change notifications (142719)
1256 https://bugs.webkit.org/show_bug.cgi?id=142719
1258 Reviewed by Darin Adler.
1260 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.
1262 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.
1264 * UIProcess/WebEditCommandProxy.cpp:
1265 (WebKit::WebEditCommandProxy::nameForEditAction):
1267 2015-04-24 Darin Adler <darin@apple.com>
1269 Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
1270 https://bugs.webkit.org/show_bug.cgi?id=128007
1272 Reviewed by Anders Carlsson.
1274 * NetworkProcess/cache/NetworkCacheEncoder.h: Added an include now
1275 needed that was inherited from OwnPtr.h before.
1277 2015-04-24 Antti Koivisto <antti@apple.com>
1279 Network Cache: Make path functions members
1280 https://bugs.webkit.org/show_bug.cgi?id=144146
1282 Reviewed by Carlos Garcia Campos.
1284 This simplifies the code.
1286 * NetworkProcess/cache/NetworkCacheStorage.cpp:
1287 (WebKit::NetworkCache::Storage::partitionPathForKey):
1288 (WebKit::NetworkCache::Storage::recordPathForKey):
1289 (WebKit::NetworkCache::Storage::bodyPathForKey):
1290 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
1291 (WebKit::NetworkCache::Storage::remove):
1292 (WebKit::NetworkCache::Storage::dispatchReadOperation):
1293 (WebKit::NetworkCache::Storage::finishReadOperation):
1294 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
1295 (WebKit::NetworkCache::partitionPathForKey): Deleted.
1296 (WebKit::NetworkCache::recordPathForKey): Deleted.
1297 (WebKit::NetworkCache::bodyPathForKey): Deleted.
1298 * NetworkProcess/cache/NetworkCacheStorage.h:
1300 2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
1302 Unreviewed. Remove incorrect assert after r183189.
1304 In this case the assert was already there, but it's incorrect
1305 because we are handling uninitialized attachments below in the
1306 same function, and also when sending messages. So, if it's ok to
1307 send uninitialized attachments, it's ok to receive them. This
1308 didn't fail before r183189, because we were only invaliding the
1309 attachments by setting the file descriptor to -1, and they were
1310 handled as null attachments. After r183189, the move operator
1311 resets the moved attachment leaving it uninitialized again.
1313 * Platform/IPC/unix/ConnectionUnix.cpp:
1314 (IPC::Connection::processMessage):
1316 2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
1318 [SOUP] Use a webkit subdirectory for the disk cache
1319 https://bugs.webkit.org/show_bug.cgi?id=144048
1321 Reviewed by Martin Robinson.
1323 Recent versions of libsoup remove any file in cache dir not
1324 referenced by the index when the cache is loaded to workaround
1325 leaked resources when load/dump is unbalanced for whatever reason,
1326 like a crash. We currently use $XDG_CACHE_HOME/app-name as default
1327 disk cache directory, but that directory could be used by apps to
1328 cache other things, and the soup cache might end up deleting other
1329 stuff. The soup cache assumes the given directory is only for the
1330 disk cache, so we should ensure that.
1332 * NetworkProcess/soup/NetworkProcessSoup.cpp:
1333 (WebKit::NetworkProcess::platformInitializeNetworkProcess): Append
1334 webkit to the given disk cache and clear the previous soup cache if it exists.
1335 * WebProcess/soup/WebProcessSoup.cpp:
1336 (WebKit::WebProcess::platformInitializeWebProcess): Ditto.
1338 2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
1340 Unreviewed. Remove incorrect ASSERT added in r183176.
1342 We allow to encode null attachments.
1344 * Platform/unix/SharedMemoryUnix.cpp:
1345 (WebKit::SharedMemory::Handle::releaseAttachment):
1347 2015-04-23 Dan Bernstein <mitz@apple.com>
1349 <rdar://problem/20680694> Framework header postprocessing isn’t removing WK_DEPRECATED macros when it should.
1351 Reviewed by Andy Estes.
1353 * mac/postprocess-framework-headers.sh:
1355 2015-04-23 Simon Fraser <simon.fraser@apple.com>
1357 Make it possible to detach GraphicsLayerCA backing store
1358 https://bugs.webkit.org/show_bug.cgi?id=144140
1360 Reviewed by Tim Horton.
1362 This changes makes it possible to denote a GraphicsLayerCA's backing store
1363 as "attached" or not. When not attached, the backing store is made volatile
1364 and can be purged. This will be used in a future patch.
1366 * Shared/mac/RemoteLayerBackingStore.mm:
1367 (WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore): Whitespace.
1368 (WebKit::RemoteLayerBackingStore::display): If backingStoreWillBeDisplayed()
1369 returns true, this indicates that the backing store was brought out of the
1370 "unreachable" list, so return true even if the backing store doesn't require
1372 * Shared/mac/RemoteLayerBackingStoreCollection.h: C++11 initializer, and comments.
1373 * Shared/mac/RemoteLayerBackingStoreCollection.mm:
1374 (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
1375 (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed): Return true
1376 if the caller will need to submit the backing store in the current transaction.
1377 (WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable): This
1378 explicit dirtying is no longer necessary given the backingStoreWillBeDisplayed() change.
1379 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1380 (WebKit::applyPropertiesToLayer): Only set the layer's backing if we both have backing
1381 store, and it's attached.
1382 * Shared/mac/RemoteLayerTreeTransaction.h: New bit, and data member.
1383 * Shared/mac/RemoteLayerTreeTransaction.mm:
1384 (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
1385 (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1386 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1387 (WebKit::dumpChangedLayers):
1388 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1389 (WebKit::PlatformCALayerRemote::recursiveBuildTransaction): Only call display()
1390 on the backing store if it's attached.
1391 (WebKit::PlatformCALayerRemote::setBackingStoreAttached):
1392 (WebKit::PlatformCALayerRemote::backingStoreAttached):
1393 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1394 * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
1395 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1396 (WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):
1398 2015-04-23 Tim Horton <timothy_horton@apple.com>
1400 Quick Look preview popover is not dismissed on scroll in Mail
1401 https://bugs.webkit.org/show_bug.cgi?id=144119
1402 <rdar://problem/19752045>
1404 Reviewed by Anders Carlsson.
1406 * UIProcess/API/mac/WKView.mm:
1407 (-[WKView renewGState]):
1408 If we have a TextIndicator, dismiss all content relative child windows
1409 on renewGState, not just the TextIndicator itself.
1411 This will fix cases like Mail, where WebKit isn't driving the scrolling,
1412 and we have no way (except renewGState) to know that scrolling is happening.
1414 2015-04-23 Simon Fraser <simon.fraser@apple.com>
1416 Changing TiledBacking velocity should schedule a tile revalidation
1417 https://bugs.webkit.org/show_bug.cgi?id=144123
1419 Reviewed by Tim Horton.
1421 Drive-by fix: use the FrameView& that we have already.
1423 * WebProcess/WebPage/ios/WebPageIOS.mm:
1424 (WebKit::WebPage::updateVisibleContentRects):
1426 2015-04-23 Jer Noble <jer.noble@apple.com>
1428 [Mac] Disable QTKit by default on future OS X.
1429 https://bugs.webkit.org/show_bug.cgi?id=144082
1431 Reviewed by Darin Adler.
1433 QTKitEnabled defaults to false.
1435 * Shared/WebPreferencesDefinitions.h:
1437 2015-04-23 Jer Noble <jer.noble@apple.com>
1439 [WK2][Mac] Tweak the timing curve of the WebKit Fullscreen animation
1440 https://bugs.webkit.org/show_bug.cgi?id=144120
1442 Reviewed by Eric Carlson.
1444 Tweak the curve to ease-in faster when the fullscreen animation duration is short.
1446 * UIProcess/mac/WKFullScreenWindowController.mm:
1447 (timingFunctionForDuration):
1452 2015-04-23 Enrica Casucci <enrica@apple.com>
1454 iOS build fix after r183208.
1458 * UIProcess/ios/WKContentViewInteraction.mm:
1460 2015-04-22 Alexey Proskuryakov <ap@apple.com>
1462 [iOS] WebKit services should inherit environment variables for home
1463 https://bugs.webkit.org/show_bug.cgi?id=144078
1464 rdar://problem/20571678
1466 Reviewed by Dan Bernstein.
1468 Pass current environment variables as XPC bootstrap. Also while at it, made
1469 _CFBundleSetupXPCBootstrap not soft linked.
1471 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
1473 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1474 (WebKit::connectToService):
1476 2015-04-23 Enrica Casucci <enrica@apple.com>
1478 Support share button.
1479 https://bugs.webkit.org/show_bug.cgi?id=144077
1480 rdar://problem/19772892
1482 Reviewed by Darin Adler.
1484 * UIProcess/ios/WKContentViewInteraction.mm:
1485 (-[WKContentView _share:]):
1486 (-[WKContentView canPerformAction:withSender:]):
1487 (-[WKContentView _define:]):
1488 (-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
1489 (-[WKContentView moveByOffset:]):
1490 (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
1491 (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
1492 (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
1493 (-[WKContentView accessoryTab:]):
1494 (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
1495 (-[WKContentView executeEditCommandWithCallback:]):
1497 2015-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
1499 [UNIX] Do not allow copies of IPC::Attachment
1500 https://bugs.webkit.org/show_bug.cgi?id=144096
1502 Reviewed by Darin Adler.
1504 It ensures that the file descriptor ownership is always correctly
1505 transferred. This way we can remove the dispose() method to
1506 explicitly close the file descriptor and always close it in the
1507 Attachment destructor (unless explicitly transferred to
1508 IPC::Connection or SharedMemory). It simplifies the code and
1509 ensure we don't leak file descriptors.
1511 * Platform/IPC/ArgumentDecoder.cpp:
1512 (IPC::ArgumentDecoder::~ArgumentDecoder): Remove the code to
1513 explicitly dispose attachments.
1514 (IPC::ArgumentDecoder::removeAttachment): Use WTF::move().
1515 * Platform/IPC/ArgumentEncoder.cpp:
1516 (IPC::ArgumentEncoder::~ArgumentEncoder): Remove the code to
1517 explicitly dispose attachments.
1518 (IPC::ArgumentEncoder::addAttachment): Use WTF::move().
1519 (IPC::ArgumentEncoder::releaseAttachments): Simplify by using WTF::move().
1520 * Platform/IPC/ArgumentEncoder.h:
1521 * Platform/IPC/Attachment.cpp:
1522 (IPC::Attachment::encode): Move a copy of the attachment, and
1523 reset the file descriptor, since the ownership is passed to the encoder.
1524 * Platform/IPC/Attachment.h: Make copy constructor and assignment
1525 private to not allow public copies. The only copy allowed is done
1526 by Attachment::encode(). Make m_fileDescriptor mutable so that we
1527 can reset it in Attachment::encode() after passing the ownership
1529 * Platform/IPC/unix/AttachmentUnix.cpp:
1530 (IPC::Attachment::~Attachment): Close the file descriptor if it
1531 hasn't been released explicitly.
1532 (IPC::Attachment::dispose): Deleted.
1533 * Platform/IPC/unix/ConnectionUnix.cpp:
1534 (IPC::Connection::processMessage): Do not use AttachmentResourceGuard.
1535 (IPC::Connection::sendOutgoingMessage): Ditto.
1536 (IPC::AttachmentResourceGuard::AttachmentResourceGuard): Deleted.
1537 (IPC::AttachmentResourceGuard::~AttachmentResourceGuard): Deleted.
1538 * Platform/unix/SharedMemoryUnix.cpp:
1539 (WebKit::SharedMemory::Handle::~Handle): Do not call clear().
1540 (WebKit::SharedMemory::Handle::clear): Reset the attachment.
1541 * UIProcess/WebInspectorProxy.cpp:
1542 (WebKit::WebInspectorProxy::createInspectorPage): Use WTF::move().
1543 * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1544 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1545 Call releaseFileDescriptor() instead of fileDescritpro() since the
1546 ownership is passed to the connection.
1548 2015-04-23 Alexey Proskuryakov <ap@apple.com>
1552 * WebProcess/cocoa/WebProcessCocoa.mm: Correct the case of an include file name.
1554 2015-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
1556 Unreviewed. Fix debug build after r183176.
1558 * Platform/unix/SharedMemoryUnix.cpp:
1559 (WebKit::SharedMemory::Handle::decode):
1560 (WebKit::SharedMemory::createHandle):
1562 2015-04-23 Andreas Kling <akling@apple.com>
1564 There should only be one way to get the system memory size.
1565 <https://webkit.org/b/144081>
1567 Reviewed by Antti Koivisto.
1569 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1570 (WebKit::NetworkProcess::platformSetCacheModel):
1571 (WebKit::memorySize): Deleted.
1572 * WebProcess/cocoa/WebProcessCocoa.mm:
1573 (WebKit::WebProcess::platformSetCacheModel):
1574 (WebKit::memorySize): Deleted.
1576 2015-04-23 Chris Dumez <cdumez@apple.com>
1578 [WK2] WebDiagnosticLoggingClient is leaking
1579 https://bugs.webkit.org/show_bug.cgi?id=144089
1580 <rdar://problem/19706214>
1582 Reviewed by Darin Adler.
1584 WebDiagnosticLoggingClient is leaking. It is constructed inside WebPage
1585 constructor but there is no code destroying it.
1587 This patch adds a new xxxDestroyed() virtual function to
1588 DiagnosticLoggingClient and that is overriden in
1589 WebDiagnosticLoggingClient to call "delete this". This is the same
1590 pattern as for other WK2 clients (e.g. WebFrameLoaderClient,
1591 WebProgressTrackerClient).
1593 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
1594 (WebKit::WebDiagnosticLoggingClient::mainFrameDestroyed):
1595 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
1597 2015-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
1599 [UNIX] Simplify the file descriptor handling in SharedMemory
1600 https://bugs.webkit.org/show_bug.cgi?id=144046
1602 Reviewed by Darin Adler.
1604 Simplify the file descriptor handling and clarify its ownership by
1605 using IPC::Attachment in SharedMemory::Handle instead of fd and
1606 size members. SharedMemory::Handle::adoptFromAttachment() has been
1607 renamed as SharedMemory::Handle::adoptAttachment() and receives an
1608 IPC::Attachment. And SharedMemory::Handle::releaseToAttachment()
1609 has been renamed as SharedMemory::Handle::releaseAttachment().
1611 * Platform/IPC/Attachment.h: Add move constructor and move assigned operator.
1612 * Platform/IPC/Connection.h:
1613 (IPC::Connection::identifierIsNull): A file descriptor is null
1615 * Platform/IPC/unix/AttachmentUnix.cpp:
1616 (IPC::Attachment::Attachment):
1617 (IPC::Attachment::operator=):
1618 (IPC::Attachment::dispose): Reset the file descriptor after
1620 * Platform/IPC/unix/ConnectionUnix.cpp:
1621 (IPC::Connection::processMessage): Use
1622 SharedMemory::Handle::adoptAttachment() that receives an
1623 IPC::Attachment now.
1624 (IPC::Connection::sendOutgoingMessage): Use
1625 SharedMemory::Handle::releaseAttachment().
1626 * Platform/SharedMemory.h:
1627 * Platform/unix/SharedMemoryUnix.cpp:
1628 (WebKit::SharedMemory::Handle::Handle): Remove initializers for
1629 file descriptor and size members.
1630 (WebKit::SharedMemory::Handle::clear): Dispose the attachment.
1631 (WebKit::SharedMemory::Handle::isNull): Handle is null if the
1632 attachment file descriptor is -1.
1633 (WebKit::SharedMemory::Handle::encode): Use releaseAttachment().
1634 (WebKit::SharedMemory::Handle::decode): Use adoptAttachment().
1635 (WebKit::SharedMemory::Handle::releaseAttachment): Implement it
1637 (WebKit::SharedMemory::Handle::adoptAttachment): Ditto.
1638 (WebKit::SharedMemory::map): Use
1639 IPC::Attachment::releaseFileDescriptor() instead of manually
1640 changing the member.
1641 (WebKit::SharedMemory::createHandle): Initialize the handle
1642 attachment with the duplicated file descriptor and size.
1644 2015-04-22 Darin Adler <darin@apple.com>
1646 Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
1647 https://bugs.webkit.org/show_bug.cgi?id=143943
1649 Reviewed by Anders Carlsson.
1651 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
1652 Removed unneeded include.
1654 2015-04-22 Brent Fulgham <bfulgham@apple.com>
1656 VisibleSelection should only accept Range by reference
1657 https://bugs.webkit.org/show_bug.cgi?id=144047
1659 Reviewed by Tim Horton.
1661 Update all uses of VisibleSelection to pass a Range reference instead
1664 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1665 (WebKit::InjectedBundleRangeHandle::renderedImage):
1666 * WebProcess/WebPage/FindController.cpp:
1667 (WebKit::FindController::getImageForFindMatch):
1668 (WebKit::FindController::selectFindMatch):
1669 * WebProcess/WebPage/WebPage.cpp:
1670 (WebKit::WebPage::insertTextAsync):
1671 (WebKit::WebPage::setCompositionAsync):
1672 * WebProcess/WebPage/mac/WebPageMac.mm:
1673 (WebKit::WebPage::insertDictatedTextAsync):
1675 2015-04-22 Anders Carlsson <andersca@apple.com>
1677 Add WK_ARRAY and WK_SET annotations
1678 https://bugs.webkit.org/show_bug.cgi?id=144075
1679 rdar://problem/19417770
1681 Reviewed by Dan Bernstein.
1683 * Shared/API/Cocoa/WKFoundation.h:
1684 * UIProcess/API/Cocoa/WKBackForwardList.h:
1685 * UIProcess/API/Cocoa/WKUserContentController.h:
1686 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1687 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1688 * mac/postprocess-framework-headers.sh:
1690 2015-04-22 Brent Fulgham <bfulgham@apple.com>
1692 Unreviewed build fix after r183136.
1694 * WebProcess/WebPage/mac/WebPageMac.mm: Correct capitalization of
1695 'HTMLPluginImageElement.h' -> 'HTMLPlugInImageElement.h'
1697 2015-04-21 Brent Fulgham <bfulgham@apple.com>
1699 Extend action menus to support PDF
1700 https://bugs.webkit.org/show_bug.cgi?id=143895
1701 <rdar://problem/19003333>
1703 Reviewed by Tim Horton.
1705 If the mouse pointer is over a PDF, try to provide a relevant action menu for whatever
1706 content is under the mouse. For now, we only support copying text and handling URLs.
1708 If no text is selected, use the dictionary lookup service to find a semantically appropriate
1709 selection underneath the mouse. This is consistent with how normal text is treated in pure HTML
1710 views. If some text is already selected, and the mouse is over the existing selection, continue
1711 using the selected text. Otherwise, discard the old selection and select the most appropriate
1712 region under the mouse pointer.
1714 * Shared/API/c/WKActionMenuTypes.h: Add PDF menu option.
1715 * Shared/WebMouseEvent.cpp: Recognize mouse force events as valid mouse events.
1716 * UIProcess/mac/WKActionMenuController.mm:
1717 (-[WKActionMenuController _defaultMenuItemsForPDF]): Add simply copy text option.
1718 (-[WKActionMenuController _defaultMenuItems]): Recognize PDFs and add relevant action
1720 * WebProcess/Plugins/Netscape/NetscapePlugin.h: Provide stub for new method.
1721 * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Expose 'rectsForSelectionInLayerSpace',
1722 'rectsForAnnotationInLayoutSpace', 'layout', and 'currentPage'.
1723 * WebProcess/Plugins/PDF/PDFPlugin.h:
1724 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1725 (WebKit::PDFPlugin::getSelectionForWordAtPoint): Added.
1726 (WebKit::PDFPlugin::existingSelectionContainsPoint): Added.
1727 (WebKit::PDFPlugin::lookupTextAtLocation): Added.
1728 * WebProcess/Plugins/Plugin.h: Add declaration for new 'getSelectionForWordAtPoint' method.
1729 * WebProcess/Plugins/PluginProxy.h: Provide stub for new method.
1730 * WebProcess/Plugins/PluginView.cpp:
1731 (WebKit::PluginView::getSelectionForWordAtPoint): Added.
1732 (WebKit::PluginView::existingSelectionContainsPoint): Added.
1733 (WebKit::PluginView::lookupTextAtLocation): Added.
1734 * WebProcess/Plugins/PluginView.h:
1735 * WebProcess/WebPage/mac/WebPageMac.mm:
1736 (WebKit::WebPage::performActionMenuHitTestAtLocation): Update to support PDF documents and retrieve
1737 relevant content to support later action menu handling.
1739 2015-04-22 Eric Carlson <eric.carlson@apple.com>
1741 Update AirPlay sandbox rules
1742 https://bugs.webkit.org/show_bug.cgi?id=144062
1743 <rdar://problem/19869448>
1745 Reviewed by Alexey Proskuryakov.
1747 * WebProcess/com.apple.WebProcess.sb.in: Remove obsolete rules.
1749 2015-04-22 Alexey Proskuryakov <ap@apple.com>
1751 [Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
1752 https://bugs.webkit.org/show_bug.cgi?id=144052
1753 rdar://problem/19754404
1755 Reviewed by Darin Adler.
1757 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
1758 (main): Make XPC transaction tracking work again after a re-exec.
1760 2015-04-22 Zan Dobersek <zdobersek@igalia.com>
1762 [WK2] Have API::Array creation methods return Ref<>
1763 https://bugs.webkit.org/show_bug.cgi?id=143933
1765 Reviewed by Darin Adler.
1767 API::Array::create() and API::Array::createStringArray() should return Ref<> objects
1768 as the return values are never null. It's up to the caller to implicitly convert the
1769 returned objects to RefPtr<> if so required. All the call-sites have been updated to
1772 * Shared/API/APIArray.cpp:
1773 (API::Array::create):
1774 (API::Array::createStringArray):
1776 * Shared/API/APIArray.h:
1777 * Shared/API/APIDictionary.cpp:
1778 (API::Dictionary::keys):
1779 * Shared/API/APIDictionary.h:
1780 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1781 (ensureObjectStream):
1782 * Shared/API/c/WKArray.cpp:
1784 (WKArrayCreateAdoptingValues):
1785 * Shared/API/c/WKContextMenuItem.cpp:
1786 (WKContextMenuCopySubmenuItems):
1787 * Shared/API/c/WKDictionary.cpp:
1788 (WKDictionaryCopyKeys):
1789 * Shared/API/c/WKMutableArray.cpp:
1790 (WKMutableArrayCreate):
1791 * Shared/Cocoa/WKNSDictionary.mm:
1792 (-[WKNSDictionary keyEnumerator]):
1793 * Shared/SecurityOriginData.cpp:
1794 (WebKit::performAPICallbackWithSecurityOriginDataVector):
1795 * Shared/WebContextMenuItem.cpp:
1796 (WebKit::WebContextMenuItem::submenuItemsAsAPIArray):
1797 * Shared/WebContextMenuItem.h:
1798 * Shared/WebOpenPanelParameters.cpp:
1799 (WebKit::WebOpenPanelParameters::acceptMIMETypes):
1800 (WebKit::WebOpenPanelParameters::selectedFileNames):
1801 * Shared/WebOpenPanelParameters.h:
1802 * UIProcess/API/C/WKBackForwardListRef.cpp:
1803 (WKBackForwardListCopyBackListWithLimit):
1804 (WKBackForwardListCopyForwardListWithLimit):
1805 * UIProcess/API/C/WKGrammarDetail.cpp:
1806 (WKGrammarDetailCopyGuesses):
1807 * UIProcess/API/C/WKOpenPanelParameters.cpp:
1808 (WKOpenPanelParametersCopyAcceptedMIMETypes):
1809 (WKOpenPanelParametersCopySelectedFileNames):
1810 * UIProcess/API/C/WKPage.cpp:
1811 (WKPageSetPageContextMenuClient):
1812 (WKPageCopyRelatedPages):
1813 * UIProcess/API/Cocoa/WKBackForwardList.mm:
1814 (-[WKBackForwardList backList]):
1815 (-[WKBackForwardList forwardList]):
1816 * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
1818 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1819 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1820 * UIProcess/API/gtk/WebKitBackForwardList.cpp:
1821 (webkit_back_forward_list_get_back_list_with_limit):
1822 (webkit_back_forward_list_get_forward_list_with_limit):
1823 * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
1824 (webkit_file_chooser_request_get_mime_types):
1825 (webkit_file_chooser_request_get_mime_types_filter):
1826 (webkit_file_chooser_request_select_files):
1827 * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
1828 (WebKitNotificationProvider::notificationCloseCallback):
1829 * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
1830 (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
1831 * UIProcess/Notifications/WebNotificationProvider.cpp:
1832 (WebKit::WebNotificationProvider::clearNotifications):
1833 * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1834 (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
1835 * UIProcess/StatisticsRequest.cpp:
1836 (WebKit::StatisticsRequest::completedRequest):
1837 * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1838 (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
1839 * UIProcess/WebBackForwardList.cpp:
1840 (WebKit::WebBackForwardList::backList):
1841 (WebKit::WebBackForwardList::forwardList):
1842 (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit):
1843 (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit):
1844 * UIProcess/WebBackForwardList.h:
1845 * UIProcess/WebCookieManagerProxy.cpp:
1846 (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
1847 * UIProcess/WebDatabaseManagerProxy.cpp:
1848 (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
1849 (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
1850 * UIProcess/WebGrammarDetail.cpp:
1851 (WebKit::WebGrammarDetail::guesses):
1852 * UIProcess/WebGrammarDetail.h:
1853 * UIProcess/WebKeyValueStorageManager.cpp:
1854 (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1855 (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
1856 * UIProcess/WebMediaCacheManagerProxy.cpp:
1857 (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
1858 * UIProcess/WebOriginDataManagerProxy.cpp:
1859 (WebKit::WebOriginDataManagerProxy::didGetOrigins):
1860 * UIProcess/WebPageProxy.cpp:
1861 (WebKit::WebPageProxy::didFindStringMatches):
1862 * UIProcess/WebProcessPool.cpp:
1863 (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins):
1864 * UIProcess/ios/forms/WKFileUploadPanel.mm:
1865 (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
1866 (-[WKFileUploadPanel presentWithParameters:resultListener:]):
1867 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
1868 (-[WKWebProcessPlugInFrame childFrames]):
1869 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
1870 (WKBundleBackForwardListItemCopyChildren):
1871 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1872 (WKBundleFrameCopyChildFrames):
1873 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1874 (WKBundlePageCopyTrackedRepaintRects):
1875 * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
1876 (WebKit::InjectedBundleBackForwardListItem::children):
1877 * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
1878 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
1879 (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
1880 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1881 (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
1882 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1883 (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
1884 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1885 (WebKit::findLargestFrameInFrameSet):
1886 * WebProcess/WebPage/WebFrame.cpp:
1887 (WebKit::WebFrame::childFrames):
1888 * WebProcess/WebPage/WebFrame.h:
1889 * WebProcess/WebPage/WebPage.cpp:
1890 (WebKit::WebPage::trackedRepaintRects):
1891 * WebProcess/WebPage/WebPage.h:
1893 2015-04-21 Eric Carlson <eric.carlson@apple.com>
1895 [Mac] Use one playback target for all web processes
1896 https://bugs.webkit.org/show_bug.cgi?id=144009
1898 Reviewed by Tim Horton.
1900 Every WebPageProxy uses the WebMediaSessionManager singleton to talk to the playback target
1903 * UIProcess/PageClient.h:
1904 * UIProcess/WebPageProxy.cpp:
1905 (WebKit::WebPageProxy::WebPageProxy):
1906 (WebKit::WebPageProxy::resetState):
1907 (WebKit::WebPageProxy::isPlayingMediaDidChange):
1908 (WebKit::WebPageProxy::addPlaybackTargetPickerClient):
1909 (WebKit::WebPageProxy::removePlaybackTargetPickerClient):
1910 (WebKit::WebPageProxy::showPlaybackTargetPicker):
1911 (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
1912 (WebKit::WebPageProxy::setPlaybackTarget):
1913 (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
1914 (WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
1915 (WebKit::WebPageProxy::devicePickerProxy): Deleted.
1916 (WebKit::WebPageProxy::startingMonitoringPlaybackTargets): Deleted.
1917 (WebKit::WebPageProxy::stopMonitoringPlaybackTargets): Deleted.
1918 (WebKit::WebPageProxy::didChoosePlaybackTarget): Deleted.
1919 * UIProcess/WebPageProxy.h:
1920 (WebKit::WebPageProxy::isPlayingAudio):
1921 * UIProcess/WebPageProxy.messages.in:
1922 * UIProcess/mac/PageClientImpl.h:
1923 * UIProcess/mac/PageClientImpl.mm:
1924 (WebKit::PageClientImpl::mediaSessionManager):
1925 (WebKit::PageClientImpl::createPlaybackTargetPicker): Deleted.
1926 * UIProcess/mac/WebMediaSessionManagerMac.cpp: Added.
1927 (WebKit::WebMediaSessionManagerMac::singleton):
1928 (WebKit::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
1929 (WebKit::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
1930 (WebKit::WebMediaSessionManagerMac::targetPicker):
1931 * UIProcess/mac/WebMediaSessionManagerMac.h: Added.
1932 * WebProcess/Plugins/PluginView.h:
1933 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1934 (WebKit::WebChromeClient::isPlayingMediaDidChange):
1935 (WebKit::WebChromeClient::addPlaybackTargetPickerClient):
1936 (WebKit::WebChromeClient::removePlaybackTargetPickerClient):
1937 (WebKit::WebChromeClient::showPlaybackTargetPicker):
1938 (WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
1939 (WebKit::WebChromeClient::startingMonitoringPlaybackTargets): Deleted.
1940 (WebKit::WebChromeClient::stopMonitoringPlaybackTargets): Deleted.
1941 * WebProcess/WebCoreSupport/WebChromeClient.h:
1942 * WebProcess/WebPage/WebPage.h:
1943 * WebProcess/WebPage/WebPage.messages.in:
1944 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1945 (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
1946 * WebProcess/WebPage/mac/WebPageMac.mm:
1947 (WebKit::WebPage::playbackTargetSelected):
1948 (WebKit::WebPage::playbackTargetAvailabilityDidChange):
1949 (WebKit::WebPage::setShouldPlayToPlaybackTarget):
1951 2015-04-21 Anders Carlsson <andersca@apple.com>
1953 WKWebsiteDataStore doesn't track and remove IndexedDB databases
1954 https://bugs.webkit.org/show_bug.cgi?id=144032
1955 rdar://problem/20242856
1957 Reviewed by Tim Horton.
1959 * DatabaseProcess/DatabaseProcess.cpp:
1960 (WebKit::DatabaseProcess::fetchWebsiteData):
1961 (WebKit::DatabaseProcess::deleteWebsiteData):
1962 (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
1963 * DatabaseProcess/DatabaseProcess.h:
1964 * DatabaseProcess/DatabaseProcess.messages.in:
1965 * Shared/WebsiteData/WebsiteDataTypes.h:
1966 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1967 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
1968 (dataTypesToString):
1969 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
1970 (WebKit::toWebsiteDataTypes):
1971 (WebKit::toWKWebsiteDataTypes):
1972 * UIProcess/Databases/DatabaseProcessProxy.cpp:
1973 (WebKit::generateCallbackID):
1974 (WebKit::DatabaseProcessProxy::~DatabaseProcessProxy):
1975 (WebKit::DatabaseProcessProxy::fetchWebsiteData):
1976 (WebKit::DatabaseProcessProxy::deleteWebsiteData):
1977 (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
1978 (WebKit::DatabaseProcessProxy::didClose):
1979 (WebKit::DatabaseProcessProxy::didFetchWebsiteData):
1980 (WebKit::DatabaseProcessProxy::didDeleteWebsiteData):
1981 (WebKit::DatabaseProcessProxy::didDeleteWebsiteDataForOrigins):
1982 * UIProcess/Databases/DatabaseProcessProxy.h:
1983 * UIProcess/Databases/DatabaseProcessProxy.messages.in:
1984 * UIProcess/WebProcessPool.h:
1985 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1986 (WebKit::WebsiteDataStore::fetchData):
1987 (WebKit::WebsiteDataStore::removeData):
1989 2015-04-21 Anders Carlsson <andersca@apple.com>
1991 Add module maps for WebKit
1992 https://bugs.webkit.org/show_bug.cgi?id=144026
1993 rdar://problem/19665428
1995 Reviewed by Dan Bernstein.
1997 * Configurations/WebKit.xcconfig:
1998 * Modules/OSX.modulemap: Added.
1999 * Modules/iOS.modulemap: Added.
2001 2015-04-21 Tim Horton <timothy_horton@apple.com>
2003 Long pause under _takeViewSnapshot when screen updates are disabled
2004 https://bugs.webkit.org/show_bug.cgi?id=144017
2005 <rdar://problem/20548397>
2007 Reviewed by Simon Fraser.
2009 * UIProcess/API/mac/WKView.mm:
2010 (-[WKView _takeViewSnapshot]):
2011 Use CGSHWCaptureWindowList, for snapshotting that doesn't block on
2012 the next commit, and can succeed while screen updates are disabled
2015 2015-04-21 Chris Dumez <cdumez@apple.com>
2017 [WK2][NetworkCache] Better account of resource revalidations in efficacy logging
2018 https://bugs.webkit.org/show_bug.cgi?id=144014
2020 Reviewed by Antti Koivisto.
2022 Better account of resource revalidations in efficacy logging.
2023 Prevously, resources that were in the cache but needed revalidation
2024 were counted as retrieval successes, which is not entirely accurate.
2026 We now distinguish "is in the cache and is directly usable" from
2027 "is in the cache but needs revalidation". We also log how many of these
2028 revalidations are successful.
2030 * NetworkProcess/NetworkResourceLoader.cpp:
2031 (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2032 * NetworkProcess/cache/NetworkCache.cpp:
2033 (WebKit::NetworkCache::Cache::update):
2034 * NetworkProcess/cache/NetworkCache.h:
2035 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2036 (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
2037 (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
2038 * NetworkProcess/cache/NetworkCacheStatistics.h:
2040 2015-04-21 Dan Bernstein <mitz@apple.com>
2042 [Cocoa] Framework header postprocessing should respect additional definitions
2043 https://bugs.webkit.org/show_bug.cgi?id=144018
2045 Reviewed by Anders Carlsson.
2047 * mac/postprocess-framework-headers.sh: Read definitons from
2048 /usr/local/include/WebKitAdditions/Scripts/postprocess-framework-headers-definitions, and
2049 have them take precedence over OSX_VERSION and IOS_VERSION and supply additional options to
2052 2015-04-21 Anders Carlsson <andersca@apple.com>
2054 Fix block signatures
2055 https://bugs.webkit.org/show_bug.cgi?id=144002
2057 Reviewed by Andreas Kling.
2059 * UIProcess/API/Cocoa/WKUIDelegate.h:
2060 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2061 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2062 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2063 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2064 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2065 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2066 (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2067 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2068 * UIProcess/ios/WKPDFView.mm:
2069 (-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]):
2070 * UIProcess/ios/forms/WKFileUploadPanel.mm:
2071 (-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
2072 (-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
2073 (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
2075 2015-04-21 Timothy Horton <timothy_horton@apple.com>
2077 PDFs still don't snapshot properly in iOS Safari
2078 https://bugs.webkit.org/show_bug.cgi?id=143976
2079 <rdar://problem/18283459>
2081 Reviewed by Anders Carlsson.
2083 * UIProcess/WebPageProxy.cpp:
2084 (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
2085 * UIProcess/WebPageProxy.h:
2086 * UIProcess/API/Cocoa/WKWebView.mm:
2087 (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
2088 Inform the client that we've passed all reasonable layout milestones
2089 as soon as the custom content provider has been handed its data.
2090 WKPDFView, the only custom content provider, synchronously lays out
2091 its subviews upon initial receipt of data, so this works fine for it.
2092 This ensures that clients that normally depend on layout milestones firing
2093 won't break when a custom content view is installed.
2095 (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2096 Fall back to renderInContext: if the custom content view is not parented
2097 when a snapshot is requested.
2099 2015-04-21 Dan Bernstein <mitz@apple.com>
2101 Merged WKBackForwardListItem’s Internal category into the class extension in WKBackForwardListItemInternal.h.
2103 Reviewed by Anders Carlsson.
2105 * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
2106 (-[WKBackForwardListItem _item]):
2107 (-[WKBackForwardListItem _apiObject]):
2108 * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
2110 2015-04-21 Chris Dumez <cdumez@apple.com>
2112 Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
2113 https://bugs.webkit.org/show_bug.cgi?id=143970
2115 Reviewed by Darin Adler.
2117 Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
2118 constructor explicit as it copies the vector and it is easy to call it
2121 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2122 (WebKit::WebIDBServerConnection::setIndexKeys):
2123 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2125 2015-04-20 Dan Bernstein <mitz@apple.com>
2127 Expose more bundle form client functions as WKWebProcessPlugInFormDelegatePrivate methods
2128 https://bugs.webkit.org/show_bug.cgi?id=143973
2130 Reviewed by Anders Carlsson.
2132 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared new
2135 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Declared new frame
2137 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
2138 (-[WKWebProcessPlugInNodeHandle frame]): Added. Returns the node’s document’s frame. This is
2139 useful to delegates getting an array of nodes via the new method.
2141 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2142 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added overrides of
2143 shouldNotifyOnFormChanges and didAssociateFormControls, which call the new delegate methods.
2145 2015-04-20 Joseph Pecoraro <pecoraro@apple.com>
2147 Cleanup some StringBuilder use
2148 https://bugs.webkit.org/show_bug.cgi?id=143550
2150 Reviewed by Darin Adler.
2152 * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
2153 (WebKit::buildObjectStoreStatement):
2154 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2155 (WebKit::v2RecordsTableSchema):
2156 * Shared/Databases/IndexedDB/IDBUtilities.cpp:
2157 (WebKit::uniqueDatabaseIdentifier):
2158 * UIProcess/API/APIUserScript.cpp:
2159 (API::UserScript::generateUniqueURL):
2160 * UIProcess/WebProcessPool.cpp:
2161 (WebKit::WebProcessPool::didReceiveInvalidMessage):
2162 * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
2163 (WebKit::combinedSecurityOriginIdentifier):
2165 2015-04-20 Anders Carlsson <andersca@apple.com>
2167 Modify the WKWebsiteDataStore API to take a NSSet of types instead of a bitmask
2168 https://bugs.webkit.org/show_bug.cgi?id=143966
2170 Reviewed by Dan Bernstein.
2172 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
2173 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
2174 (dataTypesToString):
2175 (-[WKWebsiteDataRecord dataTypes]):
2176 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
2177 (WebKit::toWebsiteDataTypes):
2178 (WebKit::toWKWebsiteDataTypes):
2179 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2180 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2181 (+[WKWebsiteDataStore allWebsiteDataTypes]):
2182 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2183 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2184 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2185 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
2186 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2187 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2188 (toWKWebsiteDataTypes):
2189 (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2190 (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2191 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2193 2015-04-20 Beth Dakin <bdakin@apple.com>
2195 Should remove mouseForceClick and mouseForceCancelled from DOM force events
2196 https://bugs.webkit.org/show_bug.cgi?id=143904
2198 rdar://problem/20578842
2200 Reviewed by Dan Bernstein.
2202 * WebProcess/WebPage/mac/WebPageMac.mm:
2203 (WebKit::WebPage::immediateActionDidCancel):
2205 2015-04-20 Tim Horton <timothy_horton@apple.com>
2207 Implement immediate action support for tel: and mailto: URLs
2208 https://bugs.webkit.org/show_bug.cgi?id=143916
2209 <rdar://problem/19721711>
2211 Reviewed by Darin Adler.
2213 * Shared/API/c/WKImmediateActionTypes.h:
2214 * UIProcess/mac/WKImmediateActionController.mm:
2215 (-[WKImmediateActionController _defaultAnimationController]):
2216 (-[WKImmediateActionController _animationControllerForDataDetectedText]):
2217 (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
2218 (-[WKImmediateActionController _menuItemForDataDetectedText]): Deleted.
2219 Add _animationControllerForDataDetectedLink and use it when
2220 building immediate actions for tel: and mailto: links.
2222 2015-04-20 Alex Christensen <achristensen@webkit.org>
2224 Properly report errors from _WKUserContentExtensionStore.
2225 https://bugs.webkit.org/show_bug.cgi?id=143808
2227 Reviewed by Darin Adler.
2229 * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
2230 (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
2231 (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
2232 (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
2234 2015-04-18 Simon Fraser <simon.fraser@apple.com>
2236 REGRESSION (r181656): Animated tiled layers are missing content
2237 https://bugs.webkit.org/show_bug.cgi?id=143911
2238 rdar://problem/20596328
2240 Reviewed by Darin Adler.
2242 After r181656, all requestAnimationFrame was falling back to timers, and not
2243 using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
2246 Replace this confusing Optional<> code with simpler code that just forces the
2247 clients to make a DisplayRefreshMonitor if they can, first asking
2248 ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().
2250 Make lots of things into references, and use C++11 initialization in some places.
2252 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2253 (WebKit::WebChromeClient::createDisplayRefreshMonitor):
2254 * WebProcess/WebCoreSupport/WebChromeClient.h:
2256 2015-04-18 Dan Bernstein <mitz@apple.com>
2258 SwipeShadow images are installed on iOS
2259 https://bugs.webkit.org/show_bug.cgi?id=143915
2261 Reviewed by Tim Horton.
2263 * Configurations/WebKit.xcconfig: Added Resources/Mac/* to
2264 EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*]. We could move more resources there and remove
2265 individual patterns.
2266 * Resources/SwipeShadow.png: Moved to mac.
2267 * Resources/SwipeShadow@2x.png: Moved to mac.
2268 * Resources/mac: Added.
2269 * Resources/mac/SwipeShadow.png: Moved from Source/WebKit2/Resources/SwipeShadow.png.
2270 * Resources/mac/SwipeShadow@2x.png: Moved from Source/WebKit2/Resources/SwipeShadow@2x.png.
2271 * WebKit2.xcodeproj/project.pbxproj: Created mac group in the Resources group and moved
2272 SwipeShadow*.png into it. Updated for file moves.
2274 2015-04-18 Chris Dumez <cdumez@apple.com>
2276 Fix NetworkCache Statistics database bootstrapping after r182803
2277 https://bugs.webkit.org/show_bug.cgi?id=143890
2279 Reviewed by Darin Adler.
2281 Update the NetworkCache Statistics database bootstrapping code to use
2282 the records path instead of the version path. Also check that the
2283 filenames in the folder are valid hashes to discard the *-body files.
2285 * NetworkProcess/cache/NetworkCache.cpp:
2286 (WebKit::NetworkCache::Cache::recordsPath):
2287 (WebKit::NetworkCache::Cache::storagePath): Deleted.
2288 * NetworkProcess/cache/NetworkCache.h:
2289 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2290 (WebKit::NetworkCache::Statistics::initialize):
2291 (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
2292 (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
2294 2015-04-17 Tim Horton <timothy_horton@apple.com>
2296 Clients sometimes block for 500ms in waitForPossibleGeometryUpdates
2297 https://bugs.webkit.org/show_bug.cgi?id=143901
2298 <rdar://problem/20488655>
2300 Reviewed by Anders Carlsson.
2302 * Platform/IPC/Connection.cpp:
2303 (IPC::Connection::waitForMessage):
2304 InterruptWaitingIfSyncMessageArrives already cancels waitForMessage if
2305 a sync message arrives while waiting, but it should also avoid waiting
2306 if there's a sync message already in the queue when the waiting starts,
2307 as that will have the same nasty effect.
2309 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2310 (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
2311 If a synchronous message comes in from the Web process while we're waiting,
2312 cancel our synchronous wait for DidUpdateGeometry. This will cause the size
2313 change to not synchronize with the Web process' painting, but that is better
2314 than pointlessly blocking for 500ms.
2316 2015-04-17 Chris Dumez <cdumez@apple.com>
2318 Possible null pointer dereference in WebDiagnosticLoggingClient::logDiagnosticMessageWithValue()
2319 https://bugs.webkit.org/show_bug.cgi?id=143899
2320 <rdar://problem/20584215>
2322 Reviewed by Anders Carlsson.
2324 WebDiagnosticLoggingClient::logDiagnosticMessage*() methods failed to
2325 check that m_page.corePage() was non-null before dereferencing, thus
2326 causing crashes when it is null.
2328 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
2329 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
2330 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
2331 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
2333 2015-04-17 Yongjun Zhang <yongjun_zhang@apple.com>
2335 WebKit client should be able to add view controller for link preview.
2336 https://bugs.webkit.org/show_bug.cgi?id=143686
2338 Add delegate methods to WKUIDelegatePrivate so that a WebKit client can prepare a view controller
2339 for link preview and react to the dismissal of this view controller. Also connect WKContentView to
2340 preview gesture recognizer and forwards the delegate callbacks to corresponding delegate methods
2341 in WKUIDelegatePrivate.
2343 Reviewed by Beth Dakin.
2345 * Platform/spi/ios/UIKitSPI.h:
2346 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2347 * UIProcess/ios/WKContentView.mm:
2348 (-[WKContentView willMoveToWindow:]):
2349 * UIProcess/ios/WKContentViewInteraction.h:
2350 * UIProcess/ios/WKContentViewInteraction.mm:
2351 (-[WKContentView cleanupInteraction]):
2352 (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
2353 (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
2354 (-[WKContentView gestureRecognizerShouldBegin:]):
2355 (-[WKContentView previewViewControllerForPosition:inSourceView:]):
2356 (-[WKContentView commitPreviewViewController:]):
2357 (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
2358 (-[WKContentView didDismissPreviewViewController:committing:]):
2360 2015-04-17 Beth Dakin <bdakin@apple.com>
2362 Force mouse events should go through normal mouse event handling code paths
2363 https://bugs.webkit.org/show_bug.cgi?id=143749
2365 rdar://problem/20472895
2367 Reviewed by Dean Jackson.
2369 This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the
2370 NSEventTypePressures that is gets and sends those down to the web process.
2372 Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an
2373 NSEventTypePressure, the new name makes it clear how the second parameter differs
2375 * Shared/NativeWebMouseEvent.h:
2377 New event types for the new types of events.
2378 * Shared/WebEvent.h:
2379 * Shared/WebEventConversion.cpp:
2380 (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2381 * Shared/mac/NativeWebMouseEventMac.mm:
2382 (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2383 * Shared/mac/WebEventFactory.h:
2385 All of the square-peg, round-hole problems of massaging the NSEventTypePressures
2386 events into WebMouseEvents is taken care of here.
2387 * Shared/mac/WebEventFactory.mm:
2388 (WebKit::mouseButtonForEvent):
2389 (WebKit::globalPointForEvent):
2390 (WebKit::pointForEvent):
2391 (WebKit::WebEventFactory::createWebMouseEvent):
2393 Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent
2395 * UIProcess/API/mac/WKView.mm:
2396 (-[WKView pressureChangeWithEvent:]):
2398 Handle the new types.
2399 * UIProcess/WebPageProxy.cpp:
2400 (WebKit::WebPageProxy::didReceiveEvent):
2402 Can delete inputDeviceForceDidChange since it’s no longer used.
2403 (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
2404 * UIProcess/WebPageProxy.h:
2406 Handle the new types of mouse events properly.
2407 * WebProcess/WebPage/WebPage.cpp:
2408 (WebKit::handleMouseEvent):
2410 Delete inputDeviceForceDidChange() and m_lastForceStage.
2411 * WebProcess/WebPage/WebPage.h:
2412 * WebProcess/WebPage/WebPage.messages.in:
2413 * WebProcess/WebPage/mac/WebPageMac.mm:
2414 (WebKit::WebPage::inputDeviceForceDidChange): Deleted.
2416 Handle new WebEvent types.
2417 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2419 2015-04-17 Commit Queue <commit-queue@webkit.org>
2421 Unreviewed, rolling out r182912 and r182920.
2422 https://bugs.webkit.org/show_bug.cgi?id=143881
2424 Build breakage in some configurations (Requested by ap on
2427 Reverted changesets:
2429 "Force mouse events should go through normal mouse event
2430 handling code paths"
2431 https://bugs.webkit.org/show_bug.cgi?id=143749
2432 http://trac.webkit.org/changeset/182912
2434 http://trac.webkit.org/changeset/182920
2436 2015-04-17 Antti Koivisto <antti@apple.com>
2438 Network Cache: Read resource record and body in parallel
2439 https://bugs.webkit.org/show_bug.cgi?id=143879
2441 Reviewed by Chris Dumez.
2443 We currently first fetch the record file and then fetch the body blob if needed.
2444 We can do both operations in parallel to reduce latency.
2446 * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
2447 (WebKit::NetworkCache::traverseCacheFiles):
2449 Do all validation in the client.
2451 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2452 (WebKit::NetworkCache::Storage::synchronize):
2454 Maintain a bloom filter that contains the body blobs to avoid unnecessary IO attempts.
2455 Delete any unknown file in cache directory.
2457 (WebKit::NetworkCache::Storage::addToRecordFilter):
2459 More informative name for record filter.
2461 (WebKit::NetworkCache::Storage::mayContain):
2462 (WebKit::NetworkCache::Storage::readRecord):
2463 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
2464 (WebKit::NetworkCache::Storage::dispatchReadOperation):
2466 Start record read IO and body blob read IO in parallel.
2468 (WebKit::NetworkCache::Storage::finishReadOperation):
2470 The read is finished when we have both the record and the blob.
2472 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2473 (WebKit::NetworkCache::Storage::retrieve):
2474 (WebKit::NetworkCache::Storage::store):
2475 (WebKit::NetworkCache::Storage::traverse):
2476 (WebKit::NetworkCache::Storage::clear):
2477 (WebKit::NetworkCache::Storage::shrink):
2478 (WebKit::NetworkCache::Storage::addToContentsFilter): Deleted.
2479 (WebKit::NetworkCache::Storage::decodeRecord): Deleted.
2480 * NetworkProcess/cache/NetworkCacheStorage.h:
2481 (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
2483 ReadOperation is now mutable and gathers the read result.
2485 2015-04-16 Anders Carlsson <andersca@apple.com>
2487 Stop installing WebKit2.framework
2488 https://bugs.webkit.org/show_bug.cgi?id=143860
2489 rdar://problem/18298491
2491 Reviewed by Dan Bernstein.
2493 * Configurations/WebKit2.xcconfig:
2494 Set SKIP_INSTALL=YES for all SDKs except 10.9 where we still need it.
2496 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
2498 Unreviewed. Fix the build with ENABLE(NETWORK_CACHE) and !ENABLE(SHAREABLE_RESOURCE).
2500 * NetworkProcess/cache/NetworkCacheEntry.cpp:
2501 * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
2502 (WebKit::NetworkCache::fileTimes): There's no st_birthtime in Linux.
2504 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
2506 [SOUP] ResourceRequest cache policy is not encoded/decoded in IPC messages
2507 https://bugs.webkit.org/show_bug.cgi?id=143867
2509 Reviewed by Sergio Villar Senin.
2511 Encode/Decode the ResourceRequest cache policy.
2513 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
2514 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
2515 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
2517 2015-04-16 Sungmann Cho <sungmann.cho@navercorp.com>
2519 Use UNUSED_PARAM instead of the void casting to suppress unused parameter warnings.
2520 https://bugs.webkit.org/show_bug.cgi?id=143750
2522 Reviewed by Darin Adler.
2524 No new tests, no behavior change.
2526 * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
2527 (WebKit::NotificationPermissionRequestManager::NotificationPermissionRequestManager):
2529 2015-04-16 Brady Eidson <beidson@apple.com>
2531 Compiling a content extension fails when user's home directory is on a different volume from /var/tmp.
2532 https://bugs.webkit.org/show_bug.cgi?id=143834
2534 Reviewed by Anders Carlsson.
2536 * UIProcess/API/APIUserContentExtensionStore.cpp:
2537 (API::compiledToFile): Use moveFile() instead of renameFile()
2539 2015-04-16 Anders Carlsson <andersca@apple.com>
2541 Deprecate _WKWebsiteDataStore in favor of WKWebsiteDataStore
2542 https://bugs.webkit.org/show_bug.cgi?id=143844
2544 Reviewed by Dan Bernstein.
2546 * Shared/API/Cocoa/WKFoundation.h:
2547 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2548 (-[WKWebViewConfiguration _validate]):
2549 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2550 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
2551 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2552 * mac/postprocess-framework-headers.sh:
2554 2015-04-16 Alex Christensen <achristensen@webkit.org>
2556 Removed unused WKUserContentFilterRef.
2557 https://bugs.webkit.org/show_bug.cgi?id=143852
2559 Reviewed by Sam Weinig.
2561 * Shared/WebCompiledContentExtension.cpp:
2562 (WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient): Deleted.
2563 (WebKit::LegacyContentExtensionCompilationClient::writeBytecode): Deleted.
2564 (WebKit::LegacyContentExtensionCompilationClient::writeActions): Deleted.
2565 (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData): Deleted.
2566 * Shared/WebCompiledContentExtension.h:
2567 * UIProcess/API/C/WKUserContentFilterRef.cpp: Removed.
2568 * UIProcess/API/C/WKUserContentFilterRef.h: Removed.
2569 * UIProcess/API/C/WebKit2_C.h:
2570 * UIProcess/API/Cocoa/_WKUserContentFilter.h:
2571 * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
2572 (-[_WKUserContentFilter initWithName:serializedRules:]): Deleted.
2573 * WebKit2.xcodeproj/project.pbxproj:
2575 2015-04-16 Beth Dakin <bdakin@apple.com>
2577 Rubber-stamped by Tim Horton.
2579 Fixing a small mistake in http://trac.webkit.org/changeset/182912 which should
2580 make sure to use the most up-to-date pressure information when setting the force
2583 * Shared/mac/WebEventFactory.mm:
2584 (WebKit::WebEventFactory::createWebMouseEvent):
2586 2015-04-13 Jer Noble <jer.noble@apple.com>
2588 [iOS] When simultaneously exiting-and-entering fullscreen, WebVideoFullscreenManager/Proxy becomes confused about what video element it represents.
2589 https://bugs.webkit.org/show_bug.cgi?id=143680
2591 Reviewed by Simon Fraser.
2593 The original assumption of WebVideoFullscreenManager and -Proxy was that the two classes would represent a
2594 single video element and its full screen state. With multiple animations in and out of fullscreen combined with
2595 multiple fullscreen modes, this assumption no longer holds true.
2597 Rather than having a WebVideoFullscreenManager which /isa/ WebVideoFullscreenModelVideoElement, the manager now
2598 /hasa/ WebVideoFullscreenModelVideoElement (or has many such models). Ditto for WebVideoFullscreenManager and
2599 WebVideoFullscreenInterfaceAVKit. The WebVideoFullscreenInterfaceAVKit still needs a WebVideoFullscreenModel to
2600 communicate with, so a new wrapper class is used for that purpose, WebVideoFullscreenModelContext. Ditto for
2601 WebVideoFullscreenModelVideoElement and the new class WebVideoFullscreenInterfaceContext. These context classes
2602 are paired and share a contextId, allowing the manager and its proxy to route messages between the UIProcess's
2603 WebVideoFullscreenInterfaceAVKit to-and-from the WebProcess's WebVideoFullscreenModelVideoElement.
2605 Both the WebVideoFullscreenModelContext and the WebVideoFullscreenInterfaceContext take a back-pointer to their
2606 manager or manager proxy, and each method on the context simply calls the matching method on the manager and
2607 passes its contextId as a parameter.
2609 Both the WebVideoFullscreenManager and the WebVideoFullscreenManagerProxy pass that contextId in each of their
2610 cross-process messages.
2612 On the other side, the manager and proxy also have a map between contextIds and their matching
2613 WebVideoFullscreenModelVideoElement (in the case of WebVideoFullscreenManager) or
2614 WebVideoFullscreenInterfaceAVKit (in the case of WebVideoFullscreenManagerProxy).
2616 While this change is large by LoC, it is almost entirely boilerplate. The new and interesting pieces are these:
2618 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2619 (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy): No longer a WebVideoFullscreenInterfaceAVKit.
2620 (WebKit::WebVideoFullscreenManagerProxy::invalidate): Walk through the models and interfaces, invalidating each.
2621 (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface): Added. Return a new model and interface tuple.
2622 (WebKit::WebVideoFullscreenManagerProxy::ensureModelAndInterface): Added. Lazily create, and add to the m_contextMap
2623 a new model and interface object.
2624 (WebKit::WebVideoFullscreenManagerProxy::ensureModel): Return the model half of ensureModelAndInterface().
2625 (WebKit::WebVideoFullscreenManagerProxy::ensureInterface): Return the interface half of ensureModelAndInterface().
2626 (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen): Walk through the outstanding interface objects, and if
2627 any have a fullscreen mode which matches the about-to-be-fullscreen interface, request that that other interface
2629 * WebProcess/ios/WebVideoFullscreenManager.mm:
2630 (WebKit::nextContextId): Static, incrementing counter used as a contextId source.
2631 (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager): No longer a WebVideoFullscreenModelVideoElement.
2632 (WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager): Walk through the models and interfaces, invalidating each.
2633 (WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Added. Return a new model and interface tuple.
2634 (WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Added. Lazily create, and add to the m_contextMap
2635 a new model and interface object.
2636 (WebKit::WebVideoFullscreenManager::ensureModel): Return the model half of ensureModelAndInterface().
2637 (WebKit::WebVideoFullscreenManager::ensureInterface): Return the interface half of ensureModelAndInterface().
2639 New classes and methods which just forward on to their owning objects:
2641 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2642 (WebKit::WebVideoFullscreenModelContext::create):
2643 (WebKit::WebVideoFullscreenModelContext::~WebVideoFullscreenModelContext):
2644 (WebKit::WebVideoFullscreenModelContext::invalidate):
2645 (WebKit::WebVideoFullscreenModelContext::layerHost):
2646 (WebKit::WebVideoFullscreenModelContext::setLayerHost):
2647 (WebKit::WebVideoFullscreenModelContext::setInitialVideoLayerFrame):
2648 (WebKit::WebVideoFullscreenModelContext::WebVideoFullscreenModelContext):
2649 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2650 (WebKit::WebVideoFullscreenModelContext::play):
2651 (WebKit::WebVideoFullscreenModelContext::pause):
2652 (WebKit::WebVideoFullscreenModelContext::togglePlayState):
2653 (WebKit::WebVideoFullscreenModelContext::beginScrubbing):
2654 (WebKit::WebVideoFullscreenModelContext::endScrubbing):
2655 (WebKit::WebVideoFullscreenModelContext::seekToTime):
2656 (WebKit::WebVideoFullscreenModelContext::fastSeek):
2657 (WebKit::WebVideoFullscreenModelContext::beginScanningForward):
2658 (WebKit::WebVideoFullscreenModelContext::beginScanningBackward):
2659 (WebKit::WebVideoFullscreenModelContext::endScanning):
2660 (WebKit::WebVideoFullscreenModelContext::requestExitFullscreen):
2661 (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame):
2662 (WebKit::WebVideoFullscreenModelContext::videoLayerFrame):
2663 (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity):
2664 (WebKit::WebVideoFullscreenModelContext::videoLayerGravity):
2665 (WebKit::WebVideoFullscreenModelContext::selectAudioMediaOption):
2666 (WebKit::WebVideoFullscreenModelContext::selectLegibleMediaOption):
2667 (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged):
2668 (WebKit::WebVideoFullscreenModelContext::didSetupFullscreen):
2669 (WebKit::WebVideoFullscreenModelContext::didEnterFullscreen):
2670 (WebKit::WebVideoFullscreenModelContext::didExitFullscreen):
2671 (WebKit::WebVideoFullscreenModelContext::didCleanupFullscreen):
2672 (WebKit::WebVideoFullscreenModelContext::fullscreenMayReturnToInline):
2673 * WebProcess/ios/WebVideoFullscreenManager.h:
2674 (WebKit::WebVideoFullscreenInterfaceContext::create):
2675 (WebKit::WebVideoFullscreenInterfaceContext::invalidate):
2676 (WebKit::WebVideoFullscreenInterfaceContext::layerHostingContext):
2677 (WebKit::WebVideoFullscreenInterfaceContext::isAnimating):
2678 (WebKit::WebVideoFullscreenInterfaceContext::setIsAnimating):
2679 (WebKit::WebVideoFullscreenInterfaceContext::targetIsFullscreen):
2680 (WebKit::WebVideoFullscreenInterfaceContext::setTargetIsFullscreen):
2681 (WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode):
2682 (WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode):
2683 (WebKit::WebVideoFullscreenInterfaceContext::isFullscreen):
2684 (WebKit::WebVideoFullscreenInterfaceContext::setIsFullscreen):
2685 * WebProcess/ios/WebVideoFullscreenManager.mm:
2686 (WebKit::WebVideoFullscreenInterfaceContext::WebVideoFullscreenInterfaceContext):
2687 (WebKit::WebVideoFullscreenInterfaceContext::~WebVideoFullscreenInterfaceContext):
2688 (WebKit::WebVideoFullscreenInterfaceContext::setLayerHostingContext):
2689 (WebKit::WebVideoFullscreenInterfaceContext::resetMediaState):
2690 (WebKit::WebVideoFullscreenInterfaceContext::setDuration):
2691 (WebKit::WebVideoFullscreenInterfaceContext::setCurrentTime):
2692 (WebKit::WebVideoFullscreenInterfaceContext::setBufferedTime):
2693 (WebKit::WebVideoFullscreenInterfaceContext::setRate):
2694 (WebKit::WebVideoFullscreenInterfaceContext::setVideoDimensions):
2695 (WebKit::WebVideoFullscreenInterfaceContext::setSeekableRanges):
2696 (WebKit::WebVideoFullscreenInterfaceContext::setCanPlayFastReverse):
2697 (WebKit::WebVideoFullscreenInterfaceContext::setAudioMediaSelectionOptions):
2698 (WebKit::WebVideoFullscreenInterfaceContext::setLegibleMediaSelectionOptions):
2699 (WebKit::WebVideoFullscreenInterfaceContext::setExternalPlayback):
2701 Cross-process methods which now take a contextId parameter:
2703 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2704 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2705 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
2706 (WebKit::WebVideoFullscreenManagerProxy::resetMediaState):
2707 (WebKit::WebVideoFullscreenManagerProxy::setCurrentTime):
2708 (WebKit::WebVideoFullscreenManagerProxy::setBufferedTime):
2709 (WebKit::WebVideoFullscreenManagerProxy::setVideoDimensions):
2710 (WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
2711 (WebKit::WebVideoFullscreenManagerProxy::setCanPlayFastReverse):
2712 (WebKit::WebVideoFullscreenManagerProxy::setAudioMediaSelectionOptions):
2713 (WebKit::WebVideoFullscreenManagerProxy::setLegibleMediaSelectionOptions):
2714 (WebKit::WebVideoFullscreenManagerProxy::setExternalPlaybackProperties):
2715 (WebKit::WebVideoFullscreenManagerProxy::setDuration):
2716 (WebKit::WebVideoFullscreenManagerProxy::setRate):
2717 (WebKit::WebVideoFullscreenManagerProxy::exitFullscreen):
2718 (WebKit::WebVideoFullscreenManagerProxy::cleanupFullscreen):
2719 (WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline):
2720 (WebKit::WebVideoFullscreenManagerProxy::play):
2721 (WebKit::WebVideoFullscreenManagerProxy::pause):
2722 (WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
2723 (WebKit::WebVideoFullscreenManagerProxy::beginScrubbing):
2724 (WebKit::WebVideoFullscreenManagerProxy::endScrubbing):
2725 (WebKit::WebVideoFullscreenManagerProxy::seekToTime):
2726 (WebKit::WebVideoFullscreenManagerProxy::fastSeek):
2727 (WebKit::WebVideoFullscreenManagerProxy::beginScanningForward):
2728 (WebKit::WebVideoFullscreenManagerProxy::beginScanningBackward):
2729 (WebKit::WebVideoFullscreenManagerProxy::endScanning):
2730 (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
2731 (WebKit::WebVideoFullscreenManagerProxy::didSetupFullscreen):
2732 (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
2733 (WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
2734 (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen):
2735 (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
2736 (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
2737 (WebKit::WebVideoFullscreenManagerProxy::selectAudioMediaOption):
2738 (WebKit::WebVideoFullscreenManagerProxy::selectLegibleMediaOption):
2739 (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged):
2740 (WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
2741 (WebKit::WebVideoFullscreenManagerProxy::videoLayerFrame): Deleted.
2742 (WebKit::WebVideoFullscreenManagerProxy::videoLayerGravity): Deleted.
2743 * WebProcess/ios/WebVideoFullscreenManager.messages.in:
2744 * WebProcess/ios/WebVideoFullscreenManager.mm:
2745 (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
2746 (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
2747 (WebKit::WebVideoFullscreenManager::resetMediaState):
2748 (WebKit::WebVideoFullscreenManager::setDuration):
2749 (WebKit::WebVideoFullscreenManager::setCurrentTime):
2750 (WebKit::WebVideoFullscreenManager::setBufferedTime):
2751 (WebKit::WebVideoFullscreenManager::setRate):
2752 (WebKit::WebVideoFullscreenManager::setVideoDimensions):
2753 (WebKit::WebVideoFullscreenManager::setSeekableRanges):
2754 (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse):
2755 (WebKit::WebVideoFullscreenManager::setAudioMediaSelectionOptions):
2756 (WebKit::WebVideoFullscreenManager::setLegibleMediaSelectionOptions):
2757 (WebKit::WebVideoFullscreenManager::setExternalPlayback):
2758 (WebKit::WebVideoFullscreenManager::play):
2759 (WebKit::WebVideoFullscreenManager::pause):
2760 (WebKit::WebVideoFullscreenManager::togglePlayState):
2761 (WebKit::WebVideoFullscreenManager::beginScrubbing):
2762 (WebKit::WebVideoFullscreenManager::endScrubbing):
2763 (WebKit::WebVideoFullscreenManager::seekToTime):
2764 (WebKit::WebVideoFullscreenManager::fastSeek):
2765 (WebKit::WebVideoFullscreenManager::beginScanningForward):
2766 (WebKit::WebVideoFullscreenManager::beginScanningBackward):
2767 (WebKit::WebVideoFullscreenManager::endScanning):
2768 (WebKit::WebVideoFullscreenManager::requestExitFullscreen):
2769 (WebKit::WebVideoFullscreenManager::selectAudioMediaOption):
2770 (WebKit::WebVideoFullscreenManager::selectLegibleMediaOption):
2771 (WebKit::WebVideoFullscreenManager::fullscreenModeChanged):
2772 (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
2773 (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
2774 (WebKit::WebVideoFullscreenManager::didExitFullscreen):
2775 (WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
2776 (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
2777 (WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
2778 (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
2779 (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
2781 2015-04-16 Beth Dakin <bdakin@apple.com>
2783 Force mouse events should go through normal mouse event handling code paths
2784 https://bugs.webkit.org/show_bug.cgi?id=143749
2786 rdar://problem/20472895
2788 Reviewed by Dean Jackson.
2790 This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the
2791 NSEventTypePressures that is gets and sends those down to the web process.
2793 Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an
2794 NSEventTypePressure, the new name makes it clear how the second parameter differs
2796 * Shared/NativeWebMouseEvent.h:
2798 New event types for the new types of events.
2799 * Shared/WebEvent.h:
2800 * Shared/WebEventConversion.cpp:
2801 (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2802 * Shared/mac/NativeWebMouseEventMac.mm:
2803 (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2804 * Shared/mac/WebEventFactory.h:
2806 All of the square-peg, round-hole problems of massaging the NSEventTypePressures
2807 events into WebMouseEvents is taken care of here.
2808 * Shared/mac/WebEventFactory.mm:
2809 (WebKit::mouseButtonForEvent):
2810 (WebKit::globalPointForEvent):
2811 (WebKit::pointForEvent):
2812 (WebKit::WebEventFactory::createWebMouseEvent):
2814 Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent
2816 * UIProcess/API/mac/WKView.mm:
2817 (-[WKView pressureChangeWithEvent:]):
2819 Handle the new types.
2820 * UIProcess/WebPageProxy.cpp:
2821 (WebKit::WebPageProxy::didReceiveEvent):
2823 Can delete inputDeviceForceDidChange since it’s no longer used.
2824 (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
2825 * UIProcess/WebPageProxy.h:
2827 Handle the new types of mouse events properly.
2828 * WebProcess/WebPage/WebPage.cpp:
2829 (WebKit::handleMouseEvent):
2831 Delete inputDeviceForceDidChange() and m_lastForceStage.
2832 * WebProcess/WebPage/WebPage.h:
2833 * WebProcess/WebPage/WebPage.messages.in:
2834 * WebProcess/WebPage/mac/WebPageMac.mm:
2835 (WebKit::WebPage::inputDeviceForceDidChange): Deleted.
2837 Handle new WebEvent types.
2838 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2840 2015-04-16 Dan Bernstein <mitz@apple.com>
2842 <rdar://problem/20575744> Also include a definition of __NSd_{current deployment target} in WKFoundation.h.
2844 Reviewed by Tim Horton.
2846 * WebKit2.xcodeproj/project.pbxproj:
2848 2015-04-16 Timothy Horton <timothy_horton@apple.com>
2850 Provide a mechanism through the legacy SPI to know when swipe gestures begin and end
2851 https://bugs.webkit.org/show_bug.cgi?id=143740
2852 <rdar://problem/20468540>
2854 Reviewed by Dan Bernstein.
2856 In the C SPI, add three WKPageLoaderClient callbacks for the three
2857 navigation gesture events (did begin, will end, did end).
2859 * UIProcess/API/C/WKPageLoaderClient.h:
2862 * UIProcess/API/APILoaderClient.h:
2863 (API::LoaderClient::navigationGestureDidBegin):
2864 (API::LoaderClient::navigationGestureWillEnd):
2865 (API::LoaderClient::navigationGestureDidEnd):
2866 * UIProcess/WebPageProxy.cpp:
2867 (WebKit::WebPageProxy::navigationGestureDidBegin):
2868 (WebKit::WebPageProxy::navigationGestureWillEnd):
2869 (WebKit::WebPageProxy::navigationGestureDidEnd):
2870 Dispatch navigation gesture events to the loader client as well as
2871 (after a bounce through the PageClient) the navigation delegate.
2873 * UIProcess/API/C/WKPage.cpp:
2874 (WKPageSetPageLoaderClient):
2877 * UIProcess/mac/ViewGestureController.h:
2878 * UIProcess/mac/ViewGestureControllerMac.mm:
2879 (WebKit::ViewGestureController::trackSwipeGesture):
2880 (WebKit::ViewGestureController::willEndSwipeGesture):
2881 While we were already informing WebPageProxy of 'did begin' and 'did end'
2882 navigation gesture events, we were missing 'will end'. Add it.
2884 2015-04-16 Tim Horton <timothy_horton@apple.com>
2886 Dispatching multiple asynchronous animated resizes in parallel causes page scale to detach from reality
2887 https://bugs.webkit.org/show_bug.cgi?id=143812
2888 <rdar://problem/19866038>
2890 Reviewed by Simon Fraser.
2892 * Shared/VisibleContentRectUpdateInfo.h:
2893 (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
2894 No cats in transaction (more of these below, too).
2896 * UIProcess/WebPageProxy.h:
2897 * UIProcess/WebPageProxy.messages.in:
2898 * UIProcess/ios/WebPageProxyIOS.mm:
2899 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2900 (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
2901 * WebProcess/WebPage/WebPage.h:
2902 * WebProcess/WebPage/WebPage.messages.in:
2903 * WebProcess/WebPage/ios/WebPageIOS.mm:
2904 (WebKit::WebPage::handleTap):
2905 (WebKit::WebPage::commitPotentialTap):
2906 (WebKit::WebPage::dynamicViewportSizeUpdate):
2907 Add an incrementing ID to dynamicViewportSizeUpdates. The UI process keeps
2908 the current ID, and it is bounced through the Web process (dynamicViewportSizeUpdates)
2909 back to the UI process (dynamicViewportUpdateChangedTarget). If we have
2910 dispatched another dynamicViewportSizeUpdate in the interim, ignore
2911 the intermediate target.
2913 2015-04-16 Sungmann Cho <sungmann.cho@navercorp.com>
2915 Remove PluginController::isPluginVisible().
2916 https://bugs.webkit.org/show_bug.cgi?id=143830
2918 Reviewed by Darin Adler.
2920 PluginController::isPluginVisible() was introduced by http://webkit.org/b/60285.
2921 This method had been used only for WebKit2 on Windows, and no one uses it now.
2922 So we can remove it.
2924 No new tests, no behavior change.
2926 * PluginProcess/PluginControllerProxy.cpp:
2927 (WebKit::PluginControllerProxy::isPluginVisible): Deleted.
2928 * PluginProcess/PluginControllerProxy.h:
2929 * WebProcess/Plugins/PluginController.h:
2930 * WebProcess/Plugins/PluginView.cpp:
2931 (WebKit::PluginView::isPluginVisible): Deleted.
2932 * WebProcess/Plugins/PluginView.h:
2934 2015-04-16 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2936 [EFL] Disable a flaky ewk_context_network_process_model() API test
2937 https://bugs.webkit.org/show_bug.cgi?id=143824
2939 Reviewed by Csaba Osztrogonác.
2941 ewk_context_network_process_model has been often failed. Though Bug 142967
2942 was filed to fix this issue, it is not solved yet. To maintain EFL bot, this patch
2943 disables it until fixing it.
2945 * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2948 2015-04-16 Csaba Osztrogonác <ossy@webkit.org>
2950 [WK2] Forwarding headers generator shouldn't generate unnecessary headers
2951 https://bugs.webkit.org/show_bug.cgi?id=143820
2953 Reviewed by Carlos Garcia Campos.
2955 * Scripts/generate-forwarding-headers.pl:
2956 (collectNeededHeaders):
2958 2015-04-16 Csaba Osztrogonác <ossy@webkit.org>
2960 [GTK] Run forwarding headers generator unconditionally
2961 https://bugs.webkit.org/show_bug.cgi?id=143819
2963 Reviewed by Carlos Garcia Campos.
2965 * PlatformGTK.cmake:
2967 2015-04-15 Brent Fulgham <bfulgham@apple.com>
2969 [Mac] Disable "Save to Downloads" option for local files
2970 https://bugs.webkit.org/show_bug.cgi?id=143794
2972 Reviewed by Tim Horton.
2974 Disable the Image and Media download options if the download
2975 target is a local file. We can only download web resources;
2976 anything else is actually a no-op.
2978 * UIProcess/mac/WKActionMenuController.mm:
2979 (-[WKActionMenuController _defaultMenuItemsForVideo]):
2980 (-[WKActionMenuController _defaultMenuItemsForImage]):
2982 2015-04-15 Anders Carlsson <andersca@apple.com>
2984 Make websiteDataStore on WKWebViewConfiguration public
2985 https://bugs.webkit.org/show_bug.cgi?id=143810
2987 Reviewed by Dan Bernstein.
2989 * UIProcess/API/Cocoa/WKWebView.mm:
2990 (-[WKWebView initWithFrame:configuration:]):
2991 * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2992 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2993 (-[WKWebViewConfiguration copyWithZone:]):
2994 (-[WKWebViewConfiguration websiteDataStore]):
2995 (-[WKWebViewConfiguration setWebsiteDataStore:]):
2996 (-[WKWebViewConfiguration _websiteDataStore]):
2997 (-[WKWebViewConfiguration _setWebsiteDataStore:]):
2999 2015-04-15 Anders Carlsson <andersca@apple.com>
3001 Make WKWebsiteDataStore public
3002 https://bugs.webkit.org/show_bug.cgi?id=143805
3004 Reviewed by Dan Bernstein.
3006 Rename the current _WKWebsiteDataStore to WKWebsiteDataStore. Make init unavailable and tighten up the
3007 types of the defaultDataStore and nonPersistentDataStore class methods.
3009 Add a new _WKWebsiteDataStore @interface and @implementation that derives from WKWebsiteDataStore
3010 and forwards the defaultDataStore and nonPersistentDataStore method calls.
3012 * Shared/API/Cocoa/WebKit.h:
3013 * Shared/Cocoa/APIObject.mm:
3014 (API::Object::newObject):
3015 * UIProcess/API/Cocoa/WKWebView.mm:
3016 (-[WKWebView initWithFrame:configuration:]):
3017 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3018 (-[WKWebViewConfiguration _websiteDataStore]):
3019 * UIProcess/API/Cocoa/WKWebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
3020 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm.
3021 (+[WKWebsiteDataStore defaultDataStore]):
3022 (+[WKWebsiteDataStore nonPersistentDataStore]):
3023 (-[WKWebsiteDataStore dealloc]):
3024 (-[WKWebsiteDataStore isNonPersistent]):
3025 (toSystemClockTime):
3026 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
3027 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
3028 (toWebsiteDataRecords):
3029 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
3030 (-[WKWebsiteDataStore _apiObject]):
3031 * UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h.
3033 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
3034 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3035 (+[_WKWebsiteDataStore defaultDataStore]):
3036 (+[_WKWebsiteDataStore nonPersistentDataStore]):
3037 (-[_WKWebsiteDataStore dealloc]): Deleted.
3038 (-[_WKWebsiteDataStore isNonPersistent]): Deleted.
3039 (toWebsiteDataTypes): Deleted.
3040 (toSystemClockTime): Deleted.
3041 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]): Deleted.
3042 (-[_WKWebsiteDataStore _apiObject]): Deleted.
3043 * WebKit2.xcodeproj/project.pbxproj:
3045 2015-04-15 Timothy Horton <timothy_horton@apple.com>
3047 Custom CSS cursors do not use -webkit-image-set on retina displays
3048 https://bugs.webkit.org/show_bug.cgi?id=120783
3050 Reviewed by Beth Dakin.
3051 Patch by Evan Wallace <evan.exe@gmail.com>.
3053 Serialize the cursor image scale for SetCursor messages so custom
3054 CSS cursors work with -webkit-image-set on retina displays.
3056 * Shared/WebCoreArgumentCoders.cpp:
3057 (CoreIPC::ArgumentCoder<Cursor>::encode):
3058 (CoreIPC::ArgumentCoder<Cursor>::decode):
3060 2015-04-15 Alex Christensen <achristensen@webkit.org>
3062 Progress towards CMake on Mac.
3063 https://bugs.webkit.org/show_bug.cgi?id=143785
3065 Reviewed by Csaba Osztrogonác.
3068 * PlatformEfl.cmake:
3069 * PlatformGTK.cmake:
3071 2015-04-15 Anders Carlsson <andersca@apple.com>
3073 Make WKWebsiteDataRecord public
3074 https://bugs.webkit.org/show_bug.cgi?id=143796
3076 Reviewed by Dan Bernstein.
3078 Rename _WKWebsiteDataRecord and associated files to WKWebsiteDataRecord and
3079 add a new _WKWebsiteDataRecord.h with a class @interface declaration that just
3080 inherits from WKWebsiteDataRecord. We don't need an @implementation since nobody is expected
3081 to allocate _WKWebsiteDataRecord objects.
3083 * Shared/API/Cocoa/WebKit.h:
3084 * Shared/Cocoa/APIObject.mm:
3085 (API::Object::newObject):
3086 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.h.
3087 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm.
3088 (-[WKWebsiteDataRecord dealloc]):
3089 (dataTypesToString):
3090 (-[WKWebsiteDataRecord description]):
3091 (-[WKWebsiteDataRecord displayName]):
3092 (-[WKWebsiteDataRecord dataTypes]):
3093 (-[WKWebsiteDataRecord _apiObject]):
3094 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h.
3096 (WebKit::toWebsiteDataTypes):
3097 (WebKit::toWKWebsiteDataTypes):
3098 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
3099 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3100 (toWebsiteDataRecords):
3101 * WebKit2.xcodeproj/project.pbxproj:
3103 2015-04-13 Jer Noble <jer.noble@apple.com>
3105 [Fullscreen] ChromeClient::exitVideoFullscreen() should take a pointer to a HTMLVideoElement.
3106 https://bugs.webkit.org/show_bug.cgi?id=143674
3108 Reviewed by Darin Adler.
3110 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3111 (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Takes a reference.
3112 (WebKit::WebChromeClient::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
3113 (WebKit::WebChromeClient::exitVideoFullscreen): Deleted.
3114 * WebProcess/WebCoreSupport/WebChromeClient.h:
3115 * WebProcess/ios/WebVideoFullscreenManager.h:
3116 * WebProcess/ios/WebVideoFullscreenManager.mm:
3117 (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
3118 (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
3119 (WebKit::WebVideoFullscreenManager::didEnterFullscreen): Pass a reference.
3120 (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.
3121 (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
3123 2015-04-15 Antti Koivisto <antti@apple.com>
3125 Network Cache: Inline small body data to record file
3126 https://bugs.webkit.org/show_bug.cgi?id=143783
3128 Reviewed by Chris Dumez.
3130 We currently save all body data as separate files. We can improve space efficiency and do less reads and writes
3131 by inlining smaller resource bodies with the header.
3133 * NetworkProcess/cache/NetworkCacheIOChannel.h:
3134 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
3135 (WebKit::NetworkCache::IOChannel::read):
3136 (WebKit::NetworkCache::IOChannel::readSync):
3137 (WebKit::NetworkCache::IOChannel::write):
3139 Add WorkQueue argument to allow specifying which queue the result is submitted to.
3141 * NetworkProcess/cache/NetworkCacheStorage.cpp:
3142 (WebKit::NetworkCache::decodeRecordMetaData):
3144 Add a boolean indicating whether the body is inlined.
3146 (WebKit::NetworkCache::decodeRecordHeader):
3147 (WebKit::NetworkCache::Storage::decodeRecord):
3148 (WebKit::NetworkCache::encodeRecordMetaData):
3149 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
3150 (WebKit::NetworkCache::Storage::encodeRecord):
3151 (WebKit::NetworkCache::Storage::dispatchReadOperation):
3153 Read the record first, then read the blob if needed.
3154 Submit the read operation directly from the main queue. Only thing we do is opening an IO channel
3155 and that uses O_NONBLOCK.
3156 Process the read results in the IO work queue where we now do the blob retrieval.
3158 (WebKit::NetworkCache::shouldStoreBodyAsBlob):
3160 The current threshold for saving a separate blob is 16KB.
3162 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
3163 (WebKit::NetworkCache::Storage::traverse):
3164 (WebKit::NetworkCache::createRecord): Deleted.
3165 (WebKit::NetworkCache::encodeRecordHeader): Deleted.
3166 * NetworkProcess/cache/NetworkCacheStorage.h:
3168 2015-04-15 Tim Horton <timothy_horton@apple.com>
3170 Non-local keyboards don't update scroll view parameters
3171 https://bugs.webkit.org/show_bug.cgi?id=143791
3172 <rdar://problem/18974020>
3174 * Platform/spi/ios/UIKitSPI.h:
3177 2015-04-15 Tim Horton <timothy_horton@apple.com>
3179 Non-local keyboards don't update scroll view parameters
3180 https://bugs.webkit.org/show_bug.cgi?id=143791
3181 <rdar://problem/18974020>
3183 Reviewed by Enrica Casucci.
3185 * UIProcess/API/Cocoa/WKWebView.mm:
3186 (-[WKWebView _shouldUpdateKeyboardWithInfo:]):
3187 (-[WKWebView _keyboardWillChangeFrame:]):
3188 (-[WKWebView _keyboardWillShow:]):
3189 Make sure that we update scroll view parameters (obscured insets, etc.)
3190 if we have a non-local keyboard, in addition to the cases where we have an assisted node.
3192 2015-04-15 Dan Bernstein <mitz@apple.com>
3194 <rdar://problem/20549298> No matching __NSi_ definition for postprocessed value of WK_{MAC,IOS}_TBA
3195 https://bugs.webkit.org/show_bug.cgi?id=143786
3197 Reviewed by Anders Carlsson.
3199 * Shared/API/Cocoa/WKFoundation.h: Added a placeholder for the postprocessing script to
3200 insert a definition of __NSi_* for the current deployment target. Import CoreFoundation.h so
3201 that we can check if the macro is already defined.
3202 * WebKit2.xcodeproj/project.pbxproj: In the Postprocess WKFoundation.h script build phase,
3203 replace the placeholder with a definition of __NSi_{current deployment target} if not
3206 2015-04-14 Anders Carlsson <andersca@apple.com>
3208 Make creating send rights from shared memory more robust
3209 https://bugs.webkit.org/show_bug.cgi?id=143730
3210 rdar://problem/16595870
3212 Reviewed by Darin Adler.
3214 This cleans up creation of handles and send rights and also fixes a bug where it would be impossible
3215 to send more than 128 MB of shared memory in a single object.
3217 * Platform/SharedMemory.h:
3218 * Platform/mac/SharedMemoryMac.cpp:
3219 (WebKit::makeMemoryEntry):
3220 New helper function that creates a memory entry send right. This uses MAP_MEM_VM_SHARE which ensures
3221 that memory objects larger than 128 MB will be handled correctly.
3223 (WebKit::SharedMemory::create):
3224 Call makeMemoryEntry.
3226 (WebKit::SharedMemory::createHandle):
3227 Call createSendRight.
3229 (WebKit::SharedMemory::createSendRight):
3230 Call makeMemoryEntry and add the necessary assertions.
3232 2015-04-15 Eric Carlson <eric.carlson@apple.com>
3234 Generalize "isPlayingAudio" to include other media characteristics
3235 https://bugs.webkit.org/show_bug.cgi?id=143713
3237 Reviewed by Jer Noble.
3239 * UIProcess/API/C/WKPage.cpp:
3240 (toGenericCallbackFunction): Scope CallbackBase.
3241 (WKPageForceRepaint): Ditto.
3242 (WKPageValidateCommand): Ditto.
3243 (WKPageComputePagesForPrinting): Ditto.
3245 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
3246 (-[_WKThumbnailView _requestSnapshotIfNeeded]): Ditto.
3248 * UIProcess/API/mac/WKView.mm:
3249 (-[WKView becomeFirstResponder]): Ditto.
3250 (-[WKView updateFontPanelIfNeeded]): Ditto.
3251 (-[WKView validateUserInterfaceItem:]): Ditto.
3252 (-[WKView startSpeaking:]): Ditto.
3253 (-[WKView selectedRangeWithCompletionHandler:]): Ditto.
3254 (-[WKView markedRangeWithCompletionHandler:]): Ditto.
3255 (-[WKView hasMarkedTextWithCompletionHandler:]): Ditto.
3256 (-[WKView attributedSubstringForProposedRange:completionHandler:]): Ditto.
3257 (-[WKView firstRectForCharacterRange:completionHandler:]): Ditto.
3258 (-[WKView characterIndexForPoint:completionHandler:]): Ditto.
3260 * UIProcess/WebPageProxy.cpp:
3261 (WebKit::WebPageProxy::isPlayingMediaDidChange): Rename from isPlayingAudioDidChange.
3262 (WebKit::WebPageProxy::isPlayingAudioDidChange): Deleted.
3263 * UIProcess/WebPageProxy.h:
3265 * UIProcess/WebPageProxy.messages.in:
3267 * UIProcess/mac/WKFullScreenWindowController.mm:
3268 (-[WKFullScreenWindowController dealloc]): Scope CallbackBase.
3269 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.
3271 * UIProcess/mac/WKPrintingView.mm:
3272 (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ditto.
3273 (-[WKPrintingView _askPageToComputePageRects]): Ditto.
3274 (-[WKPrintingView _drawPreview:]): Ditto.
3276 * WebProcess/Plugins/PluginView.cpp:
3277 (WebKit::PluginView::setPluginIsPlayingAudio):
3278 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3279 (WebKit::WebChromeClient::isPlayingMediaDidChange):
3280 (WebKit::WebChromeClient::isPlayingAudioDidChange): Deleted.
3281 * WebProcess/WebCoreSupport/WebChromeClient.h:
3283 2015-04-15 Antti Koivisto <antti@apple.com>
3285 Network Cache: Add thread-safe accessors for storage paths
3286 https://bugs.webkit.org/show_bug.cgi?id=143668
3288 Reviewed by Darin Adler.
3290 Less need to use StringCapture.
3292 * NetworkProcess/cache/NetworkCache.cpp:
3293 (WebKit::NetworkCache::Cache::dumpFilePath):
3294 (WebKit::NetworkCache::Cache::storagePath):
3295 * NetworkProcess/cache/NetworkCacheStorage.cpp:
3296 (WebKit::NetworkCache::makeRecordsDirectoryPath):
3297 (WebKit::NetworkCache::Storage::Storage):
3298 (WebKit::NetworkCache::Storage::basePath):
3299 (WebKit::NetworkCache::Storage::versionPath):
3300 (WebKit::NetworkCache::Storage::recordsPath):
3301 (WebKit::NetworkCache::Storage::synchronize):
3302 (WebKit::NetworkCache::Storage::remove):
3303 (WebKit::NetworkCache::Storage::dispatchReadOperation):
3304 (WebKit::NetworkCache::Storage::finishReadOperation):
3305 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
3306 (WebKit::NetworkCache::Storage::traverse):
3307 (WebKit::NetworkCache::Storage::clear):
3308 (WebKit::NetworkCache::Storage::shrink):
3309 (WebKit::NetworkCache::Storage::deleteOldVersions):
3310 (WebKit::NetworkCache::makeRecordDirectoryPath): Deleted.
3311 * NetworkProcess/cache/NetworkCacheStorage.h:
3312 (WebKit::NetworkCache::Storage::baseDirectoryPath): Deleted.
3313 (WebKit::NetworkCache::Storage::directoryPath): Deleted.
3315 2015-04-14 Tim Horton <timothy_horton@apple.com>
3317 Update gesture swipe shadow style
3318 https://bugs.webkit.org/show_bug.cgi?id=143616
3319 <rdar://problem/19295843>
3321 Reviewed by Darin Adler.
3323 * UIProcess/mac/ViewGestureController.h:
3324 * UIProcess/mac/ViewGestureControllerMac.mm:
3325 (WebKit::ViewGestureController::beginSwipeGesture):
3326 For the modern shadow style, use a layer stretched along the edge of the swiping content
3327 with the newly added PNGs as the layer contents.
3329 Add a dimming layer over the lower layer of content which fades in/out
3332 (WebKit::ViewGestureController::handleSwipeGesture):
3333 Fade the dimming layer in and out during the entire swipe.
3334 Fade the shadow layer out during the last few pixels of the swipe.
3336 (WebKit::ViewGestureController::removeSwipeSnapshot):
3337 Unparent the new layers.
3339 * WebKit2.xcodeproj/project.pbxproj:
3340 * Resources/SwipeShadow.png:
3341 * Resources/SwipeShadow@2x.png:
3342 Add the new resources.
3344 2015-04-14 Brian Weinstein <bweinstein@apple.com>
3346 Add SPI to clear HSTS hosts added since a date.
3347 https://bugs.webkit.org/show_bug.cgi?id=143726
3349 rdar://problem/16664597
3351 Reviewed by Anders Carlsson.
3353 * UIProcess/API/C/mac/WKContextPrivateMac.h:
3354 * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3355 (WKContextResetHSTSHostsAddedAfterDate): Call into the WebProcessPool.
3356 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3357 (WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate): Call CFNetwork SPI to clear HSTS hosts added
3358 after the given date.
3359 * UIProcess/WebProcessPool.h:
3361 2015-04-14 Anders Carlsson <andersca@apple.com>
3363 More work on making the SharedMemory interface more sane
3364 https://bugs.webkit.org/show_bug.cgi?id=143718
3366 Reviewed by Andreas Kling.
3368 Get rid of m_shouldVMDeallocateData. The idea is that shared memory created by calling
3369 SharedMemory::allocate has a non-null m_data pointer, and a null m_port. Shared memory created
3370 by calling SharedMemory::create with a pointer and a length has a non-null port but a null m_data
3371 since the data can be unmapped by the caller and we don't want to hold on to dangling pointers.
3373 * Platform/SharedMemory.h:
3374 (WebKit::SharedMemory::data):
3375 * Platform/mac/SharedMemoryMac.cpp:
3376 (WebKit::SharedMemory::allocate):
3377 (WebKit::SharedMemory::create):
3378 (WebKit::SharedMemory::map):
3379 (WebKit::SharedMemory::~SharedMemory):
3380 (WebKit::SharedMemory::createHandle):
3382 2015-04-14 Antti Koivisto <antti@apple.com>
3384 Network Cache: Deduplicate body data
3385 https://bugs.webkit.org/show_bug.cgi?id=143652
3387 Reviewed by Darin Adler.
3389 It is common to have cache entries with identical body data. This happens when the same resource is loaded from
3390 a different URL (https vs http, slash vs no-slash at end, etc.). It also happens when the same URL is
3391 referenced from different cache partitions.
3393 We can improve disk space efficiency and use less memory by sharing identical body data between cache entries.
3395 This patch splits the body data out from the record file. The new record file contains meta data and response
3396 headers only. Body data is stored using the new BlobStorage interface. Files are deduplicated by computing
3397 SHA1 hash over the data and looking for an existing blob with the same hash. If found the existing entry
3398 is reused by creating a hard link to it.
3400 The new disk structure looks like this:
3405 0A3C9A970ADA27FAE9BD7BC630BAD0B929C293C0
3406 0A6B8060BA77DF92C82A2FD7AF58F79524D8F34C
3410 0B8645B04E7EC78C178B7460052601C2
3411 0B8645B04E7EC78C178B7460052601C2-body
3412 0CB1A3638D1C5A09C5E3283A74FA040B
3413 0CB1A3638D1C5A09C5E3283A74FA040B-body
3416 Each record file has an associated -body which is a hard link to a file in the Blobs directory.
3418 The patch increases effective capacity by 10-20% with a typical cache. It also saves memory especially when identical
3419 resources are used in multiple tabs.
3421 Currently all >0 sized resources are stored as shared blobs. In future small resources should be integrated into record
3422 files and blobs used for larger files only.
3424 * NetworkProcess/cache/NetworkCache.cpp:
3425 (WebKit::NetworkCache::Cache::store):
3426 (WebKit::NetworkCache::Cache::update):
3428 Adopt the new storage interface.
3430 (WebKit::NetworkCache::Cache::dumpContentsToFile):
3431 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp: Added.
3432 (WebKit::NetworkCache::BlobStorage::BlobStorage):
3433 (WebKit::NetworkCache::BlobStorage::synchronize):
3435 Compute size and delete unused files from the Blobs directory (link count == 1).
3437 (WebKit::NetworkCache::BlobStorage::blobPath):
3438 (WebKit::NetworkCache::BlobStorage::add):
3439 (WebKit::NetworkCache::BlobStorage::get):
3441 Interface for storing and retrieving data blobs. Blobs are deduplicated on add.
3443 (WebKit::NetworkCache::BlobStorage::remove):
3445 Removes the link but doesn't remove the blob even if there are no other clients. That happens on next synchronize().
3447 (WebKit::NetworkCache::BlobStorage::shareCount):
3449 Checks the link count to get the number of clients.
3451 * NetworkProcess/cache/NetworkCacheBlobStorage.h: Added.
3452 (WebKit::NetworkCache::BlobStorage::approximateSize):
3453 * NetworkProcess/cache/NetworkCacheCoders.cpp:
3454 (WebKit::NetworkCache::Coder<SHA1::Digest>::encode):
3455 (WebKit::NetworkCache::Coder<SHA1::Digest>::decode):
3456 * NetworkProcess/cache/NetworkCacheCoders.h:
3457 * NetworkProcess/cache/NetworkCacheData.h:
3458 (WebKit::NetworkCache::Data::isEmpty):
3459 * NetworkProcess/cache/NetworkCacheDataCocoa.mm: