1 2015-05-27 Carlos Garcia Campos <cgarcia@igalia.com>
3 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.2 release.
5 * gtk/NEWS: Add release notes for 2.9.2.
7 2015-05-27 Carlos Garcia Campos <cgarcia@igalia.com>
9 [SOUP] Network Cache: Handle the case when we fail to create the IO stream
10 https://bugs.webkit.org/show_bug.cgi?id=145406
12 Reviewed by Sergio Villar Senin.
14 We were asserting in that case, but it can happen that we
15 fail to create the stream. It happened to me after r184690, that
16 changed the NetworkCache::Key hash. Since this was not expected to
17 happen, the async operation never finished and the completion
18 handler never called, leaving resources loading forever. We
19 should make sure we call the completion handler with an error
20 code, so that the load finishes and the entry is silently removed
23 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
24 (WebKit::NetworkCache::IOChannel::read):
25 (WebKit::NetworkCache::IOChannel::readSync):
26 (WebKit::NetworkCache::IOChannel::write):
28 2015-05-26 Carlos Garcia Campos <cgarcia@igalia.com>
30 Network Cache: Add cache capacity to the totals of JSON file
31 https://bugs.webkit.org/show_bug.cgi?id=145246
33 Reviewed by Antti Koivisto.
35 * NetworkProcess/cache/NetworkCache.cpp:
36 (WebKit::NetworkCache::Cache::dumpContentsToFile):
37 * NetworkProcess/cache/NetworkCacheStorage.h:
38 (WebKit::NetworkCache::Storage::capacity):
40 2015-05-26 Anders Carlsson <andersca@apple.com>
42 Add a symlink for every file inside /S/L/F/WebKit.framework to the PrivateFrameworks mirror.
44 rdar://problem/21111232.
46 Reviewed by Dan Bernstein.
48 * WebKit2.xcodeproj/project.pbxproj:
50 2015-05-26 Hunseop Jeong <hs85.jeong@samsung.com>
52 [EFL] webview should be updated from (0,0) when using the evasGL.
53 https://bugs.webkit.org/show_bug.cgi?id=137948
55 Reviewed by Gyuyoung Kim.
57 Changed the point of the start position to update the evasObject
58 correctly when using the evasGL for graphics backend.
60 * UIProcess/API/efl/EwkView.cpp:
61 (EwkView::displayTimerFired):
63 2015-05-26 Dan Bernstein <mitz@apple.com>
65 <rdar://problem/21104551> Update build settings
67 Reviewed by Anders Carlsson.
69 * Configurations/DebugRelease.xcconfig:
70 * Configurations/FeatureDefines.xcconfig:
71 * Configurations/Version.xcconfig:
72 * Configurations/WebContentService.Development.xcconfig:
73 * Configurations/WebContentService.xcconfig:
75 2015-05-26 Milan Crha <mcrha@redhat.com>
77 [GTK] Expand wildcards inside generate-inspector-gresource-manifest.py
78 https://bugs.webkit.org/show_bug.cgi?id=138134
80 Reviewed by Žan Doberšek.
82 * PlatformGTK.cmake: Command line with expanded resources exceeds 32KB, which
83 is a limit on Windows. It's better to expand wildcards inside the python script.
85 2015-05-25 Dan Bernstein <mitz@apple.com>
87 ASSERT_MAIN_THREAD and DOM_ASSERT_MAIN_THREAD are unnecessary no-ops
88 https://bugs.webkit.org/show_bug.cgi?id=145372
90 Reviewed by Sam Weinig.
92 * Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES.
94 2015-05-25 Carlos Garcia Campos <cgarcia@igalia.com>
96 [GTK] Add construct property to WebKitWebContext to set the IndexedDB database directory
97 https://bugs.webkit.org/show_bug.cgi?id=140882
99 Reviewed by Gustavo Noronha Silva.
101 Add WebKitWebContext:indexed-db-database-directory construct only property.
103 * UIProcess/API/gtk/WebKitWebContext.cpp:
104 (webkitWebContextGetProperty):
105 (webkitWebContextSetProperty):
106 (webkitWebContextConstructed):
107 (webkit_web_context_class_init):
109 2015-05-24 Sam Weinig <sam@webkit.org>
111 Crash when using a removed ScriptMessageHandler
112 <rdar://problem/20888499>
113 https://bugs.webkit.org/show_bug.cgi?id=145359
115 Reviewed by Dan Bernstein.
117 * WebProcess/UserContent/WebUserContentController.cpp:
118 (WebKit::WebUserMessageHandlerDescriptorProxy::~WebUserMessageHandlerDescriptorProxy):
119 Invalidate the descriptor when the message handler client (as implemented by WebUserMessageHandlerDescriptorProxy)
120 goes away. This will happen if a script message handler is removed at the API level or the WebUserContentController
121 is destroyed (which will happen if all the pages get destroyed).
123 2015-05-23 Dan Bernstein <mitz@apple.com>
125 <rdar://problem/21090327> /S/L/PrivateFrameworks/WebKit.framework is missing Headers and PrivateHeaders symlinks
126 https://bugs.webkit.org/show_bug.cgi?id=145354
128 Reviewed by David Kilzer.
130 * WebKit2.xcodeproj/project.pbxproj: Create Headers and PrivateHeaders symlinks alongside
133 2015-05-23 Sungmann Cho <sungmann.cho@navercorp.com>
135 Rename ShareableResource::create(Handle&) to map(Handle&) to match SharedMemory.
136 https://bugs.webkit.org/show_bug.cgi?id=145288
138 Reviewed by Sam Weinig.
140 * Shared/ShareableResource.cpp:
141 (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
142 (WebKit::ShareableResource::map):
143 (WebKit::ShareableResource::create): Deleted.
144 * Shared/ShareableResource.h:
146 2015-05-22 Jon Lee <jonlee@apple.com>
148 Rename MediaPlaybackAllowsInline
149 https://bugs.webkit.org/show_bug.cgi?id=145315
151 Reviewed by Eric Carlson.
153 Our API uses allowsInlineMediaPlayback. Our symbols should reflect the same.
155 * Shared/WebPreferencesDefinitions.h:
156 * UIProcess/API/C/WKPreferences.cpp:
157 (WKPreferencesSetMediaPlaybackAllowsInline): Update the call to preferences.
158 The C API will not change in a future patch.
159 (WKPreferencesGetMediaPlaybackAllowsInline): Ditto.
160 * UIProcess/API/Cocoa/WKWebView.mm:
161 (-[WKWebView initWithFrame:configuration:]): Update the name of the key.
162 * WebProcess/WebPage/WebPage.cpp:
163 (WebKit::WebPage::updatePreferences): Ditto.
165 * UIProcess/API/gtk/WebKitSettings.cpp: Update the call.
166 (webkit_settings_get_media_playback_allows_inline):
167 (webkit_settings_set_media_playback_allows_inline):
169 2015-05-22 Jon Lee <jonlee@apple.com>
171 Rename MediaPlaybackAllowsAirPlay
172 https://bugs.webkit.org/show_bug.cgi?id=145316
174 Reviewed by Eric Carlson.
176 In preparation for an API rename, update internal symbols from mediaPlaybackAllowsAirPlay
177 to allowsAirPlayForMediaPlayback.
179 * Shared/WebPreferencesDefinitions.h: Update the name.
180 * UIProcess/API/Cocoa/WKWebView.mm:
181 (-[WKWebView initWithFrame:configuration:]): Ditto.
182 * WebProcess/WebPage/WebPage.cpp:
183 (WebKit::WebPage::updatePreferences): Update the call to settings.
185 2015-05-22 Jon Lee <jonlee@apple.com>
187 Unreviewed GTK fix after r184802.
189 * UIProcess/API/gtk/WebKitSettings.cpp:
190 (webkit_settings_get_media_playback_requires_user_gesture):
191 (webkit_settings_set_media_playback_requires_user_gesture):
193 2015-05-22 Jon Lee <jonlee@apple.com>
195 Rename MediaPlaybackRequiresUserGesture
196 https://bugs.webkit.org/show_bug.cgi?id=145314
198 Reviewed by Anders Carlsson.
200 In preparation for an API rename, update internal symbols from mediaPlaybackRequiresUserGesture
201 to requiresUserGestureForMediaPlayback.
203 No changes are being made to the API in this patch.
205 * Shared/WebPreferencesDefinitions.h: Update the name of the macro and the setting.
206 * UIProcess/API/C/WKPreferences.cpp: The C API will not change in a future patch.
207 (WKPreferencesSetMediaPlaybackRequiresUserGesture): Update the call to preferences.
208 (WKPreferencesGetMediaPlaybackRequiresUserGesture): Ditto.
209 * UIProcess/API/Cocoa/WKWebView.mm:
210 (-[WKWebView initWithFrame:configuration:]): Update the name of the key.
211 * WebProcess/WebPage/WebPage.cpp:
212 (WebKit::WebPage::updatePreferences): Ditto.
214 2015-05-22 Commit Queue <commit-queue@webkit.org>
216 Unreviewed, rolling out r183647.
217 https://bugs.webkit.org/show_bug.cgi?id=145326
219 broke some toolbar blurring behavior (Requested by thorton on
224 "Asynchronous (or timed-out synchronous) resize flashes white
225 instead of page background color"
226 https://bugs.webkit.org/show_bug.cgi?id=144468
227 http://trac.webkit.org/changeset/183647
229 2015-05-22 Yongjun Zhang <yongjun_zhang@apple.com>
231 Image link doesn't create a preview view controller.
232 https://bugs.webkit.org/show_bug.cgi?id=145320
234 Also try to create the preview view controller if the hit-tested node
237 Reviewed by Beth Dakin.
239 * UIProcess/ios/WKContentViewInteraction.mm:
240 (-[WKContentView gestureRecognizerShouldBegin:]):
241 (-[WKContentView previewViewControllerForPosition:inSourceView:]):
243 2015-05-22 Tim Horton <timothy_horton@apple.com>
245 Avoid doing an extra layout in some cases while doing scale-to-fit
246 https://bugs.webkit.org/show_bug.cgi?id=145321
247 <rdar://problem/21051165>
249 Reviewed by Beth Dakin.
251 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
252 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
253 (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
254 If we make it to scaleViewToFitDocumentIfNeeded with valid layout,
255 the view width is still less than the last-known minimum document size,
256 and the document size hasn't changed, update the view scale without
257 doing an extra layout, keeping the fixed layout size at the previously
258 computed minimum document size.
260 2015-05-22 Beth Dakin <bdakin@apple.com>
262 Yellow highlight and DD popover don't go away when scrolling an iframe
263 https://bugs.webkit.org/show_bug.cgi?id=145312
265 rdar://problem/19692334
267 Reviewed by Tim Horton.
269 Match what Lookup already does for their popover and dismiss our popovers on
271 * UIProcess/API/mac/WKView.mm:
272 (-[WKView scrollWheel:]):
274 This should not be needed anymore.
275 * UIProcess/WebPageProxy.cpp:
276 (WebKit::WebPageProxy::pageDidScroll):
278 2015-05-22 Tim Horton <timothy_horton@apple.com>
280 Remove action menu support
281 https://bugs.webkit.org/show_bug.cgi?id=145305
282 <rdar://problem/21070771>
284 Reviewed by Anders Carlsson.
286 * Configurations/WebKit.xcconfig:
287 * Shared/API/c/WKActionMenuItemTypes.h:
288 * Shared/API/c/WKActionMenuTypes.h:
289 * UIProcess/API/Cocoa/WKViewPrivate.h:
290 * UIProcess/API/mac/WKView.mm:
291 (-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
292 (-[WKView dealloc]): Deleted.
293 (-[WKView mouseDown:]): Deleted.
294 (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
295 (-[WKView prepareForMenu:withEvent:]): Deleted.
296 (-[WKView willOpenMenu:withEvent:]): Deleted.
297 (-[WKView didCloseMenu:withEvent:]): Deleted.
298 (-[WKView _didPerformActionMenuHitTest:forImmediateAction:contentPreventsDefault:userData:]): Deleted.
299 (-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:]): Deleted.
300 (-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:userData:]): Deleted.
301 * UIProcess/API/mac/WKViewInternal.h:
302 * UIProcess/PageClient.h:
303 * UIProcess/WebPageProxy.cpp:
304 (WebKit::WebPageProxy::performImmediateActionHitTestAtLocation):
305 (WebKit::WebPageProxy::didPerformImmediateActionHitTest):
306 (WebKit::WebPageProxy::performActionMenuHitTestAtLocation): Deleted.
307 (WebKit::WebPageProxy::selectLastActionMenuRange): Deleted.
308 (WebKit::WebPageProxy::focusAndSelectLastActionMenuHitTestResult): Deleted.
309 (WebKit::WebPageProxy::didPerformActionMenuHitTest): Deleted.
310 * UIProcess/WebPageProxy.h:
311 * UIProcess/WebPageProxy.messages.in:
312 * UIProcess/mac/PageClientImpl.h:
313 * UIProcess/mac/PageClientImpl.mm:
314 (WebKit::PageClientImpl::didPerformImmediateActionHitTest):
315 (WebKit::PageClientImpl::didPerformActionMenuHitTest): Deleted.
316 * UIProcess/mac/WKActionMenuController.h: Removed.
317 * UIProcess/mac/WKActionMenuController.mm: Removed.
318 * UIProcess/mac/WKImmediateActionController.h:
319 * UIProcess/mac/WKImmediateActionController.mm:
320 (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
321 (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
322 (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
323 (-[WKImmediateActionController didPerformActionMenuHitTest:contentPreventsDefault:userData:]): Deleted.
324 * WebKit2.xcodeproj/project.pbxproj:
325 * WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h:
326 (API::InjectedBundle::PageContextMenuClient::prepareForImmediateAction):
327 (API::InjectedBundle::PageContextMenuClient::prepareForActionMenu): Deleted.
328 * WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
329 * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
330 * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
331 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
332 (WebKit::InjectedBundlePageContextMenuClient::prepareForImmediateAction):
333 (WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu): Deleted.
334 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
335 * WebProcess/WebPage/WebPage.h:
336 * WebProcess/WebPage/WebPage.messages.in:
337 * WebProcess/WebPage/WebPageOverlay.cpp:
338 (WebKit::WebPageOverlay::actionContextForResultAtPoint):
339 * WebProcess/WebPage/WebPageOverlay.h:
340 (WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
341 * WebProcess/WebPage/mac/WebPageMac.mm:
342 (WebKit::textIndicatorTransitionForImmediateAction):
343 (WebKit::WebPage::performImmediateActionHitTestAtLocation):
344 (WebKit::textIndicatorTransitionForActionMenu): Deleted.
345 (WebKit::WebPage::performActionMenuHitTestAtLocation): Deleted.
346 (WebKit::WebPage::selectLastActionMenuRange): Deleted.
347 (WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult): Deleted.
348 Remove everything, except some enums that clients still refer to.
349 Also, leave SPI that used to be shared between immediate actions and
350 action menus intact, even if it had "action menu" in the name. We can
351 deprecate and rename in another patch... except for the very recently-added
352 support from r184106, which we'll revert entirely, removing WKBundlePageOverlayV2,
353 which was not adopted by any clients.
355 2015-05-22 Brady Eidson <beidson@apple.com>
357 Rework how the ResourceRequest user initiated property key is used.
358 Followup to https://bugs.webkit.org/show_bug.cgi?id=145281
360 Reviewed by Dan Bernstein.
362 * Shared/API/Cocoa/_WKNSURLRequestExtras.mm:
363 (-[NSURLRequest _web_isUserInitiated]):
364 (-[NSMutableURLRequest _web_setIsUserInitiated:]):
366 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
367 (WKResourceRequestIsUserInitiatedKey): Deleted.
368 (InitWebCoreSystemInterface): Deleted.
370 2015-05-21 Gavin Barraclough <barraclough@apple.com>
372 Networking process sometimes suspended while WebContent runnable
373 https://bugs.webkit.org/show_bug.cgi?id=145291
374 <rdar://problem/21033029>
376 Reviewed by Andreas Kling.
378 There is an asymmetry in how the Networking process suspension is managed.
379 We drop the assertion (& suspend the process) whenever the WebProcess says
380 it is ready to suspend, but we only take the assertion (& resume execution)
381 when the WebContent process is actually resumed. This leaves a race – where
382 the WebContent process was willing to be suspended, but the UI app changed
383 its mind suspending it. Since the WebContent process never actually suspended
384 (we only prepared it to), we never send a resume, and since we never resume,
385 we never wake the Networking process.
387 The fix is pretty clean. A web process should take a token on the networking
388 process precisely whenever it holds an assertion on the web content process.
389 This also enables a nice refinement, that when holding a BG assertion on the
390 WebContent process we only need to hold a BG assertion on the networking
393 * UIProcess/Network/NetworkProcessProxy.cpp:
394 (WebKit::NetworkProcessProxy::didSetAssertionState):
396 * UIProcess/Network/NetworkProcessProxy.h:
397 - added didSetAssertionState.
398 * UIProcess/ProcessThrottler.cpp:
399 (WebKit::ProcessThrottler::updateAssertionNow):
400 (WebKit::ProcessThrottler::updateAssertion):
401 (WebKit::ProcessThrottler::didConnectToProcess):
402 - whenever taking/updating the assertion, inform the client via didSetAssertionState.
403 * UIProcess/ProcessThrottlerClient.h:
404 - added didSetAssertionState.
405 * UIProcess/WebProcessProxy.cpp:
406 (WebKit::WebProcessProxy::didFinishLaunching):
407 removed initializeNetworkProcessActivityToken - this is taken via ProcessThrottler::didConnectToProcess.
408 (WebKit::WebProcessProxy::sendProcessDidResume):
409 - removed call to initializeNetworkProcessActivityToken - updated via didSetAssertionState.
410 (WebKit::WebProcessProxy::processReadyToSuspend):
411 - removed update of m_tokenForNetworkProcess - updated via didSetAssertionState.
412 (WebKit::WebProcessProxy::didSetAssertionState):
413 - update m_backgroundTokenForNetworkProcess/m_foregroundTokenForNetworkProcess.
414 (WebKit::WebProcessProxy::initializeNetworkProcessActivityToken): Deleted.
415 - updated via didSetAssertionState.
416 * UIProcess/WebProcessProxy.h:
417 - added didSetAssertionState, added separate FG/BG activity tokens for Networking process.
419 2015-05-22 Dan Bernstein <mitz@apple.com>
421 Fixed the fix for <rdar://problem/20830673> Symlink the WebKit dylib instead of just the framework directory
422 https://bugs.webkit.org/show_bug.cgi?id=145287
424 Reviewed by Anders Carlsson.
426 * WebKit2.xcodeproj/project.pbxproj: Give the symlink the correct destination.
428 2015-05-21 Brady Eidson <beidson@apple.com>
430 Add an "initiated by user gesture" flag to ResourceRequest.
431 https://bugs.webkit.org/show_bug.cgi?id=145281
433 Reviewed by Alex Christensen.
435 Expose a new category on NSURLRequest to allow SPI clients to easily set/get the flag:
436 * Shared/API/Cocoa/_WKNSURLRequestExtras.h: Added.
437 * Shared/API/Cocoa/_WKNSURLRequestExtras.mm: Added.
438 (-[NSURLRequest _web_isUserInitiated]):
439 (-[NSMutableURLRequest _web_setIsUserInitiated:]):
441 * WebKit2.xcodeproj/project.pbxproj:
443 Expose the new property key to WebCore:
444 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
445 (WKResourceRequestIsUserInitiatedKey):
446 (InitWebCoreSystemInterface):
448 2015-05-21 Daniel Bates <dabates@apple.com>
450 Rollout <http://trac.webkit.org/changeset/183909>
451 (https://bugs.webkit.org/show_bug.cgi?id=144657)
453 Revert <http://trac.webkit.org/changeset/183909> since pausing the database
454 thread prevents in-progress transactions from completing. We need to think
455 about this change some more.
457 * UIProcess/WebPageProxy.h:
458 * UIProcess/ios/WKContentView.mm:
459 (-[WKContentView _applicationDidEnterBackground:]): Deleted.
460 * UIProcess/ios/WebPageProxyIOS.mm:
461 (WebKit::WebPageProxy::applicationDidEnterBackground): Deleted.
462 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
463 (WebKit::WebDatabaseManager::setPauseAllDatabases): Deleted.
464 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
465 * WebProcess/WebPage/WebPage.h:
466 * WebProcess/WebPage/WebPage.messages.in:
467 * WebProcess/WebPage/ios/WebPageIOS.mm:
468 (WebKit::WebPage::applicationWillEnterForeground): Deleted.
469 (WebKit::WebPage::applicationDidEnterBackground): Deleted.
471 2015-05-21 Enrica Casucci <enrica@apple.com>
473 [iOS] Crash when taking a snapshot of a large PDF.
474 https://bugs.webkit.org/show_bug.cgi?id=145286
475 rdar://problem/20892362
477 Reviewed by Tim Horton.
479 The code for the PDF case was incorrectly computing the snapshot rect.
480 On top of that drawViewHierarchyInRect was ignoring the rect and
481 always creating an image using the view bounds causing the crash.
482 We are now always using the IOSurface if we are parented or
483 an image context when we are not.
485 * UIProcess/API/Cocoa/WKWebView.mm:
486 (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
488 2015-05-21 Anders Carlsson <andersca@apple.com>
490 Symlink the WebKit dylib instead of just the framework directory
491 https://bugs.webkit.org/show_bug.cgi?id=145287
492 rdar://problem/20830673
494 Reviewed by Dan Bernstein.
496 * WebKit2.xcodeproj/project.pbxproj:
498 2015-05-21 Anders Carlsson <andersca@apple.com>
500 WKWebsiteDataStore doesn't track and remove iOS Safari's offline application cache entries
501 https://bugs.webkit.org/show_bug.cgi?id=145279
502 rdar://problem/20657912
504 Reviewed by Dan Bernstein.
506 Special-case iOS Safari and WebApp when computing the default application cache directory.
508 * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
509 (API::applicationCacheDirectory):
510 (API::WebsiteDataStore::defaultDataStoreConfiguration):
512 2015-05-21 Brian Weinstein <bweinstein@apple.com>
514 Add a _WKWebKitContentExtensionStore initializer that takes a path.
515 https://bugs.webkit.org/show_bug.cgi?id=145269 and work towards <rdar://problem/21031414>
517 Reviewed by Anders Carlsson.
519 * UIProcess/API/APIUserContentExtensionStore.cpp:
520 (API::UserContentExtensionStore::storeWithPath):
521 * UIProcess/API/APIUserContentExtensionStore.h:
522 * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
523 * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
524 (+[_WKUserContentExtensionStore storeWithURL:]):
526 2015-05-21 Alexey Proskuryakov <ap@apple.com>
528 Build fix. Silence some deprecation warnings.
530 * UIProcess/ios/forms/WKFileUploadPanel.mm:
531 (-[WKFileUploadPanel _presentPopoverWithContentViewController:animated:]):
532 * UIProcess/ios/forms/WKFormInputControl.mm:
533 (-[WKDateTimePopover initWithView:datePickerMode:]):
534 * UIProcess/ios/forms/WKFormPopover.h:
535 * UIProcess/ios/forms/WKFormPopover.mm:
536 * UIProcess/ios/forms/WKFormSelectPopover.mm:
537 (-[WKSelectPopover initWithView:hasGroups:]):
539 2015-05-21 Csaba Osztrogonác <ossy@webkit.org>
541 [EFL] Remove an unused private field from EwkPopupMenuItem class
542 https://bugs.webkit.org/show_bug.cgi?id=145249
544 Reviewed by Gyuyoung Kim.
546 * UIProcess/API/efl/ewk_popup_menu.cpp:
547 (EwkPopupMenu::EwkPopupMenu):
548 * UIProcess/API/efl/ewk_popup_menu_private.h:
550 2015-05-21 Csaba Osztrogonác <ossy@webkit.org>
552 [EFL] Fix mismatched-tags warnings in UIProcess/API/efl
553 https://bugs.webkit.org/show_bug.cgi?id=145129
555 Reviewed by Gyuyoung Kim.
557 * UIProcess/API/efl/EwkViewCallbacks.h:
558 * UIProcess/API/efl/ewk_application_cache_manager.h:
559 * UIProcess/API/efl/ewk_auth_request.h:
560 * UIProcess/API/efl/ewk_back_forward_list.h:
561 * UIProcess/API/efl/ewk_back_forward_list_item.h:
562 * UIProcess/API/efl/ewk_color_picker.h:
563 * UIProcess/API/efl/ewk_context.h:
564 * UIProcess/API/efl/ewk_context_menu_item.h:
565 * UIProcess/API/efl/ewk_cookie_manager.h:
566 * UIProcess/API/efl/ewk_database_manager.h:
567 * UIProcess/API/efl/ewk_download_job.h:
568 * UIProcess/API/efl/ewk_error.h:
569 * UIProcess/API/efl/ewk_favicon_database.h:
570 * UIProcess/API/efl/ewk_file_chooser_request.h:
571 * UIProcess/API/efl/ewk_form_submission_request.h:
572 * UIProcess/API/efl/ewk_navigation_data.h:
573 * UIProcess/API/efl/ewk_navigation_policy_decision.h:
574 * UIProcess/API/efl/ewk_object.h:
575 * UIProcess/API/efl/ewk_page_group.h:
576 * UIProcess/API/efl/ewk_popup_menu.h:
577 * UIProcess/API/efl/ewk_popup_menu_item.h:
578 * UIProcess/API/efl/ewk_security_origin.h:
579 * UIProcess/API/efl/ewk_settings.h:
580 * UIProcess/API/efl/ewk_storage_manager.h:
581 * UIProcess/API/efl/ewk_url_request.h:
582 * UIProcess/API/efl/ewk_url_response.h:
583 * UIProcess/API/efl/ewk_url_scheme_request.h:
584 * UIProcess/API/efl/ewk_view.h:
585 * UIProcess/API/efl/ewk_window_features.h:
586 * WebProcess/InjectedBundle/API/efl/ewk_extension.h:
587 * WebProcess/InjectedBundle/API/efl/ewk_page.h:
589 2015-05-21 Csaba Osztrogonác <ossy@webkit.org>
591 Fix mismatched-tags warnings related to CoordinatedGraphics
592 https://bugs.webkit.org/show_bug.cgi?id=145130
594 Reviewed by Darin Adler.
596 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
597 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
598 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
600 2015-05-20 Gyuyoung Kim <gyuyoung.kim@webkit.org>
602 Unreviewed GTK build fix since r184686.
604 * UIProcess/gtk/WebProcessPoolGtk.cpp:
605 (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Add *legacy* prefix.
606 (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory): Deleted.
608 2015-05-20 Gyuyoung Kim <gyuyoung.kim@webkit.org>
610 Unreviewed EFL build fix since r184686.
612 * UIProcess/efl/WebProcessPoolEfl.cpp:
613 (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Add *legacy* prefix.
614 (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory): Deleted.
616 2015-05-20 Chris Dumez <cdumez@apple.com>
618 [WK2][iOS] Update WebContent process sandbox profile for AWD logging
619 https://bugs.webkit.org/show_bug.cgi?id=145229
620 <rdar://problem/20543269>
622 Reviewed by Alexey Proskuryakov.
624 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
626 2015-05-20 Gavin Barraclough <barraclough@apple.com>
628 dispatchViewStateChange should not wait for sync reply if the page isn't visible
629 https://bugs.webkit.org/show_bug.cgi?id=145242
630 <rdar://problem/20967937>
632 Reviewed by Ben Poulain.
634 This is particularly problematic on iOS, since if the page isn't visible the process is likely suspended.
637 * UIProcess/WebPageProxy.cpp:
638 (WebKit::WebPageProxy::dispatchViewStateChange):
639 (WebKit::WebPageProxy::waitForDidUpdateViewState):
641 2015-05-20 Marcos Chavarría Teijeiro <mchavarria@igalia.com>
643 Enable disk cache for range requests
644 https://bugs.webkit.org/show_bug.cgi?id=144682
646 Reviewed by Antti Koivisto.
648 Add Range header value to the network cache key constructor so we take
649 into account this value. The 206 response code is also marked to be cached.
651 * NetworkProcess/cache/NetworkCache.cpp:
652 (WebKit::NetworkCache::makeCacheKey):
653 (WebKit::NetworkCache::isStatusCodeCacheableByDefault):
654 * NetworkProcess/cache/NetworkCacheKey.cpp:
655 (WebKit::NetworkCache::Key::Key):
656 (WebKit::NetworkCache::Key::operator=):
657 (WebKit::NetworkCache::Key::computeHash):
658 (WebKit::NetworkCache::Key::operator==):
659 (WebKit::NetworkCache::Key::encode):
660 (WebKit::NetworkCache::Key::decode):
661 (WebKit::NetworkCache::Key::stringToHash): Deleted.
662 * NetworkProcess/cache/NetworkCacheKey.h:
664 2015-05-20 Anders Carlsson <andersca@apple.com>
666 WKWebsiteDataStore API doesn't report webkit.org as using Databases or App Cache after visiting http://www.webkit.org/demos/sticky-notes/
667 https://bugs.webkit.org/show_bug.cgi?id=145238
668 rdar://problem/20581175
670 Reviewed by Tim Horton.
672 Make sure to set the application cache and WebSQL directories when using the legacy data store.
674 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
675 (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
676 (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory):
677 Rename this and move it to the right place.
679 * UIProcess/WebProcessPool.cpp:
680 (WebKit::legacyWebsiteDataStoreConfiguration):
681 Rename this and add the application cache and WebSQL directories.
683 (WebKit::WebProcessPool::WebProcessPool):
684 Call legacyWebsiteDataStoreConfiguration.
686 (WebKit::WebProcessPool::applicationCacheDirectory):
687 Call legacyPlatformDefaultApplicationCacheDirectory.
689 * UIProcess/WebProcessPool.h:
691 2015-05-20 Enrica Casucci <enrica@apple.com>
693 [iOS] Using CSS viewport units causes incorrect layout.
694 https://bugs.webkit.org/show_bug.cgi?id=145225
695 rdar://problem/20924495
697 Reviewed by Benjamin Poulain.
699 * WebProcess/WebPage/ios/WebPageIOS.mm:
700 (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
702 2015-05-20 Tim Horton <timothy_horton@apple.com>
704 Allow overriding the waitForDidUpdateViewState timeout
705 https://bugs.webkit.org/show_bug.cgi?id=145230
706 <rdar://problem/20990162>
708 Reviewed by Darin Adler.
710 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
711 (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
712 Use the value from NSUserDefaults, if it exists.
713 We'll only check once, so changing the default requires a restart of the UI process.
715 2015-05-20 Anders Carlsson <andersca@apple.com>
717 Make sure we always have a process pool to perform data store operations with
718 https://bugs.webkit.org/show_bug.cgi?id=145231
719 rdar://problem/20618248
721 Reviewed by Tim Horton.
723 Make sure that we always return a process pool. If we're a legacy C SPI per-context data store,
724 find the process pool we're a part of and use that. Otherwise, create a new one.
726 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
727 (WebKit::WebsiteDataStore::processPools):
729 2015-05-19 Jer Noble <jer.noble@apple.com>
731 Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild.
732 https://bugs.webkit.org/show_bug.cgi?id=145193
734 Reviewed by Eric Carlson.
736 Use HTMLMediaElementEnums instead of HTMLMediaElement.
738 * UIProcess/API/Cocoa/WKWebView.mm:
739 (-[WKWebView _isShowingVideoOptimized]): HTMLMediaElement -> HTMLMediaElementEnums.
740 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
741 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
742 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
743 (WebKit::WebVideoFullscreenManagerProxy::hasMode): Ditto.
744 (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged): Ditto.
745 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.
746 (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged): Ditto.
747 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
748 (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Ditto.
749 * WebProcess/WebCoreSupport/WebChromeClient.h:
750 * WebProcess/ios/WebVideoFullscreenManager.h:
751 (WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode): Ditto.
752 (WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode): Ditto.
753 * WebProcess/ios/WebVideoFullscreenManager.messages.in:
754 * WebProcess/ios/WebVideoFullscreenManager.mm:
755 (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
756 (WebKit::WebVideoFullscreenManager::fullscreenModeChanged): Ditto.
757 (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.
759 2015-05-20 Anders Carlsson <andersca@apple.com>
761 Refactor process pool enumeration code in WebsiteDataStore
762 https://bugs.webkit.org/show_bug.cgi?id=145218
764 Reviewed by Tim Horton.
766 Also make sure to keep the WebProcessPool objects alive for the duration of the various data store
767 operations. This is the first step towards having the data store create a single process pool lazily if
768 there are no web views associated with the data store.
770 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
771 (WebKit::WebsiteDataStore::fetchData):
772 (WebKit::WebsiteDataStore::removeData):
773 (WebKit::WebsiteDataStore::processPools):
774 * UIProcess/WebsiteData/WebsiteDataStore.h:
776 2015-05-20 Alex Christensen <achristensen@webkit.org>
778 [Content Extensions] Relax restrictions on triggers that match everything.
779 https://bugs.webkit.org/show_bug.cgi?id=145069
781 Reviewed by Benjamin Poulain.
783 * UIProcess/API/APIUserContentExtensionStore.h:
784 Increment version number to reflect changes in DFABytecode.
786 2015-05-20 Sungmann Cho <sungmann.cho@navercorp.com>
788 Minor cleanups to PluginProcessProxy.
789 https://bugs.webkit.org/show_bug.cgi?id=145199
791 Reviewed by Anders Carlsson.
793 1. Remove unnecessary forward declaration.
794 2. Remove unnecessary #include.
796 * UIProcess/Plugins/PluginProcessProxy.cpp:
797 * UIProcess/Plugins/PluginProcessProxy.h:
799 2015-05-20 Marcos Chavarría Teijeiro <mchavarria@igalia.com>
801 [GTK] Add some documentation to WebKitWebExtension
802 https://bugs.webkit.org/show_bug.cgi?id=142786
804 Reviewed by Carlos Garcia Campos.
806 WebKitWebExtension API documentation lacks of some details and the information
807 available is in some contributors blog posts. I add the section
808 documentation with a small guide about how to use WebExtensions.
810 The code examples were taken from Carlos García and Adrián Pérez blog
813 * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
815 2015-05-20 Sungmann Cho <sungmann.cho@navercorp.com>
817 Rename WebsiteDataStore::isNonPersistent() to WebsiteDataStore::isPersistent().
818 https://bugs.webkit.org/show_bug.cgi?id=145111
820 Reviewed by Darin Adler.
822 This is a follow up to https://bugs.webkit.org/show_bug.cgi?id=144158.
824 * UIProcess/API/APIWebsiteDataStore.cpp:
825 (API::WebsiteDataStore::isPersistent):
826 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
827 (WebKit::WebsiteDataStore::fetchData):
828 (WebKit::WebsiteDataStore::removeData):
829 * UIProcess/WebsiteData/WebsiteDataStore.h:
830 (WebKit::WebsiteDataStore::isPersistent):
831 (WebKit::WebsiteDataStore::isNonPersistent): Deleted.
833 2015-05-20 Hyungwook Lee <hyungwook.lee@navercorp.com>
835 [EFL] Fix build failure, linker does not find libXext.
836 https://bugs.webkit.org/show_bug.cgi?id=144100
838 Reviewed by Gyuyoung Kim.
840 Move Xext library from WebProcess_LIBRARIES to WebKit2_LIBRARIES.
844 2015-05-19 Carlos Garcia Campos <cgarcia@igalia.com>
846 [SOUP] Network Cache: Implement ShareableResource for Soup and enable it for GTK platform
847 https://bugs.webkit.org/show_bug.cgi?id=144380
849 Reviewed by Antti Koivisto.
851 It improves the network cache performance, by mmaping big
852 resources and sending only the file descriptor to the web process
853 instead of the actual file data. It needs some changes in
854 cross-platform code, because we can't use the same approach as
855 mac (it uses a platform specific implementation not available in
858 * NetworkProcess/cache/NetworkCache.cpp:
859 (WebKit::NetworkCache::Cache::store): Use
860 Data::tryCreateSharedMemory() to create the shared memory used by
861 the ShareableResource. Also add an ASSERT instead of checking the
862 shareable resource created is not nullptr, because the
863 ShareableResource::create() that receives a shared memory should
864 never return nullptr.
865 * NetworkProcess/cache/NetworkCacheData.h:
866 * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
867 (WebKit::NetworkCache::Data::tryCreateSharedMemory):
868 * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
869 (WebKit::NetworkCache::Data::tryCreateSharedMemory): Create a
870 SharedMemory object to wrap the mapped file, but keeping the ownership.
871 * NetworkProcess/cache/NetworkCacheEntry.cpp:
872 (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
873 Use Data::tryCreateSharedMemory() to create the shared memory used
874 bythe ShareableResource. Also add an ASSERT instead of checking
875 the shareable resource created is not nullptr, because the
876 ShareableResource::create() that receives a shared memory should
877 never return nullptr.
878 * Platform/SharedMemory.h:
879 * Platform/unix/SharedMemoryUnix.cpp:
880 (WebKit::SharedMemory::map): Use wrapMap() and initialize
881 m_isWrappingMap to false.
882 (WebKit::SharedMemory::wrapMap): Create a SharedMemory object for
883 the given map, without taking its ownership.
884 (WebKit::SharedMemory::~SharedMemory): Do not unmap and close the
885 file descriptor if m_isWrappingMap is true.
886 * Shared/ShareableResource.cpp:
887 (WebKit::createShareableResourceDeallocator):
888 (WebKit::ShareableResource::wrapInSharedBuffer): Create a SharedBuffer
889 wrapping the ShareableResource data.
890 (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer): Create
891 a ShareableResource for the handle and create a SharedBuffer
893 * Shared/ShareableResource.h:
894 * WebKit2Prefix.h: Enable ENABLE_SHAREABLE_RESOURCE for GTK.
895 * WebProcess/Network/WebResourceLoader.cpp:
896 (WebKit::WebResourceLoader::didReceiveResource): Get the CFData
897 from the SharedBuffer for QuickLook instead of wrapping the handle again.
899 2015-05-19 Carlos Garcia Campos <cgarcia@igalia.com>
901 [SOUP] Network Cache: Disable network cache efficacy logging
902 https://bugs.webkit.org/show_bug.cgi?id=145172
904 Reviewed by Martin Robinson.
906 Disable network cache efficacy logging by default, since we are
907 not currently using the collected data.
909 * UIProcess/soup/WebProcessPoolSoup.cpp:
910 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
912 2015-05-19 Michael Saboff <msaboff@apple.com>
914 REGRESSION(183787): JIT is enabled for all builds
915 https://bugs.webkit.org/show_bug.cgi?id=145179
917 Reviewed by Geoffrey Garen.
919 Eliminated the setting of ENABLE_JIT, as wtf/Platform.h has appropriate logic to
920 set it depending on OS and CPU type.
922 * Configurations/FeatureDefines.xcconfig:
924 2015-05-19 Brady Eidson <beidson@apple.com>
926 X-Frame-Options headers not respected when loading from application cache.
927 <rdar://problem/14877623> and https://bugs.webkit.org/show_bug.cgi?id=131800
929 Reviewed by Alexey Proskuryakov.
931 * WebProcess/WebPage/WebPage.cpp:
932 (WebKit::WebPage::loadDataImpl):
934 2015-05-19 Sungmann Cho <sungmann.cho@navercorp.com>
936 Add PLUGIN_ARCHITECTURE(MAC) around WKNVCALayerRenderServerPort in NetscapeBrowserFunc.h.
937 https://bugs.webkit.org/show_bug.cgi?id=145173
939 Reviewed by Anders Carlsson.
941 WKNVCALayerRenderServerPort in NetscapeBrowserFunc.h is meaningful only for Mac.
942 So we need to add PLUGIN_ARCHITECTURE(MAC) around it.
944 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h:
946 2015-05-19 Brent Fulgham <bfulgham@apple.com>
948 REGRESSION(142590): Part 2: Scroll-snap points are improperly snapping to earlier index values (Scrolling Thread)
949 https://bugs.webkit.org/show_bug.cgi?id=145175
950 <rdar://problem/21023785>
952 Reviewed by Beth Dakin.
954 Add a stub implementation of isScrollSnapInProgress to match ScrollingCoordinator signature.
956 * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
957 * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
958 (WebKit::RemoteScrollingCoordinator::isScrollSnapInProgress): Added stub.
960 2015-05-19 Jeremy Jones <jeremyj@apple.com>
962 WebVideoFullscreenManagerProxy has incorrect OS_VERSION_MIN_REQUIRED conditionals.
963 https://bugs.webkit.org/show_bug.cgi?id=145158
965 Reviewed by Eric Carlson.
967 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
968 (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
970 2015-05-19 Ting-Wei Lan <lantw44@gmail.com>
972 [SOUP] Use st_birthtime to get creation time of files on systems support it
973 https://bugs.webkit.org/show_bug.cgi?id=144989
975 Reviewed by Carlos Garcia Campos.
977 FreeBSD and NetBSD have either st_birthtime field or compatiblity macro
978 with the same name in stat. It is better to use it instead of manually
979 setting xattr, which is unreliable because both operating systems and
980 file systems support are required.
982 * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
983 (WebKit::NetworkCache::fileTimes):
984 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
985 (WebKit::NetworkCache::IOChannel::IOChannel):
987 2015-05-19 Chris Dumez <cdumez@apple.com>
989 Mark static variables as const when possible
990 https://bugs.webkit.org/show_bug.cgi?id=145161
992 Reviewed by Andreas Kling.
994 * Platform/IPC/MessageEncoder.cpp:
995 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
996 (WebKit::networkProcessLatencyQOS):
997 (WebKit::networkProcessThroughputQOS):
998 (WebKit::webProcessLatencyQOS):
999 (WebKit::webProcessThroughputQOS):
1000 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1001 (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap):
1002 (WebKit::pluginProcessLatencyQOS):
1003 (WebKit::pluginProcessThroughputQOS):
1004 * WebProcess/WebPage/WebPage.cpp:
1006 2015-05-18 Michael Catanzaro <mcatanzaro@igalia.com>
1008 [CMake] Ignore warnings in system headers
1009 https://bugs.webkit.org/show_bug.cgi?id=144747
1011 Reviewed by Darin Adler.
1013 Separate include directories into WebKit project includes and system includes. Suppress all
1014 warnings from headers in system include directories using the SYSTEM argument to
1015 the include_directories command.
1018 * PlatformEfl.cmake:
1019 * PlatformGTK.cmake:
1021 2015-05-18 Csaba Osztrogonác <ossy@webkit.org>
1023 Fix return-type warnings in test_ewk2_color_picker.cpp
1024 https://bugs.webkit.org/show_bug.cgi?id=145122
1026 Reviewed by Gyuyoung Kim.
1028 * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
1029 (EWK2ColorPickerTest::hideColorPicker):
1030 (EWK2ColorPickerTest::hideColorPickerByRemovingElement):
1032 2015-05-18 Skachkov Alexandr <gskachkov@gmail.com>
1034 [ES6] Arrow function syntax. Feature flag for arrow function
1035 https://bugs.webkit.org/show_bug.cgi?id=145108
1037 Reviewed by Ryosuke Niwa.
1039 Added feature flag ENABLE_ES6_ARROWFUNCTION_SYNTAX for arrow function
1041 * Configurations/FeatureDefines.xcconfig:
1043 2015-05-18 Anders Carlsson <andersca@apple.com>
1045 WKWebsiteDataStore should fully support session storage
1046 https://bugs.webkit.org/show_bug.cgi?id=145145
1047 rdar://problem/10690447
1049 Reviewed by Sam Weinig.
1051 Add a session store data type and handle it when clearing and fetching data.
1053 * Shared/WebsiteData/WebsiteDataTypes.h:
1054 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1055 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
1056 (dataTypesToString):
1057 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
1058 (WebKit::toWebsiteDataTypes):
1059 (WebKit::toWKWebsiteDataTypes):
1060 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1061 (+[WKWebsiteDataStore allWebsiteDataTypes]):
1062 * UIProcess/Storage/StorageManager.cpp:
1063 (WebKit::StorageManager::SessionStorageNamespace::origins):
1064 (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
1065 (WebKit::StorageManager::SessionStorageNamespace::clearAllStorageAreas):
1066 (WebKit::StorageManager::getSessionStorageOrigins):
1067 (WebKit::StorageManager::deleteSessionStorageOrigins):
1068 (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
1069 * UIProcess/Storage/StorageManager.h:
1070 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1071 (WebKit::WebsiteDataStore::fetchData):
1072 (WebKit::WebsiteDataStore::removeData):
1074 2015-05-18 Brady Eidson <beidson@apple.com>
1076 Followup to: Networking process on iOS can be suspended and never exit
1077 https://bugs.webkit.org/show_bug.cgi?id=144971.
1079 Unreviewed. Fixing API tests that revealed the unintentional change in behavior.
1081 * Shared/ChildProcessProxy.cpp:
1082 (WebKit::ChildProcessProxy::shutDownProcess): The on WebProcessProxy code path that this
1083 was adopted from had an m_connection null check, and that null check needs to remain.
1085 2015-05-18 Csaba Osztrogonác <ossy@webkit.org>
1087 [GTK] URTBF after r184503.
1089 * PlatformGTK.cmake:
1091 2015-05-18 Brady Eidson <beidson@apple.com>
1093 Networking process on iOS can be suspended and never exit.
1094 <rdar://problem/20368630> and https://bugs.webkit.org/show_bug.cgi?id=144971
1096 Reviewed by Darin Adler.
1098 There's a few issues here.
1100 1 - When the NetworkProcessProxy goes away, it takes its process assertion with it. This causes
1101 the Network process to suspend indefinitely, unable to ever respond to IPC::Connection callbacks.
1102 We already solved this with WebProcess with a watchdog timer keeping both the process assertion
1103 and xpc_connection alive while the process shuts down. This patch expands that to the network
1104 process, and it will be easy to expand that to database and plugin processes doing forward.
1106 2 - All of our child processes either decide to self-terminate or listen for their connection to
1107 close at which point they terminate. This leads to various races. We should
1108 move to a model where the UI process explicitly tells them to shutdown, and this patch starts us
1112 * DerivedSources.make:
1113 * WebKit2.xcodeproj/project.pbxproj:
1115 * NetworkProcess/NetworkProcess.cpp:
1116 (WebKit::NetworkProcess::didReceiveMessage): Send ChildProcess messages to ChildProcess.
1118 * Shared/ChildProcess.cpp:
1119 (WebKit::ChildProcess::shutDown): For now, just terminate the process. In the future have the
1120 process do cleanup work before it is terminated.
1121 * Shared/ChildProcess.h:
1122 * Shared/ChildProcess.messages.in: Added.
1124 * Shared/ChildProcessProxy.cpp:
1125 (WebKit::ChildProcessProxy::shutDownProcess): Set a watchdog and - if possible - explicitly message
1126 the process to ShutDown.
1127 (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded): Deleted.
1128 * Shared/ChildProcessProxy.h:
1130 * UIProcess/WebProcessPool.cpp:
1131 (WebKit::WebProcessPool::~WebProcessPool): Explicitly tell the network process to shut down.
1133 * UIProcess/WebProcessProxy.cpp:
1134 (WebKit::WebProcessProxy::removeWebPage): Move abortProcessLaunchIfNeeded() and the watchdog timer
1135 code to ChildProcessProxy::shutDownProcess.
1137 * WebProcess/WebProcess.cpp:
1138 (WebKit::WebProcess::didReceiveMessage): Send ChildProcess messages to ChildProcess::didReceiveMessage.
1140 2015-05-17 Carlos Garcia Campos <cgarcia@igalia.com>
1142 Network Cache: Make Data::adoptMap take the ownership of the file descriptor
1143 https://bugs.webkit.org/show_bug.cgi?id=144950
1145 Reviewed by Antti Koivisto.
1147 It will be required to implement ShareableResource for soup
1148 network backend. Also move the common code of Data to a common
1149 file and add mapToFile(). The mapFile version that receives a file
1150 descriptor has been renamed to adoptAndMapFile().
1152 * CMakeLists.txt: Add new file to compilation.
1153 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
1154 (WebKit::NetworkCache::BlobStorage::add): Use mapToFile().
1155 * NetworkProcess/cache/NetworkCacheData.cpp: Added.
1156 (WebKit::NetworkCache::Data::mapToFile): Write the data to the
1157 given file and map it.
1158 (WebKit::NetworkCache::mapFile):
1159 (WebKit::NetworkCache::adoptAndMapFile):
1160 (WebKit::NetworkCache::computeSHA1):
1161 (WebKit::NetworkCache::bytesEqual):
1162 * NetworkProcess/cache/NetworkCacheData.h:
1163 * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
1164 (WebKit::NetworkCache::Data::adoptMap): Close the file descriptor.
1165 * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
1166 (WebKit::NetworkCache::Data::Data): Use a constructor that
1167 receives a file descriptor instead of the one receiving
1168 Backing. If the file descriptor is not -1 then the Data is a map.
1169 (WebKit::NetworkCache::MapWrapper::~MapWrapper): Also close the
1171 (WebKit::NetworkCache::Data::adoptMap): Pass the file descriptor
1172 to the MapWrapper and create the Data passing the file descriptor.
1173 * UIProcess/API/APIUserContentExtensionStore.cpp:
1174 (API::openAndMapContentExtension): Use mapFile that receives a
1176 (API::compiledToFile): Use adoptAndMapFile() and don't close the
1179 2015-05-16 Andy Estes <aestes@apple.com>
1181 [iOS] WKPDFView should not follow javascript: links
1182 https://bugs.webkit.org/show_bug.cgi?id=145101
1184 Reviewed by Dan Bernstein.
1186 * UIProcess/WebPageProxy.cpp:
1187 (WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick): Returned early if url's protocol is javascript:.
1188 (WebKit::WebPageProxy::navigateToURLWithSimulatedClick): Renamed to navigateToPDFLinkWithSimulatedClick to
1189 reflect that this function is exclusively for following PDF links.
1190 * UIProcess/WebPageProxy.h:
1191 * UIProcess/ios/WKPDFView.mm:
1192 (-[WKPDFView annotation:wasTouchedAtPoint:controller:]):
1193 (-[WKPDFView actionSheetAssistant:openElementAtLocation:]):
1194 * WebProcess/WebPage/WebPage.cpp:
1195 (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick): Renamed from navigateToURLWithSimulatedClick.
1196 (WebKit::WebPage::navigateToURLWithSimulatedClick): Renamed to navigateToPDFLinkWithSimulatedClick.
1197 * WebProcess/WebPage/WebPage.h:
1198 * WebProcess/WebPage/WebPage.messages.in:
1200 2015-05-16 Brent Fulgham <bfulgham@apple.com>
1202 [iOS] Remote scrolling tree needs to coordinate scroll snap state during resize/rotations
1203 https://bugs.webkit.org/show_bug.cgi?id=145059
1204 <rdar://problem/20975978>
1206 Reviewed by Simon Fraser.
1208 The web view needs to update its scroll snap point offsets to take into account any
1209 adjustments to the view size caused by content insets. We also need to update the
1210 offstes after device rotation.
1212 * UIProcess/API/Cocoa/WKWebView.mm:
1213 (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Retrieve the proper
1214 computed content inset for the view and incorporate into any scroll snap point adjustments.
1215 (-[WKWebView _updateVisibleContentRects]): If we have active scroll snap points,
1216 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1217 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1218 (WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Update to account
1220 (WebKit::RemoteScrollingCoordinatorProxy::shouldSnapForMainFrameScrolling): Also validate that the
1221 active index is valid.
1222 (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Update to track
1223 current active snap offset index.
1224 (WebKit::RemoteScrollingCoordinatorProxy::hasActiveSnapPoint): Added.
1225 (WebKit::RemoteScrollingCoordinatorProxy::nearestActiveSnapPoint): Added. It calculates the proper
1226 scroll position incorporating any snap point and content insets.
1228 2015-05-15 Yongjun Zhang <yongjun_zhang@apple.com>
1230 Don't reset the preview recognizer in [WKContentViewInteraction cleanupInteraction]
1231 https://bugs.webkit.org/show_bug.cgi?id=145081
1233 We shouldn't reset the recognizer in [WKContentViewInteraction cleanupInteraction] since we don't re-add it
1234 back to WKContentView when the process relaunched. Since we already add/remove it when the view is move into/
1235 removed from the window, we don't need reset it in cleanupInteraction.
1237 Reviewed by Dan Bernstein.
1239 * UIProcess/ios/WKContentViewInteraction.mm:
1240 (-[WKContentView cleanupInteraction]):
1242 2015-05-15 James Savage <james.savage@apple.com>
1244 REGRESSION (r181910): WKWebView incorrectly scales snapshot
1245 https://bugs.webkit.org/show_bug.cgi?id=145076
1247 Reviewed by Tim Horton.
1249 We added a fast path to snapshotting using IOSurfaces with
1250 http://trac.webkit.org/changeset/181910 which incorrectly determined
1251 scale and transform and resulted in bad snapshots in some situations.
1253 * UIProcess/API/Cocoa/WKWebView.mm:
1254 (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
1255 When snapshotting an IOSurface we need to compute our scale based off of
1256 the rect in the WKWebView coordinates, we also failed to account for
1257 non-zero origins in the snapshot rect. Remove an unused varible while
1260 2015-05-15 Alex Christensen <achristensen@webkit.org>
1262 [Content Extensions] Fail to load old content extension files
1263 https://bugs.webkit.org/show_bug.cgi?id=145027
1265 Reviewed by Eric Carlson.
1267 * UIProcess/API/APIUserContentExtensionStore.cpp:
1268 (API::openAndMapContentExtension):
1269 * UIProcess/API/APIUserContentExtensionStore.h:
1271 2015-05-15 Jeremy Jones <jeremyj@apple.com>
1273 Limit alternate fullscreen with linked on or after.
1274 https://bugs.webkit.org/show_bug.cgi?id=144894
1276 Reviewed by Dean Jackson.
1278 * UIProcess/API/Cocoa/WKWebView.mm:
1279 (shouldAllowAlternateFullscreen): Added.
1280 (-[WKWebView initWithFrame:configuration:]):
1282 2015-05-15 Chris Dumez <cdumez@apple.com>
1284 [WK2][Cocoa] Back swipe tab snapshot takes a long time to be removed on bing.com
1285 https://bugs.webkit.org/show_bug.cgi?id=145061
1286 <rdar://problem/20939743>
1288 Reviewed by Tim Horton.
1290 When swiping back from a video search result to the list of video
1291 search results on bing.com, the back swipe gesture tab snapshot takes
1292 ~3 seconds to be removed, even though the page gets loaded almost
1293 instantly from PageCache. The tab snapshot should be removed as soon as
1296 The issue is that we only cleared the back swipe gesture tab snapshot
1297 after PageClient::didFinishLoadForMainFrame() has been called. However,
1298 PageClient::didFinishLoadForMainFrame() was only being called by
1299 WebPageProxy if the main frame loaded *without* error. In case the main
1300 frame loaded with an error, only WebPageProxy::didFailLoadForFrame() is
1301 called, not WebPageProxy::didFinishLoadForFrame() and we would fail to
1302 remove the gesture snapshot until the 3 seconds timeout.
1304 This patch calls PageClient::didFinishLoadForMainFrame() from
1305 WebPageProxy::didFailLoadForFrame() so we remove the snapshot in the
1308 The reason didFailLoadForFrame() is being called on bing.com video
1309 search results is because a "ping" load is aborted when the page is
1310 entering PageCache. Aborting any kind of resource load sets a
1311 "cancellation" error on the main document.
1313 * UIProcess/WebPageProxy.cpp:
1314 (WebKit::WebPageProxy::didFailLoadForFrame):
1316 2015-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
1318 REGRESSION(r183861): [SOUP] Downloads are broken when using the Network Process
1319 https://bugs.webkit.org/show_bug.cgi?id=144738
1321 Reviewed by Alexey Proskuryakov.
1323 When converting the main resource handle to a download, the
1324 NetworkResourceLoader is aborted, and the ResourceHandle is
1325 cleaned up aborting the download operation. We need to use a
1326 different ResourceHandle for the download operation.
1328 * Shared/Downloads/soup/DownloadSoup.cpp:
1329 (WebKit::Download::startWithHandle): Use ResourceHandle::releaseForDownload()
1330 instead of reusing the given handle.
1332 2015-05-14 Brady Eidson <beidson@apple.com>
1334 Rename connectionDidClose and related methods to be more clear.
1335 https://bugs.webkit.org/show_bug.cgi?id=145030
1337 Reviewed by Darin Adler.
1339 These methods were easy to confuse with "Connection::Client::didClose()", yet they
1340 were about something much more explicit: A child process being shut down by the UI Process.
1342 Let's call them as such.
1344 * Shared/ChildProcessProxy.cpp:
1345 (WebKit::ChildProcessProxy::shutDownProcess):
1346 (WebKit::ChildProcessProxy::clearConnection): Deleted.
1347 (WebKit::ChildProcessProxy::connectionDidClose): Deleted.
1348 * Shared/ChildProcessProxy.h:
1350 * UIProcess/Databases/DatabaseProcessProxy.cpp:
1351 (WebKit::DatabaseProcessProxy::processWillShutDown):
1352 * UIProcess/Databases/DatabaseProcessProxy.h:
1354 * UIProcess/Network/NetworkProcessProxy.cpp:
1355 (WebKit::NetworkProcessProxy::processWillShutDown):
1356 * UIProcess/Network/NetworkProcessProxy.h:
1358 * UIProcess/Plugins/PluginProcessProxy.cpp:
1359 (WebKit::PluginProcessProxy::processWillShutDown):
1360 * UIProcess/Plugins/PluginProcessProxy.h:
1362 * UIProcess/WebFrameProxy.cpp:
1363 (WebKit::WebFrameProxy::webProcessWillShutDown):
1364 (WebKit::WebFrameProxy::disconnect): Deleted.
1365 * UIProcess/WebFrameProxy.h:
1367 * UIProcess/WebPageProxy.cpp:
1368 (WebKit::WebPageProxy::webProcessWillShutDown):
1369 (WebKit::WebPageProxy::connectionDidClose): Deleted.
1370 * UIProcess/WebPageProxy.h:
1372 * UIProcess/WebProcessLifetimeTracker.cpp:
1373 (WebKit::WebProcessLifetimeTracker::webProcessWillShutDown):
1374 (WebKit::WebProcessLifetimeTracker::connectionDidClose): Deleted.
1375 * UIProcess/WebProcessLifetimeTracker.h:
1377 * UIProcess/WebProcessProxy.cpp:
1378 (WebKit::WebProcessProxy::processWillShutDown):
1379 (WebKit::WebProcessProxy::shutDown):
1380 (WebKit::WebProcessProxy::removeWebPage):
1381 (WebKit::WebProcessProxy::didClose):
1382 (WebKit::WebProcessProxy::disconnectFramesFromPage):
1383 (WebKit::WebProcessProxy::shouldTerminate):
1384 (WebKit::WebProcessProxy::requestTermination):
1385 (WebKit::WebProcessProxy::connectionDidClose): Deleted.
1386 (WebKit::WebProcessProxy::disconnect): Deleted.
1387 * UIProcess/WebProcessProxy.h:
1389 2015-05-14 Zhuo Li <zachli@apple.com>
1391 Some CFNetwork SPI to reset HSTS hosts added since a date should not be used on Yosemite.
1392 https://bugs.webkit.org/show_bug.cgi?id=145025.
1394 rdar://problem/20646308.
1396 Reviewed by Alexey Proskuryakov.
1398 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1399 (WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate):
1401 2015-05-14 Timothy Horton <timothy_horton@apple.com>
1403 Add a layout mode that scales down the view to try to fit the document
1404 https://bugs.webkit.org/show_bug.cgi?id=145022
1405 <rdar://problem/19790341>
1407 Reviewed by Dean Jackson.
1409 * Shared/WebPageCreationParameters.cpp:
1410 (WebKit::WebPageCreationParameters::encode):
1411 (WebKit::WebPageCreationParameters::decode):
1412 * Shared/WebPageCreationParameters.h:
1413 * UIProcess/WebPageProxy.cpp:
1414 (WebKit::WebPageProxy::creationParameters):
1415 (WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
1416 * UIProcess/WebPageProxy.h:
1417 * WebProcess/WebPage/DrawingArea.h:
1418 (WebKit::DrawingArea::setShouldScaleViewToFitDocument):
1419 * WebProcess/WebPage/WebPage.cpp:
1420 (WebKit::WebPage::WebPage):
1421 (WebKit::WebPage::setShouldScaleViewToFitDocument):
1422 * WebProcess/WebPage/WebPage.h:
1423 * WebProcess/WebPage/WebPage.messages.in:
1424 Plumb shouldScaleViewToFitDocument through to the DrawingArea.
1426 * UIProcess/mac/WKViewLayoutStrategy.mm:
1427 (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
1428 (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]):
1429 (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy updateLayout]):
1430 (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy willChangeLayoutStrategy]):
1431 * UIProcess/API/C/WKLayoutMode.h:
1432 * UIProcess/API/Cocoa/_WKLayoutMode.h:
1433 Add a new layout mode, which just turns on shouldScaleViewToFitDocument,
1434 and otherwise behaves as normal.
1436 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1437 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1438 (WebKit::TiledCoreAnimationDrawingArea::setShouldScaleViewToFitDocument):
1439 (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
1440 (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1441 On every flush where either the document size or view size has changed,
1442 or layout is outstanding, do a layout with fixed layout off to determine
1443 whether the document fits inside the view. If it doesn't, scale it down
1444 to fit. This will require an extra layout for every resize while in the
1445 scaled-down state, but there is potential for future optimization.
1447 2015-05-14 Anders Carlsson <andersca@apple.com>
1449 Local storage origins should include origins with transient local storage
1450 https://bugs.webkit.org/show_bug.cgi?id=145017
1451 rdar://problem/10690447
1453 Reviewed by Sam Weinig.
1455 The transient local storage namespaces are used for third party data blocking and will stay
1456 around until the UI process exits so we need to be able to include website data from transient storage
1457 in the website data store APIs.
1459 * UIProcess/Storage/StorageManager.cpp:
1460 (WebKit::StorageManager::TransientLocalStorageNamespace::origins):
1461 (WebKit::StorageManager::getLocalStorageOrigins):
1462 * UIProcess/Storage/StorageManager.h:
1463 * UIProcess/WebKeyValueStorageManager.cpp:
1464 (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1465 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1466 (WebKit::WebsiteDataStore::fetchData):
1468 2015-05-14 Beth Dakin <bdakin@apple.com>
1470 Change range of possible forces for mouseforcechanged DOM event
1471 https://bugs.webkit.org/show_bug.cgi?id=144987
1473 rdar://problem/20472802
1475 Reviewed by Tim Horton.
1477 Change to a 0-3 range.
1478 * Shared/mac/WebEventFactory.mm:
1479 (WebKit::WebEventFactory::createWebMouseEvent):
1481 2015-05-14 Zan Dobersek <zdobersek@igalia.com>
1483 [GTK] Add missing ENABLE(NETSCAPE_PLUGIN_API) build guards
1484 https://bugs.webkit.org/show_bug.cgi?id=144994
1486 Reviewed by Carlos Garcia Campos.
1488 This fixes the build when configured with Netscape plugin API
1491 * UIProcess/API/gtk/WebKitWebContext.cpp:
1492 (webkit_web_context_set_additional_plugins_directory):
1493 (webkitWebContextGetPluginThread):
1494 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1495 (WebKit::ProcessLauncher::launchProcess):
1497 2015-05-13 Carlos Garcia Campos <cgarcia@igalia.com>
1499 [SOUP] Network Cache: NetworkProcess segfault when file system doesn't support xattrs
1500 https://bugs.webkit.org/show_bug.cgi?id=144953
1502 Reviewed by Martin Robinson.
1504 Return early if we fail to get the birthtime xattr.
1506 * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
1507 (WebKit::NetworkCache::fileTimes):
1509 2015-05-13 Daniel Bates <dabates@apple.com>
1511 Rename ProcessThrottlerClient::{send, cancel}ProcessWillSuspend() to {send, cancel}PrepareToSuspend()
1512 https://bugs.webkit.org/show_bug.cgi?id=144619
1513 <rdar://problem/20812779>
1515 Reviewed by Andy Estes.
1517 The names of the functions ProcessThrottlerClient::{send, cancel}ProcessWillSuspend() are misnomers. These
1518 functions are called when the ProcessThrottler wants to prepare the process that it manages for suspension
1519 and changes its mind, respectively. That is, these functions do not actually correspond to the OS decision
1520 to suspend a process or cancel the suspension of a process, respectively. So, rename these functions and
1521 associated {Network, Web}ProcessProxy message names to better describe their purpose.
1523 * NetworkProcess/NetworkProcess.cpp:
1524 (WebKit::NetworkProcess::prepareToSuspend):
1525 (WebKit::NetworkProcess::cancelPrepareToSuspend):
1526 (WebKit::NetworkProcess::processWillSuspend): Deleted.
1527 (WebKit::NetworkProcess::cancelProcessWillSuspend): Deleted.
1528 * NetworkProcess/NetworkProcess.h:
1529 * NetworkProcess/NetworkProcess.messages.in:
1530 * UIProcess/Network/NetworkProcessProxy.cpp:
1531 (WebKit::NetworkProcessProxy::sendPrepareToSuspend):
1532 (WebKit::NetworkProcessProxy::sendCancelPrepareToSuspend):
1533 (WebKit::NetworkProcessProxy::sendProcessWillSuspend): Deleted.
1534 (WebKit::NetworkProcessProxy::sendCancelProcessWillSuspend): Deleted.
1535 * UIProcess/Network/NetworkProcessProxy.h:
1536 * UIProcess/ProcessThrottler.cpp:
1537 (WebKit::ProcessThrottler::updateAssertion):
1538 * UIProcess/ProcessThrottlerClient.h:
1539 * UIProcess/WebProcessProxy.cpp:
1540 (WebKit::WebProcess::actualPrepareToSuspend): Formerly named prepareToSuspend.
1541 (WebKit::WebProcessProxy::sendPrepareToSuspend):
1542 (WebKit::WebProcessProxy::sendCancelPrepareToSuspend):
1543 (WebKit::WebProcessProxy::sendProcessWillSuspend): Deleted.
1544 (WebKit::WebProcessProxy::sendCancelProcessWillSuspend): Deleted.
1545 * UIProcess/WebProcessProxy.h:
1546 * WebProcess/WebProcess.cpp:
1547 (WebKit::WebProcess::prepareToSuspend):
1548 (WebKit::WebProcess::cancelPrepareToSuspend):
1549 (WebKit::WebProcess::processWillSuspend): Deleted.
1550 (WebKit::WebProcess::cancelProcessWillSuspend): Deleted.
1551 * WebProcess/WebProcess.h:
1552 * WebProcess/WebProcess.messages.in:
1554 2015-05-13 Anders Carlsson <andersca@apple.com>
1556 Don't create a per-pool data store when using the modern API
1557 https://bugs.webkit.org/show_bug.cgi?id=144963
1558 rdar://problem/20331756
1560 Reviewed by Tim Horton.
1562 * UIProcess/API/APIProcessPoolConfiguration.cpp:
1563 (API::ProcessPoolConfiguration::createWithLegacyOptions):
1564 (API::ProcessPoolConfiguration::copy):
1565 * UIProcess/API/APIProcessPoolConfiguration.h:
1566 Keep track of whether the process pool should have a data store.
1568 * UIProcess/API/C/WKContext.cpp:
1569 (WKContextGetWebsiteDataStore):
1570 * UIProcess/WebKeyValueStorageManager.cpp:
1571 (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1572 (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
1573 (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
1574 (WebKit::WebKeyValueStorageManager::deleteAllEntries):
1575 Update now that WebProcessPool::dataStore() no longer returns a reference.
1577 * UIProcess/WebProcessPool.cpp:
1578 (WebKit::WebProcessPool::WebProcessPool):
1579 Only create a data store if the configuration states that we should.
1581 * UIProcess/WebProcessPool.h:
1582 Change dataStore() to return a pointer instead of a reference.
1584 2015-05-13 Alexey Proskuryakov <ap@apple.com>
1586 [Mac] Sandbox violation reading SubmitDiagInfo.domains
1587 https://bugs.webkit.org/show_bug.cgi?id=144962
1588 rdar://problem/20719330
1590 Reviewed by Darin Adler.
1592 * WebProcess/com.apple.WebProcess.sb.in:
1594 2015-05-13 Beth Dakin <bdakin@apple.com>
1596 Speculative build fix.
1598 * UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h:
1600 2015-05-13 Michael Catanzaro <mcatanzaro@igalia.com>
1602 [GTK][CMake] Extra include directory when libnotify is present but disabled
1603 https://bugs.webkit.org/show_bug.cgi?id=144941
1605 Reviewed by Martin Robinson.
1607 Add LIBNOTIFY_INCLUDE_DIRS to WebKit2_INCLUDE_DIRECTORIES only if USE_LIBNOTIFY is true,
1608 rather than checking LIBNOTIFY_FOUND.
1610 * PlatformGTK.cmake:
1612 2015-05-13 Beth Dakin <bdakin@apple.com>
1614 Need SPI to set the overlay scroll bar style
1615 https://bugs.webkit.org/show_bug.cgi?id=144928
1617 rdar://problem/20143614
1619 Reviewed by Anders Carlsson.
1621 Make scrollbarOverlayStyle a part of the creation parameters.
1622 * Shared/WebPageCreationParameters.cpp:
1623 (WebKit::WebPageCreationParameters::encode):
1624 (WebKit::WebPageCreationParameters::decode):
1625 * Shared/WebPageCreationParameters.h:
1628 * UIProcess/API/Cocoa/WKViewPrivate.h:
1629 * UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h: Added.
1630 * UIProcess/API/mac/WKView.mm:
1631 (-[WKView _setOverlayScrollbarStyle:]):
1632 (-[WKView _overlayScrollbarStyle]):
1634 Store m_scrollbarOverlayStyle on WebPageProxy, and set it to the WebProcess.
1635 * UIProcess/WebPageProxy.cpp:
1636 (WebKit::WebPageProxy::WebPageProxy):
1637 (WebKit::WebPageProxy::creationParameters):
1638 (WebKit::WebPageProxy::setOverlayScrollbarStyle):
1639 * UIProcess/WebPageProxy.h:
1640 (WebKit::WebPageProxy::overlayScrollbarStyle):
1641 * WebKit2.xcodeproj/project.pbxproj:
1643 Return WebPage’s scrollbarOverlayStyle().
1644 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1645 (WebKit::WebChromeClient::preferredScrollbarOverlayStyle):
1646 * WebProcess/WebCoreSupport/WebChromeClient.h:
1648 Cache the scrollbarOverlayStyle() here for the WebProcess.
1649 * WebProcess/WebPage/WebPage.cpp:
1650 (WebKit::WebPage::WebPage):
1651 (WebKit::WebPage::setScrollbarOverlayStyle):
1652 * WebProcess/WebPage/WebPage.h:
1653 (WebKit::WebPage::scrollbarOverlayStyle):
1654 * WebProcess/WebPage/WebPage.messages.in:
1656 2015-05-13 Anders Carlsson <andersca@apple.com>
1658 Rename some StorageManager functions to indicate that they work on local storage entries
1659 https://bugs.webkit.org/show_bug.cgi?id=144958
1660 First part of rdar://problem/10690447.
1662 Reviewed by Beth Dakin.
1664 * UIProcess/Storage/StorageManager.cpp:
1665 (WebKit::StorageManager::getLocalStorageOrigins):
1666 (WebKit::StorageManager::getLocalStorageDetailsByOrigin):
1667 (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
1668 (WebKit::StorageManager::deleteAllLocalStorageEntries):
1669 (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
1670 (WebKit::StorageManager::getOrigins): Deleted.
1671 (WebKit::StorageManager::getStorageDetailsByOrigin): Deleted.
1672 (WebKit::StorageManager::deleteEntriesForOrigin): Deleted.
1673 (WebKit::StorageManager::deleteAllEntries): Deleted.
1674 (WebKit::StorageManager::deleteEntriesForOrigins): Deleted.
1675 * UIProcess/Storage/StorageManager.h:
1676 * UIProcess/WebKeyValueStorageManager.cpp:
1677 (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1678 (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
1679 (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
1680 (WebKit::WebKeyValueStorageManager::deleteAllEntries):
1681 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1682 (WebKit::WebsiteDataStore::fetchData):
1683 (WebKit::WebsiteDataStore::removeData):
1685 2015-05-13 Joseph Pecoraro <pecoraro@apple.com>
1687 Crash under WebKit::WebInspectorProxy::attachAvailabilityChanged sometimes opening new page
1688 https://bugs.webkit.org/show_bug.cgi?id=144957
1690 Reviewed by Simon Fraser.
1692 * UIProcess/WebInspectorProxy.cpp:
1693 (WebKit::WebInspectorProxy::attachAvailabilityChanged):
1695 2015-05-13 Joseph Pecoraro <pecoraro@apple.com>
1697 Pass String as reference in more places
1698 https://bugs.webkit.org/show_bug.cgi?id=144769
1700 Reviewed by Daniel Bates.
1702 * WebProcess/WebPage/WebInspectorUI.cpp:
1703 (WebKit::WebInspectorUI::showMainResourceForFrame):
1704 * WebProcess/WebPage/WebInspectorUI.h:
1706 2015-05-13 Timothy Horton <timothy_horton@apple.com>
1708 View scale changes are temporarily lost after restoring a page from the page cache
1709 https://bugs.webkit.org/show_bug.cgi?id=144934
1711 Reviewed by Brady Eidson.
1713 * WebProcess/WebPage/WebPage.cpp:
1714 (WebKit::WebPage::WebPage):
1715 (WebKit::WebPage::scalePage):
1716 (WebKit::WebPage::scalePageInViewCoordinates):
1717 (WebKit::WebPage::pageScaleFactor):
1718 (WebKit::WebPage::viewScaleFactor):
1719 (WebKit::WebPage::scaleView):
1720 * WebProcess/WebPage/WebPage.h:
1721 (WebKit::WebPage::viewScaleFactor): Deleted.
1722 Get rid of m_viewScaleFactor, instead using Page::viewScaleFactor.
1724 2015-05-13 Sungmann Cho <sungmann.cho@navercorp.com>
1726 Minor cleanups to PluginProxy.cpp.
1727 https://bugs.webkit.org/show_bug.cgi?id=144948
1729 Reviewed by Gyuyoung Kim.
1731 1. Remove unnecessary #include.
1732 2. Remove unnecessary return statement from PluginProxy::paint().
1734 No new tests, no behavior change.
1736 * WebProcess/Plugins/PluginProxy.cpp:
1737 (WebKit::PluginProxy::paint):
1739 2015-05-13 Daegyu Lee <daegyu.lee@navercorp.com>
1741 REGRESSION(r176631): [EFL] Fullscreen feature doesn't work correctly on MiniBrowser
1742 https://bugs.webkit.org/show_bug.cgi?id=144906
1744 Reviewed by Gyuyoung Kim.
1746 * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
1747 (WebKit::PageViewportController::updateMinimumScaleToFit): Recover the r176631 condition to
1748 call applyScaleAfterRenderingContents function to apply correct scale.
1750 2015-05-12 Dan Bernstein <mitz@apple.com>
1752 In Safari, Debug > Get Bytecode Profile crashes the Web Content process
1753 https://bugs.webkit.org/show_bug.cgi?id=144944
1755 Reviewed by Darin Adler.
1757 * WebProcess/WebPage/WebPage.cpp:
1758 (WebKit::WebPage::getBytecodeProfile): Don’t assert that m_perBytecodeProfiler isn’t null,
1759 because it is when the profiler is disabled, which is the default. In that case, return
1760 after sending back the empty string, rather than continuing to dereference a null pointer.
1762 2015-05-12 Jon Honeycutt <jhoneycutt@apple.com>
1764 Crash when using <input type=file>
1766 <https://bugs.webkit.org/show_bug.cgi?id=144939>
1767 <rdar://problem/20172315>
1769 Reviewed by Andy Estes.
1771 * UIProcess/ios/forms/WKFileUploadPanel.mm:
1772 Use a RefPtr to hold the WebOpenPanelResultListenerProxy, because the
1773 WKFileUploadPanel can outlive it.
1775 2015-05-12 Simon Fraser <simon.fraser@apple.com>
1777 Turn antialiased font dilation off by default
1778 https://bugs.webkit.org/show_bug.cgi?id=144940
1779 rdar://problem/20923031
1781 Reviewed by Sam Weinig.
1783 Turn antialised font dilation off by default.
1785 * Shared/WebPreferencesDefinitions.h:
1786 * UIProcess/API/C/WKPreferencesRefPrivate.h:
1788 2015-05-12 Daniel Bates <dabates@apple.com>
1790 Make {Network, Web}ProcessProxy inherit from ProcessThrottleClient privately
1791 https://bugs.webkit.org/show_bug.cgi?id=144886
1793 Reviewed by Darin Adler.
1795 {Network, Web}ProcessProxy are implemented in terms of ProcessThrottleClient, an
1796 interface that defines the callbacks that ProcessThrottler makes to a client. We
1797 do not want to allow arbitrary callers to make use of the interface ProcessThrottleClient.
1798 So, we should use private inheritance to represent the relationship between
1799 {Network, Web}ProcessProxy and ProcessThrottleClient instead of public inheritance.
1801 Additionally make ProcessThrottler a instance variable of {Network, Web}ProcessProxy instead
1802 of holding a smart pointer to a ProcessThrottler instance because we always want to
1803 have a ProcessThrottler for each instance of {Network, Web}ProcessProxy.
1805 * UIProcess/Network/NetworkProcessProxy.cpp:
1806 (WebKit::NetworkProcessProxy::NetworkProcessProxy): Update code to work now that m_throttler
1807 is an instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
1808 (WebKit::NetworkProcessProxy::didFinishLaunching): Update code to access functions of
1809 m_throttler by reference instead of by pointer.
1810 (WebKit::NetworkProcessProxy::didCancelProcessSuspension): Ditto.
1811 (WebKit::NetworkProcessProxy::processReadyToSuspend): Ditto.
1812 (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles): Ditto.
1813 * UIProcess/Network/NetworkProcessProxy.h: Inherit from ProcessThrottleClient privately.
1814 (WebKit::NetworkProcessProxy::throttler): Update code to work now that m_throttler is an
1815 instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
1816 * UIProcess/ProcessThrottler.cpp:
1817 (WebKit::ProcessThrottler::ProcessThrottler): Update code to work now that m_process is
1818 a lvalue reference instead of a pointer.
1819 (WebKit::ProcessThrottler::updateAssertion): Ditto.
1820 (WebKit::ProcessThrottler::assertionWillExpireImminently): Ditto.
1821 * UIProcess/ProcessThrottler.h: Ditto.
1822 * UIProcess/WebProcessProxy.cpp:
1823 (WebKit::WebProcessProxy::WebProcessProxy): Update code to work now that m_throttler is an
1824 instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
1825 (WebKit::WebProcessProxy::didFinishLaunching): Update code to access functions of
1826 m_throttler by reference instead of by pointer.
1827 (WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
1828 (WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.
1829 (WebKit::WebProcessProxy::setIsHoldingLockedFiles): Ditto.
1830 * UIProcess/WebProcessProxy.h: Inherit from ProcessThrottleClient privately.
1831 (WebKit::WebProcessProxy::throttler): Update code to work now that m_throttler is an
1832 instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
1834 2015-05-12 Anders Carlsson <andersca@apple.com>
1836 Production builds should link against the shims directly
1837 https://bugs.webkit.org/show_bug.cgi?id=144922
1838 rdar://problem/19708579
1840 Reviewed by Dan Bernstein.
1842 * Configurations/NetworkService.xcconfig:
1843 Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
1844 Link directly against SecItemShim.dylib where possible.
1846 * Configurations/PluginProcessShim.xcconfig:
1847 Set the install name and install path.
1849 * Configurations/PluginService.32.xcconfig:
1850 Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
1851 Link directly against PluginProcessShim.dylib where possible.
1853 * Configurations/PluginService.64.xcconfig:
1854 Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
1855 Link directly against PluginProcessShim.dylib where possible.
1857 * Configurations/SecItemShim.xcconfig:
1858 Set the install name and install path.
1860 * Configurations/WebContentService.xcconfig:
1861 Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
1862 Link directly against WebProcessShim.dylib where possible.
1864 * Configurations/WebProcessShim.xcconfig:
1865 Set the install name and install path.
1867 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist.
1868 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
1869 Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.
1871 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Copied from Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist.
1872 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
1873 Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.
1875 * WebKit2.xcodeproj/project.pbxproj:
1878 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist.
1879 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
1880 Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.
1882 2015-05-12 Alexey Proskuryakov <ap@apple.com>
1884 Undo a mistaken part of r184211.
1886 * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::cookieStorageDirectory):
1887 * UIProcess/WebProcessPool.h:
1888 cookieStorageDirectory() is used on iOS, so bring it back.
1890 2015-05-08 Alexey Proskuryakov <ap@apple.com>
1892 [Mac] Share cookie storage between UI process and secondary processes
1893 https://bugs.webkit.org/show_bug.cgi?id=144820
1894 rdar://problem/20572830
1896 Reviewed by Darin Adler.
1898 Pass a cookie storage descriptor that includes file path as well as other data that
1899 CFNetwork needs to use the same cookies storage as in another process (session cookies
1900 are still separate).
1902 While at it, started to clean up code that passes cookie storage path. It was mostly
1903 dead and unimplemented, only used in child processes when USE(SECCOMP_FILTERS) was enabled.
1905 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1906 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1907 * Shared/Network/NetworkProcessCreationParameters.cpp:
1908 (WebKit::NetworkProcessCreationParameters::encode):
1909 (WebKit::NetworkProcessCreationParameters::decode):
1910 * Shared/Network/NetworkProcessCreationParameters.h:
1911 * Shared/WebProcessCreationParameters.cpp:
1912 (WebKit::WebProcessCreationParameters::encode):
1913 (WebKit::WebProcessCreationParameters::decode):
1914 * Shared/WebProcessCreationParameters.h:
1915 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1916 (WebKit::WebProcessPool::platformInitializeWebProcess):
1917 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1918 (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
1919 * UIProcess/WebProcessPool.cpp:
1920 (WebKit::WebProcessPool::ensureNetworkProcess):
1921 (WebKit::WebProcessPool::createNewWebProcess):
1922 (WebKit::WebProcessPool::cookieStorageDirectory):
1923 * UIProcess/WebProcessPool.h:
1924 * UIProcess/efl/WebProcessPoolEfl.cpp:
1925 (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
1926 * UIProcess/gtk/WebProcessPoolGtk.cpp:
1927 (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
1928 * WebProcess/cocoa/WebProcessCocoa.mm:
1929 (WebKit::WebProcess::platformInitializeWebProcess):
1931 2015-05-12 Chris Dumez <cdumez@apple.com>
1933 [WK2] Log using diagnostic logging how far back in history we navigate
1934 https://bugs.webkit.org/show_bug.cgi?id=144919
1935 <rdar://problem/20920043>
1937 Reviewed by Gavin Barraclough.
1939 Log using diagnostic logging how far back in history we navigate.
1940 When a back navigation or a backward indexed navigation occurs, we
1941 log the delta: (HistoryListSize - 1) - NewHistoryItemIndex.
1943 * UIProcess/WebBackForwardList.cpp:
1944 (WebKit::WebBackForwardList::goToItem):
1946 2015-05-11 Sam Weinig <sam@webkit.org>
1948 ChildProcess should take an os_activity
1949 https://bugs.webkit.org/show_bug.cgi?id=141781
1951 Reviewed by Ryosuke Niwa.
1953 * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
1954 (DatabaseServiceInitializer):
1955 * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
1956 (NetworkServiceInitializer):
1957 * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
1958 (PluginServiceInitializer):
1959 * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
1960 (WebContentServiceInitializer):
1961 Start an os_activity in the initializer for each XPC service.
1964 Add HAVE_OS_ACTIVITY where available.
1966 2015-05-12 Carlos Garcia Campos <cgarcia@igalia.com>
1968 Unreviewed. Fix GTK+ debug build after r184197.
1970 * UIProcess/gtk/RedirectedXCompositeWindow.cpp: Add missing include.
1972 2015-05-08 Carlos Garcia Campos <cgarcia@igalia.com>
1974 [X11] Add XUniquePtr and XUniqueResource to automatically free X resources
1975 https://bugs.webkit.org/show_bug.cgi?id=144521
1977 Reviewed by Darin Adler.
1979 Use XUniquePtr and XUniqueResource to free X resources.
1981 * PlatformEfl.cmake: Add Source/WebCore/platform/graphics/x11 dir
1982 to the include dir list.
1983 * PlatformGTK.cmake: Ditto.
1984 * UIProcess/cairo/BackingStoreCairo.cpp:
1985 (WebKit::BackingStore::createBackend): Do not pass the display to
1986 the BackingStoreBackendCairoX11 constructor.
1987 * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
1988 (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
1989 (WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
1990 (WebKit::RedirectedXCompositeWindow::resize):
1991 (WebKit::RedirectedXCompositeWindow::cleanupPixmapAndPixmapSurface):
1992 (WebKit::RedirectedXCompositeWindow::surface):
1993 * UIProcess/gtk/RedirectedXCompositeWindow.h:
1994 (WebKit::RedirectedXCompositeWindow::windowID):
1995 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1996 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1997 (WebKit::NetscapePlugin::platformPostInitializeWindowless):
1998 (WebKit::NetscapePlugin::platformDestroy):
1999 (WebKit::NetscapePlugin::platformGeometryDidChange):
2000 (WebKit::NetscapePlugin::platformPaint):
2002 2015-05-11 Dan Bernstein <mitz@apple.com>
2004 WebKit2 part of <rdar://problem/20878075> Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL
2006 Reviewed by Alexey Proskuryakov.
2008 * UIProcess/WebPageProxy.cpp:
2009 (WebKit::WebPageProxy::didChangeProvisionalURLForFrame): Added. Update internal state the
2010 same way we update it for server redirects, but don’t make client callbacks. Clients
2011 observing the URL property will see it change.
2012 * UIProcess/WebPageProxy.h:
2014 * UIProcess/WebPageProxy.messages.in: Added DidChangeProvisionalURLForFrame.
2016 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2017 (WebKit::WebFrameLoaderClient::dispatchDidChangeProvisionalURL): Override this new
2018 FrameLoaderClient function to send a DidChangeProvisionalURLForFrame message to the UI
2020 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2022 2015-05-11 Dan Bernstein <mitz@apple.com>
2024 <rdar://problem/19773721> [iOS] Find on page feels like it zooms in too much
2025 https://bugs.webkit.org/show_bug.cgi?id=144891
2027 Reviewed by Darin Adler.
2029 Sometimes, Find on Page’s constant 1.6 scale factor is too much. Smart magnification is
2030 designed to choose a scale factor that is just right.
2032 * UIProcess/ios/SmartMagnificationController.h:
2033 * UIProcess/ios/SmartMagnificationController.messages.in: Added Magnify message.
2034 * UIProcess/ios/SmartMagnificationController.mm:
2035 (WebKit::SmartMagnificationController::magnify): Added. Handle the new message using
2036 -[WKContentView _soomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:].
2037 * WebProcess/WebPage/ios/FindControllerIOS.mm:
2038 (WebKit::FindController::updateFindIndicator): Instead of zooming to the selection rect,
2039 get the surrounding render rect (the area we would target for a double-tap at the beginning
2040 of the selection), and tell the magnification controller to target it. Use the center of the
2041 start of the selection as the origin.
2043 2015-05-11 Brent Fulgham <bfulgham@apple.com>
2045 Scroll snap logic should be triggered when resizing the WebView
2046 https://bugs.webkit.org/show_bug.cgi?id=142590
2047 <rdar://problem/20125088>
2049 Reviewed by Simon Fraser.
2051 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2052 (RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Modify use of 'closestSnapOffset' to satisfy the additional
2053 argument I added. This is currently not used for anything on iOS.
2054 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: Ditto.
2056 2015-05-11 Andreas Kling <akling@apple.com>
2058 Force a rebuild of JSNPObject.cpp on bots.
2060 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2061 (WebKit::JSNPObject::callMethod):
2063 2015-05-11 Anders Carlsson <andersca@apple.com>
2065 Simplify shim path computation
2066 https://bugs.webkit.org/show_bug.cgi?id=144884
2067 Part of rdar://problem/19708579.
2069 Reviewed by Sam Weinig.
2071 Factor the code that computes the shim path out into a separate function. Also make this mac only
2072 since we don't have any shims on iOS.
2074 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2075 (WebKit::computeProcessShimPath):
2076 (WebKit::addDYLDEnvironmentAdditions):
2078 2015-05-11 Myles C. Maxfield <mmaxfield@apple.com>
2080 Unreviewed build fix
2084 * UIProcess/API/APIUserContentExtensionStore.cpp:
2085 (API::compiledToFile):
2087 2015-05-11 Alex Christensen <achristensen@webkit.org>
2089 [Content Extensions] Support domain-specific rules and exceptions.
2090 https://bugs.webkit.org/show_bug.cgi?id=144833
2092 Reviewed by Darin Adler.
2094 * Shared/WebCompiledContentExtension.cpp:
2095 (WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecode):
2096 (WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecodeLength):
2097 (WebKit::WebCompiledContentExtension::filtersWithDomainsBytecode):
2098 (WebKit::WebCompiledContentExtension::filtersWithDomainsBytecodeLength):
2099 (WebKit::WebCompiledContentExtension::domainFiltersBytecode):
2100 (WebKit::WebCompiledContentExtension::domainFiltersBytecodeLength):
2101 (WebKit::WebCompiledContentExtension::bytecode): Deleted.
2102 (WebKit::WebCompiledContentExtension::bytecodeLength): Deleted.
2103 * Shared/WebCompiledContentExtension.h:
2104 * Shared/WebCompiledContentExtensionData.cpp:
2105 (WebKit::WebCompiledContentExtensionData::encode):
2106 (WebKit::WebCompiledContentExtensionData::decode):
2107 * Shared/WebCompiledContentExtensionData.h:
2108 (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
2109 * UIProcess/API/APIUserContentExtensionStore.cpp:
2110 (API::ContentExtensionMetaData::fileSize):
2111 (API::encodeContentExtensionMetaData):
2112 (API::decodeContentExtensionMetaData):
2113 (API::compiledToFile):
2114 (API::createExtension):
2115 Keep track of 3 different types of bytecode to be able to handle domain-specific rules.
2117 2015-05-11 Tim Horton <timothy_horton@apple.com>
2119 Page overlay action context override should indicate the source of the request
2120 https://bugs.webkit.org/show_bug.cgi?id=144832
2121 <rdar://problem/20562594>
2123 Reviewed by Darin Adler.
2125 * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
2126 * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
2127 * WebProcess/WebPage/WebPageOverlay.cpp:
2128 (WebKit::WebPageOverlay::actionContextForResultAtPoint):
2129 * WebProcess/WebPage/WebPageOverlay.h:
2130 (WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
2131 * WebProcess/WebPage/mac/WebPageMac.mm:
2132 (WebKit::WebPage::performActionMenuHitTestAtLocation):
2133 Add a parameter to WKBundlePageOverlayActionContextForResultAtPoint so that
2134 clients can tell whether the requested action context should be targetted
2135 at an action menu or immediate action.
2137 2015-05-11 Daniel Bates <dabates@apple.com>
2139 [iOS] Close all open databases in expiration handler of process assertion
2140 https://bugs.webkit.org/show_bug.cgi?id=144661
2141 <rdar://problem/20845052>
2143 Reviewed by Darin Adler.
2145 For WebKit2, close all open databases when the process assertion expiration
2148 When the process assertion expiration handler is called we dispatch a synchronous
2149 message called ProcessWillSuspendImminently to the {Web, Network} processes to inform
2150 them that they will be suspended imminently. The {Web, Network} process will always
2151 service this message regardless if they were waiting for another message. In the
2152 WebProcess, we will close all open databases among other tasks upon receiving this
2153 message. In the NetworkProcess, we will purge some data from memory.
2155 * NetworkProcess/NetworkProcess.cpp:
2156 (WebKit::NetworkProcess::didReceiveSyncMessage): Modified to call NetworkProcess::didReceiveSyncNetworkProcessMessage()
2157 to process the synchronous ProcessWillSuspendImminently message.
2158 (WebKit::NetworkProcess::processWillSuspendImminently): Added; free some memory.
2159 * NetworkProcess/NetworkProcess.h:
2160 * NetworkProcess/NetworkProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.
2161 * Shared/ChildProcessProxy.h:
2162 (WebKit::ChildProcessProxy::sendSync): Added parameter sendSyncFlags so that we can send
2163 a sync message with flag IPC::InterruptWaitingIfSyncMessageArrives to cause the {Web, Network}Process
2164 to process the message regardless of whether it is waiting for another message.
2165 * UIProcess/Network/NetworkProcessProxy.cpp:
2166 (WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
2167 ProcessWillSuspendImminently to the NetworkProcess.
2168 * UIProcess/Network/NetworkProcessProxy.h:
2169 * UIProcess/ProcessAssertion.cpp:
2170 (WebKit::ProcessAndUIAssertion::setClient): Added.
2171 * UIProcess/ProcessAssertion.h: Added abstract class ProcessAssertionClient.
2172 (WebKit::ProcessAssertionClient::~ProcessAssertionClient): Added.
2173 (WebKit::ProcessAssertion::setClient): Added.
2174 (WebKit::ProcessAssertion::client): Added.
2175 * UIProcess/ProcessThrottler.cpp:
2176 (WebKit::ProcessThrottler::didConnectToProcess):
2177 (WebKit::ProcessThrottler::assertionWillExpireImminently): Added; implements the ProcessAssertionClient
2178 interface. Notify the process throttler clients that the assertion is near expiration.
2179 * UIProcess/ProcessThrottler.h:
2180 * UIProcess/ProcessThrottlerClient.h: Added
2181 * UIProcess/WebProcessProxy.cpp:
2182 (WebKit::WebProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
2183 ProcessWillSuspendImminently to the WebProcess.
2184 * UIProcess/WebProcessProxy.h:
2185 * UIProcess/ios/ProcessAssertionIOS.mm:
2186 (-[WKProcessAssertionBackgroundTaskManager addClient:]): Added.
2187 (-[WKProcessAssertionBackgroundTaskManager removeClient:]): Added.
2188 (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]): Modified expiration handler
2189 to notify ProcessAssertionClient clients that the assertion is near expiration.
2190 (WebKit::ProcessAssertion::~ProcessAssertion): Remove the client on destruction.
2191 (WebKit::ProcessAndUIAssertion::setClient): Added.
2192 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
2193 (WebKit::WebDatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseManager::closeAllDatabases().
2194 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
2195 * WebProcess/WebProcess.cpp:
2196 (WebKit::WebProcess::didReceiveSyncMessage): Call WebProcess::didReceiveSyncWebProcessMessage() to process
2197 the synchronous ProcessWillSuspendImminently message. Removed logging for an unhandled synchronous message
2198 since WebProcess::didReceiveSyncWebProcessMessage() will ASSERT_NOT_REACHED() for such a message.
2199 (WebKit::WebProcess::prepareToSuspend): Extracted code from WebProcess::processWillSuspend() so that it can
2200 be used from both WebProcess::processWillSuspend() and WebProcess::processWillSuspendImminently(). And modified
2201 it to conditionally dispatch a ProcessReadyToSuspend message to the WebProcessProxy. We only want to dispatch
2202 such a message as part of a coordinated suspension by the ProcessThrottler. That is, we do not want to dispatch
2203 the ProcessReadyToSuspend message when the background assertion is near expiration (i.e. WebProcess::processWillSuspendImminently()
2205 (WebKit::WebProcess::processWillSuspendImminently): Added. Suspend all open databases among other tasks.
2206 (WebKit::WebProcess::processWillSuspend): Implemented in terms of WebProcess::prepareToSuspend().
2207 (WebKit::WebProcess::processSuspensionCleanupTimerFired): Modified to conditionally dispatch a ProcessReadyToSuspend
2208 message to the WebProcessProxy.
2209 (WebKit::WebProcess::processDidResume): Stop the suspension cleanup timer, which may be active if the WebProcess
2210 did not mark all its graphics layers as volatile before process suspension.
2211 * WebProcess/WebProcess.h:
2212 * WebProcess/WebProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.
2214 2015-05-10 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2216 Use Ref instead of PassRefPtr in WebCore/page
2217 https://bugs.webkit.org/show_bug.cgi?id=144841
2219 Reviewed by Darin Adler.
2221 To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
2224 (WebKit::WebUserContentController::WebUserContentController):
2225 * UIProcess/WebPageProxy.cpp:
2226 (WebKit::WebPageProxy::setTextIndicator):
2227 * UIProcess/mac/PageClientImpl.mm:
2228 (WebKit::PageClientImpl::didPerformDictionaryLookup):
2229 * WebProcess/UserContent/WebUserContentController.cpp:
2230 (WebKit::WebUserContentController::WebUserContentController):
2232 2015-05-10 Philip Chimento <philip.chimento@gmail.com>
2234 [GTK][SOUP] Web and Network processes don't know how to get memory size on OSX
2235 https://bugs.webkit.org/show_bug.cgi?id=144554
2237 Reviewed by Darin Adler.
2239 * NetworkProcess/soup/NetworkProcessSoup.cpp:
2240 (WebKit::NetworkProcess::platformSetCacheModel): Use WTF::ramSize()
2241 instead of local function. Also use WTF::MB instead of dividing by
2243 (WebKit::getMemorySize): Deleted.
2244 * WebProcess/soup/WebProcessSoup.cpp:
2245 (WebKit::WebProcess::platformSetCacheModel): Ditto.
2246 (WebKit::getMemorySize): Deleted.
2248 2015-05-10 Yongjun Zhang <yongjun_zhang@apple.com>
2250 Use preview view controller from WebKitSystemInterface.
2251 https://bugs.webkit.org/show_bug.cgi?id=144836
2253 Add a property _allowsLinkPreview to WKWebView so that we can turn on/off preview at runtime. Also,
2254 for client that doesn't provide preview view controller, use the default view controller prepared
2255 by WebKitSystemInterface.
2257 Reviewed by Dan Bernstein.
2259 * UIProcess/API/Cocoa/WKWebView.mm:
2260 (-[WKWebView initWithFrame:configuration:]):
2261 (-[WKWebView _allowsLinkPreview]):
2262 (-[WKWebView _setAllowsLinkPreview:]):
2263 * UIProcess/API/Cocoa/WKWebViewPrivate.h: Add _allowsLinkPreview property
2264 * UIProcess/ios/WKContentView.mm:
2265 (-[WKContentView willMoveToWindow:]):
2266 * UIProcess/ios/WKContentViewInteraction.h:
2267 * UIProcess/ios/WKContentViewInteraction.mm:
2268 (-[WKContentView _registerPreviewInWindow:]):
2269 (-[WKContentView _unregisterPreviewInWindow:]):
2270 (-[WKContentView previewViewControllerForPosition:inSourceView:]): : For client that doesn't provide
2271 preview delegate, use preview view controller in WebKitSystemInterface.
2272 (-[WKContentView commitPreviewViewController:]):
2274 2015-05-10 Darin Adler <darin@apple.com>
2276 Fix internal Apple builds on Mavericks.
2278 * UIProcess/API/mac/WKView.mm:
2279 (-[WKView _dismissContentRelativeChildWindows]): Added missing conditionals around
2280 some code that is for OS X 10.10 or newer only. There were similar conditionals around
2281 other nearby code in this file, and around other uses of the same method in other files,
2282 so matched the style.
2284 2015-05-10 Dan Bernstein <mitz@apple.com>
2286 iOS internal build fix.
2288 * Platform/mac/MenuUtilities.mm:
2290 2015-05-10 Sungmann Cho <sungmann.cho@navercorp.com>
2292 Remove unnecessary semicolons.
2293 https://bugs.webkit.org/show_bug.cgi?id=144844
2295 Reviewed by Darin Adler.
2297 No new tests, no behavior change.
2299 * Shared/Downloads/mac/DownloadMac.mm:
2300 (-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
2301 * UIProcess/WebProcessProxy.cpp:
2302 (WebKit::WebProcessProxy::transformHandlesToObjects):
2303 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2304 (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
2305 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2306 (WebKit::idToHistoryItemMap):
2308 2015-05-10 Darin Adler <darin@apple.com>
2312 * Platform/mac/MenuUtilities.mm: Added includes that were somehow omitted in what
2315 2015-05-10 Darin Adler <darin@apple.com>
2317 [Cocoa] Don't soft link DataDetectorsCore
2318 https://bugs.webkit.org/show_bug.cgi?id=144837
2320 Reviewed by Dan Bernstein.
2322 * Platform/mac/MenuUtilities.mm: Use DataDetectorsSPI.h instead of doing it here.
2324 * WebProcess/WebPage/mac/WebPageMac.mm: Removed unneeded include of unused header,
2327 2015-05-09 Dan Bernstein <mitz@apple.com>
2329 Deployment-target __NSi_ and __NSd_ definitions in WKFoundation.h are redundant
2330 https://bugs.webkit.org/show_bug.cgi?id=144831
2332 Reviewed by Sam Weinig.
2334 Reverted r182846 and r182904.
2336 * Shared/API/Cocoa/WKFoundation.h:
2337 * WebKit2.xcodeproj/project.pbxproj:
2339 2015-05-09 Yoav Weiss <yoav@yoav.ws>
2341 Remove the PICTURE_SIZES build flag
2342 https://bugs.webkit.org/show_bug.cgi?id=144679
2344 Reviewed by Benjamin Poulain.
2346 Removed the PICTURE_SIZES build time flag.
2348 * Configurations/FeatureDefines.xcconfig:
2350 2015-05-08 Beth Dakin <bdakin@apple.com>
2352 Shuffle touch-related code to keep the internal builds working
2353 https://bugs.webkit.org/show_bug.cgi?id=144812
2355 Reviewed by Benjamin Poulain.
2357 * Shared/NativeWebTouchEvent.h:
2358 * Shared/WebEvent.h:
2359 * Shared/WebEventConversion.cpp:
2360 * Shared/ios/NativeWebTouchEventIOS.mm:
2361 (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
2362 (WebKit::extractWebTouchPoint): Deleted.
2363 * Shared/ios/WebPlatformTouchPointIOS.cpp:
2365 2015-05-08 Dan Bernstein <mitz@apple.com>
2367 <rdar://problem/20757196> NSInternalInconsistencyException raised in -[NSString encodeWithCoder:] beneath createEncodedObject when using WKRemoteObjectEncoder for Safari AutoFill
2368 https://bugs.webkit.org/show_bug.cgi?id=144818
2370 Reviewed by Anders Carlsson.
2372 Allow NSString instances that contain unpaired surrogates to be encoded by
2373 WKRemoteObjectCoder by encoding them directly rather than using
2374 -[NSString encodeWithCoder:].
2376 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2377 (encodeString): Added. Sets an API::String as the object to encode.
2378 (encodeObject): Changed to use encodeString for NSString instances.
2379 (decodeString): Added. Gets an API::String from the dictionary and returns it as an
2381 (decodeObject): Changed to use decodeString for NSString instances.
2383 2015-05-08 Timothy Horton <timothy_horton@apple.com>
2387 * Platform/mac/LayerHostingContext.mm:
2388 (WebKit::LayerHostingContext::createFencePort):
2390 2015-05-08 Timothy Horton <timothy_horton@apple.com>
2392 Periodically repaint during resize while using the DynamicSizeWithMinimumViewSize layout strategy
2393 https://bugs.webkit.org/show_bug.cgi?id=144816
2395 Reviewed by Simon Fraser.
2397 * UIProcess/mac/WKViewLayoutStrategy.mm:
2398 (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]):
2399 (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy _updateTransientScale:]):
2400 (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
2401 Factor out _updateTransientScale from updateLayout.
2402 Keep track of the last viewScaleFactor that we know is being displayed
2403 (_lastCommittedViewScale) and use that for computing the transient scale,
2404 so that we can recompute the transient scale while the UI process's notion
2405 of the actual view scale might have moved ahead of what the Web process has
2408 2015-05-08 Timothy Horton <timothy_horton@apple.com>
2412 * UIProcess/WebPageProxy.cpp:
2414 2015-05-08 Timothy Horton <timothy_horton@apple.com>
2418 * Platform/mac/LayerHostingContext.mm:
2419 (WebKit::LayerHostingContext::createFencePort):
2421 2015-05-08 Timothy Horton <timothy_horton@apple.com>
2425 * Platform/mac/LayerHostingContext.mm:
2426 (WebKit::LayerHostingContext::createFencePort):
2428 2015-05-08 Timothy Horton <timothy_horton@apple.com>
2430 Flip the direction of the fence in scaleViewAndUpdateGeometryFenced
2431 https://bugs.webkit.org/show_bug.cgi?id=144810
2433 Reviewed by Simon Fraser.
2435 Send the fence from the Web process to the UI process, instead of vice versa.
2436 This means that we won't keep the UI process CAContext blocked for the whole
2437 time that the Web process is doing layout/painting/etc. Instead, we'll start
2438 blocking the Web process CAContext immediately after flushing and before committing,
2439 and send the fence to the UI process to be applied immediately. This minimizes
2440 the amount of time in both processes spent blocked on the fence.
2442 * Platform/mac/LayerHostingContext.h:
2443 * Platform/mac/LayerHostingContext.mm:
2444 (WebKit::LayerHostingContext::createFencePort):
2445 Add createFencePort, which creates a MachSendRight wrapping a CA fence port.
2446 Note that you must setFencePort() with this port if you want the LayerHostingContext's
2447 CAContext to block on it!
2449 * UIProcess/WebPageProxy.cpp:
2450 (WebKit::WebPageProxy::scaleViewAndUpdateGeometryFenced):
2451 (WebKit::WebPageProxy::machSendRightCallback):
2452 * UIProcess/WebPageProxy.h:
2453 * UIProcess/WebPageProxy.messages.in:
2454 Create a callback and send it to the Web process along with scaleViewAndUpdateGeometryFenced.
2456 * UIProcess/mac/WKViewLayoutStrategy.mm:
2457 (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
2458 When called back, install the fence port in our CAContext; when the commit goes through,
2459 remove the transient scale as we did previously.
2461 * WebProcess/WebPage/DrawingArea.h:
2462 (WebKit::DrawingArea::replyWithFenceAfterNextFlush):
2463 (WebKit::DrawingArea::updateGeometry): Deleted.
2464 * WebProcess/WebPage/WebPage.cpp:
2465 (WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
2466 * WebProcess/WebPage/WebPage.h:
2467 * WebProcess/WebPage/WebPage.messages.in:
2468 Instead of installing a fence created in the UI process, tell the DrawingArea
2469 to create one and reply to the UI process with it after the next flush.
2471 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2472 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2473 (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2474 (WebKit::TiledCoreAnimationDrawingArea::replyWithFenceAfterNextFlush):
2475 After flushing, before committing, create a fence and reply to any
2476 callbacks that requested fences, and install it in our context.
2478 2015-05-08 Michael Catanzaro <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>
2480 [GTK] Checks for DEVELOPMENT_BUILD are all wrong
2481 https://bugs.webkit.org/show_bug.cgi?id=144746
2483 Reviewed by Carlos Garcia Campos.
2485 Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD.
2487 * Shared/gtk/ProcessExecutablePathGtk.cpp:
2488 (WebKit::findWebKitProcess):
2489 * UIProcess/API/gtk/WebKitWebContext.cpp:
2490 (injectedBundleDirectory):
2491 * UIProcess/gtk/TextCheckerGtk.cpp:
2492 (WebKit::enchantTextChecker):
2494 2015-05-08 Anders Carlsson <andersca@apple.com>
2496 Fix ProcessLauncher port leak
2497 https://bugs.webkit.org/show_bug.cgi?id=144807
2498 rdar://problem/20593291
2500 Reviewed by Sam Weinig.
2502 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2503 (WebKit::connectToService):
2504 xpc_dictionary_set_mach_send increments the send right count so make sure to
2505 balance it with a call to mach_port_deallocate.
2507 2015-05-08 Beth Dakin <bdakin@apple.com>
2509 Fix performance tests after r183954
2510 https://bugs.webkit.org/show_bug.cgi?id=144805
2512 Reviewed by Alexey Proskuryakov.
2514 Web* is traditionally a WK1 prefix, so use the WK2 prefix instead in WK2 so that
2515 we don’t have two classes with the same name in the two projects.
2516 * UIProcess/mac/WKImmediateActionController.mm:
2517 (-[WKImmediateActionController _defaultAnimationController]):
2519 2015-05-08 Carlos Garcia Campos <cgarcia@igalia.com>
2521 [GTK] Expose allowFileAccessFromFileURLs setting to WebKit2 GTK+ API
2522 https://bugs.webkit.org/show_bug.cgi?id=144748
2524 Reviewed by Sergio Villar Senin.
2526 This is needed by local applications loaded as a file URI that do XMLHttpRequests.
2528 * UIProcess/API/gtk/WebKitSettings.cpp:
2529 (webKitSettingsSetProperty):
2530 (webKitSettingsGetProperty):
2531 (webkit_settings_class_init):
2532 (webkit_settings_get_allow_file_access_from_file_urls):
2533 (webkit_settings_set_allow_file_access_from_file_urls):
2534 * UIProcess/API/gtk/WebKitSettings.h:
2535 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2536 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
2538 2015-05-08 Andreas Kling <akling@apple.com>
2540 Optimize serialization of quoted JSON strings.
2541 <https://webkit.org/b/144754>
2543 Reviewed by Darin Adler.
2545 * NetworkProcess/cache/NetworkCacheEntry.cpp:
2546 (WebKit::NetworkCache::Entry::asJSON): Use the new StringBuilder API.
2548 2015-05-08 Commit Queue <commit-queue@webkit.org>
2550 Unreviewed, rolling out r183945.
2551 https://bugs.webkit.org/show_bug.cgi?id=144789
2553 "It broke all the GTK+ tests" (Requested by KaL on #webkit).
2557 "[GTK] Checks for DEVELOPMENT_BUILD are all wrong"
2558 https://bugs.webkit.org/show_bug.cgi?id=144746
2559 http://trac.webkit.org/changeset/183945
2561 2015-05-07 Conrad Shultz <conrad_shultz@apple.com>
2563 Don't register for Lookup notifications until needed
2564 https://bugs.webkit.org/show_bug.cgi?id=144783
2566 Reviewed by Tim Horton.
2568 * UIProcess/API/mac/WKView.mm:
2569 Add a WKViewData ivar to track whether we've already registered for popover notifications.
2570 (-[WKView _prepareForDictionaryLookup]):
2571 Added; moved notification registration from -[WKView initWithFrame:processPool:configuration:webView:.
2572 (-[WKView initWithFrame:processPool:configuration:webView:]):
2573 Move notification registration to -_prepareForDictionaryLookup.
2575 * UIProcess/API/mac/WKViewInternal.h:
2576 Expose -_prepareForDictionaryLookup.
2578 * UIProcess/mac/PageClientImpl.mm:
2579 (WebKit::PageClientImpl::didPerformDictionaryLookup):
2580 Send -[WKView _prepareForDictionaryLookup].
2582 * UIProcess/mac/WKImmediateActionController.mm:
2583 (-[WKImmediateActionController _animationControllerForText]):
2586 2015-05-07 Commit Queue <commit-queue@webkit.org>
2588 Unreviewed, rolling out r183961.
2589 https://bugs.webkit.org/show_bug.cgi?id=144784
2591 Broke js/dom/JSON-stringify.html (Requested by kling on
2596 "Optimize serialization of quoted JSON strings."
2597 https://bugs.webkit.org/show_bug.cgi?id=144754
2598 http://trac.webkit.org/changeset/183961
2600 2015-05-07 Anders Carlsson <andersca@apple.com>
2604 * UIProcess/API/mac/WKView.mm:
2605 (-[WKView initWithFrame:processPool:configuration:webView:]):
2606 Use the regular init method.
2608 * UIProcess/mac/WKSharingServicePickerDelegate.mm:
2609 (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
2610 * WebProcess/WebPage/mac/WebPageMac.mm:
2611 (WebKit::WebPage::handleSelectionServiceClick):
2612 Pass empty dictionaries instead of nil.
2614 2015-05-07 Chris Dumez <cdumez@apple.com>
2616 ASSERTION when pasting text into the WebInspector console
2617 https://bugs.webkit.org/show_bug.cgi?id=144774
2619 Reviewed by Ryosuke Niwa.
2621 Fix assertion in didChangeSelection() meant to check that calling
2622 editorState() does not cause a synchronous layout. The assertion
2623 was not correct as it was relying on FrameView::needsLayout() and
2624 we would hit it if calling editorState() would schedule a layout.
2625 Instead, the new assertion relies on FrameView::layoutCount(),
2626 which is more accurate.
2628 * WebProcess/WebPage/WebPage.cpp:
2629 (WebKit::WebPage::didChangeSelection):
2631 2015-05-07 Andreas Kling <akling@apple.com>
2633 Optimize serialization of quoted JSON strings.
2634 <https://webkit.org/b/144754>
2636 Reviewed by Darin Adler.
2638 * NetworkProcess/cache/NetworkCacheEntry.cpp:
2639 (WebKit::NetworkCache::Entry::asJSON): Use the new StringBuilder API.
2641 2015-05-07 Martin Robinson <mrobinson@igalia.com>
2643 Followup fixes to r183936
2645 I neglected to include a few review comments when I landed the patch.
2647 * UIProcess/gtk/TextCheckerGtk.cpp:
2648 (WebKit::checkerState): Remove double semicolons.
2649 (WebKit::updateStateForAllProcessPools): Use range-based-for loop here and
2650 give the function a better name.
2651 (WebKit::TextChecker::setContinuousSpellCheckingEnabled): Use new function name
2652 (WebKit::TextChecker::setGrammarCheckingEnabled):Use new function name
2653 (WebKit::TextChecker::ignoreWord): Fix unused parameter warning.
2654 (WebKit::updateStateForAllContexts): Deleted.
2656 2015-05-07 Michael Catanzaro <mcatanzaro@igalia.com>
2658 [GTK] Checks for DEVELOPMENT_BUILD are all wrong
2659 https://bugs.webkit.org/show_bug.cgi?id=144746
2661 Reviewed by Martin Robinson.
2663 Use DEVELOPER_MODE rather than DEVELOPMENT_BUILD.
2665 * Shared/gtk/ProcessExecutablePathGtk.cpp:
2666 (WebKit::findWebKitProcess):
2667 * UIProcess/API/gtk/WebKitWebContext.cpp:
2668 (injectedBundleDirectory):
2669 * UIProcess/gtk/TextCheckerGtk.cpp:
2670 (WebKit::enchantTextChecker):
2672 2015-05-06 Dean Jackson <dino@apple.com>
2674 Handle backdrop views that have to tile
2675 https://bugs.webkit.org/show_bug.cgi?id=142317
2676 <rdar://problem/20049088>
2678 Reviewed by Simon Fraser.
2680 Take 2 - this was rolled out because Mavericks was crashing.
2682 Add some better logging for custom appearance.
2684 * Shared/mac/RemoteLayerTreeTransaction.mm:
2685 (WebKit::RemoteLayerTreeTextStream::operator<<):
2687 2015-05-07 Sungmann Cho <sungmann.cho@navercorp.com>
2689 Add PLUGIN_ARCHITECTURE(X11) around m_frameRectInWindowCoordinates in NetscapePlugin.
2690 https://bugs.webkit.org/show_bug.cgi?id=144490
2692 Reviewed by Darin Adler.
2694 m_frameRectInWindowCoordinates in NetscapePlugin is currently being used only for
2695 the windowed plugins, and the windowed plugins are only supported on X11. So we can
2696 guard it with PLUGIN_ARCHITECTURE(X11).
2698 No new tests, no behavior change.
2700 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2701 (WebKit::NetscapePlugin::geometryDidChange):
2702 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2704 2015-05-05 Myles C. Maxfield <mmaxfield@apple.com>
2706 Revert "Introducing the Platform Abstraction Layer (PAL)"
2707 https://bugs.webkit.org/show_bug.cgi?id=144751
2711 PAL should be a new target inside WebCore, rather than a top-level folder.
2713 * Configurations/FeatureDefines.xcconfig: Updated
2715 2015-05-07 Jer Noble <jer.noble@apple.com>
2717 [WK2][Fullscreen] Fullscreen video does not enter low-power mode.
2718 https://bugs.webkit.org/show_bug.cgi?id=144744
2720 Reviewed by Darin Adler.
2722 One of the requirements of entering low-power compositing mode is that no masking layers
2723 are present in any of the ancestors of the fullscreen video layer. So once our fullscreen
2724 transition animation completes, remove the mask layer entirely from our clipping layer.
2725 This means it needs to be re-created and added when entering fullscreen, rather than just
2726 at initialization time.
2728 * UIProcess/mac/WKFullScreenWindowController.mm:
2729 (-[WKFullScreenWindowController initWithWindow:webView:]):
2730 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
2731 (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
2733 2015-05-07 Martin Robinson <mrobinson@igalia.com>
2735 [GTK] All spell checking layout tests fail
2736 https://bugs.webkit.org/show_bug.cgi?id=144648
2738 Reviewed by Carlos Garcia Campos.
2740 Simplify and complete the GTK+ spell-checking implementation. Instead of using
2741 the EFL/GTK+ only WKTextChecker interface, directly implement Enchant spell-checking
2742 in TextCheckerGtk. The per-context spell checking API is an illusion, since all
2743 WKTextChecker implementations will adjust the same singleton. This can be a first step
2744 toward removing it entirely.
2746 Also complete the implementation of the TextChecker interface by duplicating the EFL code,
2747 which reuses other methods in the same class. Eventually this duplication will collapse,
2748 once GTK+ and EFL can share an Enchant implementation.
2750 * PlatformGTK.cmake:
2751 * UIProcess/API/gtk/WebKitPrivate.h:
2752 * UIProcess/API/gtk/WebKitTextChecker.cpp: Removed.
2753 * UIProcess/API/gtk/WebKitTextChecker.h: Removed.
2754 * UIProcess/API/gtk/WebKitWebContext.cpp: Remove WebTextChecker usage and
2755 replace it with calls directly to the TextChecker singleton via static methods.
2756 * UIProcess/TextChecker.h:
2757 * UIProcess/gtk/TextCheckerGtk.cpp: Move the WebTextChecker enchant implementation
2758 here and reuse the EFL version of WebKit::TextChecker::requestCheckingOfString.
2759 Also initialize languages properly when building for developer builds. This
2760 allows WebKitTestRunner to work even when it doesn't explicitly set the languages.
2762 2015-05-07 Ada Chan <adachan@apple.com>
2764 Fix a couple of cases where the backForwardListState's currentIndex is not set correctly in WebBackForwardList::backForwardListState().
2765 https://bugs.webkit.org/show_bug.cgi?id=144666
2767 Reviewed by Darin Adler.
2769 * UIProcess/WebBackForwardList.cpp:
2770 (WebKit::WebBackForwardList::backForwardListState):
2771 If the first item is filtered out and the currentIndex is 0, don't decrement currentIndex.
2772 If all the items are filtered out, set currentIndex to the uninitialized value.
2774 2015-05-07 Csaba Osztrogonác <ossy@webkit.org>
2776 [WK2] Remove Windows cruft
2777 https://bugs.webkit.org/show_bug.cgi?id=144745
2779 Reviewed by Darin Adler.
2781 * NetworkProcess/soup/NetworkProcessSoup.cpp:
2782 (WebKit::getMemorySize):
2783 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2784 (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::encode):
2785 (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::decode):
2786 * WebProcess/soup/WebProcessSoup.cpp:
2787 (WebKit::getMemorySize):
2789 2015-05-07 Carlos Garcia Campos <cgarcia@igalia.com>
2791 REGRESSION(r182032): [GTK] Production build is broken after r182032
2792 https://bugs.webkit.org/show_bug.cgi?id=144736
2794 Reviewed by Martin Robinson.
2796 The problem is that r182032 moved the NetworkProcess sources from
2797 WebKit2 sources to NetworkProcess sources. That's not a problem
2798 for developer builds where all internal symbols are exported, but
2799 doesn't work for production builds because all those internal
2800 symbols are private.
2802 * CMakeLists.txt: Use a different name for common network process
2804 * PlatformMac.cmake: Append common network process sources to the
2805 network process source list for Mac.
2807 2015-05-07 Dan Bernstein <mitz@apple.com>
2809 <rdar://problem/19317140> [Xcode] Remove usage of AspenFamily.xcconfig in Source/
2810 https://bugs.webkit.org/show_bug.cgi?id=144727
2812 Reviewed by Darin Adler.
2814 * Configurations/Base.xcconfig: Don’t include AspenFamily.xcconfig, and define
2815 INSTALL_PATH_PREFIX and LD_DYLIB_INSTALL_NAME for the iOS 8.x Simulator.
2816 * Configurations/WebKit2.xcconfig: Define INSTALL_PATH_ACTUAL and let INSTALL_PATH be
2817 derived from it and INSTALL_PATH_PREFIX. Don’t override DYLIB_INSTALL_NAME_BASE for iOS,
2818 because we define LD_DYLIB_INSTALL_NAME directly where needed.
2820 2015-05-07 Carlos Garcia Campos <cgarcia@igalia.com>
2822 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.1 release.
2824 * gtk/NEWS: Add release notes for 2.9.1.
2826 2015-05-07 Carlos Garcia Campos <cgarcia@igalia.com>
2828 [GTK] Remove dock button from Web Inspector window
2829 https://bugs.webkit.org/show_bug.cgi?id=144728
2831 Reviewed by Sergio Villar Senin.
2833 We added the dock buttons to the headerbar, because they were
2834 removed from the inspector toolbar, but with the new tabbed
2835 design, the dock buttons are back in the toolbar and look redundant.
2837 * UIProcess/WebInspectorProxy.h:
2838 * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2839 (WebKit::WebInspectorProxy::createInspectorWindow):
2840 (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
2841 (WebKit::WebInspectorProxy::dockButtonClicked): Deleted.
2843 2015-05-06 Jer Noble <jer.noble@apple.com>
2845 [WK2][Fullscreen] Elements whose children extend beyond their bounds are clipped in fullscreen mode.
2846 https://bugs.webkit.org/show_bug.cgi?id=144716
2848 Reviewed by Darin Adler.
2850 We create a mask animation for the transition between windowed and fullscreen modes, on the
2851 assumption that the element being taken into fullscreen mode does not have visible children
2852 who extend beyond that elements bounds. This assumption breaks down in the case where div
2853 with absolutely positioned children is taken fullscreen. While we can't necessarily make the
2854 transition look correct in this case, we can remove the mask after the transition completes.
2856 * UIProcess/mac/WKFullScreenWindowController.mm:
2857 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
2858 * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
2859 (WebKit::removeAllMediaKeyStorageForOriginPath):
2861 2015-05-06 Jinwoo Jeong <jw00.jeong@samsung.com>
2863 Fix a build break on EFL debug build
2864 https://bugs.webkit.org/show_bug.cgi?id=144654
2866 Reviewed by Gyuyoung Kim.
2868 No new tests, just build fix.
2870 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2871 (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
2872 (WebKit::CoordinatedGraphicsScene::paintToGraphicsContext):
2874 2015-05-06 Daniel Bates <dabates@apple.com>
2876 [iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
2877 https://bugs.webkit.org/show_bug.cgi?id=144657
2878 <rdar://problem/18894598>
2880 Reviewed by Andy Estes.
2882 Pause and resume the database thread when the UIProcess enters and leaves the background,
2883 respectively, so that we avoid WebProcess termination due to holding a locked SQLite
2884 database file when the WebProcess is suspended. This behavior matches the analagous
2885 behavior in Legacy WebKit.
2887 * UIProcess/WebPageProxy.h:
2888 * UIProcess/ios/WKContentView.mm:
2889 (-[WKContentView _applicationDidEnterBackground:]): Call WebPageProxy::applicationDidEnterBackground()
2890 when the UIProcess enters the background.
2891 * UIProcess/ios/WebPageProxyIOS.mm:
2892 (WebKit::WebPageProxy::applicationDidEnterBackground): Added; notify the WebProcess to pause the database thread.
2893 We temporarily take out background assertion on the WebProcess before sending this notification to ensure that the
2894 WebProcess is running to receive it. We'll release this assertion when the WebProcess replies that it received the
2896 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
2897 (WebKit::WebDatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseManager::setPauseAllDatabases().
2898 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
2899 * WebProcess/WebPage/WebPage.h:
2900 * WebProcess/WebPage/WebPage.messages.in: Add message ApplicationDidEnterBackground(). Also,
2901 add empty lines to help demarcate this message and the other UIKit application lifecycle-related
2902 messages from the rest of the list of messages.
2903 * WebProcess/WebPage/ios/WebPageIOS.mm:
2904 (WebKit::WebPage::applicationWillEnterForeground): Resume the database thread.
2905 (WebKit::WebPage::applicationDidEnterBackground): Pause the database thread.
2907 2015-05-06 Ryuan Choi <ryuan.choi@navercorp.com>
2909 [EFL] ewk_view_page_contents_get() API test is flaky
2910 https://bugs.webkit.org/show_bug.cgi?id=144683
2912 Reviewed by Gyuyoung Kim.
2914 Callback of WKPageGetContentsAsMHTMLData contains WKData which does not contain null terminated character.
2916 * UIProcess/API/efl/ewk_view.cpp: Pass the data of string instead of WKData directly.
2917 (ewkViewPageContentsAsMHTMLCallback):
2919 2015-05-06 Joseph Pecoraro <pecoraro@apple.com>
2921 Web Inspector: Docking Toolbar Buttons do not respect Docking Availability
2922 https://bugs.webkit.org/show_bug.cgi?id=144714
2924 Reviewed by Timothy Hatcher.
2926 * UIProcess/WebInspectorProxy.cpp:
2927 (WebKit::WebInspectorProxy::createInspectorPage):
2928 (WebKit::WebInspectorProxy::attachAvailabilityChanged):
2929 * WebProcess/WebPage/WebInspectorUI.cpp:
2930 (WebKit::WebInspectorUI::setDockingUnavailable):
2931 * WebProcess/WebPage/WebInspectorUI.h:
2932 * WebProcess/WebPage/WebInspectorUI.messages.in:
2933 When docking availability changes, inform the inspector page
2934 so it can respond by updating its UI.
2936 2015-05-06 Joonghun Park <jh718.park@samsung.com>
2938 [WK2] Simplify AsyncRequestImpl::ArgumentType parameters
2939 https://bugs.webkit.org/show_bug.cgi?id=144689
2941 Reviewed by Darin Adler.
2943 Remove duplicated typename and ::type from AsyncRequestImpl related
2944 function parameters.
2946 * Shared/AsyncRequest.h:
2948 2015-05-06 Commit Queue <commit-queue@webkit.org>
2950 Unreviewed, rolling out r183894.
2951 https://bugs.webkit.org/show_bug.cgi?id=144719
2953 crashes on mavericks (Requested by dino on #webkit).
2957 "Handle backdrop views that have to tile"
2958 https://bugs.webkit.org/show_bug.cgi?id=142317
2959 http://trac.webkit.org/changeset/183894
2961 2015-05-06 Brady Eidson <beidson@apple.com>
2963 Addition review followup for:
2964 Crash executing null AsyncRequest in IDB code.
2965 <rdar://problem/18854856> and https://bugs.webkit.org/show_bug.cgi?id=144715
2967 Reviewed by Darin Adler.
2969 This patch adds a layer on top of the UniqueIDBDatabase request map to catch this coding mistake in the future.
2971 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2972 (WebKit::UniqueIDBDatabase::didCompleteBoolRequest): Get rid of the ASSERT and the temporary variable,
2973 make it a single line which reads better.
2974 (WebKit::UniqueIDBDatabase::didPutRecordInBackingStore): Ditto.
2975 (WebKit::UniqueIDBDatabase::didGetRecordFromBackingStore): Ditto.
2976 (WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore): Ditto.
2977 (WebKit::UniqueIDBDatabase::didAdvanceCursorInBackingStore): Ditto.
2978 (WebKit::UniqueIDBDatabase::didIterateCursorInBackingStore): Ditto.
2979 (WebKit::UniqueIDBDatabase::didCountInBackingStore): Ditto.
2980 (WebKit::UniqueIDBDatabase::didDeleteRangeInBackingStore): Ditto.
2981 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h: Ditto.
2983 Add the class AsyncRequestMap which shadows a HashMap but does aggressive runtime checks
2984 in ::take() to make sure the same request was not dispatched twice in a row, and makes sure we
2985 never try to execute a null AsyncRequest by way of a RELEASE_ASSERT.
2986 * Shared/AsyncRequest.h:
2987 (WebKit::AsyncRequestMap::AsyncRequestMap):
2988 (WebKit::AsyncRequestMap::take):
2989 (WebKit::AsyncRequestMap::add):
2990 (WebKit::AsyncRequestMap::clear):
2991 (WebKit::AsyncRequestMap::values):
2993 2015-05-06 Brady Eidson <beidson@apple.com>
2995 Crash executing null AsyncRequest in IDB code.
2996 <rdar://problem/18854856> and https://bugs.webkit.org/show_bug.cgi?id=144715
2998 Reviewed by Darin Adler.
3000 When UniqueIDBDatabase fails to execute an operation on the database work queue it usually
3001 dispatches an AsyncRequest ID back to the main thread with an error callback.
3003 For two of its operations it would then also dispatch the success callback.
3005 In those cases the main thread would first take the AsyncRequest for the error callback out
3006 of a map and then execute it.
3008 It would then try to take the same AsyncRequest out of the map again, fail to do so, then
3009 execute a null AsyncRequest.
3011 This patch fixes the two functions to not dispatch both an error and success callback.
3013 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
3014 (WebKit::UniqueIDBDatabase::countInBackingStore): Return after dispatching the error callback.
3015 (WebKit::UniqueIDBDatabase::deleteRangeInBackingStore): Ditto.
3017 2015-05-06 Dean Jackson <dino@apple.com>
3019 Handle backdrop views that have to tile
3020 https://bugs.webkit.org/show_bug.cgi?id=142317
3021 <rdar://problem/20049088>
3023 Reviewed by Simon Fraser.
3025 Add some better logging for custom appearance.
3027 * Shared/mac/RemoteLayerTreeTransaction.mm:
3028 (WebKit::RemoteLayerTreeTextStream::operator<<):
3030 2015-05-06 Chris Dumez <cdumez@apple.com>
3032 Disable network cache efficacy logging
3033 https://bugs.webkit.org/show_bug.cgi?id=144703
3034 <rdar://problem/20439143>
3036 Reviewed by Andreas Kling.
3038 Disable network cache efficacy logging by default as we have sufficient
3041 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3042 (WebKit::registerUserDefaultsIfNeeded):
3044 2015-05-06 Timothy Horton <timothy_horton@apple.com>
3048 * UIProcess/mac/WKViewLayoutStrategy.mm:
3049 (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
3051 2015-05-06 Dan Bernstein <mitz@apple.com>
3053 No way to get a WKWebProcessPlugInFrame’s parent frame
3054 https://bugs.webkit.org/show_bug.cgi?id=144705
3056 Reviewed by Sam Weinig.
3058 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
3059 (-[WKWebProcessPlugInFrame _parentFrame]): Added this getter.
3060 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h: Declared new
3061 _parentFrame property.
3063 2015-05-06 Timothy Horton <timothy_horton@apple.com>
3067 * UIProcess/mac/WKViewLayoutStrategy.mm:
3068 (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
3070 2015-04-02 Myles C. Maxfield <mmaxfield@apple.com>
3072 Introducing the Platform Abstraction Layer (PAL)
3073 https://bugs.webkit.org/show_bug.cgi?id=143358
3075 Reviewed by Simon Fraser.
3077 * Configurations/FeatureDefines.xcconfig: Updated
3079 2015-05-05 Carlos Garcia Campos <cgarcia@igalia.com>
3081 [GTK][WK2] The WebKit network disk cache is not enabled
3082 https://bugs.webkit.org/show_bug.cgi?id=142821
3084 Reviewed by Martin Robinson.
3086 Enable NetworkCache for the GTK+ port.
3090 2015-05-06 Ryuan Choi <ryuan.choi@navercorp.com>
3092 [EFL] Remove redudant condition in ViewClientEfl::didChangeViewportAttributes
3093 https://bugs.webkit.org/show_bug.cgi?id=144672
3095 Reviewed by Gyuyoung Kim.
3097 ViewClientEfl::didChangeViewportAttributes is always called when fixed layout is disabled.
3099 * UIProcess/efl/ViewClientEfl.cpp:
3100 (WebKit::ViewClientEfl::didChangeViewportAttributes):
3101 Removes condition that checks whether fixed layout is enabled.
3103 2015-05-05 Alexey Proskuryakov <ap@apple.com>
3105 NetworkResourceLoader::cleanup() should clear ResourceHandle client pointer.
3106 https://bugs.webkit.org/show_bug.cgi?id=144641
3107 rdar://problem/20250960
3109 Reviewed by David Kilzer.
3111 * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::cleanup):
3112 Clear the client pointer.
3114 * Shared/Authentication/AuthenticationManager.cpp:
3115 (WebKit::AuthenticationManager::useCredentialForChallenge):
3116 (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
3117 (WebKit::AuthenticationManager::cancelChallenge):
3118 (WebKit::AuthenticationManager::performDefaultHandling):
3119 (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
3120 Updated comments, which were not accurate, at least on Mac.
3122 2015-05-05 Tim Horton <timothy_horton@apple.com>
3124 Views get stuck with viewScale < 1 after switching from DynamicSizeWithMinimumViewSize to ViewSize
3125 https://bugs.webkit.org/show_bug.cgi?id=144656
3127 Reviewed by Dan Bernstein.
3129 * UIProcess/mac/WKViewLayoutStrategy.mm:
3130 (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
3131 Reset the viewScale when we leave the DynamicSizeWithMinimumViewSize strategy.
3133 2015-05-05 Tim Horton <timothy_horton@apple.com>
3137 * Platform/mac/LayerHostingContext.mm:
3138 (WebKit::LayerHostingContext::setFencePort):
3140 2015-05-05 Tim Horton <timothy_horton@apple.com>
3144 * UIProcess/mac/WKViewLayoutStrategy.mm:
3145 (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
3147 2015-05-05 Timothy Horton <timothy_horton@apple.com>
3149 Add a layout mode for computing fixed layout size from a minimum size
3150 https://bugs.webkit.org/show_bug.cgi?id=144610
3151 <rdar://problem/19790341>
3153 Reviewed by Simon Fraser.
3155 Add a layout mode where WebKit determines the layout size with a set of
3156 (still in flux) heuristics, trying hard to keep the page usable below a
3157 particular client-defined threshold view size.
3159 This can mean that WebKit will start scaling down the page inside the view
3160 to make the whole page fit, using the viewScale mechanism.
3162 * UIProcess/API/C/WKLayoutMode.h:
3163 * UIProcess/API/Cocoa/_WKLayoutMode.h:
3164 Add the new layout mode, and documentation for the two complicated ones.
3166 * UIProcess/API/Cocoa/WKWebView.mm:
3167 (-[WKWebView _layoutMode]):
3168 (-[WKWebView _setLayoutMode:]):
3169 (-[WKWebView _setViewScale:]):
3170 (-[WKWebView _setMinimumViewSize:]):
3171 (-[WKWebView _minimumViewSize]):
3172 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3173 Forward the layoutMode and viewScale parameters to WKView if we have one.
3175 * UIProcess/API/Cocoa/WKViewPrivate.h:
3176 * UIProcess/API/mac/WKView.mm:
3177 (-[WKView dealloc]):
3178 (-[WKView viewWillStartLiveResize]):
3179 (-[WKView viewDidEndLiveResize]):
3180 (-[WKView setFrameSize:]):
3181 (-[WKView initWithFrame:processPool:configuration:webView:]):
3182 (-[WKView disableFrameSizeUpdates]):
3183 (-[WKView enableFrameSizeUpdates]):
3184 (-[WKView frameSizeUpdatesDisabled]):
3185 (-[WKView _layoutMode]):
3186 (-[WKView _setLayoutMode:]):
3187 (-[WKView _setViewScale:]):
3188 (-[WKView _setMinimumViewSize:]):
3189 (-[WKView _minimumViewSize]):
3190 Store the minimum view size, and update the fixed layout size if needed.
3192 (-[WKView _updateAutomaticallyComputedFixedLayoutSize]): Deleted.
3193 (-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]): Deleted.
3194 (-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]): Deleted.
3195 Store the WKLayoutMode on the WKViewLayoutStrategy instead of having a
3196 bunch of things like _automaticallyComputesFixedLayoutSizeFromViewScale.
3198 * UIProcess/API/mac/WKViewInternal.h:
3200 * UIProcess/mac/WKViewLayoutStrategy.h: Added.
3201 * UIProcess/mac/WKViewLayoutStrategy.mm: Added.
3202 (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
3203 (-[WKViewLayoutStrategy initWithPage:view:mode:]):
3204 (-[WKViewLayoutStrategy willDestroyView:]):
3205 (-[WKViewLayoutStrategy layoutMode]):
3206 (-[WKViewLayoutStrategy updateLayout]):
3207 (-[WKViewLayoutStrategy disableFrameSizeUpdates]):
3208 (-[WKViewLayoutStrategy enableFrameSizeUpdates]):
3209 (-[WKViewLayoutStrategy frameSizeUpdatesDisabled]):
3210 (-[WKViewLayoutStrategy didChangeViewScale]):
3211 (-[WKViewLayoutStrategy didChangeMinimumViewSize]):
3212 (-[WKViewLayoutStrategy willStartLiveResize]):
3213 (-[WKViewLayoutStrategy didEndLiveResize]):
3214 (-[WKViewLayoutStrategy didChangeFrameSize]):
3215 (-[WKViewLayoutStrategy willChangeLayoutStrategy]):
3216 (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]):
3217 (-[WKViewViewSizeLayoutStrategy updateLayout]):
3218 (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]):
3219 (-[WKViewFixedSizeLayoutStrategy updateLayout]):
3220 (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]):
3221 (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
3222 (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeViewScale]):
3223 (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
3224 Move the existing layout strategies from WKView into WKViewLayoutStrategy subclasses.
3226 (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]):
3227 (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
3228 (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeMinimumViewSize]):
3229 (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willStartLiveResize]):
3230 (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didEndLiveResize]):
3231 While in live resize with the new layout mode, disable frame size updates.
3232 The new layout mode will do a live scale during part of the resize, and
3233 we don't always want to send the new view size to the Web process.
3235 (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeFrameSize]):
3236 (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
3237 While in the new layout mode, maintain the viewScale as the minimum of the
3238 scale required to fit the current view frame size inside the minimumViewSize.
3239 If no scaling is required, carry on as usual, pushing the new view frame size
3240 to the DrawingArea and on to the Web process.
3241 If scaling is required, apply a transform to the view in the UI process,
3242 until the live resize completes, in which case we send a fenced viewScale
3243 adjustment to the Web process (so that the tiles paint at the new viewScale
3244 synchronized with the removal of the transform in the UI process).
3246 * UIProcess/WebPageProxy.cpp:
3247 (WebKit::WebPageProxy::scaleViewFenced):
3248 * UIProcess/WebPageProxy.h:
3249 * WebProcess/WebPage/DrawingArea.h:
3250 (WebKit::DrawingArea::addFence):
3251 (WebKit::DrawingArea::acceleratedAnimationDidEnd): Deleted.
3252 * WebProcess/WebPage/WebPage.cpp:
3253 (WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
3254 * WebProcess/WebPage/WebPage.h:
3255 * WebProcess/WebPage/WebPage.messages.in:
3256 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3257 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3258 (WebKit::TiledCoreAnimationDrawingArea::addFence):
3259 Add scaleViewAndUpdateGeometryFenced and the ability to install CoreAnimation fences on
3260 TiledCoreAnimationDrawingArea's CAContext.
3262 Add the ability to send updateGeometry out-of-band, so that
3263 we can send it synchronously inside the message along with the CA fence.
3264 We have to both change the viewScale and updateGeometry simultaneously
3265 in the same CA commit that we install the fence into, in order to ensure
3266 that there is no flash.
3268 2015-05-05 Alex Christensen <achristensen@webkit.org>
3270 [Content Extensions] Release input NSString when finished copying it.
3271 https://bugs.webkit.org/show_bug.cgi?id=144642
3273 Reviewed by Brian Weinstein.
3275 * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
3276 * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
3277 (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
3279 2015-05-05 Alex Christensen <achristensen@webkit.org>
3281 [Content Extensions] Use less memory to store the json input.
3282 https://bugs.webkit.org/show_bug.cgi?id=144604
3284 Reviewed by Benjamin Poulain.
3286 * UIProcess/API/APIUserContentExtensionStore.cpp:
3287 (API::compiledToFile):
3288 (API::UserContentExtensionStore::compileContentExtension):
3289 * UIProcess/API/APIUserContentExtensionStore.h:
3290 Don't copy strings as much or keep them alive after done using them.
3292 2015-05-04 Alex Christensen <achristensen@webkit.org>
3294 [Content Extensions] Use less memory when writing byte code to file
3295 https://bugs.webkit.org/show_bug.cgi?id=144602
3297 Reviewed by Darin Adler.
3299 * UIProcess/API/APIUserContentExtensionStore.cpp:
3300 (API::decodeContentExtensionMetaData):
3301 (API::writeDataToFile):
3302 (API::compiledToFile):
3303 (API::createExtension):
3304 Compile and write each DFA to file, then come back and write the header when finalizing.
3305 Also don't copy the DFA bytecode. This way, we don't need to keep more than one DFA's
3306 bytecode in memory at a time.
3308 2015-05-05 Sungmann Cho <sungmann.cho@navercorp.com>
3310 Make all FrameLoadState data members private.
3311 https://bugs.webkit.org/show_bug.cgi?id=144562
3313 Reviewed by Darin Adler.
3315 Previously, all of the data members in FrameLoadState were public and accessed directly
3316 from outside the class. But these should all be private as noted in FrameLoadState.h
3317 for better encapsulation.
3319 No new tests, no behavior change.
3321 * UIProcess/API/C/WKFrame.cpp:
3322 (WKFrameGetFrameLoadState):
3323 * UIProcess/FrameLoadState.h:
3324 (WebKit::FrameLoadState::state):
3325 (WebKit::FrameLoadState::url):
3326 (WebKit::FrameLoadState::provisionalURL):
3327 (WebKit::FrameLoadState::unreachableURL):
3328 * UIProcess/WebFrameProxy.h:
3329 (WebKit::WebFrameProxy::url):
3330 (WebKit::WebFrameProxy::provisionalURL):
3331 (WebKit::WebFrameProxy::unreachableURL):
3333 2015-05-05 Alexey Proskuryakov <ap@apple.com>
3335 Crashes in SandboxExtension::consumePermanently when uploading
3336 https://bugs.webkit.org/show_bug.cgi?id=144611
3337 rdar://problem/10156710
3339 Reviewed by Darin Adler.
3341 This only fixes the crashes, uploading still won't work.
3342 Added null checks and some logging that may help us get to the root cause eventually.
3344 * Shared/SandboxExtension.h:
3345 (WebKit::SandboxExtension::createHandle):
3346 (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
3347 * Shared/mac/SandboxExtensionMac.mm:
3348 (WebKit::SandboxExtension::createHandle):
3349 (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
3350 * UIProcess/WebPageProxy.cpp:
3351 (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
3352 * WebProcess/WebPage/WebPage.cpp:
3353 (WebKit::WebPage::extendSandboxForFileFromOpenPanel):
3355 2015-05-05 Csaba Osztrogonác <ossy@webkit.org>
3357 Remove TextureMapperImageBuffer
3358 https://bugs.webkit.org/show_bug.cgi?id=143561
3360 Reviewed by Žan Doberšek.
3362 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
3363 (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
3364 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3365 (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
3367 2015-05-05 Carlos Garcia Campos <cgarcia@igalia.com>
3369 [SOUP] Network Cache: IOChannel operations are not sent to the right thread
3370 https://bugs.webkit.org/show_bug.cgi?id=144542
3372 Reviewed by Darin Adler.
3374 We are ignoring the given WorkQueue and running the async
3375 operations in the current thread. Check the given WorkQueue
3376 instead and schedule the operation to the given queue. If the
3377 given queue is nullptr, which means the operation should be run in
3378 the main context, the operation is run directly if the current
3379 context is the main one or sent to the main context using a
3382 Fixes crashes due to asserts when running disk-cache layout tests
3385 * NetworkProcess/cache/NetworkCacheIOChannel.h:
3386 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
3387 (WebKit::NetworkCache::runTaskInQueue):
3388 (WebKit::NetworkCache::IOChannel::read):
3389 (WebKit::NetworkCache::IOChannel::readSync):
3390 (WebKit::NetworkCache::IOChannel::write):
3392 2015-05-04 Dan Bernstein <mitz@apple.com>
3394 WebKit always goes through LaunchServices for main frame navigation actions
3395 https://bugs.webkit.org/show_bug.cgi?id=144608
3397 Reviewed by Tim Horton.
3399 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Defined
3400 _WKNavigationActionPolicyAllowWithoutTryingAppLink.
3401 * UIProcess/Cocoa/NavigationState.mm:
3402 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): If the policy
3403 is _WKNavigationActionPolicyAllowWithoutTryingAppLink, don’t go through tryAppLink.
3405 2015-05-04 Enrica Casucci <enrica@apple.com>
3407 [iOS WK2] editorState should include information about selection clipping rectangle.
3408 https://bugs.webkit.org/show_bug.cgi?id=144603
3409 rdar://problem/20521252
3411 Reviewed by Chris Dumez.
3413 Adding selectionClipRect to the post-layout portion of EditorState.
3414 This way we can compute the selection clipping rectangle based on
3415 up-to-date information instead of using the rectangle provided when
3416 then element was first focused.
3418 * Shared/EditorState.cpp:
3419 (WebKit::EditorState::PostLayoutData::encode):
3420 (WebKit::EditorState::PostLayoutData::decode):
3421 * Shared/EditorState.h:
3422 * UIProcess/ios/WKContentViewInteraction.mm:
3423 (-[WKContentView _selectionClipRect]):
3424 * WebProcess/WebPage/ios/WebPageIOS.mm:
3425 (WebKit::WebPage::platformEditorState):
3427 2015-05-04 Antti Koivisto <antti@apple.com>
3429 Network Cache: Support time based cache clearing
3430 https://bugs.webkit.org/show_bug.cgi?id=144568
3431 <rdar://problem/19769820>
3433 Reviewed by Andreas Kling.
3435 Support clearing cache entries newer than given time only.
3437 * NetworkProcess/cache/NetworkCache.cpp:
3438 (WebKit::NetworkCache::Cache::deleteDumpFile):
3439 (WebKit::NetworkCache::Storage::traverse):
3441 Also fix thread safety of traverse handler function.
3443 (WebKit::NetworkCache::Cache::clear):
3445 Also add completion handler to support the API properly.
3447 * NetworkProcess/cache/NetworkCache.h:
3448 * NetworkProcess/cache/NetworkCacheStorage.cpp:
3449 (WebKit::NetworkCache::Storage::clear):
3450 * NetworkProcess/cache/NetworkCacheStorage.h:
3451 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3452 (WebKit::clearNSURLCache):
3454 Factor to a function.
3456 (WebKit::NetworkProcess::clearDiskCache):
3458 2015-05-04 Zan Dobersek <zdobersek@igalia.com>
3460 [WTF] Remove Functional.h inclusions
3461 https://bugs.webkit.org/show_bug.cgi?id=144400
3463 Reviewed by Darin Adler.
3465 Remove unnecessary inclusions of the <wtf/Functional.h> header in WebKit2.
3467 * Platform/IPC/unix/ConnectionUnix.cpp:
3468 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Import the <objc/runtime.h>
3469 header that was previously indirectly included through the Functional.h header.
3470 * WebProcess/WebPage/DrawingArea.cpp:
3472 2015-05-04 Csaba Osztrogonác <ossy@webkit.org>
3474 [ARM] Don't compare unsigned chars to EOF (-1)
3475 https://bugs.webkit.org/show_bug.cgi?id=144439