1 2014-06-11 Anders Carlsson <andersca@apple.com>
3 Move more WKPreferences to WKWebViewConfiguration
4 https://bugs.webkit.org/show_bug.cgi?id=133756
5 <rdar://problem/17271468>
7 Reviewed by Tim Horton.
9 * UIProcess/API/Cocoa/WKPreferences.h:
10 * UIProcess/API/Cocoa/WKPreferences.mm:
11 (-[WKPreferences setMinimumFontSize:]):
12 (-[WKPreferences suppressesIncrementalRendering]): Deleted.
13 (-[WKPreferences setSuppressesIncrementalRendering:]): Deleted.
14 (-[WKPreferences allowsInlineMediaPlayback]): Deleted.
15 (-[WKPreferences setAllowsInlineMediaPlayback:]): Deleted.
16 (-[WKPreferences mediaPlaybackRequiresUserAction]): Deleted.
17 (-[WKPreferences setMediaPlaybackRequiresUserAction:]): Deleted.
18 (-[WKPreferences mediaPlaybackAllowsAirPlay]): Deleted.
19 (-[WKPreferences setMediaPlaybackAllowsAirPlay:]): Deleted.
20 * UIProcess/API/Cocoa/WKWebView.mm:
21 (-[WKWebView initWithFrame:configuration:]):
22 * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
23 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
24 (-[WKWebViewConfiguration copyWithZone:]):
25 * WebKit2.xcodeproj/project.pbxproj:
27 2014-06-11 Enrica Casucci <enrica@apple.com>
29 WebKit2 iOS: Unable to open UI menu for "open in new tab" for links on yahoo.com.
30 https://bugs.webkit.org/show_bug.cgi?id=133749
31 <rdar://problem/17165992>
33 Reviewed by Brady Eidson.
35 The URL returned to the UIProcess as string needs to be encoded.
37 * WebProcess/WebPage/ios/WebPageIOS.mm:
38 (WebKit::WebPage::getPositionInformation):
40 2014-06-10 Anders Carlsson <andersca@apple.com>
42 Move suppressesIncrementalRendering to WKWebViewConfiguration
43 https://bugs.webkit.org/show_bug.cgi?id=133707
44 <rdar://problem/17271468>
46 Reviewed by Sam Weinig.
48 * UIProcess/API/Cocoa/WKPreferences.h:
49 Get rid of suppressesIncrementalRendering.
51 * UIProcess/API/Cocoa/WKWebView.mm:
52 (-[WKWebView initWithFrame:configuration:]):
53 Set the suppressesIncrementalRenderingKey key in webPageConfiguration.preferenceValues.
55 * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
56 Add suppressesIncrementalRendering.
58 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
59 (-[WKWebViewConfiguration copyWithZone:]):
60 Assign suppressesIncrementalRendering.
62 * UIProcess/WebPageProxy.cpp:
63 (WebKit::WebPageProxy::WebPageProxy):
64 Copy webPageConfiguration.preferenceValues to m_configurationPreferenceValues.
66 (WebKit::WebPageProxy::preferencesStore):
67 If m_configurationPreferenceValues is empty, just return m_preferences->store(). Otherwise,
68 copy the store and apply the configuration preference values.
70 (WebKit::WebPageProxy::preferencesDidChange):
71 Call preferencesStore() so we'll get the configuration preference values as well.
73 (WebKit::WebPageProxy::creationParameters):
76 * UIProcess/WebPageProxy.h:
78 2014-06-11 Antti Koivisto <antti@apple.com>
80 Wrap NSURLRequest in bundle API
81 https://bugs.webkit.org/show_bug.cgi?id=133732
82 <rdar://problem/17267217>
84 Reviewed by Andreas Kling.
86 Patch by Dan Bernstein.
88 We don't want to construct actual NSURLRequests in the web process side unless really needed as it is slow.
90 * Shared/Cocoa/APIObject.mm:
91 (API::Object::newObject):
92 * Shared/Cocoa/WKNSURLRequest.h: Added.
94 * Shared/Cocoa/WKNSURLRequest.mm: Added.
96 Add a wrapper object that initializes the underlying NSURLRequest on-demand.
98 (-[WKNSURLRequest _web_createTarget]):
99 (-[WKNSURLRequest URL]):
100 (-[WKNSURLRequest copyWithZone:]):
101 * WebKit2.xcodeproj/project.pbxproj:
102 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
103 (willSendRequestForFrame):
104 (didInitiateLoadForResource):
106 2014-06-11 Dan Bernstein <mitz@apple.com>
108 <rdar://problem/17218629> [Cocoa] WKWebView’s canGoBack and canGoForward properties are not KVO-compliant
109 https://bugs.webkit.org/show_bug.cgi?id=133722
111 Reviewed by Anders Carlsson.
113 * UIProcess/API/Cocoa/WKBrowsingContextController.mm: Added no-op overrides of new
114 PageLoadStateObserver member functions.
116 * UIProcess/API/Cocoa/WKWebView.h: Documented the canGoBack and canGoForward properties as
118 * UIProcess/API/Cocoa/WKWebView.mm:
119 (-[WKWebView canGoBack]): Changed to get the return value from the page load state.
120 (-[WKWebView canGoForward]): Ditto.
122 * UIProcess/Cocoa/NavigationState.h:
123 * UIProcess/Cocoa/NavigationState.mm:
124 (WebKit::NavigationState::willChangeCanGoBack): Override this new PageLoadStateObserver
125 member function by sending the appropriate KVO change message to the WKWebView.
126 (WebKit::NavigationState::didChangeCanGoBack): Ditto.
127 (WebKit::NavigationState::willChangeCanGoForward): Ditto.
128 (WebKit::NavigationState::didChangeCanGoForward): Ditto.
130 * UIProcess/PageLoadState.cpp:
131 (WebKit::PageLoadState::commitChanges): Check for changes to canGoBack and canGoForward
132 and call the observers if needed.
133 (WebKit::PageLoadState::canGoBack): Added. Returns the value from the committed state.
134 (WebKit::PageLoadState::setCanGoBack): Added. Sets the value in the uncommitted state.
135 (WebKit::PageLoadState::canGoForward): Added. Returns the value from the committed state.
136 (WebKit::PageLoadState::setCanGoForward): Added. Sets the value in the uncommitted state.
137 * UIProcess/PageLoadState.h:
138 (WebKit::PageLoadState::Data::Data): Added canGoBack and canGoForward boolean members.
140 * UIProcess/WebPageProxy.cpp:
141 (WebKit::WebPageProxy::didChangeBackForwardList): Update the page load state with the new
142 state of canGoBack and canGoForward.
143 * UIProcess/WebPageProxy.h: Removed unused member variables m_canGoBack and m_canGoForward.
145 2014-06-11 Zan Dobersek <zdobersek@igalia.com>
147 Avoid Vector copies in WebNotificationManagerProxy::providerDidCloseNotifications(), FindController::findStringMatches()
148 https://bugs.webkit.org/show_bug.cgi?id=133676
150 Reviewed by Andreas Kling.
152 * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
153 (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): Move the newly-created
154 Vector object into the HashMap<>::add() call.
155 * WebProcess/WebPage/FindController.cpp:
156 (WebKit::FindController::findStringMatches): Movethe newly-create Vector object into the
157 Vector<>::append() call.
159 2014-06-11 Shivakumar JM <shiva.jm@samsung.com>
161 [EFL][WK2] Add missing test cases for EWK2ViewTest.
162 https://bugs.webkit.org/show_bug.cgi?id=133715
164 Reviewed by Gyuyoung Kim.
166 Add missing test cases for ewk_view.h APIs, ewk_view_stop(), ewk_view_html_string_load(), ewk_view_theme_get(),
167 ewk_view_feed_touch_event(), ewk_view_text_find_highlight_clear(), ewk_view_text_find(), ewk_view_text_matches_count(),
168 ewk_view_page_contents_get(), ewk_view_script_execute().
171 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
174 2014-06-11 Carlos Garcia Campos <cgarcia@igalia.com>
176 [GTK] Use a different user agent string depending on the site
177 https://bugs.webkit.org/show_bug.cgi?id=132681
179 Reviewed by Anders Carlsson.
181 * UIProcess/API/gtk/WebKitSettings.cpp:
182 (webkit_settings_class_init): Enable site specific quirks setting
184 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
185 (WebKit::WebFrameLoaderClient::userAgent): Pass the given URL to WebPage.
186 * WebProcess/WebPage/WebPage.cpp:
187 (WebKit::WebPage::userAgent): Try to get the user agent for the
188 URL received falling back to the current one otherwise.
189 * WebProcess/WebPage/WebPage.h:
190 (WebKit::WebPage::platformUserAgent): Added.
191 * WebProcess/WebPage/efl/WebPageEfl.cpp:
192 (WebKit::WebPage::platformUserAgent): Return null String.
193 * WebProcess/WebPage/gtk/WebPageGtk.cpp:
194 (WebKit::WebPage::platformUserAgent): Use WebCore::standardUserAgentForURL() when site specific quirks
196 * WebProcess/WebPage/ios/WebPageIOS.mm:
197 (WebKit::WebPage::platformUserAgent): Return null String.
198 * WebProcess/WebPage/mac/WebPageMac.mm:
199 (WebKit::WebPage::platformUserAgent): Return null String.
201 2014-06-10 Benjamin Poulain <benjamin@webkit.org>
203 [iOS][WK2] ScrollingTreeOverflowScrollingNode does not use asynchronous touch dispatch
204 https://bugs.webkit.org/show_bug.cgi?id=133702
205 <rdar://problem/17259261>
207 Reviewed by Simon Fraser.
209 Notify the WKWebView and the TouchGestureRecognizer when on of the internal UIScrollView
210 starts scrolling in response to a gesture.
212 * UIProcess/PageClient.h:
213 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
214 * UIProcess/Scrolling/RemoteScrollingTree.cpp:
215 (WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartPanGesture):
216 * UIProcess/Scrolling/RemoteScrollingTree.h:
217 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
218 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
219 (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
220 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewWillStartPanGesture):
221 * UIProcess/WebPageProxy.h:
222 * UIProcess/ios/PageClientImplIOS.h:
223 * UIProcess/ios/PageClientImplIOS.mm:
224 (WebKit::PageClientImpl::scrollViewWillStartPanGesture):
225 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
226 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartPanGesture):
227 * UIProcess/ios/WebPageProxyIOS.mm:
228 (WebKit::WebPageProxy::scrollViewWillStartPanGesture):
230 2014-06-10 Dan Bernstein <mitz@apple.com>
232 WebKit2 part of [Cocoa] Handling authentication challenges should not require multiple delegate methods
233 https://bugs.webkit.org/show_bug.cgi?id=133697
235 Reviewed by Anders Carlsson.
237 * Shared/Authentication/AuthenticationManager.cpp:
238 (WebKit::AuthenticationManager::performDefaultHandling): Added. Calls the new
239 AuthenticationClient function receivedRequestToPerformDefaultHandling.
240 (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue): Added. Calls the new
241 AuthenticationClient function receivedChallengeRejection.
242 * Shared/Authentication/AuthenticationManager.h:
243 * Shared/Authentication/AuthenticationManager.messages.in: Added new messages
244 PerformDefaultHandling and RejectProtectionSpaceAndContinue.
246 * Shared/Downloads/DownloadAuthenticationClient.h: Override new AuthenticationClient member
249 * Shared/Downloads/ios/DownloadIOS.mm:
250 (WebKit::Download::receivedRequestToPerformDefaultHandling): Added empty implementation.
251 (WebKit::Download::receivedChallengeRejection): Ditto.
253 * Shared/Downloads/mac/DownloadMac.mm:
254 (WebKit::Download::receivedRequestToPerformDefaultHandling): Added. Forwards to the sender.
255 (WebKit::Download::receivedChallengeRejection): Ditto.
257 * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
258 (checkChallenge): Factored out a bit of code into this helper function.
259 (-[WKNSURLAuthenticationChallengeSender cancelAuthenticationChallenge:]): Use new helper.
260 (-[WKNSURLAuthenticationChallengeSender continueWithoutCredentialForAuthenticationChallenge:]):
262 (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]): Ditto.
263 (-[WKNSURLAuthenticationChallengeSender performDefaultHandlingForAuthenticationChallenge:]):
264 Implemented this optional NSURLAuthenticationChallengeSender protocol method by forwarding
265 to the decision listener.
266 (-[WKNSURLAuthenticationChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]):
269 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
271 * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
272 (WebKit::AuthenticationChallengeProxy::performDefaultHandling): Added. Sends a message to
273 the authentication manager.
274 (WebKit::AuthenticationChallengeProxy::rejectProtectionSpaceAndContinue): Ditto.
275 * UIProcess/Authentication/AuthenticationChallengeProxy.h:
277 * UIProcess/Authentication/AuthenticationDecisionListener.cpp:
278 (WebKit::AuthenticationDecisionListener::performDefaultHandling): Added. Forwards to the
279 authentication challenge proxy.
280 (WebKit::AuthenticationDecisionListener::rejectProtectionSpaceAndContinue): Ditto.
281 * UIProcess/Authentication/AuthenticationDecisionListener.h:
283 * UIProcess/Cocoa/NavigationState.h: Added flag in m_navigationDelegateMethods struct.
284 * UIProcess/Cocoa/NavigationState.mm:
285 (WebKit::NavigationState::setNavigationDelegate): Initialize
286 webViewWillSendRequestForAuthenticationChallenge flag in the delegate methods struct.
287 (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): If
288 the delegate implements -_webView:willSendRequestForAuthenticationChallenge:, return true
289 here; the delegate will respond with -rejectProtectionSpaceAndContinueWithChallenge: if
290 it cannot authenticate.
291 (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): If the
292 delegate implements -_webView:willSendRequestForAuthenticationChallenge:, send that message.
294 2014-06-10 Timothy Horton <timothy_horton@apple.com>
296 Factor repeated CFRunLoopObserver code out
297 https://bugs.webkit.org/show_bug.cgi?id=133690
299 Reviewed by Simon Fraser.
301 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
302 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
303 (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
304 (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
305 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
306 (WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
307 (WebKit::coreAnimationDidCommitLayersCallback): Deleted.
308 (WebKit::RemoteLayerTreeDrawingAreaProxy::scheduleCoreAnimationLayerCommitObserver): Deleted.
309 (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers): Deleted.
310 Make use of WebCore::RunLoopObserver.
312 2014-06-10 Anders Carlsson <andersca@apple.com>
314 Fix availability declaration.
316 * UIProcess/API/Cocoa/WKError.h:
318 2014-06-10 Anders Carlsson <andersca@apple.com>
320 Address a comment about a comment.
322 * UIProcess/API/Cocoa/WKWebView.mm:
323 (-[WKWebView evaluateJavaScript:completionHandler:]):
325 2014-06-10 Anders Carlsson <andersca@apple.com>
327 Add -[WKWebView evaluateJavaScript:completionHandler:]
328 https://bugs.webkit.org/show_bug.cgi?id=133689
329 <rdar://problem/17152685>
331 Reviewed by Geoffrey Garen.
333 * Shared/API/c/WKErrorRef.h:
334 Remove WKErrorCode typedef from here.
336 * UIProcess/API/C/WKPageLoaderClient.h:
337 Use uint32_t instead of WKErrorCode.
339 * UIProcess/API/Cocoa/WKError.h:
341 Add a WKErrorDomain and a WKErrorCode enum.
343 * UIProcess/API/Cocoa/WKError.mm:
344 (localizedDescriptionForErrorCode):
345 Helper that returns the localized description given an error code.
348 Helper that creates an NSError with the correct localized description given an error code.
350 * UIProcess/API/Cocoa/WKErrorInternal.h:
353 * UIProcess/API/Cocoa/WKWebView.h:
354 Add evaluateJavaScript:completionHandler: method.
356 * UIProcess/API/Cocoa/WKWebView.mm:
358 Helper that returns a WKErrorCode from a WebKit::CallbackBase::Error enum.
360 (-[WKWebView evaluateJavaScript:completionHandler:]):
361 Run the JavaScript code and handle all the error cases.
363 (-[WKWebView _runJavaScriptInMainFrame:]):
364 Reimplement this using the API method.
366 * WebKit2.xcodeproj/project.pbxproj:
369 2014-06-10 Anders Carlsson <andersca@apple.com>
371 Don't call Connection::terminateSoon if the connection is null
372 https://bugs.webkit.org/show_bug.cgi?id=133695
373 <rdar://problem/17069024>
375 Reviewed by Tim Horton.
377 * UIProcess/WebProcessProxy.cpp:
378 (WebKit::WebProcessProxy::removeWebPage):
380 2014-06-10 Oliver Hunt <oliver@apple.com>
382 Add process entitlements
383 https://bugs.webkit.org/show_bug.cgi?id=133693
385 Reviewed by Alexey Proskuryakov.
387 Add entitlements description for Database process, and
388 ensure that we reference the correct seatbelt profiles.
390 * Configurations/DatabaseService.Development.xcconfig:
391 * Configurations/DatabaseService.xcconfig:
392 * Configurations/Databases-iOS.entitlements:
393 * Configurations/Network-iOS.entitlements:
394 * Configurations/WebContent-iOS.entitlements:
395 * WebKit2.xcodeproj/project.pbxproj:
397 2014-06-10 Alexey Proskuryakov <ap@apple.com>
399 Fix crashes on some plug-in tests.
400 https://bugs.webkit.org/show_bug.cgi?id=133691
401 <rdar://problem/17255836>
403 Reviewed by Anders Carlsson.
405 * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::initialize):
406 Cannot use TemporaryChange here, because the object may go away before stack unwinds.
408 2014-06-10 Antti Koivisto <antti@apple.com>
410 Serialize ResourceRequests without platform request
411 https://bugs.webkit.org/show_bug.cgi?id=133679
413 Reviewed by Alexey Proskuryakov.
415 * Shared/WebCoreArgumentCoders.cpp:
416 (IPC::ArgumentCoder<ResourceRequest>::encode):
417 (IPC::ArgumentCoder<ResourceRequest>::decode):
419 Encode ResourceRequest directly if possible.
421 2014-06-09 Anders Carlsson <andersca@apple.com>
425 * UIProcess/WebPageProxy.cpp:
426 (WebKit::WebPageProxy::resetState):
428 2014-06-09 Simon Fraser <simon.fraser@apple.com>
430 Work towards having frames in the scrolling tree
431 https://bugs.webkit.org/show_bug.cgi?id=133665
433 Reviewed by Tim Horton.
435 Override coordinatesScrollingForFrameView() to always return true for composited
436 frames, for iOS WK2 (eventually this class will have to be specialized for iOS and OS X).
438 * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
439 * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
440 (WebKit::RemoteScrollingCoordinator::coordinatesScrollingForFrameView):
442 2014-06-09 Anders Carlsson <andersca@apple.com>
444 Give callbacks real status codes
445 https://bugs.webkit.org/show_bug.cgi?id=133668
447 Reviewed by Dan Bernstein.
449 This makes it possible to know whether a callback was invalidated due to the webpage being closed,
450 or whether it was due the a web process crash.
452 * UIProcess/GenericCallback.h:
453 (WebKit::GenericCallback::create):
454 (WebKit::GenericCallback::performCallbackWithReturnValue):
455 (WebKit::GenericCallback::invalidate):
456 (WebKit::invalidateCallbackMap):
457 * UIProcess/WebPageProxy.cpp:
458 (WebKit::WebPageProxy::close):
459 (WebKit::WebPageProxy::resetState):
460 (WebKit::WebPageProxy::resetStateAfterProcessExited):
461 * UIProcess/WebPageProxy.h:
463 2014-06-09 Enrica Casucci <enrica@apple.com>
465 iOS WebKit: Crash in charactersAroundPosition.
466 https://bugs.webkit.org/show_bug.cgi?id=133659
467 <rdar://problem/17220870>
469 Reviewed by Benjamin Poulain.
471 We only need to compute charactersAroundPosition when we are in
474 * WebProcess/WebPage/WebPage.cpp:
475 (WebKit::WebPage::editorState):
477 2014-06-06 Andy Estes <aestes@apple.com>
479 [iOS] Expose _WKWebViewPrintFormatter and -_webView:printFrame: as SPI
480 https://bugs.webkit.org/show_bug.cgi?id=133600
482 Reviewed by David Kilzer.
484 Expose -_webView:printFrame: in WKUIDelegatePrivate so that clients can implement support for window.print().
485 Since window.print() can be called from a subframe, expose _WKWebViewPrintFormatter (renamed from
486 WKWebViewPrintFormatter to reflect its new SPI status) as SPI and add a frameToPrint property.
488 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Forward-declared _WKFrameHandle and declared -_webView:printFrame:.
489 * UIProcess/API/Cocoa/WKWebView.mm:
490 (-[WKWebView _webViewPrintFormatter]): Added to get a _WKWebViewPrintFormatter.
491 (-[WKWebView _printFormatterClass]): Updated the class name to _WKWebViewPrintFormatter.
492 (-[WKWebView _computePageCountAndStartDrawingToPDFForFrame:printInfo:WebKit::firstPage:computedTotalScaleFactor:]):
493 Added a frame argument. If frame is nil, print the main frame.
494 (-[WKWebView _computePageCountAndStartDrawingToPDFWithPrintInfo:WebKit::firstPage:computedTotalScaleFactor:]): Deleted.
495 * UIProcess/API/Cocoa/WKWebViewInternal.h: Forward-declared _WKFrameHandle; removed an unneccessary
496 forward-declaration of WKWebViewPrintFormatter.
497 * UIProcess/API/Cocoa/WKWebViewPrivate.h: Added a _webViewPrintFormatter property.
498 * UIProcess/Cocoa/UIDelegate.h:
499 * UIProcess/Cocoa/UIDelegate.mm:
500 (WebKit::UIDelegate::setDelegate):
501 (WebKit::UIDelegate::UIClient::printFrame): Called -_webView:printFrame:.
502 * UIProcess/_WKWebViewPrintFormatter.h: Renamed from Source/WebKit2/UIProcess/WKWebViewPrintFormatter.h.
503 * UIProcess/_WKWebViewPrintFormatter.mm: Renamed from Source/WebKit2/UIProcess/WKWebViewPrintFormatter.mm.
504 * WebKit2.xcodeproj/project.pbxproj:
506 2014-06-09 Beth Dakin <bdakin@apple.com>
508 Flash video controls hit-test incorrectly after changing topContentInset
509 https://bugs.webkit.org/show_bug.cgi?id=133658
511 <rdar://problem/16978590>
513 Reviewed by Anders Carlsson.
515 When the topContent changes, the PluginView needs to be informed.
517 New function PluginView::topContentInsetDidChange() calls viewGeometryDidChange().
518 * WebProcess/Plugins/PluginView.cpp:
519 (WebKit::PluginView::topContentInsetDidChange):
520 * WebProcess/Plugins/PluginView.h:
522 Call topContentInsetDidChange() after setting an inset only if it is a new inset.
523 * WebProcess/WebPage/WebPage.cpp:
524 (WebKit::WebPage::setTopContentInset):
526 2014-06-09 Daniel Bates <dabates@apple.com>
528 Another attempt to fix the EFL and GTK builds after <http://trac.webkit.org/changeset/169711>
529 (https://bugs.webkit.org/show_bug.cgi?id=133657)
531 Substitute WKErrorRef.h for WKError.h.
533 * UIProcess/API/efl/ewk_error.cpp:
534 * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
535 * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
537 2014-06-09 Daniel Bates <dabates@apple.com>
539 Attempt to fix the EFL and GTK builds after <http://trac.webkit.org/changeset/169711>
540 (https://bugs.webkit.org/show_bug.cgi?id=133657)
542 Rename Shared/API/c/WKError.cpp to Shared/API/c/WKErrorRef.cpp.
546 2014-06-09 Anders Carlsson <andersca@apple.com>
548 Address review feedback.
550 * UIProcess/API/Cocoa/WKWebView.h:
552 2014-06-09 Anders Carlsson <andersca@apple.com>
554 Add a WKError.h header and rename the existing WKError.h to WKErrorRef.h
555 https://bugs.webkit.org/show_bug.cgi?id=133657
557 Reviewed by Dan Bernstein.
559 * Shared/API/Cocoa/WebKit.h:
560 * Shared/API/c/WKErrorRef.cpp: Renamed from Source/WebKit2/Shared/API/c/WKError.cpp.
562 (WKErrorCopyWKErrorDomain):
564 (WKErrorGetErrorCode):
565 (WKErrorCopyFailingURL):
566 (WKErrorCopyLocalizedDescription):
567 * Shared/API/c/WKErrorRef.h: Renamed from Source/WebKit2/Shared/API/c/WKError.h.
568 * UIProcess/API/C/WKPage.h:
569 * UIProcess/API/C/WKPageLoaderClient.h:
570 * UIProcess/API/C/WebKit2_C.h:
571 * UIProcess/API/Cocoa/WKError.h: Copied from Source/WebKit2/Shared/API/Cocoa/WebKit.h.
572 * UIProcess/API/Cocoa/WKError.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WebKit.h.
573 * WebKit2.xcodeproj/project.pbxproj:
574 * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
576 2014-06-09 Brady Eidson <beidson@apple.com>
578 Use different AppKit API for all services menus
579 <rdar://problem/16874403> and https://bugs.webkit.org/show_bug.cgi?id=133649
581 Reviewed by Tim Horton.
583 * UIProcess/mac/WebContextMenuProxyMac.mm:
584 (WebKit::WebContextMenuProxyMac::showContextMenu):
586 2014-06-09 Anders Carlsson <andersca@apple.com>
588 Add WKWindowFeatures.h to the umbrella header.
590 Reviewed by Dan Bernstein.
592 * Shared/API/Cocoa/WebKit.h:
594 2014-06-09 Anders Carlsson <andersca@apple.com>
596 Add -[WKWebView loadHTMLString:baseURL:]
597 https://bugs.webkit.org/show_bug.cgi?id=133645
598 <rdar://problem/17170649>
600 Reviewed by Sam Weinig.
602 * UIProcess/API/Cocoa/WKWebView.h:
603 * UIProcess/API/Cocoa/WKWebView.mm:
604 (-[WKWebView loadHTMLString:baseURL:]):
605 * UIProcess/Cocoa/NavigationState.h:
606 * UIProcess/Cocoa/NavigationState.mm:
607 (WebKit::NavigationState::createLoadDataNavigation):
608 * UIProcess/WebPageProxy.cpp:
609 (WebKit::WebPageProxy::loadHTMLString):
610 * UIProcess/WebPageProxy.h:
611 * WebProcess/WebPage/WebPage.cpp:
612 (WebKit::WebPage::loadDataImpl):
613 (WebKit::WebPage::loadString):
614 (WebKit::WebPage::loadData):
615 (WebKit::WebPage::loadHTMLString):
616 (WebKit::WebPage::loadAlternateHTMLString):
617 (WebKit::WebPage::loadPlainTextString):
618 (WebKit::WebPage::loadWebArchiveData):
619 * WebProcess/WebPage/WebPage.h:
620 * WebProcess/WebPage/WebPage.messages.in:
622 2014-06-09 Simon Fraser <simon.fraser@apple.com>
624 Fix more latched scrolling test flakiness and slowness
625 https://bugs.webkit.org/show_bug.cgi?id=133601
627 Reviewed by Brent Fulgham.
629 Latched scrolling tests were flakey for two reasons. First, the EventSender
630 wheel events were async from the web to the UI process, and the resulting
631 synthetic events also async from the UI to the web process. Make them sync
634 Secondly, the timer-based scrolling tree commit could result in the scrolling
635 tree (specifically the frame node's notion of the scrollable area and content
636 size) not being updated before the scrolling thread starts getting wheel events.
637 Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.
639 Finally remove all the now-unnecessary timeouts from the tests.
641 * WebProcess/WebPage/WebPage.cpp:
642 (WebKit::WebPage::wheelEventSyncForTesting):
644 2014-06-09 Andrzej Badowski <a.badowski@samsung.com>
646 [EFL] Add parameter to MiniBrowser to disable web security
647 https://bugs.webkit.org/show_bug.cgi?id=121095
649 Reviewed by Gyuyoung Kim.
651 -w (--web-security) commandline allows to disable/enable web security (enabled by default).
652 The reason for this is to test and debug (using, for example, MiniBrowser) scripts accessing
653 resources from other domains (cross-domain requests) such as access map location on another server.
654 Another possibility is to launch in a webkit browser local file tests that will refer to the links
655 in the http website loaded in an iframe. It will not be possible without deactivation of web security.
657 * UIProcess/API/efl/ewk_settings.cpp:
658 (ewk_settings_web_security_enabled_set):
659 (ewk_settings_web_security_enabled_get):
660 * UIProcess/API/efl/ewk_settings.h:
661 * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
664 2014-06-08 Sam Weinig <sam@webkit.org>
666 [Cocoa] WKScriptMessage should include the frame the message is from
667 <rdar://problem/17210226>
668 https://bugs.webkit.org/show_bug.cgi?id=133623
670 Reviewed by Dan Bernstein.
672 * UIProcess/API/Cocoa/WKScriptMessage.h:
673 Add WKFrameInfo property.
675 * UIProcess/API/Cocoa/WKScriptMessage.mm:
676 (-[WKScriptMessage _initWithBody:webView:frameInfo:name:]):
677 Add WKFrameInfo to the initializer.
679 (-[WKScriptMessage frameInfo]):
680 Implement frameInfo accessor.
682 * UIProcess/API/Cocoa/WKScriptMessageInternal.h:
683 Add WKFrameInfo to the initializer.
685 * UIProcess/API/Cocoa/WKUserContentController.mm:
686 Pass the WKFrameInfo to the WKScriptMessage initializer.
688 2014-06-08 Dan Bernstein <mitz@apple.com>
690 [Cococa] WKWindowFeatures.h is missing from WebKit.framework
691 https://bugs.webkit.org/show_bug.cgi?id=133622
693 Reviewed by Sam Weinig.
695 * WebKit2.xcodeproj/project.pbxproj: Promoted WKWindowFeatures.h to Public.
697 2014-06-08 Dan Bernstein <mitz@apple.com>
699 <rdar://problem/17208234> [Mac] Client-certificate authentication isn’t working when using the modern API
700 https://bugs.webkit.org/show_bug.cgi?id=133617
702 Reviewed by Sam Weinig.
704 * Shared/WebCoreArgumentCoders.cpp:
705 (IPC::ArgumentCoder<Credential>::encode): Encode certificate credentials on Mac as well.
706 (IPC::ArgumentCoder<Credential>::decode): Decode certificate credentials on Mac as well.
708 * Shared/cf/ArgumentCodersCF.cpp:
709 (IPC::encode): Use OS X API for getting a persistent reference to a key.
710 (IPC::decode): Use OS X API for getting a key from a persistent reference.
712 * Shared/cf/ArgumentCodersCF.h: Make identity coding available on Mac as well.
714 2014-06-07 Anders Carlsson <andersca@apple.com>
716 Get rid of _WKScriptWorld
717 https://bugs.webkit.org/show_bug.cgi?id=133610
719 Reviewed by Dan Bernstein.
721 * Shared/API/Cocoa/WebKitPrivate.h:
722 * UIProcess/API/Cocoa/_WKScriptWorld.h: Removed.
723 * UIProcess/API/Cocoa/_WKScriptWorld.mm: Removed.
724 * WebKit2.xcodeproj/project.pbxproj:
726 2014-05-29 Anders Carlsson <andersca@apple.com>
728 HTTPHeaderMap should not derive from HashMap
729 https://bugs.webkit.org/show_bug.cgi?id=133392
731 Reviewed by Darin Adler.
733 * Shared/WebCoreArgumentCoders.cpp:
734 (IPC::ArgumentCoder<HTTPHeaderMap>::encode):
735 (IPC::ArgumentCoder<HTTPHeaderMap>::decode):
737 2014-06-07 Alexey Proskuryakov <ap@apple.com>
739 [iOS] Fix a path used for sandbox profiles
740 https://bugs.webkit.org/show_bug.cgi?id=133602
741 <rdar://problem/17212011>
743 Reviewed by David Kilzer.
745 * WebKit2.xcodeproj/project.pbxproj:
747 2014-06-06 Enrica Casucci <enrica@apple.com>
749 REGRESSION (iOS WebKit2): backspace key does not repeat beyond a single word.
750 https://bugs.webkit.org/show_bug.cgi?id=133593
751 <rdar://problem/16352228>
753 Reviewed by Benjamin Poulain.
755 We need to provide a way for the keyboard layer to select from
756 the current position to the beginning of the word moving backwards
757 and implement the method to know when we have reached the beginning of the document.
759 * UIProcess/WebPageProxy.h:
760 * UIProcess/ios/WKContentViewInteraction.mm:
761 (-[WKContentView selectWordBackward]):
762 (-[WKContentView _selectionAtDocumentStart]):
763 * UIProcess/ios/WebPageProxyIOS.mm:
764 (WebKit::WebPageProxy::selectWordBackward):
765 * WebProcess/WebPage/WebPage.h:
766 * WebProcess/WebPage/WebPage.messages.in:
767 * WebProcess/WebPage/ios/WebPageIOS.mm:
768 (WebKit::WebPage::selectWordBackward):
770 2014-06-06 Enrica Casucci <enrica@apple.com>
772 Adopt the new UIAlertController API to replace UIActionSheet.
773 https://bugs.webkit.org/show_bug.cgi?id=133582
774 <rdar://problem/16845223>
776 Reviewed by Joseph Pecoraro.
778 UIActionSheet is deprecated. We need to move out action sheets
779 implementation to UIAlertView.
781 * UIProcess/API/Cocoa/_WKElementAction.h:
782 * UIProcess/API/Cocoa/_WKElementAction.mm:
783 * UIProcess/ios/WKActionSheet.h:
784 * UIProcess/ios/WKActionSheet.mm:
785 (-[WKActionSheet presentSheetFromRect:]):
786 (-[WKActionSheet doneWithSheet]):
787 (-[WKActionSheet willRotate]):
788 (-[WKActionSheet updateSheetPosition]):
789 (-[WKActionSheet _didRotateAndLayout]):
790 (-[WKActionSheet didRotate]):
791 * UIProcess/ios/WKActionSheetAssistant.h:
792 * UIProcess/ios/WKActionSheetAssistant.mm:
793 (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
794 (-[WKActionSheetAssistant showImageSheet]):
795 (-[WKActionSheetAssistant showLinkSheet]):
796 (-[WKActionSheetAssistant showDataDetectorsSheet]):
797 (-[WKActionSheetAssistant cleanupSheet]):
798 (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]): Deleted.
799 * UIProcess/ios/WKContentViewInteraction.mm:
800 (-[WKContentView _longPressRecognized:]):
802 2014-06-06 Gavin Barraclough <baraclough@apple.com>
804 Should boost ChildProcesses on iOS
805 https://bugs.webkit.org/show_bug.cgi?id=133583
807 Reviewed by Sam Weinig.
809 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
810 (WebKit::connectToService):
811 - boost all child processes on iOS.
813 2014-06-06 Alexey Proskuryakov <ap@apple.com>
815 Build fix after <http://trac.webkit.org/changeset/169655>.
817 The SPIs used do not exist on Mac, limit the code to iOS.
819 * Shared/Authentication/mac/AuthenticationManager.mac.mm:
820 * Shared/WebCoreArgumentCoders.cpp:
821 (IPC::ArgumentCoder<Credential>::encode):
822 (IPC::ArgumentCoder<Credential>::decode):
823 * Shared/cf/ArgumentCodersCF.cpp:
824 (IPC::typeFromCFTypeRef):
827 * Shared/cf/ArgumentCodersCF.h:
829 2014-06-06 Dan Bernstein <mitz@apple.com>
831 <rdar://problem/17095692> [iOS] Client-certificate authentication isn’t working
832 https://bugs.webkit.org/show_bug.cgi?id=133527
834 Reviewed by Darin Adler.
836 * Configurations/Network-iOS.entitlements: Enabled the Network process to access the keys
837 needed to create identities to authenticate with.
839 * Shared/WebCoreArgumentCoders.cpp:
840 (IPC::ArgumentCoder<Credential>::encode): Encode the credential type, and if it is a client
841 certificate, encode the identity and the certificates.
842 (IPC::ArgumentCoder<Credential>::decode): Decode the credential type. If it is a client
843 certificate, decode the identity and the certificates and use the proper Credential
846 * Shared/cf/ArgumentCodersCF.cpp:
847 (IPC::typeFromCFTypeRef): Handle SecIdentityRef.
848 (IPC::encode): Encode an identity by encoding its certificate and a persistent reference to
850 (IPC::decode): Decode a certificate and a persistent reference to a key, find the key, and
852 * Shared/cf/ArgumentCodersCF.h:
854 2014-06-05 Benjamin Poulain <bpoulain@apple.com>
856 [iOS][WK2] WebPage sometimes forces two resize events on animated resize
857 https://bugs.webkit.org/show_bug.cgi?id=133534
859 Reviewed by Enrica Casucci.
861 When I updated the patch for resize events (r168556) to use the unobscured rect in scrollview coordinates,
862 I forgot to update a snippet of code in dynamicViewportSizeUpdate(). Since that code was still using
863 the scaled unobscured rect, there was sometimes a difference of 1 pixel between the size set by that
864 call site and the others.
866 This path nukes the bad code and use the unobscured rect in scrollview coordinates given by the UIProcess.
868 * WebProcess/WebPage/ios/WebPageIOS.mm:
869 (WebKit::WebPage::dynamicViewportSizeUpdate):
871 2014-06-05 Benjamin Poulain <bpoulain@apple.com>
873 [iOS][WK2] Add device orientation
874 https://bugs.webkit.org/show_bug.cgi?id=133530
875 <rdar://problem/16680041>
877 Reviewed by Tim Horton.
879 Add device orientation for WebKit2.
881 For the public API, WKWebView get the updates through the notification UIWindowDidRotateNotification.
882 We do not have any control over how the API is used, but we can expect the size will be updated before
883 the end of rotation in most cases and the events should be sent in the right order.
885 For Safari, we use an override to support animated resize (and some tabs corner cases).
887 On the WebProcess side, we just get the new orientation directly or on DynamicViewportSizeUpdate.
889 * UIProcess/API/Cocoa/WKWebView.mm:
890 (deviceOrientationForUIInterfaceOrientation):
892 (-[WKWebView initWithFrame:configuration:]):
893 (-[WKWebView _windowDidRotate:]):
894 (-[WKWebView _setInterfaceOrientationOverride:]):
895 (-[WKWebView _interfaceOrientationOverride]):
896 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
897 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
898 * UIProcess/WebPageProxy.cpp:
899 (WebKit::WebPageProxy::WebPageProxy):
900 * UIProcess/WebPageProxy.h:
901 (WebKit::WebPageProxy::deviceOrientation):
902 * UIProcess/ios/WebPageProxyIOS.mm:
903 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
904 (WebKit::WebPageProxy::setDeviceOrientation):
905 * WebProcess/WebCoreSupport/WebChromeClient.h:
906 * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
907 (WebKit::WebChromeClient::deviceOrientation):
908 * WebProcess/WebPage/WebPage.cpp:
909 (WebKit::WebPage::WebPage):
910 * WebProcess/WebPage/WebPage.h:
911 (WebKit::WebPage::deviceOrientation):
912 * WebProcess/WebPage/WebPage.messages.in:
913 * WebProcess/WebPage/ios/WebPageIOS.mm:
914 (WebKit::WebPage::setDeviceOrientation):
915 (WebKit::WebPage::dynamicViewportSizeUpdate):
917 2014-06-05 Oliver Hunt <oliver@apple.com>
919 Enable SANDBOX_EXTENSIONS build flag universally on cocoa
920 https://bugs.webkit.org/show_bug.cgi?id=133556
922 Reviewed by Alexey Proskuryakov.
924 Remove unnecessary iOS exception.
928 2014-06-05 Alexey Proskuryakov <ap@apple.com>
930 [Mac] Tweak plug-in sandbox profiles
931 https://bugs.webkit.org/show_bug.cgi?id=133549
933 Fix <rdar://problem/17068055> and <rdar://problem/17148837>.
935 Reviewed by Sam Weinig and Simon Cooper.
937 * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
938 * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
940 2014-06-05 Tanay C <tanay.c@samsung.com>
942 Resolve compiler error (call of overloaded 'schedule' function is ambiguous)
943 https://bugs.webkit.org/show_bug.cgi?id=133467
945 Reviewed by Carlos Garcia Campos.
947 * Shared/Downloads/soup/DownloadSoup.cpp:
948 (WebKit::DownloadClient::handleResponseLater): Explicitly casting second parameter to std::function<void()>
950 2014-06-04 Benjamin Poulain <bpoulain@apple.com>
952 [iOS][WK2] Restore the visual scroll position instead of the dom scroll position when restoring states from the history
953 https://bugs.webkit.org/show_bug.cgi?id=133490
955 Reviewed by Tim Horton.
957 Instead of restoring the scroll position, restore the visual position. This makes pages appear at the same position
958 on screen ignoring changes in the obscured top inset.
960 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
961 * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
962 (WebKit::WebFrameLoaderClient::saveViewStateToItem):
963 (WebKit::WebFrameLoaderClient::restoreViewState):
964 Save and restore userHasChangedPageScaleFactor to handle rescaling correctly.
965 Limit the scale into valid viewport limits in case the viewport meta tag has changed or the device has rotated.
967 * WebProcess/WebPage/WebPage.cpp:
968 (WebKit::WebPage::WebPage):
969 * WebProcess/WebPage/WebPage.h:
970 (WebKit::WebPage::userHasChangedPageScaleFactor):
971 * WebProcess/WebPage/ios/WebPageIOS.mm:
972 (WebKit::WebPage::restorePageState):
973 (WebKit::WebPage::updateVisibleContentRects):
974 In updateVisibleContentRects, we keep track or the current difference between the exposed rect and the unobscured rect.
975 When restoring the page position, we use the current top inset and the saved exposed rect to restore the visual
978 It is not very robust as it does not resolve races between the two processes, but that is not worse than what we is there now.
980 2014-06-03 Timothy Horton <timothy_horton@apple.com>
982 WebKit2 View Gestures (Zoom): Can show unpainted regions when zoom-pinching-out
983 https://bugs.webkit.org/show_bug.cgi?id=133472
984 <rdar://problem/15686848>
986 Reviewed by Simon Fraser.
988 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
989 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
990 (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
991 (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToLayers):
992 (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
993 Use prepopulateRect() when zooming out to ensure that we have tiles for the current exposed area.
995 Factor applyTransientZoomToLayers out of adjustTransientZoom, so that
996 flushLayers can call applyTransientZoomToLayers without ending up calling prepopulateRect()
997 during layer flushing, which causes trouble.
999 It is OK to populate layers at the current scale even when zooming out, because the overdraw
1000 already covers most of the zoomed out area, and we're only adding a few more tiles at worst.
1002 2014-06-03 Benjamin Poulain <bpoulain@apple.com>
1004 [iOS][WK2] Align the highlight rects with device pixels
1005 https://bugs.webkit.org/show_bug.cgi?id=133464
1006 <rdar://problem/16708861>
1008 Reviewed by Enrica Casucci.
1010 * UIProcess/ios/WKContentViewInteraction.mm:
1011 (-[WKContentView _showTapHighlightWithColor:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
1013 2014-06-02 Enrica Casucci <enrica@apple.com>
1015 REGRESSION (iOS WebKit2): Single tap in pages with focus on load will clear the selection after the keyboard appears.
1016 https://bugs.webkit.org/show_bug.cgi?id=133465
1017 <rdar://problem/17059189>
1019 Reviewed by Benjamin Poulain.
1021 If a page focuses an input field on load we don't bring the keyboard on screen
1022 since the keyboard is only shown when the user interacts with the page with gestures.
1023 Still the WebProcess sets the focus and the selection according to the rules.
1024 We need to make sure the UI process doesn't accidentally clear this selection
1025 when the user starts the interaction with the page.
1026 This patch also improves the function that retrieves the autocorrection data
1027 to be returned to the keyboard, making sure that we always send back a reply
1028 even when we don't have a valid selection.
1030 * UIProcess/ios/WKContentViewInteraction.mm:
1031 (-[WKContentView _singleTapCommited:]):
1032 * WebProcess/WebPage/ios/WebPageIOS.mm:
1033 (WebKit::WebPage::requestAutocorrectionData):
1035 2014-05-31 Anders Carlsson <andersca@apple.com>
1037 Change DeferrableOneShotTimer to use std::function instead of being a class template
1038 https://bugs.webkit.org/show_bug.cgi?id=133423
1040 Reviewed by Antti Koivisto.
1042 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1043 (WebKit::NetworkProcess::platformSetCacheModel):
1044 * Shared/CacheModel.cpp:
1045 (WebKit::calculateCacheSizes):
1046 * Shared/CacheModel.h:
1047 * WebProcess/Plugins/PluginView.cpp:
1048 (WebKit::PluginView::pluginSnapshotTimerFired):
1049 * WebProcess/Plugins/PluginView.h:
1050 * WebProcess/cocoa/WebProcessCocoa.mm:
1051 (WebKit::WebProcess::platformSetCacheModel):
1053 2014-06-02 Benjamin Poulain <bpoulain@apple.com>
1055 [iOS][WK2] Round the UIScrollView content size to device pixel
1056 https://bugs.webkit.org/show_bug.cgi?id=133417
1057 <rdar://problem/15922440>
1059 Reviewed by Simon Fraser.
1061 We should really have the scaled content size floored to device pixels, but that will be for another
1063 This patch ensure the content size as seen by the API is rounded to device pixels. The value is floored
1064 to avoid showing partial pixels when the content is stable.
1066 * UIProcess/API/Cocoa/WKWebView.mm:
1067 (floorFloatToPixels):
1068 (roundScrollViewCountentSize):
1069 (-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
1070 (-[WKWebView _didCommitLayerTree:WebKit::]):
1071 (-[WKWebView scrollView:contentSizeForZoomScale:withProposedSize:]):
1072 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1073 (-[WKWebView _endAnimatedResize]):
1075 2014-06-02 Oliver Hunt <oliver@apple.com>
1077 Move ifdef to the right place.
1081 * WebProcess/cocoa/WebProcessCocoa.mm:
1082 (WebKit::WebProcess::initializeSandbox):
1084 2014-06-02 Gavin Barraclough <barraclough@apple.com>
1086 Set default voucher for XPC client processes
1087 https://bugs.webkit.org/show_bug.cgi?id=133458
1089 Reviewed by Geoff Garen.
1091 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
1092 (WebKit::XPCServiceInitializer):
1093 - add voucher_replace_default_voucher.
1095 - add HAVE_VOUCHERS.
1097 2014-06-02 Jeremy Jones <jeremyj@apple.com>
1099 Send external playback properties to fullscreen.
1100 https://bugs.webkit.org/show_bug.cgi?id=133366
1102 Reviewed by Simon Fraser.
1104 Forward setExternalPlayback.
1106 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: add setExternalPlaybackProperties
1107 * WebProcess/ios/WebVideoFullscreenManager.h: add setExternalPlaybackProperties
1108 * WebProcess/ios/WebVideoFullscreenManager.mm: add setExternalPlaybackProperties
1109 (WebKit::WebVideoFullscreenManager::setExternalPlaybackProperties): added
1111 2014-06-02 Enrica Casucci <enrica@apple.com>
1113 Remove unintentional changes to WKContentViewInteraction.mm
1114 introduced in r169500.
1118 * UIProcess/ios/WKContentViewInteraction.mm:
1119 (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
1121 2014-06-02 Geoffrey Garen <ggaren@apple.com>
1123 Address some review comments on bug 133408
1124 https://bugs.webkit.org/show_bug.cgi?id=133410
1126 Reviewed by Anders Carlsson.
1128 * UIProcess/API/Cocoa/WKBackForwardListItem.h:
1129 * UIProcess/API/Cocoa/WKUIDelegate.h:
1131 2014-06-02 Dan Bernstein <mitz@apple.com>
1133 [Cocoa] -[WKWebView activeURL] is unused
1134 https://bugs.webkit.org/show_bug.cgi?id=133440
1136 Reviewed by Mark Rowe.
1138 * UIProcess/API/Cocoa/WKWebView.mm:
1139 (-[WKWebView activeURL]): Deleted.
1140 * UIProcess/API/Cocoa/WKWebViewPrivate.h: Removed the property declaration.
1142 2014-05-31 Oliver Hunt <oliver@apple.com>
1144 Restructure initial distinct sandbox profiles
1145 https://bugs.webkit.org/show_bug.cgi?id=133415
1147 Reviewed by Alexey Proskuryakov.
1149 Add support for manually instantiating the network and
1150 content process sandboxes, and add initial profiles.
1151 These profiles are completely generic so we can make sure
1152 nothing is broken by enabling them.
1154 This also adds a target to the WebKit2 project to correctly
1155 process the profiles.
1157 * DatabaseProcess/ios/DatabaseProcessIOS.mm:
1158 (WebKit::DatabaseProcess::initializeSandbox):
1159 * DatabaseProcess/ios/com.apple.WebKit.DatabasesIOS.sb: Removed.
1160 * NetworkProcess/ios/NetworkProcessIOS.mm:
1161 (WebKit::NetworkProcess::initializeSandbox):
1162 * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb: Added.
1163 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Added.
1164 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Added.
1165 * WebKit2.xcodeproj/project.pbxproj:
1166 * WebProcess/cocoa/WebProcessCocoa.mm:
1167 (WebKit::WebProcess::initializeSandbox):
1169 2014-06-01 Sam Weinig <sam@webkit.org>
1171 [Cocoa] Add SPI to get a WebArchive of the WKWebView
1172 <rdar://problem/16748120>
1173 https://bugs.webkit.org/show_bug.cgi?id=133439
1175 Reviewed by Anders Carlsson.
1177 * UIProcess/API/Cocoa/WKWebView.mm:
1178 (-[WKWebView _getWebArchiveDataWithCompletionHandler:]):
1179 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1181 2014-05-31 Anders Carlsson <andersca@apple.com>
1183 Add a LazyNeverDestroyed class template and use it
1184 https://bugs.webkit.org/show_bug.cgi?id=133425
1186 Reviewed by Darin Adler.
1188 * Shared/mac/SecItemShim.cpp:
1189 (WebKit::responseMap):
1191 2014-05-31 Timothy Horton <timothy_horton@apple.com>
1193 View snapshots are sometimes taken at the wrong scale
1194 https://bugs.webkit.org/show_bug.cgi?id=133419
1195 <rdar://problem/17087497>
1197 Reviewed by Sam Weinig.
1199 * UIProcess/API/mac/WKView.mm:
1200 (-[WKView _takeViewSnapshot]):
1201 Work around <rdar://problem/17084993> by re-requesting the snapshot at
1202 kCGWindowImageNominalResolution if it was captured at the wrong scale.
1204 2014-05-31 Dan Bernstein <mitz@apple.com>
1206 [iOS] WebKit2.framework is unused
1207 https://bugs.webkit.org/show_bug.cgi?id=133424
1209 Reviewed by Anders Carlsson.
1211 * Configurations/WebKit2.xcconfig: Set SKIP_INSTALL to YES when targeting iOS.
1213 2014-05-30 Benjamin Poulain <bpoulain@apple.com>
1215 [iOS][WK2] When a page does not finish rotation before the end of the animation, synchronize explicitely
1216 https://bugs.webkit.org/show_bug.cgi?id=133364
1217 <rdar://problem/17026333>
1219 Reviewed by Sam Weinig.
1221 When a page that does layout on rotation does not respond before the end of the animation, we end up with
1222 a completely inconsistent state on the UIProcess (because it is unware of the new states).
1224 The perfect way to fix this would be to make animated resize transactional and have the WebProcess resolve
1225 conflicts. That is very complicated and the issue is uncommon, so this patch does not do that.
1227 This patch force the synchronization whenever we finish the animation before we heard back
1228 from the WebProcess.
1230 * UIProcess/API/Cocoa/WKWebView.mm:
1231 (-[WKWebView _endAnimatedResize]):
1232 * UIProcess/WebPageProxy.cpp:
1233 (WebKit::WebPageProxy::WebPageProxy):
1234 (WebKit::WebPageProxy::resetState):
1235 * UIProcess/WebPageProxy.h:
1236 * UIProcess/ios/WebPageProxyIOS.mm:
1237 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
1238 (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
1239 (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
1240 * WebProcess/WebPage/WebPage.h:
1241 * WebProcess/WebPage/WebPage.messages.in:
1242 * WebProcess/WebPage/ios/WebPageIOS.mm:
1243 (WebKit::WebPage::dynamicViewportSizeUpdate):
1244 (WebKit::WebPage::synchronizeDynamicViewportUpdate):
1246 2014-05-30 Enrica Casucci <enrica@apple.com>
1248 REGRESSION (WebKit2): space space to insert period doesn't work in web forms.
1249 https://bugs.webkit.org/show_bug.cgi?id=133413
1250 <rdar://problem/16948333>
1252 Reviewed by Benjamin Poulain.
1254 iOS TextInput needs to know about content surrounding the
1255 current position while editing. Since we don't want to
1256 query this information synchronously when asked, we cache it
1257 as part of the EditorState. EditorState now contains a vector of
1258 three characters representing the content after, before and two
1259 position before the caret position.
1260 The patch also replaces all calls to plainText with plainTextReplacingNoBreakSpace
1261 to work well with iOS text input.
1263 * Shared/EditorState.cpp:
1264 (WebKit::EditorState::encode):
1265 (WebKit::EditorState::decode):
1266 * Shared/EditorState.h:
1267 (WebKit::EditorState::EditorState):
1268 * UIProcess/ios/WKContentViewInteraction.mm:
1269 (-[WKContentView _characterInRelationToCaretSelection:]):
1270 (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
1271 * WebProcess/WebPage/WebPage.cpp:
1272 (WebKit::WebPage::editorState):
1273 * WebProcess/WebPage/ios/WebPageIOS.mm:
1274 (WebKit::WebPage::requestDictationContext):
1275 (WebKit::WebPage::replaceSelectedText):
1276 (WebKit::WebPage::replaceDictatedText):
1277 (WebKit::WebPage::requestAutocorrectionData):
1278 (WebKit::WebPage::syncApplyAutocorrection):
1279 (WebKit::computeAutocorrectionContext):
1281 2014-05-30 Geoffrey Garen <ggaren@apple.com>
1283 Fixed the build by adding back a declaration I deleted by accident :(.
1287 * UIProcess/API/Cocoa/WKWebView.h:
1289 2014-05-30 Geoffrey Garen <ggaren@apple.com>
1291 Unreviewed, rolling in r169490.
1293 I changed a non-ASCII apostrophe to ASCII.
1297 "Some more copy-editing of the Modern WebKit headerdoc"
1298 https://bugs.webkit.org/show_bug.cgi?id=133408
1299 http://trac.webkit.org/changeset/169490
1301 * UIProcess/API/Cocoa/WKBackForwardList.h:
1302 * UIProcess/API/Cocoa/WKBackForwardListItem.h:
1303 * UIProcess/API/Cocoa/WKFrameInfo.h:
1304 * UIProcess/API/Cocoa/WKNavigation.h:
1305 * UIProcess/API/Cocoa/WKNavigationAction.h:
1307 * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1309 * UIProcess/API/Cocoa/WKNavigationResponse.h:
1310 * UIProcess/API/Cocoa/WKPreferences.h:
1311 * UIProcess/API/Cocoa/WKProcessPool.h:
1312 * UIProcess/API/Cocoa/WKScriptMessage.h:
1313 * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
1314 * UIProcess/API/Cocoa/WKUIDelegate.h:
1315 * UIProcess/API/Cocoa/WKUserContentController.h:
1316 * UIProcess/API/Cocoa/WKWebView.h:
1317 * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1319 2014-05-30 Geoffrey Garen <ggaren@apple.com>
1321 Unreviewed, rolling out r169490.
1323 It broke the build with a mysterious warning about ASCII.
1327 "Some more copy-editing of the Modern WebKit headerdoc"
1328 https://bugs.webkit.org/show_bug.cgi?id=133408
1329 http://trac.webkit.org/changeset/169490
1331 2014-05-30 Geoffrey Garen <ggaren@apple.com>
1333 Some more copy-editing of the Modern WebKit headerdoc
1334 https://bugs.webkit.org/show_bug.cgi?id=133408
1336 Reviewed by Beth Dakin.
1338 A copy-editor suggested some edits to the headerdoc for clarity,
1339 style, and formatting.
1341 I reviewed the edits and accepted about 80% of them.
1343 * UIProcess/API/Cocoa/WKBackForwardList.h:
1344 * UIProcess/API/Cocoa/WKBackForwardListItem.h:
1345 * UIProcess/API/Cocoa/WKFrameInfo.h:
1346 * UIProcess/API/Cocoa/WKNavigation.h:
1347 * UIProcess/API/Cocoa/WKNavigationAction.h:
1349 * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1351 * UIProcess/API/Cocoa/WKNavigationResponse.h:
1352 * UIProcess/API/Cocoa/WKPreferences.h:
1353 * UIProcess/API/Cocoa/WKProcessPool.h:
1354 * UIProcess/API/Cocoa/WKScriptMessage.h:
1355 * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
1356 * UIProcess/API/Cocoa/WKUIDelegate.h:
1357 * UIProcess/API/Cocoa/WKUserContentController.h:
1358 * UIProcess/API/Cocoa/WKWebView.h:
1359 * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1361 2014-05-30 Timothy Horton <timothy_horton@apple.com>
1363 Crash loading skydrive.com (assertion under RemoteLayerTreeDisplayRefreshMonitor)
1364 https://bugs.webkit.org/show_bug.cgi?id=133370
1365 <rdar://problem/17061361>
1367 Reviewed by Darin Adler.
1369 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1370 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1371 (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
1372 (WebKit::RemoteLayerTreeDrawingArea::willDestroyDisplayRefreshMonitor):
1373 (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
1374 Post-landing review comments from Darin noted that checking if the
1375 DrawingArea's m_displayRefreshMonitors contains the monitor in the
1376 list to notify is insufficient, because a new one could have been
1377 added with the same address. Instead, copy the HashSet, removing
1378 at random from it and firing didUpdateLayers, but *also* removing
1379 from it in the willDestroyDisplayRefreshMonitor callback.
1380 This is very similar to what DisplayRefreshMonitor itself does internally
1381 (we don't have to duplicate its code to avoid re-entry because it is
1382 already impossible to re-enter didUpdate).
1384 2014-05-29 Anders Carlsson <andersca@apple.com>
1386 -[WKProcessPoolConfiguration setCachePartitionedURLSchemes:] should do a deep copy
1387 https://bugs.webkit.org/show_bug.cgi?id=133393
1389 Reviewed by Dan Bernstein.
1391 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
1392 (-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
1394 2014-05-29 Mark Lam <mark.lam@apple.com>
1396 Restoring FloatingPointEnvironment initialization that was accidentally rolled out by r169176.
1397 <https://webkit.org/b/133389>
1399 Rubber stamped by Oliver Hunt.
1401 * Shared/ios/ChildProcessIOS.mm:
1402 (WebKit::ChildProcess::platformInitialize):
1404 2014-05-29 Enrica Casucci <enrica@apple.com>
1406 Need to notify the keyboard about every KeyDown event.
1407 https://bugs.webkit.org/show_bug.cgi?id=133383
1408 <rdar://problem/16633975>
1410 Reviewed by Benjamin Poulain.
1412 A key down will generate most of the time a call to the keyboard to add input or delete.
1413 But the event could be handled by JavaScript and its default prevented.
1414 We need to notify the keyboard in every case to allow updating its internal state about what has been typed.
1416 * UIProcess/ios/PageClientImplIOS.mm:
1417 (WebKit::PageClientImpl::doneWithKeyEvent):
1418 * UIProcess/ios/WKContentViewInteraction.h:
1419 * UIProcess/ios/WKContentViewInteraction.mm:
1420 (-[WKContentView _didHandleKeyEvent:]):
1422 2014-05-29 Matthew Hanson <matthew_hanson@apple.com>
1424 Roll out r169439. <rdar://problem/17069364>
1426 2014-05-28 Gavin Barraclough <baraclough@apple.com>
1428 viewStateDidChange should always fully update ViewState
1429 https://bugs.webkit.org/show_bug.cgi?id=133159
1431 Reviewed by Anders Carlson.
1433 Currently WebPageProxy::viewStateDidChange is passed a mask of bits to update.
1435 This has the following negative consequences:
1436 – WKWebView implicitly requires more detailed knowledge of the internal implementation of the PageClient.
1437 – Updates may unnecessarily be split over multiple IPC messages.
1438 – In order to support partial updates we make multiple virtual function calls to PageClient, which then makes duplicate objc calls.
1440 Better to just always update the entire ViewState.
1442 * UIProcess/API/Cocoa/WKWebView.mm:
1443 (-[WKWebView didMoveToWindow]):
1444 - removed argument to viewStateDidChange.
1445 * UIProcess/API/gtk/PageClientImpl.cpp:
1446 (WebKit::PageClientImpl::viewState):
1447 (WebKit::PageClientImpl::isViewWindowActive): Deleted.
1448 (WebKit::PageClientImpl::isViewFocused): Deleted.
1449 (WebKit::PageClientImpl::isViewVisible): Deleted.
1450 (WebKit::PageClientImpl::isViewInWindow): Deleted.
1451 * UIProcess/API/gtk/PageClientImpl.h:
1452 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
1453 * UIProcess/API/mac/WKView.mm:
1454 (-[WKView becomeFirstResponder]):
1455 (-[WKView resignFirstResponder]):
1456 (-[WKView viewDidMoveToWindow]):
1457 (-[WKView _windowDidBecomeKey:]):
1458 (-[WKView _windowDidResignKey:]):
1459 (-[WKView _windowDidMiniaturize:]):
1460 (-[WKView _windowDidDeminiaturize:]):
1461 (-[WKView _windowDidOrderOffScreen:]):
1462 (-[WKView _windowDidOrderOnScreen:]):
1463 (-[WKView _windowDidChangeOcclusionState:]):
1464 (-[WKView viewDidHide]):
1465 (-[WKView viewDidUnhide]):
1466 (-[WKView _activeSpaceDidChange:]):
1467 (-[WKView _setThumbnailView:]):
1468 (-[WKView endDeferringViewInWindowChanges]):
1469 (-[WKView endDeferringViewInWindowChangesSync]):
1470 - removed argument to viewStateDidChange.
1471 * UIProcess/CoordinatedGraphics/WebView.cpp:
1472 (WebKit::WebView::viewState):
1473 (WebKit::WebView::isViewWindowActive): Deleted.
1474 (WebKit::WebView::isViewFocused): Deleted.
1475 (WebKit::WebView::isViewVisible): Deleted.
1476 (WebKit::WebView::isViewInWindow): Deleted.
1477 * UIProcess/CoordinatedGraphics/WebView.h:
1478 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
1479 * UIProcess/PageClient.h:
1480 (WebKit::PageClient::isViewVisibleOrOccluded): Deleted.
1481 (WebKit::PageClient::isVisuallyIdle): Deleted.
1482 - merged isViewVisibleOrOccluded/isVisuallyIdle to subclass viewState methods.
1483 * UIProcess/WebPageProxy.cpp:
1484 (WebKit::WebPageProxy::WebPageProxy):
1485 (WebKit::WebPageProxy::reattachToWebProcess):
1486 - updateViewState -> PageClient::viewState
1487 (WebKit::WebPageProxy::viewStateDidChange):
1488 - argument removed; updateViewState -> PageClient::viewState.
1489 (WebKit::WebPageProxy::setCursor):
1490 - call isViewWindowActive on WebPageProxy, rather than PageClient.
1491 (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
1492 - call isViewWindowActive on WebPageProxy, rather than PageClient.
1493 (WebKit::WebPageProxy::updateViewState): Deleted.
1494 - removed - viewState method moved to PageClient.
1495 * UIProcess/WebPageProxy.h:
1496 (WebKit::WebPageProxy::isViewWindowActive):
1497 - added missing implementation.
1498 (WebKit::WebPageProxy::isViewVisible):
1499 - removed argument to viewStateDidChange.
1500 * UIProcess/WebProcessProxy.cpp:
1501 (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
1502 - removed argument to viewStateDidChange.
1503 * UIProcess/ios/PageClientImplIOS.h:
1504 * UIProcess/ios/PageClientImplIOS.mm:
1505 (WebKit::PageClientImpl::viewState):
1506 (WebKit::PageClientImpl::isViewWindowActive): Deleted.
1507 (WebKit::PageClientImpl::isViewFocused): Deleted.
1508 (WebKit::PageClientImpl::isViewVisible): Deleted.
1509 (WebKit::PageClientImpl::isViewInWindow): Deleted.
1510 (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
1511 (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
1512 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
1513 * UIProcess/ios/WKContentView.mm:
1514 (-[WKContentView didMoveToWindow]):
1515 (-[WKContentView _applicationDidEnterBackground:]):
1516 (-[WKContentView _applicationWillEnterForeground:]):
1517 - removed argument to viewStateDidChange.
1518 * UIProcess/mac/PageClientImpl.h:
1519 * UIProcess/mac/PageClientImpl.mm:
1520 (WebKit::PageClientImpl::viewState):
1521 (WebKit::PageClientImpl::showCorrectionPanel):
1522 (WebKit::PageClientImpl::showDictationAlternativeUI):
1523 (WebKit::PageClientImpl::isViewWindowActive): Deleted.
1524 (WebKit::PageClientImpl::isViewFocused): Deleted.
1525 (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
1526 (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
1527 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
1529 2014-05-29 Dan Bernstein <mitz@apple.com>
1531 [Cocoa] Can’t recover from subframe load errors
1532 https://bugs.webkit.org/show_bug.cgi?id=133385
1534 Reviewed by Anders Carlsson.
1536 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
1537 * UIProcess/Cocoa/NavigationState.h: Added flag in m_navigationDelegateMethods struct.
1538 * UIProcess/Cocoa/NavigationState.mm:
1539 (WebKit::NavigationState::setNavigationDelegate): Initialize
1540 webViewNavigationDidFailProvisionalLoadInSubframeWithError flag in the delegate methods
1542 (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame): If the
1543 error occurred in a subframe, invoke the new delegate method.
1545 2014-05-29 Geoffrey Garen <ggaren@apple.com>
1547 Added a missing @result to WKPreferences headerdoc
1548 https://bugs.webkit.org/show_bug.cgi?id=133381
1550 Reviewed by Dan Bernstein.
1552 * UIProcess/API/Cocoa/WKPreferences.h:
1554 2014-05-29 Alexey Proskuryakov <ap@apple.com>
1556 [Mac] Always use plug-in sandbox with sandboxed clients
1557 https://bugs.webkit.org/show_bug.cgi?id=133358
1558 <rdar://problem/15637695>
1560 Reviewed by Anders Carlsson.
1562 * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::initializeSandbox):
1563 Refuse to start if parent process is sandboxed, and plug-in process is not going to be.
1564 None of this should run in normal case, because there are also checks on UI process side.
1566 * Shared/Plugins/PluginModuleInfo.h:
1567 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1568 (WebKit::NetscapePluginModule::getPluginInfo):
1569 Added a member to PluginModuleInfo, telling whether the plug-in has a sandbox profile.
1571 * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
1572 (WebKit::getPlatformPluginModuleInformation): Use the new PluginModuleInfo member,
1573 we no longer need to check the file system here.
1575 * WebKit2.xcodeproj/project.pbxproj:
1576 * Shared/mac/SandboxUtilities.h: Added.
1577 * Shared/mac/SandboxUtilities.cpp: Added. (WebKit::processIsSandboxed):
1578 This code is simple, but include magic is not. Moved it to a separate file to
1581 * UIProcess/API/C/mac/WKContextPrivateMac.mm: Removed an unused include.
1583 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
1584 (WebKit::PluginInfoStore::shouldUsePlugin): Don't use unsandboxed plug-ins in
1585 sandboxed applications.
1587 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1588 (WebKit::PluginProcessProxy::platformGetLaunchOptions): Don't ever pass disable-sandbox
1589 from sandboxed processes.
1591 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
1592 (WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
1593 Use the new shared code in SandboxUtilities.h.
1595 2014-05-29 Timothy Horton <timothy_horton@apple.com>
1597 Crash loading skydrive.com (assertion under RemoteLayerTreeDisplayRefreshMonitor)
1598 https://bugs.webkit.org/show_bug.cgi?id=133370
1599 <rdar://problem/17061361>
1601 Reviewed by Anders Carlsson.
1603 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1604 (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
1605 Copy the set of refresh monitors so that we don't try to mutate the list we're iterating,
1606 and don't try to fire refresh monitors that were removed in a previous iteration of the loop.
1608 2014-05-29 Timothy Horton <timothy_horton@apple.com>
1610 REGRESSION (iOS WebKit2): Find-in-Page doesn't work in subframes
1611 https://bugs.webkit.org/show_bug.cgi?id=133372
1612 <rdar://problem/17045070>
1614 Reviewed by Simon Fraser.
1616 * WebProcess/WebPage/ios/FindControllerIOS.mm:
1617 (WebKit::FindController::willFindString):
1618 (WebKit::FindController::didFailToFindString):
1619 (WebKit::FindController::didHideFindIndicator):
1620 Flip ignoreCompositionSelectionChange and updateAppearanceEnabled on all
1621 frames, not just the main frame, because the found string can be in a subframe.
1622 Ideally we would flip it on/off for each frame as we move the selection between them,
1623 but would require a lot of work (and the overhead of touching each frame shouldn't be significant).
1625 2014-05-29 Dan Bernstein <mitz@apple.com>
1627 WKBundleActivateMacFontAscentHack is unused
1628 https://bugs.webkit.org/show_bug.cgi?id=133379
1630 Reviewed by Anders Carlsson.
1632 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1633 (WKBundleActivateMacFontAscentHack): Deleted.
1634 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1635 * WebProcess/InjectedBundle/InjectedBundle.h:
1636 * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
1637 (WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
1638 * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
1639 (WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
1640 * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
1641 (WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
1643 2014-05-29 Alexey Proskuryakov <ap@apple.com>
1645 Add a sandbox profile for com.apple.appstore.CodeRedeemerNetscapePlugin
1646 https://bugs.webkit.org/show_bug.cgi?id=133360
1648 Reviewed by Sam Weinig.
1650 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Looks like
1651 anyone using camera would need access to CoreMedia preferences.
1653 * Resources/PlugInSandboxProfiles/com.apple.appstore.CodeRedeemerNetscapePlugin.sb: Added.
1655 * WebKit2.xcodeproj/project.pbxproj: Added the profile.
1657 2014-05-29 Carlos Garcia Campos <cgarcia@igalia.com>
1659 [GTK] Add support for HiDPI icons
1660 https://bugs.webkit.org/show_bug.cgi?id=133377
1662 Reviewed by Martin Robinson.
1664 * PlatformGTK.cmake: Compile also the @2x versions for the builtin icons.
1666 2014-05-29 Owen Taylor <otaylor@redhat.com>
1668 [GTK] Add HighDPI support for non-accelerated compositing contents
1669 https://bugs.webkit.org/show_bug.cgi?id=131562
1671 Reviewed by Anders Carlsson.
1673 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1674 (deviceScaleFactorChanged): Added this callback to pass scale changes to the page proxy.
1675 (webkitWebViewBaseCreateWebPage): Attach the callback to the notify signal.
1676 * UIProcess/WebPageProxy.cpp:
1677 * UIProcess/cairo/BackingStoreCairo.cpp:
1678 (WebKit::WebPageProxy::setCustomDeviceScaleFactor): Do not set a
1679 custom device scale factor for cairo when it's not supported.
1680 (WebKit::createBackingStoreForGTK): Pass the scale factor to the WebCore backing store.
1681 (WebKit::BackingStore::incorporateUpdate): Ditto.
1683 2014-05-28 Carlos Garcia Campos <cgarcia@igalia.com>
1685 [GTK] Use GMainLoopSource for idle and timeout sources in WebKit2
1686 https://bugs.webkit.org/show_bug.cgi?id=130081
1688 Reviewed by Martin Robinson.
1690 * Platform/WorkQueue.h:
1691 * Platform/gtk/WorkQueueGtk.cpp:
1692 (WorkQueue::registerSocketEventHandler): Stop pretending it's
1693 possible to register a socket event handler for more than one
1695 (WorkQueue::unregisterSocketEventHandler):
1696 (WorkQueue::dispatch):
1697 (WorkQueue::dispatchAfter):
1698 * Shared/Downloads/soup/DownloadSoup.cpp:
1699 (WebKit::DownloadClient::DownloadClient):
1700 (WebKit::DownloadClient::~DownloadClient):
1701 (WebKit::DownloadClient::didReceiveData):
1702 (WebKit::DownloadClient::handleResponse):
1703 (WebKit::DownloadClient::handleResponseLater):
1704 * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
1705 (WebKit::PluginInfoCache::PluginInfoCache):
1706 (WebKit::PluginInfoCache::~PluginInfoCache):
1707 (WebKit::PluginInfoCache::saveToFile):
1708 (WebKit::PluginInfoCache::updatePluginInfo):
1709 * UIProcess/Plugins/gtk/PluginInfoCache.h:
1710 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1711 (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
1712 (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
1713 (WebKit::LayerTreeHostGtk::scheduleLayerFlush):
1714 (WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
1715 * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
1717 2014-05-28 Gavin Barraclough <baraclough@apple.com>
1719 viewStateDidChange should always fully update ViewState
1720 https://bugs.webkit.org/show_bug.cgi?id=133159
1722 Reviewed by Anders Carlson.
1724 Currently WebPageProxy::viewStateDidChange is passed a mask of bits to update.
1726 This has the following negative consequences:
1727 – WKWebView implicitly requires more detailed knowledge of the internal implementation of the PageClient.
1728 – Updates may unnecessarily be split over multiple IPC messages.
1729 – In order to support partial updates we make multiple virtual function calls to PageClient, which then makes duplicate objc calls.
1731 Better to just always update the entire ViewState.
1733 * UIProcess/API/Cocoa/WKWebView.mm:
1734 (-[WKWebView didMoveToWindow]):
1735 - removed argument to viewStateDidChange.
1736 * UIProcess/API/gtk/PageClientImpl.cpp:
1737 (WebKit::PageClientImpl::viewState):
1738 (WebKit::PageClientImpl::isViewWindowActive): Deleted.
1739 (WebKit::PageClientImpl::isViewFocused): Deleted.
1740 (WebKit::PageClientImpl::isViewVisible): Deleted.
1741 (WebKit::PageClientImpl::isViewInWindow): Deleted.
1742 * UIProcess/API/gtk/PageClientImpl.h:
1743 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
1744 * UIProcess/API/mac/WKView.mm:
1745 (-[WKView becomeFirstResponder]):
1746 (-[WKView resignFirstResponder]):
1747 (-[WKView viewDidMoveToWindow]):
1748 (-[WKView _windowDidBecomeKey:]):
1749 (-[WKView _windowDidResignKey:]):
1750 (-[WKView _windowDidMiniaturize:]):
1751 (-[WKView _windowDidDeminiaturize:]):
1752 (-[WKView _windowDidOrderOffScreen:]):
1753 (-[WKView _windowDidOrderOnScreen:]):
1754 (-[WKView _windowDidChangeOcclusionState:]):
1755 (-[WKView viewDidHide]):
1756 (-[WKView viewDidUnhide]):
1757 (-[WKView _activeSpaceDidChange:]):
1758 (-[WKView _setThumbnailView:]):
1759 (-[WKView endDeferringViewInWindowChanges]):
1760 (-[WKView endDeferringViewInWindowChangesSync]):
1761 - removed argument to viewStateDidChange.
1762 * UIProcess/CoordinatedGraphics/WebView.cpp:
1763 (WebKit::WebView::viewState):
1764 (WebKit::WebView::isViewWindowActive): Deleted.
1765 (WebKit::WebView::isViewFocused): Deleted.
1766 (WebKit::WebView::isViewVisible): Deleted.
1767 (WebKit::WebView::isViewInWindow): Deleted.
1768 * UIProcess/CoordinatedGraphics/WebView.h:
1769 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
1770 * UIProcess/PageClient.h:
1771 (WebKit::PageClient::isViewVisibleOrOccluded): Deleted.
1772 (WebKit::PageClient::isVisuallyIdle): Deleted.
1773 - merged isViewVisibleOrOccluded/isVisuallyIdle to subclass viewState methods.
1774 * UIProcess/WebPageProxy.cpp:
1775 (WebKit::WebPageProxy::WebPageProxy):
1776 (WebKit::WebPageProxy::reattachToWebProcess):
1777 - updateViewState -> PageClient::viewState
1778 (WebKit::WebPageProxy::viewStateDidChange):
1779 - argument removed; updateViewState -> PageClient::viewState.
1780 (WebKit::WebPageProxy::setCursor):
1781 - call isViewWindowActive on WebPageProxy, rather than PageClient.
1782 (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
1783 - call isViewWindowActive on WebPageProxy, rather than PageClient.
1784 (WebKit::WebPageProxy::updateViewState): Deleted.
1785 - removed - viewState method moved to PageClient.
1786 * UIProcess/WebPageProxy.h:
1787 (WebKit::WebPageProxy::isViewWindowActive):
1788 - added missing implementation.
1789 (WebKit::WebPageProxy::isViewVisible):
1790 - removed argument to viewStateDidChange.
1791 * UIProcess/WebProcessProxy.cpp:
1792 (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
1793 - removed argument to viewStateDidChange.
1794 * UIProcess/ios/PageClientImplIOS.h:
1795 * UIProcess/ios/PageClientImplIOS.mm:
1796 (WebKit::PageClientImpl::viewState):
1797 (WebKit::PageClientImpl::isViewWindowActive): Deleted.
1798 (WebKit::PageClientImpl::isViewFocused): Deleted.
1799 (WebKit::PageClientImpl::isViewVisible): Deleted.
1800 (WebKit::PageClientImpl::isViewInWindow): Deleted.
1801 (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
1802 (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
1803 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
1804 * UIProcess/ios/WKContentView.mm:
1805 (-[WKContentView didMoveToWindow]):
1806 (-[WKContentView _applicationDidEnterBackground:]):
1807 (-[WKContentView _applicationWillEnterForeground:]):
1808 - removed argument to viewStateDidChange.
1809 * UIProcess/mac/PageClientImpl.h:
1810 * UIProcess/mac/PageClientImpl.mm:
1811 (WebKit::PageClientImpl::viewState):
1812 (WebKit::PageClientImpl::showCorrectionPanel):
1813 (WebKit::PageClientImpl::showDictationAlternativeUI):
1814 (WebKit::PageClientImpl::isViewWindowActive): Deleted.
1815 (WebKit::PageClientImpl::isViewFocused): Deleted.
1816 (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
1817 (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
1818 - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
1820 2014-05-28 Jeffrey Pfau <jpfau@apple.com>
1822 Add Obj-C API for cache partitioned URL schemes
1823 https://bugs.webkit.org/show_bug.cgi?id=133361
1824 <rdar://problem/17035415>
1826 Reviewed by Anders Carlsson.
1828 * UIProcess/API/Cocoa/WKProcessPool.mm:
1829 (-[WKProcessPool _initWithConfiguration:]):
1830 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
1831 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
1832 (-[_WKProcessPoolConfiguration cachePartitionedURLSchemes]):
1833 (-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
1834 (-[_WKProcessPoolConfiguration copyWithZone:]):
1836 2014-05-28 Sam Weinig <sam@webkit.org>
1838 [iOS WebKit2] Sometimes Safari gets into a limbo state after web process crash
1839 <rdar://problem/17029526>
1840 https://bugs.webkit.org/show_bug.cgi?id=133362
1842 Reviewed by Dan Bernstein.
1844 * UIProcess/WebPageProxy.cpp:
1845 (WebKit::WebPageProxy::WebPageProxy):
1846 Remove unnecessary initialization of a unique_ptr.
1848 (WebKit::WebPageProxy::reattachToWebProcess):
1849 Move calls to update the view state and activity tokens to after we have swapped in the new process.
1851 (WebKit::WebPageProxy::resetStateAfterProcessExited):
1852 Clear the activity token on process exit.
1854 2014-05-28 Timothy Horton <timothy_horton@apple.com>
1856 Add WKWebView SPI to forcefully kill the associated Web process
1857 https://bugs.webkit.org/show_bug.cgi?id=133357
1859 Reviewed by Anders Carlsson.
1861 * UIProcess/API/Cocoa/WKWebView.mm:
1862 (-[WKWebView _killWebContentProcess]):
1863 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1865 2014-05-28 Dan Bernstein <mitz@apple.com>
1867 [Cocoa] Crash when trying to decode an instance of a class inheriting from WKObject
1868 https://bugs.webkit.org/show_bug.cgi?id=133355
1870 Reviewed by Anders Carlsson.
1872 * Shared/Cocoa/WKObject.mm:
1873 (-[WKObject classForCoder]): Override this NSObject method to forward to the
1875 (-[WKObject classForKeyedArchiver]): Ditto.
1877 2014-05-28 Simon Fraser <simon.fraser@apple.com>
1879 [iOS WK2] Improve behavior of position:fixed inside accelerated overflow-scroll
1880 https://bugs.webkit.org/show_bug.cgi?id=133352
1882 Reviewed by Tim Horton.
1884 Pass the correct delta down to descendant nodes.
1886 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1887 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
1889 2014-05-28 Andy Estes <aestes@apple.com>
1891 [iOS] REGRESSION (r168388): DidNotHandleTapAsClick not sent when commitPotentialTap() fails
1892 https://bugs.webkit.org/show_bug.cgi?id=133349
1894 Reviewed by Benjamin Poulain.
1896 WebPage::commitPotentialTap() fails when a recognized single tap cannot be sent as a synthetic click event.
1897 We should send WebPageProxy::DidNotHandleTapAsClick in these cases.
1899 * WebProcess/WebPage/WebPage.h:
1900 * WebProcess/WebPage/ios/WebPageIOS.mm:
1901 (WebKit::WebPage::commitPotentialTap):
1902 (WebKit::WebPage::commitPotentialTapFailed):
1904 2014-05-28 Commit Queue <commit-queue@webkit.org>
1906 Unreviewed, rolling out r169423.
1907 https://bugs.webkit.org/show_bug.cgi?id=133348
1909 It makes a lot of tests crash in assert (Requested by KaL on
1914 "[GTK] Use GMainLoopSource for idle and timeout sources in
1916 https://bugs.webkit.org/show_bug.cgi?id=130081
1917 http://trac.webkit.org/changeset/169423
1919 2014-05-28 Carlos Garcia Campos <cgarcia@igalia.com>
1921 [GTK] Use GMainLoopSource for idle and timeout sources in WebKit2
1922 https://bugs.webkit.org/show_bug.cgi?id=130081
1924 Reviewed by Martin Robinson.
1926 * Platform/WorkQueue.h:
1927 * Platform/gtk/WorkQueueGtk.cpp:
1928 (WorkQueue::registerSocketEventHandler): Stop pretending it's
1929 possible to register a socket event handler for more than one
1931 (WorkQueue::unregisterSocketEventHandler):
1932 (WorkQueue::dispatch):
1933 (WorkQueue::dispatchAfter):
1934 * Shared/Downloads/soup/DownloadSoup.cpp:
1935 (WebKit::DownloadClient::DownloadClient):
1936 (WebKit::DownloadClient::~DownloadClient):
1937 (WebKit::DownloadClient::didReceiveData):
1938 (WebKit::DownloadClient::handleResponse):
1939 (WebKit::DownloadClient::handleResponseLater):
1940 * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
1941 (WebKit::PluginInfoCache::PluginInfoCache):
1942 (WebKit::PluginInfoCache::~PluginInfoCache):
1943 (WebKit::PluginInfoCache::saveToFile):
1944 (WebKit::PluginInfoCache::updatePluginInfo):
1945 * UIProcess/Plugins/gtk/PluginInfoCache.h:
1946 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1947 (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
1948 (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
1949 (WebKit::LayerTreeHostGtk::scheduleLayerFlush):
1950 (WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
1951 * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
1953 2014-05-28 Dan Bernstein <mitz@apple.com>
1955 [Cocoa] Can't use bundle-defined classes for bundle parameters
1956 https://bugs.webkit.org/show_bug.cgi?id=133339
1958 Reviewed by Anders Carlsson.
1960 Ensure that bundle parameters are decoded only after the injected bundle is loaded.
1962 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1963 (WebKit::InjectedBundle::create): Moved the definition from the header to here, added the
1964 lagacy initializationUserData as a parameter, and made this function set the sandbox
1965 extension and load the bundle.
1966 (WebKit::InjectedBundle::InjectedBundle): Removed call to platformInitialize.
1967 * WebProcess/InjectedBundle/InjectedBundle.h:
1968 (WebKit::InjectedBundle::setSandboxExtension): Deleted.
1969 * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
1970 (WebKit::InjectedBundle::initialize): Renamed the load function to this, and added the
1971 creation parameters as a parameter. Moved code to initialize the bundle paramters from
1972 platformInitialize to here. Changed the class passed to -decodeObjectOfClass:forKey: to
1973 NSObject, to allow arbitrary types in the values, and added an assertion that the
1974 top-level object is a dictionary.
1975 (WebKit::InjectedBundle::platformInitialize): Deleted.
1976 * WebProcess/WebProcess.cpp:
1977 (WebKit::WebProcess::initializeWebProcess): Changed to pass the legacy initialization user
1978 data to InjectedBundle::create() and removed code to separately set the sandbox extension
1979 and load the bundle, which is now done by create().
1981 2014-05-28 Alberto Garcia <berto@igalia.com>
1983 Unreviewed. Fix warning: unused parameter 'frame'
1985 * WebProcess/WebPage/WebPage.cpp:
1986 (WebKit::WebPage::didFinishDocumentLoad):
1988 2014-05-27 Simon Fraser <simon.fraser@apple.com>
1990 [iOS WK2] Fix behavior of position:sticky inside accelerated overflow-scroll
1991 https://bugs.webkit.org/show_bug.cgi?id=133334
1992 <rdar://problem/16462535>
1994 Reviewed by Tim Horton.
1996 When the scroll position changes in an accelerated overflow-scroll element, we have
1997 to update child nodes in the scrolling tree for position:sticky. That requires a
1998 more generic ability to update the scrolling tree after some arbitrary zoom or
1999 scroll. To do this, we need to know the current fixed position rect, rather than
2000 having it passed in.
2002 So make the fixed position rect available from ScrollingTree, and make it possible
2003 to get the current scrollPosition() from any ScrollingTreeScrollingNode.
2005 Also, implement updateLayersAfterDelegatedScroll() in ScrollingTreeOverflowScrollingNodeIOS,
2006 and have it update descendant layers.
2008 Finally, fix ScrollingTreeOverflowScrollingNode to use the correct rectangle for its
2009 constraints math, using the scroll position of the parent node if appropriate.
2011 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2012 * UIProcess/Scrolling/RemoteScrollingTree.cpp:
2013 (WebKit::RemoteScrollingTree::fixedPositionRect):
2014 * UIProcess/Scrolling/RemoteScrollingTree.h:
2015 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
2016 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2017 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterDelegatedScroll):
2018 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
2019 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2020 (WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):
2022 2014-05-27 Simon Fraser <simon.fraser@apple.com>
2024 Do some renaming in the scrolling tree
2025 https://bugs.webkit.org/show_bug.cgi?id=133333
2027 Reviewed by Tim Horton.
2029 Rename ScrollingTreeNode::parentScrollPositionDidChange() to updateLayersAfterAncestorChange()
2030 since this goes deep and to indicate that it's about layer updating.
2032 Also rename the "viewportRect" parameter to "fixedPositionRect", since on iOS
2033 this is the custom fixed-position rect that changes on zooming.
2035 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2036 (WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
2037 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2038 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
2039 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterViewportChange):
2041 2014-05-27 Geoffrey Garen <ggaren@apple.com>
2043 Some proof-reading of the WebKit2 API headerdoc
2044 https://bugs.webkit.org/show_bug.cgi?id=133328
2046 Reviewed by Anders Carlsson.
2048 Consistently say "item" to reference back-forward list items.
2050 Consistently say "webpage" instead of "page" or "web page".
2052 Consistently say "navigation" instead of "load".
2054 Plus a few fix-ups for run-on sentences, mismatched verb tense, and
2055 mismatched singular vs plural.
2057 * UIProcess/API/Cocoa/WKBackForwardList.h:
2058 * UIProcess/API/Cocoa/WKBackForwardListItem.h:
2059 * UIProcess/API/Cocoa/WKBrowsingContextController.h:
2060 * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
2061 * UIProcess/API/Cocoa/WKFrameInfo.h:
2062 * UIProcess/API/Cocoa/WKNavigation.h:
2063 * UIProcess/API/Cocoa/WKNavigationAction.h:
2064 * UIProcess/API/Cocoa/WKNavigationDelegate.h:
2065 * UIProcess/API/Cocoa/WKProcessPool.h:
2066 * UIProcess/API/Cocoa/WKUIDelegate.h:
2067 * UIProcess/API/Cocoa/WKWebView.h:
2069 2014-05-27 Timothy Horton <timothy_horton@apple.com>
2071 [wk2] PDFPlugin snapshots are misplaced
2072 https://bugs.webkit.org/show_bug.cgi?id=133323
2074 Reviewed by Simon Fraser.
2076 * WebProcess/Plugins/PDF/PDFPlugin.mm:
2077 (WebKit::PDFPlugin::paintControlForLayerInContext):
2078 (WebKit::PDFPlugin::snapshot):
2079 Include the scroll offset in the snapshot translation,
2080 and use the whole document size instead of just the view size.
2082 2014-05-27 Sam Weinig <sam@webkit.org>
2084 [WebKit2] Move WebPreferences macro definitions and key names into their own files
2085 https://bugs.webkit.org/show_bug.cgi?id=133315
2087 Reviewed by Anders Carlsson.
2090 * Shared/WebPreferencesDefinitions.h: Copied from Source/WebKit2/Shared/WebPreferencesStore.h.
2091 * Shared/WebPreferencesKeys.cpp: Copied from Source/WebKit2/Shared/WebPreferencesStore.cpp.
2092 * Shared/WebPreferencesKeys.h: Copied from Source/WebKit2/Shared/WebPreferencesStore.h.
2093 * Shared/WebPreferencesStore.cpp:
2094 * Shared/WebPreferencesStore.h:
2095 * UIProcess/WebPreferences.cpp:
2096 * UIProcess/WebPreferences.h:
2097 * UIProcess/mac/WebContextMac.mm:
2098 * UIProcess/mac/WebPreferencesMac.mm:
2099 * UIProcess/mac/WebProcessProxyMac.mm:
2100 * WebKit2.xcodeproj/project.pbxproj:
2101 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2102 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2103 * WebProcess/WebPage/WebPage.cpp:
2104 * WebProcess/WebProcess.cpp:
2106 2014-05-27 Gavin Barraclough <baraclough@apple.com>
2108 Add UI process watchdog on iOS to ensure WebProcess connections close
2109 https://bugs.webkit.org/show_bug.cgi?id=133200
2110 <rdar://problem/16997983>
2112 Mountain Lion build fix
2114 * Platform/IPC/mac/ConnectionMac.mm:
2115 (IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
2117 2014-05-27 Gavin Barraclough <baraclough@apple.com>
2119 importance_assertion -> denap_assertion
2120 https://bugs.webkit.org/show_bug.cgi?id=133294
2124 * Platform/IPC/mac/ConnectionMac.mm:
2125 (IPC::Connection::open):
2127 2014-05-27 Gavin Barraclough <baraclough@apple.com>
2129 Add UI process watchdog on iOS to ensure WebProcess connections close
2130 https://bugs.webkit.org/show_bug.cgi?id=133200
2131 <rdar://problem/16997983>
2133 Reviewed by Darin Adler.
2135 When the WebProcessProxy wants to disconnect from a WebContent process it just drops the connection,
2136 and hopes the connection closes. There is a watchdog thread in the ChildProcess to try to ensure this
2139 On iOS the process may not be runnable at the time, preventing termination. Instead add a watchdog in
2140 the UI process to make the process runnable, and to terminate if it doesn't quit in a timely fashion.
2142 * Platform/IPC/Connection.h:
2143 - added terminateSoon.
2144 * Platform/IPC/mac/ConnectionMac.mm:
2145 (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
2146 - take an assertion to make the process runnable, and start a watchdog timer.
2147 (IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
2148 - if the process hasn't quit by the timer the watchdog fires, kill it.
2149 (IPC::Connection::terminateSoon):
2150 - create a ConnectionTerminationWatchdog.
2151 * UIProcess/WebProcessProxy.cpp:
2152 (WebKit::WebProcessProxy::removeWebPage):
2153 - when disconnecting from a process, first tell it to terminateSoon.
2155 2014-05-26 Gavin Barraclough <barraclough@apple.com>
2157 importance_assertion -> denap_assertion
2158 https://bugs.webkit.org/show_bug.cgi?id=133294
2160 Reviewed by Sam Weinig.
2162 Update in accordance with API change. The importance assertion is used on
2163 Mavericks & newer to ensure the WebContent process wakes from AppNap.
2165 * Platform/IPC/mac/ConnectionMac.mm:
2166 (IPC::Connection::open):
2167 - MACH_PORT_IMPORTANCE_RECEIVER -> MACH_PORT_DENAP_RECEIVER
2168 * Platform/IPC/mac/ImportanceAssertion.h:
2169 (IPC::ImportanceAssertion::ImportanceAssertion):
2170 (IPC::ImportanceAssertion::~ImportanceAssertion):
2171 - proc_importance_assertion -> proc_denap_assertion
2173 2014-05-27 Jessie Berlin <jberlin@apple.com>
2175 Revert r169362 since it broke the ML build.
2177 * Platform/IPC/Connection.h:
2178 * Platform/IPC/mac/ConnectionMac.mm:
2179 (IPC::ConnectionTerminationWatchdog::createConnectionTerminationWatchdog): Deleted.
2180 (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog): Deleted.
2181 (IPC::ConnectionTerminationWatchdog::watchdogTimerFired): Deleted.
2182 (IPC::Connection::terminateSoon): Deleted.
2183 * UIProcess/WebProcessProxy.cpp:
2184 (WebKit::WebProcessProxy::removeWebPage):
2186 2014-05-27 Jon Lee <jonlee@apple.com>
2188 Update ENABLE(MEDIA_SOURCE) on Mac
2189 https://bugs.webkit.org/show_bug.cgi?id=133141
2191 Reviewed by Darin Adler.
2193 * Configurations/FeatureDefines.xcconfig:
2195 2014-05-27 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
2198 https://bugs.webkit.org/show_bug.cgi?id=132863
2200 Reviewed by Csaba Osztrogonác.
2202 * Configurations/FeatureDefines.xcconfig:
2203 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
2204 * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
2205 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2206 (WebKit::NetworkConnectionToWebProcess::didClose):
2207 (WebKit::NetworkConnectionToWebProcess::blobSize):
2208 * NetworkProcess/NetworkConnectionToWebProcess.h:
2209 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2210 * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
2211 * NetworkProcess/NetworkProcessPlatformStrategies.h:
2212 * NetworkProcess/NetworkResourceLoader.cpp:
2213 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
2214 * WebProcess/FileAPI/BlobRegistryProxy.cpp:
2215 * WebProcess/FileAPI/BlobRegistryProxy.h:
2216 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2217 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2218 * WebProcess/WebPage/WebPage.cpp:
2219 (WebKit::WebPage::canHandleRequest):
2221 2014-05-26 Tim Horton <timothy_horton@apple.com>
2223 [wk2] RemoteLayerBackingStore front buffers should be purgeable when unparented
2224 https://bugs.webkit.org/show_bug.cgi?id=133020
2225 <rdar://problem/16521736>
2227 Reviewed by Simon Fraser.
2229 * Shared/mac/RemoteLayerBackingStore.mm:
2230 (WebKit::RemoteLayerBackingStore::display):
2231 Let the context know whenever a RemoteLayerBackingStore is displayed, so that
2232 RemoteLayerBackingStoreCollection can (if needed) note that the backing store
2233 is active once again (because we only display parented backing store).
2235 (WebKit::RemoteLayerBackingStore::setBufferVolatility):
2236 Ensure that we never have live contexts attached to any buffers when
2237 marking them volatile, because checking isInUse() with live contexts is futile.
2239 * Shared/mac/RemoteLayerBackingStoreCollection.h:
2240 * Shared/mac/RemoteLayerBackingStoreCollection.mm:
2241 (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
2242 (WebKit::RemoteLayerBackingStoreCollection::willFlushLayers):
2243 (WebKit::RemoteLayerBackingStoreCollection::willCommitLayerTree):
2244 (WebKit::RemoteLayerBackingStoreCollection::didFlushLayers):
2245 (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDestroyed):
2246 (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed):
2247 (WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatileImmediately):
2248 (WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatile):
2249 (WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable):
2250 (WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
2251 (WebKit::RemoteLayerBackingStoreCollection::scheduleVolatilityTimer):
2252 (WebKit::RemoteLayerBackingStoreCollection::purgeabilityTimerFired): Deleted.
2253 (WebKit::RemoteLayerBackingStoreCollection::schedulePurgeabilityTimer): Deleted.
2254 Rename purgeable->volatile for accuracy.
2255 Keep track of two sets of backing store: those which are active/parented, and
2256 those which are not. Backing store is moved to the inactive set after building
2257 the transaction in which its owning layer is unparented.
2258 When backing store is unparented, try to mark it volatile immediately. Also,
2259 mark the backing store property as dirty on the owning layer so that when
2260 said layer is reparented, we encode the backing store in the commit that reparents it,
2261 as the UI process will throw away its reference to the backing store when
2262 the layer is unparented. Mark the front buffers of unparented layers as volatile,
2263 in addition to the others.
2265 * Shared/mac/RemoteLayerTreeTransaction.h:
2266 (WebKit::RemoteLayerTreeTransaction::layerIDsWithNewlyUnreachableBackingStore):
2267 * Shared/mac/RemoteLayerTreeTransaction.mm:
2268 (WebKit::RemoteLayerTreeTransaction::encode):
2269 (WebKit::RemoteLayerTreeTransaction::decode):
2270 (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore):
2271 Include the list of layers (by ID) with backing store which just became unreachable in the transaction.
2273 * UIProcess/mac/RemoteLayerTreeHost.mm:
2274 (WebKit::RemoteLayerTreeHost::updateLayerTree):
2275 Clear the contents of layers which now have unreachable backing store.
2276 Otherwise, the UI process would hold a 'use' on the IOSurface, and prevent
2277 the Web process from marking it volatile.
2279 * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
2280 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
2281 (WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):
2282 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2283 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2284 Give RemoteLayerBackingStoreCollection a shot at the RemoteLayerTreeTransaction,
2285 so that it can fill in layerIDsWithNewlyUnreachableBackingStore.
2286 Also, let it know when the flush begins and ends, so that it can keep track
2287 of which layers were reached in the flush.
2289 2014-05-26 Shivakumar JM <shiva.jm@samsung.com>
2291 [EFL][WK2] Fix EWK2BackForwardListTest test fails.
2292 https://bugs.webkit.org/show_bug.cgi?id=133171
2294 Reviewed by Gyuyoung Kim.
2296 Use local test html pages instead of EWK2UnitTestServer, call ewk_view_url_set() to load test html pages.
2297 Since even after setting no_proxy="localhost,127.0.0.1", still test server was unable to load the test
2298 html pages for ewk2_back_forward_list tests, so changed to use local html pages.
2300 * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp:
2303 2014-05-26 Shivakumar JM <shiva.jm@samsung.com>
2305 [EFL][WK2] Fix code style check errors in EFL API tests.
2306 https://bugs.webkit.org/show_bug.cgi?id=133170
2308 Reviewed by Gyuyoung Kim.
2310 Omit int when using unsigned modifier, as per coding style rules.
2312 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
2313 (EWK2UnitTest::EWK2UnitTestBase::SetUp):
2314 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
2315 (EWK2UnitTest::EWK2UnitTestEnvironment::defaultWidth):
2316 (EWK2UnitTest::EWK2UnitTestEnvironment::defaultHeight):
2318 2014-05-22 Gavin Barraclough <baraclough@apple.com>
2320 Add UI process watchdog on iOS to ensure WebProcess connections close
2321 https://bugs.webkit.org/show_bug.cgi?id=133200
2322 <rdar://problem/16997983>
2324 Reviewed by Darin Adler.
2326 When the WebProcessProxy wants to disconnect from a WebContent process it just drops the connection,
2327 and hopes the connection closes. There is a watchdog thread in the ChildProcess to try to ensure this
2330 On iOS the process may not be runnable at the time, preventing termination. Instead add a watchdog in
2331 the UI process to make the process runnable, and to terminate if it doesn't quit in a timely fashion.
2333 * Platform/IPC/Connection.h:
2334 - added terminateSoon.
2335 * Platform/IPC/mac/ConnectionMac.mm:
2336 (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
2337 - take an assertion to make the process runnable, and start a watchdog timer.
2338 (IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
2339 - if the process hasn't quit by the timer the watchdog fires, kill it.
2340 (IPC::Connection::terminateSoon):
2341 - create a ConnectionTerminationWatchdog.
2342 * UIProcess/WebProcessProxy.cpp:
2343 (WebKit::WebProcessProxy::removeWebPage):
2344 - when disconnecting from a process, first tell it to terminateSoon.
2346 2014-05-26 Sam Weinig <sam@webkit.org>
2348 [WebKit2] Add better default preferences while keeping backward compatibility for the C-SPI
2349 https://bugs.webkit.org/show_bug.cgi?id=133289
2351 Reviewed by Anders Carlsson.
2353 * Shared/WebPreferencesStore.h:
2354 Change a few defaults:
2355 - PluginsEnabled -> false
2356 - JavaEnabled -> false
2357 - JavaEnabledForLocalFiles -> false
2358 - StorageBlockingPolicy -> BlockThirdPartyStorage
2360 * UIProcess/API/C/WKPreferences.cpp:
2361 (WKPreferencesCreate):
2362 (WKPreferencesCreateWithIdentifier):
2363 * UIProcess/WebPageGroup.cpp:
2364 (WebKit::WebPageGroup::WebPageGroup):
2365 Switch to using WebPreferences::createWithLegacyDefaults().
2367 * UIProcess/WebPreferences.cpp:
2368 (WebKit::WebPreferences::create):
2369 (WebKit::WebPreferences::createWithLegacyDefaults):
2370 * UIProcess/WebPreferences.h:
2371 Move create functions to the cpp file and add createWithLegacyDefaults() which keeps
2374 * UIProcess/API/C/WKPreferencesRef.h:
2377 * UIProcess/API/Cocoa/WKPreferences.h:
2378 Update the comment to reflect the new defaults.
2380 * WebProcess/WebPage/WebPage.cpp:
2381 (WebKit::WebPage::updatePreferences):
2382 Unconditionally set setShouldDispatchJavaScriptWindowOnErrorEvents() to true. This setting only
2383 exists for legacy WebKit.
2385 2014-05-26 Dan Bernstein <mitz@apple.com>
2387 [Cocoa] Rewrite WK_DESIGNATED_INITIALIZER in installed headers
2388 https://bugs.webkit.org/show_bug.cgi?id=133290
2390 Reviewed by Anders Carlsson.
2392 * Shared/API/Cocoa/WKFoundation.h: When WK_API_AVAILABILITY_ENABLED is defined, don’t
2393 provide definitions of WK_DESIGNATED_INITIALIZER and WK_UNAVAILABLE, since those macros will
2394 be rewritten out of the headers. When WK_API_AVAILABILITY_ENABLED isn’t defined, provide
2395 definitions of the other two macros as appropriate for the target OS.
2396 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Removed WK_DESIGNATED_INITIALIZER from a
2397 category method declaration.
2398 * UIProcess/API/Cocoa/WKWebView.h: Mark the superclass designated initializer
2399 -initWithCoder: as unavailable.
2400 * UIProcess/API/Cocoa/WKWebView.mm:
2401 (-[WKWebView initWithCoder:]): Override this designated initializer of the superclass by
2403 * mac/rewrite-availability-macros.sh: Rewrite WK_DESIGNATED_INITIALIZER to
2404 NS_DESIGNATED_INITIALIZER and WK_UNAVAILABLE to NS_UNAVAILABLE. Also make sure to process
2405 all headers if the script has changed since the last time it was run.
2407 2014-05-26 Commit Queue <commit-queue@webkit.org>
2409 Unreviewed, rolling out r169122.
2410 https://bugs.webkit.org/show_bug.cgi?id=133288
2412 Broke CJK font fallback (Requested by ap on #webkit).
2416 "[Mac] WebProcess doesn't follow localization of UI process
2417 when run as a service"
2418 https://bugs.webkit.org/show_bug.cgi?id=133126
2419 http://trac.webkit.org/changeset/169122
2421 2014-05-26 Anders Carlsson <andersca@apple.com>
2423 Convert a couple of loops over to range-based for
2424 https://bugs.webkit.org/show_bug.cgi?id=133287
2426 Reviewed by Simon Fraser.
2428 * UIProcess/Plugins/PluginInfoStore.cpp:
2429 (WebKit::PluginInfoStore::findPluginForMIMEType):
2430 (WebKit::PluginInfoStore::findPluginForExtension):
2431 (WebKit::PluginInfoStore::infoForPluginWithPath):
2432 * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
2433 (WebKit::PluginProcessManager::setProcessSuppressionEnabled):
2435 2014-05-26 Carlos Garcia Campos <cgarcia@igalia.com>
2437 [GTK] WebProcess leaked when closing pages with network process enabled
2438 https://bugs.webkit.org/show_bug.cgi?id=129684
2440 Reviewed by Anders Carlsson.
2442 The problem is that the web process is not notified when the UI
2443 process closes the connection, because when close() is called on
2444 the socket by the UI process, the socket is shared by another web
2445 process launched later, preventing the connection from being
2446 shut down. We need to set the CLOEXEC flag on the sockets file
2447 descriptor to make sure they are not exposed to other processes.
2449 * Platform/IPC/Connection.h: Add ConnectionOptions parameter to
2450 createPlatformConnection() with a default value compatible with
2452 * Platform/IPC/unix/ConnectionUnix.cpp:
2453 (IPC::Connection::createPlatformConnection): Set the CLOEXEC flag
2454 on the client and server socket file descriptors depending on the
2456 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2457 (WebKit::ProcessLauncher::launchProcess): Use
2458 IPC::Connection::createPlatformConnection() instead of
2459 socketpair() directly, setting the CLOEXEC flag on the server
2460 before spawning the new process and on the client right after
2461 spawning the new process.
2463 2014-05-25 Anders Carlsson <andersca@apple.com>
2465 Initialize WKWebViewConfiguration ivars lazily
2466 https://bugs.webkit.org/show_bug.cgi?id=133270
2467 <rdar://problem/17027606>
2469 Reviewed by Sam Weinig.
2471 Create a LazyInitialized class template and use it to lazily initialize WKWebViewConfiguration properties.
2473 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2474 (LazyInitialized::get):
2475 Initialize m_value with the given function if it hasn't been initialized already.
2477 (LazyInitialized::set):
2478 Update m_value and set m_isInitialized to true.
2480 (LazyInitialized::peek):
2481 Return m_value without initializing it.
2483 (-[WKWebViewConfiguration description]):
2484 Use getters so we'll initialize variables if needed.
2486 (-[WKWebViewConfiguration copyWithZone:]):
2489 (-[WKWebViewConfiguration processPool]):
2490 (-[WKWebViewConfiguration setProcessPool:]):
2491 (-[WKWebViewConfiguration preferences]):
2492 (-[WKWebViewConfiguration setPreferences:]):
2493 (-[WKWebViewConfiguration userContentController]):
2494 (-[WKWebViewConfiguration setUserContentController:]):
2495 (-[WKWebViewConfiguration _visitedLinkProvider]):
2496 (-[WKWebViewConfiguration _setVisitedLinkProvider:]):
2497 (-[WKWebViewConfiguration _websiteDataStore]):
2498 (-[WKWebViewConfiguration _setWebsiteDataStore:]):
2499 (-[WKWebViewConfiguration _contentProviderRegistry]):
2500 (-[WKWebViewConfiguration _setContentProviderRegistry:]):
2501 Pass initialization code to all getters.
2503 (-[WKWebViewConfiguration _validate]):
2506 (-[WKWebViewConfiguration init]): Deleted.
2508 2014-05-26 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
2510 Remove WebKit2 framework from generate-forwarding-headers.pl
2511 https://bugs.webkit.org/show_bug.cgi?id=133214
2513 Since renaming WebKit2.framework to WebKit.framework is done and all WebKit2/*.h includes
2514 were renamed to WebKit/*.h, generating forwarding headers for WebKit2/*.h framework style
2515 headers is not necessary anymore.
2517 Reviewed by Darin Adler.
2519 * Scripts/generate-forwarding-headers.pl:
2521 2014-05-26 Zan Dobersek <zdobersek@igalia.com>
2523 WebPage::setComposition(), WebPageProxy::didFindStringMatches() should take Vector parameters by const reference
2524 https://bugs.webkit.org/show_bug.cgi?id=133264
2526 Reviewed by Darin Adler.
2528 Taking the Vector parameters in the two methods (invoked through the IPC message handling)
2529 by value causes unnecessary copies. The methods don't modify the objects and don't want
2530 or need fresh copies, hence they should take in const references to Vector objects.
2532 * UIProcess/WebPageProxy.cpp:
2533 (WebKit::WebPageProxy::didFindStringMatches):
2534 * UIProcess/WebPageProxy.h:
2535 * WebProcess/WebPage/WebPage.cpp:
2536 (WebKit::WebPage::setComposition):
2537 * WebProcess/WebPage/WebPage.h:
2539 2014-05-25 Benjamin Poulain <benjamin@webkit.org>
2541 [iOS][WK2] Fix some state reset on crash on the WKWebView
2542 https://bugs.webkit.org/show_bug.cgi?id=133039
2544 Reviewed by Sam Weinig.
2546 This is in no way complete, but this should reduce the undefined states on crash.
2548 * UIProcess/API/Cocoa/WKWebView.mm:
2549 (-[WKWebView _processDidExit]):
2550 If the view is animating, nuke the resize animation. That should be invisible to the user
2551 because the background color is reset to white below.
2553 Reset the contentView frame and scrollview state.
2555 Reset the runtime states. We do not strictly need to reset _needsResetViewStateAfterCommitLoadForMainFrame,
2556 _delayUpdateVisibleContentRects and _hadDelayedUpdateVisibleContentRects but it seems better to have
2559 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2560 (-[WKWebView _endAnimatedResize]):
2561 We could have crashes during rotation. To simplify the reset code, the animated resize code
2562 no longer change any state when WKWebView is using a custom content view.
2564 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2565 * UIProcess/ios/PageClientImplIOS.mm:
2566 (WebKit::PageClientImpl::processDidExit):
2567 Send a _processDidExit on the WKWebView too.
2569 2014-05-25 Anders Carlsson <andersca@apple.com>
2571 Use the right paths for website data
2572 https://bugs.webkit.org/show_bug.cgi?id=133267
2573 <rdar://problem/17027698>
2575 Reviewed by Sam Weinig.
2577 * UIProcess/API/Cocoa/WKProcessPool.mm:
2578 (-[WKProcessPool _initWithConfiguration:]):
2579 Get the path of the absolute URL.
2581 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2582 (WebKit::LocalStorageDatabaseTracker::databasePath):
2585 * WebProcess/Network/NetworkProcessConnection.cpp:
2586 (WebKit::NetworkProcessConnection::didCacheResource):
2589 2014-05-25 Benjamin Poulain <bpoulain@apple.com>
2591 [iOS][WK2] Use ScrollView's scrollOffset as the unobscuredContentRect
2592 https://bugs.webkit.org/show_bug.cgi?id=133262
2594 Reviewed by Simon Fraser.
2596 * WebProcess/WebPage/ios/WebPageIOS.mm:
2597 (WebKit::WebPage::dynamicViewportSizeUpdate):
2598 (WebKit::WebPage::viewportConfigurationChanged):
2599 (WebKit::WebPage::updateVisibleContentRects):
2601 2014-05-25 Sam Weinig <sam@webkit.org>
2605 * UIProcess/API/Cocoa/WKPreferences.h:
2607 2014-05-25 Sam Weinig <sam@webkit.org>
2611 * UIProcess/API/Cocoa/WKPreferences.h:
2613 2014-05-24 Sam Weinig <sam@webkit.org>
2615 [WebKit2] Rework WebPreferencesStore to allow easier overriding of defaults
2616 https://bugs.webkit.org/show_bug.cgi?id=133258
2618 Reviewed by Anders Carlsson.
2620 To support changing default values of preferences based on which API you are using (either
2621 the legacy C-SPI or the Objective-C API), overhaul the WebPreferencesStore to use a single
2622 HashMap of String -> Value (where Value is new type that can be a String, bool, uint32_t or double)
2623 instead of four HashMaps. This allows us to use two of these new HashMaps, one for the actual
2624 set values, and one for overridden defaults. This new Value class will also allow easier incremental
2625 updating of preferences in the future.
2627 Other notable changes:
2628 - Removed Float kind of preferences. There were none.
2629 - Move StorageBlockingPolicy preference to the correct group, it's a uint32_t, not bool.
2631 * Shared/WebPreferencesStore.cpp:
2632 * Shared/WebPreferencesStore.h:
2634 2014-05-25 David Kilzer <ddkilzer@apple.com>
2636 Add type-checked casts for TransformOperations
2637 <http://webkit.org/b/133217>
2639 Reviewed by Simon Fraser.
2641 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2642 (IPC::ArgumentCoder<TransformOperations>::encode):
2643 - Switch to type-checked casts.
2645 2014-05-25 David Kilzer <ddkilzer@apple.com>
2647 Use type-checking FilterOperation casts in CoordinatedGraphicsArgumentCoders.cpp
2648 <http://webkit.org/b/133203>
2650 Reviewed by Simon Fraser.
2652 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2653 (IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
2654 - Replace static_cast<>() operators with type-checking
2655 FilterOperation casts.
2656 - Replace 'default' statement with 'case' statements so new
2657 filters added later require an explicit decision to be made.
2658 (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
2659 - Replace 'default' statement with 'case' statements so new
2660 filters added later require an explicit decision to be made.
2662 2014-05-24 Jon Honeycutt <jhoneycutt@apple.com>
2664 Potential null dereference in
2665 WebFrameLoaderClient::dispatchDidFailProvisionalLoad()
2666 <https://bugs.webkit.org/show_bug.cgi?id=133193>
2668 WebFrameLoaderClient::dispatchDidFailProvisionalLoad() calls the
2669 InjectedBundleLoaderClient's didFailProvisionalLoadWithErrorForFrame()
2670 before sending a message to the UI process that a provisional load has
2671 failed. It's possible for the provisional document loader to become
2672 null while calling into the InjectedBundleLoaderClient (as is the case
2673 with the WebKitTestRunner's injected bundle), leading to a null
2674 dereference when trying to send the DidFailProvisionalLoadForFrame
2677 Reviewed by Darin Adler.
2679 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2680 (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
2681 Get the navigation ID before calling into the injected bundle.
2683 2014-05-23 Simon Fraser <simon.fraser@apple.com>
2685 Rename ScrollingTreeScrollingNode's m_scrollPosition to make it clear that it's the value committed from the state tree
2686 https://bugs.webkit.org/show_bug.cgi?id=133254
2688 Reviewed by Tim Horton.
2690 Override scrollPosition() on ScrollingTreeOverflowScrollingNodeIOS.
2692 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
2693 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2694 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollPosition):
2696 2014-05-24 Chris Fleizach <cfleizach@apple.com>
2698 AX: fix coordinate mapping for iOS accessibility
2699 https://bugs.webkit.org/show_bug.cgi?id=133188
2701 Reviewed by Sam Weinig.
2703 Add in accessibility conversion methods that will check if the methods are present
2704 (if accessibility is not on, they won't be)
2705 and use those to convert points into the right coordinate space that VoiceOver is expecting.
2707 * UIProcess/PageClient.h:
2708 * UIProcess/WebPageProxy.cpp:
2709 (WebKit::WebPageProxy::accessibilityScreenToRootView):
2710 (WebKit::WebPageProxy::rootViewToAccessibilityScreen):
2711 * UIProcess/WebPageProxy.h:
2712 * UIProcess/WebPageProxy.messages.in:
2713 * UIProcess/ios/PageClientImplIOS.h:
2714 * UIProcess/ios/PageClientImplIOS.mm:
2715 (WebKit::PageClientImpl::accessibilityScreenToRootView):
2716 (WebKit::PageClientImpl::rootViewToAccessibilityScreen):
2717 * UIProcess/mac/PageClientImpl.h:
2718 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2719 (WebKit::WebChromeClient::accessibilityScreenToRootView):
2720 (WebKit::WebChromeClient::rootViewToAccessibilityScreen):
2721 * WebProcess/WebCoreSupport/WebChromeClient.h:
2722 * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
2723 (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2724 * WebProcess/WebPage/WebPage.cpp:
2725 (WebKit::WebPage::accessibilityScreenToRootView):
2726 (WebKit::WebPage::rootViewToAccessibilityScreen):
2727 * WebProcess/WebPage/WebPage.h:
2729 2014-05-24 Carlos Garcia Campos <cgarcia@igalia.com>
2731 REGRESSION(r165841): Messages sent before the child process is launched are never sent after r165841
2732 https://bugs.webkit.org/show_bug.cgi?id=131675
2734 Reviewed by Anders Carlsson.
2736 Since r165841 the connection is opened after the pending messages
2737 are sent, because connectionWillOpen might send messages that we
2738 want to happen after the ones already pending. The problem is that
2739 Connection::canSendOutgoingMessages() returns false when
2740 connection hasn't been opened. We should ensure no messages are
2741 sent by connectionWillOpen.
2743 * Shared/ChildProcessProxy.cpp:
2744 (WebKit::ChildProcessProxy::didFinishLaunching): Open the
2745 connection before sending pending messages.
2746 * UIProcess/WebPageProxy.cpp:
2747 (WebKit::WebPageProxy::connectionWillOpen): Do not call
2748 VisitedLinkProvider::addProcess() here because it tries to send a
2749 message to the web process, but the connection hasn't be opened yet.
2750 (WebKit::WebPageProxy::processDidFinishLaunching): Call
2751 VisitedLinkProvider::addProcess() here instead.
2752 * UIProcess/WebPageProxy.h:
2753 * UIProcess/WebProcessProxy.cpp:
2754 (WebKit::WebProcessProxy::didFinishLaunching): Call
2755 WebPageProxy::processDidFinishLaunching() for every web page.
2757 2014-05-23 Ian Henderson <ianh@apple.com>
2759 REGRESSION: Rubberbanding out jumps to top left corner on google.com
2760 https://bugs.webkit.org/show_bug.cgi?id=133253
2761 <rdar://problem/17025664>
2763 Reviewed by Benjamin Poulain.
2765 * UIProcess/API/Cocoa/WKWebView.mm:
2766 (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
2767 Avoid deceleration during zooming to work around a UIKit bug.
2769 2014-05-23 Benjamin Poulain <bpoulain@apple.com>
2771 [iOS][WK2] Avoid updating the view from the viewport configuration unnecessarily
2772 https://bugs.webkit.org/show_bug.cgi?id=133255
2773 <rdar://problem/16890926>
2775 Reviewed by Simon Fraser.
2777 All the updates were mostly harmless since they are pretty cheap, but they can be
2778 very annoying for debugging.
2780 This patch skips viewportUpdates in the trivial cases.
2782 * UIProcess/API/Cocoa/WKWebView.mm:
2783 (-[WKWebView _setMinimumLayoutSizeOverride:]):
2784 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
2785 * WebProcess/WebPage/WebPage.cpp:
2786 (WebKit::WebPage::mainFrameDidLayout):
2787 * WebProcess/WebPage/ios/WebPageIOS.mm:
2788 (WebKit::WebPage::viewportPropertiesDidChange):
2790 2014-05-23 Benjamin Poulain <bpoulain@apple.com>
2792 [iOS][WK2] The page scale factor randomly resets to initial scale when editing
2793 https://bugs.webkit.org/show_bug.cgi?id=133244
2795 Reviewed by Enrica Casucci.
2797 We were never telling the WebProcess that zoom is used triggered. As a result, the ViewportConfiguration was free
2798 to reset the scale whenever it felt like it. The fix is to call willStartUserTriggeredZoom before changing the scale.
2800 This patch also split _willStartUserTriggeredScrollingOrZooming from willStartUserTriggeredZoom
2801 and rename it to willStartPanOrPinchGesture. This is just a tiny cleanup since the only thing left in _willStartUserTriggeredScrollingOrZooming
2802 was gesture related.
2804 * UIProcess/API/Cocoa/WKWebView.mm:
2805 (-[WKWebView _zoomToFocusRect:WebCore::selectionRect:WebCore::fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
2806 (-[WKWebView scrollViewWillBeginZooming:withView:]):
2807 (-[WKWebView scrollViewWillBeginDragging:]):
2808 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2809 * UIProcess/API/ios/WKViewIOS.mm:
2810 (-[WKView scrollViewWillBeginDragging:]):
2811 * UIProcess/ios/WKContentView.h:
2812 * UIProcess/ios/WKContentView.mm:
2813 (-[WKContentView willStartUserTriggeredZoom]):
2814 (-[WKContentView willStartUserTriggeredScroll]): Deleted.
2815 * UIProcess/ios/WKContentViewInteraction.h:
2816 * UIProcess/ios/WKContentViewInteraction.mm:
2817 (-[WKContentView willStartPanOrPinchGesture]):
2818 (-[WKContentView _willStartUserTriggeredScrollingOrZooming]): Deleted.
2820 2014-05-23 Tim Horton <timothy_horton@apple.com>
2822 REGRESSION (iOS WebKit2): requestAnimationFrame fires more than once between layer tree commits
2823 https://bugs.webkit.org/show_bug.cgi?id=132794
2824 <rdar://problem/16877909>
2826 Reviewed by Simon Fraser.
2828 * WebKit2.xcodeproj/project.pbxproj:
2829 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2830 (WebKit::WebChromeClient::createDisplayRefreshMonitor):
2831 * WebProcess/WebCoreSupport/WebChromeClient.h:
2832 * WebProcess/WebPage/DrawingArea.h:
2833 (WebKit::DrawingArea::graphicsLayerFactory):
2834 (WebKit::DrawingArea::createDisplayRefreshMonitor):
2835 Plumb the DisplayRefreshMonitor request through to the DrawingArea.
2836 RemoteLayerTreeDrawingArea will implement and return a RemoteLayerTreeDisplayRefreshMonitor.
2838 * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h: Added.
2839 (WebKit::RemoteLayerTreeDisplayRefreshMonitor::create):
2840 * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.mm: Added.
2841 (WebKit::RemoteLayerTreeDisplayRefreshMonitor::RemoteLayerTreeDisplayRefreshMonitor):
2842 (WebKit::RemoteLayerTreeDisplayRefreshMonitor::~RemoteLayerTreeDisplayRefreshMonitor):
2843 (WebKit::RemoteLayerTreeDisplayRefreshMonitor::requestRefreshCallback):
2844 When requesting a display refresh callback, schedule a layer commit.
2845 It may end up being empty, but will still call us back with a didUpdate,
2846 upon which we'll fire the callback.
2848 (WebKit::RemoteLayerTreeDisplayRefreshMonitor::didUpdateLayers):
2850 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2851 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2852 (WebKit::RemoteLayerTreeDrawingArea::createDisplayRefreshMonitor):
2853 (WebKit::RemoteLayerTreeDrawingArea::willDestroyDisplayRefreshMonitor):
2854 Keep track of the set of DisplayRefreshMonitors.
2856 (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
2857 Fire requestAnimationFrame callbacks once the UI process commits the new layer tree.
2859 2014-05-23 Jeremy Jones <jeremyj@apple.com>
2861 Hide fullscreen immediately when switching tabs.
2862 https://bugs.webkit.org/show_bug.cgi?id=133239
2864 Reviewed by Eric Carlson.
2866 Renamed a function to better describe it's new functionality.
2868 * UIProcess/WebPageProxy.cpp:
2869 (WebKit::WebPageProxy::viewStateDidChange):
2870 now calls: requestHideAndExitFullscreen
2872 2014-05-23 Enrica Casucci <enrica@apple.com>
2874 REGRESSION (WebKit2): Keyboard disappears/appears automatically between text boxes.
2875 https://bugs.webkit.org/show_bug.cgi?id=133243
2876 <rdar://problem/16761913>
2878 Reviewed by Benjamin Poulain.
2880 We need to ensure that when an element loses focus and another one gets it,
2881 this is handled in one single message in the UI process to avoid seeing
2882 the keyboard animating in and out.
2883 This is accomplished by always postponing the blur notification until all events
2884 have been processed.
2885 If a new node is focused before the delayed blur notification is sent to the UI
2886 process, the message we send includes both blur and focus notification. In this case,
2887 the postponed blur notification is not sent.
2889 * UIProcess/PageClient.h:
2890 * UIProcess/WebPageProxy.h:
2891 * UIProcess/WebPageProxy.messages.in:
2892 * UIProcess/ios/PageClientImplIOS.h:
2893 * UIProcess/ios/PageClientImplIOS.mm:
2894 (WebKit::PageClientImpl::startAssistingNode):
2895 * UIProcess/ios/WKContentViewInteraction.h:
2896 * UIProcess/ios/WKContentViewInteraction.mm:
2897 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
2898 (-[WKContentView _startAssistingNode:userIsInteracting:userObject:]): Deleted.
2899 * UIProcess/ios/WebPageProxyIOS.mm:
2900 (WebKit::WebPageProxy::startAssistingNode):
2901 * WebProcess/WebPage/WebPage.cpp:
2902 (WebKit::WebPage::WebPage):
2903 * WebProcess/WebPage/WebPage.h:
2904 * WebProcess/WebPage/ios/WebPageIOS.mm:
2905 (WebKit::WebPage::elementDidFocus):
2906 (WebKit::WebPage::elementDidBlur):
2908 2014-05-23 Anders Carlsson <andersca@apple.com>
2910 Remove an assertion.
2912 * WebProcess/WebPage/WebPage.cpp:
2913 (WebKit::WebPage::loadRequest):
2915 2014-05-23 Tim Horton <timothy_horton@apple.com>
2917 [iOS] WKPDFView should have a page indicator
2918 https://bugs.webkit.org/show_bug.cgi?id=133109
2919 <rdar://problem/16383003>
2921 Reviewed by Anders Carlsson.
2923 * UIProcess/API/Cocoa/WKWebView.mm:
2924 (-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
2925 (-[WKWebView _setObscuredInsets:]):
2926 Forward obscured insets changes to the custom content view.
2928 (-[WKWebView _updateScrollViewBackground]):
2929 If we have a custom content view, use its background instead of the
2930 (likely nonexistent) page's when updaing the scroll view's background color.
2932 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2933 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2934 * UIProcess/Cocoa/WKWebViewContentProvider.h:
2935 * UIProcess/Cocoa/WKWebViewContentProviderDelegate.h: Added.
2936 * UIProcess/API/Cocoa/WKWebView.mm:
2937 (-[WKWebView _setInsetForOverlaidAccessoryViews:]):
2938 Add SPI for clients to inform us about potential overlaid accessory views
2939 which should be taken into account e.g. for positioning the page indicator.
2941 Add a view that sits fixed on top of the WKWebView, ignores interaction,
2942 but provides the WKWebViewContentProvider a place to install views
2943 that don't scroll along with the content.
2945 * UIProcess/ios/WKPDFPageNumberIndicator.h: Added.
2946 * UIProcess/ios/WKPDFPageNumberIndicator.mm: Added.
2947 (-[WKPDFPageNumberIndicator initWithFrame:]):
2948 (-[WKPDFPageNumberIndicator dealloc]):
2949 (-[WKPDFPageNumberIndicator setCurrentPageNumber:]):
2950 (-[WKPDFPageNumberIndicator setPageCount:]):
2951 (-[WKPDFPageNumberIndicator show]):
2952 (-[WKPDFPageNumberIndicator hide:]):
2953 (-[WKPDFPageNumberIndicator moveToPoint:animated:]):
2954 (-[WKPDFPageNumberIndicator sizeThatFits:]):
2955 (-[WKPDFPageNumberIndicator _updateLabel]):
2956 (-[WKPDFPageNumberIndicator _makeRoundedCorners]):
2957 Add a page number indicator.
2959 * UIProcess/ios/WKPDFView.mm:
2960 (-[WKPDFView dealloc]):
2961 (-[WKPDFView web_setScrollView:]):
2962 (-[WKPDFView _revalidateViews]):
2963 (-[WKPDFView _offsetForPageNumberIndicator]):
2964 (-[WKPDFView _updatePageNumberIndicator]):
2965 (-[WKPDFView web_setObscuredInsets:]):
2966 (-[WKPDFView web_setInsetForOverlaidAccessoryViews:]):
2967 (-[WKPDFView web_setFixedOverlayView:]):
2968 (-[WKPDFView _computePageAndDocumentFrames]):
2969 Update the page number indicator when the topmost visible page changes.
2970 Move the page number indicator around when the obscured insets change.
2972 * WebKit2.xcodeproj/project.pbxproj:
2974 2014-05-23 Anders Carlsson <andersca@apple.com>
2976 Fix test failures on the bot.
2978 * UIProcess/API/Cocoa/WKProcessPool.mm:
2979 (websiteDataDirectoryURL):
2980 If we have no bundle identifier, use the process name.
2982 2014-05-23 Enrica Casucci <enrica@apple.com>
2984 REGRESSION (iOS WebKit2): Autocorrection is not accurate when changing selection.
2985 https://bugs.webkit.org/show_bug.cgi?id=133237
2986 <rdar://problem/16655776>
2988 Reviewed by Ryosuke Niwa.
2990 * UIProcess/ios/WKContentViewInteraction.mm:
2991 (-[WKContentView beginSelectionChange]):
2992 (-[WKContentView endSelectionChange]):
2994 When the selection is changed with a gesture in an editable element,
2995 we must notify the keyboard to make sure the autocorrection engine
2996 updates its typing context. WKContentView must implement
2997 beginSelectionChange and endSelectionChange to call into
3000 2014-05-22 Brent Fulgham <bfulgham@apple.com>
3002 [iOS] WK2: Provide implementation for windowFrame
3003 https://bugs.webkit.org/show_bug.cgi?id=133205
3004 <rdar://problem/16894890>
3006 Reviewed by Benjamin Poulain.
3008 * UIProcess/Cocoa/UIDelegate.h:
3009 * UIProcess/Cocoa/UIDelegate.mm:
3010 (WebKit::UIDelegate::UIClient::windowFrame): Added.
3011 * UIProcess/ios/PageClientImplIOS.mm:
3012 (WebKit::PageClientImpl::convertToUserSpace): Added.
3014 2014-05-20 Anders Carlsson <andersca@apple.com>
3016 Use a per app directory structure for website data
3017 https://bugs.webkit.org/show_bug.cgi?id=133125
3018 <rdar://problem/16830143>
3020 Reviewed by Dan Bernstein, Sam Weinig and Tim Horton.
3022 Put website data in subdirectories of ~/Library/WebKit/<bundle ID>/WebsiteData.
3023 We use "LocalStorage", "WebSQL", and "IndexedDB" subdirectories.
3025 * UIProcess/API/Cocoa/WKProcessPool.mm:
3026 (websiteDataDirectoryURL):
3027 (-[WKProcessPool _initWithConfiguration:]):
3029 2014-05-23 Dan Bernstein <mitz@apple.com>
3031 [Cocoa] WKNavigationResponsePrivate.h is internal
3032 https://bugs.webkit.org/show_bug.cgi?id=133218
3034 Reviewed by Dean Jackson.
3036 * WebKit2.xcodeproj/project.pbxproj: Promote WKNavigationResponsePrivate.h to private.
3038 2014-05-23 Carlos Garcia Campos <cgarcia@igalia.com>
3040 [UNIX] Reorganize and cleanup main functions of GTK and EFL ports
3041 https://bugs.webkit.org/show_bug.cgi?id=131024
3043 Reviewed by Gustavo Noronha Silva.
3045 Move main function implementation files to <process-dir>/EntryPoint/unix/<ProcessName>Main.cpp
3046 files that are now shared by GTK and EFL ports. These files call a
3047 main method that wraps a new method ChildProcessMain that contains
3048 the common code and uses a helper class for the platform specific
3049 code. GTK+ and EFL ports implement that helper class for every process type.
3051 * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp: Renamed from Source/WebKit2/efl/MainEfl.cpp.
3053 * NetworkProcess/efl/NetworkProcessMainEfl.cpp: Renamed from Source/WebKit2/unix/NetworkMainUnix.cpp.
3054 (WebKit::NetworkProcessMainUnix):
3055 * NetworkProcess/gtk/NetworkProcessMainGtk.cpp: Renamed from Source/WebKit2/NetworkProcess/unix/NetworkProcessMainUnix.cpp.
3056 (WebKit::NetworkProcessMainUnix):
3057 * NetworkProcess/unix/NetworkProcessMainUnix.h:
3058 * PlatformEfl.cmake:
3059 * PlatformGTK.cmake:
3060 * PluginProcess/EntryPoint/unix/PluginProcessMain.cpp: Renamed from Source/WebKit2/unix/PluginMainUnix.cpp.
3062 * PluginProcess/unix/PluginProcessMainUnix.cpp:
3063 (WebKit::webkitXError):
3064 (WebKit::PluginProcessMainUnix):
3065 * PluginProcess/unix/PluginProcessMainUnix.h:
3066 * Shared/unix/ChildProcessMain.cpp: Copied from Source/WebKit2/WebProcess/efl/WebProcessMainEfl.h.
3067 (WebKit::ChildProcessMainBase::parseCommandLine):
3068 * Shared/unix/ChildProcessMain.h: Renamed from Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.h.
3069 (WebKit::ChildProcessMainBase::platformInitialize):
3070 (WebKit::ChildProcessMainBase::platformFinalize):
3071 (WebKit::ChildProcessMainBase::initializationParameters):
3072 (WebKit::ChildProcessMain):
3073 * WebProcess/EntryPoint/unix/WebProcessMain.cpp: Renamed from Source/WebKit2/gtk/MainGtk.cpp.
3075 * WebProcess/efl/WebProcessMainEfl.cpp:
3076 (WebKit::WebProcessMainUnix):
3077 (dummyExtensionErrorHandler): Deleted.
3078 * WebProcess/gtk/WebProcessMainGtk.cpp:
3079 (WebKit::WebProcessMainUnix):
3080 * WebProcess/unix/WebProcessMainUnix.h: Renamed from Source/WebKit2/WebProcess/efl/WebProcessMainEfl.h.
3082 2014-05-22 Zan Dobersek <zdobersek@igalia.com>
3084 Have the decoded element in VectorArgumentCoder::decode() moved into Vector::append()
3085 https://bugs.webkit.org/show_bug.cgi?id=133082
3087 Reviewed by Andreas Kling.
3089 * Platform/IPC/ArgumentCoders.h: Move the decoded element into the Vector::append() call.
3090 This enforces a move instead of a copy if the decoded element's type is move-constructible.
3092 2014-05-22 Zan Dobersek <zdobersek@igalia.com>
3094 Move the passed-in Vector<Attachment> in MessageDecoder constructor down into ArgumentDecoder
3095 https://bugs.webkit.org/show_bug.cgi?id=133080
3097 Reviewed by Andreas Kling.
3099 * Platform/IPC/MessageDecoder.cpp:
3100 (IPC::MessageDecoder::MessageDecoder): The Vector<Attachment> object was passed in by value.
3101 Move it into the ArgumentDecoder constructor as it is not used elsewhere in this constructor
3102 and produces a copy otherwise.
3104 2014-05-22 Benjamin Poulain <bpoulain@apple.com>
3106 [iOS][WK2] Add support for minimal-ui viewports
3107 https://bugs.webkit.org/show_bug.cgi?id=133162
3109 Reviewed by Simon Fraser.
3111 In the WebKit2 layers, we have two parts to minimal-ui.
3112 -In WebPage, we need to get the values from the UIProcess and setup the ViewportConfiguration.
3113 Another part is freezing the state on page load.
3114 -In the UIProcess, we need to get the right information for layout and styling, and we need to tell
3115 the UI clients about minimal-ui changes.
3117 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
3118 * UIProcess/API/Cocoa/WKWebView.mm:
3119 (-[WKWebView _setUsesMinimalUI:]):
3120 (-[WKWebView _usesMinimalUI]):
3121 (-[WKWebView _didCommitLayerTree:WebKit::]):
3122 (-[WKWebView _frameOrBoundsChanged]):
3123 (-[WKWebView _minimumLayoutSizeOverride]):
3124 (-[WKWebView _setMinimumLayoutSizeOverride:]):
3125 (-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]):
3126 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
3127 (-[WKWebView _largestUnobscuredSizeOverride]):
3128 (-[WKWebView _setMaximumUnobscuredSizeOverride:]):
3129 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3130 (setViewportConfigurationMinimumLayoutSize): Deleted.
3131 * UIProcess/API/Cocoa/WKWebViewInternal.h:
3132 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3133 * UIProcess/PageClient.h:
3134 * UIProcess/WebPageProxy.h:
3135 * UIProcess/WebPageProxy.messages.in:
3136 * UIProcess/ios/PageClientImplIOS.h:
3137 * UIProcess/ios/PageClientImplIOS.mm:
3138 (WebKit::PageClientImpl::setUsesMinimalUI):
3139 * UIProcess/ios/WebPageProxyIOS.mm:
3140 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
3141 (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSizeForMinimalUI):
3142 (WebKit::WebPageProxy::setMaximumUnobscuredSize):
3143 (WebKit::WebPageProxy::setUsesMinimalUI):
3144 (WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI): Deleted.
3145 * WebProcess/WebPage/WebPage.cpp:
3146 (WebKit::WebPage::WebPage):
3147 (WebKit::WebPage::didCommitLoad):
3148 * WebProcess/WebPage/WebPage.h:
3149 * WebProcess/WebPage/WebPage.messages.in:
3150 * WebProcess/WebPage/ios/WebPageIOS.mm:
3151 (WebKit::WebPage::setViewportConfigurationMinimumLayoutSizeForMinimalUI):
3152 (WebKit::WebPage::setMaximumUnobscuredSize):
3153 (WebKit::WebPage::willFlushLayers):
3154 (WebKit::WebPage::dynamicViewportSizeUpdate):
3155 (WebKit::WebPage::viewportConfigurationChanged):
3156 (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
3157 (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI): Deleted.
3158 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3159 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3161 2014-05-22 Benjamin Poulain <bpoulain@apple.com>
3163 [iOS][WK2] Reset the special action-target of WKSyntheticClickTapGestureRecognizer on destruction
3164 https://bugs.webkit.org/show_bug.cgi?id=133165
3165 <rdar://problem/16283914>
3167 Reviewed by Andy Estes.
3169 It is unclear why, but the WKSyntheticClickTapGestureRecognizer sometimes survives its own view
3170 and is reset after WKContentView was destructed.
3171 This patch cleans up the target-action on destruction to avoid accessing a destructed object.
3173 * UIProcess/ios/WKContentViewInteraction.mm:
3174 (-[WKContentView cleanupInteraction]):
3176 2014-05-22 Benjamin Poulain <bpoulain@apple.com>
3178 Do not force a layout when changing the FixedLayoutSize in WebPage
3179 https://bugs.webkit.org/show_bug.cgi?id=133167
3181 Reviewed by Andreas Kling.
3183 WebPage::setFixedLayoutSize was forcing a layout immediately after changing the layout size on FrameView.
3184 This is forcing plenty of extra layouts since the fixed layout size is one of many properties updated on the FrameView.
3186 FrameView marks that layout is needed. It is not clear why a layout was performed immediately.
3188 * WebProcess/WebPage/WebPage.cpp:
3189 (WebKit::WebPage::setFixedLayoutSize):
3191 2014-05-22 Andreas Kling <akling@apple.com>
3193 [iOS WebKit2] Web process should try to shrink its memory footprint when going into background.
3194 <https://webkit.org/b/133197>
3195 <rdar://problem/17011561>
3197 Try to free up as much memory as possible before going into background.
3199 Reviewed by Gavin Barraclough.
3201 * WebProcess/WebProcess.cpp:
3202 (WebKit::WebProcess::processWillSuspend):
3204 2014-05-22 Andreas Kling <akling@apple.com>
3206 Hook up a setting for showing detailed logging during memory pressure relief.
3207 <https://webkit.org/b/133194>
3209 Plumb through the same setting that we used for detailed logging in WK1.
3211 Reviewed by Gavin Barraclough.
3213 * Shared/WebProcessCreationParameters.cpp:
3214 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
3215 (WebKit::WebProcessCreationParameters::encode):
3216 (WebKit::WebProcessCreationParameters::decode):
3217 * Shared/WebProcessCreationParameters.h:
3218 * UIProcess/mac/WebContextMac.mm:
3219 (WebKit::WebContext::platformInitializeWebProcess):
3220 * WebProcess/cocoa/WebProcessCocoa.mm:
3221 (WebKit::WebProcess::platformInitializeWebProcess):
3223 2014-05-22 Andy Estes <aestes@apple.com>
3225 [iOS] Send shareable resources to QuickLook if enabled
3226 https://bugs.webkit.org/show_bug.cgi?id=133189
3227 <rdar://problem/17003995>
3229 Reviewed by Brady Eidson.
3231 Like we do for didReceiveData(), we need to pass an incoming ShareableResource to QuickLook if a QuickLook
3234 * Shared/ShareableResource.cpp:
3235 (WebKit::ShareableResource::Handle::tryWrapInCFData): Return the shared resource in a CFDataRef.
3236 (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer): Implemented in terms of tryWrapInCFData().
3237 * Shared/ShareableResource.h:
3238 * WebProcess/Network/WebResourceLoader.cpp:
3239 (WebKit::WebResourceLoader::didReceiveResource): If a QuickLook handle exists, send the shareable resource to
3242 2014-05-22 Martin Hock <mhock@apple.com>
3244 [iOS] Enable -apple-system- styled elements to respond to system font size changes.
3245 https://bugs.webkit.org/show_bug.cgi?id=133186
3246 <rdar://problem/16583782>
3248 Reviewed by Enrica Casucci.
3250 * UIProcess/API/Cocoa/WKWebView.mm:
3251 (-[WKWebView initWithFrame:configuration:]):
3252 (-[WKWebView _contentSizeCategoryDidChange:]):
3253 (-[WKWebView _contentSizeCategory]):
3254 * UIProcess/WebPageProxy.h:
3255 * UIProcess/ios/WebPageProxyIOS.mm:
3256 (WebKit::WebPageProxy::contentSizeCategoryDidChange):
3257 * WebProcess/WebPage/WebPage.h:
3258 * WebProcess/WebPage/WebPage.messages.in:
3259 * WebProcess/WebPage/ios/WebPageIOS.mm:
3260 (WebKit::WebPage::contentSizeCategoryDidChange):
3262 2014-05-22 Alexey Proskuryakov <ap@apple.com>
3264 [iOS] Add CFBundleAllowMixedLocalizations to WebContentService
3265 https://bugs.webkit.org/show_bug.cgi?id=133187
3266 <rdar://problem/16561084>
3268 Reviewed by Tim Horton.
3270 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
3271 We already had it in WebContentService.Development, just not here.
3273 2014-05-22 Alexey Proskuryakov <ap@apple.com>
3275 [iOS][WK2] Application cache is broken
3276 https://bugs.webkit.org/show_bug.cgi?id=133172
3277 <rdar://problem/16994593>
3279 Reviewed by Andy Estes.
3281 * UIProcess/mac/WebContextMac.mm:
3282 (WebKit::WebContext::platformDefaultApplicationCacheDirectory): Use a proper
3283 path for application cache database (same as WebKit1).
3285 2014-05-22 Enrica Casucci <enrica@apple.com>
3287 REGRESSION (WebKit2): Keyboard should have Search button in duckduckgo.com.
3288 https://bugs.webkit.org/show_bug.cgi?id=133183
3289 <rdar://problem/17004207>
3291 Reviewed by Geoff Garen.
3293 The keyboard type should be search if the input type is search
3294 or if it is text and it is inside a form with an action and either
3295 name, id or title contain the word search. This matches the
3296 heuristics we have in WK1 for iOS.
3298 * WebProcess/WebPage/ios/WebPageIOS.mm:
3299 (WebKit::WebPage::getAssistedNodeInformation):
3301 2014-05-21 Oliver Hunt <oliver@apple.com>
3303 Only enable sandbox extensions on mac.
3309 2014-05-21 Oliver Hunt <oliver@apple.com>
3311 [iOS] Enable sandboxing for the database process
3312 https://bugs.webkit.org/show_bug.cgi?id=132963
3314 Reviewed by Alexey Proskuryakov.
3316 Simply ensure that the database process is running in a tight
3317 sandbox. As part of this i've separated out ChildProcessIOS
3318 and ensures that the database process loads a custom sandbox.
3320 * Configurations/WebKit.xcconfig:
3321 * DatabaseProcess/ios/DatabaseProcessIOS.mm:
3322 (WebKit::DatabaseProcess::initializeSandbox):
3323 * DatabaseProcess/ios/com.apple.WebKit.DatabasesIOS.sb: Added.
3324 * Shared/ios/ChildProcessIOS.mm: Added.
3325 Essentially cloned from the Mac version, only all the OSX
3326 specific logic has been stripped.
3327 (WebKit::ChildProcess::setApplicationIsDaemon):
3328 (WebKit::ChildProcess::platformInitialize):
3329 (WebKit::ChildProcess::initializeSandbox):
3330 (WebKit::ChildProcess::setQOS):
3331 * Shared/mac/ChildProcessMac.mm:
3332 Remove all the IOS ifdefs.
3333 (WebKit::ChildProcess::setApplicationIsDaemon):
3334 (WebKit::ChildProcess::platformInitialize):
3335 (WebKit::ChildProcess::initializeSandbox):
3336 (WebKit::ChildProcess::setQOS):
3337 * WebKit2.xcodeproj/project.pbxproj:
3339 2014-05-21 Andy Estes <aestes@apple.com>
3341 [iOS] Create a UIPrintFormatter for WKWebView
3342 https://bugs.webkit.org/show_bug.cgi?id=133005
3344 Reviewed by Tim Horton.
3346 Implemented a UIPrintFormatter subclass to support printing WKWebViews using UIPrintInteractionController.
3347 Overrode -_recalcPageCount: to synchronously ask the web process to lay out for printing and return the number
3348 of page rects. The web process returns the page rects immediately and then starts rendering the page to a PDF,
3349 returning the PDF data to the UI process asynchronously. When UIPrintInteractionController later calls our
3350 overridden -drawInRect:forPageAtIndex:, we block and wait for the PDF data to be returned. Since
3351 UIPrintInteractionController draws each page after a delay, it's possible that the web process has already
3352 returned the PDF data to us by the time we print the first page.
3354 * Shared/WebPreferencesStore.h: Correctly initialized shouldPrintBackgrounds for iOS.
3355 * UIProcess/API/Cocoa/WKWebView.mm:
3356 (-[WKWebView _dataForDisplayedPDF]): Now that WKPDFView vends its CGPDFDocument directly, extract its data here.
3357 (-[WKWebView _printFormatterClass]): Tell UIView which UIPrintFormatter to alloc.
3358 (-[WKWebView _computePageCountAndStartDrawingToPDFWithPrintInfo:WebKit::firstPage:computedTotalScaleFactor:]):
3359 If we're displaying a PDF, return its page count directly. Otherwise, synchronously ask the web process to
3360 compute page rects for printing and then return the number of rects.
3361 (-[WKWebView _endPrinting]): Cleared state and sent the WebPage::EndPrinting message to the web process.
3362 (-[WKWebView _printedDocument]): If we're displaying a PDF, return its data directly. Otherwise, if we haven't
3363 received PDF data from the web process yet, wait for it indefinitely (there's no sensible timeout to use here
3364 since failing to receive the data results in printing some number of blank pages).
3365 (-[WKWebView _setPrintedDocument:]): Set the CGPDFDocument received from the web process.
3366 * UIProcess/API/Cocoa/WKWebViewInternal.h: Declared methods called by WKWebViewPrintFormatter.
3367 * UIProcess/PageClient.h: Declared didFinishDrawingPagesToPDF.
3368 * UIProcess/WKWebViewPrintFormatter.h: Added.
3369 * UIProcess/WKWebViewPrintFormatter.mm: Added.
3370 (-[WKWebViewPrintFormatter dealloc]): Cleared state and called -[WKWebView _endPrinting].
3371 (-[WKWebViewPrintFormatter webView]): Returned the WKWebView for this print formatter.
3372 (-[WKWebViewPrintFormatter _recalcPageCount]): Set up a PrintInfo object given the formatter's content rect
3373 and called -_computePageCountAndStartDrawingToPDFWithPrintInfo:...
3374 (-[WKWebViewPrintFormatter rectForPageAtIndex:]): Called -_recalcIfNecessary and then returned the rect from
3376 (-[WKWebViewPrintFormatter drawInRect:forPageAtIndex:]): Taught to draw the given page of the printed PDF
3377 document into the given rect and context provided to us.
3378 * UIProcess/WebPageProxy.h: Declared didFinishDrawingPagesToPDF.
3379 * UIProcess/WebPageProxy.messages.in: Added DidFinishDrawingPagesToPDF. Made this a delayed syncrhonous message
3380 so that additoinal work could be performed after sending the response.
3381 * UIProcess/ios/PageClientImplIOS.h:
3382 * UIProcess/ios/PageClientImplIOS.mm:
3383 (WebKit::PageClientImpl::didFinishDrawingPagesToPDF): Created a CGPDFDocument from the data sent to us by the
3384 web process and called -[WKWebView _setPrintedDocument:].
3385 * UIProcess/ios/WKPDFView.h:
3386 * UIProcess/ios/WKPDFView.mm:
3387 (-[WKPDFView pdfDocument]): Returned the underlying CGPDFDocument.
3388 (-[WKPDFView documentData]): Deleted.
3389 * UIProcess/ios/WebPageProxyIOS.mm:
3390 (WebKit::WebPageProxy::didFinishDrawingPagesToPDF):
3391 * WebKit2.xcodeproj/project.pbxproj:
3392 * WebProcess/WebPage/WebPage.cpp:
3393 (WebKit::WebPage::computePagesForPrinting): Changed to call computePagesForPrintingImpl.
3394 (WebKit::WebPage::computePagesForPrintingImpl): Moved the common logic of computePagesForPrinting to here so it
3395 could be called by computePagesForPrintingAndStartDrawingToPDF.
3396 (WebKit::WebPage::drawPagesToPDF): Changed to call drawPagesToPDFImpl
3397 (WebKit::WebPage::drawPagesToPDFImpl): Moved the common logic of drawPagesToPDF to here so it could be called
3398 by computePagesForPrintingAndStartDrawingToPDF.
3399 * WebProcess/WebPage/WebPage.h:
3400 * WebProcess/WebPage/WebPage.messages.in:
3401 * WebProcess/WebPage/ios/WebPageIOS.mm:
3402 (WebKit::WebPage::computePagesForPrintingAndStartDrawingToPDF): Computed page rects and returned them as a
3403 synchronous response. Afterwards called drawPagesToPDFImpl() and returned the PDF data by sending
3404 WebPageProxy::DidFinishDrawingPagesToPDF.
3406 2014-05-21 Michał Pakuła vel Rutka <m.pakula@samsung.com>
3408 [EFL] Turn on ENABLE_CSS_FILTERS
3409 https://bugs.webkit.org/show_bug.cgi?id=133153
3411 Reviewed by Gyuyoung Kim.
3413 Make WebKit2 compile after r166741 when CSS_FILTERS are enabled.
3415 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
3416 (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
3418 2014-05-21 Brady Eidson <beidson@apple.com>
3420 Special handling of telephone number detection menu.
3421 <rdar://problem/16967971> and https://bugs.webkit.org/show_bug.cgi?id=133143
3423 Reviewed by Geoff Garen.
3425 Add a bool to ContextMenuContextData to represent telephone number menus:
3426 * Shared/ContextMenuContextData.cpp:
3427 (WebKit::ContextMenuContextData::ContextMenuContextData):
3428 (WebKit::ContextMenuContextData::operator=):
3429 (WebKit::ContextMenuContextData::encode):
3430 (WebKit::ContextMenuContextData::decode):
3431 * Shared/ContextMenuContextData.h:
3432 (WebKit::ContextMenuContextData::ContextMenuContextData):
3433 (WebKit::ContextMenuContextData::isTelephoneNumberContext):
3435 * UIProcess/mac/WebContextMenuProxyMac.mm:
3436 (WebKit::WebContextMenuProxyMac::showContextMenu): If the menu is a telephone
3437 number menu then display it using a specific AppKit API.
3439 * UIProcess/mac/WebPageProxyMac.mm:
3440 (WebKit::WebPageProxy::showTelephoneNumberMenu): Filter the array of menu items
3441 through a new WKSI call, and then show it using a telephone number context.
3443 2014-05-21 Alexey Proskuryakov <ap@apple.com>
3445 [Mac] REGRESSION (Async text input): Asian text input doesn't work in Flash
3446 https://bugs.webkit.org/show_bug.cgi?id=133128
3447 <rdar://problem/16890920>
3449 Reviewed by Anders Carlsson.
3451 * UIProcess/API/mac/WKView.mm:
3452 (-[WKView _interpretKeyEvent:completionHandler:]):