1 2014-05-20 Eric Carlson <eric.carlson@apple.com>
3 [Mac] do not deactivate an audio session that has running I/O
4 https://bugs.webkit.org/show_bug.cgi?id=133127
8 * WebProcess/WebPage/WebPage.cpp:
9 (WebKit::WebPage::WebPage): Settings::setShouldManageAudioSession renamed to
10 setShouldManageAudioSessionCategory, deal with it.
12 2014-05-19 Simon Fraser <simon.fraser@apple.com>
14 REGRESSION (r169063) Fixed and sticky nodes misplaced on scrolling sometimes
15 https://bugs.webkit.org/show_bug.cgi?id=133106
16 <rdar://problem/16967648>
18 Reviewed by Sam Weinig.
20 Fix regression from r169063. That commit removed scrolledContentsLayers from
21 frame scrolling nodes, but they do actually use them.
23 So put them back; not in the base class, because they have a somewhat different
24 meaning for overflow scrolling and frame scrolling.
26 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
27 (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
28 (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
29 (WebKit::RemoteScrollingTreeTextStream::dump):
30 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
31 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
33 2014-05-20 Alexey Proskuryakov <ap@apple.com>
35 [Mac] WebProcess doesn't follow localization of UI process when run as a service
36 https://bugs.webkit.org/show_bug.cgi?id=133126
37 <rdar://problem/13396515>
38 <rdar://problem/16561084>
40 Reviewed by Sam Weinig and Tim Horton.
42 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
43 (WebKit::handleXPCBootstrap):
45 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
46 (WebKit::handleXPCBootstrap):
48 Set localization very early in process lifetime (in development builds, that's
49 even before WebKit framework is loaded).
51 * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService):
52 Pass UI process localization to the service, computing it in the same way we do
55 2014-05-20 Anders Carlsson <andersca@apple.com>
58 https://bugs.webkit.org/show_bug.cgi?id=133123
59 <rdar://problem/16973783>
61 Reviewed by Geoffrey Garen.
63 * UIProcess/API/Cocoa/WKUserContentController.h:
65 2014-05-20 Carlos Garcia Campos <cgarcia@igalia.com>
67 [GTK] WebKitWebPage::send-request always pass a valid pointer for redirected response
68 https://bugs.webkit.org/show_bug.cgi?id=133119
70 Reviewed by Sergio Villar Senin.
72 The problem is that we were checking whether the passed in
73 WKURLResponseRef is NULL or not, but it's always a valid object
74 that can contain a NULL WebCore::ResourceResponse.
76 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
77 (willSendRequestForFrame): Pass NULL as redirect-response
78 parameter of WebKitWebPage::send-request signal when the
79 WebCore::ResourceResponse of the passed in WKURLResponseRef is NULL.
81 2014-05-20 Antti Koivisto <antti@apple.com>
83 Double-tap zoom does not take obscuring insets into account
84 https://bugs.webkit.org/show_bug.cgi?id=133116
85 <rdar://problem/16765604>
87 Reviewed by Anders Carlsson.
89 * UIProcess/API/Cocoa/WKWebView.mm:
90 (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
92 Compute the zoom target taking insets into account.
94 2014-05-19 Gavin Barraclough <baraclough@apple.com>
96 WebKit2/iOS: parented view should be considered hidden if app is backgrounded
97 https://bugs.webkit.org/show_bug.cgi?id=133099
100 Reviewed by Simon Fraser.
102 * UIProcess/ios/PageClientImplIOS.mm:
103 (WebKit::PageClientImpl::isViewWindowActive):
104 - implemented in terms of isViewVisible.
105 - FIXME: https://bugs.webkit.org/show_bug.cgi?id=133098
106 (WebKit::PageClientImpl::isViewFocused):
107 - implemented in terms of isViewWindowActive.
108 - FIXME: https://bugs.webkit.org/show_bug.cgi?id=133098
109 (WebKit::PageClientImpl::isViewVisible):
110 - take UIApplication applicationState into account in determining visibility.
111 (WebKit::PageClientImpl::isViewVisibleOrOccluded):
112 - implemented in terms of isViewVisible.
113 (WebKit::PageClientImpl::isVisuallyIdle):
114 - implemented in terms of isViewVisible.
115 * UIProcess/ios/WKContentView.mm:
116 (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
117 - register for UIApplicationDidEnterBackgroundNotification.
118 (-[WKContentView _applicationDidEnterBackground:]):
119 (-[WKContentView _applicationWillEnterForeground:]):
120 - when the application state changes all flags except IsInWindow may be affected.
122 2014-05-19 Enrica Casucci <enrica@apple.com>
124 WK2 iOS: Pressing the form navigation button causes the keyboard to be dismissed.
125 https://bugs.webkit.org/show_bug.cgi?id=133100
126 <rdar://problem/16808673>
128 Reviewed by Benjamin Poulain.
130 The call to focusNextAssistedNode is the result of a user action, since
131 it is called when the user pressed the form navigation buttons.
132 Therefore we must set m_userIsInteracting to true before changing the focus
133 to make sure the focus change is honored.
135 * WebProcess/WebPage/ios/WebPageIOS.mm:
136 (WebKit::WebPage::focusNextAssistedNode):
138 2014-05-19 Beth Dakin <bdakin@apple.com>
140 TelephoneNumberOverlayController should use a modern loop for text quad bounding
142 https://bugs.webkit.org/show_bug.cgi?id=133096
144 Reviewed by Anders Carlsson.
146 * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
147 (WebKit::textQuadsToBoundingRectForRange):
149 2014-05-19 Jeremy Jones <jeremyj@apple.com>
151 PlatformCALayerRemoteCustom properties aren't initialized to match the PlatformLayer
152 https://bugs.webkit.org/show_bug.cgi?id=133025
154 Reviewed by Simon Fraser.
156 * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
157 (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
158 Initialize PlatformCALayerRemote properties from the PlatformLayer.
160 2014-05-19 Benjamin Poulain <bpoulain@apple.com>
162 [iOS][WK2] When a page relayout on dynamic resize, keep the same relative width in view
163 https://bugs.webkit.org/show_bug.cgi?id=133026
164 <rdar://problem/16833971>
166 Reviewed by Simon Fraser.
168 When a page does not relayout, we keep the same width in view.
169 When a page relayout, we should keep the same relative width in view.
171 * WebProcess/WebPage/ios/WebPageIOS.mm:
172 (WebKit::isResponsiveDesignWithContentLargerThanLayout):
173 (WebKit::WebPage::dynamicViewportSizeUpdate):
175 2014-05-19 Benjamin Poulain <benjamin@webkit.org>
177 [WK2] Add some missing state reset on crash
178 https://bugs.webkit.org/show_bug.cgi?id=133036
180 Reviewed by Sam Weinig.
182 * UIProcess/WebPageProxy.cpp:
183 (WebKit::WebPageProxy::resetState):
184 The missing reset for m_isTrackingTouchEvents would cause the WebPageProxy to send
185 touch events when it shouldn't. That would only be for an active touch sequence.
187 The missing reset m_lastVisibleContentRectUpdate would prevent pushing the new UI state
188 to the new page on reload, that is very bad.
190 Also moved m_videoFullscreenManager to be in the same order as initialization, and invalidate
191 the callbacks for dictation.
193 2014-05-19 Benjamin Poulain <bpoulain@apple.com>
195 [iOS][WK2] Move scale noise filtering to the WebProcess
196 https://bugs.webkit.org/show_bug.cgi?id=133021
198 Reviewed by Darin Adler.
200 Filtering in the UIProcess was stupid. It forces to handle a third kind of scale just for updates.
202 The WebProcess already adjusts the input scale based on the viewport. Changing the input scale at that level
203 is already supported. It is a better place to have the filtering.
205 * UIProcess/ios/WKContentView.mm:
206 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
207 * WebProcess/WebPage/ios/WebPageIOS.mm:
208 (WebKit::WebPage::updateVisibleContentRects):
210 2014-05-19 Simon Fraser <simon.fraser@apple.com>
212 Split scrolling tree ScrollingNodes into FrameScrollingNodes and OverflowScrollingNodes
213 https://bugs.webkit.org/show_bug.cgi?id=133022
215 Reviewed by Sam Weinig.
217 In both the scrolling state tree and the scrolling tree, split the "scrolling nodes"
218 into FrameScrolling and OverflowScrolling nodes.
220 Move what was the "viewportSize" property onto the base class for the scrolling
221 nodes, calling it "scrollableAreaSize".
223 Make minimum/maximumScrollPosition() virtual so we can share more code (and there
224 is more code sharing to be done in future).
226 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
227 (ArgumentCoder<ScrollingStateScrollingNode>::encode):
228 (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
229 (ArgumentCoder<ScrollingStateOverflowScrollingNode>::encode):
230 (ArgumentCoder<ScrollingStateScrollingNode>::decode):
231 (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
232 (ArgumentCoder<ScrollingStateOverflowScrollingNode>::decode):
233 (WebKit::encodeNodeAndDescendants):
234 (WebKit::RemoteScrollingCoordinatorTransaction::decode):
235 (WebKit::RemoteScrollingTreeTextStream::dump):
236 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
237 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
238 * UIProcess/Scrolling/RemoteScrollingTree.cpp:
239 (WebKit::RemoteScrollingTree::createNode):
240 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
241 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollLayer):
242 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterViewportChange):
243 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
244 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
245 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren):
246 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
247 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::setScrollLayerPosition):
248 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
249 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
250 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
252 2014-05-19 Alexey Proskuryakov <ap@apple.com>
254 [Mac] Fix a typo in plug-in sandbox
255 https://bugs.webkit.org/show_bug.cgi?id=133074
257 Reviewed by Anders Carlsson.
259 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
261 2014-05-16 Andy Estes <aestes@apple.com>
263 [WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection
264 https://bugs.webkit.org/show_bug.cgi?id=133010
266 Reviewed by Geoffrey Garen.
268 If a thread is blocked on m_waitForMessageCondition and we lose our connection, treat that like we do a timeout.
270 * Platform/IPC/Connection.cpp:
271 (IPC::Connection::Connection):
272 (IPC::Connection::waitForMessage):
273 (IPC::Connection::connectionDidClose):
274 * Platform/IPC/Connection.h:
276 2014-05-19 Mark Rowe <mrowe@apple.com>
278 Build fix after r169023.
280 * Shared/API/Cocoa/WebKitPrivate.h: Stop including headers that no longer exist.
281 I hope for weinig's sake that no-one was relying on them.
283 2014-05-18 Anders Carlsson <andersca@apple.com>
285 Relax an assertion when creating document loaders
286 https://bugs.webkit.org/show_bug.cgi?id=133058
288 Reviewed by Sam Weinig.
290 When navigating back/forward items recursively, createDocumentLoader will be called
291 for subframes before main frames so only associate the navigation with main frames.
293 * WebProcess/WebPage/WebPage.cpp:
294 (WebKit::WebPage::createDocumentLoader):
296 2014-05-18 Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com>
298 CMake Buildfix after r169023.
300 Reviewed by Csaba Osztrogonác.
302 * CMakeLists.txt: Add new files after r168994.
304 2014-05-18 Sam Weinig <sam@webkit.org>
306 [WebKit2] Implement ScriptMessageHandlers
307 https://bugs.webkit.org/show_bug.cgi?id=133053
309 Reviewed by Anders Carlsson.
311 * DerivedSources.make:
312 * Scripts/webkit2/messages.py:
314 (argument_coder_headers_for_type):
316 * UIProcess/API/Cocoa/WKScriptMessage.mm:
317 (-[WKScriptMessage _initWithBody:webView:name:]):
318 (-[WKScriptMessage body]):
319 (-[WKScriptMessage webView]):
320 (-[WKScriptMessage name]):
321 (-[WKScriptMessage _scriptWorld]): Deleted.
322 * UIProcess/API/Cocoa/WKScriptMessageInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKScriptMessagePrivate.h.
323 * UIProcess/API/Cocoa/WKScriptMessagePrivate.h: Removed.
324 * UIProcess/API/Cocoa/WKUserContentController.mm:
325 (-[WKUserContentController addScriptMessageHandler:name:]):
326 (-[WKUserContentController removeScriptMessageHandlerForName:]):
327 (-[WKUserContentController _addScriptMessageHandler:name:world:]): Deleted.
328 (-[WKUserContentController _removeScriptMessageHandlerForName:world:]): Deleted.
329 * UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
330 * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: Removed.
331 * UIProcess/API/Cocoa/WKWebView.mm:
334 (-[WKWebView initWithFrame:configuration:]):
335 (-[WKWebView dealloc]):
336 * UIProcess/API/Cocoa/WKWebViewInternal.h:
337 * UIProcess/UserContent/WebScriptMessageHandler.cpp: Added.
338 (WebKit::WebScriptMessageHandlerHandle::encode):
339 (WebKit::WebScriptMessageHandlerHandle::decode):
340 (WebKit::generateIdentifier):
341 (WebKit::WebScriptMessageHandler::create):
342 (WebKit::WebScriptMessageHandler::WebScriptMessageHandler):
343 (WebKit::WebScriptMessageHandler::~WebScriptMessageHandler):
344 * UIProcess/UserContent/WebScriptMessageHandler.h: Added.
345 (WebKit::WebScriptMessageHandler::Client::~Client):
346 (WebKit::WebScriptMessageHandler::handle):
347 (WebKit::WebScriptMessageHandler::identifier):
348 (WebKit::WebScriptMessageHandler::name):
349 (WebKit::WebScriptMessageHandler::client):
350 * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
351 (WebKit::WebUserContentControllerProxy::addProcess):
352 (WebKit::WebUserContentControllerProxy::removeProcess):
353 (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
354 (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
355 (WebKit::WebUserContentControllerProxy::didPostMessage):
356 * UIProcess/UserContent/WebUserContentControllerProxy.h:
357 * UIProcess/UserContent/WebUserContentControllerProxy.messages.in: Added.
358 * WebKit2.xcodeproj/project.pbxproj:
359 * WebProcess/UserContent/WebUserContentController.cpp:
360 (WebKit::WebUserMessageHandlerDescriptorProxy::create):
361 (WebKit::WebUserMessageHandlerDescriptorProxy::~WebUserMessageHandlerDescriptorProxy):
362 (WebKit::WebUserMessageHandlerDescriptorProxy::didPostMessage):
363 (WebKit::WebUserMessageHandlerDescriptorProxy::descriptor):
364 (WebKit::WebUserMessageHandlerDescriptorProxy::identifier):
365 (WebKit::WebUserMessageHandlerDescriptorProxy::WebUserMessageHandlerDescriptorProxy):
366 (WebKit::WebUserContentController::addUserScriptMessageHandlers):
367 (WebKit::WebUserContentController::removeUserScriptMessageHandler):
368 * WebProcess/UserContent/WebUserContentController.h:
369 * WebProcess/UserContent/WebUserContentController.messages.in:
371 2014-05-18 Rik Cabanier <cabanier@adobe.com>
373 support for navigator.hardwareConcurrency
374 https://bugs.webkit.org/show_bug.cgi?id=132588
376 Reviewed by Filip Pizlo.
378 * Configurations/FeatureDefines.xcconfig:
380 2014-05-18 Anders Carlsson <andersca@apple.com>
382 Implement Navigations for all methods declared returning one
383 https://bugs.webkit.org/show_bug.cgi?id=133048
384 <rdar://problem/16830064>
386 Reviewed by Sam Weinig.
388 * UIProcess/API/Cocoa/WKWebView.mm:
389 (-[WKWebView goToBackForwardListItem:]):
390 (-[WKWebView goBack]):
391 (-[WKWebView goForward]):
392 (-[WKWebView reload]):
393 (-[WKWebView reloadFromOrigin]):
394 Create and return navigations.
396 (-[WKWebView _reload]):
397 Call -[WKWebView reload].
399 * UIProcess/Cocoa/NavigationState.h:
400 * UIProcess/Cocoa/NavigationState.mm:
401 (WebKit::NavigationState::createBackForwardNavigation):
402 Create a back/forward navigation.
404 (WebKit::NavigationState::createReloadNavigation):
405 Create a reload navigation.
407 * UIProcess/WebPageProxy.cpp:
408 (WebKit::WebPageProxy::reattachToWebProcessWithItem):
409 Generate a navigation ID and send it with the GoToBackForwardItem message.
411 (WebKit::WebPageProxy::reload):
412 Return a navigation ID.
414 (WebKit::WebPageProxy::goForward):
415 Generate a navigation ID and send it with the GoForward message.
417 (WebKit::WebPageProxy::goBack):
418 Generate a navigation ID and send it with the GoBack message.
420 (WebKit::WebPageProxy::goToBackForwardItem):
421 Generate a navigation ID and send it with the GoToBackForwardItem message.
423 * UIProcess/WebPageProxy.h:
424 Return navigation IDs where appropriate.
426 * UIProcess/cf/WebPageProxyCF.cpp:
427 (WebKit::WebPageProxy::restoreFromSessionStateData):
428 Generate a navigation ID and send it with the RestoreSessionAndNavigateToCurrentItem message.
430 * WebProcess/WebPage/WebPage.cpp:
431 (WebKit::WebPage::goForward):
432 (WebKit::WebPage::goBack):
433 (WebKit::WebPage::goToBackForwardItem):
434 Set up the pending navigation ID.
436 (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
437 Call goToBackForwardItem with a navigation ID.
439 * WebProcess/WebPage/WebPage.h:
442 * WebProcess/WebPage/WebPage.messages.in:
445 2014-05-18 Commit Queue <commit-queue@webkit.org>
447 Unreviewed, rolling out r169001.
448 https://bugs.webkit.org/show_bug.cgi?id=133050
450 We can't expose the C SPI from WKWebView (Requested by
451 andersca on #webkit).
455 "Need a way to get a WKPageRef from a WKWebView"
456 https://bugs.webkit.org/show_bug.cgi?id=133015
457 http://trac.webkit.org/changeset/169001
459 2014-05-18 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
461 [WK2][GTK] Buildfix after r168999.
463 Reviewed by Csaba Osztrogonác.
465 * UIProcess/gtk/WebContextGtk.cpp:
466 (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Renamed from WebKit::WebContext::platformDefaultDatabaseDirectory().
467 (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Added.
469 2014-05-18 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
471 [WK2][EFL] Buildfix after r168999.
473 Reviewed by Csaba Osztrogonác.
475 * UIProcess/efl/WebContextEfl.cpp:
476 (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Renamed from WebKit::WebContext::platformDefaultDatabaseDirectory().
477 (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Added.
479 2014-05-18 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
481 [WK2][cmake] Buildfix after r168994.
483 Reviewed by Csaba Osztrogonác.
485 * CMakeLists.txt: Added new files to the build system introduced in r168994.
487 2014-05-17 Alexey Proskuryakov <ap@apple.com>
489 REGRESSION (NetworkProcess): Trying to use appcache fallback crashes in ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
490 https://bugs.webkit.org/show_bug.cgi?id=133007
491 <rdar://problem/13702706>
493 appcache tests often fail on the Mac WebKit2 bot
494 https://bugs.webkit.org/show_bug.cgi?id=82061
496 Reviewed by Maciej Stachowiak.
498 * WebProcess/Network/WebResourceLoader.cpp:
499 (WebKit::WebResourceLoader::willSendRequest):
500 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
501 (WebKit::WebResourceLoader::didFailResourceLoad):
502 Perform the same appcache checks that ResourceHandleClient implementation in ResourceLoader
503 does. We should eventually come up with a way to share the code. Perhaps add a class that
504 isolates ResourceLoader from networking details? But ResourceLoader was itself supposed
505 to be the class that isolates DocumentLoader from networking details. So, unsure.
507 2014-05-17 Jae Hyun Park <jaepark@webkit.org>
509 [EFL] Remove m_contentPosition from PageViewportControllerClientEfl
510 https://bugs.webkit.org/show_bug.cgi?id=132774
512 Reviewed by Anders Carlsson.
514 m_contentPosition is not used anywhere. So, this patch removes
515 m_contentPosition and reduces one unnecessary assignment in
516 setViewportPosition. Also, it renames contentsPoint to contentsPosition.
518 * UIProcess/PageViewportControllerClient.h:
519 * UIProcess/efl/PageViewportControllerClientEfl.cpp:
520 (WebKit::PageViewportControllerClientEfl::setViewportPosition):
521 * UIProcess/efl/PageViewportControllerClientEfl.h:
523 2014-05-17 David Kilzer <ddkilzer@apple.com>
525 Need a way to get a WKPageRef from a WKWebView
526 <http://webkit.org/b/133015>
528 Reviewed by Benjamin Poulain.
530 * UIProcess/API/Cocoa/WKWebView.mm:
531 (-[WKWebView _pageRef]): Added.
532 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
533 (-[WKWebView _pageRef]): Added declaration.
535 2014-05-17 Anders Carlsson <andersca@apple.com>
537 Give user scripts custom URLs
538 https://bugs.webkit.org/show_bug.cgi?id=133035
540 Reviewed by Beth Dakin.
542 * UIProcess/API/Cocoa/WKUserContentController.mm:
543 (-[WKUserContentController addUserScript:]):
544 Create a user-script:<number> URL for user scripts.
546 * UIProcess/API/Cocoa/WKUserScript.h:
547 Move the init method after the properties.
549 2014-05-17 Anders Carlsson <andersca@apple.com>
551 Replace WKContextSetDatabaseDirectory with two WKContextConfiguration parameters
552 https://bugs.webkit.org/show_bug.cgi?id=133033
553 <rdar://problem/16830143>
555 Reviewed by Sam Weinig.
557 * Shared/WebProcessCreationParameters.cpp:
558 (WebKit::WebProcessCreationParameters::encode):
559 (WebKit::WebProcessCreationParameters::decode):
560 * Shared/WebProcessCreationParameters.h:
561 Rename databaseDirectory to webSQLDatabaseDirectory to better indicate the directory type.
563 * UIProcess/API/C/WKContext.cpp:
564 (WKContextSetDatabaseDirectory): Deleted.
565 This is no longer needed.
567 * UIProcess/API/C/WKContextConfigurationRef.cpp:
568 (WKContextConfigurationCopyIndexedDBDatabaseDirectory):
569 (WKContextConfigurationSetIndexedDBDatabaseDirectory):
570 (WKContextConfigurationCopyWebSQLDatabaseDirectory):
571 (WKContextConfigurationSetWebSQLDatabaseDirectory):
572 * UIProcess/API/C/WKContextConfigurationRef.h:
573 Add setters and getters.
575 * UIProcess/API/C/WKContextPrivate.h:
576 Remove WKContextSetDatabaseDirectory.
578 * UIProcess/APIContextConfiguration.cpp:
579 (API::ContextConfiguration::webContextConfiguration):
580 Set m_indexedDBDatabaseDirectory and m_webSQLDatabaseDirectory on the configuration.
582 * UIProcess/APIContextConfiguration.h:
583 (API::ContextConfiguration::indexedDBDatabaseDirectory):
584 (API::ContextConfiguration::setIndexedDBDatabaseDirectory):
585 (API::ContextConfiguration::webSQLDatabaseDirectory):
586 (API::ContextConfiguration::setWebSQLDatabaseDirectory):
587 Add getters and setters to the C++ part of WKContextConfigurationRef.
589 * UIProcess/WebContext.cpp:
590 (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
591 Set webSQLDatabaseDirectory and indexedDBDatabaseDirectory.
593 (WebKit::WebContext::WebContext):
594 Initialize m_webSQLDatabaseDirectory and m_indexedDBDatabaseDirectory.
596 (WebKit::WebContext::ensureDatabaseProcess):
597 Set parameters.indexedDatabaseDirectory from m_indexedDBDatabaseDirectory.
599 (WebKit::WebContext::createNewWebProcess):
600 Set parameters.webSQLDatabaseDirectory from m_webSQLDatabaseDirectory.
602 * UIProcess/mac/WebContextMac.mm:
603 (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory):
604 Rename this to indicate that it's about WebSQL databases.
606 (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory):
609 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
610 (WebKit::WebDatabaseManager::initialize):
611 Update for WebProcessCreationParameters rename.
613 * WebProcess/cocoa/WebProcessCocoa.mm:
614 (WebKit::WebProcess::platformInitializeWebProcess):
615 Update for WebProcessCreationParameters rename.
617 2014-05-17 Brent Fulgham <bfulgham@apple.com>
619 [Phone Number Detection] drop-down menu in the phone number detection box doesn't appear.
620 https://bugs.webkit.org/show_bug.cgi?id=133024
622 Reviewed by Sam Weinig.
624 * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
625 (WebKit::TelephoneNumberOverlayController::drawRect): Don't clear the set of found phone numbers each
626 time we call drawRect. This gets called ~9 times per screen refresh, so end up with no active
627 phone numbers to interact with.
629 2014-05-17 Alexey Proskuryakov <ap@apple.com>
631 NetworkProcess can repeatedly crash handling Blob messages after any unrelated crash
632 https://bugs.webkit.org/show_bug.cgi?id=133032
633 <rdar://problem/16951630>
635 Reviewed by Geoffrey Garen.
637 Replaced assertions with runtime checks. This can happen if NetworkProcess previously
638 crashed for any unrelated reason.
640 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
641 (WebKit::NetworkBlobRegistry::registerBlobURL):
642 (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
643 (WebKit::NetworkBlobRegistry::unregisterBlobURL):
645 2014-05-17 Anders Carlsson <andersca@apple.com>
647 -[WKWebView dealloc] should close the page
648 https://bugs.webkit.org/show_bug.cgi?id=133031
649 <rdar://problem/16929815>
651 Reviewed by Simon Fraser.
653 * UIProcess/API/Cocoa/WKWebView.mm:
654 (-[WKWebView dealloc]):
656 2014-05-16 Anders Carlsson <andersca@apple.com>
658 Expose WKUserScript as API
659 https://bugs.webkit.org/show_bug.cgi?id=133017
660 <rdar://problem/16948059>
662 Reviewed by Sam Weinig.
664 * DerivedSources.make:
665 Add WebUserContentController.
667 * Shared/API/Cocoa/WebKit.h:
670 * Shared/API/c/WKSharedAPICast.h:
671 (WebKit::toUserScriptInjectionTime):
672 Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
674 * Shared/API/c/WKUserScriptInjectionTime.h:
675 Rename WKUserScriptInjectionTime to _WKUserScriptInjectionTime to free up the name for the Objective-C API
677 * Shared/WebPageCreationParameters.cpp:
678 (WebKit::WebPageCreationParameters::encode):
679 Encode the user content controller ID.
681 (WebKit::WebPageCreationParameters::decode):
682 Decode the user content controller ID.
684 * Shared/WebPageCreationParameters.h:
685 Add userContentControllerID.
687 * UIProcess/API/C/WKPageGroup.cpp:
688 (WKPageGroupAddUserScript):
689 Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
691 * UIProcess/API/C/WKPageGroup.h:
692 Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
694 * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
695 Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
697 * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
698 (-[WKBrowsingContextGroup addUserScript:baseURL:whitelistedURLPatterns:blacklistedURLPatterns:injectionTime:mainFrameOnly:]):
699 Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
701 * UIProcess/API/Cocoa/WKUserContentController.h:
704 * UIProcess/API/Cocoa/WKUserContentController.mm:
705 (-[WKUserContentController init]):
706 Create the WebUserContentControllerProxy object and user scripts array.
708 (-[WKUserContentController userScripts]):
709 Return the user scripts array.
711 (toWebCoreUserScriptInjectionTime):
712 Helper for converting from a WKUserScriptInjectionTime enum to WebCore::UserScriptInjectionTime.
714 (-[WKUserContentController addUserScript:]):
715 Call through to the _userContentControllerProxy object.
717 (-[WKUserContentController removeAllUserScripts]):
718 Call through to the _userContentControllerProxy object.
720 * UIProcess/API/Cocoa/WKUserContentControllerInternal.h: Added.
721 Add WebUserContentControllerProxy ivar.
723 * UIProcess/API/Cocoa/WKUserScript.h: Added.
726 * UIProcess/API/Cocoa/WKUserScript.mm:
727 (-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
728 Initialize the WKUserScript object.
730 (-[WKUserScript source]):
731 (-[WKUserScript injectionTime]):
732 (-[WKUserScript isForMainFrameOnly]):
735 (-[WKUserScript copyWithZone:]):
736 Since WKUserScript is immutable, just return a retained object.
738 * UIProcess/API/Cocoa/WKUserScriptInternal.h:
741 * UIProcess/API/Cocoa/WKWebView.mm:
742 (-[WKWebView initWithFrame:configuration:]):
743 Set the user content controller from the configuration.
745 * UIProcess/UserContent/WebUserContentControllerProxy.cpp: Added.
746 (WebKit::generateIdentifier):
747 Return a unique identifier.
749 (WebKit::WebUserContentControllerProxy::create):
750 Return a new WebUserContentControllerProxy object.
752 (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
753 Initialize m_identifier.
755 (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
758 (WebKit::WebUserContentControllerProxy::addProcess):
759 Add the process to the m_processes set. If it's the first time doing so, add the user scripts we know about.
761 (WebKit::WebUserContentControllerProxy::removeProcess):
762 Remove the process from m_processes.
764 (WebKit::WebUserContentControllerProxy::addUserScript):
765 Add the user script and let all the web processes know that it was added.
767 (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
768 Remove all user scripts and tell all the web processes about it.
770 * UIProcess/UserContent/WebUserContentControllerProxy.h:
773 * UIProcess/WebPageProxy.cpp:
774 (WebKit::WebPageProxy::WebPageProxy):
775 If the process is already running, add it to the user content controller.
777 (WebKit::WebPageProxy::close):
778 If the process is running, remove it from the user content controller.
780 (WebKit::WebPageProxy::connectionWillOpen):
781 Add the process to the user content controller.
783 (WebKit::WebPageProxy::resetStateAfterProcessExited):
784 Remove the process from the user content controller.
786 (WebKit::WebPageProxy::creationParameters):
787 Pass along the user content controller ID when creating the web page.
789 * UIProcess/WebPageProxy.h:
790 Add a WebUserContentControllerProxy object to the web page configuration.
792 * WebKit2.xcodeproj/project.pbxproj:
795 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
796 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
797 Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
799 * WebProcess/UserContent/WebUserContentController.cpp: Added.
800 New class that manages a WebCore::UserContentController object.
802 (WebKit::WebUserContentController::getOrCreate):
803 Look up (or create) a WebUserContentController object given its identifier.
805 (WebKit::WebUserContentController::WebUserContentController):
806 Add ourselves as a message receiver.
808 (WebKit::WebUserContentController::~WebUserContentController):
809 Remove ourselves as a message receiver.
811 (WebKit::WebUserContentController::addUserScripts):
812 Add all passed in user scripts to the WebCore user content controller object.
814 (WebKit::WebUserContentController::removeAllUserScripts):
815 Remove all user scripts from the WebCore user content controller object.
817 * WebProcess/UserContent/WebUserContentController.messages.in: Added.
818 Add new messages file.
820 * WebProcess/WebPage/WebPage.cpp:
821 (WebKit::WebPage::WebPage):
822 Get a WebUserContentController object and pass it along to WebCore.
824 * WebProcess/WebPage/WebPage.h:
825 Add WebUserContentController member.
827 2014-05-16 Piotr Grad <p.grad@samsung.com>
829 [GTK] Build break after 168978.
830 https://bugs.webkit.org/show_bug.cgi?id=133012.
832 Reviewed by Simon Fraser.
834 * UIProcess/API/gtk/WebKitSettings.cpp:
835 (webKitSettingsConstructed):
837 2014-05-16 Simon Fraser <simon.fraser@apple.com>
839 Put back a symbol removed in r168978 that Safari needs, but deprecate it.
841 Reviewed by Anders Carlsson.
843 * Shared/API/c/WKDeprecatedFunctions.cpp:
844 (WKPreferencesSetRegionBasedColumnsEnabled):
845 (WKPreferencesGetRegionBasedColumnsEnabled):
847 2014-05-16 Oliver Hunt <oliver@apple.com>
849 Separate enabling sandbox extensions from the WEB_PROCESS_SANDBOX flag
850 https://bugs.webkit.org/show_bug.cgi?id=133016
852 Reviewed by Alexey Proskuryakov.
854 Add a distinct SANDBOX_EXTENSIONS flag to guard sandbox extensions
855 and switch over to it in the places that extensions are used.
857 * Shared/SandboxExtension.h:
858 * Shared/mac/SandboxExtensionMac.mm:
859 * UIProcess/WebPageProxy.cpp:
860 (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
862 * WebProcess/WebPage/WebPage.cpp:
863 * WebProcess/WebPage/WebPage.h:
864 * WebProcess/WebPage/WebPage.messages.in:
865 * WebProcess/cocoa/WebProcessCocoa.mm:
866 (WebKit::WebProcess::platformInitializeWebProcess):
868 2014-05-16 Benjamin Poulain <bpoulain@apple.com>
870 [iOS][WK2] Add a heuristic to set the right horizontal offset on rotation for responsive websites
871 https://bugs.webkit.org/show_bug.cgi?id=132937
872 <rdar://problem/16710097>
874 Reviewed by Simon Fraser.
876 When responsive websites have the content size lay out larger than the minimal layout size,
877 we should not keep the relative horizontal position into view,
878 many of those websites have all the content on the left.
880 * WebProcess/WebPage/ios/WebPageIOS.mm:
881 (WebKit::WebPage::dynamicViewportSizeUpdate):
883 2014-05-16 Benjamin Poulain <bpoulain@apple.com>
885 [iOS][WK2] On dynamic resize, the content offset is contrained to the old content size
886 https://bugs.webkit.org/show_bug.cgi?id=132972
888 Reviewed by Simon Fraser.
890 When we set the content offset, UIScrollView limits the value to the current valid range for
891 content size. Since the content size was only updated after the animation, when the first frame
892 comes in, the content offset would sometimes be limited to a smaller rect that the actual content.
894 To fix this, set the expected future content size before changing the offset.
896 During the animation, the content size could have changed arbitrarily. At the end of the animation,
897 we take the actual frame and set the definite content size.
898 Any update after that will be regular updates through didCommitLayer.
900 * UIProcess/API/Cocoa/WKWebView.mm:
901 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
902 (-[WKWebView _endAnimatedResize]):
904 2014-05-16 Simon Fraser <simon.fraser@apple.com>
906 Remove "region-based columns" prefs
907 https://bugs.webkit.org/show_bug.cgi?id=133006
908 <rdar://problem/16945824>
910 Reviewed by Dave Hyatt.
912 Remove "region-based columns" prefs and related code, since this is only
913 way to render columns now.
915 * Shared/WebPreferencesStore.h:
916 * UIProcess/API/C/WKPreferences.cpp:
917 (WKPreferencesSetRegionBasedColumnsEnabled): Deleted.
918 (WKPreferencesGetRegionBasedColumnsEnabled): Deleted.
919 * UIProcess/API/C/WKPreferencesRefPrivate.h:
920 * WebProcess/WebPage/WebPage.cpp:
921 (WebKit::WebPage::updatePreferences):
923 2014-05-16 Brent Fulgham <bfulgham@apple.com>
925 Work around bug in Silverlight
926 https://bugs.webkit.org/show_bug.cgi?id=133004
928 Reviewed by Anders Carlsson.
930 * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
931 (WebKit::PluginProcessMainDelegate::doPreInitializationWork): Add low-resolution flag
932 to user defaults prior to NSApplication invocation. This code was moved from
933 PluginProcess::platformInitializeProcess.
934 * PluginProcess/mac/PluginProcessMac.mm:
935 (WebKit::PluginProcess::platformInitializeProcess): Move low-resolution flag
936 setting to PluginProcessMainDelegate.
938 2014-05-16 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
940 [WK2] Change the remaining framework includes from WebKit2 to WebKit
941 https://bugs.webkit.org/show_bug.cgi?id=132956
943 Reviewed by Sam Weinig.
945 * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
946 * NetworkProcess/unix/NetworkProcessMainUnix.h:
947 * PluginProcess/unix/PluginProcessMainUnix.h:
948 * Shared/API/c/cairo/WKImageCairo.h:
949 * Shared/API/c/cf/WKURLRequestCF.h:
950 * Shared/API/c/cf/WKURLResponseCF.h:
951 * Shared/API/c/efl/WKArrayEfl.cpp:
952 * Shared/API/c/efl/WKArrayEfl.h:
953 * UIProcess/API/C/CoordinatedGraphics/WKView.h:
954 * UIProcess/API/C/WKBatteryManager.h:
955 * UIProcess/API/C/WKBatteryStatus.h:
956 * UIProcess/API/C/WKGrammarDetail.h:
957 * UIProcess/API/C/WKTextChecker.h:
958 * UIProcess/API/C/WKVibration.h:
959 * UIProcess/API/C/WKViewportAttributes.h:
960 * UIProcess/API/C/cairo/WKIconDatabaseCairo.h:
961 * UIProcess/API/C/efl/WKAPICastEfl.h:
962 * UIProcess/API/C/efl/WKColorPickerResultListener.h:
963 * UIProcess/API/C/efl/WKEventEfl.h:
964 * UIProcess/API/C/efl/WKPageEfl.h:
965 * UIProcess/API/C/efl/WKPopupItem.h:
966 * UIProcess/API/C/efl/WKPopupMenuListener.h:
967 * UIProcess/API/C/efl/WKViewEfl.cpp:
968 * UIProcess/API/C/efl/WKViewEfl.h:
969 * UIProcess/API/C/gtk/WKFullScreenClientGtk.h:
970 * UIProcess/API/C/gtk/WKInspectorClientGtk.h:
971 * UIProcess/API/C/gtk/WKView.h:
972 * UIProcess/API/C/gtk/WKViewPrivate.h:
973 * UIProcess/API/C/soup/WKContextSoup.h:
974 * UIProcess/API/C/soup/WKCookieManagerSoup.h:
975 * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h:
976 * UIProcess/API/C/soup/WKSoupRequestManager.h:
977 * UIProcess/API/Cocoa/WKErrorRecoveryAttempting.h:
978 * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
979 * UIProcess/API/cpp/efl/WKEinaSharedString.cpp:
980 * UIProcess/API/cpp/efl/WKEinaSharedString.h:
981 * UIProcess/API/efl/EwkView.cpp:
982 * UIProcess/API/efl/EwkView.h:
983 * UIProcess/API/efl/EwkViewCallbacks.h:
984 * UIProcess/API/efl/GestureRecognizer.h:
985 * UIProcess/API/efl/ewk_application_cache_manager_private.h:
986 * UIProcess/API/efl/ewk_auth_request_private.h:
987 * UIProcess/API/efl/ewk_back_forward_list_item_private.h:
988 * UIProcess/API/efl/ewk_back_forward_list_private.h:
989 * UIProcess/API/efl/ewk_context_menu_item.cpp:
990 * UIProcess/API/efl/ewk_context_private.h:
991 * UIProcess/API/efl/ewk_cookie_manager_private.h:
992 * UIProcess/API/efl/ewk_database_manager_private.h:
993 * UIProcess/API/efl/ewk_error_private.h:
994 * UIProcess/API/efl/ewk_favicon_database_private.h:
995 * UIProcess/API/efl/ewk_file_chooser_request_private.h:
996 * UIProcess/API/efl/ewk_page_group_private.h:
997 * UIProcess/API/efl/ewk_popup_menu_item_private.h:
998 * UIProcess/API/efl/ewk_popup_menu_private.h:
999 * UIProcess/API/efl/ewk_security_origin_private.h:
1000 * UIProcess/API/efl/ewk_settings_private.h:
1001 * UIProcess/API/efl/ewk_storage_manager_private.h:
1002 * UIProcess/API/efl/ewk_view.cpp:
1003 * UIProcess/API/efl/ewk_view_private.h:
1004 * UIProcess/API/efl/ewk_window_features_private.h:
1005 * UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp:
1006 * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp:
1007 * UIProcess/API/gtk/WebKitDownloadClient.cpp:
1008 * UIProcess/API/gtk/WebKitPrivate.h:
1009 * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
1010 * UIProcess/efl/BatteryProvider.h:
1011 * UIProcess/efl/ContextHistoryClientEfl.h:
1012 * UIProcess/efl/DownloadManagerEfl.h:
1013 * UIProcess/efl/FindClientEfl.h:
1014 * UIProcess/efl/FormClientEfl.h:
1015 * UIProcess/efl/PageLoadClientEfl.h:
1016 * UIProcess/efl/PagePolicyClientEfl.h:
1017 * UIProcess/efl/PageUIClientEfl.h:
1018 * UIProcess/efl/RequestManagerClientEfl.h:
1019 * UIProcess/efl/TextCheckerClientEfl.h:
1020 * UIProcess/efl/VibrationClientEfl.h:
1021 * UIProcess/efl/ViewClientEfl.cpp:
1022 * UIProcess/efl/ViewClientEfl.h:
1023 * UIProcess/efl/WebInspectorProxyEfl.cpp:
1024 * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
1025 * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
1026 * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp:
1027 * WebProcess/efl/SeccompFiltersWebProcessEfl.h:
1028 * WebProcess/efl/WebProcessMainEfl.cpp:
1029 * WebProcess/efl/WebProcessMainEfl.h:
1030 * WebProcess/gtk/WebGtkInjectedBundleMain.cpp:
1031 * WebProcess/gtk/WebProcessMainGtk.cpp:
1032 * WebProcess/gtk/WebProcessMainGtk.h:
1033 * mac/WKPreferences.h:
1035 2014-05-15 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1037 [EFL][WK2] Skip failing unit tests
1038 https://bugs.webkit.org/show_bug.cgi?id=132979
1040 Reviewed by Daniel Bates.
1042 * PlatformEfl.cmake: Skip failing unit tests for now.
1044 2014-05-15 Simon Fraser <simon.fraser@apple.com>
1046 [iOS WK2] When zoomed, fixed elements jump at the start of a scroll, and jump back at the end.
1047 https://bugs.webkit.org/show_bug.cgi?id=132978
1048 <rdar://problem/16894428>
1050 Reviewed by Benjamin Poulain.
1052 Move the static function fixedPositionRectFromExposedRect() to a member function on
1053 WebPageProxy so we can call it from more places. Also never give WebCore a customFixedPosition
1054 rect that extends past the document bounds, but allow rubber-banding/pinching in the UI process to
1055 move fixed elements outside the document.
1057 * UIProcess/PageClient.h: Need to expose minimumZoomScale() and contentsSize() to WebPageProxy.
1058 * UIProcess/WebPageProxy.h:
1059 * UIProcess/ios/PageClientImplIOS.h:
1060 * UIProcess/ios/PageClientImplIOS.mm:
1061 (WebKit::PageClientImpl::minimumZoomScale):
1062 (WebKit::PageClientImpl::contentsSize):
1063 * UIProcess/ios/WKContentView.mm:
1064 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
1065 Pass the computeCustomFixedPositionRect(ConstrainedToDocumentRect) to WebCore, but use computeCustomFixedPositionRect()
1066 for the ScrollingCoordinator update.
1067 (adjustedUnexposedEdge): Deleted.
1068 (adjustedUnexposedMaxEdge): Deleted.
1069 (fixedPositionRectFromExposedRect): Deleted.
1070 * UIProcess/ios/WebPageProxyIOS.mm:
1071 (WebKit::adjustedUnexposedEdge):
1072 (WebKit::adjustedUnexposedMaxEdge):
1073 (WebKit::WebPageProxy::computeCustomFixedPositionRect):
1074 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1075 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): This fixes some flashing when the scrolling tree
1076 was being updated while scrolling; we now pass the correct rect.
1078 2014-05-15 Mark Rowe <mrowe@apple.com>
1080 <https://webkit.org/b/132976> Move discovery of sharing services off the main thread
1082 Discovery of sharing services can require disk access and IPC. Since the interface to
1083 ServicesController is already asynchronous, we can easily perform the discovery on a
1084 background queue. This can eliminate tens to hundreds of milliseconds worth of work
1085 from the main thread when creating the first web process.
1087 Reviewed by Brady Eidson.
1089 * UIProcess/mac/ServicesController.h:
1090 * UIProcess/mac/ServicesController.mm:
1091 (WebKit::ServicesController::ServicesController):
1092 (WebKit::ServicesController::refreshExistingServices): Bail out early if we're already
1093 in the process of refreshing the services. Kick the discovery over to a background queue,
1094 with it hopping back to the main queue to update the actual state and notify any contexts
1095 that were interested.
1097 2014-05-15 Dan Bernstein <mitz@apple.com>
1099 Fixed a typo in a comment and updated previous change log entry.
1101 * WebProcess/WebPage/ios/WebPageIOS.mm:
1102 (WebKit::WebPage::elementDidFocus):
1104 2014-05-15 Dan Bernstein <mitz@apple.com>
1106 <rdar://problem/16844952> [iOS] www.wikipedia.org is loading much slower due to FormClient::willBeginInputSession
1107 https://bugs.webkit.org/show_bug.cgi?id=132974
1109 Reviewed by Enrica Casucci.
1111 * WebProcess/WebPage/ios/WebPageIOS.mm:
1112 (WebKit::WebPage::elementDidFocus): Don’t call FormClient::willBeginInputSession if the
1113 focus isn’t user-initiated, because in that case the UI process will bail out of
1114 -_startAssistingNode:userIsInteracting:userObject: before creating an input session and
1115 calling the -_webView:didStartInputSession:.
1117 2014-05-15 Benjamin Poulain <bpoulain@apple.com>
1119 [iOS][WK2] WKWebView sends invalid content offsets at the end of animated resize
1120 https://bugs.webkit.org/show_bug.cgi?id=132941
1121 <rdar://problem/16921557>
1123 Reviewed by Tim Horton.
1125 Since we cannot change the scale and content inset simultaneously while accounting for the obscured insets,
1126 we end up with invalid contentOffsets.
1128 To work around the problem, change the content scale outside of UIScrollView to ensure none of the side effect
1131 * UIProcess/API/Cocoa/WKWebView.mm:
1132 (-[WKWebView _endAnimatedResize]):
1134 2014-05-15 Tim Horton <timothy_horton@apple.com>
1136 WebKit2 View Gestures (Zoom): Document size changes during zoom gesture cause erratic scrolling
1137 https://bugs.webkit.org/show_bug.cgi?id=132944
1138 <rdar://problem/15769454>
1140 Reviewed by Simon Fraser.
1142 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1143 (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1144 If a layer flush occurs and we have an active transient zoom,
1145 re-apply the transient zoom to the relevant platform layers, because
1146 WebCore might have overwritten the relevant layer properties.
1148 (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
1149 Reset m_transientZoomScale before flushLayers() so that we don't
1150 re-apply the transient zoom when we're actually trying to commit it.
1152 2014-05-15 Alex Christensen <achristensen@webkit.org>
1154 Add pointer lock to features without enabling it.
1155 https://bugs.webkit.org/show_bug.cgi?id=132961
1157 Reviewed by Sam Weinig.
1159 * Configurations/FeatureDefines.xcconfig:
1160 Added ENABLE_POINTER_LOCK to list of features.
1162 2014-05-15 Simon Fraser <simon.fraser@apple.com>
1164 [UI-side compositing] Fix copying animations between layers, and pausing them
1165 https://bugs.webkit.org/show_bug.cgi?id=132943
1166 <rdar://problem/16906369&16906541>
1168 Reviewed by Tim Horton.
1170 Fix PlatformCAAnimationRemote to support animation copying, and to record
1171 the beginTime for implicitly started animations. This fixes animation pausing,
1172 and copying of animations between layers when they go between tiled and non-tiled.
1174 This requires sending the animation key back through animationDidStart() so that
1175 we can record this beginTime on the PlatformCAAnimationRemote in the web process.
1176 This path doesn't set the "hasExplicitBeginTime" flag.
1178 PlatformCAAnimationRemote also now stores a hash of active animations, so that
1179 it can implement animationForKey(), and record the beginTime.
1181 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1182 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1183 (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
1184 * UIProcess/mac/RemoteLayerTreeHost.h:
1185 * UIProcess/mac/RemoteLayerTreeHost.mm:
1186 (WebKit::RemoteLayerTreeHost::animationDidStart): Grovel for the key for this
1187 animation; sadly CA doesn't give us an easier way.
1188 * WebProcess/WebPage/DrawingArea.h:
1189 (WebKit::DrawingArea::acceleratedAnimationDidStart):
1190 * WebProcess/WebPage/DrawingArea.messages.in:
1191 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
1192 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1193 (-[WKAnimationDelegate animationDidStart:]):
1194 (WebKit::PlatformCAAnimationRemote::copy):
1195 (WebKit::PlatformCAAnimationRemote::copyTimingFunctionFrom):
1196 (WebKit::PlatformCAAnimationRemote::copyFromValueFrom):
1197 (WebKit::PlatformCAAnimationRemote::copyToValueFrom):
1198 (WebKit::PlatformCAAnimationRemote::copyValuesFrom):
1199 (WebKit::PlatformCAAnimationRemote::copyKeyTimesFrom):
1200 (WebKit::PlatformCAAnimationRemote::copyTimingFunctionsFrom):
1201 (WebKit::addAnimationToLayer):
1202 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1203 (WebKit::PlatformCALayerRemote::addAnimationForKey):
1204 (WebKit::PlatformCALayerRemote::removeAnimationForKey):
1205 (WebKit::PlatformCALayerRemote::animationForKey):
1206 (WebKit::PlatformCALayerRemote::animationStarted):
1207 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1208 * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
1209 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1210 (WebKit::RemoteLayerTreeContext::animationDidStart):
1211 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1212 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1213 (WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidStart):
1215 2014-05-14 Simon Fraser <simon.fraser@apple.com>
1217 Clean up "has non-zero begin time" terminology in animations
1218 https://bugs.webkit.org/show_bug.cgi?id=132942
1220 Reviewed by Tim Horton.
1222 Change the "non-zero beginTime" terminology in the platform CA animations
1223 code to "explicit beginTime": this flag really means that we explicitly set
1224 the beginTime of the animation, rather than let CA set the beginTime when
1225 committing the animation. This flag is used for animations with negative
1226 delay, and when pausing.
1228 * Shared/mac/RemoteLayerTreeTransaction.mm:
1229 (WebKit::RemoteLayerTreeTextStream::operator<<):
1230 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
1231 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1232 (-[WKAnimationDelegate animationDidStart:]):
1233 (WebKit::PlatformCAAnimationRemote::Properties::encode):
1234 (WebKit::PlatformCAAnimationRemote::Properties::decode):
1235 (WebKit::PlatformCAAnimationRemote::setBeginTime):
1236 (WebKit::addAnimationToLayer):
1238 2014-05-15 Tim Horton <timothy_horton@apple.com>
1240 [iOS] Incremental updates during scroll-to-top shouldn’t count as “stable” updates
1241 https://bugs.webkit.org/show_bug.cgi?id=132934
1243 Reviewed by Simon Fraser.
1245 * UIProcess/API/Cocoa/WKWebView.mm:
1246 (-[WKWebView _updateVisibleContentRects]):
1247 If we're in a scroll-to-top programmatic scroll, the update is not stable.
1248 The last event comes in with _isScrollingToTop false, so we do our stable update.
1250 2014-05-15 Carlos Garcia Campos <cgarcia@igalia.com>
1252 [GTK] Compile all installed resources as GResources
1253 https://bugs.webkit.org/show_bug.cgi?id=131099
1255 Reviewed by Philippe Normand.
1257 It avoids conflicts with old WebKit versions, and resources are
1258 always found even without installing or using environment variables.
1260 * PlatformGTK.cmake: Add rules to write the xml file with the
1261 resources depending on the configure options and to generate and
1262 build the GResources file.
1264 2014-05-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1266 [EFL][WK2] Fix an unit test of ewk_context_url_scheme_register()
1267 https://bugs.webkit.org/show_bug.cgi?id=132902
1269 Reviewed by Anders Carlsson.
1271 This test can be run when CUSTOM_PROTOCOL is enabled. Besides the test needs
1272 to check if registered callback function works well.
1274 * UIProcess/API/efl/tests/test_ewk2_context.cpp:
1275 (EWK2ContextTest::schemeRequestCallback):
1278 2014-05-14 Ryuan Choi <ryuan.choi@samsung.com>
1280 [EFL][WK2] Use default context for ewk_view_add
1281 https://bugs.webkit.org/show_bug.cgi?id=132936
1283 Reviewed by Gyuyoung Kim.
1285 Since r146265, ewk_view_add created new context and it's regression.
1286 This patch restores the behavior of ewk_view_add to original one.
1288 * UIProcess/API/efl/ewk_view.cpp:
1290 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1293 2014-05-14 Maciej Stachowiak <mjs@apple.com>
1295 Database Process crashes after loading html5test.com
1296 https://bugs.webkit.org/show_bug.cgi?id=132938
1297 <rdar://problem/16241419>
1299 Reviewed by Ryosuke Niwa.
1301 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1302 (WebKit::DatabaseProcessIDBConnection::disconnectedFromWebProcess): Expand comment
1303 about the null check.
1304 (WebKit::DatabaseProcessIDBConnection::deleteDatabase): Call disconnectedFromWebProcess
1305 to pick up its null check and to avoid duplicating code.
1307 2014-05-14 Benjamin Poulain <bpoulain@apple.com>
1309 [iOS][WK2] The top/bottom edges should not be sticky when restoring the scroll position from the dynamic size update history
1310 https://bugs.webkit.org/show_bug.cgi?id=132931
1312 Reviewed by Sam Weinig.
1314 The goal of dynamicSizeUpdateHistory is to make dynamic resize completely reversible.
1315 Because of the stick-to-edges heuristics, this was not true near the top and bottom edges.
1317 For example, start in landscape, scroll the page a bit, then rotate to portrait. Now you have
1318 a lot more vertical space, and the top edge of the document is at the edge of the scrollview.
1319 Rotate back to landscape: the position is restored correct, but it is then overriden by
1320 the stick-to-edges branch.
1322 When we restore the position from history, we should only put it back in the valid bounds, skipping
1323 stick-to-edges entirely.
1325 * WebProcess/WebPage/ios/WebPageIOS.mm:
1326 (WebKit::WebPage::dynamicViewportSizeUpdate):
1328 2014-05-14 Tim Horton <timothy_horton@apple.com>
1330 Enable IOSurface view snapshots for 10.9+
1331 https://bugs.webkit.org/show_bug.cgi?id=132932
1332 <rdar://problem/16900619>
1334 Reviewed by Dean Jackson.
1336 * UIProcess/mac/ViewSnapshotStore.h:
1337 r166005 unintentionally worked around <rdar://problem/16734031>.
1338 r168689 fixed another bug that caused sometimes randomly white snapshots.
1339 It's safe to turn on IOSurface view snapshots where purgeability is supported.
1341 2014-05-14 Alexey Proskuryakov <ap@apple.com>
1343 Use the correct client in WebPageProxy::unwrapCryptoKey
1344 https://bugs.webkit.org/show_bug.cgi?id=132924
1346 Reviewed by Darin Adler.
1348 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::unwrapCryptoKey): Match what
1349 we now do in wrapCryptoKey().
1351 2014-05-14 Zalan Bujtas <zalan@apple.com>
1353 Subpixel layout: Change Element.offset* client* scroll* return type to double.
1354 https://bugs.webkit.org/show_bug.cgi?id=132895
1356 Reviewed by Simon Fraser.
1358 This patch changes Element.offset*, Element.client* and Element.scroll* APIs return
1359 type from long to double to match the latest CSSOM View Module spec[1].
1360 Element.offset* and Element.client* do return subpixel values from now on.
1361 Element.scroll* still return integral values as the scrolling code hasn't adopted to subpixel rendering yet.
1363 subpixelCSSOMElementMetricsEnabled setting is added to be able to turn this feature on/off
1364 from WK2 preferences. It toggles the return value from subpixel to floored integral.
1365 It does not change layout/rendering behavior.
1367 Reference list of what other browsers do:
1368 IE: http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx
1369 Blink: http://www.chromestatus.com/features/5497402177880064
1370 Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=825607
1372 [1] http://www.w3.org/TR/2013/WD-cssom-view-20131217/
1374 * Shared/WebPreferencesStore.h:
1375 * UIProcess/API/C/WKPreferences.cpp:
1376 (WKPreferencesSetSubpixelCSSOMElementMetricsEnabled):
1377 (WKPreferencesGetSubpixelCSSOMElementMetricsEnabled):
1378 * UIProcess/API/C/WKPreferencesRefPrivate.h:
1379 * WebProcess/WebPage/WebPage.cpp:
1380 (WebKit::WebPage::updatePreferences):
1382 2014-05-14 Benjamin Poulain <bpoulain@apple.com>
1384 [iOS][WK2] Expose the viewport meta tag width on the UIProcess
1385 https://bugs.webkit.org/show_bug.cgi?id=132926
1386 <rdar://problem/16892115>
1388 Reviewed by Sam Weinig.
1390 Safari requires the viewport meta tag width for legacy stuff on WebApps. Just send it
1391 over to the UIProcess when it changes.
1393 * UIProcess/API/Cocoa/WKWebView.mm:
1394 (-[WKWebView initWithFrame:configuration:]):
1395 (-[WKWebView _setViewportMetaTagWidth:]):
1396 (-[WKWebView _viewportMetaTagWidth]):
1397 * UIProcess/API/Cocoa/WKWebViewInternal.h:
1398 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1399 * UIProcess/PageClient.h:
1400 * UIProcess/WebPageProxy.h:
1401 * UIProcess/WebPageProxy.messages.in:
1402 * UIProcess/ios/PageClientImplIOS.h:
1403 * UIProcess/ios/PageClientImplIOS.mm:
1404 (WebKit::PageClientImpl::didChangeViewportMetaTagWidth):
1405 * UIProcess/ios/WebPageProxyIOS.mm:
1406 (WebKit::WebPageProxy::viewportMetaTagWidthDidChange):
1407 * WebProcess/WebPage/ios/WebPageIOS.mm:
1408 (WebKit::WebPage::viewportPropertiesDidChange):
1410 2014-05-13 Simon Fraser <simon.fraser@apple.com>
1412 [iOS WK2] Make view debugging easier
1413 https://bugs.webkit.org/show_bug.cgi?id=132892
1415 Reviewed by Tim Horton.
1417 Enhance -[WKCompositingView description] to show WebKit-related information
1418 which is useful when dumping a window's UIView hierarchy.
1420 Also have WKTransformView and WKRemoteView inherit from WKCompositingView,
1421 and thereby get the hitTest:withEvent: override for free, as well as better dumping.
1423 * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
1424 (-[WKCompositingView description]):
1425 (-[WKTransformView hitTest:withEvent:]): Deleted.
1426 (-[WKRemoteView hitTest:withEvent:]): Deleted.
1428 2014-05-14 Benjamin Poulain <bpoulain@apple.com>
1430 [iOS][WK2] Fixed positioned element must relayout correctly before sending resize events to the page
1431 https://bugs.webkit.org/show_bug.cgi?id=132920
1432 <rdar://problem/16836866>
1434 Reviewed by Simon Fraser.
1436 During the dynamic resize operation, we do not update the fixed position elements because
1437 it is a very hard problem on the UI Process side.
1439 When the animation finishes, the fixed positioned rect is recomputed on the UIProcess and pushed
1442 The problem is sending the rect after the animation is too late, the content can observe the fixed
1443 elements layout through JavaScript and would get the old size.
1445 This patch fixes the issue updating the CustomFixedPositionLayoutRect on the WebProcess before
1446 notifying the content of the resize.
1447 First, we layout the content to the new fixed layout size to get the new content size.
1448 Then, we compute the new FixedPositionedLayoutRect with FrameView's viewportConstrainedObjectsRect(),
1449 this use the real content size and our estimated unobscured content rect.
1451 * WebProcess/WebPage/ios/WebPageIOS.mm:
1452 (WebKit::WebPage::dynamicViewportSizeUpdate):
1454 2014-05-14 Enrica Casucci <enrica@apple.com>
1456 REGRESSION(WK2): Many pages have very wrong text size after rotating.
1457 https://bugs.webkit.org/show_bug.cgi?id=132893
1458 <rdar://problem/16806958>
1460 Reviewed by Benjamin Poulain.
1462 Whenever our viewport width changes we must reset text autosizing
1465 * WebProcess/WebPage/WebPage.h:
1466 * WebProcess/WebPage/ios/WebPageIOS.mm:
1467 (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
1468 (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
1469 (WebKit::WebPage::resetTextAutosizingBeforeLayoutIfNeeded):
1470 (WebKit::WebPage::dynamicViewportSizeUpdate):
1472 2014-05-14 Alex Christensen <achristensen@webkit.org>
1474 Use references instead of pointers with ResourceLoadTiming.
1475 https://bugs.webkit.org/show_bug.cgi?id=132846
1477 Reviewed by Alexey Proskuryakov.
1479 * Shared/WebCoreArgumentCoders.cpp:
1480 (IPC::ArgumentCoder<ResourceResponse>::encode):
1481 (IPC::ArgumentCoder<ResourceResponse>::decode):
1482 Use references instead of pointers and null checks.
1484 2014-05-14 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
1486 Remove CSS_STICKY_POSITION guards
1487 https://bugs.webkit.org/show_bug.cgi?id=132676
1489 Reviewed by Simon Fraser.
1491 * Configurations/FeatureDefines.xcconfig:
1493 2014-05-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1495 [EFL][WK2] Add ewk_view_fixed_layout_size_set|get()
1496 https://bugs.webkit.org/show_bug.cgi?id=132811
1498 Reviewed by Christophe Dumez.
1500 Some EFL applications need to set size of fixed layout when enabling fixed layout.
1501 This APIs can pass ownership regarding the size of fixed layout to application side.
1503 * UIProcess/API/efl/ewk_view.cpp:
1504 (ewk_view_layout_fixed_size_set):
1505 (ewk_view_layout_fixed_size_get):
1506 * UIProcess/API/efl/ewk_view.h:
1507 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1510 2014-05-13 Simon Fraser <simon.fraser@apple.com>
1512 Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side compositing
1513 https://bugs.webkit.org/show_bug.cgi?id=132899
1515 Reviewed by Beth Dakin.
1517 The new InsetClipLayer and ContentShadowLayer members on scrolling nodes
1518 need to be correctly encoded/decoded for UI-side compositing, and dumped
1521 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1522 (ArgumentCoder<ScrollingStateScrollingNode>::encode):
1523 (ArgumentCoder<ScrollingStateScrollingNode>::decode):
1524 (WebKit::RemoteScrollingTreeTextStream::dump):
1525 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1526 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1528 2014-05-13 Anders Carlsson <andersca@apple.com>
1532 Reviewed by Dan Bernstein.
1534 * Shared/API/Cocoa/WKFoundation.h:
1535 Make sure to include Availability.h
1537 2014-05-13 Beth Dakin <bdakin@apple.com>
1539 REGRESSION (topContentInset): Searching through Facebook Messenger's chat causes
1540 scrolling in News Feed
1541 https://bugs.webkit.org/show_bug.cgi?id=132889
1543 <rdar://problem/16715716>
1545 Reviewed by Simon Fraser.
1547 Re-name scrollOffsetRelativeToDocument() to
1548 documentScrollPositionRelativeToViewOrigin().
1549 * WebProcess/WebPage/FindController.cpp:
1550 (WebKit::FindController::rectsForTextMatches):
1551 * WebProcess/WebPage/WebPage.cpp:
1552 (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
1554 2014-05-13 Dean Jackson <dino@apple.com>
1556 [iOS] Page scale update messages for media controls should only fire at the end of zooming
1557 https://bugs.webkit.org/show_bug.cgi?id=132857
1558 <rdar://problem/16631009>
1560 Reviewed by Simon Fraser.
1562 As the user was zooming, the media controls that responded
1563 to the page scale (and resized themselves) would do so
1564 slightly out of sync with the screen refreshes, and it looked
1567 We already know if a pageScale change is happening inside
1568 a gesture using the inStableState property of the visibleContentRectUpdateInfo.
1569 Simply pass this along to WebCore::Page.
1571 * WebProcess/WebPage/ios/WebPageIOS.mm:
1572 (WebKit::WebPage::updateVisibleContentRects): Pass inStableState onto the
1573 WebCore::Page. Note that we have to send this message even if the
1574 scale has not changed, since the last changing update might not have
1577 2014-05-13 Benjamin Poulain <bpoulain@apple.com>
1579 [iOS][WK2] When the secondary UIScrollView delegates respond to callbacks, delay the state change until both delegates have finished
1580 https://bugs.webkit.org/show_bug.cgi?id=132849
1581 <rdar://problem/16863716>
1583 Reviewed by Anders Carlsson.
1585 When there are two delegates responding to UIScrollView changes, there was often an intermediate invalid
1586 state forwarded to the UIProcess.
1588 For example, on scroll, WKWebView would update the state based on the current obscured insets in response to
1590 After that update, Safari would modify the insets, thus updating the state again.
1591 The first state changed by WKWebView is incomplete, and should never have been set.
1593 This patch works around the issue by delaying visible update rect in those cases.
1595 When the two delegates of WKScrollView respond to the same selector, WKScrollView invokes
1596 [UIWebView _willInvokeUIScrollViewDelegateCallback] on entry, and
1597 [UIWebView _didInvokeUIScrollViewDelegateCallback] on exit.
1599 Between those two calls, WKWebView does not forward the new UI state to the WebProcess.
1601 * UIProcess/API/Cocoa/WKWebView.mm:
1602 (-[WKWebView _willInvokeUIScrollViewDelegateCallback]):
1603 (-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
1604 (-[WKWebView _updateVisibleContentRects]):
1605 * UIProcess/API/Cocoa/WKWebViewInternal.h:
1606 * UIProcess/API/ios/WKViewIOS.mm:
1607 (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
1608 * UIProcess/ios/WKScrollView.h:
1609 * UIProcess/ios/WKScrollView.mm:
1610 (-[WKScrollViewDelegateForwarder initWithInternalDelegate:externalDelegate:]):
1611 (-[WKScrollViewDelegateForwarder forwardInvocation:]):
1612 (-[WKScrollView setInternalDelegate:]):
1614 2014-05-13 Benjamin Poulain <bpoulain@apple.com>
1616 [iOS][WK2] Remove the _extendedBackgroundExclusionInsets SPI
1617 https://bugs.webkit.org/show_bug.cgi?id=132848
1618 <rdar://problem/16875093>
1620 Reviewed by Darin Adler.
1622 The SPI is no longer needed by Safari.
1624 * UIProcess/API/Cocoa/WKWebView.mm:
1625 (-[WKWebView initWithFrame:configuration:]):
1626 (-[WKWebView _updateScrollViewBackground]):
1627 (-[WKWebView _frameOrBoundsChanged]):
1628 (-[WKWebView _setObscuredInsets:]):
1629 (-[WKWebView _endAnimatedResize]):
1630 (updateTopAndBottomExtendedBackgroundExclusionIfNecessary): Deleted.
1631 (-[WKWebView _setExtendedBackgroundExclusionInsets:]): Deleted.
1632 (-[WKWebView _extendedBackgroundExclusionInsets]): Deleted.
1633 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1635 2014-05-13 Samuel White <samuel_white@apple.com>
1637 AX: Hit testing not accounting for top content inset.
1638 https://bugs.webkit.org/show_bug.cgi?id=132876
1640 Reviewed by Chris Fleizach.
1642 Updated accessibilityHitTest: to account for top content inset when converting from screen coords to WebKit coords.
1644 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
1645 (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
1647 2014-05-13 Enrica Casucci <enrica@apple.com>
1649 REGRESSION (WebKit2): Zooming to text field leaves it partially hidden by the form assistant.
1650 https://bugs.webkit.org/show_bug.cgi?id=132879
1651 <rdar://problem/16318049>
1653 Reviewed by Benjamin Poulain.
1655 Adds the heuristics to zoom and scroll to ensure the element being focused
1656 is fully visible and its text readable.
1658 * Shared/AssistedNodeInformation.cpp:
1659 (WebKit::AssistedNodeInformation::encode):
1660 (WebKit::AssistedNodeInformation::decode):
1661 * Shared/AssistedNodeInformation.h:
1662 (WebKit::AssistedNodeInformation::AssistedNodeInformation):
1663 * UIProcess/API/Cocoa/WKWebView.mm:
1664 (-[WKWebView _zoomToFocusRect:WebCore::selectionRect:WebCore::fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
1665 (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
1666 * UIProcess/API/Cocoa/WKWebViewInternal.h:
1667 * UIProcess/ios/WKContentView.h:
1668 * UIProcess/ios/WKContentView.mm:
1669 (-[WKContentView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
1670 * UIProcess/ios/WKContentViewInteraction.mm:
1671 (-[WKContentView _displayFormNodeInputView]):
1672 (-[WKContentView _startAssistingNode:userIsInteracting:userObject:]):
1673 * WebProcess/WebPage/ios/WebPageIOS.mm:
1674 (WebKit::WebPage::getAssistedNodeInformation):
1676 2014-05-13 Simon Fraser <simon.fraser@apple.com>
1678 Fix the iOS Simulator build.
1680 * UIProcess/mac/ViewSnapshotStore.h:
1682 2014-05-13 Tim Horton <timothy_horton@apple.com>
1684 Speculative build fix for iOS.
1686 * UIProcess/ios/WebMemoryPressureHandlerIOS.cpp: Removed.
1687 * UIProcess/ios/WebMemoryPressureHandlerIOS.mm: Added.
1688 (WebKit::WebMemoryPressureHandler::shared):
1689 (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
1690 * WebKit2.xcodeproj/project.pbxproj:
1691 Make WebMemoryPressureHandlerIOS Obj-C.
1693 2014-05-13 Anders Carlsson <andersca@apple.com>
1695 Another follow-up build fix.
1697 * Shared/API/Cocoa/WKFoundation.h:
1699 2014-05-13 Anders Carlsson <andersca@apple.com>
1701 Another follow-up build fix.
1703 * Shared/API/Cocoa/WKFoundation.h:
1705 2014-05-13 Anders Carlsson <andersca@apple.com>
1709 * UIProcess/API/Cocoa/WKNavigationAction.mm:
1710 (-[WKNavigationAction _initWithNavigationActionData:WebKit::]):
1711 (-[WKNavigationAction _isUserInitiated]):
1713 2014-05-13 Anders Carlsson <andersca@apple.com>
1715 Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
1716 https://bugs.webkit.org/show_bug.cgi?id=132880
1717 <rdar://problem/16901354>
1719 Reviewed by Dan Bernstein.
1721 * Shared/API/Cocoa/WKFoundation.h:
1722 Add typedef for older systems.
1724 * UIProcess/API/Cocoa/WKNavigationAction.h:
1725 Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
1727 * UIProcess/API/Cocoa/WKNavigationAction.mm:
1728 (toWKNavigationType):
1729 This can be static now.
1731 (toNSEventModifierFlags):
1732 Helper to convert WebEvent::Modifiers to NSEventModifierFlags.
1735 Helper to convert WebMouseEvent::Button to an AppKit button number.
1737 (-[WKNavigationAction initWithNavigationActionData:WebKit::]):
1738 New initializer that takes a NavigationActionData and fills in the relevant ivars from it.
1740 (-[WKNavigationAction _isUserInitiated]):
1741 Return the new ivar.
1743 * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
1744 Remove readwrite overrides.
1746 * UIProcess/Cocoa/NavigationState.mm:
1747 (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
1748 Use initWithNavigationActionData:
1750 * UIProcess/Cocoa/UIDelegate.mm:
1751 (WebKit::UIDelegate::UIClient::createNewPage):
1752 Use initWithNavigationActionData:
1754 2014-05-13 Tim Horton <timothy_horton@apple.com>
1756 WebKit2 View Gestures (Swipe): Encode snapshots as JPEG on some platforms
1757 https://bugs.webkit.org/show_bug.cgi?id=127788
1758 <rdar://problem/15928241>
1760 Reviewed by Anders Carlsson.
1762 Allow JPEG snapshots. Compression is done asynchronously.
1763 Enable JPEG snapshots (for now) on all PLATFORM(MAC).
1764 We'll switch back to IOSurface snapshots on 10.9+ after <rdar://problem/16734031> is resolved.
1766 * UIProcess/API/Cocoa/WKWebView.mm:
1767 * UIProcess/API/mac/WKView.mm:
1768 (-[WKView _takeViewSnapshot]):
1769 Store the image size on the ViewSnapshot.
1770 Move IOSurface-related code to ViewSnapshotStore.
1772 * UIProcess/ios/ViewGestureControllerIOS.mm:
1773 (WebKit::ViewGestureController::beginSwipeGesture):
1774 Adopt asLayerContents().
1776 * UIProcess/mac/ViewGestureController.h:
1777 * UIProcess/mac/ViewGestureControllerMac.mm:
1778 (WebKit::ViewGestureController::retrieveSnapshotForItem):
1779 (WebKit::ViewGestureController::beginSwipeGesture):
1780 (WebKit::ViewGestureController::removeSwipeSnapshot):
1781 Adopt asLayerContents().
1782 Put the snapshot on the right layer (the parent of the snapshot image layer);
1783 if it's on the snapshot image layer itself, if there is no image, the shadow
1784 is displayed on top of the white placeholder.
1785 Only reset snapshot purgeability if we're using IOSurface snapshots.
1787 * UIProcess/mac/ViewSnapshotStore.h:
1788 Add a bunch of macros to allow us to switch the snapshot backing store implementation.
1790 * UIProcess/mac/ViewSnapshotStore.mm:
1791 (WebKit::ViewSnapshotStore::ViewSnapshotStore):
1792 (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
1793 (WebKit::ViewSnapshotStore::recordSnapshot):
1794 If takeViewSnapshot() fails, don't remove the existing snapshot.
1796 (WebKit::createIOSurfaceFromImage):
1797 (WebKit::compressImageAsJPEG):
1798 (WebKit::ViewSnapshotStore::reduceSnapshotMemoryCost):
1799 (WebKit::ViewSnapshotStore::didCompressSnapshot):
1800 (WebKit::ViewSnapshot::clearImage):
1801 (WebKit::ViewSnapshot::asLayerContents):
1802 Asynchronously compress snapshots - if we're using JPEG snapshots - for a
1803 very large memory win (~20-30x).
1805 2014-05-12 Darin Adler <darin@apple.com>
1807 Make a few icon database improvements
1808 https://bugs.webkit.org/show_bug.cgi?id=132812
1810 Reviewed by Brady Eidson.
1812 * UIProcess/API/C/WKIconDatabase.cpp:
1813 (WKIconDatabaseCopyIconDataForPageURL): Moved the actual implementation of this
1814 out of the bindings into the WebIconDatabase class.
1816 * UIProcess/API/C/WKIconDatabase.h: Fixed argument names that were inconsistent.
1818 * UIProcess/WebIconDatabase.cpp: Removed unneeded includes.
1819 (WebKit::WebIconDatabase::create): Pass a reference instead of a pointer.
1820 (WebKit::WebIconDatabase::WebIconDatabase): Take a reference instead of a pointer.
1821 (WebKit::WebIconDatabase::invalidate): Use nullptr.
1822 (WebKit::WebIconDatabase::setDatabasePath): Use make_unique.
1823 (WebKit::WebIconDatabase::setIconDataForIconURL): Removed unneeded local variable.
1824 (WebKit::WebIconDatabase::imageForPageURL): Use nullptr.
1825 (WebKit::WebIconDatabase::nativeImageForPageURL): Ditto.
1826 (WebKit::WebIconDatabase::didFinishURLImport): Use a modern for loop.
1827 (WebKit::WebIconDatabase::iconDataForPageURL): Added. Moved this here from
1828 WKIconDatabase.cpp, but also changed to use createWithoutCopying to avoid making
1829 another copy of the data for each icon.
1831 * UIProcess/WebIconDatabase.h: Removed unneeded includes. Derive from
1832 IconDatabaseClient privately. Use nullptr. Added iconDataForPageURL member
1833 function. Use a reference for the constructor argument. Use override for
1834 virtual functions. Use unique_ptr instead of OwnPtr.
1836 2014-05-12 Mark Lam <mark.lam@apple.com>
1838 WebKit2 on iOS needs to capture the main thread's floating point environment.
1839 <https://webkit.org/b/132755>
1841 Reviewed by Geoffrey Garen.
1843 * Shared/mac/ChildProcessMac.mm:
1844 (WebKit::ChildProcess::platformInitialize):
1845 - Call FloatingPointEnv::enableNeededFloatingPointModes() to initialize
1846 the ARMv7 FP env to support denormalized numbers.
1847 - Call FloatingPointEnv::saveMainThreadEnvironment() to capture the main thread
1850 2014-05-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1852 [EFL][WK2] Fix ewk_view_navigation test in EWK2ViewTest
1853 https://bugs.webkit.org/show_bug.cgi?id=132817
1855 Reviewed by Dirk Schulze.
1857 To load test html pages, call ewk_view_uri_set() instead of EWK2UnitTestServer.
1858 Besides this patch adds test html page for ewk_view_navigation unit test.
1860 * UIProcess/API/efl/tests/resources/Page1.html: Added.
1861 * UIProcess/API/efl/tests/resources/Page2.html: Added.
1862 * UIProcess/API/efl/tests/resources/Page3.html: Added.
1863 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1866 2014-05-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1868 Unreviewed, EFL build fix since r168625.
1870 * UIProcess/efl/WebContextEfl.cpp:
1871 (WebKit::WebContext::platformDefaultLocalStorageDirectory): Remove const keyword.
1873 2014-05-12 Simon Fraser <simon.fraser@apple.com>
1875 [iOS WK2] Fuzzy tiles on some sites on loading
1876 https://bugs.webkit.org/show_bug.cgi?id=132847
1877 <rdar://problem/16816178>
1879 Reviewed by Benjamin Poulain.
1881 PlatformCALayerRemoteTiledBacking overrode setContentsScale() but not contentsScale(),
1882 causing us to early-return from GraphicsLayerCA::updateContentsScale() and leave the
1883 scale wrong. Fix by overriding contentsScale() also.
1885 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
1886 (WebKit::PlatformCALayerRemoteTiledBacking::contentsScale):
1887 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
1889 2014-05-12 Tim Horton <timothy_horton@apple.com>
1891 Triple-buffer RemoteLayerBackingStore
1892 https://bugs.webkit.org/show_bug.cgi?id=132786
1893 <rdar://problem/16877498>
1895 Reviewed by Simon Fraser.
1897 We need three buffers because we're currently unable to synchronize
1898 with the render server to swap when they're not in use, so we were
1899 throwing surfaces away far too frequently.
1901 This hugely reduces time spent in IOSurface::create on various repaint benchmarks.
1903 * Shared/mac/RemoteLayerBackingStore.h:
1904 (WebKit::RemoteLayerBackingStore::hasFrontBuffer):
1905 (WebKit::RemoteLayerBackingStore::volatility): Deleted.
1906 * Shared/mac/RemoteLayerBackingStore.mm:
1907 (WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
1908 (WebKit::RemoteLayerBackingStore::clearBackingStore):
1909 (WebKit::RemoteLayerBackingStore::encode):
1910 (WebKit::RemoteLayerBackingStore::decode):
1911 (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
1912 (WebKit::RemoteLayerBackingStore::display):
1913 (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
1914 (WebKit::RemoteLayerBackingStore::setBufferVolatility):
1915 (WebKit::RemoteLayerBackingStore::Buffer::discard):
1916 (WebKit::RemoteLayerBackingStore::setVolatility): Deleted.
1917 * Shared/mac/RemoteLayerBackingStoreCollection.mm:
1918 (WebKit::RemoteLayerBackingStoreCollection::purgeabilityTimerFired):
1919 Put the ShareableBitmap/IOSurface and a volatility bit in a Buffer struct.
1920 Also factor out "throw away this buffer and put it in the pool" into Buffer::discard().
1921 We keep a volatility bit because querying IOSurface purgeability is expensive,
1922 and we have a guarantee that any changes will happen in the Web process
1923 and go through this class (the lack of this guarantee in most cases is why I'm not
1924 putting this bit in WebCore::IOSurface itself).
1926 Make it so that each buffer's volatility can be adjusted individually
1927 by setBufferVolatility(), and adopt in RemoteLayerBackingStoreCollection.
1929 Add a third buffer, m_secondaryBackBuffer, which will swap with the back buffer
1930 before swapping front and back if the back buffer (soon to be the front buffer)
1931 is still in use by the render server. This means that we will almost never
1932 have to throw away a surface because it's in use (and conversely never need
1933 to make a new surface).
1935 Adjust RemoteLayerBackingStoreCollection to make secondary back surfaces purgeable
1936 more aggressively than others.
1938 2014-05-12 Alexey Proskuryakov <ap@apple.com>
1940 REGRESSION (r165972): Can't type into text fields in Flash
1941 https://bugs.webkit.org/show_bug.cgi?id=132840
1942 <rdar://problem/16671969>
1944 Reviewed by Anders Carlsson.
1946 * UIProcess/API/mac/WKView.mm: (-[WKView inputContext]): Restore a function that
1947 got accidentally lost when adding async text input code.
1949 2014-05-12 Chris Fleizach <cfleizach@apple.com>
1951 AX: .js dialogs shown in unload while AX is running crash WebKit.
1952 https://bugs.webkit.org/show_bug.cgi?id=123828
1954 Reviewed by Anders Carlsson.
1956 Utilize platform API to inform AX clients when the WebProcess will suspend and resume.
1957 This allows us to avoid having special behavior for accessibility when the WebProcess needs
1960 * Platform/IPC/Connection.cpp:
1961 (IPC::Connection::waitForSyncReply):
1962 * Platform/IPC/Connection.h:
1963 * Platform/IPC/mac/ConnectionMac.cpp:
1964 (IPC::Connection::willSendSyncMessage):
1965 (IPC::Connection::didReceiveSyncReply):
1966 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1967 (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
1968 (WebKit::WebChromeClient::runJavaScriptAlert):
1969 (WebKit::WebChromeClient::runJavaScriptConfirm):
1970 (WebKit::WebChromeClient::runJavaScriptPrompt):
1971 (WebKit::WebChromeClient::print):
1972 (WebKit::WebChromeClient::exceededDatabaseQuota):
1973 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1974 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1976 2014-05-12 Alex Christensen <achristensen@webkit.org>
1978 Progress on web timing.
1979 https://bugs.webkit.org/show_bug.cgi?id=132574
1981 Reviewed by Alexey Proskuryakov.
1983 * Shared/WebCoreArgumentCoders.cpp:
1984 (IPC::ArgumentCoder<ResourceResponse>::encode):
1985 (IPC::ArgumentCoder<ResourceResponse>::decode):
1986 Transfer ResourceLoadTiming values if they exist.
1988 2014-05-12 Dan Bernstein <mitz@apple.com>
1990 [Cocoa] Expose WebPage::usesEphemeralSession to the bundle
1991 https://bugs.webkit.org/show_bug.cgi?id=132836
1993 Reviewed by Anders Carlsson.
1995 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1996 (-[WKWebProcessPlugInBrowserContextController _usesNonPersistentWebsiteDataStore]):
1997 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
1999 2014-05-12 Carlos Alberto Lopez Perez <clopez@igalia.com>
2001 REGRESSION(168625): [GTK] build broken due to WKContextSetLocalStorageDirectory
2002 https://bugs.webkit.org/show_bug.cgi?id=132831
2004 Unreviewed GTK build fix.
2006 * UIProcess/gtk/WebContextGtk.cpp:
2007 (WebKit::WebContext::platformDefaultLocalStorageDirectory):
2008 This is now a static member function.
2010 2014-05-12 Anders Carlsson <andersca@apple.com>
2012 WKWebViewConfiguration should fill in the blanks
2013 https://bugs.webkit.org/show_bug.cgi?id=132832
2014 <rdar://problem/16886408>
2016 Reviewed by Dan Bernstein.
2018 * UIProcess/API/Cocoa/WKWebView.mm:
2019 (-[WKWebView initWithFrame:configuration:]):
2020 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2021 (-[WKWebViewConfiguration init]):
2022 (-[WKWebViewConfiguration _validate]):
2023 * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
2025 2014-05-12 Anders Carlsson <andersca@apple.com>
2027 WKWebView should default to _backgroundExtendsBeyondPage = YES
2028 https://bugs.webkit.org/show_bug.cgi?id=132829
2029 <rdar://problem/16886364>
2031 Reviewed by Beth Dakin.
2033 * UIProcess/API/Cocoa/WKWebView.mm:
2034 (-[WKWebView initWithFrame:configuration:]):
2036 2014-05-12 Anders Carlsson <andersca@apple.com>
2038 Pass local storage directory to StorageManager::create
2039 https://bugs.webkit.org/show_bug.cgi?id=132827
2041 Reviewed by Tim Horton.
2043 Since we know the local storage directory at creation time and we know it never changes,
2044 we can get rid of setLocalStorageDirectory and just pass the local storage directory at creation time.
2046 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2047 (WebKit::LocalStorageDatabaseTracker::create):
2048 (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
2049 (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
2050 (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory): Deleted.
2051 (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): Deleted.
2052 * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2053 * UIProcess/Storage/StorageManager.cpp:
2054 (WebKit::StorageManager::create):
2055 (WebKit::StorageManager::StorageManager):
2056 (WebKit::StorageManager::setLocalStorageDirectory): Deleted.
2057 * UIProcess/Storage/StorageManager.h:
2058 * UIProcess/WebContext.cpp:
2059 (WebKit::WebContext::WebContext):
2061 2014-05-11 Anders Carlsson <andersca@apple.com>
2063 Replace WKContextSetLocalStorageDirectory with a context configuration getter/setter
2064 https://bugs.webkit.org/show_bug.cgi?id=132809
2066 Reviewed by Dan Bernstein.
2068 * UIProcess/API/C/WKContext.cpp:
2069 (WKContextSetLocalStorageDirectory): Deleted.
2071 * UIProcess/API/C/WKContextConfigurationRef.cpp:
2072 (WKContextConfigurationCopyLocalStorageDirectory):
2073 (WKContextConfigurationSetLocalStorageDirectory):
2074 * UIProcess/API/C/WKContextConfigurationRef.h:
2075 Add getters and setters for the local storage directory.
2077 * UIProcess/API/C/WKContextPrivate.h:
2078 Remove WKContextSetLocalStorageDirectory.
2080 * UIProcess/API/Cocoa/WKProcessGroup.mm:
2081 (-[WKProcessGroup initWithInjectedBundleURL:]):
2082 Call WebContext::applyPlatformSpecificConfigurationDefaults.
2084 * UIProcess/API/Cocoa/WKProcessPool.mm:
2085 (-[WKProcessPool _initWithConfiguration:]):
2086 Call WebContext::applyPlatformSpecificConfigurationDefaults (for now).
2088 * UIProcess/APIContextConfiguration.cpp:
2089 (API::ContextConfiguration::webContextConfiguration):
2090 Set the local storage. Also, call WebContext::applyPlatformSpecificConfigurationDefaults.
2092 * UIProcess/APIContextConfiguration.h:
2093 (API::ContextConfiguration::injectedBundlePath):
2094 This should be const.
2096 (API::ContextConfiguration::localStorageDirectory):
2097 (API::ContextConfiguration::setLocalStorageDirectory):
2098 Add getter and setter.
2100 * UIProcess/Storage/StorageManager.cpp:
2101 (WebKit::StorageManager::setLocalStorageDirectory):
2102 ASSERT that the path isn't null.
2104 * UIProcess/WebContext.cpp:
2105 (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
2106 New helper function that will fill in platform specific defaults for empty parameters.
2108 (WebKit::WebContext::WebContext):
2109 Get the local storage directory from the configuration.
2111 (WebKit::WebContext::setLocalStorageDirectory): Deleted.
2112 (WebKit::WebContext::localStorageDirectory): Deleted.
2113 These are no longer needed.
2115 * UIProcess/mac/WebContextMac.mm:
2116 (WebKit::WebContext::platformDefaultLocalStorageDirectory):
2117 This should be a static member function.
2119 2014-05-12 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
2121 Typo fix in generate-forwarding-headers
2122 https://bugs.webkit.org/show_bug.cgi?id=132820
2124 Reviewed by Anders Carlsson.
2126 * Scripts/generate-forwarding-headers.pl:
2127 (collectFrameworkHeaderPaths):
2129 2014-05-12 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
2131 [EFL] TLSErrors do not cause page load to fail when not ignored
2132 https://bugs.webkit.org/show_bug.cgi?id=131104
2134 Reviewed by Gyuyoung Kim.
2136 Added EFL unit test for the bug https://bugs.webkit.org/show_bug.cgi?id=121548
2138 * UIProcess/API/efl/tests/test_ewk2_ssl.cpp: Added new test: ewk_ssl_bad_cert_redirect_https_to_http
2140 2014-05-11 Gordon Sheridan <gordon_sheridan@apple.com>
2142 Expose a function to copy favicon data without image conversion.
2143 https://bugs.webkit.org/show_bug.cgi?id=132805
2145 Reviewed by Darin Adler.
2147 * UIProcess/API/C/WKIconDatabase.cpp:
2148 (WKIconDatabaseCopyIconDataForPageURL):
2149 Add a function to copy the data from the image of a favicon for an associated page url.
2151 * UIProcess/API/C/WKIconDatabase.h:
2152 Declare WKIconDatabaseCopyIconDataForPageURL.
2154 2014-05-11 Seongjun Kim <isAir@company100.com>
2156 REGRESSION(r168603): [GTK] Build broken.
2157 https://bugs.webkit.org/show_bug.cgi?id=132810
2159 Reviewed by Carlos Garcia Campos.
2161 * UIProcess/API/gtk/WebKitWebContext.cpp:
2162 (createDefaultWebContext):
2163 Construct a WebContextConfiguration object and pass it to WebContext::create.
2165 2014-05-11 Anders Carlsson <andersca@apple.com>
2167 Remove local storage directory and sandbox extension from WebProcessCreationParameters
2168 https://bugs.webkit.org/show_bug.cgi?id=132808
2170 Reviewed by Beth Dakin.
2172 * Shared/WebProcessCreationParameters.cpp:
2173 (WebKit::WebProcessCreationParameters::encode):
2174 (WebKit::WebProcessCreationParameters::decode):
2175 * Shared/WebProcessCreationParameters.h:
2176 * UIProcess/WebContext.cpp:
2177 (WebKit::WebContext::createNewWebProcess):
2178 * WebProcess/cocoa/WebProcessCocoa.mm:
2179 (WebKit::WebProcess::platformInitializeWebProcess):
2181 2014-05-11 Jaehun Lim <ljaehun.lim@samsung.com>
2183 Unreviewed, CMake build fix after r168603
2185 Add APIContextConfiguration.cpp and WKContextConfigurationRef.cpp to the source list.
2189 2014-05-11 Anders Carlsson <andersca@apple.com>
2191 Add a WKContextConfigurationRef object and make the injected bundle path part of the configuration
2192 https://bugs.webkit.org/show_bug.cgi?id=132806
2193 <rdar://problem/16830143>
2195 Reviewed by Beth Dakin.
2197 Many setters on WKContextRef really only make sense to set early on, so move to a pattern where we create a
2198 configuration object, a WKContextConfiguration which WKContexts can be created from. Add the injected bundle path
2199 as a configuration property. More setters will follow.
2201 * Shared/API/c/WKBase.h:
2202 Add WKContextConfigurationRef.
2204 * Shared/APIObject.h:
2205 Add ContextConfiguration enum declaration.
2207 * UIProcess/API/C/WKAPICast.h:
2208 Handle WKContextConfigurationRef.
2210 * UIProcess/API/C/WKContext.cpp:
2212 Create an empty WKContextConfigurationRef object and pass it to WKContextCreateWithConfiguration.
2214 (WKContextCreateWithInjectedBundlePath):
2215 Create a WKContextConfigurationRef object, set its bundle path and pass the configuration to WKContextCreateWithConfiguration.
2217 (WKContextCreateWithConfiguration):
2218 Convert the WKContextConfigurationRef object to a WebContextConfiguration and pass it to WebContext::create.
2220 * UIProcess/API/C/WKContext.h:
2221 Add WKContextCreateWithConfiguration.
2223 * UIProcess/API/C/WKContextConfigurationRef.cpp: Added.
2224 (WKContextConfigurationCreate):
2225 Create an API::ContextConfiguration object.
2227 (WKContextConfigurationCopyInjectedBundlePath):
2228 Return the injected bundle path.
2230 (WKContextConfigurationSetInjectedBundlePath):
2231 Set the injected bundle path.
2233 * UIProcess/API/C/WKContextConfigurationRef.h: Added.
2236 * UIProcess/API/Cocoa/WKProcessGroup.mm:
2237 (-[WKProcessGroup initWithInjectedBundleURL:]):
2238 Construct a WebContextConfiguration object and pass it to WebContext::Create.
2240 * UIProcess/API/Cocoa/WKProcessPool.mm:
2241 (-[WKProcessPool _initWithConfiguration:]):
2242 Construct a WebContextConfiguration object and pass it to WebContext::Create.
2244 * UIProcess/APIContextConfiguration.cpp: Added.
2245 New API::ContextConfiguration object.
2247 (API::ContextConfiguration::webContextConfiguration):
2248 Construct a WebContextConfiguration struct from our current configuration.
2250 * UIProcess/APIContextConfiguration.h: Added.
2252 * UIProcess/WebContext.cpp:
2253 (WebKit::WebContext::create):
2254 Pass the WebContextConfiguration to the constructor.
2256 (WebKit::WebContext::WebContext):
2257 Set the injected bundle path from the WebContextConfiguration object.
2259 * UIProcess/WebContext.h:
2260 Change the WebContext constructor and create function to take a WebContextConfiguration object.
2262 * WebKit2.xcodeproj/project.pbxproj:
2265 2014-05-10 Csaba Osztrogonác <ossy@webkit.org>
2267 [WK2] URTBF after r168585.
2269 * Platform/IPC/Connection.h:
2270 * Shared/ChildProcessProxy.cpp:
2271 (WebKit::ChildProcessProxy::terminate):
2273 2014-05-10 Tim Horton <timothy_horton@apple.com>
2275 [WKWebView _updateScrollViewBackground] churns UI-and-CGColors while repainting
2276 https://bugs.webkit.org/show_bug.cgi?id=132793
2277 <rdar://problem/16877870>
2279 Reviewed by Dan Bernstein.
2281 * UIProcess/API/Cocoa/WKWebView.mm:
2282 (-[WKWebView _updateScrollViewBackground]):
2283 Don't bypass the cache and make a copy of the CGColor just to set its alpha.
2284 Cache the last color and don't bother creating a UIColor nor updating the
2285 color on our views if it hasn't changed.
2287 2014-05-10 Tim Horton <timothy_horton@apple.com>
2289 Implement -forwardingTargetForSelector on WKScrollViewDelegateForwarder
2290 https://bugs.webkit.org/show_bug.cgi?id=132790
2291 <rdar://problem/16877802>
2293 Reviewed by Dan Bernstein.
2295 * UIProcess/ios/WKScrollView.mm:
2296 (-[WKScrollViewDelegateForwarder forwardingTargetForSelector:]):
2297 If only one of the delegates will respond to a selector,
2298 we can return it from forwardingTargetForSelector: to avoid
2299 NSInvocation overhead.
2301 2014-05-10 Dan Bernstein <mitz@apple.com>
2303 [Mac] Some targets that link or soft-link WebKit.framework don't depend on it
2304 https://bugs.webkit.org/show_bug.cgi?id=132776
2306 Reviewed by Darin Adler.
2308 * WebKit2.xcodeproj/project.pbxproj:
2310 2014-05-10 Ryuan Choi <ryuan.choi@samsung.com>
2312 [EFL][WK2] Move the ownership of EwkSettings from EwkView to EwkPageGroup
2313 https://bugs.webkit.org/show_bug.cgi?id=132771
2315 Reviewed by Gyuyoung Kim.
2317 Moved ownership of EwkSettings from EwkView to EwkPageGroup.
2319 * UIProcess/API/efl/EwkView.cpp:
2321 * UIProcess/API/efl/EwkView.h:
2322 (EwkView::settings): Deleted.
2323 * UIProcess/API/efl/ewk_page_group.cpp:
2324 (EwkPageGroup::EwkPageGroup):
2325 * UIProcess/API/efl/ewk_page_group_private.h:
2326 (EwkPageGroup::settings):
2327 * UIProcess/API/efl/ewk_settings_private.h:
2328 * UIProcess/API/efl/ewk_view.cpp:
2329 (ewk_view_settings_get):
2331 2014-05-10 Tim Horton <timothy_horton@apple.com>
2333 [iOS WebKit2] REGRESSION (r168493): Canvasmark 2013 benchmark always hits the RELEASE_ASSERT in RemoteLayerTreeDrawingArea::flushLayers()
2334 https://bugs.webkit.org/show_bug.cgi?id=132783
2335 <rdar://problem/16877326>
2337 Reviewed by Anders Carlsson.
2339 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2340 (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
2341 There's a race window between the BackingStoreFlusher sending the new
2342 layer tree to the UI process and updating m_hasFlushed where we can
2343 get a reply back in (on the Web process main thread) from the UI process
2344 that we committed the new layer tree (didUpdate).
2345 This will cause the RELEASE_ASSERT in flushLayers() to fire incorrectly.
2346 Since the RELEASE_ASSERT is there only to avoid painting garbage, move
2347 our code to set m_hasFlushed=true to after we finish calling CGContextFlush
2348 on all of the contexts, instead of after we send the layer tree commit message,
2349 which will remove the race entirely.
2351 2014-05-10 Anders Carlsson <andersca@apple.com>
2353 ASSERTION FAILED: !m_connection under RunJavaScriptAlert
2354 https://bugs.webkit.org/show_bug.cgi?id=132792
2355 <rdar://problem/16691138>
2357 Reviewed by Dan Bernstein.
2359 Detect if someone implementing a UI delegate method with a completion handler never calls the completion
2360 handler and raise an exception instead of asserting.
2362 * UIProcess/Cocoa/UIDelegate.mm:
2363 (WebKit::CompletionHandlerCallChecker::create):
2364 (WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker):
2365 (WebKit::CompletionHandlerCallChecker::didCallCompletionHandler):
2366 (WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker):
2367 (WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod):
2368 (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
2369 (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
2370 (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
2372 2014-05-10 Anders Carlsson <andersca@apple.com>
2374 Use xpc_connection_kill for killing child processes where appropriate
2375 https://bugs.webkit.org/show_bug.cgi?id=132788
2376 <rdar://problem/16664185>
2378 Reviewed by Sam Weinig.
2380 * Platform/IPC/Connection.h:
2381 * Platform/IPC/mac/ConnectionMac.mm:
2382 (IPC::Connection::kill):
2383 * Platform/IPC/mac/XPCPtr.h:
2384 (IPC::XPCPtr::operator bool):
2385 * Shared/ChildProcessProxy.cpp:
2386 (WebKit::ChildProcessProxy::terminate):
2388 2014-05-10 Anders Carlsson <andersca@apple.com>
2390 WebKit2 is leaking an xpc_connection per web process it creates
2391 https://bugs.webkit.org/show_bug.cgi?id=132785
2392 <rdar://problem/14912160>
2394 Reviewed by Sam Weinig.
2396 Introduce an IPC::XPCPtr smart pointer class and use it for XPC connections inside Connection::Identifier and Connection itself.
2398 Make sure we always adopt any connections that are created.
2400 * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
2401 (DatabaseServiceInitializer):
2402 * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
2403 (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
2404 (NetworkServiceInitializer):
2405 * Platform/IPC/Connection.h:
2406 (IPC::Connection::Identifier::Identifier):
2407 (IPC::Connection::xpcConnection):
2408 * Platform/IPC/mac/ConnectionMac.mm:
2409 (IPC::Connection::platformInvalidate):
2410 (IPC::Connection::platformInitialize):
2411 (IPC::Connection::getAuditToken):
2412 * Platform/IPC/mac/XPCPtr.h: Added.
2413 (IPC::XPCPtr::XPCPtr):
2414 (IPC::XPCPtr::~XPCPtr):
2416 (IPC::XPCPtr::operator!):
2417 (IPC::XPCPtr::operator=):
2419 * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
2420 (WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
2421 (PluginServiceInitializer):
2422 * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm:
2423 (WebKit::BootstrapMain):
2424 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
2425 (WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
2426 (WebKit::XPCServiceInitializer):
2427 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
2428 (WebKit::XPCServiceInitializerDelegate::hasEntitlement):
2429 (WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
2430 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
2431 (WebKit::XPCServiceEventHandler):
2432 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
2433 (WebKit::XPCServiceEventHandler):
2434 * UIProcess/Launcher/ProcessLauncher.cpp:
2435 (WebKit::ProcessLauncher::didFinishLaunchingProcess):
2436 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2437 (WebKit::connectToService):
2438 * WebKit2.xcodeproj/project.pbxproj:
2439 * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
2440 (WebContentServiceInitializer):
2442 2014-05-10 Anders Carlsson <andersca@apple.com>
2444 Simplify createDataAvailableSource
2445 https://bugs.webkit.org/show_bug.cgi?id=132782
2446 <rdar://problem/16815202>
2448 Reviewed by Sam Weinig.
2450 * Platform/IPC/mac/ConnectionMac.mm: Renamed from Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp.
2451 Rename to make this Objective-C++ so we get the lambda-to-block conversion.
2453 (IPC::createDataAvailableSource):
2454 Make this a function template and just pass the function directly to dispatch_source_set_event_handler.
2456 (IPC::Connection::open):
2457 Use lambdas instead of WTF::bind, so we'll make sure the connection is kept alive.
2459 * WebKit2.xcodeproj/project.pbxproj:
2460 Update for ConnectionMac.cpp to ConnectionMac.mm rename.
2462 2014-05-10 Anders Carlsson <andersca@apple.com>
2466 Reviewed by Darin Adler.
2468 * UIProcess/API/Cocoa/WKNavigationResponse.h:
2469 * UIProcess/API/Cocoa/WKNavigationResponse.mm:
2470 (-[WKNavigationResponse isForMainFrame]):
2471 Use a slightly better name.
2473 2014-05-10 Anders Carlsson <andersca@apple.com>
2475 Make -[WKNavigationResponse frame] SPI and only expose -[WKNavigationResponse isMainFrame]
2476 https://bugs.webkit.org/show_bug.cgi?id=132781
2477 <rdar://problem/16868319>
2479 Reviewed by Darin Adler.
2481 * UIProcess/API/Cocoa/WKNavigationResponse.h:
2482 * UIProcess/API/Cocoa/WKNavigationResponse.mm:
2483 (-[WKNavigationResponse description]):
2484 (-[WKNavigationResponse isMainFrameNavigation]):
2485 (-[WKNavigationResponse _frame]):
2486 (-[WKNavigationResponse frame]): Deleted.
2487 (-[WKNavigationResponse setFrame:]): Deleted.
2488 * UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
2489 * UIProcess/API/Cocoa/WKNavigationResponsePrivate.h: Added.
2490 * UIProcess/Cocoa/NavigationState.mm:
2491 (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
2492 * WebKit2.xcodeproj/project.pbxproj:
2494 2014-05-09 Dan Bernstein <mitz@apple.com>
2496 [Cocoa] Remove a deprecated bundle form delegate method now that no one implements it
2497 https://bugs.webkit.org/show_bug.cgi?id=132769
2499 Reviewed by Sam Weinig.
2501 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2502 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
2504 2014-05-09 Benjamin Poulain <bpoulain@apple.com>
2506 [iOS][WK2] Fix bugs exposed by r168556
2507 https://bugs.webkit.org/show_bug.cgi?id=132768
2509 Reviewed by Ryosuke Niwa.
2511 Fix two bugs exposed by r168556.
2512 1) We were only changing the page scale factor when the scale was not adjusted by live
2513 resize. The idea was that the scale would either be the same (responsive content)
2514 or that it would be defined by the next viewContentRectUpdate.
2516 Now that we also send resize and scroll events, we must always update the scale since
2517 it affects some APIs observable from JavaScript (like scrolling bounds).
2519 2) Internally, Page's scaleFactor is stored as a float and not double. The rounding error
2520 were causing us to send DynamicViewportUpdateChangedTarget() in cases were there is no change
2523 * WebProcess/WebPage/ios/WebPageIOS.mm:
2524 (WebKit::withinEpsilon):
2525 (WebKit::WebPage::dynamicViewportSizeUpdate):
2527 2014-05-09 Ryuan Choi <ryuan.choi@samsung.com>
2529 [EFL][WK2] Close icondatabase when EwkFaviconDatabase is destroyed
2530 https://bugs.webkit.org/show_bug.cgi?id=132767
2532 Reviewed by Gyuyoung Kim.
2534 IconDatabase should be closed explicitly.
2536 * UIProcess/API/efl/ewk_favicon_database.cpp:
2537 (EwkFaviconDatabase::~EwkFaviconDatabase):
2539 2014-05-09 Anders Carlsson <andersca@apple.com>
2543 * mac/MigrateHeadersToWebKit2.make:
2544 Don't migrate the WKPreferences.h header, WebKit2 provides its own header.
2546 2014-05-09 Benjamin Poulain <benjamin@webkit.org>
2548 [iOS][WK2] Reset the scroll position on the first frame after didCommitLoad
2549 https://bugs.webkit.org/show_bug.cgi?id=132765
2551 Reviewed by Tim Horton.
2553 Since WebCore does not update our scroll view on load, we need to do that ourself.
2555 In case where we need to restore the state from the history, RemoteLayerTreeDrawingAreaProxy
2556 will always invoke the scrolling after didCommitLayerTree() (since r167916).
2557 Consequently, it is now safe again to reset the scroll position ourself on the first frame.
2559 * UIProcess/API/Cocoa/WKWebView.mm:
2560 (-[WKWebView _didCommitLoadForMainFrame]):
2561 (-[WKWebView _didCommitLayerTree:WebKit::]):
2562 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2563 * UIProcess/ios/WKContentView.mm:
2564 (-[WKContentView _didCommitLoadForMainFrame]):
2566 2014-05-09 Anders Carlsson <andersca@apple.com>
2568 Update availability macros
2569 https://bugs.webkit.org/show_bug.cgi?id=132763
2570 <rdar://problem/15311800>
2572 Reviewed by Dan Bernstein.
2574 * Configurations/WebKit.xcconfig:
2575 * Shared/API/Cocoa/WKBrowsingContextHandle.h:
2576 * Shared/API/Cocoa/WKFoundation.h:
2577 * Shared/API/Cocoa/_WKFrameHandle.h:
2578 * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
2579 * Shared/API/Cocoa/_WKRemoteObjectRegistry.h:
2580 * UIProcess/API/Cocoa/WKBackForwardList.h:
2581 * UIProcess/API/Cocoa/WKBackForwardListItem.h:
2582 * UIProcess/API/Cocoa/WKBackForwardListPrivate.h:
2583 * UIProcess/API/Cocoa/WKBrowsingContextController.h:
2584 * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
2585 * UIProcess/API/Cocoa/WKConnection.h:
2586 * UIProcess/API/Cocoa/WKFrameInfo.h:
2587 * UIProcess/API/Cocoa/WKNavigation.h:
2588 * UIProcess/API/Cocoa/WKNavigationAction.h:
2590 * UIProcess/API/Cocoa/WKNavigationData.h:
2591 * UIProcess/API/Cocoa/WKNavigationDelegate.h:
2593 * UIProcess/API/Cocoa/WKNavigationResponse.h:
2594 * UIProcess/API/Cocoa/WKPreferences.h:
2595 * UIProcess/API/Cocoa/WKProcessGroup.h:
2596 * UIProcess/API/Cocoa/WKProcessPool.h:
2597 * UIProcess/API/Cocoa/WKScriptMessage.h:
2598 * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
2599 * UIProcess/API/Cocoa/WKTypeRefWrapper.h:
2600 * UIProcess/API/Cocoa/WKUIDelegate.h:
2601 * UIProcess/API/Cocoa/WKUserContentController.h:
2602 * UIProcess/API/Cocoa/WKWebView.h:
2603 * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2604 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2607 * UIProcess/API/Cocoa/WKWindowFeatures.h:
2608 * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
2610 * UIProcess/API/Cocoa/_WKDownload.h:
2611 * UIProcess/API/Cocoa/_WKElementAction.h:
2613 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
2614 * UIProcess/API/Cocoa/_WKScriptWorld.h:
2615 * UIProcess/API/Cocoa/_WKThumbnailView.h:
2616 * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
2617 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2618 * WebKit2.xcodeproj/project.pbxproj:
2619 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
2620 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.h:
2621 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
2622 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h:
2623 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
2624 * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
2625 * WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
2626 * WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
2627 * WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
2628 * WebProcess/InjectedBundle/API/mac/WKDOMText.h:
2629 * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h:
2630 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
2631 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
2632 * mac/rewrite-availability-macros.sh: Added.
2634 2014-05-09 Joseph Pecoraro <pecoraro@apple.com>
2636 Web Inspector: Allow Remote Inspector to entitlement check UIProcess through WebProcess
2637 https://bugs.webkit.org/show_bug.cgi?id=132409
2639 Reviewed by Timothy Hatcher.
2641 * WebProcess/WebCoreSupport/WebInspectorClient.h:
2642 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2643 (WebKit::WebInspectorClient::parentProcessIdentifier): Deleted.
2644 pid per debuggable is no longer needed.
2646 * WebProcess/WebProcess.cpp:
2647 (WebKit::WebProcess::initializeWebProcess):
2648 Immediately pass the parent process pid and audit_token on
2649 to the RemoteInspector singleton when the process is created
2650 so that it can be sent to webinspectord.
2652 2014-05-09 Enrica Casucci <enrica@apple.com>
2654 REGRESSION (WebKit2): Tapping in search field at wikipedia.org doesn’t bring up the keyboard.
2655 https://bugs.webkit.org/show_bug.cgi?id=132761
2656 <rdar://problem/16857491>
2658 Reviewed by Benjamin Poulain.
2660 The interactionAssistant accessor should never create an instance of
2661 UIWKTextInteractionAssistant, but simply return the value of _textInteractionAssistant.
2662 The text interaction assistant should only be created when needed so that the rest of
2663 the code could reliably check if we are interacting with text or not.
2665 * UIProcess/ios/WKContentViewInteraction.mm:
2666 (-[WKContentView interactionAssistant]):
2668 2014-05-09 Simon Fraser <simon.fraser@apple.com>
2670 Fix some issues with scrolling tree logging
2671 https://bugs.webkit.org/show_bug.cgi?id=132762
2673 Reviewed by Tim Horton.
2675 Only dump viewport constraints when they change, and dump the primary layer on
2678 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2679 (WebKit::RemoteScrollingTreeTextStream::dump): Dump the primary layer.
2681 2014-05-09 Simon Fraser <simon.fraser@apple.com>
2683 [iOS WK2] Fixed elements can go outside the document on pinching
2684 https://bugs.webkit.org/show_bug.cgi?id=132759
2685 <rdar://problem/16870835>
2687 Reviewed by Benjamin Poulain.
2689 Constrain the rect used to position fixed position objects when pinching (when
2690 the scale goes below the minimumScale). Do so in such a way that there's a smooth
2691 transition between rubber-banding and pinching.
2693 * UIProcess/API/Cocoa/WKWebView.mm:
2694 (-[WKWebView _updateScrollViewBackground]): Use a nicer form for std::max<>.
2695 (-[WKWebView _updateVisibleContentRects]): Pass the minimum scale.
2696 * UIProcess/API/ios/WKViewIOS.mm:
2697 (-[WKView _updateVisibleContentRects]): Ditto.
2698 * UIProcess/ios/WKContentView.h:
2699 * UIProcess/ios/WKContentView.mm:
2700 (adjustedUnexposedEdge): Helper to adjust the left/top.
2701 (adjustedUnexposedMaxEdge): Helper to adjust the right/bottom.
2702 (fixedPositionRectFromExposedRect):
2703 (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:minimumScale:inStableState:]):
2704 (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]): Deleted.
2706 2014-05-09 Zalan Bujtas <zalan@apple.com>
2708 Subpixel rendering[iOS]: Top bar on apple.com/support jiggles when the swoosh animates.
2709 https://bugs.webkit.org/show_bug.cgi?id=132750
2710 <rdar://problem/16803281>
2712 Reviewed by Simon Fraser.
2714 This patch ensures that GraphicsLayer and RemoteLayerBackingStore have the same dimensions.
2716 Remove integral enclosing when we set the size on RemoteLayerBackingStore. It makes the layer's size
2717 different from the backingstore when the passed value is fractional.
2718 We scale and integral round this value to size the shareable bitmap later. Rounding ensures that
2719 the final size value matches what we calculated at GraphicsLayerCA::updateGeometry()
2721 Currently not testable.
2723 * Shared/mac/RemoteLayerBackingStore.h:
2724 (WebKit::RemoteLayerBackingStore::size):
2725 * Shared/mac/RemoteLayerBackingStore.mm:
2726 (WebKit::RemoteLayerBackingStore::ensureBackingStore):
2727 (WebKit::RemoteLayerBackingStore::setNeedsDisplay): use enclosing here to ensure we cover the entire backing store.
2728 (WebKit::RemoteLayerBackingStore::display):
2729 (WebKit::RemoteLayerBackingStore::drawInContext):
2730 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2731 (WebKit::PlatformCALayerRemote::updateBackingStore):
2733 2014-05-09 Benjamin Poulain <bpoulain@apple.com>
2735 [iOS][WK2] Set up the resize events
2736 https://bugs.webkit.org/show_bug.cgi?id=132726
2738 Reviewed by Darin Adler and Simon Fraser.
2740 Wire the UI Process updates to FrameView to send the resize events appropriately.
2742 * Shared/VisibleContentRectUpdateInfo.cpp:
2743 (WebKit::VisibleContentRectUpdateInfo::encode):
2744 (WebKit::VisibleContentRectUpdateInfo::decode):
2745 * Shared/VisibleContentRectUpdateInfo.h:
2746 (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
2747 (WebKit::VisibleContentRectUpdateInfo::isChangingObscuredInsetsInteractively):
2748 * UIProcess/API/Cocoa/WKWebView.mm:
2749 (-[WKWebView _updateVisibleContentRects]):
2750 * UIProcess/ios/WKContentView.h:
2751 * UIProcess/ios/WKContentView.mm:
2752 (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:isChangingObscuredInsetsInteractively:]):
2753 (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]): Deleted.
2754 Pass down the status of the content insets with the view update to main frame's FrameView
2757 * WebProcess/WebPage/ios/WebPageIOS.mm:
2758 (WebKit::WebPage::dynamicViewportSizeUpdate):
2759 On live resize, send the resize event, then the scroll events (if needed).
2761 Since JavaScript now gets two chances to change the content (resize event + scroll event),
2762 we query the actual scroll offset and scale for the DynamicViewportUpdateChangedTarget.
2764 (WebKit::WebPage::viewportConfigurationChanged):
2765 Define the custom size on load before the app gets a chance to send different rects.
2766 If for some reason the app changes its mind about the insets, the content will be notified with a resize event.
2768 (WebKit::WebPage::updateVisibleContentRects):
2769 Send the resize event when the insets are stable.
2770 Also move the scroll event after the resize event for consistency with live resize.
2772 2014-05-09 Benjamin Poulain <benjamin@webkit.org>
2774 [iOS] Switch geolocation to an explicit authorization query model
2775 https://bugs.webkit.org/show_bug.cgi?id=132717
2777 Reviewed by Sam Weinig.
2779 Switch WKGeolocationProviderIOS to use the new API of WebGeolocationCoreLocationProvider.
2781 On WebKit2, the whole logic to track requesters is in WebGeolocationManagerProxy.
2783 Without the warmup sequence, WKGeolocationProviderIOS becomes really dumb: it just provides
2784 the two step authorization and forward the start/stop messages to the WebGeolocationCoreLocationProvider.
2786 * UIProcess/ios/WKGeolocationProviderIOS.mm:
2787 (-[WKGeolocationProviderIOS _stopUpdating]):
2788 (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]):
2789 (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
2790 (-[WKGeolocationProviderIOS geolocationAuthorizationDenied]):
2791 (-[WKWebAllowDenyPolicyListener initWithPermissionRequestProxy:]):
2792 (-[WKWebAllowDenyPolicyListener deny]):
2793 (-[WKGeolocationProviderIOS _stopUpdatingIfPossible]): Deleted.
2794 (-[WKGeolocationProviderIOS geolocationDelegateStarted]): Deleted.
2795 (-[WKGeolocationProviderIOS geolocationDelegateUnableToStart]): Deleted.
2796 (-[WKGeolocationProviderIOS permissionDenied:]): Deleted.
2797 (-[WKWebAllowDenyPolicyListener initWithProvider:permissionRequestProxy:]): Deleted.
2799 2014-05-09 Gordon Sheridan <gordon_sheridan@apple.com>
2801 Expose functions necessary for copying favicon between IconDatabases.
2802 https://bugs.webkit.org/show_bug.cgi?id=132709
2804 Reviewed by Brady Eidson.
2806 * UIProcess/API/C/WKIconDatabase.cpp:
2807 (WKIconDatabaseSetIconURLForPageURL):
2808 Add C API wrapper for WebIconDatabase::setIconURLForPageURL().
2810 (WKIconDatabaseCopyIconURLForPageURL):
2811 Add C API wrapper for WebIconDatabase::synchronousIconURLForPageURL().
2813 * UIProcess/API/C/WKIconDatabase.h:
2814 Added declarations for wrapper functions above.
2816 2014-05-09 Tim Horton <timothy_horton@apple.com>
2818 Fix the iOS DRT build by including CG headers in WKPreferences.h, which uses CGFloat.
2820 * UIProcess/API/Cocoa/WKPreferences.h:
2822 2014-05-09 Brent Fulgham <bfulgham@apple.com>
2824 {TelephoneNumber, Selection}ControllerMac implementations dosn't handle tiled drawing properly.
2825 https://bugs.webkit.org/show_bug.cgi?id=132746
2826 <rdar://problem/16789588>
2828 Reviewed by Tim Horton.
2830 Don't try to draw the detector UI if no part of the selection bounds are inside
2831 the current tile. Don't limit the detector UI to the bounds of this tile, or else
2832 it will attempt to squeeze itself into the possibly small space available. Let it
2833 draw as if it had the whole screen, and rely on the context clip region to
2836 * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
2837 (WebKit::TelephoneNumberOverlayController::drawRect): Correct tiled drawing behavior.
2838 * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
2839 (WebKit::SelectionOverlayController::drawRect): Ditto.
2841 2014-05-09 Anders Carlsson <andersca@apple.com>
2843 Production build fix.
2845 Reviewed by Dan Bernstein.
2847 * Configurations/BaseTarget.xcconfig:
2848 Add SDKROOT in front of UMBRELLA_FRAMEWORKS_DIR for OS X Production builds.
2850 2014-05-09 Tim Horton <timothy_horton@apple.com>
2852 [iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
2853 https://bugs.webkit.org/show_bug.cgi?id=132667
2854 <rdar://problem/15349483>
2856 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2857 (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
2858 Address a missed review comment about a missing std::move.
2860 2014-05-09 Anders Carlsson <andersca@apple.com>
2862 Rename WebKit2.framework to WebKit.framework
2863 https://bugs.webkit.org/show_bug.cgi?id=132743
2864 <rdar://problem/15920046>
2866 Reviewed by Dan Bernstein.
2868 * Configurations/BaseLegacyProcess.xcconfig:
2869 Change INSTALL_PATH to WebKit.framework.
2871 * Configurations/BaseTarget.xcconfig:
2872 Change WEBKIT2_FRAMEWORKS_DIR to WEBKIT_FRAMEWORKS_DIR and add WEBKIT_LEGACY_PRIVATE_HEADERS_DIR.
2874 * Configurations/BaseXPCService.xcconfig:
2875 Change WebKit2.framework to WebKit.framework.
2877 * Configurations/WebKit.xcconfig: Copied from Source/WebKit2/Configurations/WebKit2.xcconfig.
2878 New configuration file for WebKit.framework. Re-export WebKitLegacy.framework.
2880 * Configurations/WebKit2.xcconfig:
2881 New configuration file for the WebKit2 shim framework. Re-export WebKit.framework.
2883 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
2884 Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
2886 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
2887 Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
2889 * Shared/API/Cocoa/WKBrowsingContextHandle.h:
2890 * Shared/API/Cocoa/WKRenderingProgressEvents.h:
2891 Update header imports.
2893 * Shared/API/Cocoa/WebKit.h: Renamed from Source/WebKit/mac/WebKitLegacy/WebKit.h.
2894 New umbrella header. Imports the modern WebKit API as well as the legacy API.
2896 * Shared/API/Cocoa/WebKit.m: Renamed from Source/WebKit/mac/WebKitLegacy/WebKit.m.
2897 Export install name symbols on iOS.
2899 * Shared/API/Cocoa/WebKitPrivate.h: Renamed from Source/WebKit/mac/WebKitLegacy/WebKitPrivate.h.
2900 New umbrella SPI header. Imports the modern WebKit SPI.
2903 Change WebKit2 includes to WebKit includes.
2905 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
2906 (WebKit::XPCServiceEventHandler):
2907 Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.
2909 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
2910 (WebKit::XPCServiceEventHandler):
2911 Change bundle identifier from com.apple.WebKit2 to com.apple.WebKit.
2913 * UIProcess/API/Cocoa/WKPreferences.h:
2914 Stop including WKPreferencesRef.h, we have a WebKit2 header that handles this workaround for us now.
2916 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2917 (WebKit::addDYLDEnvironmentAdditions):
2918 (WebKit::connectToService):
2919 (WebKit::createProcess):
2920 (WebKit::ProcessLauncher::launchProcess):
2921 Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.
2923 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2924 (WebKit::PluginProcessProxy::createPropertyListFile):
2925 Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.
2927 * UIProcess/mac/WebContextMac.mm:
2928 (WebKit::WebContext::platformDefaultDiskCacheDirectory):
2929 Change bundle identifier from com.apple.WebKit2 to com.apple.WebKit.
2931 * WebKit2.xcodeproj/project.pbxproj:
2932 Copy the python message scripts to the WebKit2 framework.
2933 Rename WebKit2.framework to WebKit.framework everywhere.
2934 Add a new WebKit2 target that builds the shim WebKit2 framework.
2935 Move the build script phase that migrates WebKitLegacy headers to WebKit.
2936 Add a new build script phase that adds forwarding headers from WebKit2 to WebKit.
2938 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
2939 Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
2941 * mac/MigrateHeadersFromWebKitLegacy.make: Renamed from Source/WebKit/mac/WebKitLegacy/MigrateHeadersFromWebKitLegacy.make.
2942 Move the makefile that migrates WebKitLegacy headers here. On OS X, it copies the header contents and on iOS it creates forarding headers.
2944 * mac/MigrateHeadersToWebKit2.make:
2945 New makefile that creates forwarding headers for the WebKit2 shim framework.
2947 * mac/WKPreferences.h: Added.
2948 Add WebKit2/WKPreferences.h header that imports WebKit2/WKPreferencesref.h.
2951 Skeleton for the WebKit2 shim framework.
2953 * mac/Info-WebKit2.plist: Added.
2954 New Info.plist file for the WebKit2 shim framework.
2956 2014-05-09 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
2958 [WK2] Make generate-forwarding-headers.pl work after WebKit2.framework -> WebKit.framework rename
2959 https://bugs.webkit.org/show_bug.cgi?id=132733
2961 Reviewed by Csaba Osztrogonác.
2963 Rewrite framework's directory name to WebKit2 if the framework is WebKit (former WebKit2)
2964 and then collect headers inside the fixed framework directory and generate forwarding
2965 headers point to the fixed directory.
2967 Leave WebKit2 in @frameworks list during the transition. It can be removed
2968 once <WebKit2/foo.h> style includes were renamed to <WebKit/foo.h> everywhere.
2970 * Scripts/generate-forwarding-headers.pl:
2971 (collectFameworkHeaderPaths):
2972 (createForwardingHeadersForFramework):
2974 2014-05-08 Alexey Proskuryakov <ap@apple.com>
2976 Automatically zip document bundles used via File API
2977 https://bugs.webkit.org/show_bug.cgi?id=132713
2978 <rdar://problem/13397892>
2980 Reviewed by Anders Carlsson.
2982 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: NetworkProcess
2983 now uses FileCoordination (WebProcess already had this allowed).
2985 * Shared/BlobDataFileReferenceWithSandboxExtension.h: Added final to the class.
2987 2014-05-08 Simon Fraser <simon.fraser@apple.com>
2989 [iOS WK2] Bottom-relative position:fixed elements are misplaced on page load
2990 https://bugs.webkit.org/show_bug.cgi?id=132719
2991 <rdar://problem/16860837>
2993 Reviewed by Benjamin Poulain.
2995 If we haven't received visible rects from the web process, compute the
2996 fixed position rect, but only after scale has been set.
2998 * WebProcess/WebPage/ios/WebPageIOS.mm:
2999 (WebKit::WebPage::viewportConfigurationChanged):
3001 2014-05-08 Jer Noble <jer.noble@apple.com>
3003 [Mac, iOS] Add source application accounting to AVURLAsset.
3004 https://bugs.webkit.org/show_bug.cgi?id=132637
3006 Reviewed by Eric Carlson.
3008 Add accessor for sourceApplicationIdentifier.
3010 * NetworkProcess/RemoteNetworkingContext.h:
3011 * NetworkProcess/mac/RemoteNetworkingContext.mm:
3012 (WebKit::RemoteNetworkingContext::sourceApplicationIdentifier):
3013 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
3014 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3015 (WebKit::WebFrameNetworkingContext::sourceApplicationIdentifier):
3017 2014-05-08 Tim Horton <timothy_horton@apple.com>
3019 [iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
3020 https://bugs.webkit.org/show_bug.cgi?id=132667
3021 <rdar://problem/16861454>
3023 Rubber-stamped by Simon Fraser.
3025 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3026 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3027 Add a null check to fix a crash on layers which lose backing store.
3029 2014-05-08 Beth Dakin <bdakin@apple.com>
3031 REGRESSION (r168053): Phone number detection boxes are wrong when scrolled
3032 https://bugs.webkit.org/show_bug.cgi?id=132706
3034 <rdar://problem/16787957>
3036 Reviewed by Tim Horton.
3038 We need to paint the boxes in Document coordinates. Range::boundingRect() was
3039 giving us a point that took scroll position into account, and that’s not what we
3040 want. Here we use Range::textQuads() instead so that we can get something in
3041 Document coordinates, and then we need to convert that up to the main Document’s
3043 * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
3044 (WebKit::textQuadsToBoundingRectForRange):
3045 (WebKit::TelephoneNumberOverlayController::drawRect):
3047 The telephone click function wants a point in Window coordinates.
3048 (WebKit::TelephoneNumberOverlayController::mouseEvent):
3050 2014-05-08 Tim Horton <timothy_horton@apple.com>
3052 [iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
3053 https://bugs.webkit.org/show_bug.cgi?id=132667
3054 <rdar://problem/15349483>
3056 Reviewed by Darin Adler.
3058 * Shared/mac/RemoteLayerBackingStore.h:
3059 * Shared/mac/RemoteLayerBackingStore.mm:
3060 (WebKit::RemoteLayerBackingStore::takeFrontContextPendingFlush):
3061 (WebKit::RemoteLayerBackingStore::flush): Deleted.
3062 Add takeFrontContextPendingFlush, which returns the painted-but-not-yet-flushed front context,
3063 and drops our reference to it. This needs to be called on all backing store between paints.
3065 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3066 (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::hasFlushed):
3067 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3068 (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
3069 (WebKit::RemoteLayerTreeDrawingArea::~RemoteLayerTreeDrawingArea):
3070 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3071 (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
3072 (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::BackingStoreFlusher):
3073 (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
3074 (WebKit::flushBackingStoreChangesInTransaction): Deleted.
3075 Flush backing store and send the layer tree commit to the UI process from a dispatch queue.
3076 We will only ever have a single commit in flight at a time, and there's a new
3077 RELEASE_ASSERT to ensure that is the case.
3078 We package up the commit on the main thread; the queue calls CGContextFlush
3079 on all of the newly painted contexts and then tosses the commit over to the UI process.
3080 This is a win in many cases because the Web process main thread can go ahead
3081 and do other non-painting tasks while the queue is blocked on painting.
3083 2014-05-08 Tim Horton <timothy_horton@apple.com>
3085 [wk2] Don't use the XPC-based plugin process for Adobe Reader
3086 https://bugs.webkit.org/show_bug.cgi?id=132701
3087 <rdar://problem/16792692>
3089 Reviewed by Anders Carlsson.
3091 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3092 (WebKit::shouldUseXPC):
3093 Rename the debugging default to a more modern and accurate name.
3094 Don't use XPC for Adobe Reader.
3096 (WebKit::PluginProcessProxy::platformGetLaunchOptions):
3097 Move the check for plugins that need an executable heap into shouldUseXPC.
3099 2014-05-08 Benjamin Poulain <benjamin@webkit.org>
3101 [iOS][WK2] Remove an incorrect assertion on asynchronous touch dispatch
3102 https://bugs.webkit.org/show_bug.cgi?id=132660
3104 Reviewed by Enrica Casucci.
3106 This assertion no longer make sense after r168393. Now the asynchronous behavior is maintained
3107 until the last finger leaves the screen.
3109 * UIProcess/WebPageProxy.cpp:
3110 (WebKit::WebPageProxy::handleTouchEventAsynchronously):
3112 2014-05-08 Alexey Proskuryakov <ap@apple.com>
3114 Make BlobDataFileReference manage its sandbox extension
3115 https://bugs.webkit.org/show_bug.cgi?id=132689
3117 Reviewed by Anders Carlsson.
3120 * PlatformGTK.cmake:
3121 * WebKit2.xcodeproj/project.pbxproj:
3122 Added BlobDataFileReferenceWithSandboxExtension.
3124 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
3125 (WebKit::NetworkBlobRegistry::registerFileBlobURL):
3126 (WebKit::NetworkBlobRegistry::registerBlobURL):
3127 (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
3128 (WebKit::NetworkBlobRegistry::unregisterBlobURL):
3129 (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
3130 (WebKit::NetworkBlobRegistry::filesInBlob):
3131 (WebKit::NetworkBlobRegistry::sandboxExtensions): Deleted.
3132 * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
3133 We no longer track sandbox extensions here. Instead, provide a way to get files
3134 for a blob, which contain extensions and can allow access to themselves.
3136 * NetworkProcess/NetworkResourceLoader.cpp:
3137 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
3138 (WebKit::NetworkResourceLoader::consumeSandboxExtensions):
3139 (WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
3140 * NetworkProcess/NetworkResourceLoader.h:
3141 Allow/revoke access to files in blob, just like we do for explicitly passed extensions.
3143 * Shared/BlobDataFileReferenceWithSandboxExtension.cpp: Added.
3144 (WebKit::BlobDataFileReferenceWithSandboxExtension::BlobDataFileReferenceWithSandboxExtension):
3145 (WebKit::BlobDataFileReferenceWithSandboxExtension::~BlobDataFileReferenceWithSandboxExtension):
3146 (WebKit::BlobDataFileReferenceWithSandboxExtension::prepareForFileAccess):
3147 (WebKit::BlobDataFileReferenceWithSandboxExtension::revokeFileAccess):
3148 * Shared/BlobDataFileReferenceWithSandboxExtension.h: Added.
3149 (WebKit::BlobDataFileReferenceWithSandboxExtension::create):
3150 A subclass of BlobDataFileReference that also contains a sandbox extension. NetworkProcess
3151 always uses it in BlobRegistryImpl.
3153 * WebProcess/FileAPI/BlobRegistryProxy.cpp: (WebKit::BlobRegistryProxy::registerFileBlobURL):
3154 * WebProcess/FileAPI/BlobRegistryProxy.h:
3155 Updated for BlobRegistry interface changes. BlobRegistryProxy doesn't really need
3156 a BlobDataFileReference here, as it only uses a path, but it needs to implement the same interface
3157 as BlobRegistryImpl.
3159 2014-05-08 Brady Eidson <beidson@apple.com>
3161 "shouldKeepCurrentBackForwardListItemInList" API should pass clientInfo to the callback
3162 <rdar://problem/16855357> and https://bugs.webkit.org/show_bug.cgi?id=132692
3164 Reviewed by Tim Horton.
3166 * UIProcess/API/C/WKPage.cpp:
3167 (WKPageSetPageLoaderClient):
3168 * UIProcess/API/C/WKPageLoaderClient.h:
3170 2014-05-08 Antti Koivisto <antti@apple.com>
3172 [iOS WebKit2] Can't activate text fields on Facebook
3173 https://bugs.webkit.org/show_bug.cgi?id=132682
3175 Reviewed by Enrica Casucci.
3177 * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
3178 (WebKit::WebChromeClient::observedContentChange):
3180 Implement content change observer callback.
3182 * WebProcess/WebPage/WebPage.h:
3183 * WebProcess/WebPage/ios/WebPageIOS.mm:
3184 (WebKit::WebPage::handleSyntheticClick):
3186 If the event gets canceled by a potential change (a started short-duration timer)
3187 save the position and node so we can continue later.
3189 (WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver):
3191 If it turns out the observed timer changed nothing continue the click event.
3193 (WebKit::WebPage::completeSyntheticClick):
3195 Factored click event dispatch part of handleSyntheticClick here.
3197 2014-05-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3199 [CoordinatedGraphics][WK2] Scale factor and scroll position is not being restored properly in a back/forward load
3200 https://bugs.webkit.org/show_bug.cgi?id=126022
3202 Reviewed by Benjamin Poulain.
3204 Original author : Thiago de Barros Lacerda, and finished by Gyuyoung Kim.
3206 When user is navigating back/forward to a page that has been scrolled and/or scaled, that page must be shown
3207 with its last scroll position and scale factor. However, when fixed layout was enabled with CoordinatedGraphics
3208 and TILED_BACKING_STORE, Page::setPageScaleFactor() doesn't send previous scroll position since r165652 and r165913.
3210 This patch allows the Page::setPageScaleFactor() send stored position to WK2 implementation.
3212 * UIProcess/CoordinatedGraphics/WebView.cpp:
3213 (WebKit::WebView::didCommitLoadForMainFrame):
3215 2014-05-07 Simon Fraser <simon.fraser@apple.com>
3217 Put a better version of the assertion back, and add one when we ensureBackingStore.
3219 Reviewed by Tim Horton.
3221 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3222 (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
3223 (WebKit::PlatformCALayerRemote::ensureBackingStore):
3225 2014-05-07 Simon Fraser <simon.fraser@apple.com>
3227 This assertion was wrong and fired every time. Remove it.
3229 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3230 (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
3232 2014-05-07 Enrica Casucci <enrica@apple.com>
3234 WK2: Programatic scroll requests during scroll or zoom animation to reveal focused element are ignored.
3235 https://bugs.webkit.org/show_bug.cgi?id=132657
3236 <rdar://problem/16468462>
3238 Reviewed by Benjamin Poulain.
3240 With the scrolling model we use on iOS, a programatic scroll
3241 request can be received while we are still animating to reveal
3242 the focused input element. Changing the scroll offset while animating
3243 leads to unpredictable results. We now cancel the animation if
3244 a programatic scroll request is received.
3246 * UIProcess/API/Cocoa/WKWebView.mm:
3247 (-[WKWebView _scrollToContentOffset:WebCore::]):
3248 * WebProcess/WebPage/ios/WebPageIOS.mm:
3249 (WebKit::WebPage::getAssistedNodeInformation):
3251 2014-05-07 Simon Fraser <simon.fraser@apple.com>
3253 [iOS WK2] Speculative fix for crash in PlatformCALayerRemote::recursiveBuildTransaction
3254 https://bugs.webkit.org/show_bug.cgi?id=132666
3256 Reviewed by Tim Horton.
3258 Crash reports suggest that owner() can be null. Assert and protect
3261 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3262 (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
3264 2014-05-07 Dan Bernstein <mitz@apple.com>
3266 <rdar://problem/16831276> [iOS] Unparenting a WKWebView that’s loading pauses it
3267 https://bugs.webkit.org/show_bug.cgi?id=132659
3269 Reviewed by Tim Horton.
3271 * UIProcess/Cocoa/NavigationState.h: Added a member variable.
3272 * UIProcess/Cocoa/NavigationState.mm:
3273 (WebKit::NavigationState::didChangeIsLoading): When transitioning into loading state,
3274 acquire a background activity token. When transitioning out of loading state, dispose of
3277 2014-05-07 Jeremy Jones <jeremyj@apple.com>
3279 HTMLMediaElement should exitFullscreen when view is removed from the window.
3280 https://bugs.webkit.org/show_bug.cgi?id=132506
3282 Reviewed by Tim Horton.
3284 * UIProcess/WebPageProxy.cpp:
3285 (WebKit::WebPageProxy::viewStateDidChange):
3286 Request WebVideoFUllscreenManagerProxy to exitFullscreen when removed from the window.
3287 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3288 Make requestExitFullscreen() public instead of private.
3290 2014-05-07 Alexey Proskuryakov <ap@apple.com>
3292 Make blob size computation lazy
3293 https://bugs.webkit.org/show_bug.cgi?id=132653
3295 Reviewed by Anders Carlsson.
3297 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
3298 (WebKit::NetworkBlobRegistry::registerBlobURL):
3299 (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
3300 (WebKit::NetworkBlobRegistry::blobSize):
3301 * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
3302 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3303 (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
3304 (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
3305 (WebKit::NetworkConnectionToWebProcess::blobSize):
3306 * NetworkProcess/NetworkConnectionToWebProcess.h:
3307 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3308 * WebProcess/FileAPI/BlobRegistryProxy.cpp:
3309 (WebKit::BlobRegistryProxy::registerBlobURL):
3310 (WebKit::BlobRegistryProxy::registerBlobURLForSlice):
3311 (WebKit::BlobRegistryProxy::blobSize):
3312 * WebProcess/FileAPI/BlobRegistryProxy.h:
3314 2014-05-06 Simon Fraser <simon.fraser@apple.com>
3316 Add scrolling tree logging to RemoteLayerTree output
3317 https://bugs.webkit.org/show_bug.cgi?id=132640
3319 Reviewed by Beth Dakin.
3321 Support scrolling tree logging in the RemoteLayerTree log channel
3324 Encode/decode ScrollingStateTree::hasChangedProperties() so we can use
3325 it to avoid logging. Log all the things.
3327 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
3328 (WebKit::RemoteScrollingCoordinatorTransaction::encode):
3329 (WebKit::RemoteScrollingCoordinatorTransaction::decode):
3330 (WebKit::RemoteScrollingTreeTextStream::RemoteScrollingTreeTextStream):
3331 (WebKit::RemoteScrollingTreeTextStream::increaseIndent):
3332 (WebKit::RemoteScrollingTreeTextStream::decreaseIndent):
3333 (WebKit::RemoteScrollingTreeTextStream::writeIndent):
3334 (WebKit::dumpProperty):
3335 (WebKit::RemoteScrollingTreeTextStream::operator<<):
3336 (WebKit::RemoteScrollingTreeTextStream::dump):
3337 (WebKit::RemoteScrollingTreeTextStream::recursiveDumpNodes):
3338 (WebKit::RemoteScrollingCoordinatorTransaction::description):
3339 (WebKit::RemoteScrollingCoordinatorTransaction::dump):
3340 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
3341 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3342 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
3344 2014-05-07 Hyowon Kim <hw1008.kim@samsung.com>
3346 GraphicsLayer::client() should return a reference.
3347 https://bugs.webkit.org/show_bug.cgi?id=126372
3349 Reviewed by Simon Fraser.
3351 GraphicsLayers always have a GraphicsLayerClient attached,
3352 so make client() a reference and remove some unnecessary branches.
3353 The author of the changes in the mac port is Andreas Kling <akling@apple.com>.
3355 * WebProcess/WebPage/PageOverlayController.cpp:
3356 (WebKit::PageOverlayController::initialize):
3357 (WebKit::PageOverlayController::installPageOverlay):
3358 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3359 (WebKit::LayerTreeHostGtk::initialize):
3360 (WebKit::LayerTreeHostGtk::createPageOverlayLayer):
3361 * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
3362 * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
3363 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
3364 (WebKit::RemoteLayerTreeContext::createGraphicsLayer):
3365 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3366 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3367 (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
3369 2014-05-07 Shivakumar JM <shiva.jm@samsung.com>
3371 Cleanup the build from unused parameter in UIProcess Module
3372 https://bugs.webkit.org/show_bug.cgi?id=131969
3374 Reviewed by Csaba Osztrogonác.
3376 Fixed unused parameter by omitting the parameter name
3378 * UIProcess/API/C/WKPage.cpp:
3379 (WKPageSetPageFindClient):
3380 * UIProcess/WebFindClient.cpp:
3381 (WebKit::WebFindClient::didFindString):
3383 2014-05-07 Manuel Rego Casasnovas <rego@igalia.com>
3385 [CSS Grid Layout] Remove runtime feature
3386 https://bugs.webkit.org/show_bug.cgi?id=132382
3388 Reviewed by Benjamin Poulain.
3390 Remove cssGridLayoutEnabled setting usage.
3392 * Shared/WebPreferencesStore.h:
3393 * UIProcess/API/C/WKPreferences.cpp:
3394 (WKPreferencesSetCSSGridLayoutEnabled): Deleted.
3395 (WKPreferencesGetCSSGridLayoutEnabled): Deleted.
3396 * UIProcess/API/C/WKPreferencesRefPrivate.h:
3397 * UIProcess/API/gtk/WebKitSettings.cpp:
3398 (webKitSettingsConstructed):
3399 * UIProcess/gtk/ExperimentalFeatures.cpp:
3400 * UIProcess/gtk/ExperimentalFeatures.h:
3401 * WebProcess/InjectedBundle/InjectedBundle.cpp:
3402 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3403 * WebProcess/WebPage/WebPage.cpp:
3404 (WebKit::WebPage::updatePreferences):
3405 * mac/WebKit2.order:
3407 2014-05-07 Csaba Osztrogonác <ossy@webkit.org>
3409 URTBF after r168393 to fix !IOS builds.
3411 * Shared/WebEvent.h:
3413 2014-05-06 Brady Eidson <beidson@apple.com>
3415 Followup to "Add WK2 SPI to prevent the previous back/forward item from remaining in the list"
3416 <rdar://problem/16248710> and https://bugs.webkit.org/show_bug.cgi?id=132636
3418 Reviewed by NOBODY (My mistake while addressing previous review feedback)
3420 * UIProcess/API/C/WKPage.cpp:
3421 (WKPageSetPageLoaderClient): During review feedback, this client switched from default negative to default
3422 positve, so when the client isn't implemented... return true instead of false.
3424 * UIProcess/WebBackForwardList.cpp:
3425 (WebKit::WebBackForwardList::addItem): Fix nonsensical comments while I'm at it.
3427 2014-05-06 Brady Eidson <beidson@apple.com>
3429 Add WK2 SPI to prevent the previous back/forward item from remaining in the list
3430 <rdar://problem/16248710> and https://bugs.webkit.org/show_bug.cgi?id=132636
3432 Reviewed by Sam Weinig.
3434 Add new PageLoaderClient SPI to keep the current back/forward item from remaining in the list:
3435 * UIProcess/API/APILoaderClient.h:
3436 (API::LoaderClient::shouldKeepCurrentBackForwardListItemInList):
3437 * UIProcess/API/C/WKPage.cpp:
3438 (WKPageSetPageLoaderClient):
3439 * UIProcess/API/C/WKPageLoaderClient.h:
3440 * UIProcess/WebPageProxy.cpp:
3441 (WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
3442 * UIProcess/WebPageProxy.h:
3444 * UIProcess/WebBackForwardList.cpp:
3445 (WebKit::WebBackForwardList::addItem): Use that SPI to determine whether we should insert the new item after
3446 the previous item, or simply replace the previous item.
3447 (WebKit::WebBackForwardList::goToItem): Use that SPI to determine whether the previous item stays or goes.
3449 2014-05-06 Dan Bernstein <mitz@apple.com>
3451 -[WKWebView isLoading] is NO immediately after -loadRequest: until the provisional load starts
3452 https://bugs.webkit.org/show_bug.cgi?id=132639
3454 Reviewed by Darin Adler.
3456 * UIProcess/PageLoadState.cpp:
3457 (WebKit::PageLoadState::commitChanges): Updated for change from isLoadingState to isLoading.
3458 (WebKit::PageLoadState::isLoading): Renamed from isLoadingState, changed to take Data and
3459 check whether there is a non-null pending API request URL. If so, return true.
3460 * UIProcess/PageLoadState.h:
3462 2014-05-06 Dean Jackson <dino@apple.com>
3464 [Mac] Allow focus rings to redraw themselves if necessary
3465 https://bugs.webkit.org/show_bug.cgi?id=132593
3467 Reviewed by Simon Fraser.
3469 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3470 (InitWebCoreSystemInterface): Add DrawFocusRingAtTime and DrawCellFocusRingWithFrameAtTime.
3472 2014-05-06 Benjamin Poulain <benjamin@webkit.org>
3474 <rdar://problem/16833442> [iOS WebKit2]: Keep the order of contentView in _scrollView after rotation
3475 https://bugs.webkit.org/show_bug.cgi?id=132634
3477 Reviewed by Enrica Casucci.
3479 Nice idea of Yongjun.
3481 * UIProcess/API/Cocoa/WKWebView.mm:
3482 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3483 (-[WKWebView _endAnimatedResize]):
3485 2014-05-06 Timothy Hatcher <timothy@apple.com>
3487 Take WKView's topContentInset into account when docking Web Inspector to the right.
3489 https://bugs.webkit.org/show_bug.cgi?id=132631
3491 Reviewed by Joseph Pecoraro.