1 2015-04-28 Brady Eidson <beidson@apple.com>
3 Consolidate most "frame load" arguments into FrameLoadRequest.
4 https://bugs.webkit.org/show_bug.cgi?id=144276
6 Reviewed by Alexey Proskuryakov.
8 * WebProcess/Plugins/PluginView.cpp:
9 (WebKit::PluginView::loadURL):
11 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
12 (WebKit::WebFrameLoaderClient::dispatchCreatePage):
14 * WebProcess/WebPage/WebInspector.cpp:
15 (WebKit::WebInspector::openInNewTab):
17 2015-04-28 Chris Dumez <cdumez@apple.com>
19 [WK2][Mac] Update WebContent process' sandbox profile for AWD
20 https://bugs.webkit.org/show_bug.cgi?id=144315
21 <rdar://problem/20719293>
23 Reviewed by Alexey Proskuryakov.
25 Update sandbox profile for AWD similarly to what was done for iOS in
28 * WebProcess/com.apple.WebProcess.sb.in:
30 2015-04-28 Antti Koivisto <antti@apple.com>
32 Network Cache: Disk cache getting filled by YouTube video data
33 https://bugs.webkit.org/show_bug.cgi?id=144259
35 Reviewed by Darin Adler.
37 MSE media is loaded via XHR and tends to eventually fill the cache.
39 YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
40 We can reduce disk writes and keep more useful resources around by not caching them
42 * NetworkProcess/NetworkResourceLoader.cpp:
43 (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
44 (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
45 * NetworkProcess/cache/NetworkCache.cpp:
46 (WebKit::NetworkCache::makeStoreDecision):
48 Don't store if the requester is XHR and response has video or audio content type.
50 * NetworkProcess/cache/NetworkCache.h:
51 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
52 (WebKit::NetworkCache::storeDecisionToDiagnosticKey):
53 * Shared/Network/NetworkResourceLoadParameters.cpp:
54 (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
55 (WebKit::NetworkResourceLoadParameters::encode):
56 (WebKit::NetworkResourceLoadParameters::decode):
57 * Shared/Network/NetworkResourceLoadParameters.h:
59 The requester type is now part of the ResourceRequest, no need for separate parameter.
61 * Shared/mac/WebCoreArgumentCodersMac.mm:
62 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
63 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
64 * WebProcess/Network/WebResourceLoadScheduler.cpp:
65 (WebKit::WebResourceLoadScheduler::scheduleLoad):
67 2015-04-28 Zan Dobersek <zdobersek@igalia.com>
69 [WK2] API::UserContentURLPattern creation functions should return Ref<>
70 https://bugs.webkit.org/show_bug.cgi?id=144225
72 Reviewed by Darin Adler.
74 Have API::UserContentURLPattern creation functions return Ref<>.
75 Call-sites are also updated, using and operating on the returned Ref<>
76 object where possible.
78 * Shared/API/APIUserContentURLPattern.h:
79 (API::UserContentURLPattern::create):
80 * Shared/API/c/WKUserContentURLPattern.cpp:
81 (WKUserContentURLPatternCreate):
83 2015-04-28 Zan Dobersek <zdobersek@igalia.com>
85 [WK2] API::URLRequest, API::URLResponse creation functions should return Ref<>
86 https://bugs.webkit.org/show_bug.cgi?id=144224
88 Reviewed by Darin Adler.
90 Have API::URLRequest and API::URLResponse creation functions return Ref<>.
91 The call-sites are also updated, using and operating on the returned Ref<> object
94 * Shared/API/APIURLRequest.h:
95 (API::URLRequest::create):
96 * Shared/API/APIURLResponse.h:
97 (API::URLResponse::create):
98 * Shared/API/c/WKURLRequest.cpp:
99 (WKURLRequestCreateWithWKURL):
100 * Shared/API/c/mac/WKURLRequestNS.mm:
101 (WKURLRequestCreateWithNSURLRequest):
102 * Shared/API/c/mac/WKURLResponseNS.mm:
103 (WKURLResponseCreateWithNSURLResponse):
104 * UIProcess/API/C/WKContext.cpp:
105 (WKContextSetDownloadClient):
106 * UIProcess/API/C/WKDownload.cpp:
107 (WKDownloadCopyRequest):
108 * UIProcess/API/C/WKNavigationDataRef.cpp:
109 (WKNavigationDataCopyOriginalRequest):
110 * UIProcess/API/C/WKPage.cpp:
111 (WKPageSetPagePolicyClient):
112 (WKPageSetPageUIClient):
113 * UIProcess/Cocoa/NavigationState.mm:
114 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
115 * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
116 (WebKit::WebSoupCustomProtocolRequestManagerClient::startLoading):
117 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
118 (willSendRequestForFrame):
119 * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
120 (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
121 (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
122 (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
124 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
126 [WK2] API::Point, API::Size, API::Rect creation functions should return Ref<>
127 https://bugs.webkit.org/show_bug.cgi?id=144223
129 Reviewed by Darin Adler.
131 Have API::Point, API::Size and API::Rect creation functions return Ref<>.
132 Call-sites are also updated, using and operating on the returned Ref<> object
135 * Shared/API/APIGeometry.h:
137 (API::Point::create):
139 * Shared/API/c/WKGeometry.cpp:
144 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
146 [WK2] API::Error creation functions should return Ref<>
147 https://bugs.webkit.org/show_bug.cgi?id=144222
149 Reviewed by Darin Adler.
151 Have API::Error creation functions return Ref<>.
152 The call-sites are also updated, using and operating
153 on the returned Ref<> object where possible.
155 * Shared/API/APIError.h:
156 (API::Error::create):
157 * Shared/API/c/cf/WKErrorCF.cpp:
158 (WKErrorCreateWithCFError):
159 * UIProcess/API/C/WKOriginDataManager.cpp:
160 (WKOriginDataManagerDeleteEntriesForOrigin):
161 (WKOriginDataManagerDeleteEntriesModifiedBetweenDates):
162 (WKOriginDataManagerDeleteAllEntries):
163 * UIProcess/API/C/WKPage.cpp:
164 (toGenericCallbackFunction):
165 (WKPageForceRepaint):
166 (WKPageValidateCommand):
167 (WKPageComputePagesForPrinting):
168 * UIProcess/API/C/WKPluginSiteDataManager.cpp:
169 (WKPluginSiteDataManagerClearSiteData):
170 (WKPluginSiteDataManagerClearAllSiteData):
171 * UIProcess/GenericCallback.h:
172 (WebKit::toGenericCallbackFunction):
173 * UIProcess/WebPageProxy.cpp:
174 (WebKit::WebPageProxy::printFinishedCallback):
176 2015-04-27 Sungmann Cho <sungmann.cho@navercorp.com>
178 [GTK] Remove unnecessary semicolon from WebKitNotificationProvider.h.
179 https://bugs.webkit.org/show_bug.cgi?id=144312
181 Reviewed by Martin Robinson.
183 No new tests, no behavior change.
185 * UIProcess/API/gtk/WebKitNotificationProvider.h:
187 2015-04-27 Brent Fulgham <bfulgham@apple.com>
189 PDF action menu fixes
190 https://bugs.webkit.org/show_bug.cgi?id=144299
191 <rdar://problem/20702215>
193 Reviewed by Tim Horton.
195 Make two corrections to how PDFs are handled:
196 1. When calculating the view rect for the user's selection, make sure
197 that we get coordinates for the correct PDF page. The existing code assumed
198 that the current PDFLayerControler's current page was correct, but this will
199 not be true if you zoom the PDF out so that several pages are displayed at
200 once. Each selection keeps track of the page it is referenced against.
202 2. Revise the offsets calculated for the TextIndicator to take into account
203 the font descender (as well as the ascender), and to adjust by the scaled
204 amount of margin around the selected text.
206 * WebProcess/Plugins/PDF/PDFPlugin.mm:
207 (WebKit::PDFPlugin::viewRectForSelection): Use correct page for calculating
209 * WebProcess/WebPage/mac/WebPageMac.mm:
210 (WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin): Include font 'descendant'
211 and (scaled) margin when adjusting the hit target for the TextIndicator to draw.
213 2015-04-27 Michael Catanzaro <mcatanzaro@igalia.com>
215 Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
216 https://bugs.webkit.org/show_bug.cgi?id=144193
218 Reviewed by Darin Adler.
222 2015-04-24 Jon Honeycutt <jhoneycutt@apple.com>
224 Context menus are not reshown after an orientation change
226 <https://bugs.webkit.org/show_bug.cgi?id=144143>
227 <rdar://problem/20679931>
229 Reviewed by Darin Adler.
231 * UIProcess/ios/WKActionSheet.mm:
232 (-[WKActionSheet updateSheetPosition]):
233 Return early if we're still in a rotation, not if the rotation is
236 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
238 [WK2] API::Dictionary creation functions should return Ref<>
239 https://bugs.webkit.org/show_bug.cgi?id=144221
241 Reviewed by Darin Adler.
243 Have API::Dictionary creation functions return Ref<>.
244 The call-sites are also updated, using and operating
245 on the returned Ref<> object where possible.
247 * Shared/API/APIDictionary.cpp:
248 (API::Dictionary::create):
249 * Shared/API/APIDictionary.h:
250 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
251 (createEncodedObject):
252 * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
253 (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
254 * Shared/API/c/WKDictionary.cpp:
255 (WKDictionaryCreate):
256 * Shared/API/c/WKMutableDictionary.cpp:
257 (WKMutableDictionaryCreate):
258 * Shared/Plugins/Netscape/PluginInformation.cpp:
259 (WebKit::createPluginInformationDictionary):
260 * Shared/Plugins/Netscape/PluginInformation.h:
261 * UIProcess/API/C/WKPage.cpp:
262 (WKPageSetPageUIClient):
263 * UIProcess/API/gtk/WebKitWebContext.cpp:
264 (webkit_web_context_prefetch_dns):
265 * UIProcess/API/gtk/WebKitWebView.cpp:
266 (webkit_web_view_get_snapshot):
267 * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
268 (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
269 * UIProcess/Plugins/PlugInAutoStartProvider.h:
270 * UIProcess/StatisticsRequest.cpp:
271 (WebKit::createDictionaryFromHashMap):
272 (WebKit::StatisticsRequest::completedRequest):
273 * UIProcess/WebFormClient.cpp:
274 (WebKit::WebFormClient::willSubmitForm):
275 * UIProcess/WebPageProxy.cpp:
276 (WebKit::WebPageProxy::didFailToInitializePlugin):
277 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
278 (didInitiateLoadForResource):
279 (willSendRequestForFrame):
280 (didReceiveResponseForResource):
281 (didReceiveContentLengthForResource):
282 (didFinishLoadForResource):
283 (didFailLoadForResource):
284 (webkitWebPageDidReceiveMessage):
285 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
286 (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
287 (WebKit::InjectedBundlePageFormClient::willSubmitForm):
289 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
291 [WK2] API::Data creation functions should return Ref<>
292 https://bugs.webkit.org/show_bug.cgi?id=144220
294 Reviewed by Darin Adler.
296 Have API::Data creation functions return Ref<>.
297 The call-sites are also updated, using and operating
298 on the returned Ref<> object where possible.
300 * Shared/API/APIData.h:
301 (API::Data::createWithoutCopying):
303 * Shared/API/c/WKData.cpp:
305 * Shared/API/c/mac/WKWebArchive.cpp:
306 (WKWebArchiveCopyData):
307 * Shared/API/c/mac/WKWebArchiveResource.cpp:
308 (WKWebArchiveResourceCopyData):
309 * Shared/APIWebArchive.h:
310 * Shared/APIWebArchive.mm:
311 (API::WebArchive::data):
312 * Shared/APIWebArchiveResource.h:
313 * Shared/APIWebArchiveResource.mm:
314 (API::WebArchiveResource::data):
315 * Shared/Cocoa/APIDataCocoa.mm:
316 (API::Data::createWithoutCopying):
317 * UIProcess/API/Cocoa/WKWebView.mm:
318 (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
319 * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
320 (webkitURISchemeRequestReadCallback):
321 * UIProcess/API/gtk/WebKitWebView.cpp:
322 (webkit_web_view_load_bytes):
323 * UIProcess/Downloads/DownloadProxy.cpp:
324 (WebKit::createData):
325 * UIProcess/WebPageProxy.cpp:
326 (WebKit::WebPageProxy::dataCallback):
327 (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder):
329 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
331 [WK2] API::URL creation functions should return Ref<>
332 https://bugs.webkit.org/show_bug.cgi?id=144219
334 Reviewed by Darin Adler.
336 Have API::URL creation functions return Ref<>.
337 The call-sites are also updated, using and operating in the
338 returned Ref<> object, where possible.
340 * Shared/API/APIURL.h:
342 * Shared/API/c/WKSharedAPICast.h:
343 (WebKit::toCopiedURLAPI):
344 * Shared/API/c/WKURL.cpp:
345 (WKURLCreateWithUTF8CString):
346 (WKURLCreateWithBaseURL):
347 * UIProcess/API/gtk/WebKitWebResource.cpp:
348 (webkit_web_resource_get_data):
349 * UIProcess/WebIconDatabase.cpp:
350 (WebKit::WebIconDatabase::didChangeIconForPageURL):
351 (WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):
352 * WebProcess/WebPage/WebPage.cpp:
353 (WebKit::WebPage::userAgent):
355 2015-04-27 Zan Dobersek <zdobersek@igalia.com>
357 [WK2] API::String creation functions should return Ref<>
358 https://bugs.webkit.org/show_bug.cgi?id=144218
360 Reviewed by Darin Adler.
362 Have API::String creation functions return Ref<>.
363 The call-sites are also updated, using and operating on the returned
364 Ref<> object, where possible.
366 * Shared/API/APIString.h:
367 * Shared/API/c/WKPluginInformation.cpp:
368 (WKPluginInformationBundleIdentifierKey):
369 (WKPluginInformationBundleVersionKey):
370 (WKPluginInformationBundleShortVersionKey):
371 (WKPluginInformationPathKey):
372 (WKPluginInformationDisplayNameKey):
373 (WKPluginInformationDefaultLoadPolicyKey):
374 (WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
375 (WKPluginInformationHasSandboxProfileKey):
376 (WKPluginInformationFrameURLKey):
377 (WKPluginInformationMIMETypeKey):
378 (WKPluginInformationPageURLKey):
379 (WKPluginInformationPluginspageAttributeURLKey):
380 (WKPluginInformationPluginURLKey):
381 (WKPlugInInformationReplacementObscuredKey):
382 * Shared/API/c/WKSharedAPICast.h:
383 (WebKit::ProxyingRefPtr::ProxyingRefPtr):
384 (WebKit::toCopiedAPI):
385 * Shared/API/c/WKString.cpp:
386 (WKStringCreateWithUTF8CString):
387 (WKStringCreateWithJSString):
388 * UIProcess/API/C/WKDatabaseManager.cpp:
389 (WKDatabaseManagerGetOriginKey):
390 (WKDatabaseManagerGetOriginQuotaKey):
391 (WKDatabaseManagerGetOriginUsageKey):
392 (WKDatabaseManagerGetDatabaseDetailsKey):
393 (WKDatabaseManagerGetDatabaseDetailsNameKey):
394 (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
395 (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
396 (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
397 (WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
398 (WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
399 * UIProcess/API/C/WKKeyValueStorageManager.cpp:
400 (WKKeyValueStorageManagerGetOriginKey):
401 (WKKeyValueStorageManagerGetCreationTimeKey):
402 (WKKeyValueStorageManagerGetModificationTimeKey):
403 * UIProcess/API/C/WKPage.cpp:
404 (WKPageGetSessionHistoryURLValueType):
405 (WKPageGetSessionBackForwardListItemValueType):
406 (toGenericCallbackFunction):
407 (WKPageValidateCommand):
408 * UIProcess/WebProcessPool.cpp:
409 (WebKit::WebProcessPool::didReceiveInvalidMessage):
411 2015-04-27 Brady Eidson <beidson@apple.com>
413 Make 'enum NavigationType' be an enum class
414 https://bugs.webkit.org/show_bug.cgi?id=144270
416 Reviewed by Alex Christensen.
418 * Shared/API/c/WKSharedAPICast.h:
421 * Shared/NavigationActionData.cpp:
422 (WebKit::NavigationActionData::NavigationActionData):
424 * UIProcess/API/Cocoa/WKNavigationAction.mm:
425 (toWKNavigationType):
427 * UIProcess/API/gtk/WebKitPrivate.cpp:
428 (toWebKitNavigationType):
430 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
431 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
433 * WebProcess/WebPage/WebInspector.cpp:
434 (WebKit::WebInspector::openInNewTab):
436 2015-04-27 Brent Fulgham <bfulgham@apple.com>
438 REGRESSION(r182879): Images and video can no longer be downloaded
439 https://bugs.webkit.org/show_bug.cgi?id=144267
440 <rdar://problem/20702844>
442 Reviewed by Simon Fraser.
444 * UIProcess/mac/WKActionMenuController.mm:
445 (-[WKActionMenuController _createActionMenuItemForTag:]): Check for
446 "!WebCore::protocolIs(..., "file")" for image and media downloads.
448 2015-04-27 Csaba Osztrogonác <ossy@webkit.org>
450 [EFL] TestWebKitAPI's forwarding header generator should depend on WebKit2's generator
451 https://bugs.webkit.org/show_bug.cgi?id=143874
453 Reviewed by Gyuyoung Kim.
455 * PlatformEfl.cmake: Rename the generator to have consistent name with other generators.
456 * Scripts/generate-forwarding-headers.pl: Removed the unnecessary multiple include-path support.
458 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
460 [SOUP] Add initial implementation of NetworkProcess disk cache
461 https://bugs.webkit.org/show_bug.cgi?id=143872
463 Reviewed by Martin Robinson.
465 Implement the platform specific parts of the disk cache
466 implementation for Soup. It's mainly NetworkCache::Data and
467 NetworkCache::IOChannel.
470 * NetworkProcess/cache/NetworkCache.cpp:
471 (WebKit::NetworkCache::dumpFileChanged):
472 (WebKit::NetworkCache::Cache::initialize):
473 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
474 * NetworkProcess/cache/NetworkCacheData.h:
475 (WebKit::NetworkCache::Data::soupBuffer):
476 * NetworkProcess/cache/NetworkCacheDataSoup.cpp: Added.
477 (WebKit::NetworkCache::Data::Data):
478 (WebKit::NetworkCache::Data::empty):
479 (WebKit::NetworkCache::Data::data):
480 (WebKit::NetworkCache::Data::isNull):
481 (WebKit::NetworkCache::Data::apply):
482 (WebKit::NetworkCache::Data::subrange):
483 (WebKit::NetworkCache::concatenate):
484 (WebKit::NetworkCache::MapWrapper::~MapWrapper):
485 (WebKit::NetworkCache::deleteMapWrapper):
486 (WebKit::NetworkCache::mapFile):
487 (WebKit::NetworkCache::Data::adoptMap):
488 (WebKit::NetworkCache::computeSHA1):
489 (WebKit::NetworkCache::bytesEqual):
490 * NetworkProcess/cache/NetworkCacheIOChannel.h:
491 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp: Added.
492 (WebKit::NetworkCache::IOChannel::IOChannel):
493 (WebKit::NetworkCache::IOChannel::open):
494 (WebKit::NetworkCache::fillDataFromReadBuffer):
495 (WebKit::NetworkCache::inputStreamReadReadyCallback):
496 (WebKit::NetworkCache::IOChannel::read):
497 (WebKit::NetworkCache::IOChannel::readSync):
498 (WebKit::NetworkCache::outputStreamWriteReadyCallback):
499 (WebKit::NetworkCache::IOChannel::write):
500 * NetworkProcess/cache/NetworkCacheStorageSoup.cpp: Removed.
501 * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
502 * NetworkProcess/soup/NetworkProcessSoup.cpp:
503 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
504 (WebKit::NetworkProcess::platformSetCacheModel):
505 (WebKit::NetworkProcess::clearDiskCache):
508 2015-04-26 Yusuke Suzuki <utatane.tea@gmail.com>
510 [ES6] Implement ES6 template literals
511 https://bugs.webkit.org/show_bug.cgi?id=142691
513 Reviewed by Darin Adler.
515 Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
517 * Configurations/FeatureDefines.xcconfig:
519 2015-04-26 Sungmann Cho <sungmann.cho@navercorp.com>
521 Remove PluginView::renderer().
522 https://bugs.webkit.org/show_bug.cgi?id=144216
524 Reviewed by Darin Adler.
526 Nobody should have to know about the plug-in view's renderer except the plug-in view itself.
528 No new tests, no behavior change.
530 * WebProcess/Plugins/PDF/PDFPlugin.mm:
531 (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
532 (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
533 * WebProcess/Plugins/PluginView.cpp:
534 (WebKit::PluginView::renderer): Deleted.
535 * WebProcess/Plugins/PluginView.h:
537 2015-04-26 Doug Russell <d_russell@apple.com>
539 AX: richer text change notifications (142719)
540 https://bugs.webkit.org/show_bug.cgi?id=142719
542 Reviewed by Darin Adler.
544 Richer accessibility value change notifications. Introduce AXTextEditType,
545 postTextStateChangeNotification and postTextReplacementNotification to give assistive
546 tech apps more reliable context for responding to changes in web content. Also implement
547 a mechanism to post value changes in password form fields in coalesced ticks to thwart
548 analyzing the cadence of changes.
550 Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
551 and an overload of postTextReplacementNotification to give assistive tech apps more
552 reliable context for responding to changes in web content selection. Also block posting
553 selection changes on password fields.
555 * UIProcess/WebEditCommandProxy.cpp:
556 (WebKit::WebEditCommandProxy::nameForEditAction):
558 2015-04-26 Dan Bernstein <mitz@apple.com>
560 <rdar://problem/20702337> REGRESSION (r182952): Plug-in service fails to load because it links against WebKit2.framework
561 https://bugs.webkit.org/show_bug.cgi?id=144233
563 Reviewed by Simon Fraser.
565 Have the plug-in service link against WebKit.framework rather than WebKit2.framework.
567 * Configurations/PluginService.32.xcconfig: Removed linker flags for linking against WebKit2
568 and Foundation from the definition of OTHER_LDFLAGS. Since linking is no longer conditional,
569 we can just do it in the target’s Link Binary With Libraries build phase.
571 * Configurations/PluginService.64.xcconfig: Ditto.
573 * WebKit2.xcodeproj/project.pbxproj: Have Foundation and WebKit listed in the services’ Link
574 Binariy With Libraries build phases (one service already had WebKit).
576 2015-04-26 Dan Bernstein <mitz@apple.com>
580 * UIProcess/ios/forms/WKFileUploadPanel.mm:
581 (-[WKFileUploadPanel _showDocumentPickerMenu]): Suppressed deprecation warnings around use
582 of -[UIDocumentMenuViewController _setIgnoreApplicationEntitlementForImport:].
584 2015-04-25 Tim Horton <timothy_horton@apple.com>
586 Further update gesture swipe shadow style
587 https://bugs.webkit.org/show_bug.cgi?id=144215
588 <rdar://problem/19295843>
590 Reviewed by Dan Bernstein.
592 * Resources/mac/SwipeShadow.png: Removed.
593 * Resources/mac/SwipeShadow@2x.png: Removed.
594 * UIProcess/mac/ViewGestureController.h:
595 * UIProcess/mac/ViewGestureControllerMac.mm:
596 (WebKit::ViewGestureController::beginSwipeGesture):
597 * WebKit2.xcodeproj/project.pbxproj:
598 Use a CAGradientLayer instead of PNGs for the swipe shadow.
600 2015-04-25 Dan Bernstein <mitz@apple.com>
602 WebKit2 part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
603 https://bugs.webkit.org/show_bug.cgi?id=144201
605 Reviewed by Darin Adler.
607 Instead of TBD, we use the high version number to which it corresponds in CFAvailability.h,
610 * mac/MigrateHeadersFromWebKitLegacy.make: To detect not-yet-available declarations in
611 headers, look for "9876_5" rather than "TBA".
613 2015-04-24 Timothy Hatcher <timothy@apple.com>
615 Web Inspector: Remove native window dock controls
616 https://bugs.webkit.org/show_bug.cgi?id=144184
618 Reviewed by Joseph Pecoraro.
620 * Resources/DockBottom.pdf: Removed.
621 * Resources/DockBottomLegacy.pdf: Removed.
622 * Resources/DockRight.pdf: Removed.
623 * Resources/DockRightLegacy.pdf: Removed.
624 * UIProcess/WebInspectorProxy.h:
625 * UIProcess/mac/WebInspectorProxyMac.mm:
626 (WebKit::WebInspectorProxy::createInspectorWindow):
627 (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
628 * WebKit2.xcodeproj/project.pbxproj:
630 2015-04-25 Martin Robinson <mrobinson@igalia.com>
632 Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
633 https://bugs.webkit.org/show_bug.cgi?id=144182
635 Reviewed by Simon Fraser.
637 * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
639 2015-04-24 Simon Fraser <simon.fraser@apple.com>
641 Have the web inspector report accurate memory use for layers with detached backing store
642 https://bugs.webkit.org/show_bug.cgi?id=144179
644 Reviewed by Dean Jackson.
646 Remote layers can make their backing store volatile, so the backing only contributes
647 to reported memory use when attached.
649 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
651 2015-04-24 Andreas Kling <akling@apple.com>
653 theverge.com burning 100% CPU on iPad (due to window.screenX/Y)
654 <https://webkit.org/b/144175>
655 <rdar://problem/20694585>
657 Reviewed by Anders Carlsson.
659 Return an empty window rect on iOS WK2 builds. This avoids sending a synchronous
660 IPC request to the UI process that would give the same result, but spend way
661 more time and CPU cycles to do so.
663 With this change, theverge.com CPU usage goes from 100% to ~20% when idle.
665 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
666 (WebKit::WebChromeClient::windowRect):
668 2015-04-24 Brent Fulgham <bfulgham@apple.com>
670 TextIndicator for embedded PDFs is slightly offset
671 https://bugs.webkit.org/show_bug.cgi?id=144172
672 <rdar://problem/20691304>
674 Reviewed by Tim Horton.
676 When I converted the existing DOM Range logic to work with PDFSelections, I omitted the
677 step where the font ascent was used to adjust the origin used for the TextIndicator. This
678 patch determines the correct ascent for the range of characters in the selection, and
679 adjusts the offset by the difference between the ascent and the height of the selection rect.
681 Also, since the PDFSelection only supplies the bounding rect for the selection, I calculate
682 an equivalent text bounding box by insetting the rect by half the size of the ascent.
684 * WebProcess/Plugins/PDF/PDFPlugin.mm:
685 (WebKit::PDFPlugin::scaleFactor): Add accessor for PDF scale factor.
686 * WebProcess/Plugins/PDF/PDFPlugin.h:
687 * WebProcess/WebPage/mac/WebPageMac.mm:
688 (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Adjusted to take the
689 font ascent and scale factor into account.
691 2015-04-24 David Kilzer <ddkilzer@apple.com>
693 REGRESSION (r183293): Fix iOS EWS build by adding SPI declaration for +[UIPeripheralHost visiblePeripheralFrame]
695 Fixes the following build failures:
697 WebKit2/UIProcess/ios/WKPDFView.mm:740:45: error: class method '+visiblePeripheralFrame' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
698 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
699 ^~~~~~~~~~~~~~~~~~~~~~
700 WebKit2/UIProcess/ios/WKPDFView.mm:740:12: error: no viable conversion from 'id' to 'CGRect'
701 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
702 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
704 * Platform/spi/ios/UIKitSPI.h:
705 (+[UIPeripheralHost visiblePeripheralFrame]): Add declaration.
707 2015-04-24 Anders Carlsson <andersca@apple.com>
709 Change _WKWebsiteDataStore to hold on to an internal WKWebsiteDataStore
710 https://bugs.webkit.org/show_bug.cgi?id=144171
712 Reviewed by Tim Horton.
714 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
715 (-[WKWebViewConfiguration _websiteDataStore]):
716 (-[WKWebViewConfiguration _setWebsiteDataStore:]):
717 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
718 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
719 (-[_WKWebsiteDataStore initWithDataStore:]):
720 (+[_WKWebsiteDataStore defaultDataStore]):
721 (+[_WKWebsiteDataStore nonPersistentDataStore]):
722 (-[_WKWebsiteDataStore isNonPersistent]):
723 (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
724 (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
725 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
726 * UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
727 * WebKit2.xcodeproj/project.pbxproj:
729 2015-04-24 Tim Horton <timothy_horton@apple.com>
731 WKPDFView does not support password-protected PDFs
732 https://bugs.webkit.org/show_bug.cgi?id=144162
733 <rdar://problem/18411512>
735 Reviewed by Andy Estes.
737 * Platform/spi/ios/UIKitSPI.h:
740 * UIProcess/ios/WKPDFView.h:
741 * UIProcess/ios/WKPDFView.mm:
742 (-[WKPDFView _didLoadPDFDocument]):
743 (-[WKPDFView web_setContentProviderData:suggestedFilename:]):
744 Move creation of the UIPDFDocument (only possible if the CGPDFDocument is unlocked)
745 and initial setup of the page views out into _didLoadPDFDocument.
747 If the CGPDFDocument is locked, we'll show some UI to unlock it; otherwise
748 we'll continue on to _didLoadPDFDocument as previously.
750 (-[WKPDFView web_setMinimumSize:]):
751 Resize the password UI instead of the PDF pages if we have it.
753 (-[WKPDFView _computePageAndDocumentFrames]):
754 Don't bother doing any work revalidating PDF pages if the document is locked.
756 (-[WKPDFView _updatePasswordEntryField]):
757 Make sure that the UIDocumentPassword view is always the size of the scrollview.
758 This takes care of rotation.
760 (-[WKPDFView _keyboardDidShow:]):
761 Make sure that we scroll the password field around, if necessary, to keep it
762 on screen when editing begins.
764 (-[WKPDFView _showPasswordEntryField]):
765 (-[WKPDFView _hidePasswordEntryField]):
766 Adjust the background color (to match the UIDocumentPasswordView) and disable zooming
767 while it's up. The UIDocumentPassword view is installed into the scroll view
768 to match UIWebView behavior.
770 (-[WKPDFView userDidEnterPassword:forPasswordView:]):
771 (-[WKPDFView didBeginEditingPassword:inView:]):
772 (-[WKPDFView didEndEditingPassword:inView:]):
773 (-[WKPDFView _didFailToUnlock]):
774 Pop up a dialog informing the user that they entered the wrong password.
776 (-[WKPDFView _tryToUnlockWithPassword:]):
777 Try to unlock the document. If it succeeds, hide the unlock UI and go back to
780 2015-04-24 Commit Queue <commit-queue@webkit.org>
782 Unreviewed, rolling out r183266.
783 https://bugs.webkit.org/show_bug.cgi?id=144164
785 Broke 32-bit build and a test. (Requested by ap on #webkit).
789 "AX: richer text change notifications (142719)"
790 https://bugs.webkit.org/show_bug.cgi?id=142719
791 http://trac.webkit.org/changeset/183266
793 2015-04-24 Brent Fulgham <bfulgham@apple.com>
795 REGRESSION: WebKit2.ActionMenusTest API test fails
796 https://bugs.webkit.org/show_bug.cgi?id=144149
797 <rdar://problem/20677770>
799 Reviewed by Tim Horton.
801 Tested by TestWebKitAPI
803 The 'lookupTextAtLocation' method was not converting the NSEvent coordinates it
804 was receiving from root view to the plugin view. Consequently, full page PDFs
805 did hit testing correctly, but an <embed> PDF would not.
807 Since 'existingSelectionContainsPoint' is exposed as API, I also modified it to
808 expect 'root view' coordinates and perform the requisite conversions, rather
809 than expecting 'plugin view' coordinates.
811 * WebProcess/Plugins/PDF/PDFPlugin.mm:
812 (WebKit::PDFPlugin::existingSelectionContainsPoint): Expect 'root view' coordinates
814 (WebKit::PDFPlugin::lookupTextAtLocation): Properly convert the passed 'root view'
815 coordinates to the PDF's view coordinate space.
816 * WebProcess/WebPage/mac/WebPageMac.mm:
817 (WebKit::WebPage::performActionMenuHitTestAtLocation): Pass hit point using view coordinates,
818 not content coordinates.
820 2015-04-24 Anders Carlsson <andersca@apple.com>
822 Address a review comment from Joe Pecoraro.
824 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
826 2015-04-24 Anders Carlsson <andersca@apple.com>
828 Rename -[WKWebsiteDataStore isNonPersistent] to -[WKWebsiteDataStore isPersistent]
829 https://bugs.webkit.org/show_bug.cgi?id=144158
831 Reviewed by Beth Dakin.
833 * UIProcess/API/APIWebsiteDataStore.cpp:
834 (API::WebsiteDataStore::isPersistent):
835 (API::WebsiteDataStore::isNonPersistent): Deleted.
836 * UIProcess/API/APIWebsiteDataStore.h:
837 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
838 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
839 (-[WKWebsiteDataStore isPersistent]):
840 (-[WKWebsiteDataStore isNonPersistent]): Deleted.
841 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
842 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
843 (-[_WKWebsiteDataStore isNonPersistent]):
844 * UIProcess/WebsiteData/WebsiteDataStore.h:
846 2015-04-24 Brent Fulgham <bfulgham@apple.com>
848 Immediate action not functional for embedded PDFs
849 https://bugs.webkit.org/show_bug.cgi?id=143952
850 <rdar://problem/19842365>
852 Reviewed by Tim Horton.
854 Add a new method to retrieve appropriate dictionary lookup content and update the
855 hit test result with relevant dictionary content and the bounding rect of the
858 * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add stub.
859 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Initialize plugin type.
860 * WebProcess/Plugins/PDF/PDFPlugin.h:
861 * WebProcess/Plugins/PDF/PDFPlugin.mm:
862 (WebKit::rectInWindowSpaceForRectInLayoutSpace): New helper function to
863 convert PDF 'in page' units to the equivalent view units.
864 (WebKit::PDFPlugin::PDFPlugin): Initialize plugin type.
865 (WebKit::PDFPlugin::viewRectForSelection): Query a provided PDFSelection for
866 its bounding rect and return the result in view units.
867 * WebProcess/Plugins/Plugin.h:
868 * WebProcess/Plugins/PluginProxy.cpp: Initialize plugin type.
869 * WebProcess/Plugins/PluginProxy.h: Add stub.
870 * WebProcess/Plugins/PluginView.cpp:
871 (WebKit::PluginView::viewRectForSelection): Added.
872 * WebProcess/Plugins/PluginView.h:
873 * WebProcess/WebPage/WebPage.h:
874 * WebProcess/WebPage/mac/WebPageMac.mm:
875 (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Added.
876 (WebKit::textIndicatorTransitionForActionMenu): Added helper function.
877 (WebKit::WebPage::performActionMenuHitTestAtLocation): Update the hit test information
878 with relevant dictionary lookup content, and mark the result as a text node (if
881 2015-04-24 Jer Noble <jer.noble@apple.com>
883 [WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state actually changed.
884 https://bugs.webkit.org/show_bug.cgi?id=144153
886 Reviewed by Alexey Proskuryakov.
888 Check the old state vs. the new state and only issue the change notification if the IsPlayingAudio state changed.
890 * UIProcess/WebPageProxy.cpp:
891 (WebKit::WebPageProxy::isPlayingMediaDidChange):
893 2015-04-24 Antti Koivisto <antti@apple.com>
895 CrashTracer: [USER] com.apple.WebKit.Networking at com.apple.WebKit: WebKit::NetworkResourceLoader::~NetworkResourceLoader + 14
896 https://bugs.webkit.org/show_bug.cgi?id=144147
898 Reviewed by Chris Dumez.
900 Storage::storeBodyAsBlob copies the std::function callback for handling mapped bodies in a thread.
901 This is thread safe only if the function copy is thread safe. It is currently not as we are capturing
902 RefPtr<NetworkResourceLoader> and NetworkResourceLoader doesn't use thread safe refcounting.
904 Fix by avoiding copying of the callback. Use same apporach for WriteOperation as we already use for
905 ReadOperation: count the active operations in progress and delete WriteOperation when everything is
906 finished. This way we don't need to copy the function out from WriteOperation.
908 * NetworkProcess/cache/NetworkCacheStorage.cpp:
909 (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
910 (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
912 Move definition here from the header.
914 (WebKit::NetworkCache::Storage::~Storage):
915 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
917 Increment the operation count when storing a blob, call finishWriteOperation when done.
919 (WebKit::NetworkCache::Storage::dispatchReadOperation):
920 (WebKit::NetworkCache::Storage::finishReadOperation):
922 Count active operations instead of finished operations. This makes the code clearer.
924 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
925 (WebKit::NetworkCache::Storage::finishWriteOperation):
927 Mirror the way ReadOperations work.
929 * NetworkProcess/cache/NetworkCacheStorage.h:
930 (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation): Deleted.
932 2015-04-24 Timothy Hatcher <timothy@apple.com>
934 REGRESSION: Web Inspector: Start Timeline Recording in Develop menu broken
935 https://bugs.webkit.org/show_bug.cgi?id=144150
937 Reviewed by Brian Burg.
939 * WebProcess/WebPage/WebInspectorUI.cpp:
940 (WebKit::WebInspectorUI::evaluateCommandOnLoad): Properly treat bools as literals
941 instead of strings by not using the string version of evaluateCommandOnLoad.
943 2015-04-23 Anders Carlsson <andersca@apple.com>
945 Add headerdocs for WKWebsiteDataRecord and WKWebsiteDataStore
946 https://bugs.webkit.org/show_bug.cgi?id=144138
948 Reviewed by Darin Adler.
950 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
951 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
952 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
953 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
954 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
955 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
957 2015-04-24 Doug Russell <d_russell@apple.com>
959 AX: richer text change notifications (142719)
960 https://bugs.webkit.org/show_bug.cgi?id=142719
962 Reviewed by Darin Adler.
964 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.
966 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.
968 * UIProcess/WebEditCommandProxy.cpp:
969 (WebKit::WebEditCommandProxy::nameForEditAction):
971 2015-04-24 Darin Adler <darin@apple.com>
973 Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
974 https://bugs.webkit.org/show_bug.cgi?id=128007
976 Reviewed by Anders Carlsson.
978 * NetworkProcess/cache/NetworkCacheEncoder.h: Added an include now
979 needed that was inherited from OwnPtr.h before.
981 2015-04-24 Antti Koivisto <antti@apple.com>
983 Network Cache: Make path functions members
984 https://bugs.webkit.org/show_bug.cgi?id=144146
986 Reviewed by Carlos Garcia Campos.
988 This simplifies the code.
990 * NetworkProcess/cache/NetworkCacheStorage.cpp:
991 (WebKit::NetworkCache::Storage::partitionPathForKey):
992 (WebKit::NetworkCache::Storage::recordPathForKey):
993 (WebKit::NetworkCache::Storage::bodyPathForKey):
994 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
995 (WebKit::NetworkCache::Storage::remove):
996 (WebKit::NetworkCache::Storage::dispatchReadOperation):
997 (WebKit::NetworkCache::Storage::finishReadOperation):
998 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
999 (WebKit::NetworkCache::partitionPathForKey): Deleted.
1000 (WebKit::NetworkCache::recordPathForKey): Deleted.
1001 (WebKit::NetworkCache::bodyPathForKey): Deleted.
1002 * NetworkProcess/cache/NetworkCacheStorage.h:
1004 2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
1006 Unreviewed. Remove incorrect assert after r183189.
1008 In this case the assert was already there, but it's incorrect
1009 because we are handling uninitialized attachments below in the
1010 same function, and also when sending messages. So, if it's ok to
1011 send uninitialized attachments, it's ok to receive them. This
1012 didn't fail before r183189, because we were only invaliding the
1013 attachments by setting the file descriptor to -1, and they were
1014 handled as null attachments. After r183189, the move operator
1015 resets the moved attachment leaving it uninitialized again.
1017 * Platform/IPC/unix/ConnectionUnix.cpp:
1018 (IPC::Connection::processMessage):
1020 2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
1022 [SOUP] Use a webkit subdirectory for the disk cache
1023 https://bugs.webkit.org/show_bug.cgi?id=144048
1025 Reviewed by Martin Robinson.
1027 Recent versions of libsoup remove any file in cache dir not
1028 referenced by the index when the cache is loaded to workaround
1029 leaked resources when load/dump is unbalanced for whatever reason,
1030 like a crash. We currently use $XDG_CACHE_HOME/app-name as default
1031 disk cache directory, but that directory could be used by apps to
1032 cache other things, and the soup cache might end up deleting other
1033 stuff. The soup cache assumes the given directory is only for the
1034 disk cache, so we should ensure that.
1036 * NetworkProcess/soup/NetworkProcessSoup.cpp:
1037 (WebKit::NetworkProcess::platformInitializeNetworkProcess): Append
1038 webkit to the given disk cache and clear the previous soup cache if it exists.
1039 * WebProcess/soup/WebProcessSoup.cpp:
1040 (WebKit::WebProcess::platformInitializeWebProcess): Ditto.
1042 2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
1044 Unreviewed. Remove incorrect ASSERT added in r183176.
1046 We allow to encode null attachments.
1048 * Platform/unix/SharedMemoryUnix.cpp:
1049 (WebKit::SharedMemory::Handle::releaseAttachment):
1051 2015-04-23 Dan Bernstein <mitz@apple.com>
1053 <rdar://problem/20680694> Framework header postprocessing isn’t removing WK_DEPRECATED macros when it should.
1055 Reviewed by Andy Estes.
1057 * mac/postprocess-framework-headers.sh:
1059 2015-04-23 Simon Fraser <simon.fraser@apple.com>
1061 Make it possible to detach GraphicsLayerCA backing store
1062 https://bugs.webkit.org/show_bug.cgi?id=144140
1064 Reviewed by Tim Horton.
1066 This changes makes it possible to denote a GraphicsLayerCA's backing store
1067 as "attached" or not. When not attached, the backing store is made volatile
1068 and can be purged. This will be used in a future patch.
1070 * Shared/mac/RemoteLayerBackingStore.mm:
1071 (WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore): Whitespace.
1072 (WebKit::RemoteLayerBackingStore::display): If backingStoreWillBeDisplayed()
1073 returns true, this indicates that the backing store was brought out of the
1074 "unreachable" list, so return true even if the backing store doesn't require
1076 * Shared/mac/RemoteLayerBackingStoreCollection.h: C++11 initializer, and comments.
1077 * Shared/mac/RemoteLayerBackingStoreCollection.mm:
1078 (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
1079 (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed): Return true
1080 if the caller will need to submit the backing store in the current transaction.
1081 (WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable): This
1082 explicit dirtying is no longer necessary given the backingStoreWillBeDisplayed() change.
1083 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1084 (WebKit::applyPropertiesToLayer): Only set the layer's backing if we both have backing
1085 store, and it's attached.
1086 * Shared/mac/RemoteLayerTreeTransaction.h: New bit, and data member.
1087 * Shared/mac/RemoteLayerTreeTransaction.mm:
1088 (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
1089 (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1090 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1091 (WebKit::dumpChangedLayers):
1092 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1093 (WebKit::PlatformCALayerRemote::recursiveBuildTransaction): Only call display()
1094 on the backing store if it's attached.
1095 (WebKit::PlatformCALayerRemote::setBackingStoreAttached):
1096 (WebKit::PlatformCALayerRemote::backingStoreAttached):
1097 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1098 * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
1099 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1100 (WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):
1102 2015-04-23 Tim Horton <timothy_horton@apple.com>
1104 Quick Look preview popover is not dismissed on scroll in Mail
1105 https://bugs.webkit.org/show_bug.cgi?id=144119
1106 <rdar://problem/19752045>
1108 Reviewed by Anders Carlsson.
1110 * UIProcess/API/mac/WKView.mm:
1111 (-[WKView renewGState]):
1112 If we have a TextIndicator, dismiss all content relative child windows
1113 on renewGState, not just the TextIndicator itself.
1115 This will fix cases like Mail, where WebKit isn't driving the scrolling,
1116 and we have no way (except renewGState) to know that scrolling is happening.
1118 2015-04-23 Simon Fraser <simon.fraser@apple.com>
1120 Changing TiledBacking velocity should schedule a tile revalidation
1121 https://bugs.webkit.org/show_bug.cgi?id=144123
1123 Reviewed by Tim Horton.
1125 Drive-by fix: use the FrameView& that we have already.
1127 * WebProcess/WebPage/ios/WebPageIOS.mm:
1128 (WebKit::WebPage::updateVisibleContentRects):
1130 2015-04-23 Jer Noble <jer.noble@apple.com>
1132 [Mac] Disable QTKit by default on future OS X.
1133 https://bugs.webkit.org/show_bug.cgi?id=144082
1135 Reviewed by Darin Adler.
1137 QTKitEnabled defaults to false.
1139 * Shared/WebPreferencesDefinitions.h:
1141 2015-04-23 Jer Noble <jer.noble@apple.com>
1143 [WK2][Mac] Tweak the timing curve of the WebKit Fullscreen animation
1144 https://bugs.webkit.org/show_bug.cgi?id=144120
1146 Reviewed by Eric Carlson.
1148 Tweak the curve to ease-in faster when the fullscreen animation duration is short.
1150 * UIProcess/mac/WKFullScreenWindowController.mm:
1151 (timingFunctionForDuration):
1156 2015-04-23 Enrica Casucci <enrica@apple.com>
1158 iOS build fix after r183208.
1162 * UIProcess/ios/WKContentViewInteraction.mm:
1164 2015-04-22 Alexey Proskuryakov <ap@apple.com>
1166 [iOS] WebKit services should inherit environment variables for home
1167 https://bugs.webkit.org/show_bug.cgi?id=144078
1168 rdar://problem/20571678
1170 Reviewed by Dan Bernstein.
1172 Pass current environment variables as XPC bootstrap. Also while at it, made
1173 _CFBundleSetupXPCBootstrap not soft linked.
1175 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
1177 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1178 (WebKit::connectToService):
1180 2015-04-23 Enrica Casucci <enrica@apple.com>
1182 Support share button.
1183 https://bugs.webkit.org/show_bug.cgi?id=144077
1184 rdar://problem/19772892
1186 Reviewed by Darin Adler.
1188 * UIProcess/ios/WKContentViewInteraction.mm:
1189 (-[WKContentView _share:]):
1190 (-[WKContentView canPerformAction:withSender:]):
1191 (-[WKContentView _define:]):
1192 (-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
1193 (-[WKContentView moveByOffset:]):
1194 (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
1195 (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
1196 (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
1197 (-[WKContentView accessoryTab:]):
1198 (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
1199 (-[WKContentView executeEditCommandWithCallback:]):
1201 2015-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
1203 [UNIX] Do not allow copies of IPC::Attachment
1204 https://bugs.webkit.org/show_bug.cgi?id=144096
1206 Reviewed by Darin Adler.
1208 It ensures that the file descriptor ownership is always correctly
1209 transferred. This way we can remove the dispose() method to
1210 explicitly close the file descriptor and always close it in the
1211 Attachment destructor (unless explicitly transferred to
1212 IPC::Connection or SharedMemory). It simplifies the code and
1213 ensure we don't leak file descriptors.
1215 * Platform/IPC/ArgumentDecoder.cpp:
1216 (IPC::ArgumentDecoder::~ArgumentDecoder): Remove the code to
1217 explicitly dispose attachments.
1218 (IPC::ArgumentDecoder::removeAttachment): Use WTF::move().
1219 * Platform/IPC/ArgumentEncoder.cpp:
1220 (IPC::ArgumentEncoder::~ArgumentEncoder): Remove the code to
1221 explicitly dispose attachments.
1222 (IPC::ArgumentEncoder::addAttachment): Use WTF::move().
1223 (IPC::ArgumentEncoder::releaseAttachments): Simplify by using WTF::move().
1224 * Platform/IPC/ArgumentEncoder.h:
1225 * Platform/IPC/Attachment.cpp:
1226 (IPC::Attachment::encode): Move a copy of the attachment, and
1227 reset the file descriptor, since the ownership is passed to the encoder.
1228 * Platform/IPC/Attachment.h: Make copy constructor and assignment
1229 private to not allow public copies. The only copy allowed is done
1230 by Attachment::encode(). Make m_fileDescriptor mutable so that we
1231 can reset it in Attachment::encode() after passing the ownership
1233 * Platform/IPC/unix/AttachmentUnix.cpp:
1234 (IPC::Attachment::~Attachment): Close the file descriptor if it
1235 hasn't been released explicitly.
1236 (IPC::Attachment::dispose): Deleted.
1237 * Platform/IPC/unix/ConnectionUnix.cpp:
1238 (IPC::Connection::processMessage): Do not use AttachmentResourceGuard.
1239 (IPC::Connection::sendOutgoingMessage): Ditto.
1240 (IPC::AttachmentResourceGuard::AttachmentResourceGuard): Deleted.
1241 (IPC::AttachmentResourceGuard::~AttachmentResourceGuard): Deleted.
1242 * Platform/unix/SharedMemoryUnix.cpp:
1243 (WebKit::SharedMemory::Handle::~Handle): Do not call clear().
1244 (WebKit::SharedMemory::Handle::clear): Reset the attachment.
1245 * UIProcess/WebInspectorProxy.cpp:
1246 (WebKit::WebInspectorProxy::createInspectorPage): Use WTF::move().
1247 * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1248 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1249 Call releaseFileDescriptor() instead of fileDescritpro() since the
1250 ownership is passed to the connection.
1252 2015-04-23 Alexey Proskuryakov <ap@apple.com>
1256 * WebProcess/cocoa/WebProcessCocoa.mm: Correct the case of an include file name.
1258 2015-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
1260 Unreviewed. Fix debug build after r183176.
1262 * Platform/unix/SharedMemoryUnix.cpp:
1263 (WebKit::SharedMemory::Handle::decode):
1264 (WebKit::SharedMemory::createHandle):
1266 2015-04-23 Andreas Kling <akling@apple.com>
1268 There should only be one way to get the system memory size.
1269 <https://webkit.org/b/144081>
1271 Reviewed by Antti Koivisto.
1273 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1274 (WebKit::NetworkProcess::platformSetCacheModel):
1275 (WebKit::memorySize): Deleted.
1276 * WebProcess/cocoa/WebProcessCocoa.mm:
1277 (WebKit::WebProcess::platformSetCacheModel):
1278 (WebKit::memorySize): Deleted.
1280 2015-04-23 Chris Dumez <cdumez@apple.com>
1282 [WK2] WebDiagnosticLoggingClient is leaking
1283 https://bugs.webkit.org/show_bug.cgi?id=144089
1284 <rdar://problem/19706214>
1286 Reviewed by Darin Adler.
1288 WebDiagnosticLoggingClient is leaking. It is constructed inside WebPage
1289 constructor but there is no code destroying it.
1291 This patch adds a new xxxDestroyed() virtual function to
1292 DiagnosticLoggingClient and that is overriden in
1293 WebDiagnosticLoggingClient to call "delete this". This is the same
1294 pattern as for other WK2 clients (e.g. WebFrameLoaderClient,
1295 WebProgressTrackerClient).
1297 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
1298 (WebKit::WebDiagnosticLoggingClient::mainFrameDestroyed):
1299 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
1301 2015-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
1303 [UNIX] Simplify the file descriptor handling in SharedMemory
1304 https://bugs.webkit.org/show_bug.cgi?id=144046
1306 Reviewed by Darin Adler.
1308 Simplify the file descriptor handling and clarify its ownership by
1309 using IPC::Attachment in SharedMemory::Handle instead of fd and
1310 size members. SharedMemory::Handle::adoptFromAttachment() has been
1311 renamed as SharedMemory::Handle::adoptAttachment() and receives an
1312 IPC::Attachment. And SharedMemory::Handle::releaseToAttachment()
1313 has been renamed as SharedMemory::Handle::releaseAttachment().
1315 * Platform/IPC/Attachment.h: Add move constructor and move assigned operator.
1316 * Platform/IPC/Connection.h:
1317 (IPC::Connection::identifierIsNull): A file descriptor is null
1319 * Platform/IPC/unix/AttachmentUnix.cpp:
1320 (IPC::Attachment::Attachment):
1321 (IPC::Attachment::operator=):
1322 (IPC::Attachment::dispose): Reset the file descriptor after
1324 * Platform/IPC/unix/ConnectionUnix.cpp:
1325 (IPC::Connection::processMessage): Use
1326 SharedMemory::Handle::adoptAttachment() that receives an
1327 IPC::Attachment now.
1328 (IPC::Connection::sendOutgoingMessage): Use
1329 SharedMemory::Handle::releaseAttachment().
1330 * Platform/SharedMemory.h:
1331 * Platform/unix/SharedMemoryUnix.cpp:
1332 (WebKit::SharedMemory::Handle::Handle): Remove initializers for
1333 file descriptor and size members.
1334 (WebKit::SharedMemory::Handle::clear): Dispose the attachment.
1335 (WebKit::SharedMemory::Handle::isNull): Handle is null if the
1336 attachment file descriptor is -1.
1337 (WebKit::SharedMemory::Handle::encode): Use releaseAttachment().
1338 (WebKit::SharedMemory::Handle::decode): Use adoptAttachment().
1339 (WebKit::SharedMemory::Handle::releaseAttachment): Implement it
1341 (WebKit::SharedMemory::Handle::adoptAttachment): Ditto.
1342 (WebKit::SharedMemory::map): Use
1343 IPC::Attachment::releaseFileDescriptor() instead of manually
1344 changing the member.
1345 (WebKit::SharedMemory::createHandle): Initialize the handle
1346 attachment with the duplicated file descriptor and size.
1348 2015-04-22 Darin Adler <darin@apple.com>
1350 Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
1351 https://bugs.webkit.org/show_bug.cgi?id=143943
1353 Reviewed by Anders Carlsson.
1355 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
1356 Removed unneeded include.
1358 2015-04-22 Brent Fulgham <bfulgham@apple.com>
1360 VisibleSelection should only accept Range by reference
1361 https://bugs.webkit.org/show_bug.cgi?id=144047
1363 Reviewed by Tim Horton.
1365 Update all uses of VisibleSelection to pass a Range reference instead
1368 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1369 (WebKit::InjectedBundleRangeHandle::renderedImage):
1370 * WebProcess/WebPage/FindController.cpp:
1371 (WebKit::FindController::getImageForFindMatch):
1372 (WebKit::FindController::selectFindMatch):
1373 * WebProcess/WebPage/WebPage.cpp:
1374 (WebKit::WebPage::insertTextAsync):
1375 (WebKit::WebPage::setCompositionAsync):
1376 * WebProcess/WebPage/mac/WebPageMac.mm:
1377 (WebKit::WebPage::insertDictatedTextAsync):
1379 2015-04-22 Anders Carlsson <andersca@apple.com>
1381 Add WK_ARRAY and WK_SET annotations
1382 https://bugs.webkit.org/show_bug.cgi?id=144075
1383 rdar://problem/19417770
1385 Reviewed by Dan Bernstein.
1387 * Shared/API/Cocoa/WKFoundation.h:
1388 * UIProcess/API/Cocoa/WKBackForwardList.h:
1389 * UIProcess/API/Cocoa/WKUserContentController.h:
1390 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1391 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1392 * mac/postprocess-framework-headers.sh:
1394 2015-04-22 Brent Fulgham <bfulgham@apple.com>
1396 Unreviewed build fix after r183136.
1398 * WebProcess/WebPage/mac/WebPageMac.mm: Correct capitalization of
1399 'HTMLPluginImageElement.h' -> 'HTMLPlugInImageElement.h'
1401 2015-04-21 Brent Fulgham <bfulgham@apple.com>
1403 Extend action menus to support PDF
1404 https://bugs.webkit.org/show_bug.cgi?id=143895
1405 <rdar://problem/19003333>
1407 Reviewed by Tim Horton.
1409 If the mouse pointer is over a PDF, try to provide a relevant action menu for whatever
1410 content is under the mouse. For now, we only support copying text and handling URLs.
1412 If no text is selected, use the dictionary lookup service to find a semantically appropriate
1413 selection underneath the mouse. This is consistent with how normal text is treated in pure HTML
1414 views. If some text is already selected, and the mouse is over the existing selection, continue
1415 using the selected text. Otherwise, discard the old selection and select the most appropriate
1416 region under the mouse pointer.
1418 * Shared/API/c/WKActionMenuTypes.h: Add PDF menu option.
1419 * Shared/WebMouseEvent.cpp: Recognize mouse force events as valid mouse events.
1420 * UIProcess/mac/WKActionMenuController.mm:
1421 (-[WKActionMenuController _defaultMenuItemsForPDF]): Add simply copy text option.
1422 (-[WKActionMenuController _defaultMenuItems]): Recognize PDFs and add relevant action
1424 * WebProcess/Plugins/Netscape/NetscapePlugin.h: Provide stub for new method.
1425 * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Expose 'rectsForSelectionInLayerSpace',
1426 'rectsForAnnotationInLayoutSpace', 'layout', and 'currentPage'.
1427 * WebProcess/Plugins/PDF/PDFPlugin.h:
1428 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1429 (WebKit::PDFPlugin::getSelectionForWordAtPoint): Added.
1430 (WebKit::PDFPlugin::existingSelectionContainsPoint): Added.
1431 (WebKit::PDFPlugin::lookupTextAtLocation): Added.
1432 * WebProcess/Plugins/Plugin.h: Add declaration for new 'getSelectionForWordAtPoint' method.
1433 * WebProcess/Plugins/PluginProxy.h: Provide stub for new method.
1434 * WebProcess/Plugins/PluginView.cpp:
1435 (WebKit::PluginView::getSelectionForWordAtPoint): Added.
1436 (WebKit::PluginView::existingSelectionContainsPoint): Added.
1437 (WebKit::PluginView::lookupTextAtLocation): Added.
1438 * WebProcess/Plugins/PluginView.h:
1439 * WebProcess/WebPage/mac/WebPageMac.mm:
1440 (WebKit::WebPage::performActionMenuHitTestAtLocation): Update to support PDF documents and retrieve
1441 relevant content to support later action menu handling.
1443 2015-04-22 Eric Carlson <eric.carlson@apple.com>
1445 Update AirPlay sandbox rules
1446 https://bugs.webkit.org/show_bug.cgi?id=144062
1447 <rdar://problem/19869448>
1449 Reviewed by Alexey Proskuryakov.
1451 * WebProcess/com.apple.WebProcess.sb.in: Remove obsolete rules.
1453 2015-04-22 Alexey Proskuryakov <ap@apple.com>
1455 [Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
1456 https://bugs.webkit.org/show_bug.cgi?id=144052
1457 rdar://problem/19754404
1459 Reviewed by Darin Adler.
1461 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
1462 (main): Make XPC transaction tracking work again after a re-exec.
1464 2015-04-22 Zan Dobersek <zdobersek@igalia.com>
1466 [WK2] Have API::Array creation methods return Ref<>
1467 https://bugs.webkit.org/show_bug.cgi?id=143933
1469 Reviewed by Darin Adler.
1471 API::Array::create() and API::Array::createStringArray() should return Ref<> objects
1472 as the return values are never null. It's up to the caller to implicitly convert the
1473 returned objects to RefPtr<> if so required. All the call-sites have been updated to
1476 * Shared/API/APIArray.cpp:
1477 (API::Array::create):
1478 (API::Array::createStringArray):
1480 * Shared/API/APIArray.h:
1481 * Shared/API/APIDictionary.cpp:
1482 (API::Dictionary::keys):
1483 * Shared/API/APIDictionary.h:
1484 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1485 (ensureObjectStream):
1486 * Shared/API/c/WKArray.cpp:
1488 (WKArrayCreateAdoptingValues):
1489 * Shared/API/c/WKContextMenuItem.cpp:
1490 (WKContextMenuCopySubmenuItems):
1491 * Shared/API/c/WKDictionary.cpp:
1492 (WKDictionaryCopyKeys):
1493 * Shared/API/c/WKMutableArray.cpp:
1494 (WKMutableArrayCreate):
1495 * Shared/Cocoa/WKNSDictionary.mm:
1496 (-[WKNSDictionary keyEnumerator]):
1497 * Shared/SecurityOriginData.cpp:
1498 (WebKit::performAPICallbackWithSecurityOriginDataVector):
1499 * Shared/WebContextMenuItem.cpp:
1500 (WebKit::WebContextMenuItem::submenuItemsAsAPIArray):
1501 * Shared/WebContextMenuItem.h:
1502 * Shared/WebOpenPanelParameters.cpp:
1503 (WebKit::WebOpenPanelParameters::acceptMIMETypes):
1504 (WebKit::WebOpenPanelParameters::selectedFileNames):
1505 * Shared/WebOpenPanelParameters.h:
1506 * UIProcess/API/C/WKBackForwardListRef.cpp:
1507 (WKBackForwardListCopyBackListWithLimit):
1508 (WKBackForwardListCopyForwardListWithLimit):
1509 * UIProcess/API/C/WKGrammarDetail.cpp:
1510 (WKGrammarDetailCopyGuesses):
1511 * UIProcess/API/C/WKOpenPanelParameters.cpp:
1512 (WKOpenPanelParametersCopyAcceptedMIMETypes):
1513 (WKOpenPanelParametersCopySelectedFileNames):
1514 * UIProcess/API/C/WKPage.cpp:
1515 (WKPageSetPageContextMenuClient):
1516 (WKPageCopyRelatedPages):
1517 * UIProcess/API/Cocoa/WKBackForwardList.mm:
1518 (-[WKBackForwardList backList]):
1519 (-[WKBackForwardList forwardList]):
1520 * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
1522 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1523 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1524 * UIProcess/API/gtk/WebKitBackForwardList.cpp:
1525 (webkit_back_forward_list_get_back_list_with_limit):
1526 (webkit_back_forward_list_get_forward_list_with_limit):
1527 * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
1528 (webkit_file_chooser_request_get_mime_types):
1529 (webkit_file_chooser_request_get_mime_types_filter):
1530 (webkit_file_chooser_request_select_files):
1531 * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
1532 (WebKitNotificationProvider::notificationCloseCallback):
1533 * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
1534 (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
1535 * UIProcess/Notifications/WebNotificationProvider.cpp:
1536 (WebKit::WebNotificationProvider::clearNotifications):
1537 * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1538 (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
1539 * UIProcess/StatisticsRequest.cpp:
1540 (WebKit::StatisticsRequest::completedRequest):
1541 * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1542 (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
1543 * UIProcess/WebBackForwardList.cpp:
1544 (WebKit::WebBackForwardList::backList):
1545 (WebKit::WebBackForwardList::forwardList):
1546 (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit):
1547 (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit):
1548 * UIProcess/WebBackForwardList.h:
1549 * UIProcess/WebCookieManagerProxy.cpp:
1550 (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
1551 * UIProcess/WebDatabaseManagerProxy.cpp:
1552 (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
1553 (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
1554 * UIProcess/WebGrammarDetail.cpp:
1555 (WebKit::WebGrammarDetail::guesses):
1556 * UIProcess/WebGrammarDetail.h:
1557 * UIProcess/WebKeyValueStorageManager.cpp:
1558 (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1559 (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
1560 * UIProcess/WebMediaCacheManagerProxy.cpp:
1561 (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
1562 * UIProcess/WebOriginDataManagerProxy.cpp:
1563 (WebKit::WebOriginDataManagerProxy::didGetOrigins):
1564 * UIProcess/WebPageProxy.cpp:
1565 (WebKit::WebPageProxy::didFindStringMatches):
1566 * UIProcess/WebProcessPool.cpp:
1567 (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins):
1568 * UIProcess/ios/forms/WKFileUploadPanel.mm:
1569 (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
1570 (-[WKFileUploadPanel presentWithParameters:resultListener:]):
1571 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
1572 (-[WKWebProcessPlugInFrame childFrames]):
1573 * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
1574 (WKBundleBackForwardListItemCopyChildren):
1575 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1576 (WKBundleFrameCopyChildFrames):
1577 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1578 (WKBundlePageCopyTrackedRepaintRects):
1579 * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
1580 (WebKit::InjectedBundleBackForwardListItem::children):
1581 * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
1582 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
1583 (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
1584 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1585 (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
1586 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1587 (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
1588 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1589 (WebKit::findLargestFrameInFrameSet):
1590 * WebProcess/WebPage/WebFrame.cpp:
1591 (WebKit::WebFrame::childFrames):
1592 * WebProcess/WebPage/WebFrame.h:
1593 * WebProcess/WebPage/WebPage.cpp:
1594 (WebKit::WebPage::trackedRepaintRects):
1595 * WebProcess/WebPage/WebPage.h:
1597 2015-04-21 Eric Carlson <eric.carlson@apple.com>
1599 [Mac] Use one playback target for all web processes
1600 https://bugs.webkit.org/show_bug.cgi?id=144009
1602 Reviewed by Tim Horton.
1604 Every WebPageProxy uses the WebMediaSessionManager singleton to talk to the playback target
1607 * UIProcess/PageClient.h:
1608 * UIProcess/WebPageProxy.cpp:
1609 (WebKit::WebPageProxy::WebPageProxy):
1610 (WebKit::WebPageProxy::resetState):
1611 (WebKit::WebPageProxy::isPlayingMediaDidChange):
1612 (WebKit::WebPageProxy::addPlaybackTargetPickerClient):
1613 (WebKit::WebPageProxy::removePlaybackTargetPickerClient):
1614 (WebKit::WebPageProxy::showPlaybackTargetPicker):
1615 (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
1616 (WebKit::WebPageProxy::setPlaybackTarget):
1617 (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
1618 (WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
1619 (WebKit::WebPageProxy::devicePickerProxy): Deleted.
1620 (WebKit::WebPageProxy::startingMonitoringPlaybackTargets): Deleted.
1621 (WebKit::WebPageProxy::stopMonitoringPlaybackTargets): Deleted.
1622 (WebKit::WebPageProxy::didChoosePlaybackTarget): Deleted.
1623 * UIProcess/WebPageProxy.h:
1624 (WebKit::WebPageProxy::isPlayingAudio):
1625 * UIProcess/WebPageProxy.messages.in:
1626 * UIProcess/mac/PageClientImpl.h:
1627 * UIProcess/mac/PageClientImpl.mm:
1628 (WebKit::PageClientImpl::mediaSessionManager):
1629 (WebKit::PageClientImpl::createPlaybackTargetPicker): Deleted.
1630 * UIProcess/mac/WebMediaSessionManagerMac.cpp: Added.
1631 (WebKit::WebMediaSessionManagerMac::singleton):
1632 (WebKit::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
1633 (WebKit::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
1634 (WebKit::WebMediaSessionManagerMac::targetPicker):
1635 * UIProcess/mac/WebMediaSessionManagerMac.h: Added.
1636 * WebProcess/Plugins/PluginView.h:
1637 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1638 (WebKit::WebChromeClient::isPlayingMediaDidChange):
1639 (WebKit::WebChromeClient::addPlaybackTargetPickerClient):
1640 (WebKit::WebChromeClient::removePlaybackTargetPickerClient):
1641 (WebKit::WebChromeClient::showPlaybackTargetPicker):
1642 (WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
1643 (WebKit::WebChromeClient::startingMonitoringPlaybackTargets): Deleted.
1644 (WebKit::WebChromeClient::stopMonitoringPlaybackTargets): Deleted.
1645 * WebProcess/WebCoreSupport/WebChromeClient.h:
1646 * WebProcess/WebPage/WebPage.h:
1647 * WebProcess/WebPage/WebPage.messages.in:
1648 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1649 (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
1650 * WebProcess/WebPage/mac/WebPageMac.mm:
1651 (WebKit::WebPage::playbackTargetSelected):
1652 (WebKit::WebPage::playbackTargetAvailabilityDidChange):
1653 (WebKit::WebPage::setShouldPlayToPlaybackTarget):
1655 2015-04-21 Anders Carlsson <andersca@apple.com>
1657 WKWebsiteDataStore doesn't track and remove IndexedDB databases
1658 https://bugs.webkit.org/show_bug.cgi?id=144032
1659 rdar://problem/20242856
1661 Reviewed by Tim Horton.
1663 * DatabaseProcess/DatabaseProcess.cpp:
1664 (WebKit::DatabaseProcess::fetchWebsiteData):
1665 (WebKit::DatabaseProcess::deleteWebsiteData):
1666 (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
1667 * DatabaseProcess/DatabaseProcess.h:
1668 * DatabaseProcess/DatabaseProcess.messages.in:
1669 * Shared/WebsiteData/WebsiteDataTypes.h:
1670 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1671 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
1672 (dataTypesToString):
1673 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
1674 (WebKit::toWebsiteDataTypes):
1675 (WebKit::toWKWebsiteDataTypes):
1676 * UIProcess/Databases/DatabaseProcessProxy.cpp:
1677 (WebKit::generateCallbackID):
1678 (WebKit::DatabaseProcessProxy::~DatabaseProcessProxy):
1679 (WebKit::DatabaseProcessProxy::fetchWebsiteData):
1680 (WebKit::DatabaseProcessProxy::deleteWebsiteData):
1681 (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
1682 (WebKit::DatabaseProcessProxy::didClose):
1683 (WebKit::DatabaseProcessProxy::didFetchWebsiteData):
1684 (WebKit::DatabaseProcessProxy::didDeleteWebsiteData):
1685 (WebKit::DatabaseProcessProxy::didDeleteWebsiteDataForOrigins):
1686 * UIProcess/Databases/DatabaseProcessProxy.h:
1687 * UIProcess/Databases/DatabaseProcessProxy.messages.in:
1688 * UIProcess/WebProcessPool.h:
1689 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1690 (WebKit::WebsiteDataStore::fetchData):
1691 (WebKit::WebsiteDataStore::removeData):
1693 2015-04-21 Anders Carlsson <andersca@apple.com>
1695 Add module maps for WebKit
1696 https://bugs.webkit.org/show_bug.cgi?id=144026
1697 rdar://problem/19665428
1699 Reviewed by Dan Bernstein.
1701 * Configurations/WebKit.xcconfig:
1702 * Modules/OSX.modulemap: Added.
1703 * Modules/iOS.modulemap: Added.
1705 2015-04-21 Tim Horton <timothy_horton@apple.com>
1707 Long pause under _takeViewSnapshot when screen updates are disabled
1708 https://bugs.webkit.org/show_bug.cgi?id=144017
1709 <rdar://problem/20548397>
1711 Reviewed by Simon Fraser.
1713 * UIProcess/API/mac/WKView.mm:
1714 (-[WKView _takeViewSnapshot]):
1715 Use CGSHWCaptureWindowList, for snapshotting that doesn't block on
1716 the next commit, and can succeed while screen updates are disabled
1719 2015-04-21 Chris Dumez <cdumez@apple.com>
1721 [WK2][NetworkCache] Better account of resource revalidations in efficacy logging
1722 https://bugs.webkit.org/show_bug.cgi?id=144014
1724 Reviewed by Antti Koivisto.
1726 Better account of resource revalidations in efficacy logging.
1727 Prevously, resources that were in the cache but needed revalidation
1728 were counted as retrieval successes, which is not entirely accurate.
1730 We now distinguish "is in the cache and is directly usable" from
1731 "is in the cache but needs revalidation". We also log how many of these
1732 revalidations are successful.
1734 * NetworkProcess/NetworkResourceLoader.cpp:
1735 (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
1736 * NetworkProcess/cache/NetworkCache.cpp:
1737 (WebKit::NetworkCache::Cache::update):
1738 * NetworkProcess/cache/NetworkCache.h:
1739 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1740 (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
1741 (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
1742 * NetworkProcess/cache/NetworkCacheStatistics.h:
1744 2015-04-21 Dan Bernstein <mitz@apple.com>
1746 [Cocoa] Framework header postprocessing should respect additional definitions
1747 https://bugs.webkit.org/show_bug.cgi?id=144018
1749 Reviewed by Anders Carlsson.
1751 * mac/postprocess-framework-headers.sh: Read definitons from
1752 /usr/local/include/WebKitAdditions/Scripts/postprocess-framework-headers-definitions, and
1753 have them take precedence over OSX_VERSION and IOS_VERSION and supply additional options to
1756 2015-04-21 Anders Carlsson <andersca@apple.com>
1758 Fix block signatures
1759 https://bugs.webkit.org/show_bug.cgi?id=144002
1761 Reviewed by Andreas Kling.
1763 * UIProcess/API/Cocoa/WKUIDelegate.h:
1764 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1765 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1766 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1767 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1768 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1769 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1770 (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1771 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1772 * UIProcess/ios/WKPDFView.mm:
1773 (-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]):
1774 * UIProcess/ios/forms/WKFileUploadPanel.mm:
1775 (-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
1776 (-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
1777 (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
1779 2015-04-21 Timothy Horton <timothy_horton@apple.com>
1781 PDFs still don't snapshot properly in iOS Safari
1782 https://bugs.webkit.org/show_bug.cgi?id=143976
1783 <rdar://problem/18283459>
1785 Reviewed by Anders Carlsson.
1787 * UIProcess/WebPageProxy.cpp:
1788 (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
1789 * UIProcess/WebPageProxy.h:
1790 * UIProcess/API/Cocoa/WKWebView.mm:
1791 (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
1792 Inform the client that we've passed all reasonable layout milestones
1793 as soon as the custom content provider has been handed its data.
1794 WKPDFView, the only custom content provider, synchronously lays out
1795 its subviews upon initial receipt of data, so this works fine for it.
1796 This ensures that clients that normally depend on layout milestones firing
1797 won't break when a custom content view is installed.
1799 (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
1800 Fall back to renderInContext: if the custom content view is not parented
1801 when a snapshot is requested.
1803 2015-04-21 Dan Bernstein <mitz@apple.com>
1805 Merged WKBackForwardListItem’s Internal category into the class extension in WKBackForwardListItemInternal.h.
1807 Reviewed by Anders Carlsson.
1809 * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
1810 (-[WKBackForwardListItem _item]):
1811 (-[WKBackForwardListItem _apiObject]):
1812 * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
1814 2015-04-21 Chris Dumez <cdumez@apple.com>
1816 Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
1817 https://bugs.webkit.org/show_bug.cgi?id=143970
1819 Reviewed by Darin Adler.
1821 Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
1822 constructor explicit as it copies the vector and it is easy to call it
1825 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1826 (WebKit::WebIDBServerConnection::setIndexKeys):
1827 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1829 2015-04-20 Dan Bernstein <mitz@apple.com>
1831 Expose more bundle form client functions as WKWebProcessPlugInFormDelegatePrivate methods
1832 https://bugs.webkit.org/show_bug.cgi?id=143973
1834 Reviewed by Anders Carlsson.
1836 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared new
1839 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Declared new frame
1841 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
1842 (-[WKWebProcessPlugInNodeHandle frame]): Added. Returns the node’s document’s frame. This is
1843 useful to delegates getting an array of nodes via the new method.
1845 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1846 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added overrides of
1847 shouldNotifyOnFormChanges and didAssociateFormControls, which call the new delegate methods.
1849 2015-04-20 Joseph Pecoraro <pecoraro@apple.com>
1851 Cleanup some StringBuilder use
1852 https://bugs.webkit.org/show_bug.cgi?id=143550
1854 Reviewed by Darin Adler.
1856 * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
1857 (WebKit::buildObjectStoreStatement):
1858 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1859 (WebKit::v2RecordsTableSchema):
1860 * Shared/Databases/IndexedDB/IDBUtilities.cpp:
1861 (WebKit::uniqueDatabaseIdentifier):
1862 * UIProcess/API/APIUserScript.cpp:
1863 (API::UserScript::generateUniqueURL):
1864 * UIProcess/WebProcessPool.cpp:
1865 (WebKit::WebProcessPool::didReceiveInvalidMessage):
1866 * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
1867 (WebKit::combinedSecurityOriginIdentifier):
1869 2015-04-20 Anders Carlsson <andersca@apple.com>
1871 Modify the WKWebsiteDataStore API to take a NSSet of types instead of a bitmask
1872 https://bugs.webkit.org/show_bug.cgi?id=143966
1874 Reviewed by Dan Bernstein.
1876 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1877 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
1878 (dataTypesToString):
1879 (-[WKWebsiteDataRecord dataTypes]):
1880 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
1881 (WebKit::toWebsiteDataTypes):
1882 (WebKit::toWKWebsiteDataTypes):
1883 * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1884 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1885 (+[WKWebsiteDataStore allWebsiteDataTypes]):
1886 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1887 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1888 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1889 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
1890 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1891 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1892 (toWKWebsiteDataTypes):
1893 (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1894 (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1895 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1897 2015-04-20 Beth Dakin <bdakin@apple.com>
1899 Should remove mouseForceClick and mouseForceCancelled from DOM force events
1900 https://bugs.webkit.org/show_bug.cgi?id=143904
1902 rdar://problem/20578842
1904 Reviewed by Dan Bernstein.
1906 * WebProcess/WebPage/mac/WebPageMac.mm:
1907 (WebKit::WebPage::immediateActionDidCancel):
1909 2015-04-20 Tim Horton <timothy_horton@apple.com>
1911 Implement immediate action support for tel: and mailto: URLs
1912 https://bugs.webkit.org/show_bug.cgi?id=143916
1913 <rdar://problem/19721711>
1915 Reviewed by Darin Adler.
1917 * Shared/API/c/WKImmediateActionTypes.h:
1918 * UIProcess/mac/WKImmediateActionController.mm:
1919 (-[WKImmediateActionController _defaultAnimationController]):
1920 (-[WKImmediateActionController _animationControllerForDataDetectedText]):
1921 (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
1922 (-[WKImmediateActionController _menuItemForDataDetectedText]): Deleted.
1923 Add _animationControllerForDataDetectedLink and use it when
1924 building immediate actions for tel: and mailto: links.
1926 2015-04-20 Alex Christensen <achristensen@webkit.org>
1928 Properly report errors from _WKUserContentExtensionStore.
1929 https://bugs.webkit.org/show_bug.cgi?id=143808
1931 Reviewed by Darin Adler.
1933 * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
1934 (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
1935 (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
1936 (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
1938 2015-04-18 Simon Fraser <simon.fraser@apple.com>
1940 REGRESSION (r181656): Animated tiled layers are missing content
1941 https://bugs.webkit.org/show_bug.cgi?id=143911
1942 rdar://problem/20596328
1944 Reviewed by Darin Adler.
1946 After r181656, all requestAnimationFrame was falling back to timers, and not
1947 using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
1950 Replace this confusing Optional<> code with simpler code that just forces the
1951 clients to make a DisplayRefreshMonitor if they can, first asking
1952 ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().
1954 Make lots of things into references, and use C++11 initialization in some places.
1956 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1957 (WebKit::WebChromeClient::createDisplayRefreshMonitor):
1958 * WebProcess/WebCoreSupport/WebChromeClient.h:
1960 2015-04-18 Dan Bernstein <mitz@apple.com>
1962 SwipeShadow images are installed on iOS
1963 https://bugs.webkit.org/show_bug.cgi?id=143915
1965 Reviewed by Tim Horton.
1967 * Configurations/WebKit.xcconfig: Added Resources/Mac/* to
1968 EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*]. We could move more resources there and remove
1969 individual patterns.
1970 * Resources/SwipeShadow.png: Moved to mac.
1971 * Resources/SwipeShadow@2x.png: Moved to mac.
1972 * Resources/mac: Added.
1973 * Resources/mac/SwipeShadow.png: Moved from Source/WebKit2/Resources/SwipeShadow.png.
1974 * Resources/mac/SwipeShadow@2x.png: Moved from Source/WebKit2/Resources/SwipeShadow@2x.png.
1975 * WebKit2.xcodeproj/project.pbxproj: Created mac group in the Resources group and moved
1976 SwipeShadow*.png into it. Updated for file moves.
1978 2015-04-18 Chris Dumez <cdumez@apple.com>
1980 Fix NetworkCache Statistics database bootstrapping after r182803
1981 https://bugs.webkit.org/show_bug.cgi?id=143890
1983 Reviewed by Darin Adler.
1985 Update the NetworkCache Statistics database bootstrapping code to use
1986 the records path instead of the version path. Also check that the
1987 filenames in the folder are valid hashes to discard the *-body files.
1989 * NetworkProcess/cache/NetworkCache.cpp:
1990 (WebKit::NetworkCache::Cache::recordsPath):
1991 (WebKit::NetworkCache::Cache::storagePath): Deleted.
1992 * NetworkProcess/cache/NetworkCache.h:
1993 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1994 (WebKit::NetworkCache::Statistics::initialize):
1995 (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
1996 (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
1998 2015-04-17 Tim Horton <timothy_horton@apple.com>
2000 Clients sometimes block for 500ms in waitForPossibleGeometryUpdates
2001 https://bugs.webkit.org/show_bug.cgi?id=143901
2002 <rdar://problem/20488655>
2004 Reviewed by Anders Carlsson.
2006 * Platform/IPC/Connection.cpp:
2007 (IPC::Connection::waitForMessage):
2008 InterruptWaitingIfSyncMessageArrives already cancels waitForMessage if
2009 a sync message arrives while waiting, but it should also avoid waiting
2010 if there's a sync message already in the queue when the waiting starts,
2011 as that will have the same nasty effect.
2013 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2014 (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
2015 If a synchronous message comes in from the Web process while we're waiting,
2016 cancel our synchronous wait for DidUpdateGeometry. This will cause the size
2017 change to not synchronize with the Web process' painting, but that is better
2018 than pointlessly blocking for 500ms.
2020 2015-04-17 Chris Dumez <cdumez@apple.com>
2022 Possible null pointer dereference in WebDiagnosticLoggingClient::logDiagnosticMessageWithValue()
2023 https://bugs.webkit.org/show_bug.cgi?id=143899
2024 <rdar://problem/20584215>
2026 Reviewed by Anders Carlsson.
2028 WebDiagnosticLoggingClient::logDiagnosticMessage*() methods failed to
2029 check that m_page.corePage() was non-null before dereferencing, thus
2030 causing crashes when it is null.
2032 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
2033 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
2034 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
2035 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
2037 2015-04-17 Yongjun Zhang <yongjun_zhang@apple.com>
2039 WebKit client should be able to add view controller for link preview.
2040 https://bugs.webkit.org/show_bug.cgi?id=143686
2042 Add delegate methods to WKUIDelegatePrivate so that a WebKit client can prepare a view controller
2043 for link preview and react to the dismissal of this view controller. Also connect WKContentView to
2044 preview gesture recognizer and forwards the delegate callbacks to corresponding delegate methods
2045 in WKUIDelegatePrivate.
2047 Reviewed by Beth Dakin.
2049 * Platform/spi/ios/UIKitSPI.h:
2050 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2051 * UIProcess/ios/WKContentView.mm:
2052 (-[WKContentView willMoveToWindow:]):
2053 * UIProcess/ios/WKContentViewInteraction.h:
2054 * UIProcess/ios/WKContentViewInteraction.mm:
2055 (-[WKContentView cleanupInteraction]):
2056 (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
2057 (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
2058 (-[WKContentView gestureRecognizerShouldBegin:]):
2059 (-[WKContentView previewViewControllerForPosition:inSourceView:]):
2060 (-[WKContentView commitPreviewViewController:]):
2061 (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
2062 (-[WKContentView didDismissPreviewViewController:committing:]):
2064 2015-04-17 Beth Dakin <bdakin@apple.com>
2066 Force mouse events should go through normal mouse event handling code paths
2067 https://bugs.webkit.org/show_bug.cgi?id=143749
2069 rdar://problem/20472895
2071 Reviewed by Dean Jackson.
2073 This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the
2074 NSEventTypePressures that is gets and sends those down to the web process.
2076 Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an
2077 NSEventTypePressure, the new name makes it clear how the second parameter differs
2079 * Shared/NativeWebMouseEvent.h:
2081 New event types for the new types of events.
2082 * Shared/WebEvent.h:
2083 * Shared/WebEventConversion.cpp:
2084 (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2085 * Shared/mac/NativeWebMouseEventMac.mm:
2086 (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2087 * Shared/mac/WebEventFactory.h:
2089 All of the square-peg, round-hole problems of massaging the NSEventTypePressures
2090 events into WebMouseEvents is taken care of here.
2091 * Shared/mac/WebEventFactory.mm:
2092 (WebKit::mouseButtonForEvent):
2093 (WebKit::globalPointForEvent):
2094 (WebKit::pointForEvent):
2095 (WebKit::WebEventFactory::createWebMouseEvent):
2097 Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent
2099 * UIProcess/API/mac/WKView.mm:
2100 (-[WKView pressureChangeWithEvent:]):
2102 Handle the new types.
2103 * UIProcess/WebPageProxy.cpp:
2104 (WebKit::WebPageProxy::didReceiveEvent):
2106 Can delete inputDeviceForceDidChange since it’s no longer used.
2107 (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
2108 * UIProcess/WebPageProxy.h:
2110 Handle the new types of mouse events properly.
2111 * WebProcess/WebPage/WebPage.cpp:
2112 (WebKit::handleMouseEvent):
2114 Delete inputDeviceForceDidChange() and m_lastForceStage.
2115 * WebProcess/WebPage/WebPage.h:
2116 * WebProcess/WebPage/WebPage.messages.in:
2117 * WebProcess/WebPage/mac/WebPageMac.mm:
2118 (WebKit::WebPage::inputDeviceForceDidChange): Deleted.
2120 Handle new WebEvent types.
2121 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2123 2015-04-17 Commit Queue <commit-queue@webkit.org>
2125 Unreviewed, rolling out r182912 and r182920.
2126 https://bugs.webkit.org/show_bug.cgi?id=143881
2128 Build breakage in some configurations (Requested by ap on
2131 Reverted changesets:
2133 "Force mouse events should go through normal mouse event
2134 handling code paths"
2135 https://bugs.webkit.org/show_bug.cgi?id=143749
2136 http://trac.webkit.org/changeset/182912
2138 http://trac.webkit.org/changeset/182920
2140 2015-04-17 Antti Koivisto <antti@apple.com>
2142 Network Cache: Read resource record and body in parallel
2143 https://bugs.webkit.org/show_bug.cgi?id=143879
2145 Reviewed by Chris Dumez.
2147 We currently first fetch the record file and then fetch the body blob if needed.
2148 We can do both operations in parallel to reduce latency.
2150 * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
2151 (WebKit::NetworkCache::traverseCacheFiles):
2153 Do all validation in the client.
2155 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2156 (WebKit::NetworkCache::Storage::synchronize):
2158 Maintain a bloom filter that contains the body blobs to avoid unnecessary IO attempts.
2159 Delete any unknown file in cache directory.
2161 (WebKit::NetworkCache::Storage::addToRecordFilter):
2163 More informative name for record filter.
2165 (WebKit::NetworkCache::Storage::mayContain):
2166 (WebKit::NetworkCache::Storage::readRecord):
2167 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
2168 (WebKit::NetworkCache::Storage::dispatchReadOperation):
2170 Start record read IO and body blob read IO in parallel.
2172 (WebKit::NetworkCache::Storage::finishReadOperation):
2174 The read is finished when we have both the record and the blob.
2176 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2177 (WebKit::NetworkCache::Storage::retrieve):
2178 (WebKit::NetworkCache::Storage::store):
2179 (WebKit::NetworkCache::Storage::traverse):
2180 (WebKit::NetworkCache::Storage::clear):
2181 (WebKit::NetworkCache::Storage::shrink):
2182 (WebKit::NetworkCache::Storage::addToContentsFilter): Deleted.
2183 (WebKit::NetworkCache::Storage::decodeRecord): Deleted.
2184 * NetworkProcess/cache/NetworkCacheStorage.h:
2185 (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
2187 ReadOperation is now mutable and gathers the read result.
2189 2015-04-16 Anders Carlsson <andersca@apple.com>
2191 Stop installing WebKit2.framework
2192 https://bugs.webkit.org/show_bug.cgi?id=143860
2193 rdar://problem/18298491
2195 Reviewed by Dan Bernstein.
2197 * Configurations/WebKit2.xcconfig:
2198 Set SKIP_INSTALL=YES for all SDKs except 10.9 where we still need it.
2200 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
2202 Unreviewed. Fix the build with ENABLE(NETWORK_CACHE) and !ENABLE(SHAREABLE_RESOURCE).
2204 * NetworkProcess/cache/NetworkCacheEntry.cpp:
2205 * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
2206 (WebKit::NetworkCache::fileTimes): There's no st_birthtime in Linux.
2208 2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
2210 [SOUP] ResourceRequest cache policy is not encoded/decoded in IPC messages
2211 https://bugs.webkit.org/show_bug.cgi?id=143867
2213 Reviewed by Sergio Villar Senin.
2215 Encode/Decode the ResourceRequest cache policy.
2217 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
2218 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
2219 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
2221 2015-04-16 Sungmann Cho <sungmann.cho@navercorp.com>
2223 Use UNUSED_PARAM instead of the void casting to suppress unused parameter warnings.
2224 https://bugs.webkit.org/show_bug.cgi?id=143750
2226 Reviewed by Darin Adler.
2228 No new tests, no behavior change.
2230 * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
2231 (WebKit::NotificationPermissionRequestManager::NotificationPermissionRequestManager):
2233 2015-04-16 Brady Eidson <beidson@apple.com>
2235 Compiling a content extension fails when user's home directory is on a different volume from /var/tmp.
2236 https://bugs.webkit.org/show_bug.cgi?id=143834
2238 Reviewed by Anders Carlsson.
2240 * UIProcess/API/APIUserContentExtensionStore.cpp:
2241 (API::compiledToFile): Use moveFile() instead of renameFile()
2243 2015-04-16 Anders Carlsson <andersca@apple.com>
2245 Deprecate _WKWebsiteDataStore in favor of WKWebsiteDataStore
2246 https://bugs.webkit.org/show_bug.cgi?id=143844
2248 Reviewed by Dan Bernstein.
2250 * Shared/API/Cocoa/WKFoundation.h:
2251 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2252 (-[WKWebViewConfiguration _validate]):
2253 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2254 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
2255 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2256 * mac/postprocess-framework-headers.sh:
2258 2015-04-16 Alex Christensen <achristensen@webkit.org>
2260 Removed unused WKUserContentFilterRef.
2261 https://bugs.webkit.org/show_bug.cgi?id=143852
2263 Reviewed by Sam Weinig.
2265 * Shared/WebCompiledContentExtension.cpp:
2266 (WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient): Deleted.
2267 (WebKit::LegacyContentExtensionCompilationClient::writeBytecode): Deleted.
2268 (WebKit::LegacyContentExtensionCompilationClient::writeActions): Deleted.
2269 (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData): Deleted.
2270 * Shared/WebCompiledContentExtension.h:
2271 * UIProcess/API/C/WKUserContentFilterRef.cpp: Removed.
2272 * UIProcess/API/C/WKUserContentFilterRef.h: Removed.
2273 * UIProcess/API/C/WebKit2_C.h:
2274 * UIProcess/API/Cocoa/_WKUserContentFilter.h:
2275 * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
2276 (-[_WKUserContentFilter initWithName:serializedRules:]): Deleted.
2277 * WebKit2.xcodeproj/project.pbxproj:
2279 2015-04-16 Beth Dakin <bdakin@apple.com>
2281 Rubber-stamped by Tim Horton.
2283 Fixing a small mistake in http://trac.webkit.org/changeset/182912 which should
2284 make sure to use the most up-to-date pressure information when setting the force
2287 * Shared/mac/WebEventFactory.mm:
2288 (WebKit::WebEventFactory::createWebMouseEvent):
2290 2015-04-13 Jer Noble <jer.noble@apple.com>
2292 [iOS] When simultaneously exiting-and-entering fullscreen, WebVideoFullscreenManager/Proxy becomes confused about what video element it represents.
2293 https://bugs.webkit.org/show_bug.cgi?id=143680
2295 Reviewed by Simon Fraser.
2297 The original assumption of WebVideoFullscreenManager and -Proxy was that the two classes would represent a
2298 single video element and its full screen state. With multiple animations in and out of fullscreen combined with
2299 multiple fullscreen modes, this assumption no longer holds true.
2301 Rather than having a WebVideoFullscreenManager which /isa/ WebVideoFullscreenModelVideoElement, the manager now
2302 /hasa/ WebVideoFullscreenModelVideoElement (or has many such models). Ditto for WebVideoFullscreenManager and
2303 WebVideoFullscreenInterfaceAVKit. The WebVideoFullscreenInterfaceAVKit still needs a WebVideoFullscreenModel to
2304 communicate with, so a new wrapper class is used for that purpose, WebVideoFullscreenModelContext. Ditto for
2305 WebVideoFullscreenModelVideoElement and the new class WebVideoFullscreenInterfaceContext. These context classes
2306 are paired and share a contextId, allowing the manager and its proxy to route messages between the UIProcess's
2307 WebVideoFullscreenInterfaceAVKit to-and-from the WebProcess's WebVideoFullscreenModelVideoElement.
2309 Both the WebVideoFullscreenModelContext and the WebVideoFullscreenInterfaceContext take a back-pointer to their
2310 manager or manager proxy, and each method on the context simply calls the matching method on the manager and
2311 passes its contextId as a parameter.
2313 Both the WebVideoFullscreenManager and the WebVideoFullscreenManagerProxy pass that contextId in each of their
2314 cross-process messages.
2316 On the other side, the manager and proxy also have a map between contextIds and their matching
2317 WebVideoFullscreenModelVideoElement (in the case of WebVideoFullscreenManager) or
2318 WebVideoFullscreenInterfaceAVKit (in the case of WebVideoFullscreenManagerProxy).
2320 While this change is large by LoC, it is almost entirely boilerplate. The new and interesting pieces are these:
2322 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2323 (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy): No longer a WebVideoFullscreenInterfaceAVKit.
2324 (WebKit::WebVideoFullscreenManagerProxy::invalidate): Walk through the models and interfaces, invalidating each.
2325 (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface): Added. Return a new model and interface tuple.
2326 (WebKit::WebVideoFullscreenManagerProxy::ensureModelAndInterface): Added. Lazily create, and add to the m_contextMap
2327 a new model and interface object.
2328 (WebKit::WebVideoFullscreenManagerProxy::ensureModel): Return the model half of ensureModelAndInterface().
2329 (WebKit::WebVideoFullscreenManagerProxy::ensureInterface): Return the interface half of ensureModelAndInterface().
2330 (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen): Walk through the outstanding interface objects, and if
2331 any have a fullscreen mode which matches the about-to-be-fullscreen interface, request that that other interface
2333 * WebProcess/ios/WebVideoFullscreenManager.mm:
2334 (WebKit::nextContextId): Static, incrementing counter used as a contextId source.
2335 (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager): No longer a WebVideoFullscreenModelVideoElement.
2336 (WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager): Walk through the models and interfaces, invalidating each.
2337 (WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Added. Return a new model and interface tuple.
2338 (WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Added. Lazily create, and add to the m_contextMap
2339 a new model and interface object.
2340 (WebKit::WebVideoFullscreenManager::ensureModel): Return the model half of ensureModelAndInterface().
2341 (WebKit::WebVideoFullscreenManager::ensureInterface): Return the interface half of ensureModelAndInterface().
2343 New classes and methods which just forward on to their owning objects:
2345 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2346 (WebKit::WebVideoFullscreenModelContext::create):
2347 (WebKit::WebVideoFullscreenModelContext::~WebVideoFullscreenModelContext):
2348 (WebKit::WebVideoFullscreenModelContext::invalidate):
2349 (WebKit::WebVideoFullscreenModelContext::layerHost):
2350 (WebKit::WebVideoFullscreenModelContext::setLayerHost):
2351 (WebKit::WebVideoFullscreenModelContext::setInitialVideoLayerFrame):
2352 (WebKit::WebVideoFullscreenModelContext::WebVideoFullscreenModelContext):
2353 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2354 (WebKit::WebVideoFullscreenModelContext::play):
2355 (WebKit::WebVideoFullscreenModelContext::pause):
2356 (WebKit::WebVideoFullscreenModelContext::togglePlayState):
2357 (WebKit::WebVideoFullscreenModelContext::beginScrubbing):
2358 (WebKit::WebVideoFullscreenModelContext::endScrubbing):
2359 (WebKit::WebVideoFullscreenModelContext::seekToTime):
2360 (WebKit::WebVideoFullscreenModelContext::fastSeek):
2361 (WebKit::WebVideoFullscreenModelContext::beginScanningForward):
2362 (WebKit::WebVideoFullscreenModelContext::beginScanningBackward):
2363 (WebKit::WebVideoFullscreenModelContext::endScanning):
2364 (WebKit::WebVideoFullscreenModelContext::requestExitFullscreen):
2365 (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame):
2366 (WebKit::WebVideoFullscreenModelContext::videoLayerFrame):
2367 (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity):
2368 (WebKit::WebVideoFullscreenModelContext::videoLayerGravity):
2369 (WebKit::WebVideoFullscreenModelContext::selectAudioMediaOption):
2370 (WebKit::WebVideoFullscreenModelContext::selectLegibleMediaOption):
2371 (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged):
2372 (WebKit::WebVideoFullscreenModelContext::didSetupFullscreen):
2373 (WebKit::WebVideoFullscreenModelContext::didEnterFullscreen):
2374 (WebKit::WebVideoFullscreenModelContext::didExitFullscreen):
2375 (WebKit::WebVideoFullscreenModelContext::didCleanupFullscreen):
2376 (WebKit::WebVideoFullscreenModelContext::fullscreenMayReturnToInline):
2377 * WebProcess/ios/WebVideoFullscreenManager.h:
2378 (WebKit::WebVideoFullscreenInterfaceContext::create):
2379 (WebKit::WebVideoFullscreenInterfaceContext::invalidate):
2380 (WebKit::WebVideoFullscreenInterfaceContext::layerHostingContext):
2381 (WebKit::WebVideoFullscreenInterfaceContext::isAnimating):
2382 (WebKit::WebVideoFullscreenInterfaceContext::setIsAnimating):
2383 (WebKit::WebVideoFullscreenInterfaceContext::targetIsFullscreen):
2384 (WebKit::WebVideoFullscreenInterfaceContext::setTargetIsFullscreen):
2385 (WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode):
2386 (WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode):
2387 (WebKit::WebVideoFullscreenInterfaceContext::isFullscreen):
2388 (WebKit::WebVideoFullscreenInterfaceContext::setIsFullscreen):
2389 * WebProcess/ios/WebVideoFullscreenManager.mm:
2390 (WebKit::WebVideoFullscreenInterfaceContext::WebVideoFullscreenInterfaceContext):
2391 (WebKit::WebVideoFullscreenInterfaceContext::~WebVideoFullscreenInterfaceContext):
2392 (WebKit::WebVideoFullscreenInterfaceContext::setLayerHostingContext):
2393 (WebKit::WebVideoFullscreenInterfaceContext::resetMediaState):
2394 (WebKit::WebVideoFullscreenInterfaceContext::setDuration):
2395 (WebKit::WebVideoFullscreenInterfaceContext::setCurrentTime):
2396 (WebKit::WebVideoFullscreenInterfaceContext::setBufferedTime):
2397 (WebKit::WebVideoFullscreenInterfaceContext::setRate):
2398 (WebKit::WebVideoFullscreenInterfaceContext::setVideoDimensions):
2399 (WebKit::WebVideoFullscreenInterfaceContext::setSeekableRanges):
2400 (WebKit::WebVideoFullscreenInterfaceContext::setCanPlayFastReverse):
2401 (WebKit::WebVideoFullscreenInterfaceContext::setAudioMediaSelectionOptions):
2402 (WebKit::WebVideoFullscreenInterfaceContext::setLegibleMediaSelectionOptions):
2403 (WebKit::WebVideoFullscreenInterfaceContext::setExternalPlayback):
2405 Cross-process methods which now take a contextId parameter:
2407 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2408 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2409 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
2410 (WebKit::WebVideoFullscreenManagerProxy::resetMediaState):
2411 (WebKit::WebVideoFullscreenManagerProxy::setCurrentTime):
2412 (WebKit::WebVideoFullscreenManagerProxy::setBufferedTime):
2413 (WebKit::WebVideoFullscreenManagerProxy::setVideoDimensions):
2414 (WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
2415 (WebKit::WebVideoFullscreenManagerProxy::setCanPlayFastReverse):
2416 (WebKit::WebVideoFullscreenManagerProxy::setAudioMediaSelectionOptions):
2417 (WebKit::WebVideoFullscreenManagerProxy::setLegibleMediaSelectionOptions):
2418 (WebKit::WebVideoFullscreenManagerProxy::setExternalPlaybackProperties):
2419 (WebKit::WebVideoFullscreenManagerProxy::setDuration):
2420 (WebKit::WebVideoFullscreenManagerProxy::setRate):
2421 (WebKit::WebVideoFullscreenManagerProxy::exitFullscreen):
2422 (WebKit::WebVideoFullscreenManagerProxy::cleanupFullscreen):
2423 (WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline):
2424 (WebKit::WebVideoFullscreenManagerProxy::play):
2425 (WebKit::WebVideoFullscreenManagerProxy::pause):
2426 (WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
2427 (WebKit::WebVideoFullscreenManagerProxy::beginScrubbing):
2428 (WebKit::WebVideoFullscreenManagerProxy::endScrubbing):
2429 (WebKit::WebVideoFullscreenManagerProxy::seekToTime):
2430 (WebKit::WebVideoFullscreenManagerProxy::fastSeek):
2431 (WebKit::WebVideoFullscreenManagerProxy::beginScanningForward):
2432 (WebKit::WebVideoFullscreenManagerProxy::beginScanningBackward):
2433 (WebKit::WebVideoFullscreenManagerProxy::endScanning):
2434 (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
2435 (WebKit::WebVideoFullscreenManagerProxy::didSetupFullscreen):
2436 (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
2437 (WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
2438 (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen):
2439 (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
2440 (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
2441 (WebKit::WebVideoFullscreenManagerProxy::selectAudioMediaOption):
2442 (WebKit::WebVideoFullscreenManagerProxy::selectLegibleMediaOption):
2443 (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged):
2444 (WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
2445 (WebKit::WebVideoFullscreenManagerProxy::videoLayerFrame): Deleted.
2446 (WebKit::WebVideoFullscreenManagerProxy::videoLayerGravity): Deleted.
2447 * WebProcess/ios/WebVideoFullscreenManager.messages.in:
2448 * WebProcess/ios/WebVideoFullscreenManager.mm:
2449 (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
2450 (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
2451 (WebKit::WebVideoFullscreenManager::resetMediaState):
2452 (WebKit::WebVideoFullscreenManager::setDuration):
2453 (WebKit::WebVideoFullscreenManager::setCurrentTime):
2454 (WebKit::WebVideoFullscreenManager::setBufferedTime):
2455 (WebKit::WebVideoFullscreenManager::setRate):
2456 (WebKit::WebVideoFullscreenManager::setVideoDimensions):
2457 (WebKit::WebVideoFullscreenManager::setSeekableRanges):
2458 (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse):
2459 (WebKit::WebVideoFullscreenManager::setAudioMediaSelectionOptions):
2460 (WebKit::WebVideoFullscreenManager::setLegibleMediaSelectionOptions):
2461 (WebKit::WebVideoFullscreenManager::setExternalPlayback):
2462 (WebKit::WebVideoFullscreenManager::play):
2463 (WebKit::WebVideoFullscreenManager::pause):
2464 (WebKit::WebVideoFullscreenManager::togglePlayState):
2465 (WebKit::WebVideoFullscreenManager::beginScrubbing):
2466 (WebKit::WebVideoFullscreenManager::endScrubbing):
2467 (WebKit::WebVideoFullscreenManager::seekToTime):
2468 (WebKit::WebVideoFullscreenManager::fastSeek):
2469 (WebKit::WebVideoFullscreenManager::beginScanningForward):
2470 (WebKit::WebVideoFullscreenManager::beginScanningBackward):
2471 (WebKit::WebVideoFullscreenManager::endScanning):
2472 (WebKit::WebVideoFullscreenManager::requestExitFullscreen):
2473 (WebKit::WebVideoFullscreenManager::selectAudioMediaOption):
2474 (WebKit::WebVideoFullscreenManager::selectLegibleMediaOption):
2475 (WebKit::WebVideoFullscreenManager::fullscreenModeChanged):
2476 (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
2477 (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
2478 (WebKit::WebVideoFullscreenManager::didExitFullscreen):
2479 (WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
2480 (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
2481 (WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
2482 (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
2483 (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
2485 2015-04-16 Beth Dakin <bdakin@apple.com>
2487 Force mouse events should go through normal mouse event handling code paths
2488 https://bugs.webkit.org/show_bug.cgi?id=143749
2490 rdar://problem/20472895
2492 Reviewed by Dean Jackson.
2494 This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the
2495 NSEventTypePressures that is gets and sends those down to the web process.
2497 Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an
2498 NSEventTypePressure, the new name makes it clear how the second parameter differs
2500 * Shared/NativeWebMouseEvent.h:
2502 New event types for the new types of events.
2503 * Shared/WebEvent.h:
2504 * Shared/WebEventConversion.cpp:
2505 (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2506 * Shared/mac/NativeWebMouseEventMac.mm:
2507 (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2508 * Shared/mac/WebEventFactory.h:
2510 All of the square-peg, round-hole problems of massaging the NSEventTypePressures
2511 events into WebMouseEvents is taken care of here.
2512 * Shared/mac/WebEventFactory.mm:
2513 (WebKit::mouseButtonForEvent):
2514 (WebKit::globalPointForEvent):
2515 (WebKit::pointForEvent):
2516 (WebKit::WebEventFactory::createWebMouseEvent):
2518 Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent
2520 * UIProcess/API/mac/WKView.mm:
2521 (-[WKView pressureChangeWithEvent:]):
2523 Handle the new types.
2524 * UIProcess/WebPageProxy.cpp:
2525 (WebKit::WebPageProxy::didReceiveEvent):
2527 Can delete inputDeviceForceDidChange since it’s no longer used.
2528 (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
2529 * UIProcess/WebPageProxy.h:
2531 Handle the new types of mouse events properly.
2532 * WebProcess/WebPage/WebPage.cpp:
2533 (WebKit::handleMouseEvent):
2535 Delete inputDeviceForceDidChange() and m_lastForceStage.
2536 * WebProcess/WebPage/WebPage.h:
2537 * WebProcess/WebPage/WebPage.messages.in:
2538 * WebProcess/WebPage/mac/WebPageMac.mm:
2539 (WebKit::WebPage::inputDeviceForceDidChange): Deleted.
2541 Handle new WebEvent types.
2542 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2544 2015-04-16 Dan Bernstein <mitz@apple.com>
2546 <rdar://problem/20575744> Also include a definition of __NSd_{current deployment target} in WKFoundation.h.
2548 Reviewed by Tim Horton.
2550 * WebKit2.xcodeproj/project.pbxproj:
2552 2015-04-16 Timothy Horton <timothy_horton@apple.com>
2554 Provide a mechanism through the legacy SPI to know when swipe gestures begin and end
2555 https://bugs.webkit.org/show_bug.cgi?id=143740
2556 <rdar://problem/20468540>
2558 Reviewed by Dan Bernstein.
2560 In the C SPI, add three WKPageLoaderClient callbacks for the three
2561 navigation gesture events (did begin, will end, did end).
2563 * UIProcess/API/C/WKPageLoaderClient.h:
2566 * UIProcess/API/APILoaderClient.h:
2567 (API::LoaderClient::navigationGestureDidBegin):
2568 (API::LoaderClient::navigationGestureWillEnd):
2569 (API::LoaderClient::navigationGestureDidEnd):
2570 * UIProcess/WebPageProxy.cpp:
2571 (WebKit::WebPageProxy::navigationGestureDidBegin):
2572 (WebKit::WebPageProxy::navigationGestureWillEnd):
2573 (WebKit::WebPageProxy::navigationGestureDidEnd):
2574 Dispatch navigation gesture events to the loader client as well as
2575 (after a bounce through the PageClient) the navigation delegate.
2577 * UIProcess/API/C/WKPage.cpp:
2578 (WKPageSetPageLoaderClient):
2581 * UIProcess/mac/ViewGestureController.h:
2582 * UIProcess/mac/ViewGestureControllerMac.mm:
2583 (WebKit::ViewGestureController::trackSwipeGesture):
2584 (WebKit::ViewGestureController::willEndSwipeGesture):
2585 While we were already informing WebPageProxy of 'did begin' and 'did end'
2586 navigation gesture events, we were missing 'will end'. Add it.
2588 2015-04-16 Tim Horton <timothy_horton@apple.com>
2590 Dispatching multiple asynchronous animated resizes in parallel causes page scale to detach from reality
2591 https://bugs.webkit.org/show_bug.cgi?id=143812
2592 <rdar://problem/19866038>
2594 Reviewed by Simon Fraser.
2596 * Shared/VisibleContentRectUpdateInfo.h:
2597 (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
2598 No cats in transaction (more of these below, too).
2600 * UIProcess/WebPageProxy.h:
2601 * UIProcess/WebPageProxy.messages.in:
2602 * UIProcess/ios/WebPageProxyIOS.mm:
2603 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2604 (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
2605 * WebProcess/WebPage/WebPage.h:
2606 * WebProcess/WebPage/WebPage.messages.in:
2607 * WebProcess/WebPage/ios/WebPageIOS.mm:
2608 (WebKit::WebPage::handleTap):
2609 (WebKit::WebPage::commitPotentialTap):
2610 (WebKit::WebPage::dynamicViewportSizeUpdate):
2611 Add an incrementing ID to dynamicViewportSizeUpdates. The UI process keeps
2612 the current ID, and it is bounced through the Web process (dynamicViewportSizeUpdates)
2613 back to the UI process (dynamicViewportUpdateChangedTarget). If we have
2614 dispatched another dynamicViewportSizeUpdate in the interim, ignore
2615 the intermediate target.
2617 2015-04-16 Sungmann Cho <sungmann.cho@navercorp.com>
2619 Remove PluginController::isPluginVisible().
2620 https://bugs.webkit.org/show_bug.cgi?id=143830
2622 Reviewed by Darin Adler.
2624 PluginController::isPluginVisible() was introduced by http://webkit.org/b/60285.
2625 This method had been used only for WebKit2 on Windows, and no one uses it now.
2626 So we can remove it.
2628 No new tests, no behavior change.
2630 * PluginProcess/PluginControllerProxy.cpp:
2631 (WebKit::PluginControllerProxy::isPluginVisible): Deleted.
2632 * PluginProcess/PluginControllerProxy.h:
2633 * WebProcess/Plugins/PluginController.h:
2634 * WebProcess/Plugins/PluginView.cpp:
2635 (WebKit::PluginView::isPluginVisible): Deleted.
2636 * WebProcess/Plugins/PluginView.h:
2638 2015-04-16 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2640 [EFL] Disable a flaky ewk_context_network_process_model() API test
2641 https://bugs.webkit.org/show_bug.cgi?id=143824
2643 Reviewed by Csaba Osztrogonác.
2645 ewk_context_network_process_model has been often failed. Though Bug 142967
2646 was filed to fix this issue, it is not solved yet. To maintain EFL bot, this patch
2647 disables it until fixing it.
2649 * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2652 2015-04-16 Csaba Osztrogonác <ossy@webkit.org>
2654 [WK2] Forwarding headers generator shouldn't generate unnecessary headers
2655 https://bugs.webkit.org/show_bug.cgi?id=143820
2657 Reviewed by Carlos Garcia Campos.
2659 * Scripts/generate-forwarding-headers.pl:
2660 (collectNeededHeaders):
2662 2015-04-16 Csaba Osztrogonác <ossy@webkit.org>
2664 [GTK] Run forwarding headers generator unconditionally
2665 https://bugs.webkit.org/show_bug.cgi?id=143819
2667 Reviewed by Carlos Garcia Campos.
2669 * PlatformGTK.cmake:
2671 2015-04-15 Brent Fulgham <bfulgham@apple.com>
2673 [Mac] Disable "Save to Downloads" option for local files
2674 https://bugs.webkit.org/show_bug.cgi?id=143794
2676 Reviewed by Tim Horton.
2678 Disable the Image and Media download options if the download
2679 target is a local file. We can only download web resources;
2680 anything else is actually a no-op.
2682 * UIProcess/mac/WKActionMenuController.mm:
2683 (-[WKActionMenuController _defaultMenuItemsForVideo]):
2684 (-[WKActionMenuController _defaultMenuItemsForImage]):
2686 2015-04-15 Anders Carlsson <andersca@apple.com>
2688 Make websiteDataStore on WKWebViewConfiguration public
2689 https://bugs.webkit.org/show_bug.cgi?id=143810
2691 Reviewed by Dan Bernstein.
2693 * UIProcess/API/Cocoa/WKWebView.mm:
2694 (-[WKWebView initWithFrame:configuration:]):
2695 * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2696 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2697 (-[WKWebViewConfiguration copyWithZone:]):
2698 (-[WKWebViewConfiguration websiteDataStore]):
2699 (-[WKWebViewConfiguration setWebsiteDataStore:]):
2700 (-[WKWebViewConfiguration _websiteDataStore]):
2701 (-[WKWebViewConfiguration _setWebsiteDataStore:]):
2703 2015-04-15 Anders Carlsson <andersca@apple.com>
2705 Make WKWebsiteDataStore public
2706 https://bugs.webkit.org/show_bug.cgi?id=143805
2708 Reviewed by Dan Bernstein.
2710 Rename the current _WKWebsiteDataStore to WKWebsiteDataStore. Make init unavailable and tighten up the
2711 types of the defaultDataStore and nonPersistentDataStore class methods.
2713 Add a new _WKWebsiteDataStore @interface and @implementation that derives from WKWebsiteDataStore
2714 and forwards the defaultDataStore and nonPersistentDataStore method calls.
2716 * Shared/API/Cocoa/WebKit.h:
2717 * Shared/Cocoa/APIObject.mm:
2718 (API::Object::newObject):
2719 * UIProcess/API/Cocoa/WKWebView.mm:
2720 (-[WKWebView initWithFrame:configuration:]):
2721 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2722 (-[WKWebViewConfiguration _websiteDataStore]):
2723 * UIProcess/API/Cocoa/WKWebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
2724 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm.
2725 (+[WKWebsiteDataStore defaultDataStore]):
2726 (+[WKWebsiteDataStore nonPersistentDataStore]):
2727 (-[WKWebsiteDataStore dealloc]):
2728 (-[WKWebsiteDataStore isNonPersistent]):
2729 (toSystemClockTime):
2730 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2731 (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2732 (toWebsiteDataRecords):
2733 (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2734 (-[WKWebsiteDataStore _apiObject]):
2735 * UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h.
2737 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2738 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2739 (+[_WKWebsiteDataStore defaultDataStore]):
2740 (+[_WKWebsiteDataStore nonPersistentDataStore]):
2741 (-[_WKWebsiteDataStore dealloc]): Deleted.
2742 (-[_WKWebsiteDataStore isNonPersistent]): Deleted.
2743 (toWebsiteDataTypes): Deleted.
2744 (toSystemClockTime): Deleted.
2745 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]): Deleted.
2746 (-[_WKWebsiteDataStore _apiObject]): Deleted.
2747 * WebKit2.xcodeproj/project.pbxproj:
2749 2015-04-15 Timothy Horton <timothy_horton@apple.com>
2751 Custom CSS cursors do not use -webkit-image-set on retina displays
2752 https://bugs.webkit.org/show_bug.cgi?id=120783
2754 Reviewed by Beth Dakin.
2755 Patch by Evan Wallace <evan.exe@gmail.com>.
2757 Serialize the cursor image scale for SetCursor messages so custom
2758 CSS cursors work with -webkit-image-set on retina displays.
2760 * Shared/WebCoreArgumentCoders.cpp:
2761 (CoreIPC::ArgumentCoder<Cursor>::encode):
2762 (CoreIPC::ArgumentCoder<Cursor>::decode):
2764 2015-04-15 Alex Christensen <achristensen@webkit.org>
2766 Progress towards CMake on Mac.
2767 https://bugs.webkit.org/show_bug.cgi?id=143785
2769 Reviewed by Csaba Osztrogonác.
2772 * PlatformEfl.cmake:
2773 * PlatformGTK.cmake:
2775 2015-04-15 Anders Carlsson <andersca@apple.com>
2777 Make WKWebsiteDataRecord public
2778 https://bugs.webkit.org/show_bug.cgi?id=143796
2780 Reviewed by Dan Bernstein.
2782 Rename _WKWebsiteDataRecord and associated files to WKWebsiteDataRecord and
2783 add a new _WKWebsiteDataRecord.h with a class @interface declaration that just
2784 inherits from WKWebsiteDataRecord. We don't need an @implementation since nobody is expected
2785 to allocate _WKWebsiteDataRecord objects.
2787 * Shared/API/Cocoa/WebKit.h:
2788 * Shared/Cocoa/APIObject.mm:
2789 (API::Object::newObject):
2790 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.h.
2791 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm.
2792 (-[WKWebsiteDataRecord dealloc]):
2793 (dataTypesToString):
2794 (-[WKWebsiteDataRecord description]):
2795 (-[WKWebsiteDataRecord displayName]):
2796 (-[WKWebsiteDataRecord dataTypes]):
2797 (-[WKWebsiteDataRecord _apiObject]):
2798 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h.
2800 (WebKit::toWebsiteDataTypes):
2801 (WebKit::toWKWebsiteDataTypes):
2802 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
2803 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2804 (toWebsiteDataRecords):
2805 * WebKit2.xcodeproj/project.pbxproj:
2807 2015-04-13 Jer Noble <jer.noble@apple.com>
2809 [Fullscreen] ChromeClient::exitVideoFullscreen() should take a pointer to a HTMLVideoElement.
2810 https://bugs.webkit.org/show_bug.cgi?id=143674
2812 Reviewed by Darin Adler.
2814 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2815 (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Takes a reference.
2816 (WebKit::WebChromeClient::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
2817 (WebKit::WebChromeClient::exitVideoFullscreen): Deleted.
2818 * WebProcess/WebCoreSupport/WebChromeClient.h:
2819 * WebProcess/ios/WebVideoFullscreenManager.h:
2820 * WebProcess/ios/WebVideoFullscreenManager.mm:
2821 (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
2822 (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
2823 (WebKit::WebVideoFullscreenManager::didEnterFullscreen): Pass a reference.
2824 (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.
2825 (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
2827 2015-04-15 Antti Koivisto <antti@apple.com>
2829 Network Cache: Inline small body data to record file
2830 https://bugs.webkit.org/show_bug.cgi?id=143783
2832 Reviewed by Chris Dumez.
2834 We currently save all body data as separate files. We can improve space efficiency and do less reads and writes
2835 by inlining smaller resource bodies with the header.
2837 * NetworkProcess/cache/NetworkCacheIOChannel.h:
2838 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
2839 (WebKit::NetworkCache::IOChannel::read):
2840 (WebKit::NetworkCache::IOChannel::readSync):
2841 (WebKit::NetworkCache::IOChannel::write):
2843 Add WorkQueue argument to allow specifying which queue the result is submitted to.
2845 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2846 (WebKit::NetworkCache::decodeRecordMetaData):
2848 Add a boolean indicating whether the body is inlined.
2850 (WebKit::NetworkCache::decodeRecordHeader):
2851 (WebKit::NetworkCache::Storage::decodeRecord):
2852 (WebKit::NetworkCache::encodeRecordMetaData):
2853 (WebKit::NetworkCache::Storage::storeBodyAsBlob):
2854 (WebKit::NetworkCache::Storage::encodeRecord):
2855 (WebKit::NetworkCache::Storage::dispatchReadOperation):
2857 Read the record first, then read the blob if needed.
2858 Submit the read operation directly from the main queue. Only thing we do is opening an IO channel
2859 and that uses O_NONBLOCK.
2860 Process the read results in the IO work queue where we now do the blob retrieval.
2862 (WebKit::NetworkCache::shouldStoreBodyAsBlob):
2864 The current threshold for saving a separate blob is 16KB.
2866 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2867 (WebKit::NetworkCache::Storage::traverse):
2868 (WebKit::NetworkCache::createRecord): Deleted.
2869 (WebKit::NetworkCache::encodeRecordHeader): Deleted.
2870 * NetworkProcess/cache/NetworkCacheStorage.h:
2872 2015-04-15 Tim Horton <timothy_horton@apple.com>
2874 Non-local keyboards don't update scroll view parameters
2875 https://bugs.webkit.org/show_bug.cgi?id=143791
2876 <rdar://problem/18974020>
2878 * Platform/spi/ios/UIKitSPI.h:
2881 2015-04-15 Tim Horton <timothy_horton@apple.com>
2883 Non-local keyboards don't update scroll view parameters
2884 https://bugs.webkit.org/show_bug.cgi?id=143791
2885 <rdar://problem/18974020>
2887 Reviewed by Enrica Casucci.
2889 * UIProcess/API/Cocoa/WKWebView.mm:
2890 (-[WKWebView _shouldUpdateKeyboardWithInfo:]):
2891 (-[WKWebView _keyboardWillChangeFrame:]):
2892 (-[WKWebView _keyboardWillShow:]):
2893 Make sure that we update scroll view parameters (obscured insets, etc.)
2894 if we have a non-local keyboard, in addition to the cases where we have an assisted node.
2896 2015-04-15 Dan Bernstein <mitz@apple.com>
2898 <rdar://problem/20549298> No matching __NSi_ definition for postprocessed value of WK_{MAC,IOS}_TBA
2899 https://bugs.webkit.org/show_bug.cgi?id=143786
2901 Reviewed by Anders Carlsson.
2903 * Shared/API/Cocoa/WKFoundation.h: Added a placeholder for the postprocessing script to
2904 insert a definition of __NSi_* for the current deployment target. Import CoreFoundation.h so
2905 that we can check if the macro is already defined.
2906 * WebKit2.xcodeproj/project.pbxproj: In the Postprocess WKFoundation.h script build phase,
2907 replace the placeholder with a definition of __NSi_{current deployment target} if not
2910 2015-04-14 Anders Carlsson <andersca@apple.com>
2912 Make creating send rights from shared memory more robust
2913 https://bugs.webkit.org/show_bug.cgi?id=143730
2914 rdar://problem/16595870
2916 Reviewed by Darin Adler.
2918 This cleans up creation of handles and send rights and also fixes a bug where it would be impossible
2919 to send more than 128 MB of shared memory in a single object.
2921 * Platform/SharedMemory.h:
2922 * Platform/mac/SharedMemoryMac.cpp:
2923 (WebKit::makeMemoryEntry):
2924 New helper function that creates a memory entry send right. This uses MAP_MEM_VM_SHARE which ensures
2925 that memory objects larger than 128 MB will be handled correctly.
2927 (WebKit::SharedMemory::create):
2928 Call makeMemoryEntry.
2930 (WebKit::SharedMemory::createHandle):
2931 Call createSendRight.
2933 (WebKit::SharedMemory::createSendRight):
2934 Call makeMemoryEntry and add the necessary assertions.
2936 2015-04-15 Eric Carlson <eric.carlson@apple.com>
2938 Generalize "isPlayingAudio" to include other media characteristics
2939 https://bugs.webkit.org/show_bug.cgi?id=143713
2941 Reviewed by Jer Noble.
2943 * UIProcess/API/C/WKPage.cpp:
2944 (toGenericCallbackFunction): Scope CallbackBase.
2945 (WKPageForceRepaint): Ditto.
2946 (WKPageValidateCommand): Ditto.
2947 (WKPageComputePagesForPrinting): Ditto.
2949 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
2950 (-[_WKThumbnailView _requestSnapshotIfNeeded]): Ditto.
2952 * UIProcess/API/mac/WKView.mm:
2953 (-[WKView becomeFirstResponder]): Ditto.
2954 (-[WKView updateFontPanelIfNeeded]): Ditto.
2955 (-[WKView validateUserInterfaceItem:]): Ditto.
2956 (-[WKView startSpeaking:]): Ditto.
2957 (-[WKView selectedRangeWithCompletionHandler:]): Ditto.
2958 (-[WKView markedRangeWithCompletionHandler:]): Ditto.
2959 (-[WKView hasMarkedTextWithCompletionHandler:]): Ditto.
2960 (-[WKView attributedSubstringForProposedRange:completionHandler:]): Ditto.
2961 (-[WKView firstRectForCharacterRange:completionHandler:]): Ditto.
2962 (-[WKView characterIndexForPoint:completionHandler:]): Ditto.
2964 * UIProcess/WebPageProxy.cpp:
2965 (WebKit::WebPageProxy::isPlayingMediaDidChange): Rename from isPlayingAudioDidChange.
2966 (WebKit::WebPageProxy::isPlayingAudioDidChange): Deleted.
2967 * UIProcess/WebPageProxy.h:
2969 * UIProcess/WebPageProxy.messages.in:
2971 * UIProcess/mac/WKFullScreenWindowController.mm:
2972 (-[WKFullScreenWindowController dealloc]): Scope CallbackBase.
2973 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.
2975 * UIProcess/mac/WKPrintingView.mm:
2976 (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ditto.
2977 (-[WKPrintingView _askPageToComputePageRects]): Ditto.
2978 (-[WKPrintingView _drawPreview:]): Ditto.
2980 * WebProcess/Plugins/PluginView.cpp:
2981 (WebKit::PluginView::setPluginIsPlayingAudio):
2982 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2983 (WebKit::WebChromeClient::isPlayingMediaDidChange):
2984 (WebKit::WebChromeClient::isPlayingAudioDidChange): Deleted.
2985 * WebProcess/WebCoreSupport/WebChromeClient.h:
2987 2015-04-15 Antti Koivisto <antti@apple.com>
2989 Network Cache: Add thread-safe accessors for storage paths
2990 https://bugs.webkit.org/show_bug.cgi?id=143668
2992 Reviewed by Darin Adler.
2994 Less need to use StringCapture.
2996 * NetworkProcess/cache/NetworkCache.cpp:
2997 (WebKit::NetworkCache::Cache::dumpFilePath):
2998 (WebKit::NetworkCache::Cache::storagePath):
2999 * NetworkProcess/cache/NetworkCacheStorage.cpp:
3000 (WebKit::NetworkCache::makeRecordsDirectoryPath):
3001 (WebKit::NetworkCache::Storage::Storage):
3002 (WebKit::NetworkCache::Storage::basePath):
3003 (WebKit::NetworkCache::Storage::versionPath):
3004 (WebKit::NetworkCache::Storage::recordsPath):
3005 (WebKit::NetworkCache::Storage::synchronize):
3006 (WebKit::NetworkCache::Storage::remove):
3007 (WebKit::NetworkCache::Storage::dispatchReadOperation):
3008 (WebKit::NetworkCache::Storage::finishReadOperation):
3009 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
3010 (WebKit::NetworkCache::Storage::traverse):
3011 (WebKit::NetworkCache::Storage::clear):
3012 (WebKit::NetworkCache::Storage::shrink):
3013 (WebKit::NetworkCache::Storage::deleteOldVersions):
3014 (WebKit::NetworkCache::makeRecordDirectoryPath): Deleted.
3015 * NetworkProcess/cache/NetworkCacheStorage.h:
3016 (WebKit::NetworkCache::Storage::baseDirectoryPath): Deleted.
3017 (WebKit::NetworkCache::Storage::directoryPath): Deleted.
3019 2015-04-14 Tim Horton <timothy_horton@apple.com>
3021 Update gesture swipe shadow style
3022 https://bugs.webkit.org/show_bug.cgi?id=143616
3023 <rdar://problem/19295843>
3025 Reviewed by Darin Adler.
3027 * UIProcess/mac/ViewGestureController.h:
3028 * UIProcess/mac/ViewGestureControllerMac.mm:
3029 (WebKit::ViewGestureController::beginSwipeGesture):
3030 For the modern shadow style, use a layer stretched along the edge of the swiping content
3031 with the newly added PNGs as the layer contents.
3033 Add a dimming layer over the lower layer of content which fades in/out
3036 (WebKit::ViewGestureController::handleSwipeGesture):
3037 Fade the dimming layer in and out during the entire swipe.
3038 Fade the shadow layer out during the last few pixels of the swipe.
3040 (WebKit::ViewGestureController::removeSwipeSnapshot):
3041 Unparent the new layers.
3043 * WebKit2.xcodeproj/project.pbxproj:
3044 * Resources/SwipeShadow.png:
3045 * Resources/SwipeShadow@2x.png:
3046 Add the new resources.
3048 2015-04-14 Brian Weinstein <bweinstein@apple.com>
3050 Add SPI to clear HSTS hosts added since a date.
3051 https://bugs.webkit.org/show_bug.cgi?id=143726
3053 rdar://problem/16664597
3055 Reviewed by Anders Carlsson.
3057 * UIProcess/API/C/mac/WKContextPrivateMac.h:
3058 * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3059 (WKContextResetHSTSHostsAddedAfterDate): Call into the WebProcessPool.
3060 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3061 (WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate): Call CFNetwork SPI to clear HSTS hosts added
3062 after the given date.
3063 * UIProcess/WebProcessPool.h:
3065 2015-04-14 Anders Carlsson <andersca@apple.com>
3067 More work on making the SharedMemory interface more sane
3068 https://bugs.webkit.org/show_bug.cgi?id=143718
3070 Reviewed by Andreas Kling.
3072 Get rid of m_shouldVMDeallocateData. The idea is that shared memory created by calling
3073 SharedMemory::allocate has a non-null m_data pointer, and a null m_port. Shared memory created
3074 by calling SharedMemory::create with a pointer and a length has a non-null port but a null m_data
3075 since the data can be unmapped by the caller and we don't want to hold on to dangling pointers.
3077 * Platform/SharedMemory.h:
3078 (WebKit::SharedMemory::data):
3079 * Platform/mac/SharedMemoryMac.cpp:
3080 (WebKit::SharedMemory::allocate):
3081 (WebKit::SharedMemory::create):
3082 (WebKit::SharedMemory::map):
3083 (WebKit::SharedMemory::~SharedMemory):
3084 (WebKit::SharedMemory::createHandle):
3086 2015-04-14 Antti Koivisto <antti@apple.com>
3088 Network Cache: Deduplicate body data
3089 https://bugs.webkit.org/show_bug.cgi?id=143652
3091 Reviewed by Darin Adler.
3093 It is common to have cache entries with identical body data. This happens when the same resource is loaded from
3094 a different URL (https vs http, slash vs no-slash at end, etc.). It also happens when the same URL is
3095 referenced from different cache partitions.
3097 We can improve disk space efficiency and use less memory by sharing identical body data between cache entries.
3099 This patch splits the body data out from the record file. The new record file contains meta data and response
3100 headers only. Body data is stored using the new BlobStorage interface. Files are deduplicated by computing
3101 SHA1 hash over the data and looking for an existing blob with the same hash. If found the existing entry
3102 is reused by creating a hard link to it.
3104 The new disk structure looks like this:
3109 0A3C9A970ADA27FAE9BD7BC630BAD0B929C293C0
3110 0A6B8060BA77DF92C82A2FD7AF58F79524D8F34C
3114 0B8645B04E7EC78C178B7460052601C2
3115 0B8645B04E7EC78C178B7460052601C2-body
3116 0CB1A3638D1C5A09C5E3283A74FA040B
3117 0CB1A3638D1C5A09C5E3283A74FA040B-body
3120 Each record file has an associated -body which is a hard link to a file in the Blobs directory.
3122 The patch increases effective capacity by 10-20% with a typical cache. It also saves memory especially when identical
3123 resources are used in multiple tabs.
3125 Currently all >0 sized resources are stored as shared blobs. In future small resources should be integrated into record
3126 files and blobs used for larger files only.
3128 * NetworkProcess/cache/NetworkCache.cpp:
3129 (WebKit::NetworkCache::Cache::store):
3130 (WebKit::NetworkCache::Cache::update):
3132 Adopt the new storage interface.
3134 (WebKit::NetworkCache::Cache::dumpContentsToFile):
3135 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp: Added.
3136 (WebKit::NetworkCache::BlobStorage::BlobStorage):
3137 (WebKit::NetworkCache::BlobStorage::synchronize):
3139 Compute size and delete unused files from the Blobs directory (link count == 1).
3141 (WebKit::NetworkCache::BlobStorage::blobPath):
3142 (WebKit::NetworkCache::BlobStorage::add):
3143 (WebKit::NetworkCache::BlobStorage::get):
3145 Interface for storing and retrieving data blobs. Blobs are deduplicated on add.
3147 (WebKit::NetworkCache::BlobStorage::remove):
3149 Removes the link but doesn't remove the blob even if there are no other clients. That happens on next synchronize().
3151 (WebKit::NetworkCache::BlobStorage::shareCount):
3153 Checks the link count to get the number of clients.
3155 * NetworkProcess/cache/NetworkCacheBlobStorage.h: Added.
3156 (WebKit::NetworkCache::BlobStorage::approximateSize):
3157 * NetworkProcess/cache/NetworkCacheCoders.cpp:
3158 (WebKit::NetworkCache::Coder<SHA1::Digest>::encode):
3159 (WebKit::NetworkCache::Coder<SHA1::Digest>::decode):
3160 * NetworkProcess/cache/NetworkCacheCoders.h:
3161 * NetworkProcess/cache/NetworkCacheData.h:
3162 (WebKit::NetworkCache::Data::isEmpty):
3163 * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
3164 (WebKit::NetworkCache::Data::empty):
3165 (WebKit::NetworkCache::Data::fromMap):
3166 (WebKit::NetworkCache::mapFile):
3167 (WebKit::NetworkCache::computeSHA1):
3168 (WebKit::NetworkCache::bytesEqual):
3172 * NetworkProcess/cache/NetworkCacheEntry.cpp:
3173 (WebKit::NetworkCache::Entry::asJSON):
3174 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
3175 (WebKit::NetworkCache::IOChannel::IOChannel):
3176 * NetworkProcess/cache/NetworkCacheStorage.cpp:
3177 (WebKit::NetworkCache::makeRecordDirectoryPath):
3178 (WebKit::NetworkCache::makeBlobDirectoryPath):
3179 (WebKit::NetworkCache::Storage::Storage):
3180 (WebKit::NetworkCache::Storage::approximateSize):
3181 (WebKit::NetworkCache::Storage::synchronize):
3182 (WebKit::NetworkCache::partitionPathForKey):
3183 (WebKit::NetworkCache::recordPathForKey):
3184 (WebKit::NetworkCache::bodyPath):
3185 (WebKit::NetworkCache::decodeRecordMetaData):
3186 (WebKit::NetworkCache::decodeRecordHeader):
3187 (WebKit::NetworkCache::createRecord):
3188 (WebKit::NetworkCache::encodeRecordMetaData):
3189 (WebKit::NetworkCache::encodeRecordHeader):
3190 (WebKit::NetworkCache::Storage::remove):
3191 (WebKit::NetworkCache::Storage::updateFileModificationTime):
3192 (WebKit::NetworkCache::Storage::dispatchReadOperation):
3194 Read both the blob and the record entry.
3196 (WebKit::NetworkCache::Storage::finishReadOperation):
3198 Factor to a function.
3200 (WebKit::NetworkCache::Storage::store):
3201 (WebKit::NetworkCache::Storage::traverse):
3202 (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
3203 (WebKit::NetworkCache::Storage::dispatchWriteOperation):
3205 We don't need separate full write and header write paths anymore. Everything is treated
3206 as a full write and deduplication stops us writing the body again.
3208 This simplifies the code and data structures.
3210 (WebKit::NetworkCache::Storage::finishWriteOperation):
3212 Factor to a function.
3214 (WebKit::NetworkCache::Storage::clear):
3215 (WebKit::NetworkCache::deletionProbability):
3217 Take the sharing count into account when computing deletion probability.
3218 It is less useful to delete a record that shares its body with others as data won't get deleted.
3220 (WebKit::NetworkCache::Storage::shrinkIfNeeded):
3221 (WebKit::NetworkCache::Storage::shrink):
3222 (WebKit::NetworkCache::Storage::deleteOldVersions):
3223 (WebKit::NetworkCache::directoryPathForKey): Deleted.
3224 (WebKit::NetworkCache::filePathForKey): Deleted.
3225 (WebKit::NetworkCache::openFileForKey): Deleted.
3226 (WebKit::NetworkCache::decodeRecord): Deleted.
3227 (WebKit::NetworkCache::Storage::update): Deleted.
3229 No need for separate update interface anymore. Regular store() avoids unnecessary body write.
3231 (WebKit::NetworkCache::Storage::dispatchFullWriteOperation): Deleted.
3232 (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation): Deleted.
3233 * NetworkProcess/cache/NetworkCacheStorage.h:
3234 * WebKit2.xcodeproj/project.pbxproj:
3236 2015-04-14 Chris Dumez <cdumez@apple.com>
3238 REGRESSION(r182603): [GTK] More than 500 crashes on the layout tests with the debug build.
3239 https://bugs.webkit.org/show_bug.cgi?id=143715
3241 Reviewed by Darin Adler.
3243 Enable assertions checking that calling editorState() does not cause a
3244 synchronous layout only on Mac and iOS. This assertion does not
3245 necessarily hold true on other ports as each one as its own
3246 platformEditorState() implementation. In particular, this assertion
3247 was being hit on GTK.
3249 * WebProcess/WebPage/WebPage.cpp:
3250 (WebKit::WebPage::didChangeSelection):
3252 2015-04-13 Alexey Proskuryakov <ap@apple.com>
3254 Build fixes after r182772.
3256 * UIProcess/API/mac/WKView.mm:
3257 (-[WKView _updateAutomaticallyComputedFixedLayoutSize]): Make a CGSize, not an NSSize.
3258 (-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]): Moved implementation
3259 to the correct place.
3260 (-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]): Ditto.
3261 (-[WKView _layoutMode]): Use a memeber from _data directly, not via a method.
3263 2015-04-13 Alexey Proskuryakov <ap@apple.com>
3267 * UIProcess/mac/PageClientImpl.mm:
3268 (WebKit::PageClientImpl::setDragImage):
3270 2015-04-13 Hunseop Jeong <hs85.jeong@samsung.com>
3272 [EFL][GTK] Fix build break after r182753
3273 https://bugs.webkit.org/show_bug.cgi?id=143689
3275 Reviewed by Anders Carlsson.
3277 * Platform/IPC/unix/ConnectionUnix.cpp:
3278 (IPC::Connection::processMessage):
3279 (IPC::Connection::sendOutgoingMessage):
3280 * Platform/unix/SharedMemoryUnix.cpp:
3281 (WebKit::SharedMemory::allocate):
3282 (WebKit::accessModeMMap):
3283 (WebKit::SharedMemory::map):
3284 (WebKit::SharedMemory::create): Deleted.
3286 2015-04-13 Alexey Proskuryakov <ap@apple.com>
3290 * UIProcess/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setDragImage):
3292 2015-04-13 Anders Carlsson <andersca@apple.com>
3294 Keep track of each shared memory object's protection when deciding whether to return our existing port
3295 https://bugs.webkit.org/show_bug.cgi?id=143687
3297 Reviewed by Tim Horton.
3299 * Platform/SharedMemory.h:
3300 * Platform/mac/SharedMemoryMac.cpp:
3301 (WebKit::machProtection):
3302 (WebKit::SharedMemory::create):
3303 (WebKit::SharedMemory::map):
3304 (WebKit::SharedMemory::createHandle):
3306 2015-04-13 Tim Horton <timothy_horton@apple.com>
3308 Add a persistent, fixed scale factor to make it easy to scale down WK(Web)Views
3309 https://bugs.webkit.org/show_bug.cgi?id=143560
3310 <rdar://problem/16302047>
3312 Reviewed by Darin Adler.
3314 Add a new "view" scale factor to WKView and WKWebView.
3316 Unlike page scale (or "magnification" in the API), view scale:
3317 - persists between page loads
3318 - persists between Web process crashes
3319 - is not user adjustable
3320 - can reliably be < 1
3322 The page scale and view scale are multiplied together whenever we push
3323 a new page scale down into WebCore, so the implementation of view scale
3324 is transparent to WebCore, and acts effectively as a constant multiplier
3325 for the (user-adjustable) page scale factor.
3327 * UIProcess/WebPageProxy.cpp:
3328 (WebKit::WebPageProxy::scaleView):
3329 Add scaleView, which updates our cached viewScaleFactor and pushes it to the Web process.
3331 (WebKit::WebPageProxy::creationParameters):
3332 Plumb viewScaleFactor through the page creation parameters.
3334 * UIProcess/WebPageProxy.h:
3335 (WebKit::WebPageProxy::viewScaleFactor): Added.
3337 * WebProcess/WebPage/WebPage.cpp:
3338 (WebKit::WebPage::WebPage):
3339 If the viewScaleFactor is not 1 at creation time, call scalePage with a page scale of 1.
3340 Internally, scalePage will multiply in the viewScaleFactor and push it all to the Web process.
3342 (WebKit::WebPage::scalePage):
3343 Multiply the page scale factor by the view scale factor before passing it to WebCore.
3345 (WebKit::WebPage::scalePageInViewCoordinates):
3346 Early returns need to check the total scale, not just the new page scale.
3348 (WebKit::WebPage::totalScaleFactor):
3349 The scale that we get back from WebCore::Page::pageScaleFactor is the product
3350 of WebKit2's view and page scales. So, here we'll call that the totalScaleFactor.
3351 (Might need a different name because it seems like "total" should include deviceScale too).
3353 (WebKit::WebPage::pageScaleFactor):
3354 WebKit2's notion of the pageScaleFactor does not include the view scale, so
3355 divide it out of WebCore's page scale.
3357 (WebKit::WebPage::scaleView):
3358 Apply a new view scale, maintaining the current scroll position.
3360 * WebProcess/WebPage/WebPage.h:
3361 (WebKit::WebPage::viewScaleFactor):
3362 * WebProcess/WebPage/WebPage.messages.in:
3364 * Shared/WebPageCreationParameters.cpp:
3365 (WebKit::WebPageCreationParameters::encode):
3366 (WebKit::WebPageCreationParameters::decode):
3367 * Shared/WebPageCreationParameters.h:
3368 Plumb viewScaleFactor through the page creation parameters.
3370 * UIProcess/API/Cocoa/WKViewPrivate.h:
3371 * UIProcess/API/Cocoa/WKWebView.mm:
3372 (-[WKWebView _viewScale]):
3373 (-[WKWebView _setViewScale:]):
3374 * UIProcess/API/mac/WKView.mm:
3375 (-[WKView _viewScale]):
3376 (-[WKView _setViewScale:]):
3377 Push the new view scale to WebPage.
3379 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3380 * UIProcess/API/Cocoa/WKWebView.mm:
3381 (-[WKWebView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]):
3382 (-[WKWebView _automaticallyComputesFixedLayoutSizeFromViewScale]):
3383 * UIProcess/API/mac/WKView.mm:
3384 (-[WKView setFrameSize:]):
3385 (-[WKView _updateAutomaticallyComputedFixedLayoutSize]):
3386 (-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]):
3387 (-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]):
3388 * UIProcess/API/mac/WKViewInternal.h:
3389 Add a new layout mode, "DynamicSizeComputedFromViewScale",
3390 which turns on fixed layout size mode, and sets the fixed layout size
3391 based on the view's frame and view scale. The fixed layout size is maintained
3392 as the frame of the view scaled by the inverse of the view scale. This
3393 makes it very easy to maintain a WK(Web)View that is scaled down by
3394 a constant amount, but is laid out as if it were not.
3396 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3397 (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
3398 (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
3399 (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
3400 Because the transient zoom mechanism touches layers that WebCore owns,
3401 it mostly need to operate with totalScaleFactor, because that is what WebCore sees.
3403 2015-04-10 Brent Fulgham <bfulgham@apple.com>
3405 Expand test infrastructure to support scrolling tests
3406 https://bugs.webkit.org/show_bug.cgi?id=143286
3407 <rdar://problem/20375516>
3409 Reviewed by Simon Fraser.
3411 Extend the WK2 testing API to include a method for setting a JSC callback function to be triggered
3412 by the new WebCore::WheelEventTestTrigger singleton.
3414 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3415 (WKBundlePageStartMonitoringScrollOperations): WK2 method that causes the testing system to begin tracking wheel events.
3416 (WKBundlePageRegisterScrollOperationCompletionCallback): WK2 method to set the callback function for testing.
3417 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3419 2015-04-13 Enrica Casucci <enrica@apple.com>
3421 Clients of WKWebView should be able to override drag functions.
3422 https://bugs.webkit.org/show_bug.cgi?id=143618
3424 Reviewed by Darin Adler.
3426 WKWebView now implements the drag protocol functions and
3427 forwards the calls to the inner WKView.
3428 In the page client, when we receive a request to start drag
3429 from the WebProcess, we call _dragImageForView in WKView with
3430 the target view. The function calls dragImage on the given view,
3431 so that its clients can override the dragImage function.
3433 * UIProcess/API/Cocoa/WKWebView.mm:
3434 (-[WKWebView draggingEntered:]):
3435 (-[WKWebView draggingUpdated:]):
3436 (-[WKWebView draggingExited:]):
3437 (-[WKWebView prepareForDragOperation:]):
3438 (-[WKWebView performDragOperation:]):
3439 * UIProcess/API/mac/WKView.mm:
3440 (-[WKView _dragImageForView:withImage:at:linkDrag:]):
3441 (-[WKView _setDragImage:at:linkDrag:]): Deleted.
3442 * UIProcess/API/mac/WKViewInternal.h:
3443 * UIProcess/mac/PageClientImpl.mm:
3444 (WebKit::PageClientImpl::setDragImage):
3446 2015-04-13 Alex Christensen <achristensen@webkit.org>
3448 [iOS] Unreviewed build fix after r182760.
3450 * Shared/WebCoreArgumentCoders.cpp:
3451 (IPC::encodeSharedBuffer):
3452 (IPC::decodeSharedBuffer):
3453 Update SharedMemory function names.
3455 2015-04-13 Anders Carlsson <andersca@apple.com>
3457 Rename SharedMemory::create overloads
3458 https://bugs.webkit.org/show_bug.cgi?id=143679
3460 Reviewed by Beth Dakin.
3462 Rename the SharedMemory::create overload that allocates memory to SharedMemory::allocate,
3463 and the SharedMemory::create overload that maps in a handle to SharedMemory::map.
3465 * Platform/SharedMemory.h:
3466 * Platform/mac/SharedMemoryMac.cpp:
3467 (WebKit::SharedMemory::allocate):
3468 (WebKit::SharedMemory::map):
3469 (WebKit::SharedMemory::create): Deleted.
3470 * Shared/ShareableBitmap.cpp:
3471 (WebKit::ShareableBitmap::createShareable):
3472 (WebKit::ShareableBitmap::create):
3473 * Shared/ShareableResource.cpp:
3474 (WebKit::ShareableResource::create):
3475 * Shared/ShareableResource.h:
3476 * Shared/WebCompiledContentExtension.cpp:
3477 (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
3478 * Shared/WebCompiledContentExtensionData.cpp:
3479 (WebKit::WebCompiledContentExtensionData::decode):
3480 * Shared/WebHitTestResult.cpp:
3481 (WebKit::WebHitTestResult::Data::Data):
3482 (WebKit::WebHitTestResult::Data::decode):
3483 * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
3484 (WebKit::WebPasteboardProxy::getPasteboardBufferForType):
3485 (WebKit::WebPasteboardProxy::setPasteboardBufferForType):
3486 * UIProcess/VisitedLinkProvider.cpp:
3487 (WebKit::VisitedLinkProvider::resizeTable):
3488 * UIProcess/mac/WebPageProxyMac.mm:
3489 (WebKit::WebPageProxy::dataSelectionForPasteboard):
3490 (WebKit::WebPageProxy::setPromisedDataForImage):
3491 * WebProcess/Plugins/PDF/PDFPlugin.mm:
3492 (WebKit::PDFPlugin::writeItemsToPasteboard):
3493 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3494 (WebKit::WebPlatformStrategies::bufferForType):
3495 (WebKit::WebPlatformStrategies::setBufferForType):
3496 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3497 (WebKit::WebDragClient::declareAndWriteDragImage):
3498 * WebProcess/WebPage/VisitedLinkTableController.cpp:
3499 (WebKit::VisitedLinkTableController::setVisitedLinkTable):
3500 * WebProcess/WebPage/mac/WebPageMac.mm:
3501 (WebKit::WebPage::getDataSelectionForPasteboard):
3503 2015-04-13 Brady Eidson <beidson@apple.com>
3505 Share sheets from Share menus appear outside the browser window.
3506 <rdar://problem/20455592> and https://bugs.webkit.org/show_bug.cgi?id=143620
3508 Reviewed by Darin Adler.
3510 Refactor existing Sharing Service Picker code to also be used for the Share menu NSMenuItem.
3512 * UIProcess/WebPageProxy.cpp:
3513 (WebKit::WebPageProxy::internalShowContextMenu):
3514 (WebKit::WebPageProxy::platformInitializeShareMenuItem):
3515 * UIProcess/WebPageProxy.h:
3517 * UIProcess/mac/WKSharingServicePickerDelegate.h: Added.
3518 * UIProcess/mac/WKSharingServicePickerDelegate.mm: Added.
3519 (+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]):
3520 (-[WKSharingServicePickerDelegate menuProxy]):
3521 (-[WKSharingServicePickerDelegate setMenuProxy:]):
3522 (-[WKSharingServicePickerDelegate setPicker:]):
3523 (-[WKSharingServicePickerDelegate setFiltersEditingServices:]):
3524 (-[WKSharingServicePickerDelegate setHandlesEditingReplacement:]):
3525 (-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
3526 (-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]):
3527 (-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
3528 (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
3529 (-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]):
3531 * UIProcess/mac/WebContextMenuProxyMac.mm:
3532 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
3533 (+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]): Deleted.
3534 (-[WKSharingServicePickerDelegate menuProxy]): Deleted.
3535 (-[WKSharingServicePickerDelegate setMenuProxy:]): Deleted.
3536 (-[WKSharingServicePickerDelegate setPicker:]): Deleted.
3537 (-[WKSharingServicePickerDelegate setIncludeEditorServices:]): Deleted.
3538 (-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]): Deleted.
3539 (-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]): Deleted.
3540 (-[WKSharingServicePickerDelegate sharingService:willShareItems:]): Deleted.
3541 (-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Deleted.
3542 (-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]): Deleted.
3544 * UIProcess/mac/WebPageProxyMac.mm:
3545 (WebKit::WebPageProxy::platformInitializeShareMenuItem):
3547 * WebKit2.xcodeproj/project.pbxproj:
3549 2015-04-13 Anders Carlsson <andersca@apple.com>
3551 Begin cleaning up the shared memory interface
3552 https://bugs.webkit.org/show_bug.cgi?id=143677
3554 Reviewed by Andreas Kling.
3556 Rename createFromVMBuffer to create and add a protection parameter (which is currently unused).
3557 Also, turn SharedMemory::Protection into a proper enum class.
3559 * NetworkProcess/cache/NetworkCache.cpp:
3560 (WebKit::NetworkCache::Cache::store):
3561 * NetworkProcess/cache/NetworkCacheEntry.cpp:
3562 (WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
3563 * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
3564 (WebKit::tryGetShareableHandleFromCFData):
3565 * Platform/SharedMemory.h:
3566 * Platform/mac/SharedMemoryMac.cpp:
3567 (WebKit::SharedMemory::create):
3568 (WebKit::machProtection):
3569 (WebKit::SharedMemory::createHandle):
3570 (WebKit::SharedMemory::createFromVMBuffer): Deleted.
3571 * Shared/ContextMenuContextData.cpp:
3572 (WebKit::ContextMenuContextData::encode):
3573 (WebKit::ContextMenuContextData::decode):
3574 * Shared/ShareableBitmap.h:
3575 * Shared/ShareableResource.cpp:
3576 (WebKit::ShareableResource::create):
3577 (WebKit::ShareableResource::createHandle):
3578 * Shared/WebCompiledContentExtensionData.cpp:
3579 (WebKit::WebCompiledContentExtensionData::encode):
3580 (WebKit::WebCompiledContentExtensionData::decode):
3581 * Shared/WebHitTestResult.cpp:
3582 (WebKit::WebHitTestResult::Data::encode):
3583 (WebKit::WebHitTestResult::Data::decode):
3584 * UIProcess/API/APIUserContentExtensionStore.cpp:
3585 (API::createExtension):
3586 * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
3587 (WebKit::WebPasteboardProxy::getPasteboardBufferForType):
3588 (WebKit::WebPasteboardProxy::setPasteboardBufferForType):
3589 (WebKit::WebPasteboardProxy::readBufferFromPasteboard):
3590 * UIProcess/VisitedLinkProvider.cpp:
3591 (WebKit::VisitedLinkProvider::sendTable):
3592 * UIProcess/mac/WKPrintingView.mm:
3593 (pageDidDrawToImage):
3594 * UIProcess/mac/WebPageProxyMac.mm:
3595 (WebKit::WebPageProxy::dataSelectionForPasteboard):
3596 (WebKit::WebPageProxy::setPromisedDataForImage):
3597 * WebProcess/Plugins/PDF/PDFPlugin.mm:
3598 (WebKit::PDFPlugin::writeItemsToPasteboard):
3599 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3600 (WebKit::WebPlatformStrategies::bufferForType):
3601 (WebKit::WebPlatformStrategies::setBufferForType):
3602 (WebKit::WebPlatformStrategies::readBufferFromPasteboard):
3603 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3604 (WebKit::WebDragClient::declareAndWriteDragImage):
3605 * WebProcess/WebPage/VisitedLinkTableController.cpp:
3606 (WebKit::VisitedLinkTableController::setVisitedLinkTable):
3607 * WebProcess/WebPage/WebPage.cpp:
3608 (WebKit::WebPage::takeSnapshot):
3609 (WebKit::WebPage::drawRectToImage):
3610 * WebProcess/WebPage/mac/WebPageMac.mm:
3611 (WebKit::WebPage::getDataSelectionForPasteboard):
3613 2015-04-10 Jon Honeycutt <jhoneycutt@apple.com>
3615 Cannot click "Next" button on Google two-factor auth setup page
3617 <https://bugs.webkit.org/show_bug.cgi?id=143624>
3618 <rdar://problem/19175714>
3620 This issue occurs when this site focuses the submit button. When it
3621 receives focus, we try to assist it. While we consider ourselves to be
3622 assisting it, we ignore further gesture inputs for that node, including
3625 To fix this, only assist input types that we know are assistable,
3626 including text fields, select and date elements, etc.
3628 Reviewed by Darin Adler.
3630 * UIProcess/ios/WKContentViewInteraction.mm:
3631 (isAssistableInputType):
3632 If the type is a known-assistable type, return true.
3633 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
3634 Call isAssistableInputType() to determine whether we should do any kind
3635 of assistance for this node.
3637 2015-04-13 Beth Dakin <bdakin@apple.com>
3639 Add force property to MouseEvents
3640 https://bugs.webkit.org/show_bug.cgi?id=143569
3642 rdar://problem/20472954
3644 Reviewed by Darin Adler.
3646 In order to accommodate adding force to all PlatformMouseEvents, we have to add it
3647 to pass a caches pressure event to NativeWebMouseEvent and add force to
3650 NativeWebMouseEvent now requires a second NSEvent for the pressureEvent.
3651 * Shared/NativeWebMouseEvent.h:
3653 WebMouseEvent takes a force parameter.
3654 * Shared/WebEvent.h:
3655 (WebKit::WebMouseEvent::force):
3656 * Shared/WebEventConversion.cpp:
3657 (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
3658 * Shared/WebMouseEvent.cpp:
3659 (WebKit::WebMouseEvent::WebMouseEvent):
3660 (WebKit::WebMouseEvent::encode):
3661 (WebKit::WebMouseEvent::decode):
3662 * Shared/mac/NativeWebMouseEventMac.mm:
3663 (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
3664 * Shared/mac/WebEventFactory.h:
3665 * Shared/mac/WebEventFactory.mm:
3666 (WebKit::WebEventFactory::createWebMouseEvent):
3668 Cache the most recent pressureEvent in _data so that it can be sent along to the
3669 NativeWebMouseEvent constructor.
3670 * UIProcess/API/mac/WKView.mm:
3671 (-[WKView pressureChangeWithEvent:]):
3672 (-[WKView acceptsFirstMouse:]):
3673 (-[WKView shouldDelayWindowOrderingForEvent:]):
3674 (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
3675 (-[WKView initWithFrame:processPool:configuration:webView:]):
3677 WebMouseEvent takes a force parameter.
3678 * WebProcess/Plugins/PDF/PDFPlugin.mm:
3679 (WebKit::PDFPlugin::showContextMenuAtPoint):
3680 * WebProcess/Plugins/PluginView.cpp:
3681 (WebKit::PluginView::createWebEvent):
3683 MouseEvent and PlatformMouseEvent both take force parameters too.
3684 * WebProcess/WebPage/WebPage.cpp:
3685 (WebKit::WebPage::navigateToURLWithSimulatedClick):
3686 (WebKit::WebPage::contextMenuAtPointInWindow):
3687 (WebKit::WebPage::dragEnded):
3688 (WebKit::WebPage::simulateMouseDown):
3689 (WebKit::WebPage::simulateMouseUp):
3690 (WebKit::WebPage::simulateMouseMotion):
3692 The functions that dispatch the force events no longer take a PlatformMouseEvent
3694 * WebProcess/WebPage/mac/WebPageMac.mm:
3695 (WebKit::WebPage::inputDeviceForceDidChange):
3696 (WebKit::WebPage::immediateActionDidCancel):
3698 2015-04-13 Andreas Kling <akling@apple.com>
3700 Don't segregate heap objects based on Structure immortality.
3701 <https://webkit.org/b/143638>
3703 Reviewed by Darin Adler.
3705 * WebProcess/Plugins/Netscape/JSNPObject.h:
3707 2015-04-13 Timothy Horton <timothy_horton@apple.com>
3709 javascript: links in inline PDFs shouldn't execute JavaScript in the context of the host website
3710 https://bugs.webkit.org/show_bug.cgi?id=143642
3711 <rdar://problem/18259355>
3713 Reviewed by Darin Adler.
3715 * WebProcess/Plugins/PDF/PDFPlugin.mm:
3716 (WebKit::PDFPlugin::clickedLink):
3717 Don't follow javascript: URLs.
3719 2015-04-10 Alex Christensen <achristensen@webkit.org>
3721 [Content Extensions] Don't unmap shared memory while using it.
3722 https://bugs.webkit.org/show_bug.cgi?id=143625
3724 Reviewed by Darin Adler.
3726 * Shared/WebCompiledContentExtension.cpp:
3727 (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
3728 * Shared/WebCompiledContentExtensionData.h:
3729 (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
3730 * UIProcess/API/APIUserContentExtensionStore.cpp:
3731 (API::createExtension):
3732 Keep the Data object alive as long as the SharedMemory that uses it.
3734 2015-04-12 Darin Adler <darin@apple.com>
3736 [Cocoa] Localizable strings are inconsistent and need to be regenerated
3737 https://bugs.webkit.org/show_bug.cgi?id=143661
3739 Reviewed by Dan Bernstein.
3741 * UIProcess/WebEditCommandProxy.cpp:
3742 (WebKit::WebEditCommandProxy::nameForEditAction): Also added a comment
3743 about the fact that we have two copies of all the localizable strings.
3745 2015-04-12 Sungmann Cho <sungmann.cho@navercorp.com>
3747 Fix trival typos related to the word "coordinate".
3748 https://bugs.webkit.org/show_bug.cgi?id=143644
3750 Reviewed by Alexey Proskuryakov.
3752 No new tests, no behavior change.
3754 * Shared/WebHitTestResult.cpp:
3755 (WebKit::WebHitTestResult::Data::encode):
3756 (WebKit::WebHitTestResult::Data::decode):
3757 * Shared/WebHitTestResult.h:
3758 * WebProcess/WebPage/mac/WebPageMac.mm:
3759 (WebKit::WebPage::performActionMenuHitTestAtLocation):
3760 (WebKit::WebPage::lookupTextAtLocation):
3762 2015-04-12 Sungmann Cho <sungmann.cho@navercorp.com>
3764 Remove PluginModuleInfo.cpp from WebKit2
3765 https://bugs.webkit.org/show_bug.cgi?id=143643
3767 Reviewed by Darin Adler.
3769 Remove PluginModuleInfo.cpp from WebKit2 because it is totally empty.
3771 No new tests, no behavior change.
3774 * Shared/Plugins/PluginModuleInfo.cpp: Removed.
3775 * WebKit2.xcodeproj/project.pbxproj:
3777 2015-04-11 Yusuke Suzuki <utatane.tea@gmail.com>
3779 [ES6] Enable Symbol in web pages
3780 https://bugs.webkit.org/show_bug.cgi?id=143375
3782 Reviewed by Ryosuke Niwa.
3784 * UIProcess/API/C/WKPreferencesRefPrivate.h:
3785 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3786 * UIProcess/efl/WebInspectorProxyEfl.cpp:
3787 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3788 * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3789 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3790 * UIProcess/mac/WebInspectorProxyMac.mm:
3791 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3793 2015-04-08 Sam Weinig <sam@webkit.org>
3795 Allow LaunchServices to handle URLs on link navigations
3796 <rdar://problem/19446826>
3797 https://bugs.webkit.org/show_bug.cgi?id=143544
3799 Reviewed by Anders Carlsson.
3801 * UIProcess/Cocoa/NavigationState.mm:
3802 (WebKit::tryAppLink):
3803 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
3804 Only let LaunchServices have a crack at the URL if the navigation is:
3805 1) a main frame navigation
3806 2) a result of a user gesture
3808 2015-04-10 Tim Horton <timothy_horton@apple.com>
3810 Replace setFixedLayoutSizeEnabled: with an enum of layout modes
3811 https://bugs.webkit.org/show_bug.cgi?id=143576
3813 Reviewed by Simon Fraser.
3815 * UIProcess/API/C/WKLayoutMode.h: Added.
3816 * UIProcess/API/Cocoa/WKViewPrivate.h:
3817 * UIProcess/API/Cocoa/WKWebView.mm:
3818 (-[WKWebView _layoutMode]):
3819 (-[WKWebView _setLayoutMode:]):
3820 (-[WKWebView _isFixedLayoutEnabled]): Deleted.
3821 (-[WKWebView _setFixedLayoutEnabled:]): Deleted.
3822 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3823 * UIProcess/API/Cocoa/_WKLayoutMode.h: Added.
3824 * UIProcess/API/mac/WKView.mm:
3825 (-[WKView _layoutMode]):
3826 (-[WKView _setLayoutMode:]):
3827 (-[WKView _isFixedLayoutEnabled]): Deleted.
3828 (-[WKView _setFixedLayoutEnabled:]): Deleted.
3829 * WebKit2.xcodeproj/project.pbxproj:
3830 Add enums for "layout mode". Currently we have two values: "ViewSize",
3831 which is the normal behavior, and "FixedSize", which is fixed layout mode.
3832 More values will come in the future.
3834 2015-04-10 Anders Carlsson <andersca@apple.com>
3836 _WKWebsiteDataStore doesn't track and remove offline application cache entries
3837 https://bugs.webkit.org/show_bug.cgi?id=143614
3838 rdar://problem/20243235
3840 Reviewed by Andreas Kling.
3842 * Shared/WebsiteData/WebsiteDataTypes.h:
3843 Add WebsiteDataTypeOfflineWebApplicationCache.
3845 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
3846 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
3847 (dataTypesToString):
3848 * UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
3849 (WebKit::toWebsiteDataTypes):
3850 (WebKit::toWKWebsiteDataTypes):
3851 Add WKWebsiteDataTypeOfflineWebApplicationCache.
3853 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3854 (WebKit::WebsiteDataStore::fetchData):
3855 Create a custom application cache storage and fetch the origins from it.
3857 (WebKit::WebsiteDataStore::removeData):
3858 Delete either all the cache entries (since we don't track time in the application cache),
3859 or the ones specified by the given entries.
3861 2015-04-10 Eric Carlson <eric.carlson@apple.com>
3863 [Mac] Refactor MediaPlaybackTarget
3864 https://bugs.webkit.org/show_bug.cgi?id=143571
3866 Reviewed by Jer Noble.
3868 Pass a MediaPlaybackTargetContext across process boundary instead of a MediaPlaybackTarget.
3869 * Shared/WebCoreArgumentCoders.h:
3870 (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode): New.
3871 (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decode): New.
3872 * Shared/mac/WebCoreArgumentCoders.cpp:
3873 (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): New.
3874 (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): New.
3875 (IPC::ArgumentCoder<MediaPlaybackTarget>::encode): Deleted.
3876 (IPC::ArgumentCoder<MediaPlaybackTarget>::decode): Deleted.
3877 * UIProcess/WebPageProxy.cpp:
3878 (WebKit::WebPageProxy::didChoosePlaybackTarget): Take a Ref<MediaPlaybackTarget>&&.
3879 * UIProcess/WebPageProxy.h:
3880 * WebProcess/WebPage/WebPage.h:
3881 * WebProcess/WebPage/WebPage.messages.in:
3882 * WebProcess/WebPage/mac/WebPageMac.mm:
3883 (WebKit::WebPage::playbackTargetSelected): Take a Ref<MediaPlaybackTarget>&&.
3885 2015-04-10 Hunseop Jeong <hs85.jeong@samsung.com>
3887 Fix some minor typos related to the WebProcessCreationParameter.
3888 https://bugs.webkit.org/show_bug.cgi?id=143598
3890 Reviewed by Csaba Osztrogonác.
3892 No new tests, no behavior change.
3894 * Shared/WebProcessCreationParameters.cpp:
3895 (WebKit::WebProcessCreationParameters::encode):
3896 (WebKit::WebProcessCreationParameters::decode):
3897 * Shared/WebProcessCreationParameters.h:
3898 * UIProcess/WebProcessPool.cpp:
3899 (WebKit::WebProcessPool::createNewWebProcess):
3900 * WebProcess/WebProcess.cpp:
3901 (WebKit::WebProcess::initializeWebProcess):
3903 2015-04-09 Andy Estes <aestes@apple.com>
3905 [Cocoa] Add a HAVE(AVKIT) and use it
3906 https://bugs.webkit.org/show_bug.cgi?id=143593
3908 Reviewed by David Kilzer.
3910 * UIProcess/API/Cocoa/WKWebView.mm:
3911 (-[WKWebView _mayAutomaticallyShowVideoOptimized]): Returned false if !HAVE(AVKIT).
3912 * UIProcess/WebPageProxy.cpp:
3913 (WebKit::WebPageProxy::WebPageProxy): Removed the check for < iOS 8.2.
3914 (WebKit::WebPageProxy::reattachToWebProcess): Ditto.
3915 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3916 (WebKit::WebVideoFullscreenManagerProxy::create): Created a version of this function that returns nullptr if
3917 the minimum required version of iOS is less than 8.2 or if !HAVE(AVKIT).
3918 * WebProcess/WebPage/WebPage.cpp:
3919 (WebKit::WebPage::updatePreferences): Only called Settings::setAVKitEnabled(true) if HAVE(AVKIT).
3921 2015-04-09 Hunseop Jeong <hs85.jeong@samsung.com>
3923 Use modern loops in WebProcess
3924 https://bugs.webkit.org/show_bug.cgi?id=143302
3926 Reviewed by Darin Adler.
3928 Use modern range for-loops in WebProcess.
3930 No new tests, no behavior change.
3932 * WebProcess/WebProcess.cpp:
3933 (WebKit::WebProcess::initializeConnection):
3934 (WebKit::WebProcess::initializeWebProcess):
3935 (WebKit::WebProcess::focusedWebPage):
3936 (WebKit::WebProcess::webPageGroup):
3937 (WebKit::WebProcess::setTextCheckerState):
3938 (WebKit::WebProcess::resetAllGeolocationPermissions):
3940 2015-04-09 Gordon Sheridan <gordon_sheridan@apple.com>
3942 Track IconDatabase retain counts for WebContent processes. Balance retain/releases for processes that terminate before successfully doing it themselves.
3943 https://bugs.webkit.org/show_bug.cgi?id=143517.
3945 Reviewed by Brady Eidson.
3947 * UIProcess/WebIconDatabase.messages.in:
3948 Move RetainIconForPageURL and ReleaseIconForPageURL messages to WebProcessProxy so they can be associated with the appropriate web process.
3950 * UIProcess/WebProcessProxy.cpp:
3951 (WebKit::WebProcessProxy::connectionDidClose):
3952 Call releaseRemainingIconsForPageURLs() to balance retains/releases for this process.
3954 (WebKit::WebProcessProxy::retainIconForPageURL):
3955 Track retain counts for page URLs and call through to WebIconDatabase.
3957 (WebKit::WebProcessProxy::releaseIconForPageURL):
3960 (WebKit::WebProcessProxy::releaseRemainingIconsForPageURLs):
3961 Call releaseIconForPageURL() once for each outstanding retain count, for each page URL.
3963 * UIProcess/WebProcessProxy.h:
3964 Declare methods for retainIconForPageURL(), releaseIconForPageURL(), and releaseRemainingIconsForPageURLs().
3965 Declare hash map to track number of retains per page URL.
3967 * UIProcess/WebProcessProxy.messages.in:
3968 Moved RetainIconForPageURL and ReleaseIconForPageURL messages here from WebIconDatabase.
3970 * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
3971 (WebKit::WebIconDatabaseProxy::retainIconForPageURL):
3972 Modify the receiver of the message to be WebProcessProxy.
3974 (WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
3977 2015-04-09 Chris Dumez <cdumez@apple.com>
3979 [WK2] Regression(r182194): The NetworkProcess is calling the wrong memory pressure handler before suspending
3980 https://bugs.webkit.org/show_bug.cgi?id=143575
3981 <rdar://problem/20484338>
3983 Reviewed by Andreas Kling.
3985 After r182194, the NetworkProcess is calling the memory pressure
3986 handler before getting suspended to free-up as much memory as possible
3989 However, we were calling the default memory pressure handling code
3990 instead of the custom handler registered by the NetworkProcess. This
3991 patch fixes the problem.
3993 * NetworkProcess/NetworkProcess.cpp:
3994 (WebKit::NetworkProcess::lowMemoryHandler):
3995 (WebKit::NetworkProcess::initializeNetworkProcess):
3996 (WebKit::NetworkProcess::processWillSuspend):
3997 * NetworkProcess/NetworkProcess.h:
3999 2015-04-09 Brady Eidson <beidson@apple.com>
4001 REGRESSION (r182573): Action Menus no longer appear for WebKit2 views displaying an image
4002 rdar://problem/20486551 and https://bugs.webkit.org/show_bug.cgi?id=143574
4004 Reviewed by Brent Fulgham.
4006 * Shared/WebHitTestResult.cpp:
4007 (WebKit::WebHitTestResult::Data::Data): Clear up a name scoping issue.
4009 2015-04-09 Chris Dumez <cdumez@apple.com>
4011 [WK2][iOS] editorState() should not cause a synchronous layout
4012 https://bugs.webkit.org/show_bug.cgi?id=142536
4013 <rdar://problem/20041506>
4015 Reviewed by Enrica Casucci.
4017 platformEditorState() on iOS does a synchronous layout to compute some
4018 of the EditorState members (e.g. caretRectAtStart / caretRectAtEnd).
4019 This is bad for performance as this is called every time the selection
4020 is changed (which happens for e.g. when you set the value of a focused
4023 This patch updates the behavior on iOS to only send a partial EditorState
4024 on selection change so that the UIProcess gets most of the information
4025 (the ones that do not require style recalc or layout) ASAP. A full Editor
4026 state is then sent after the asynchronous layout is done.
4028 With this change, I see a 38% improvement on Speedometer (26.4 +/- 0.37
4029 -> 36.5 +/- 0.54) on iPhone 6 Plus.
4031 * Shared/EditorState.cpp:
4032 (WebKit::EditorState::encode):
4033 (WebKit::EditorState::decode):
4034 (WebKit::EditorState::PostLayoutData::encode):
4035 (WebKit::EditorState::PostLayoutData::decode):
4036 * Shared/EditorState.h:
4037 (WebKit::EditorState::EditorState): Deleted.
4038 * UIProcess/ios/WKContentView.mm:
4039 (-[WKContentView _didCommitLayerTree:]):
4040 * UIProcess/ios/WKContentViewInteraction.mm:
4041 (WebKit::WKSelectionDrawingInfo::WKSelectionDrawingInfo):
4042 (-[WKContentView webSelectionRects]):
4043 (-[WKContentView _addShortcut:]):
4044 (-[WKContentView selectedText]):
4045 (-[WKContentView isReplaceAllowed]):
4046 (-[WKContentView _promptForReplace:]):
4047 (-[WKContentView _transliterateChinese:]):
4048 (-[WKContentView textStylingAtPosition:inDirection:]):
4049 (-[WKContentView canPerformAction:withSender:]):
4050 (-[WKContentView _showDictionary:]):