1 2014-08-07 Timothy Horton <timothy_horton@apple.com>
3 setCustomSwipeViews inside didChangeBackForwardList client callback is ignored
4 https://bugs.webkit.org/show_bug.cgi?id=135633
5 <rdar://problem/17926507>
7 Reviewed by Sam Weinig.
9 * UIProcess/PageClient.h:
10 * UIProcess/WebPageProxy.cpp:
11 (WebKit::WebPageProxy::didChangeBackForwardList):
12 * UIProcess/ios/PageClientImplIOS.h:
13 * UIProcess/ios/PageClientImplIOS.mm:
14 (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted.
15 * UIProcess/mac/PageClientImpl.h:
16 * UIProcess/mac/PageClientImpl.mm:
17 (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted.
18 WebKit clears the set of custom swipe views at the end of WebPageProxy::didChangeBackForwardList,
19 *after* calling into the client. This means that if the client wants to setCustomSwipeViews in
20 didChangeBackForwardList, it won't be respected.
22 Since there's only one client of this SPI, let's just stop clearing the list of custom swipe
23 views in WebKit and leave that totally up to the client.
25 2014-08-07 Enrica Casucci <enrica@apple.com>
27 [Services with UI] Action menu does not appear if selection includes both text and an image.
28 https://bugs.webkit.org/show_bug.cgi?id=135731
29 <rdar://problem/17837491>
31 Reviewed by Brady Eidson.
33 Adding a new setting to ServicesController to communicate to the WebProcess if
34 there are services installed that can handle a combination of text and images.
35 This way ServicesOverlayController can decide if it appropriate to show the hightlight
36 based on the type of selection (text only or non text only). This information is retrieved
37 when the selection rects are collected by SelectionGatherer and used by
38 SelectionGatherer::Notifier to communicate the selection change.
40 * Shared/WebProcessCreationParameters.cpp:
41 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
42 * Shared/WebProcessCreationParameters.h:
43 * UIProcess/mac/ServicesController.h:
44 (WebKit::ServicesController::hasRichContentServices):
45 * UIProcess/mac/ServicesController.mm:
46 (WebKit::ServicesController::ServicesController):
47 (WebKit::ServicesController::refreshExistingServices):
48 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
49 (WebKit::WebEditorClient::selectionRectsDidChange):
50 * WebProcess/WebCoreSupport/WebEditorClient.h:
51 * WebProcess/WebPage/ServicesOverlayController.h:
52 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
53 (WebKit::ServicesOverlayController::ServicesOverlayController):
54 (WebKit::ServicesOverlayController::selectionRectsDidChange):
55 (WebKit::ServicesOverlayController::drawSelectionHighlight):
56 * WebProcess/WebProcess.cpp:
57 (WebKit::WebProcess::WebProcess):
58 (WebKit::WebProcess::initializeWebProcess):
59 (WebKit::WebProcess::setEnabledServices):
60 * WebProcess/WebProcess.h:
61 (WebKit::WebProcess::hasRichContentServices):
62 * WebProcess/WebProcess.messages.in:
64 2014-08-07 Ryuan Choi <ryuan.choi@samsung.com>
66 [EFL] Fix several warnings of doxygen
67 https://bugs.webkit.org/show_bug.cgi?id=135643
69 Reviewed by Gyuyoung Kim.
71 * UIProcess/API/efl/ewk_context_menu_item.h: Removed /info which is not doxygen keyword and unnecessary to the user.
72 * UIProcess/API/efl/ewk_cookie_manager.h: Fixed parameter name.
73 * UIProcess/API/efl/ewk_form_submission_request.h: Removed # from Eina_List because doxygen may not know the EFL structures.
74 * UIProcess/API/efl/ewk_page_group.h: Fixed to match with parameter name.
75 * UIProcess/API/efl/ewk_settings.h: Fixed wrong keyword and parameter name.
76 * UIProcess/API/efl/ewk_text_checker.h: Ditto.
77 * UIProcess/API/efl/ewk_view.h:
78 - Used escape string for the tag.
79 - Used @code, @endcode for media query example.
81 2014-08-07 Benjamin Poulain <bpoulain@apple.com>
83 Get rid of INPUT_SPEECH
84 https://bugs.webkit.org/show_bug.cgi?id=135672
86 Reviewed by Andreas Kling.
88 * Configurations/FeatureDefines.xcconfig:
91 2014-08-07 Timothy Hatcher <timothy@apple.com>
93 Web Inspector: Update glyphs to be more like Xcode 6
94 https://bugs.webkit.org/show_bug.cgi?id=135705
96 Reviewed by Joseph Pecoraro.
98 * Resources/DockBottom.pdf: Added.
99 * Resources/DockBottomLegacy.pdf: Copied from Source/WebKit/mac/Resources/Dock.pdf.
100 * Resources/DockRight.pdf: Added.
101 * Resources/DockRightLegacy.pdf: Copied from Source/WebKit2/Resources/DockRight.pdf.
102 * UIProcess/mac/WebInspectorProxyMac.mm:
103 (WebKit::WebInspectorProxy::createInspectorWindow): Use new images.
104 * WebKit2.xcodeproj/project.pbxproj: Added new images.
106 2014-08-07 Oliver Hunt <oliver@apple.com>
108 WebContent needs access to HSTS database due to some networking still being performed in process
109 https://bugs.webkit.org/show_bug.cgi?id=135711
112 Reviewed by Alexey Proskuryakov.
114 Simple patch in the same theme as the equivalent network process
115 extension. Provide an extension that covers the WebContent specific
116 HSTS file and consume it on launch.
118 * Shared/WebProcessCreationParameters.cpp:
119 (WebKit::WebProcessCreationParameters::encode):
120 (WebKit::WebProcessCreationParameters::decode):
121 * Shared/WebProcessCreationParameters.h:
122 * UIProcess/WebContext.cpp:
123 (WebKit::WebContext::createNewWebProcess):
124 * UIProcess/WebContext.h:
125 * UIProcess/mac/WebContextMac.mm:
126 (WebKit::WebContext::webContentHSTSDatabasePath):
127 * WebProcess/cocoa/WebProcessCocoa.mm:
128 (WebKit::WebProcess::platformInitializeWebProcess):
130 2014-08-07 Gordon Sheridan <gordon_sheridan@apple.com>
132 Clear the m_previousItem member of HistoryControllers when it matches the HistoryItem being removed.
133 https://bugs.webkit.org/show_bug.cgi?id=135634
134 <rdar://problem/17388461>
136 Reviewed by Brady Eidson.
138 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
139 (WebKit::WebBackForwardListProxy::removeItem):
140 Call WebCore::Page::clearPreviousItemFromAllPages() for each item removed from
141 the back/forward list to ensure the page URL is released from IconDatabase.
143 2014-08-07 Carlos Garcia Campos <cgarcia@igalia.com>
145 [GTK] Use WebKitNavigationAction also for WebKitNavigationPolicyDecision
146 https://bugs.webkit.org/show_bug.cgi?id=135695
148 Reviewed by Gustavo Noronha Silva.
150 WebKitNavigationAction was introduced to extend WebKitWebView::create signal
151 and its API is mostly duplicated in WebKitNavigationPolicyDecision.
152 Use WebKitNavigationAction insternally in WebKitNavigationPolicyDecision and
153 deprecated all the duplicated API in favor of a single property navigation-action.
155 * UIProcess/API/gtk/WebKitDefines.h: Remove unused macro
156 WEBKIT_OBSOLETE and add WEBKIT_DEPRECATED and WEBKIT_DEPRECATED_FOR.
157 * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
158 (_WebKitNavigationPolicyDecisionPrivate::~_WebKitNavigationPolicyDecisionPrivate):
159 Free the WebKitNavigationAction.
160 (webkitNavigationPolicyDecisionGetProperty): Add getter for
161 navigation-action and use WebKitNavigationAction in all other getters.
162 (webkit_navigation_policy_decision_class_init): Add navigation-action
163 property and deprecated all others except frame-name.
164 (webkit_navigation_policy_decision_get_navigation_action): Return the WebKitNavigationAction.
165 (webkit_navigation_policy_decision_get_navigation_type): Use WebKitNavigationAction.
166 (webkit_navigation_policy_decision_get_mouse_button): Ditto.
167 (webkit_navigation_policy_decision_get_modifiers): Ditto.
168 (webkit_navigation_policy_decision_get_request): Ditto.
169 (webkitNavigationPolicyDecisionCreate):
170 (webkitNewWindowPolicyDecisionCreate):
171 * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
172 * UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h:
173 * UIProcess/API/gtk/WebKitPolicyClient.cpp: Use a custom
174 PolicyClient class so that we receive a NavigationActionData in
176 (attachPolicyClientToView):
177 (toWebKitNavigationType): Deleted.
178 (decidePolicyForNavigationAction): Deleted.
179 (decidePolicyForNewWindowAction): Deleted.
180 (decidePolicyForResponse): Deleted.
181 * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
182 (webkitResponsePolicyDecisionCreate):
183 * UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h:
184 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
186 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
188 2014-08-06 Antti Koivisto <antti@apple.com>
190 Move Soup specific code out of WebCoreArgumentCoders.cpp
191 https://bugs.webkit.org/show_bug.cgi?id=135665
193 Reviewed by Anders Carlsson.
195 * Shared/WebCoreArgumentCoders.cpp:
196 (IPC::ArgumentCoder<ResourceRequest>::encode):
197 (IPC::ArgumentCoder<ResourceRequest>::decode):
198 (IPC::ArgumentCoder<ResourceError>::encode):
199 (IPC::ArgumentCoder<ResourceError>::decode):
200 * Shared/WebCoreArgumentCoders.h:
202 Soup is the only client for this code. Move it to *Soup.cpp
204 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
205 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
206 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
207 (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
208 (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
210 2014-08-06 Tim Horton <timothy_horton@apple.com>
212 Services overlay flashes a lot; should have some hysteresis before showing overlay
213 https://bugs.webkit.org/show_bug.cgi?id=135683
214 <rdar://problem/16878039>
216 Reviewed by Simon Fraser.
218 Don't show the highlight until it's been 200ms since the last change
219 in selection or change in which highlight is hovered, whichever was more recent.
221 * WebProcess/WebPage/ServicesOverlayController.h:
222 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
223 (WebKit::ServicesOverlayController::ServicesOverlayController):
224 (WebKit::ServicesOverlayController::selectionRectsDidChange):
225 Keep track of when the selection last changed.
227 (WebKit::ServicesOverlayController::drawTelephoneNumberHighlightIfVisible):
228 Make establishHoveredTelephoneHighlight take a bool instead of Boolean.
230 (WebKit::ServicesOverlayController::mouseIsOverHighlight):
231 Factor mouseIsOverHighlight out of establishHoveredTelephoneHighlight and drawHighlight.
233 (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
234 Return the amount of time until the highlight should be shown; this is
235 the maximum of (the difference between the last selection change and the timeout)
236 and (the difference between the last change in which highlight is hovered and the timeout).
238 Telephone number highlights are shown immediately, because they are already stable
239 by virtue of being expanded to include the entire telephone number.
241 (WebKit::ServicesOverlayController::repaintHighlightTimerFired):
242 (WebKit::ServicesOverlayController::drawHighlight):
243 If the highlight shouldn't be shown yet (because we haven't hit the two timeouts),
244 schedule a timer to repaint us around when we will hit the timeouts.
246 (WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
247 (WebKit::ServicesOverlayController::mouseEvent):
248 Don't allow mouseUp to trigger the menu if we shouldn't be showing the overlay yet.
250 2014-08-06 Simon Fraser <simon.fraser@apple.com>
252 [iOS WK2] www.france24.com doesn't always load the page, sections stay white
253 https://bugs.webkit.org/show_bug.cgi?id=135684
254 <rdar://problem/17931712>
256 Reviewed by Tim Horton.
258 It's possible for a UIScrollView for overflow to move between one scrolling tree node
259 and another. When this happens, we need to avoid unconditionally clearing the delegate
260 on the node that's being destroyed, because the new node will already have set the
261 UIScrollView delegate to its own delegate.
263 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
264 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::~ScrollingTreeOverflowScrollingNodeIOS):
266 2014-08-06 Dean Jackson <dino@apple.com>
268 ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED is not used anywhere. Remove it.
269 https://bugs.webkit.org/show_bug.cgi?id=135675
271 Reviewed by Sam Weinig.
273 * Configurations/FeatureDefines.xcconfig:
275 2014-08-06 Brady Eidson and Jeffrey Pfau <beidson@apple.com>
277 IDB transactions never reset if the Web Process ends before cleaning up
278 https://bugs.webkit.org/show_bug.cgi?id=135218
280 Reviewed by Darin Adler and David Kilzer.
282 * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
283 (WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
284 (WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage): Added.
285 (WebKit::DatabaseToWebProcessConnection::didClose):
286 * DatabaseProcess/DatabaseToWebProcessConnection.h:
288 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
289 (WebKit::DatabaseProcessIDBConnection::resetTransactionSync): Added
290 Wait until the reset is complete before sending the sync reply.
291 (WebKit::DatabaseProcessIDBConnection::rollbackTransactionSync): Added.
293 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
294 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
296 Keep track of all in progress transactions and make sure they’re cleaned up
297 whenever a connection to a WebProcess is broken:
298 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
299 (WebKit::UniqueIDBDatabase::unregisterConnection):
300 (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
301 (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
302 (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
303 (WebKit::UniqueIDBDatabase::didEstablishTransaction):
304 (WebKit::UniqueIDBDatabase::didResetTransaction):
305 (WebKit::UniqueIDBDatabase::resetAllTransactions):
306 (WebKit::UniqueIDBDatabase::finalizeRollback):
307 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
309 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
310 (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
312 Add sync versions of reset/rollback:
313 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
314 (WebKit::WebIDBServerConnection::resetTransactionSync):
315 (WebKit::WebIDBServerConnection::rollbackTransactionSync):
316 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
318 2014-08-06 Wenson Hsieh <wenson_hsieh@apple.com>
320 Implement parsing for CSS scroll snap points
321 https://bugs.webkit.org/show_bug.cgi?id=134301
323 Reviewed by Dean Jackson.
325 * Configurations/FeatureDefines.xcconfig: Added ENABLE_CSS_SCROLL_SNAP
327 2014-08-06 Andy Estes <aestes@apple.com>
329 [iOS] Subresources referenced in converted QuickLook documents sometimes fail to load
330 https://bugs.webkit.org/show_bug.cgi?id=135676
332 Reviewed by David Kilzer.
334 QuickLookHandle needs to stay alive in order for its NSURLProtocol to service subresource loads originating
335 from the converted HTML document. Some of these loads happen dynamically after the main resource finishes
336 loading, so we cannot tie the lifetime of the QuickLookHandle to that of the main resource's ResourceLoader.
337 Instead, give ownership of the QuickLookHandle to DocumentLoader.
339 * WebProcess/Network/WebResourceLoader.cpp:
340 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Stored the created QuickLookHandle in DocumentLoader.
341 (WebKit::WebResourceLoader::didReceiveData): Accessed DocumentLoader's QuickLookHandle.
342 (WebKit::WebResourceLoader::didFinishResourceLoad): Ditto.
343 (WebKit::WebResourceLoader::didFailResourceLoad): Ditto.
344 (WebKit::WebResourceLoader::didReceiveResource): Ditto.
345 * WebProcess/Network/WebResourceLoader.h: Removed m_quickLookHandle.
347 2014-08-06 Filip Pizlo <fpizlo@apple.com>
349 Merge r171389, r171495, r171508, r171510, r171605, r171606, r171611, r171614, r171763 from ftlopt.
351 2014-08-06 Mark Hahnenberg <mhahnenberg@apple.com>
353 Refactor our current implementation of for-in
354 https://bugs.webkit.org/show_bug.cgi?id=134142
356 Reviewed by Filip Pizlo.
358 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
359 (WebKit::JSNPObject::invalidate): Fixed an invalid ASSERT that was crashing in debug builds.
361 2014-08-06 Alexey Proskuryakov <ap@apple.com>
363 REGRESSION (WebKit2): iOS Safari default encoding doesn't follow system language
364 https://bugs.webkit.org/show_bug.cgi?id=135667
365 <rdar://problem/17862892>
367 Reviewed by Anders Carlsson.
369 * Shared/WebPreferencesDefinitions.h: Compute the actual proper default, don't
370 hardcode it to ISO-8859-1 hoping that someone else will correct it later.
372 * Shared/WebPreferencesStore.cpp: Added an include for WebPreferencesDefinitions.h
373 macro expansion to compile.
375 * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults):
378 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
379 We now use WKGetWebDefaultCFStringEncoding in WebCore, so it needs to be initialized.
381 2014-08-06 Adrian Perez de Castro <aperez@igalia.com>
383 [GTK] Add support for user scripts to WebKitUserContentManager
384 https://bugs.webkit.org/show_bug.cgi?id=134738
386 Reviewed by Carlos Garcia Campos.
388 Add support for user scripts, to complement the user style sheet
389 support already present in WebKitUserContentManager. Most of the
390 moving parts are already present, so this just adds a boxed type
391 for user scripts (WebKitUserScript) and the corresponding methods
392 to add and remove scripts from the WebKitUserContentManager.
394 * UIProcess/API/gtk/WebKitUserContent.cpp: Add a WebKitUserScript
395 boxed type and its corresponding methods and enums.
396 (toUserScriptInjectionTime): Needed to convert
397 WebKitUserScriptInjectionTime values into its WebCore counterparts.
398 (_WebKitUserScript::_WebKitUserScript): Added.
399 (_WebKitUserScript::referenceCount): Ditto.
400 (webkit_user_script_ref):
401 (webkit_user_script_unref):
402 (webkit_user_script_new):
403 (webkitUserScriptGetUserScript): Internal method to obtain the
404 boxed WebCore::UserScript value.
405 * UIProcess/API/gtk/WebKitUserContent.h: Add the new public API
407 * UIProcess/API/gtk/WebKitUserContentManager.cpp: Implement the
408 methods for adding and removing user scripts.
409 (webkit_user_content_manager_add_script):
410 (webkit_user_content_manager_remove_all_scripts):
411 * UIProcess/API/gtk/WebKitUserContentManager.h: Add the new public
413 * UIProcess/API/gtk/WebKitUserContentPrivate.h: Add the definition
414 for the new private function.
415 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the
416 new public methods in the API documentation.
418 2014-08-06 Carlos Garcia Campos <cgarcia@igalia.com>
420 [GTK] Be able to disable gtk2 dependency
421 https://bugs.webkit.org/show_bug.cgi?id=135505
423 Reviewed by Gustavo Noronha Silva.
425 * PlatformGTK.cmake: Only build WebKitPluginProcess2 when
426 ENABLE_PLUGIN_PROCESS_GTK2 is ON.
427 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
428 (WebKit::ProcessLauncher::launchProcess): Do not try to launch
429 WebKitPluginProcess2 executable when ENABLE_PLUGIN_PROCESS_GTK2 is OFF.
431 2014-08-05 Tim Horton <timothy_horton@apple.com>
433 REGRESSION (r164337): Pages are sometimes cut off/oriented incorrectly after using WKThumbnailView
434 https://bugs.webkit.org/show_bug.cgi?id=135622
435 <rdar://problem/17202556>
437 Reviewed by Dan Bernstein.
439 In some cases (when the page changed scroll offset while thumbnailed),
440 when transitioning back to thumbnail scale = 1, we would get the math
441 wrong and end up with a non-identity sublayerTransform on the DrawingArea.
443 Luckily, none of this code is necessary anymore, as the only client
444 of WKThumbnailView only uses its snapshotting mode.
446 * Shared/ImageOptions.h:
447 Remove SnapshotOptionsRespectDrawingAreaTransform; DrawingArea no longer
448 has a rootLayerTransform().
450 * UIProcess/WebPageProxy.cpp:
451 (WebKit::WebPageProxy::setThumbnailScale): Deleted.
452 * UIProcess/WebPageProxy.h:
453 * WebProcess/WebPage/WebPage.cpp:
454 (WebKit::WebPage::WebPage):
455 (WebKit::WebPage::scaledSnapshotWithOptions):
456 (WebKit::WebPage::snapshotAtSize):
458 (WebKit::WebPage::setThumbnailScale): Deleted.
459 * WebProcess/WebPage/WebPage.h:
460 * WebProcess/WebPage/WebPage.messages.in:
461 Remove setThumbnailScale and SnapshotOptionsRespectDrawingAreaTransform.
463 * WebProcess/WebPage/WebPage.cpp:
464 (WebKit::WebPage::didCommitLoad):
465 Revert this to its state before r164337, as we no longer have "thumbnail scale".
467 * UIProcess/API/Cocoa/_WKThumbnailView.h:
468 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
469 (-[_WKThumbnailView initWithFrame:fromWKView:]):
470 (-[_WKThumbnailView _viewWasUnparented]):
471 (-[_WKThumbnailView _viewWasParented]):
472 (-[_WKThumbnailView _requestSnapshotIfNeeded]):
473 (-[_WKThumbnailView setScale:]):
474 Clean up code assuming _shouldApplyThumbnailScale = NO, _usesSnapshot = YES.
476 (-[_WKThumbnailView setUsesSnapshot:]):
477 (-[_WKThumbnailView usesSnapshot]):
478 Always return YES from usesSnapshot; we only support snapshotting WKThumbnailViews.
479 Ignore setUsesSnapshot.
481 * UIProcess/API/mac/WKView.mm:
482 (-[WKView _setThumbnailView:]):
483 (-[WKView _updateThumbnailViewLayer]):
484 Stop checking usesSnapshot; it's always true.
486 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
487 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
488 (WebKit::TiledCoreAnimationDrawingArea::setRootLayerTransform): Deleted.
489 * WebProcess/WebPage/DrawingArea.cpp:
490 (WebKit::DrawingArea::rootLayerTransform): Deleted.
491 * WebProcess/WebPage/DrawingArea.h:
492 (WebKit::DrawingArea::setRootLayerTransform): Deleted.
493 Remove rootLayerTransform() and setRootLayerTransform().
495 2014-08-05 Peyton Randolph <prandolph@apple.com>
497 Rename MAC_LONG_PRESS feature flag to LONG_MOUSE_PRESS.
498 https://bugs.webkit.org/show_bug.cgi?id=135276
500 Reviewed by Beth Dakin.
502 * Configurations/FeatureDefines.xcconfig:
504 2014-08-04 Andy Estes <aestes@apple.com>
506 [iOS] The raw bytes of an iWork document's PDF preview are displayed rather than the PDF itself
507 https://bugs.webkit.org/show_bug.cgi?id=135596
509 Reviewed by David Kilzer.
511 * WebProcess/Network/WebResourceLoader.cpp:
512 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): If the response will be handled by
513 QuickLook, do not call ResourceLoader::didReceiveResponse. It will be called later by
514 WebResourceLoaderQuickLookDelegate once converted data is received.
516 2014-08-05 Alexey Proskuryakov <ap@apple.com>
520 * UIProcess/WebContext.h:
522 2014-08-05 Oliver Hunt <oliver@apple.com>
524 SSO expects to be able to walk parent application's bundle
525 https://bugs.webkit.org/show_bug.cgi?id=135581
526 <rdar://problem/17864079>
528 Reviewed by Alexey Proskuryakov.
530 SSO expects to be able to walk the parent application's
531 bundle looking for Info plists. To allow this to actually
532 work we provide an extension from the ui process that
533 covers the bundle directory, and then in the profile
534 restrict access to the ability to read directories and
535 files named Info.plist.
537 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
538 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
539 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
540 * Shared/Network/NetworkProcessCreationParameters.cpp:
541 (WebKit::NetworkProcessCreationParameters::encode):
542 (WebKit::NetworkProcessCreationParameters::decode):
543 * Shared/Network/NetworkProcessCreationParameters.h:
544 * UIProcess/WebContext.cpp:
545 (WebKit::WebContext::ensureNetworkProcess):
546 (WebKit::WebContext::parentBundleDirectory):
547 * UIProcess/WebContext.h:
548 * UIProcess/mac/WebContextMac.mm:
549 (WebKit::WebContext::parentBundleDirectory):
551 2014-08-04 Benjamin Poulain <benjamin@webkit.org>
553 Add a flag for the CSS Selectors level 4 implementation
554 https://bugs.webkit.org/show_bug.cgi?id=135535
556 Reviewed by Andreas Kling.
558 * Configurations/FeatureDefines.xcconfig:
560 2014-08-04 Benjamin Poulain <bpoulain@apple.com>
562 Check for null frame when processing geolocation authorization request
563 https://bugs.webkit.org/show_bug.cgi?id=135577
564 <rdar://problem/17896295>
566 Reviewed by Geoffrey Garen.
568 I could have put the null check in GeolocationController instead of the WebKit layer,
569 but that would be a little weird as GeolocationController knows nothing about how
570 the WebKit layer decides what to do with requests.
572 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
573 (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
575 2014-08-02 Jeremy Jones <jeremyj@apple.com>
577 Support both window and view based video fullscreen.
578 https://bugs.webkit.org/show_bug.cgi?id=135525
580 Reviewed by Simon Fraser.
582 Parenting in the view instead of the window gives the fullscreen implementation more latitude
583 in how it implements the animation.
585 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
586 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Use view instead of window.
587 * WebProcess/ios/WebVideoFullscreenManager.mm:
588 (WebKit::clientRectForNode): Use client rect instead of screen rect.
589 (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): ditto
590 (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
591 (WebKit::screenRectForNode): Deleted.
593 2014-08-01 Dan Bernstein <mitz@apple.com>
595 <rdar://problem/17891752> [iOS] WebKit links against libraries it doesn’t use
596 https://bugs.webkit.org/show_bug.cgi?id=135536
598 Reviewed by Tim Horton.
600 * Configurations/WebKit.xcconfig: Removed -lassertion_extension and -framework MobileAsset
601 from FRAMEWORK_AND_LIBRARY_LDFLAGS_iphonesimulator.
603 2014-08-01 Joseph Pecoraro <pecoraro@apple.com>
605 [iOS WK2] Add extension read permission to network sandbox profile
606 <rdar://problem/17671574>
608 Reviewed by Alexey Proskuryakov and Oliver Hunt.
610 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
612 2014-08-01 Oliver Hunt <oliver@apple.com>
614 Various frameworks may want to use the container temp directory, so our current restrictions are too tight
615 https://bugs.webkit.org/show_bug.cgi?id=135518
618 Reviewed by Anders Carlsson.
620 We don't (and can't) have complete knowledge of what different frameworks
621 will want to use the container temporary directory for, and so our
622 current attempt to heavily restrict access is simply too tight.
624 This patch recognises this by simply giving read-write access to the
625 entire NSTemporary() directory (e.g. $container/tmp in the general case),
626 rather than the single sub directory we wishfully thought that we would
627 be able to get away with.
629 * Shared/WebProcessCreationParameters.cpp:
630 (WebKit::WebProcessCreationParameters::encode):
631 (WebKit::WebProcessCreationParameters::decode):
632 * Shared/WebProcessCreationParameters.h:
633 * UIProcess/WebContext.cpp:
634 (WebKit::WebContext::createNewWebProcess):
635 (WebKit::WebContext::mediaCacheDirectory): Deleted.
636 * UIProcess/WebContext.h:
637 * UIProcess/efl/WebContextEfl.cpp:
638 (WebKit::WebContext::containerTemporaryDirectory):
639 (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
640 * UIProcess/gtk/WebContextGtk.cpp:
641 (WebKit::WebContext::containerTemporaryDirectory):
642 (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
643 * UIProcess/mac/WebContextMac.mm:
644 (WebKit::WebContext::containerTemporaryDirectory):
645 (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
646 * WebProcess/cocoa/WebProcessCocoa.mm:
647 (WebKit::WebProcess::platformInitializeWebProcess):
649 2014-08-01 Dan Bernstein <mitz@apple.com>
651 <rdar://problem/17862013> REGRESSION (r169357): Disabling "allow plug-ins" doesn't stick on quit/relaunch
652 https://bugs.webkit.org/show_bug.cgi?id=135511
654 Reviewed by Alexey Proskuryakov.
656 Since the values map in the preferences store doesn’t include values that are equal to the
657 defaults, we need to update it when a new default is registered.
659 * UIProcess/WebPreferences.cpp:
660 (WebKit::WebPreferences::createWithLegacyDefaults): Changed to use new member functions
661 for registering defaults.
662 (WebKit::WebPreferences::registerDefaultBoolValueForKey): Added. Sets an override default
663 in the store, and sets the user default, if there is one, on top of it.
664 (WebKit::WebPreferences::registerDefaultUInt32ValueForKey): Ditto.
665 * UIProcess/WebPreferences.h: Declared new member functions for getting the user default
668 * UIProcess/efl/WebPreferencesEfl.cpp:
669 (WebKit::WebPreferences::platformGetStringUserValueForKey): Added an implementation that
670 returns false, because the EFL port doesn’t support persistent user defaults.
671 (WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
672 (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
673 (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.
675 * UIProcess/gtk/WebPreferencesGtk.cpp:
676 (WebKit::WebPreferences::platformGetStringUserValueForKey): Ditto for the GTK port.
677 (WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
678 (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
679 (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.
681 * UIProcess/mac/WebPreferencesMac.mm:
682 (WebKit::WebPreferences::platformGetStringUserValueForKey): Added. Replaces
683 setStringValueIfInUserDefaults, on which it is based.
684 (WebKit::WebPreferences::platformGetBoolUserValueForKey): Similarly for booleans.
685 (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Similarly for integers.
686 (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Similarly for doubles.
687 (WebKit::WebPreferences::platformInitializeStore): Changed to use the above functions.
689 2014-08-01 Brent Fulgham <bfulgham@apple.com>
691 [Mac] Fullscreen mode for some applications shows only a black screen.
692 https://bugs.webkit.org/show_bug.cgi?id=135493
693 <rdar://problem/17628212>
695 Reviewed by Jer Noble.
697 In some applications, the window hosting the WKView is an InProcess layer hosting mode.
698 The fullscreen window created by the WKFullScreenWindowController defaults to an
701 When this kind of mismatch is encountered, the WK2 layer in the UI process is supposed
702 to send a message back to the WebProcess indicating that the layer hosting mode of the
703 containing window is different, so that the WebProcess can adjust its logic accordingly.
704 Unfortunately, the notification that this had happened was not getting sent to the
705 WebProcess due to an optimization in window state change logic (see Bug 135509 for
708 The fix is to check layer hosting mode state when a WKView is added to a window, and
709 notify the WebProcess when it needs to change state to match.
712 * UIProcess/API/mac/WKView.mm:
713 (-[WKView viewDidMoveToWindow]): When moving to a new window, always call
714 'layerHostingModeDidChange' to pick up any changes in the layer hosting mode.
716 2014-08-01 Carlos Garcia Campos <cgarcia@igalia.com>
718 [CMake] GTK and EFL are using PROJECT_VERSION_PATCH to define the micro version
719 https://bugs.webkit.org/show_bug.cgi?id=135501
721 Reviewed by Gyuyoung Kim.
723 Use PROJECT_VERSION_MICRO instead.
725 * UIProcess/API/efl/EWebKit2.h.in:
726 * UIProcess/API/gtk/WebKitVersion.h.in:
728 2014-08-01 Carlos Garcia Campos <cgarcia@igalia.com>
730 Unreviewed. Add missing sections to documentation.
732 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
733 WebKitUserContent and WebKitUserContentManager sections to the
736 2014-08-01 Ryuan Choi <ryuan.choi@samsung.com>
738 [EFL] Unable to do make install since r171901
739 https://bugs.webkit.org/show_bug.cgi?id=135497
741 Reviewed by Gyuyoung Kim.
743 * PlatformEfl.cmake: Removed ewk_defins.h from the installation list.
745 2014-07-31 Ryuan Choi <ryuan.choi@samsung.com>
747 [EFL][WK2] MiniBrower comes to crash when combo box is pressed
748 https://bugs.webkit.org/show_bug.cgi?id=135378
750 Reviewed by Gyuyoung Kim.
752 Added doxygen comment of popup_menu_show/popup_menu_hide not to confuse the usage.
754 * UIProcess/API/efl/ewk_view.h:
756 2014-07-31 Ryuan Choi <ryuan.choi@samsung.com>
758 [EFL] remove ewk_defines.h
759 https://bugs.webkit.org/show_bug.cgi?id=135456
761 Reviewed by Gyuyoung Kim.
763 * UIProcess/API/efl/ewk_context_menu.h:
764 * UIProcess/API/efl/ewk_context_menu_item.h: Moved the declaration from ewk_defines.h
765 * UIProcess/API/efl/ewk_defines.h: Removed.
767 2014-07-31 Brent Fulgham <bfulgham@apple.com>
769 Unreviewed typo correction.
770 https://bugs.webkit.org/show_bug.cgi?id=135482
772 Rename '_fullScreenIsEnabled' -> '_fullScreenEnabled'
774 * UIProcess/API/Cocoa/WKPreferences.mm:
775 (-[WKPreferences _fullScreenEnabled]): Added
776 (-[WKPreferences _fullScreenIsEnabled]): Deleted.
777 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
779 2014-07-31 Brent Fulgham <bfulgham@apple.com>
781 MiniBrowser Should Support Fullscreen Videos in WebKit2 Mode
782 https://bugs.webkit.org/show_bug.cgi?id=135482
784 Reviewed by Simon Fraser.
786 Add accessors for the missing Fullscreen API so that MiniBrowser
789 * UIProcess/API/Cocoa/WKPreferences.mm:
790 (-[WKPreferences _fullScreenIsEnabled]): Added.
791 (-[WKPreferences _setFullScreenEnabled:]): Added.
792 * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Add accessor for
795 2014-07-31 Beth Dakin <bdakin@apple.com>
797 Hit-testing broken in WebKit 1 views with AppKit's contentInsets
798 https://bugs.webkit.org/show_bug.cgi?id=135434
800 <rdar://problem/17850323>
802 Reviewed by Benjamin Poulain.
805 * WebProcess/Plugins/PDF/PDFPlugin.mm:
806 (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
807 (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
809 2014-07-31 Oliver Hunt <oliver@apple.com>
811 Various SSO services need the networking process to be able to spoof its bundle id
812 https://bugs.webkit.org/show_bug.cgi?id=135468
813 <rdar://problem/17864139>
815 Reviewed by Alexey Proskuryakov.
817 Just add the entitlement required to allow the sandbox to let this happen.
819 * Configurations/Network-iOS.entitlements:
821 2014-07-31 Przemyslaw Kuczynski <p.kuczynski@samsung.com>
823 Fix uninitialized scalar variable
824 https://bugs.webkit.org/show_bug.cgi?id=135461
826 Reviewed by Alexey Proskuryakov.
828 If fopen fails, returned ApplicationMemoryStats structure will be uninitialized
830 * Shared/linux/WebMemorySamplerLinux.cpp:
831 (WebKit::sampleMemoryAllocatedForApplication): Initialized applicationStats.
833 2014-07-31 Rohit Kumar <kumar.rohit@samsung.com>
835 Clean up the WebKit build from unused parameter warning in Webkit2/WebProcess module
836 https://bugs.webkit.org/show_bug.cgi?id=135413
838 Reviewed by Darin Adler.
840 * WebProcess/OriginData/WebOriginDataManager.cpp:
841 (WebKit::WebOriginDataManager::getOrigins):
842 (WebKit::WebOriginDataManager::deleteEntriesForOrigin):
843 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
844 (WebKit::WebOriginDataManager::deleteAllEntries):
846 2014-07-31 Chris Fleizach <cfleizach@apple.com>
848 AX: iOS: Crash accessing m_page in WKAccessibilityPageObject
849 https://bugs.webkit.org/show_bug.cgi?id=134617
851 Reviewed by Darin Adler.
853 Provide a way to detach a WK2 WebPage object so that it can uninitialize other pointers, like the accessibility object.
855 * WebProcess/WebPage/WebPage.cpp:
856 (WebKit::WebPage::~WebPage):
857 * WebProcess/WebPage/WebPage.h:
858 * WebProcess/WebPage/efl/WebPageEfl.cpp:
859 (WebKit::WebPage::platformDetach):
860 * WebProcess/WebPage/gtk/WebPageGtk.cpp:
861 (WebKit::WebPage::platformDetach):
862 * WebProcess/WebPage/ios/WebPageIOS.mm:
863 (WebKit::WebPage::platformDetach):
864 * WebProcess/WebPage/mac/WebPageMac.mm:
865 (WebKit::WebPage::platformDetach):
867 2014-07-31 Dan Bernstein <mitz@apple.com>
869 WebKit part of: Server trust authentication challenges aren’t sent to the navigation delegate
870 https://bugs.webkit.org/show_bug.cgi?id=135327
872 Reviewed by Alexey Proskuryakov.
874 * UIProcess/Cocoa/NavigationState.mm:
875 (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
876 Return true for server trust protection spaces if the delegate implements
877 -webView:didReceiveAuthenticationChallenge:completionHandler:.
878 (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Removed
879 an assertion that is no longer true due to the above.
881 2014-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
883 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.1 release.
885 * gtk/NEWS: Add release notes for 2.5.1.
887 2014-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
889 Unreviewed. Fix GTK+ make distcheck.
891 * Shared/InteractionInformationAtPosition.h: Only include
892 WebCore/SelectionRect.h for IOS.
894 2014-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
896 [GTK] Bump binary version for 2.6
897 https://bugs.webkit.org/show_bug.cgi?id=133724
899 Reviewed by Philippe Normand.
901 * PlatformGTK.cmake: Fix JavaScriptCore dependency on
902 instrospection commands and make them depend on GTK+-3.0.
904 2014-07-30 Enrica Casucci <enrica@apple.com>
906 REGRESSION (WK2 iOS): Inline editing for Chinese and Japanese keyboards does not work in Safari.
907 https://bugs.webkit.org/show_bug.cgi?id=135449
908 <rdar://problem/17824833>
910 Reviewed by Benjamin Poulain.
912 The WebProcess sends the notification that the gesture modified the phrase boundary,
913 but the flag was not being converted properly, therefore we failed to notify
914 the text input system that a change had occurred.
916 * UIProcess/ios/WKContentViewInteraction.mm:
917 (toUIWKSelectionFlags):
919 2014-07-30 Andy Estes <aestes@apple.com>
921 USE(CONTENT_FILTERING) should be ENABLE(CONTENT_FILTERING)
922 https://bugs.webkit.org/show_bug.cgi?id=135439
924 Reviewed by Tim Horton.
926 We now support two different platform content filters, and will soon support a mock content filter (as part of
927 webkit.org/b/128858). This makes content filtering a feature of WebKit, not just an adoption of a third-party
928 library. ENABLE() is the correct macro to use for such a feature.
930 * Configurations/FeatureDefines.xcconfig:
931 * Shared/WebCoreArgumentCoders.h:
932 * UIProcess/WebFrameProxy.cpp:
933 (WebKit::WebFrameProxy::didStartProvisionalLoad):
934 * UIProcess/WebFrameProxy.h:
935 * UIProcess/WebPageProxy.cpp:
936 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
937 * UIProcess/WebPageProxy.h:
938 * UIProcess/WebPageProxy.messages.in:
939 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
940 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
942 2014-07-30 Andreas Kling <akling@apple.com>
944 Static hash tables no longer need to be coupled with a VM.
945 <https://webkit.org/b/135421>
947 Reviewed by Geoffrey Garen.
949 * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
950 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
952 2014-07-30 Dan Bernstein <mitz@apple.com>
954 Get rid of the WKNSURLProtectionSpace wrapper
955 https://bugs.webkit.org/show_bug.cgi?id=135425
957 Reviewed by Sam Weinig.
959 * Shared/Cocoa/APIObject.mm:
960 (API::Object::newObject): Don’t allocate WKNSURLProtectionSpace wrappers.
962 * Shared/Cocoa/WKNSURLProtectionSpace.h: Removed.
963 * Shared/Cocoa/WKNSURLProtectionSpace.mm: Removed.
965 * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
966 (canAuthenticateAgainstProtectionSpaceInFrame): Get the NSURLProtectionSpace from the
967 WebCore::ProtectionSpace in the WebProtectionSpace.
969 * UIProcess/Cocoa/NavigationState.mm:
970 (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): Ditto.
972 * WebKit2.xcodeproj/project.pbxproj: Removed references to removed files.
974 2014-07-30 Dan Bernstein <mitz@apple.com>
976 Updated for changes to the WebCore::Credential API.
977 Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
979 Reviewed by Alexey Proskuryakov.
981 * Shared/Downloads/mac/DownloadMac.mm:
982 (WebKit::Download::receivedCredential):Use new Credential::nsCredential getter.
984 * Shared/WebCoreArgumentCoders.cpp:
985 (IPC::ArgumentCoder<Credential>::encode): If encoding the credential requires encoding the
986 platform data, do that.
987 (IPC::ArgumentCoder<Credential>::decode): If platform data was encoded, decode it.
988 * Shared/WebCoreArgumentCoders.h:
990 * Shared/mac/WebCoreArgumentCodersMac.mm:
991 (IPC::ArgumentCoder<Credential>::encodePlatformData): Archive the NSURLCredential.
992 (IPC::ArgumentCoder<Credential>::decodePlatformData): Unarchive it.
994 * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
995 (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]): Use
996 Credential constructor that takes an NSURLCredential.
998 * UIProcess/Cocoa/NavigationState.mm:
999 (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Ditto.
1002 2014-07-30 Carlos Garcia Campos <cgarcia@igalia.com>
1004 [GTK] REGRESSION(r171742): Test /webkit2/WebKitWebView/disallow-modal-dialogs fails
1005 https://bugs.webkit.org/show_bug.cgi?id=135412
1007 Reviewed by Philippe Normand.
1009 The problem is that WebPageProxy::setUIClient() calls
1010 setCanRunModal() with the value of m_uiClient->canRunModal() which
1011 is always true for us. We override that manually by calling
1012 setCanRunModal() depending on the WebKitSettings. In r171742,
1013 webkitWebViewUpdateSettings(), the method that overrides
1014 setCanRunModal(), was moved before attachUIClientToView(), so the
1015 value set by WebPageProxy::setUIClient() is the last one and takes
1016 precedence. We need to make sure webkitWebViewUpdateSettings() is
1017 always called after attachUIClientToView().
1019 * UIProcess/API/gtk/WebKitWebView.cpp:
1020 (webkitWebViewConstructed): Move webkitWebViewUpdateSettings()
1021 call after attachUIClientToView() and add a comment to not forget
1024 2014-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
1026 [GTK] Remove WebKitCertificateInfo from WebKit2GTK+ API
1027 https://bugs.webkit.org/show_bug.cgi?id=134830
1029 Reviewed by Gustavo Noronha Silva.
1031 It was added to make the API more convenient but it has ended up
1032 making it more complicated. WebKitWebView::load-failed-with-tls-errors
1033 now receives a GTlsCertificate + GTlsCertificateFlags and
1034 webkit_web_context_allow_tls_certificate_for_host() receives a GTlsCertificate
1035 since the errors are not actually needed. This makes the API more
1036 consistent with the existing method webkit_web_view_get_tls_info().
1038 * PlatformGTK.cmake: Remove files from compilation.
1039 * UIProcess/API/gtk/WebKitCertificateInfo.cpp: Removed.
1040 * UIProcess/API/gtk/WebKitCertificateInfo.h: Removed.
1041 * UIProcess/API/gtk/WebKitCertificateInfoPrivate.h: Removed.
1042 * UIProcess/API/gtk/WebKitWebContext.cpp:
1043 (webkit_web_context_allow_tls_certificate_for_host):
1044 * UIProcess/API/gtk/WebKitWebContext.h:
1045 * UIProcess/API/gtk/WebKitWebView.cpp:
1046 (webkit_web_view_class_init):
1047 (webkitWebViewLoadFailedWithTLSErrors):
1048 * UIProcess/API/gtk/WebKitWebView.h:
1049 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
1050 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1051 * UIProcess/API/gtk/webkit2.h:
1053 2014-07-29 Jinwoo Song <jinwoo7.song@samsung.com>
1055 [EFL] Do not initialize g_type system explicitly in the ewk_init()
1056 https://bugs.webkit.org/show_bug.cgi?id=135407
1058 Reviewed by Gyuyoung Kim.
1060 EFL build requires glib version 2.38 but g_type_init() has been deprecated
1061 since version 2.36. As the type system is initialized automatically since
1062 version 2.36, we do not need to call g_type_init() in the ewk_init().
1064 https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#g-type-init
1066 * UIProcess/API/efl/ewk_main.cpp:
1069 2014-07-29 Enrica Casucci <enrica@apple.com>
1071 REGRESSION [WebKit2 iOS]: Cannot add shortcut to user dictionary from non editable content.
1072 https://bugs.webkit.org/show_bug.cgi?id=135392
1073 <rdar://problem/17760073>
1075 Reviewed by Benjamin Poulain.
1077 Adding a shortcut to the user dictionary needs to be available in non editable content too.
1079 * UIProcess/ios/WKContentViewInteraction.mm:
1080 (-[WKContentView _addShortcut:]):
1082 2014-07-29 Tim Horton <timothy_horton@apple.com>
1084 WKPDFView paints rotated pages squished
1085 https://bugs.webkit.org/show_bug.cgi?id=135401
1086 <rdar://problem/17173916>
1088 Reviewed by Simon Fraser.
1090 * UIProcess/ios/WKPDFView.mm:
1091 (-[WKPDFView _computePageAndDocumentFrames]):
1092 [page size] returns the crop box's size, ignoring rotation.
1093 [page cropBoxAccountForRotation] respects rotation, but otherwise returns the same size.
1094 UIPDFPageView will respect rotation when painting, so we
1095 should make sure that it is given an aspect ratio that also
1096 respects rotation, so that the page isn't squished.
1098 2014-07-29 Csaba Osztrogonác <ossy@webkit.org>
1100 URTBF for !ENABLE(DATABASE_PROCESS) platforms.
1102 * WebProcess/OriginData/WebOriginDataManager.cpp:
1103 (WebKit::WebOriginDataManager::getOrigins):
1104 (WebKit::WebOriginDataManager::deleteEntriesForOrigin):
1105 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
1106 (WebKit::WebOriginDataManager::deleteAllEntries):
1108 2014-07-29 Brady Eidson <beidson@apple.com>
1110 Make WKOriginDataManager actually operate on IndexedDatabases.
1111 https://bugs.webkit.org/show_bug.cgi?id=135346
1113 Reviewed by Sam Weinig (and David Kilzer and Alex Christensen)
1115 * DatabaseProcess/DatabaseProcess.cpp:
1116 (WebKit::DatabaseProcess::DatabaseProcess):
1117 (WebKit::DatabaseProcess::getIndexedDatabaseOrigins):
1118 (WebKit::DatabaseProcess::doGetIndexedDatabaseOrigins):
1119 (WebKit::removeAllDatabasesForOriginPath): Utility to delete all database files for the given origin path
1120 that have been modified between the given dates.
1121 (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
1122 (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesForOrigin):
1123 (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates):
1124 (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesModifiedBetweenDates):
1125 (WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries):
1126 (WebKit::DatabaseProcess::doDeleteAllIndexedDatabaseEntries):
1127 * DatabaseProcess/DatabaseProcess.h:
1129 * Shared/WebCrossThreadCopier.cpp:
1130 (WebCore::SecurityOriginData>::copy):
1131 * Shared/WebCrossThreadCopier.h:
1133 * UIProcess/WebOriginDataManagerProxy.cpp:
1134 (WebKit::WebOriginDataManagerProxy::getOrigins):
1135 (WebKit::WebOriginDataManagerProxy::didGetOrigins):
1136 (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
1137 (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates):
1138 (WebKit::WebOriginDataManagerProxy::deleteAllEntries):
1140 * WebProcess/OriginData/WebOriginDataManager.cpp:
1141 (WebKit::WebOriginDataManager::getOrigins): Pipe IDB requests through to the DatabaseProcess.
1142 (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Ditto.
1143 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Ditto.
1144 (WebKit::WebOriginDataManager::deleteAllEntries): Ditto.
1146 2014-07-29 Commit Queue <commit-queue@webkit.org>
1148 Unreviewed, rolling out r171704.
1149 https://bugs.webkit.org/show_bug.cgi?id=135389
1151 Broke two IndexedDB tests (Requested by ap on #webkit).
1155 "IDB transactions never reset if the Web Process ends before
1157 https://bugs.webkit.org/show_bug.cgi?id=135218
1158 http://trac.webkit.org/changeset/171704
1160 2014-07-29 Daniel Bates <dabates@apple.com>
1162 Use WTF::move() instead of std::move() to help ensure move semantics
1163 https://bugs.webkit.org/show_bug.cgi?id=135351
1165 Reviewed by Alexey Proskuryakov.
1167 * UIProcess/API/Cocoa/_WKSessionState.mm:
1168 (-[_WKSessionState _initWithSessionState:]):
1169 * UIProcess/API/gtk/WebKitUserContent.cpp:
1170 (toStringVector): Remove use of std::move(). It's unnecessary to call std::move() on an rvalue.
1171 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1172 (WebKit::ServicesOverlayController::mouseEvent):
1174 2014-07-28 Pratik Solanki <psolanki@apple.com>
1176 Get SharedBuffer.h out of ResourceBuffer.h (and a few other places)
1177 https://bugs.webkit.org/show_bug.cgi?id=131782
1179 Original patch by Tim Horton.
1180 Reviewed by Darin Adler.
1182 * NetworkProcess/NetworkResourceLoader.cpp:
1183 * WebProcess/Network/NetworkProcessConnection.cpp:
1184 Include SharedBuffer.h in implementation files.
1186 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
1187 Un-indent namespace and remove SharedBuffer forward-declaration.
1189 2014-07-29 Adrian Perez de Castro <aperez@igalia.com>
1191 [GTK] Remove WebKitWebViewGroup from WebKit2 GTK+ API
1192 https://bugs.webkit.org/show_bug.cgi?id=133729
1194 Reviewed by Carlos Garcia Campos.
1196 Removes WebKitWebViewGroup, effectively reverting the changes
1197 introduced by r149117. The motivation for WebKitWebViewGroup
1198 was using the user style sheet injection API, which has been
1199 moved into WebKitUserContentManager, rendering it unneeded.
1201 * PlatformGTK.cmake: Remove WebKitWebViewGroup source files
1203 * UIProcess/API/C/gtk/WKView.cpp:
1204 (WKViewCreate): Accomodate for changes in the signature of
1205 webkitWebViewBaseCreate().
1206 * UIProcess/API/gtk/WebKitSettings.cpp: Update API documentation.
1207 * UIProcess/API/gtk/WebKitWebContext.cpp: Remove the default web
1208 view group from WebKitWebContext.
1209 (webkitWebContextCreatePageForWebView): Allow passing a
1210 WebPreferences object at construction.
1211 (webkitWebContextGetDefaultWebViewGroup): Deleted.
1212 * UIProcess/API/gtk/WebKitWebContextPrivate.h: Ditto.
1213 * UIProcess/API/gtk/WebKitWebView.cpp:
1214 (webkitWebViewUpdateSettings): Use WebPageProxy::setPreferences()
1215 directly. Handle the case when webkit_web_view_set_settings()
1216 is called on construction by doing an early-return.
1217 (webkitWebViewConstructed): Call webkitWebViewUpdateSettings()
1218 after creating the internal WebPageProxy object.
1219 (webkitWebViewSetProperty): Removed "group" property, added
1220 "settings" property.
1221 (webkitWebViewGetProperty): Ditto.
1222 (webkitWebViewDispose): Do not disconnect signal handler for
1223 the (now unexistant) WebKitWebViewGroup.
1224 (webkit_web_view_class_init): Removed "group" property, added
1225 "settings" property.
1226 (webkitWebViewHandleAuthenticationChallenge): Access the
1227 WebKitWebSettings directly.
1228 (webkit_web_view_new_with_related_view): Make new views share
1229 settings with their related view.
1230 (webkit_web_view_new_with_settings): Added.
1231 (webkit_web_view_set_settings): Access the settings directly in
1233 (webkit_web_view_get_settings): Ditto.
1234 (webkit_web_view_set_zoom_level): Ditto.
1235 (webkit_web_view_get_zoom_level): Ditto.
1236 (webkitWebViewSettingsChanged): Deleted.
1237 (webkitWebViewDisconnectSettingsChangedSignalHandler): Deleted.
1238 (webkit_web_view_new_with_group): Deleted.
1239 (webkit_web_view_get_group): Deleted.
1240 * UIProcess/API/gtk/WebKitWebView.h: Removed API methods related
1241 to WebKitWebViewGroup.
1242 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1243 (webkitWebViewBaseCreate): Allow passing a WebPreferences object
1244 for constructing the WebPageProxy.
1245 (webkitWebViewBaseUpdatePreferences): Instead of going through
1246 the page group, use WebPageProxy::preferences() directly.
1247 (webkitWebViewBaseCreateWebPage): Allow passing a WebPreferences
1248 object for constructing the WebPageProxy.
1249 * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Update the
1250 prototypes of the internal functions.
1251 * UIProcess/API/gtk/WebKitWebViewGroup.cpp: Removed.
1252 * UIProcess/API/gtk/WebKitWebViewGroup.h: Removed.
1253 * UIProcess/API/gtk/WebKitWebViewGroupPrivate.h: Removed.
1254 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Change public API
1255 bits in the documentation.
1256 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
1257 * UIProcess/API/gtk/docs/webkit2gtk.types: Ditto.
1258 * UIProcess/API/gtk/webkit2.h: Removed WebKitWebViewGroup.h header.
1259 * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1260 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1261 Accomodate for changes in the signature of
1262 webkitWebViewBaseCreate().
1264 2014-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
1266 Implement webkit_web_view_load_string() in WebKit2
1267 https://bugs.webkit.org/show_bug.cgi?id=134735
1269 Reviewed by Sergio Villar Senin.
1271 Add webkit_web_view_load_bytes() that receives a GBytes to load
1272 random data in the web view using the given MIME-Type, encoding
1275 * UIProcess/API/gtk/WebKitWebView.cpp:
1277 (webkit_web_view_load_bytes):
1278 * UIProcess/API/gtk/WebKitWebView.h:
1279 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
1280 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1282 2014-07-29 Ryuan Choi <ryuan.choi@samsung.com>
1284 [EFL] Alpha value of ewk_view_bg_color_set is not working
1285 https://bugs.webkit.org/show_bug.cgi?id=135333
1287 Reviewed by Gyuyoung Kim.
1289 evas_object_image_alpha_set should be called for the transparent evas object.
1291 * UIProcess/API/efl/EwkView.cpp:
1292 (EwkView::handleEvasObjectColorSet):
1293 (EwkView::setBackgroundColor): Checked the alpha value of object and called evas_object_image_alpha_set.
1294 * UIProcess/API/efl/EwkView.h:
1295 * UIProcess/API/efl/ewk_view.cpp:
1296 (ewk_view_bg_color_set): Moved the logic to EwkView.
1298 2014-07-28 Mark Rowe <mrowe@apple.com>
1300 Web process crash causes UI process to die with an assertion failure in Connection::exceptionSourceEventHandler
1301 https://bugs.webkit.org/show_bug.cgi?id=135366
1303 Reviewed by Dan Bernstein.
1305 * Platform/IPC/mac/ConnectionMac.mm:
1306 (IPC::Connection::exceptionSourceEventHandler): Remove the assertion since it frequently fires during
1307 normal development with debug builds.
1309 2014-07-28 Benjamin Poulain <bpoulain@apple.com>
1311 [iOS WK2] WKWebView sometime tries to change the size of a null DrawingAreaProxy
1312 https://bugs.webkit.org/show_bug.cgi?id=135368
1313 <rdar://problem/16988887>
1315 Reviewed by Simon Fraser.
1317 We should never assume DrawingAreaProxy exists in the API invoked by the clients
1318 of WKWebView. There are at least two cases where the DrawingAreaProxy is null:
1319 -In some path on initialization.
1322 * UIProcess/API/Cocoa/WKWebView.mm:
1323 (-[WKWebView _frameOrBoundsChanged]):
1324 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1325 We can safely null check and skip setting the size. If the call was skipped,
1326 the size is set on DrawingAreaProxy initialization by querying the current
1327 size through the page client.
1329 2014-07-28 Roger Fong <roger_fong@apple.com>
1331 Disable tagged strings for the plugin process.
1332 https://bugs.webkit.org/show_bug.cgi?id=135354
1333 <rdar://problem/17295639>.
1335 Patch by Alexey Proskuryakov and Roger Fong.
1337 Reviewed by Anders Carlsson.
1339 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
1340 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1341 (WebKit::connectToReExecService):
1343 2014-07-25 Jeffrey Pfau <jpfau@apple.com>
1345 IDB transactions never reset if the Web Process ends before cleaning up
1346 https://bugs.webkit.org/show_bug.cgi?id=135218
1348 Reviewed by Darin Adler.
1350 * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
1351 (WebKit::DatabaseToWebProcessConnection::didClose):
1352 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1353 (WebKit::UniqueIDBDatabase::unregisterConnection):
1354 (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
1355 (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
1356 (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
1357 (WebKit::UniqueIDBDatabase::didEstablishTransaction):
1358 (WebKit::UniqueIDBDatabase::didResetTransaction):
1359 (WebKit::UniqueIDBDatabase::resetAllTransactions):
1360 (WebKit::UniqueIDBDatabase::finalizeRollback):
1361 (WebKit::UniqueIDBDatabase::absoluteDatabaseDirectory):
1362 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1363 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1364 (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
1366 2014-07-27 Yusuke Suzuki <utatane.tea@gmail.com>
1368 [GTK] Keep non-DATABASE_PROCESS build
1369 https://bugs.webkit.org/show_bug.cgi?id=135321
1371 Reviewed by Gyuyoung Kim.
1373 This is the patch for r171622 in non-DATABASE_PROCESS builds.
1374 Change sendToDatabaseProcessRelaunchingIfNecessary to support non-DATABASE_PROCESS implementation.
1377 * UIProcess/WebContext.h:
1378 (WebKit::WebContext::sendToDatabaseProcessRelaunchingIfNecessary):
1380 2014-07-27 Gavin Barraclough <baraclough@apple.com>
1382 Don't rely on reading applicationState from within DidEnterBackground/WillEnterForeground
1383 https://bugs.webkit.org/show_bug.cgi?id=135329
1384 rdar://problem/17818308
1386 Reviewed by Sam Weinig.
1388 API may not be stable.
1390 * UIProcess/ios/PageClientImplIOS.mm:
1391 (WebKit::PageClientImpl::isViewVisible):
1392 - changed to use -[WKContentView isBackground]
1393 * UIProcess/ios/ProcessAssertionIOS.mm:
1394 (-[WKProcessAssertionBackgroundTaskManager init]):
1395 - split notification handlers
1396 (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground:]):
1397 (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground:]):
1398 (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackgroundOrWillEnterForeground:]): Deleted.
1399 - Assume application is background is after DidEnterBackground, and not after WillEnterForeground
1400 * UIProcess/ios/WKContentView.h:
1401 - added isBackground.
1402 * UIProcess/ios/WKContentView.mm:
1403 (-[WKContentView initWithFrame:context:configuration:webView:]):
1404 - check applicationState at init.
1405 (-[WKContentView isBackground]):
1407 (-[WKContentView _applicationDidEnterBackground:]):
1408 (-[WKContentView _applicationWillEnterForeground:]):
1409 - update isBackground
1411 2014-07-26 Enrica Casucci <enrica@apple.com>
1413 [WebKit2 iOS]Add support for caret movement for the 3rd party keyboard protocol.
1414 https://bugs.webkit.org/show_bug.cgi?id=135325
1415 <rdar://problem/17682120>
1417 Reviewed by Sam Weinig.
1419 WKContentView now implements moveByOffset to support the
1420 protocol for 3rd party keyboards.
1422 * UIProcess/WebPageProxy.h:
1423 * UIProcess/ios/WKContentViewInteraction.mm:
1424 (-[WKContentView moveByOffset:]):
1425 * UIProcess/ios/WebPageProxyIOS.mm:
1426 (WebKit::WebPageProxy::moveSelectionByOffset):
1427 * WebProcess/WebPage/WebPage.h:
1428 * WebProcess/WebPage/WebPage.messages.in:
1429 * WebProcess/WebPage/ios/WebPageIOS.mm:
1430 (WebKit::WebPage::moveSelectionByOffset):
1432 2014-07-26 Timothy Horton <timothy_horton@apple.com>
1434 Crash in Web Content Process under ~PDFDocument under clearTouchEventListeners at topDocument()
1435 https://bugs.webkit.org/show_bug.cgi?id=135319
1436 <rdar://problem/17315168>
1438 Reviewed by Darin Adler and Antti Koivisto.
1440 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1441 (WebKit::WebFrameLoaderClient::committedLoad):
1442 Allow data through to WebCore for frames with custom content providers;
1443 the only custom content provider currently implemented is main frame PDF
1444 on iOS, which will end up creating a PDFDocument in WebCore, which drops all
1445 data on the floor immediately, so this won't result in WebCore doing anything
1446 with the data, but makes sure that more of the normal document lifecycle is maintained.
1448 In the future, we might want to consider ensuring that all custom content providers
1449 end up creating a SinkDocument or something similarly generic to ensure that
1450 WebCore doesn't try to do anything with their data, but for now, the only client is covered.
1452 2014-07-25 Jeremy Jones <jeremyj@apple.com>
1454 Parent fullscreen from window instead of view
1455 https://bugs.webkit.org/show_bug.cgi?id=135310
1457 Reviewed by Jer Noble.
1459 Parenting in the view causes an incorrect animation to fullscreen, and can cause
1460 fullscreen to only expand to the size of the view instead of the whole window.
1462 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1463 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass view's window.
1464 * WebProcess/ios/WebVideoFullscreenManager.mm: screenRect instead of clientRect
1465 (WebKit::screenRectForNode): was clientRectForNode
1466 (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): use screenRectForNode
1467 (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
1468 (WebKit::clientRectForNode): Deleted.
1470 2014-07-25 Oliver Hunt <oliver@apple.com>
1472 Creating incorrect sandbox extension for hsts plist due to missing /
1473 https://bugs.webkit.org/show_bug.cgi?id=135309
1475 Reviewed by Sam Weinig.
1477 So it turns out that you do actually need /'s in paths...
1478 Now we actually create the correct extension.
1480 * UIProcess/mac/WebContextMac.mm:
1481 (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
1483 2014-07-24 Anders Carlsson <andersca@apple.com>
1485 WKNavigation's properties are either always nil or don't behave as documented
1486 https://bugs.webkit.org/show_bug.cgi?id=135267
1487 <rdar://problem/17730536>
1489 Reviewed by Andreas Kling.
1491 Remove the properties from WKNavigation and introduce -[WKNavigation _request] as SPI for now.
1493 * Shared/API/Cocoa/WebKitPrivate.h:
1494 * UIProcess/API/Cocoa/WKNavigation.h:
1495 * UIProcess/API/Cocoa/WKNavigation.mm:
1496 (-[WKNavigation _request]):
1497 (-[WKNavigation initialRequest]): Deleted.
1498 (-[WKNavigation request]): Deleted.
1499 (-[WKNavigation setRequest:]): Deleted.
1500 (-[WKNavigation response]): Deleted.
1501 (-[WKNavigation error]): Deleted.
1502 * UIProcess/API/Cocoa/WKNavigationInternal.h:
1503 * UIProcess/API/Cocoa/WKNavigationPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationInternal.h.
1504 * UIProcess/Cocoa/NavigationState.mm:
1505 (WebKit::NavigationState::createLoadRequestNavigation):
1506 * WebKit2.xcodeproj/project.pbxproj:
1508 2014-07-25 Brady Eidson <beidson@apple.com>
1510 Clean up WKOriginDataManager and get it messaging to the DatabaseProcess
1511 https://bugs.webkit.org/show_bug.cgi?id=135035
1513 Reviewed by Sam Weinig.
1515 * DatabaseProcess/DatabaseProcess.cpp:
1516 (WebKit::DatabaseProcess::DatabaseProcess): Instantiate the WebOriginDataManager, installing its message handler.
1517 (WebKit::DatabaseProcess::didReceiveMessage): Try the message receiver map, which will try the WebOriginDataManager.
1518 * DatabaseProcess/DatabaseProcess.h:
1519 * DatabaseProcess/DatabaseProcess.messages.in:
1521 * UIProcess/API/C/WKOriginDataManager.cpp:
1522 (WKOriginDataManagerDeleteEntriesForOrigin): Updated to also take a callback.
1523 (WKOriginDataManagerDeleteEntriesModifiedBetweenDates): Added.
1524 (WKOriginDataManagerDeleteAllEntries): Updated to also take a callback.
1525 (WKOriginDataManagerStartObservingChanges): Deleted.
1526 (WKOriginDataManagerStopObservingChanges): Deleted.
1527 (WKOriginDataManagerSetChangeClient): Deleted.
1528 * UIProcess/API/C/WKOriginDataManager.h:
1530 * UIProcess/Databases/DatabaseProcessProxy.cpp:
1531 (WebKit::DatabaseProcessProxy::didReceiveMessage): Send messages to the WebOriginDataManagerProxy supplement if appropriate.
1532 * UIProcess/Databases/DatabaseProcessProxy.h:
1533 * UIProcess/Databases/DatabaseProcessProxy.messages.in:
1535 * UIProcess/WebContext.cpp:
1536 (WebKit::WebContext::WebContext): Instantiate the WebOriginDataManagerProxy supplement.
1537 * UIProcess/WebContext.h:
1538 (WebKit::WebContext::sendToDatabaseProcessRelaunchingIfNecessary):
1540 * UIProcess/WebOriginDataManagerProxy.cpp:
1541 (WebKit::WebOriginDataManagerProxy::contextDestroyed):
1542 (WebKit::WebOriginDataManagerProxy::processDidClose):
1543 (WebKit::WebOriginDataManagerProxy::getOrigins):
1544 (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin): Setup a callback with the message.
1545 (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates): Added
1546 (WebKit::WebOriginDataManagerProxy::didDeleteEntries): Call the callback.
1547 (WebKit::WebOriginDataManagerProxy::deleteAllEntries): Setup a callback with the message.
1548 (WebKit::WebOriginDataManagerProxy::didDeleteAllEntries): Call the callback.
1549 (WebKit::WebOriginDataManagerProxy::startObservingChanges): Deleted.
1550 (WebKit::WebOriginDataManagerProxy::stopObservingChanges): Deleted.
1551 (WebKit::WebOriginDataManagerProxy::setChangeClient): Deleted.
1552 (WebKit::WebOriginDataManagerProxy::didChange): Deleted.
1553 * UIProcess/WebOriginDataManagerProxy.h:
1554 * UIProcess/WebOriginDataManagerProxy.messages.in:
1556 * UIProcess/WebOriginDataManagerProxyChangeClient.cpp: Removed.
1557 * UIProcess/WebOriginDataManagerProxyChangeClient.h: Removed.
1559 * WebKit2.xcodeproj/project.pbxproj:
1561 * WebProcess/OriginData/WebOriginDataManager.cpp:
1562 (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Send the callback reply.
1563 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Added.
1564 (WebKit::WebOriginDataManager::deleteAllEntries): Send the callback reply.
1565 (WebKit::WebOriginDataManager::startObservingChanges): Deleted.
1566 (WebKit::WebOriginDataManager::stopObservingChanges): Deleted.
1567 * WebProcess/OriginData/WebOriginDataManager.h:
1568 * WebProcess/OriginData/WebOriginDataManager.messages.in:
1570 2014-07-25 Gavin Barraclough <baraclough@apple.com>
1572 Yosemite version number is 101000
1573 https://bugs.webkit.org/show_bug.cgi?id=135301
1575 Reviewed by Sam Weinig.
1577 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1578 (WebKit::connectToService):
1579 * WebProcess/com.apple.WebProcess.sb.in:
1581 2014-07-24 Benjamin Poulain <bpoulain@apple.com>
1583 [iOS][WK2] Do not try to hit test a null mainFrameRenderView on dynamicViewportSizeUpdate()
1584 https://bugs.webkit.org/show_bug.cgi?id=135277
1585 <rdar://problem/17804891>
1587 Reviewed by Tim Horton.
1589 * WebProcess/WebPage/ios/WebPageIOS.mm:
1590 (WebKit::WebPage::dynamicViewportSizeUpdate):
1591 There is no guarantee that the main frame have its root view when performing a dynamicViewportSizeUpdate(),
1592 we should not attempt to use the layer without null checking it first.
1594 The odd part for me is <rdar://problem/17804891> is a little too frequent. In the vast majority of cases,
1595 there is a RenderView, it seems actually pretty hard not to have one on dynamicViewportSizeUpdate().
1597 Skipping hit testing is safe because it is a completely optional part of this algorithm.
1598 When the hit test is not done, the new position is computed based on the relative position prior to
1601 2014-07-24 Dan Bernstein <mitz@apple.com>
1603 WebKit2 part of <rdar://problem/17593701> Assertion failure in WebPage::reload (!m_pendingNavigationID) when reloading after a same-document back navigation
1604 https://bugs.webkit.org/show_bug.cgi?id=135129
1606 Reviewed by Darin Adler.
1608 * Shared/WebBackForwardListItem.cpp:
1609 (WebKit::childItemWithDocumentSequenceNumber): New helper function based on
1610 WebCore::HistoryItem::childItemWithDocumentSequenceNumber.
1611 (WebKit::documentTreesAreEqual): New helper function based on
1612 WebCore::HistoryItem::hasSameDocumentTree.
1613 (WebKit::WebBackForwardListItem::itemIsInSameDocument): Added. Based on
1614 WebCore::HistoryItem::shouldDoSameDocumentNavigationTo.
1615 * Shared/WebBackForwardListItem.h:
1617 * UIProcess/WebPageProxy.cpp:
1618 (WebKit::WebPageProxy::goForward): Don’t assign a new navigation ID if the back-forward
1619 navigation is a same-document navigation.
1620 (WebKit::WebPageProxy::goBack): Ditto.
1621 (WebKit::WebPageProxy::goToBackForwardItem): Ditto.
1623 2014-07-24 Tim Horton <timothy_horton@apple.com>
1625 Sometimes WKWebView is blank after resuming the app, until you scroll
1626 https://bugs.webkit.org/show_bug.cgi?id=135275
1627 <rdar://problem/17803170>
1629 Reviewed by Benjamin Poulain.
1631 * UIProcess/WebPageProxy.cpp:
1632 (WebKit::WebPageProxy::dispatchViewStateChange):
1633 If the UI process is waiting for a didUpdateViewState, we need to *always*
1634 get a reply from the Web Process, so dispatchViewStateChange should *always*
1635 send SetViewState even if nothing changed (so that we get the reply).
1637 2014-07-24 Simon Fraser <simon.fraser@apple.com>
1639 [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
1640 https://bugs.webkit.org/show_bug.cgi?id=135221
1641 <rdar://problem/17542454>
1643 Reviewed by Benjamin Poulain.
1645 The call to didCommitLayerTree() can cause one or two visible rect updates,
1646 via changes to the UIScrollView contentSize and contentOffset. As a result, we
1647 would notify the scrolling tree about a viewport change, but using the old
1648 scrolling tree rather than the new one, so we could move layers around for
1649 nodes which are about to be removed from the tree.
1651 However, we also have to ensure that programmatic scrolls are applied after
1652 didCommitLayerTree() has updated the view size, so have RemoteScrollingCoordinatorProxy
1653 store data about programmatic scrolls and return them to the caller, which
1654 can apply them after didCommitLayerTree().
1656 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: Store a pointer to a RequestedScrollInfo
1657 for the duration of the tree update, so that we can store requested scroll info in it.
1658 (WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
1659 (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
1660 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):
1661 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1662 * UIProcess/WebPageProxy.cpp:
1663 (WebKit::WebPageProxy::didCommitLayerTree): Give Mac a stub implementation.
1664 * UIProcess/WebPageProxy.h: Group some editing-related functions together.
1665 (WebKit::WebPageProxy::editorState):
1666 (WebKit::WebPageProxy::canDelete):
1667 (WebKit::WebPageProxy::hasSelectedRange):
1668 (WebKit::WebPageProxy::isContentEditable):
1669 (WebKit::WebPageProxy::maintainsInactiveSelection):
1670 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1671 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): Ordering change: update
1672 the layer tree, then call didCommitLayerTree(), then do the viewport update, followed
1673 by any programmatic scroll.
1675 2014-07-24 Peyton Randolph <prandolph@apple.com>
1677 Rename feature flag for long-press gesture on Mac.
1678 https://bugs.webkit.org/show_bug.cgi?id=135259
1680 Reviewed by Beth Dakin.
1682 * Configurations/FeatureDefines.xcconfig:
1683 Rename LINK_LONG_PRESS to MAC_LONG_PRESS.
1685 2014-07-24 Dan Bernstein <mitz@apple.com>
1687 WebKit2 part of <rdar://problem/17766348> [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
1688 https://bugs.webkit.org/show_bug.cgi?id=135229
1690 Reviewed by Alexey Proskuryakov.
1692 * Shared/Cocoa/WKNSURLProtectionSpace.mm: Changed to use ProtectionSpace::nsSpace.
1694 * Shared/WebCoreArgumentCoders.cpp:
1695 (IPC::ArgumentCoder<ProtectionSpace>::encode): If encoding the space requires encoding the
1696 platform data, do that.
1697 (IPC::ArgumentCoder<ProtectionSpace>::decode): If platform data was encoded, decode it.
1698 * Shared/WebCoreArgumentCoders.h:
1700 * Shared/mac/WebCoreArgumentCodersMac.mm:
1701 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Archive the NSURLProtectionSpace.
1702 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Unarchive it.
1704 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
1705 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Added.
1706 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Added.
1708 2014-07-24 Benjamin Poulain <benjamin@webkit.org>
1710 [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
1711 https://bugs.webkit.org/show_bug.cgi?id=135227
1712 <rdar://problem/17279500>
1714 Reviewed by Simon Fraser.
1716 In some cases, a fixed or sticky positioned layer would end up at its position corresponding to the WebProcess
1717 instead of sticking the to real viewport in the UIProcess.
1719 The sequence of event is:
1720 1) A layer becomes fixed in some ScrollingTree transaction.
1721 2) Later, some change in the WebProcess causes a LayerTree update for that exact same layer, but no corresponding
1722 ScrollingTree update is made.
1723 3) In the UIProcess, the position of the fixed layer is changed due to the LayerTree update.
1724 But! There is no ScrollingTree change, updateScrollingTree() never sets fixedOrStickyLayerChanged to true,
1725 and the position is not corrected.
1726 -> The layer is now at the wrong position until the next VisibleContentRectUpdate.
1728 Ideally, we should have fixedOrStickyLayerChanged track if either the position or size of a fixed layer changed
1729 in the layer tree. This is tricky since the layer tree does not keep track of the fixed nodes of the scrolling tree.
1731 Since this complexity seems risky at this point, I went for something simpler but with more overhead:
1732 any time the scrolling tree contains either a fixed or sticky layer, viewportChangedViaDelegatedScrolling()
1733 is called to "fix" the position.
1735 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1736 (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
1737 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1738 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1739 (WebKit::RemoteScrollingCoordinatorProxy::hasFixedOrSticky):
1740 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1741 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1742 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1743 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1745 2014-07-24 Oliver Hunt <oliver@apple.com>
1747 Need to explicitly support location services in webcontent profile
1748 https://bugs.webkit.org/show_bug.cgi?id=135251
1751 Reviewed by Dan Bernstein.
1753 Switching to uikit-app means that we remove the implicit support
1754 for location services. This makes us explicitly opt-in.
1756 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1758 2014-07-24 Tim Horton <timothy_horton@apple.com>
1760 Crash at [WKContentView _applicationWillEnterForeground:] + 28
1761 <rdar://problem/17797103>
1763 Reviewed by Sam Weinig.
1765 * UIProcess/ios/WKContentView.mm:
1766 (-[WKContentView _applicationWillEnterForeground:]):
1767 Drawing area can be null; null check it!
1768 It's ok if we don't hide the content in this case, because if the drawing area is null,
1769 it doesn't have any layers in the tree anyway.
1771 2014-07-23 Simon Fraser <simon.fraser@apple.com>
1773 [iOS WK2] Some help.apple.com pages not scrollable
1774 https://bugs.webkit.org/show_bug.cgi?id=135228
1775 <rdar://problem/17790792>
1777 Reviewed by Benjamin Poulain.
1779 On pages which size their document to the device size, the WKContentView size
1780 never changes after it's created. In this situation, we never set a bounds
1781 on the _rootContentView, so it remains zero-sized which breaks hit testing
1782 on all enclosed UIScrollViews for overflow:scroll.
1784 Fix by making the _rootContentView and the _inspectorIndicationView use autosizing
1785 so they are always the size of their parent view, and remove the explicit setting
1788 * UIProcess/ios/WKContentView.mm:
1789 (-[WKContentView initWithFrame:context:configuration:webView:]):
1790 (-[WKContentView setShowingInspectorIndication:]):
1791 (-[WKContentView _didCommitLayerTree:]):
1793 2014-07-23 Benjamin Poulain <bpoulain@apple.com>
1795 [iOS][WK2] r171124 is incorrect when the virtual keyboard is up
1796 https://bugs.webkit.org/show_bug.cgi?id=135187
1798 Reviewed by Simon Fraser.
1800 Unfortunately, restricting the input into the document rect does not work.
1801 When the keyboard is up, the keyboard bounds can overlap the WKWebView, and
1802 the valid range should account for that.
1804 Instead of playing with the keyboard rect, we can limit the scroll position
1805 inside the valid range of UIScrollView. The keyboard always adjusts the UIScrollView
1806 range as needed to give access to the content. Using that range is a bit more permissive
1807 because the page could scroll to reveal content in the content inset defined by the client
1808 of the API (this could actually be quite useful for hybrid apps).
1810 There was already a function to change the content offset in the valid scrollview
1811 range: changeContentOffsetBoundedInValidRange(), I extracted the range check
1812 to contentOffsetBoundedInValidRange() for the needs of -[WKWebView _scrollToContentOffset:].
1814 So...contentOffsetBoundedInValidRange() is cool, but it is not in the right coordinate
1815 system. The scroll position we get from the WebProcess is in document coordinates, while
1816 contentOffsetBoundedInValidRange() works with the UIScrollView coordinates.
1817 To fix that, we scale the input position to get to the same scale as UIScrollView, then
1818 apply the insets with the weirdly named [WKWebView _adjustedContentOffset:].
1820 * UIProcess/API/Cocoa/WKWebView.mm:
1821 (contentOffsetBoundedInValidRange):
1822 (changeContentOffsetBoundedInValidRange):
1823 (-[WKWebView _scrollToContentOffset:]):
1825 2014-07-23 Commit Queue <commit-queue@webkit.org>
1827 Unreviewed, rolling out r171498.
1828 https://bugs.webkit.org/show_bug.cgi?id=135223
1830 It will regress some scroll position restoration on navigation
1831 (r167916). (Requested by smfr on #webkit).
1835 "[iOS WK2] Header bar on nytimes articles lands in the wrong
1836 place after rubberbanding"
1837 https://bugs.webkit.org/show_bug.cgi?id=135221
1838 http://trac.webkit.org/changeset/171498
1840 2014-07-23 Simon Fraser <simon.fraser@apple.com>
1842 [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
1843 https://bugs.webkit.org/show_bug.cgi?id=135221
1845 Reviewed by Tim Horton.
1847 The call to didCommitLayerTree() can cause one or two visible rect updates,
1848 via changes to the UIScrollView contentSize and contentOffset. As a result, we
1849 would notify the scrolling tree about a viewport change, but using the old
1850 scrolling tree rather than the new one, so we could move layers around for
1851 nodes which are about to be removed from the tree.
1853 Fix by m_webPageProxy->didCommitLayerTree() after the scrolling tree has been
1856 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1857 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1859 2014-07-23 Oliver Hunt <oliver@apple.com>
1861 Add a pseudo target to create sandbox override roots
1862 https://bugs.webkit.org/show_bug.cgi?id=135216
1865 Reviewed by Alexey Proskuryakov.
1867 Just a duplicate of the standard ios sandbox target, targetting
1868 the profile overrides directory. This means we can make roots
1871 * WebKit2.xcodeproj/project.pbxproj:
1873 2014-07-23 Oliver Hunt <oliver@apple.com>
1875 Incorrect commit for sandbox profile
1876 https://bugs.webkit.org/show_bug.cgi?id=135214
1879 Reviewed by Anders Carlsson.
1881 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1883 2014-07-23 Dan Bernstein <mitz@apple.com>
1885 <rdar://problem/17782623> [iOS] Client-certificate authentication isn’t working with some certificates
1886 https://bugs.webkit.org/show_bug.cgi?id=135206
1888 Reviewed by Anders Carlsson.
1890 * Shared/cf/ArgumentCodersCF.cpp:
1891 (IPC::copyPersistentRef): Added this helper function. It differs from
1892 SecKeyCopyPersistentRef in that if multiple copies of the key exist in the keychain, it
1893 ensures that we get a reference to the copy that is in the keychain access group that the
1894 Networking process can use.
1895 (IPC::encode): Use copyPersistentRef.
1897 2014-07-23 Bem Jones-Bey <bjonesbe@adobe.com>
1899 Remove CSS_EXCLUSIONS compile flag and leftover code
1900 https://bugs.webkit.org/show_bug.cgi?id=135175
1902 Reviewed by Zoltan Horvath.
1904 At this point, the CSS_EXCLUSIONS flag guards nothing but some useless
1905 stubs. This removes the flag and the useless code.
1907 * Configurations/FeatureDefines.xcconfig:
1909 2014-07-23 Timothy Horton <timothy_horton@apple.com>
1911 REGRESSION (r171239): Much more time spent taking snapshots during the PLT
1912 https://bugs.webkit.org/show_bug.cgi?id=135177
1913 <rdar://problem/17764847>
1915 Reviewed by Dan Bernstein.
1917 * UIProcess/WebPageProxy.cpp:
1918 (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
1919 (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
1920 * UIProcess/WebPageProxy.h:
1921 * UIProcess/WebPageProxy.messages.in:
1922 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1923 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
1924 * WebProcess/WebPage/WebPage.cpp:
1925 (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
1926 (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
1927 * WebProcess/WebPage/WebPage.h:
1928 Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
1929 Only send it when the current history item for the main frame changes.
1931 2014-07-23 Ryuan Choi <ryuan.choi@samsung.com>
1933 [EFL] EWebKit2.h should contain version information
1934 https://bugs.webkit.org/show_bug.cgi?id=135189
1936 Reviewed by Gyuyoung Kim.
1938 Generate EWebKit2.h to contain the version information.
1940 * PlatformEfl.cmake:
1941 * UIProcess/API/efl/EWebKit2.h.in: Renamed from Source/WebKit2/UIProcess/API/efl/EWebKit2.h.
1943 2014-07-23 Ryuan Choi <ryuan.choi@samsung.com>
1945 [EFL] Do not generate forwarding header for ewk headers
1946 https://bugs.webkit.org/show_bug.cgi?id=135147
1948 Reviewed by Gyuyoung Kim.
1950 Only EWebKit2.h and ewk_text_checker.h are generated as forwarding header.
1951 This is unnecessary.
1953 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
1954 * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
1955 * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
1956 * UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
1957 * UIProcess/efl/TextCheckerClientEfl.h:
1959 2014-07-22 Commit Queue <commit-queue@webkit.org>
1961 Unreviewed, rolling out r171366.
1962 https://bugs.webkit.org/show_bug.cgi?id=135190
1964 Broke three API tests (Requested by ap on #webkit).
1968 "REGRESSION (r171239): Much more time spent taking snapshots
1970 https://bugs.webkit.org/show_bug.cgi?id=135177
1971 http://trac.webkit.org/changeset/171366
1973 2014-07-22 Oliver Hunt <oliver@apple.com>
1975 Reduce the size of the root WebContent sandbox profile
1976 https://bugs.webkit.org/show_bug.cgi?id=135182
1977 <rdar://problem/17739108>
1979 Reviewed by Alexey Proskuryakov.
1981 Switch from apple-ui-app to uikit-app as the root of the webcontent
1984 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1986 2014-07-22 Jinwoo Song <jinwoo7.song@samsung.com>
1988 Unreviewed build fix on EFL port after r171356.
1990 Implement a dummy platformMediaCacheDirectory() to avoid undefined reference error.
1992 * UIProcess/efl/WebContextEfl.cpp:
1993 (WebKit::WebContext::platformMediaCacheDirectory):
1995 2014-07-22 Enrica Casucci <enrica@apple.com>
1997 REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track scrolling.
1998 https://bugs.webkit.org/show_bug.cgi?id=135180
1999 <rdar://problem/16721055>
2001 Reviewed by Simon Fraser.
2003 Adds notifications to the WKContentView to know when scrolling starts and ends
2004 in an overflow scroll. When scrolling starts, we hide the selection and we restore
2005 it when scrolling ends, though not before the selection information in the editor
2006 state has been updated.
2007 It also adds a new method to the EditorClient class to force the
2008 selection update when scrolling is completed.
2010 * UIProcess/PageClient.h:
2011 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2012 * UIProcess/Scrolling/RemoteScrollingTree.cpp:
2013 (WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartScroll):
2014 (WebKit::RemoteScrollingTree::scrollingTreeNodeDidEndScroll):
2015 * UIProcess/Scrolling/RemoteScrollingTree.h:
2016 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
2017 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2018 (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
2019 (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
2020 (-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]):
2021 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollWillStart):
2022 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollDidEnd):
2023 * UIProcess/WebPageProxy.h:
2024 * UIProcess/ios/PageClientImplIOS.h:
2025 * UIProcess/ios/PageClientImplIOS.mm:
2026 (WebKit::PageClientImpl::overflowScrollWillStartScroll):
2027 (WebKit::PageClientImpl::overflowScrollDidEndScroll):
2028 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2029 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll):
2030 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll):
2031 * UIProcess/ios/WKContentViewInteraction.h:
2032 * UIProcess/ios/WKContentViewInteraction.mm:
2033 (-[WKContentView _overflowScrollingWillBegin]):
2034 (-[WKContentView _overflowScrollingDidEnd]):
2035 (-[WKContentView _updateChangedSelection]):
2036 * UIProcess/ios/WebPageProxyIOS.mm:
2037 (WebKit::WebPageProxy::overflowScrollWillStartScroll):
2038 (WebKit::WebPageProxy::overflowScrollDidEndScroll):
2039 * WebProcess/WebCoreSupport/WebEditorClient.h:
2040 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2041 * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
2042 (WebKit::WebEditorClient::updateSelection):
2044 2014-07-22 Benjamin Poulain <bpoulain@apple.com>
2046 [iOS][WK2] WebPageProxy should not do anything when responding to an animated resize is the page is not in a valid state
2047 https://bugs.webkit.org/show_bug.cgi?id=135169
2048 <rdar://problem/17740149>
2050 Reviewed by Tim Horton.
2052 * UIProcess/ios/WebPageProxyIOS.mm:
2053 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2054 Neither m_dynamicViewportSizeUpdateWaitingForTarget nor m_dynamicViewportSizeUpdateWaitingForLayerTreeCommit should
2055 be modified if there is not WebProcess to respond to DynamicViewportSizeUpdate.
2057 (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
2058 We should not attempt to synchronize anything if the page was closed before the end of the dynamic viewport
2061 2014-07-22 Timothy Horton <timothy_horton@apple.com>
2063 REGRESSION (r171239): Much more time spent taking snapshots during the PLT
2064 https://bugs.webkit.org/show_bug.cgi?id=135177
2065 <rdar://problem/17764847>
2067 Reviewed by Dan Bernstein.
2069 * UIProcess/WebPageProxy.cpp:
2070 (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
2071 (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
2072 * UIProcess/WebPageProxy.h:
2073 * UIProcess/WebPageProxy.messages.in:
2074 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2075 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
2076 * WebProcess/WebPage/WebPage.cpp:
2077 (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
2078 (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
2079 * WebProcess/WebPage/WebPage.h:
2080 Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
2081 Only send it when the current history item for the main frame changes.
2083 2014-07-22 Oliver Hunt <oliver@apple.com>
2085 Add accountsd access to network sandbox profile
2086 https://bugs.webkit.org/show_bug.cgi?id=135176
2089 Reviewed by Anders Carlsson.
2091 This is available to the webcontent process already, but is also
2092 needed for the networking process.
2094 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2096 2014-07-22 Oliver Hunt <oliver@apple.com>
2098 Remove unused com.apple.webkit.* rules from profiles
2099 https://bugs.webkit.org/show_bug.cgi?id=135174
2102 Reviewed by Anders Carlsson.
2104 We never send these rules so we should just remove use of them
2107 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2108 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2110 2014-07-22 Oliver Hunt <oliver@apple.com>
2112 Provide networking process with access to its HSTS db
2113 https://bugs.webkit.org/show_bug.cgi?id=135121
2116 Reviewed by Alexey Proskuryakov.
2118 Add an extension parameter to pass the hsts database file.
2119 This requires us to create the Caches/com.apple.WebKit.Networking
2120 directory in the UI process, as the network sandbox
2121 does not allow it to create the containing directory.
2123 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2124 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2125 * Shared/Network/NetworkProcessCreationParameters.cpp:
2126 (WebKit::NetworkProcessCreationParameters::encode):
2127 (WebKit::NetworkProcessCreationParameters::decode):
2128 * Shared/Network/NetworkProcessCreationParameters.h:
2129 * UIProcess/WebContext.cpp:
2130 (WebKit::WebContext::ensureNetworkProcess):
2131 (WebKit::WebContext::networkingHSTSDatabasePath):
2132 * UIProcess/WebContext.h:
2133 * UIProcess/mac/WebContextMac.mm:
2134 (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
2136 2014-07-22 Benjamin Poulain <bpoulain@apple.com>
2138 [iOS][WK2] UI helpers that zoom on an element ignore the viewport's allowsUserScaling
2139 https://bugs.webkit.org/show_bug.cgi?id=135140
2140 <rdar://problem/17754921>
2142 Reviewed by Tim Horton.
2144 UIScrollView makes a difference between min/max zoom and allowUserScaling. To express that,
2145 everything is set up on the LayerTransaction.
2147 For zooming related helpers (find on page, double tap to zoom, etc), the min and max zoom
2148 should be the actual min/max for the current page state.
2150 This patch split the two explicitely.
2151 For layer transactions, the values are taken from the viewport configuration directly.
2152 For everything else, we should use minimumPageScaleFactor/maximumPageScaleFactor. Those two methods
2153 have been updated to take into account allowsUserScaling.
2155 * WebProcess/WebPage/WebPage.cpp:
2156 (WebKit::WebPage::willCommitLayerTree):
2157 * WebProcess/WebPage/ios/WebPageIOS.mm:
2158 (WebKit::WebPage::minimumPageScaleFactor):
2159 (WebKit::WebPage::maximumPageScaleFactor):
2160 (WebKit::WebPage::getAssistedNodeInformation):
2162 2014-07-22 Shivakumar JM <shiva.jm@samsung.com>
2164 Web Inspector: Fix unused parameter build warning
2165 https://bugs.webkit.org/show_bug.cgi?id=135151
2167 Reviewed by Joseph Pecoraro.
2169 Fix unused parameter build warning by removing the parameter name
2171 * WebProcess/WebPage/WebInspector.cpp:
2172 (WebKit::WebInspector::setJavaScriptProfilingEnabled):
2174 2014-07-22 Shivakumar JM <shiva.jm@samsung.com>
2176 Fix unused parameter build warning in UIProcess module
2177 https://bugs.webkit.org/show_bug.cgi?id=135154
2179 Reviewed by Alexey Proskuryakov.
2181 Fix unused parameter build warning in UIProcess module by using UNUSED_PARAM macro.
2183 * UIProcess/WebPageProxy.cpp:
2184 (WebKit::WebPageProxy::viewStateDidChange):
2186 2014-07-22 Jeremy Jones <jeremyj@apple.com>
2188 Don't create new UIWindow for video fullscreen.
2189 https://bugs.webkit.org/show_bug.cgi?id=135038
2191 Reviewed by Darin Adler.
2193 Use root UIView to parent fullscreen interface.
2195 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2196 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass parent UIView
2197 * WebProcess/ios/WebVideoFullscreenManager.mm:
2198 (WebKit::screenRectForNode): Use client rect instead of screen rect.
2200 2014-07-21 Ryuan Choi <ryuan.choi@samsung.com>
2202 [EFL] Add Ewk prefix to enums of ewk_navigation_policy
2203 https://bugs.webkit.org/show_bug.cgi?id=135144
2205 Reviewed by Gyuyoung Kim.
2207 All public enums of ewebkit should start with Ewk prefix.
2208 This patch added Ewk prefix to Ewk_Event_Mouse_Button and Ewk_Event_Modifiers.
2209 In addition, added missing description and default value for Ewk_Event_Modifier.
2211 * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
2212 (toEwkEventMouseButton):
2213 (toEwkEventModifiers):
2214 (EwkNavigationPolicyDecision::mouseButton):
2215 (EwkNavigationPolicyDecision::modifiers):
2216 (ewk_navigation_policy_mouse_button_get):
2217 (ewk_navigation_policy_modifiers_get):
2218 (toEventMouseButton): Deleted.
2219 (toEventModifierKeys): Deleted.
2220 * UIProcess/API/efl/ewk_navigation_policy_decision.h:
2221 * UIProcess/API/efl/ewk_navigation_policy_decision_private.h:
2223 2014-07-21 Benjamin Poulain <bpoulain@apple.com>
2225 [iOS][WK2] Improve event throttling for Scroll Events
2226 https://bugs.webkit.org/show_bug.cgi?id=135082
2227 <rdar://problem/17445266>
2229 Reviewed by Simon Fraser.
2231 In the WebKit layer, we want a measure that is representative of the responsiveness.
2233 In this patch, I use the total delay between a VisibleContentRectUpdate being dispatched
2234 by the UIProcess, and the time RemoteLayerTreeDrawingArea flushes the layer tree.
2236 The value used for eventThrottlingDelay() is computed by averaging the new value with
2237 the old values with a 80/20 split, favoring the old data. Favoring historical data
2238 over the last timing avoid excessively throttling for a single slow frame.
2240 The computation of m_estimatedMainThreadLatency can be improved in the future, this is
2241 a first cut keeping things simple.
2243 With m_estimatedMainThreadLatency in our hands, we can compute our eventThrottlingDelay().
2244 If m_estimatedMainThreadLatency is smaller than a single frame timespan, we have a fast page
2245 and nothing is throttled.
2247 If is it more than a frame, we throttle such that we can at least render two frames
2248 per event dispatch based on the historical data.
2250 The exact values will need some tweaking, but this set ensures well written pages get
2251 60 events per seconds, while slow pages do not waste too much time on events.
2253 * WebProcess/WebCoreSupport/WebChromeClient.h:
2254 * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
2255 (WebKit::WebChromeClient::eventThrottlingDelay):
2256 * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
2257 (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
2258 (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
2259 * WebProcess/WebPage/ViewUpdateDispatcher.h:
2260 * WebProcess/WebPage/WebPage.cpp:
2261 (WebKit::WebPage::WebPage):
2262 (WebKit::WebPage::didFlushLayerTreeAtTime):
2263 (WebKit::WebPage::didCommitLoad):
2264 * WebProcess/WebPage/WebPage.h:
2265 * WebProcess/WebPage/ios/WebPageIOS.mm:
2266 (WebKit::WebPage::eventThrottlingDelay):
2267 (WebKit::WebPage::updateVisibleContentRects):
2268 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2269 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2271 2014-07-21 Simon Fraser <simon.fraser@apple.com>
2273 REGRESSION (r170361): In landscape with UI hidden, fixed position elements at top of screen are too low
2274 https://bugs.webkit.org/show_bug.cgi?id=135141
2275 <rdar://problem/17627525>
2277 Reviewed by Benjamin Poulain.
2279 We can't use the WKWebView's UIScrollView contentInsets to determine the unobscured rect
2280 in MobileSafari, because contentInsets can't be changed dynamically while scrolling.
2281 To get around this, MobileSafari sets obscured insets instead (but also sets a fixed
2284 So if the client calls _setObscuredInsets:, always use _obscuredInsets to compute the
2287 * UIProcess/API/Cocoa/WKWebView.mm:
2288 (-[WKWebView _computedContentInset]):
2289 (-[WKWebView _setObscuredInsets:]):
2291 2014-07-21 Oliver Hunt <oliver@apple.com>
2293 Remove global cookie workaround from sandbox profiles
2294 https://bugs.webkit.org/show_bug.cgi?id=135138
2297 Reviewed by Alexey Proskuryakov.
2299 Remove the workaround needed for global cookie access, and silencing
2300 of the associated sandbox violation.
2302 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2303 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2304 * UIProcess/mac/WebContextMac.mm:
2305 (WebKit::WebContext::platformDefaultCookieStorageDirectory):
2307 2014-07-21 Oliver Hunt <oliver@apple.com>
2309 Correct sandbox profiles to fix some excess privileges
2310 https://bugs.webkit.org/show_bug.cgi?id=135134
2311 <rdar://problem/17741886>
2312 <rdar://problem/17739080>
2314 Reviewed by Alexey Proskuryakov.
2316 This cleans up our sandbox profiles to fix a few issues - the profiles
2317 no longer allow us to issue file extension we have the ability to consume,
2318 and tightens some of the other file access rules.
2320 This means we have to addd some rules to allow us to access things
2321 that we previously had access to due to lax file system restrictions.
2323 Some of the features were fixable simply by using entitlements on the
2324 process rather than custom rules.
2326 * Configurations/WebContent-iOS.entitlements:
2327 * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
2328 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2329 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2331 2014-07-21 Simon Fraser <simon.fraser@apple.com>
2333 [iOS WK2] Turn off position:fixed behavior when the keyboard is up
2334 https://bugs.webkit.org/show_bug.cgi?id=132537
2336 Reviewed by Benjamin Poulain.
2338 Make interaction with form elements inside position:fixed less terrible by re-laying out
2339 fixed elements relative to the document while we have an assisted node. This ensures
2340 that all parts of a position:fixed are accessible (e.g. inputs on the right side
2341 of a fixed-width top bar).
2343 * Shared/AssistedNodeInformation.cpp: Add a flag for being inside postion:fixed,
2344 and encode/decode it.
2345 (WebKit::AssistedNodeInformation::encode):
2346 (WebKit::AssistedNodeInformation::decode):
2347 * Shared/AssistedNodeInformation.h:
2348 (WebKit::AssistedNodeInformation::AssistedNodeInformation):
2349 * UIProcess/PageClient.h: Add isAssistingNode().
2350 * UIProcess/ios/PageClientImplIOS.h:
2351 * UIProcess/ios/PageClientImplIOS.mm:
2352 (WebKit::PageClientImpl::isAssistingNode):
2353 * UIProcess/ios/WebPageProxyIOS.mm:
2354 (WebKit::WebPageProxy::computeCustomFixedPositionRect): If we have an assisted
2355 node, just use the document rect as the custom fixed position rect.
2356 * WebProcess/WebPage/ios/WebPageIOS.mm:
2357 (WebKit::WebPage::getAssistedNodeInformation): Get the selection rect first,
2358 since we have to fix it up for position:fixed. If the element is inside fixed
2359 position in the main frame, re-set the fixed position rect to the document rect
2360 (which forces a layout), re-fetch elementRect, then set it back. This ensures
2361 that the UI process gets an elementRect which it can zoom to correctly.
2363 2014-07-21 Timothy Horton <timothy_horton@apple.com>
2365 Random crashes on the Web Thread due to Timers firing on the wrong thread in the UI process
2366 https://bugs.webkit.org/show_bug.cgi?id=135132
2367 <rdar://problem/17719832>
2369 Reviewed by Simon Fraser.
2371 * UIProcess/ProcessThrottler.cpp:
2372 (WebKit::ProcessThrottler::ProcessThrottler):
2373 (WebKit::ProcessThrottler::suspendTimerFired):
2374 * UIProcess/ProcessThrottler.h:
2375 * UIProcess/ios/ViewGestureControllerIOS.mm:
2376 (WebKit::ViewGestureController::ViewGestureController):
2377 (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
2378 * UIProcess/mac/ViewGestureController.h:
2379 * UIProcess/mac/ViewGestureControllerMac.mm:
2380 (WebKit::ViewGestureController::ViewGestureController):
2381 (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
2382 We can't use WebCore timers in the UI process because of coexistence concerns
2383 (they fire on the Web Thread if there is one!), so use RunLoop::Timer instead.
2385 2014-07-21 Andy Estes <aestes@apple.com>
2387 [iOS] Handle QuickLook ResourceLoaders in the web process
2388 https://bugs.webkit.org/show_bug.cgi?id=135113
2390 Reviewed by David Kilzer.
2392 The QuickLook framework registers a NSURLProtocol to handle loading subresources of the HTML documents it
2393 generates. In order for these loads to succeed, we need to start them in the same process in which QuickLook
2394 generated the main resource.
2396 * WebProcess/Network/WebResourceLoadScheduler.cpp:
2397 (WebKit::WebResourceLoadScheduler::scheduleLoad):
2399 2014-07-21 Brady Eidson <beidson@apple.com>
2401 DatabaseProcess doesn't relaunch after crashing.
2402 <rdar://problem/17717343> and https://bugs.webkit.org/show_bug.cgi?id=135117
2404 Reviewed by Alexey Proskuryakov.
2406 * UIProcess/Databases/DatabaseProcessProxy.cpp:
2407 (WebKit::DatabaseProcessProxy::didClose): Tell the WebContext.
2409 * UIProcess/WebContext.cpp:
2410 (WebKit::WebContext::databaseProcessCrashed): Notify supplements, then clear the DatabaseProcessProxy pointer.
2411 * UIProcess/WebContext.h:
2413 * UIProcess/WebContextSupplement.h:
2414 (WebKit::WebContextSupplement::processDidClose): Added. No users right now, but the patch in bug 135035 will need this.
2416 2014-07-20 KwangHyuk Kim <hyuki.kim@samsung.com>
2418 Fix warnings caused by unused parameter.
2419 https://bugs.webkit.org/show_bug.cgi?id=134975
2421 Reviewed by Gyuyoung Kim.
2423 Fix warnings on EwkView.cpp and LegacySessionStateCodingNone.cpp that are caused by unused parameter data.
2425 * UIProcess/API/efl/EwkView.cpp:
2426 (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
2427 * UIProcess/LegacySessionStateCodingNone.cpp:
2428 (WebKit::decodeLegacySessionState):
2430 2014-07-20 Jeremy Jones <jeremyj@apple.com>
2432 Disable ff/rw based on canPlayFastForward and canPlayFastRewind.
2433 https://bugs.webkit.org/show_bug.cgi?id=134894
2435 Reviewed by Darin Adler.
2437 Add setCanPlayFastReverse
2439 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: ditto
2440 * WebProcess/ios/WebVideoFullscreenManager.h: ditto
2441 * WebProcess/ios/WebVideoFullscreenManager.mm: ditto
2442 (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse): ditto
2444 2014-07-20 Jeremy Jones <jeremyj@apple.com>
2446 Decrease flicker when enter and exit fullscreen.
2447 https://bugs.webkit.org/show_bug.cgi?id=134919
2449 Reviewed by Simon Fraser.
2451 Change the sequence of tear down and use transparency to prevent flicker when entering and exiting fullscreen.
2453 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: wait to remove layerHost until didCleanupFullscreen
2454 (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen): removed from here
2455 (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): added here
2456 * WebProcess/ios/WebVideoFullscreenManager.mm:
2457 (WebKit::WebVideoFullscreenManager::didSetupFullscreen): use transparent background during transition
2459 2014-07-20 Dan Bernstein <mitz@apple.com>
2461 <rdar://problem/17739526> REGRESSION (r171057): Crash in WebPage::getPositionInformation()
2462 https://bugs.webkit.org/show_bug.cgi?id=135099
2464 Reviewed by David Kilzer.
2466 * WebProcess/WebPage/ios/WebPageIOS.mm:
2467 (WebKit::WebPage::getPositionInformation): Added a null check.
2469 2014-07-19 Zan Dobersek <zdobersek@igalia.com>
2471 Consistently use uint64_t as the handle parameter type for the SetAcceleratedCompositingWindowId message
2472 https://bugs.webkit.org/show_bug.cgi?id=135047
2474 Reviewed by Darin Adler.
2476 UIProcess' WebPageProxy is handling this parameter as an uint64_t, it should be handled as such
2477 in WebProcess as well.
2479 * WebProcess/WebPage/WebPage.h:
2480 * WebProcess/WebPage/WebPage.messages.in: Also changed the parameter name to match other places.
2481 * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2482 (WebKit::WebPage::setAcceleratedCompositingWindowId):
2484 2014-07-18 Oliver Hunt <oliver@apple.com>
2486 We don't provide an extension to the temp file used for uploads
2487 https://bugs.webkit.org/show_bug.cgi?id=135079
2489 Reviewed by Sam Weinig.
2491 Make sure didChooseFilesForOpenPanelWithDisplayStringAndIcon vends
2492 extensions for the files passed to the content process.
2494 * UIProcess/WebPageProxy.cpp:
2495 (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
2497 2014-07-18 Tim Horton <timothy_horton@apple.com>
2499 ASSERTion failures in ViewGestureController indicating that we're copying WebBackForwardList
2500 https://bugs.webkit.org/show_bug.cgi?id=135080
2501 <rdar://problem/17734714>
2503 Reviewed by Sam Weinig.
2505 * UIProcess/ios/ViewGestureControllerIOS.mm:
2506 (WebKit::ViewGestureController::beginSwipeGesture):
2507 (WebKit::ViewGestureController::canSwipeInDirection):
2509 2014-07-18 Yongjun Zhang <yongjun_zhang@apple.com>
2511 _WKActivatedElementInfo.title should fallback to innerText if the link doesn't have title attribute.
2512 https://bugs.webkit.org/show_bug.cgi?id=135077
2514 When populate InteractionInformationAtPosition's title value, use a link element's innerText if it
2515 doesn't have title attribute.
2517 Reviewed by Dan Bernstein.
2519 * WebProcess/WebPage/ios/WebPageIOS.mm:
2520 (WebKit::WebPage::getPositionInformation):
2522 2014-07-18 Andy Estes <aestes@apple.com>
2524 [iOS] Tapping "Allow Website" on a restricted page does not bring up the keypad
2525 https://bugs.webkit.org/show_bug.cgi?id=135072
2526 <rdar://problem/17528188>
2528 Reviewed by David Kilzer.
2530 * Shared/WebCoreArgumentCoders.h: Declared an ArgumentCoder for WebCore::ContentFilter.
2531 * Shared/mac/WebCoreArgumentCodersMac.mm:
2532 (IPC::ArgumentCoder<ContentFilter>::encode): Encoded the ContentFilter using a NSKeyedArchiver.
2533 (IPC::ArgumentCoder<ContentFilter>::decode): Decoded the ContentFilter using a NSKeyedUnarchiver.
2534 * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2535 (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Called WebFrameProxy::setContentFilterForBlockedLoad().
2536 * UIProcess/WebFrameProxy.cpp:
2537 (WebKit::WebFrameProxy::didStartProvisionalLoad): Reset m_contentFilterForBlockedLoad to nullptr.
2538 (WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction): Called ContentFilter::handleUnblockRequestAndDispatchIfSuccessful().
2539 If the unblock is successful, reload the WebPageProxy.
2540 * UIProcess/WebFrameProxy.h:
2541 (WebKit::WebFrameProxy::setContentFilterForBlockedLoad):
2542 * UIProcess/WebPageProxy.cpp:
2543 (WebKit::WebPageProxy::decidePolicyForNavigationAction): Check if this is navigation represents an unblock
2544 request and ignore if so.
2545 * UIProcess/WebPageProxy.h:
2546 * UIProcess/WebPageProxy.messages.in: Defined ContentFilterDidBlockLoadForFrame.
2547 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2548 (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad): Sent ContentFilterDidBlockLoadForFrame to the WebPageProxy.
2549 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2551 2014-07-18 Simon Fraser <simon.fraser@apple.com>
2553 [iOS WK2] position:fixed in iframes with programmatic scroll could end up in the wrong place
2554 https://bugs.webkit.org/show_bug.cgi?id=135078
2555 <rdar://problem/17401823>
2557 Reviewed by Tim Horton.
2559 Fix the logging of requested scroll position and frame scale factor.
2561 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2562 (WebKit::RemoteScrollingTreeTextStream::dump):
2564 2014-07-18 Joseph Pecoraro <pecoraro@apple.com>
2566 [Cocoa] Use RetainPtr in _WKRemoteObjectInterface
2567 https://bugs.webkit.org/show_bug.cgi?id=135062
2569 Reviewed by Anders Carlsson.
2571 Switch to RetainPtr instead of manual memory management of ivars.
2573 * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
2574 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
2575 (-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
2576 (-[_WKRemoteObjectInterface identifier]):
2577 (-[_WKRemoteObjectInterface description]):
2578 (-[_WKRemoteObjectInterface dealloc]): Deleted.
2580 2014-07-18 Tim Horton <timothy_horton@apple.com>
2582 Take navigation snapshots whenever the current back-forward item is going to change
2583 https://bugs.webkit.org/show_bug.cgi?id=135058
2584 <rdar://problem/17464515>
2586 Reviewed by Dan Bernstein.
2588 Instead of trying to have the UI process figure out when to take navigation snapshots by itself,
2589 snapshot whenever the Web process says that the current back-forward item is going to change.
2590 This fixes snapshotting timing with pushState, and lets us bottleneck snapshotting down to
2591 just two places instead of 5.
2593 * UIProcess/WebPageProxy.cpp:
2594 (WebKit::WebPageProxy::goForward):
2595 (WebKit::WebPageProxy::goBack):
2596 (WebKit::WebPageProxy::goToBackForwardItem):
2597 (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
2598 We no longer need to special-case taking navigation snapshots
2599 when the UI process changes the back forward item or upon
2600 didStartProvisionalLoadForFrame, because we'll always snapshot
2601 in willChangeCurrentHistoryItem in all of these cases.
2603 * UIProcess/WebPageProxy.cpp:
2604 (WebKit::WebPageProxy::willChangeCurrentHistoryItem):
2605 * UIProcess/WebPageProxy.h:
2606 * UIProcess/WebPageProxy.messages.in:
2607 Add willChangeCurrentHistoryItem message, which comes from the Web process.
2608 When it arrives, take a navigation snapshot.
2610 * UIProcess/ios/ViewGestureControllerIOS.mm:
2611 (WebKit::ViewGestureController::beginSwipeGesture):
2612 Take the pre-swipe navigation snapshot before telling WebPageProxy that we're doing a swipe,
2613 so that it doesn't bail from taking the snapshot because we have a snapshot up.
2615 (WebKit::ViewGestureController::endSwipeGesture):
2616 We no longer need to explicitly disable snapshotting while navigating, because
2617 we will avoid taking the snapshot if there's a snapshot being displayed.
2619 * UIProcess/mac/ViewGestureControllerMac.mm:
2620 (WebKit::ViewGestureController::~ViewGestureController):
2621 Remove the snapshot if it's still up when ViewGestureController is destroyed.
2622 The Mac version of ViewGestureController is destroyed on Web process crashes
2623 because it is a message receiver, so it is not guaranteed to have the same
2624 lifetime as the WebPageProxy and friends.
2626 (WebKit::ViewGestureController::trackSwipeGesture):
2627 Make use of recordNavigationSnapshot.
2629 (WebKit::ViewGestureController::endSwipeGesture):
2630 Ditto from the Mac version.
2632 * UIProcess/mac/ViewSnapshotStore.h:
2633 (WebKit::ViewSnapshotStore::disableSnapshotting): Deleted.
2634 (WebKit::ViewSnapshotStore::enableSnapshotting): Deleted.
2635 * UIProcess/mac/ViewSnapshotStore.mm:
2636 (WebKit::ViewSnapshotStore::ViewSnapshotStore):
2637 (WebKit::ViewSnapshotStore::recordSnapshot):
2638 Remove the snapshot disabling mechanism and bail from snapshotting if we're
2639 showing a snapshot, as mentioned above.
2641 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2642 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
2643 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2644 * WebProcess/WebPage/WebPage.cpp:
2645 (WebKit::WebPage::willChangeCurrentHistoryItem):
2646 * WebProcess/WebPage/WebPage.h:
2647 Proxy willChangeCurrentHistoryItem from HistoryController to the UI process.
2649 2014-07-18 Jon Honeycutt <jhoneycutt@apple.com>
2651 REGRESSION: Crash when typing into text field that clears itself on iOS
2653 <https://bugs.webkit.org/show_bug.cgi?id=135044>
2654 <rdar://problem/17640443>
2656 Reviewed by Darin Adler.
2658 * WebProcess/WebPage/ios/WebPageIOS.mm:
2659 (WebKit::WebPage::requestAutocorrectionData):
2660 wordRangeFromPosition() returns null in some cases; null check range
2661 before dereferencing it. Moved some variable declarations around to
2662 better match our style.
2664 2014-07-18 Tim Horton <timothy_horton@apple.com>
2666 [WK2] Provide a mechanism to grab the back-forward list for gesture navigation purposes from another WKWebView
2667 https://bugs.webkit.org/show_bug.cgi?id=134999
2668 <rdar://problem/17238025>
2670 Reviewed by Sam Weinig.
2672 In some cases, clients may need to throw a WKWebView with no back-forward list over
2673 another WKWebView, and want to participate in gesture swipe as if they were actually
2674 the page being overlaid.
2676 * UIProcess/API/Cocoa/WKWebView.mm:
2677 (-[WKWebView setAllowsBackForwardNavigationGestures:]):
2678 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2679 (-[WKWebViewConfiguration copyWithZone:]):
2680 (-[WKWebViewConfiguration _alternateWebViewForNavigationGestures]):
2681 (-[WKWebViewConfiguration _setAlternateWebViewForNavigationGestures:]):
2682 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2683 Keep an "alternate" WKWebView "for navigation gestures", which ViewGestureController
2684 will use as the real source of back-forward items, and the destination of the swipe navigation.
2685 All swipe delegate callbacks will also fire from the alternate view, because it owns the items
2686 and will be doing the navigation.
2688 * UIProcess/ios/ViewGestureControllerIOS.mm:
2689 (WebKit::ViewGestureController::setAlternateBackForwardListSourceView):
2690 (WebKit::ViewGestureController::beginSwipeGesture):
2691 Send navigationGestureDidBegin via the alternate view's WebPageProxy if it exists.
2692 Record a new snapshot on the current page, but copy it to the alternate view if necessary,
2693 so that when swiping forward from the alternate view, it will have the "right" snapshot.
2694 Get the target back forward item from the alternate view.
2695 Send navigationGestureWillEnd via the alternate view's WebPageProxy if it exists.
2697 (WebKit::ViewGestureController::canSwipeInDirection):
2698 Determine if we can swipe in a direction by looking at the alternate view's back-forward list if necessary.
2700 (WebKit::ViewGestureController::endSwipeGesture):
2701 Send navigationGestureDidEnd via the alternate view's WebPageProxy if it exists.
2702 Perform the navigation on the alternate view if necessary.
2704 (WebKit::ViewGestureController::removeSwipeSnapshot):
2705 Send navigationGestureSnapshotWasRemoved via the alternate view's WebPageProxy if it exists.
2707 * UIProcess/mac/ViewGestureController.h:
2709 2014-07-17 David Kilzer <ddkilzer@apple.com>
2711 SECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
2712 <http://webkit.org/b/135006>
2714 Reviewed by Darin Adler.
2716 * Configurations/Base.xcconfig: Move SECTORDER_FLAGS to
2718 * Configurations/DebugRelease.xcconfig: Remove empty
2719 SECTORDER_FLAGS definition.
2720 * Configurations/WebKit.xcconfig: Use $(CONFIGURATION) so
2721 SECTORDER_FLAGS is only set on Production builds.
2723 2014-07-17 Alexey Proskuryakov <ap@apple.com>
2725 REGRESSION (r171167): LoaderClient processDidCrash call is made after load state changes
2726 https://bugs.webkit.org/show_bug.cgi?id=135032
2727 <rdar://problem/17716602>
2729 Reviewed by Dan Bernstein.
2731 * UIProcess/WebPageProxy.cpp:
2732 (WebKit::WebPageProxy::processDidCrash): Create a transaction, so that the nested
2733 transaction in resetStateAfterProcessExited() wouldn't be committed.
2734 (WebKit::WebPageProxy::resetStateAfterProcessExited): Don't use auto - it was hiding
2735 the most important fact that this is a stack object that can't be simply moved to
2736 a different function.
2738 2014-07-17 Benjamin Poulain <bpoulain@apple.com>
2740 [iOS][WK2] Fix the updateVisibleContentRects synchronization for load after r171154
2741 https://bugs.webkit.org/show_bug.cgi?id=135036
2743 Reviewed by Dan Bernstein.
2745 * WebProcess/WebPage/ios/WebPageIOS.mm:
2746 (WebKit::WebPage::updateVisibleContentRects):
2747 I forgot to update one of the condition after changing from lastTransaction to next transaction
2750 2014-07-17 Enrica Casucci <enrica@apple.com>
2752 [REGRESSION WK2]The menu bar does not show up when tapping on the caret.
2753 https://bugs.webkit.org/show_bug.cgi?id=135023
2754 <rdar://problem/17617282>
2756 Reviewed by Benjamin Poulain and Ryosuke Niwa.
2758 WKContentView needs to implement hasContent to correctly show
2759 the appropriate menu bar content. The patch adds this information
2762 * Shared/EditorState.cpp:
2763 (WebKit::EditorState::encode):
2764 (WebKit::EditorState::decode):
2765 * Shared/EditorState.h:
2766 (WebKit::EditorState::EditorState):
2767 * UIProcess/ios/WKContentViewInteraction.mm:
2768 (-[WKContentView hasContent]):
2769 * WebProcess/WebPage/WebPage.cpp:
2770 (WebKit::WebPage::editorState):
2772 2014-07-17 Benjamin Poulain <benjamin@webkit.org>
2774 [iOS][WK2] Add SPI to do a dynamic viewport update without showing any content
2775 https://bugs.webkit.org/show_bug.cgi?id=135010
2777 Reviewed by Darin Adler.
2779 This patch add a new SPI, [WKWebView _resizeWhileHidingContentWithUpdates:] to perform all the work
2780 of a dynamic viewport size update, but instead of animating the old content, it is hidden.
2782 The patch is built on top of the animated resize mechanism. Instead of having an animation driving
2783 the beginning and end, we let the content do that. The dynamic resize begins, it runs for as long as
2784 the WebProcess needs, and it ends when first layer tree commit with the new content is processed.
2786 The attribute "_isAnimatingResize" is generalized to support two modes of resizing: animated and
2789 The attribute "_hasCommittedLoadForMainFrame" is rather silly. It is only needed because
2790 [WKWebView _resizeWhileHidingContentWithUpdates:] is intended to be called a lot before the page
2791 is initialized, and doing an animated resize would trash the WebProcess state.
2792 I wish I had a better solution, this is not great.
2794 * UIProcess/API/Cocoa/WKWebView.mm:
2795 (-[WKWebView _processDidExit]):
2796 (-[WKWebView _didCommitLoadForMainFrame]):
2797 (-[WKWebView _didCommitLayerTree:]):
2798 This is the key to make this work properly. We want _resizeWhileHidingContentWithUpdates: to behave
2799 exactly like an animated resize to avoid bugs. So we went to the whole update mechanism using
2800 _resizeAnimationTransformAdjustments to accumulate the adjustments, now we need to restore a correct
2803 Calling [WKWebView _endAnimatedResize] will do exactly that, but we need to make sure we do not hit
2804 the synchronization path or we would be blocked there for a while, which is what we are trying to avoid.
2806 After r171154, WebPageProxy keeps track of what stage of dynamic viewport update we are in. Since we are
2807 executing the layer tree update stage, with the right transaction ID, WebPageProxy already knows we have
2808 everything we need and does not use any synchronous messages.
2810 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
2811 (-[WKWebView _restorePageStateToExposedRect:scale:]):
2812 (-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
2813 (-[WKWebView _scrollToContentOffset:]):
2814 (-[WKWebView _frameOrBoundsChanged]):
2815 (-[WKWebView _updateVisibleContentRects]):
2816 (-[WKWebView _setMinimumLayoutSizeOverride:]):
2817 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
2818 (-[WKWebView _setInterfaceOrientationOverride:]):
2819 (-[WKWebView _setMaximumUnobscuredSizeOverride:]):
2820 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2821 (-[WKWebView _endAnimatedResize]):
2822 (-[WKWebView _resizeWhileHidingContentWithUpdates:]):
2823 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2825 2014-07-17 Brent Fulgham <bfulgham@apple.com>
2827 [Mac] Full screen video not always animating in the correct Space
2828 https://bugs.webkit.org/show_bug.cgi?id=135020
2829 <rdar://problem/17542310>
2831 Reviewed by Dean Jackson.
2833 The fullscreen window can "remember" the Space it was part of the first time you enter fullscreen
2834 mode. Subsequent fullscreen transitions will always start from this Space, even if you move
2835 the WebKit-hosted application to a different Space.
2837 We can help the display system know when we've moved to a new Space by calling NSWindow's
2838 'orderBack' method on the fullscreen window prior to starting the transition to fullscreen mode.
2839 This method call hooks the window into the current Space so everything works properly.
2841 * UIProcess/mac/WKFullScreenWindowController.mm:
2842 (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): Add the
2843 new fullscreen window to the current Space before starting transition to fullscreen.
2845 2014-07-17 Timothy Hatcher <timothy@apple.com>
2847 Make console.profile record to the Timeline.
2849 https://bugs.webkit.org/show_bug.cgi?id=134643
2851 Reviewed by Joseph Pecoraro.
2853 * WebProcess/WebPage/WebInspector.cpp:
2854 (WebKit::WebInspector::setJavaScriptProfilingEnabled):
2855 (WebKit::WebInspector::startJavaScriptProfiling):
2856 (WebKit::WebInspector::stopJavaScriptProfiling):
2858 2014-07-17 Brady Eidson <beidson@apple.com>
2860 Crash in ServicesOverlayController::~ServicesOverlayController.
2861 <rdar://problem/17622172> and https://bugs.webkit.org/show_bug.cgi?id=135022
2863 Reviewed by Tim Horton.
2865 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2866 (WebKit::ServicesOverlayController::~ServicesOverlayController): Don’t need to uninstall the
2867 PageOverlay as it has already been destroyed by this point in WebPage::~WebPage.
2869 2014-07-17 Tim Horton <timothy_horton@apple.com>
2871 Sometimes purgeable (or empty!) tiles are shown on screen when resuming the app
2872 https://bugs.webkit.org/show_bug.cgi?id=135018
2873 <rdar://problem/17615038>
2875 Reviewed by Simon Fraser.
2877 * UIProcess/DrawingAreaProxy.h:
2878 (WebKit::DrawingAreaProxy::hideContentUntilNextUpdate):
2879 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2880 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2881 (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate):
2882 * UIProcess/mac/RemoteLayerTreeHost.h:
2883 * UIProcess/mac/RemoteLayerTreeHost.mm:
2884 (WebKit::RemoteLayerTreeHost::detachRootLayer):
2885 Add a mechanism to "hide" drawing area content until the next commit,
2886 by detaching the root layer. RemoteLayerTreeHost will automatically reattach
2887 it at the next commit.
2889 * UIProcess/WebPageProxy.cpp:
2890 (WebKit::WebPageProxy::viewStateDidChange):
2891 * UIProcess/WebPageProxy.h:
2892 Add a parameter to viewStateDidChange specifying whether dispatching the change
2893 to the Web process is deferrable or not. We will also automatically use "Immediate" if
2894 the view is coming in-window, like we did before.
2896 * UIProcess/ios/WKContentView.mm:
2897 (-[WKContentView _applicationWillEnterForeground:]):
2898 Make use of the aforementioned new mechanisms to ensure that we immediately dispatch
2899 view state changes when coming into the foreground, and will have removed the root layer
2900 if a commit didn't come in while waitForDidUpdateViewState blocks.
2902 2014-07-17 Sanghyup Lee <sh53.lee@samsung.com>
2904 [EFL][WK2] Add a "focus,notfound" signal.
2905 https://bugs.webkit.org/show_bug.cgi?id=134674
2907 Reviewed by Gyuyoung Kim.
2909 Add a "focus,notfound" signal to handover focus control to application
2910 because there are no elements of webview to focus on the given direction.
2912 Application can decide to move the focus to next widget of ewk_view or something else
2913 by using this signal.
2915 * UIProcess/API/efl/EwkViewCallbacks.h:
2916 * UIProcess/API/efl/ewk_view.h:
2917 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Added keyDown and keyUp function.
2918 (EWK2UnitTest::EWK2UnitTestBase::waitUntilDirectionChanged):
2919 (EWK2UnitTest::EWK2UnitTestBase::keyDown):
2920 (EWK2UnitTest::EWK2UnitTestBase::keyUp):
2921 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
2922 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2923 (EWK2ViewTest::FocusNotFoundCallback):
2925 * UIProcess/efl/PageUIClientEfl.cpp: Removed unnecessary calls to evas_object_focus_set().
2926 (WebKit::PageUIClientEfl::takeFocus):
2928 2014-07-16 Brady Eidson <beidson@apple.com>
2930 Reintroduce the SPI _websiteDataURLForContainerWithURL: that was removed in r171160
2931 https://bugs.webkit.org/show_bug.cgi?id=134984
2933 Reviewed by David Kilzer.
2935 * UIProcess/API/Cocoa/WKProcessPool.mm:
2936 (+[WKProcessPool _websiteDataURLForContainerWithURL:]):
2937 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2939 2014-07-16 Alexey Proskuryakov <ap@apple.com>
2941 A test that hangs at cleanup stage confuses webkitpy hugely
2942 https://bugs.webkit.org/show_bug.cgi?id=122475
2943 <rdar://problem/17184354>
2945 Reviewed by Anders Carlsson.
2947 Reset m_pageLoadState when the process exits cleanly - otherwise messages from a
2948 new process for the same WebPageProxy would hit assertions.
2950 * UIProcess/WebPageProxy.cpp:
2951 (WebKit::WebPageProxy::processDidCrash):
2952 (WebKit::WebPageProxy::resetStateAfterProcessExited):
2954 2014-07-16 David Kilzer <ddkilzer@apple.com>
2956 [iOS] Update order file paths for WebKit and WebKit2
2957 <http://webkit.org/b/134993>
2958 <rdar://problem/17557776>
2960 Reviewed by Darin Adler.
2962 * Configurations/Base.xcconfig: Add order file for iOS
2965 2014-07-16 Brady Eidson <beidson@apple.com>
2967 Add WebSecurityOrigin "webSecurityOriginFromDatabaseIdentifier" SPI and change _websiteDataURLForContainerWithURL: SPI
2968 <rdar://problem/17454712> and https://bugs.webkit.org/show_bug.cgi?id=134984
2970 Reviewed by Dan Bernstein.
2972 Change _websiteDataURLForContainerWithURL: SPI to include an optional bundle identifier argument:
2973 * UIProcess/API/Cocoa/WKProcessPool.mm:
2974 (+[WKProcessPool _websiteDataURLForContainerWithURL:bundleIdentifierIfNotInContainer:]):
2975 (+[WKProcessPool _websiteDataURLForContainerWithURL:]): Deleted.
2976 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2978 Add a big shiny comment in a few key places:
2979 * DatabaseProcess/DatabaseProcess.cpp:
2980 (WebKit::DatabaseProcess::initializeDatabaseProcess):
2981 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2982 (WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
2983 * UIProcess/WebContext.cpp:
2984 (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
2985 (WebKit::WebContext::ensureDatabaseProcess):
2987 2014-07-16 Enrica Casucci <enrica@apple.com>
2989 REGRESSION (iOS WebKit2): Cannot scroll while dragging a selection.
2990 https://bugs.webkit.org/show_bug.cgi?id=134992
2991 <rdar://problem/17528020>
2993 Reviewed by Benjamin Poulain.
2995 This patch exposes the scroller and the visible content rect so that
2996 UIKit can implement autoscroll when dragging the selections.
2997 It also changes that way we do hit testing to allow hit test outside
2998 the clipping region and fixes the way we compute the selection rectangle
2999 for the block selection, ensuring that we consider also non text elements
3002 * UIProcess/ios/WKContentViewInteraction.mm:
3003 (-[WKContentView scroller]):
3004 (-[WKContentView visibleRect]):
3005 * WebProcess/WebPage/ios/WebPageIOS.mm:
3006 (WebKit::selectionBoxForRange):
3007 (WebKit::WebPage::rangeForWebSelectionAtPosition):
3008 (WebKit::WebPage::rangeForBlockAtPoint):
3009 (WebKit::WebPage::expandedRangeFromHandle):
3010 (WebKit::WebPage::contractedRangeFromHandle):
3011 (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
3012 (WebKit::WebPage::changeBlockSelection):
3014 2014-07-16 Alexey Proskuryakov <ap@apple.com>
3016 <rdar://problem/17669097> REGRESSION (r170155): Sandbox violations using a wrong
3017 CFNetwork cache path in WebContent process
3019 Rubber-stamped by Sam Weinig.
3021 Before r170155, we incorrectly checked usesNetworkProcess(), which always returns
3022 false at this point in initialization sequence. But we did the right thing, as we
3023 always need to set the cache path, even when network process is used for most loading.
3025 * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):
3027 2014-07-16 Timothy Horton <timothy_horton@apple.com>
3029 Dispatch top content inset changes immediately if synchronously waiting for view state changes
3030 ​https://bugs.webkit.org/show_bug.cgi?id=134942
3031 <rdar://problem/17666800>
3033 Reviewed by Simon Fraser.
3035 * UIProcess/API/mac/WKView.mm:
3036 (-[WKView _dispatchSetTopContentInset]):
3037 (-[WKView _setTopContentInset:]):
3038 Move the check from _setTopContentInset: to _dispatchSetTopContentInset
3039 that ensures that we only send the message if the top content inset changed.
3041 2014-07-16 Benjamin Poulain <bpoulain@apple.com>
3043 [iOS][WK2] Synchronize the dynamic viewport updates with their layer tree commit
3044 https://bugs.webkit.org/show_bug.cgi?id=134965
3045 Related to <rdar://problem/17082607>
3047 Reviewed by Tim Horton.
3049 Dynamic viewport update relies on the _resizeAnimationTransformAdjustments being applied
3050 to the page at the new size during the transition.
3052 Because of the races between the LayerTree Commit and DynamicViewportSizeUpdate, the transform
3053 can be applied to the wrong set of tiles.
3054 This is mostly a problem for unresponsive WebProcess or when the synchronization is done
3057 There is at least one more case that is not handled: if synchronizeDynamicViewportUpdate()
3058 completely fails to get the new page, the UIProcess is in a somewhat messy state.
3059 I will look into that separately than the layer tree synchronization.
3061 * UIProcess/API/Cocoa/WKWebView.mm:
3062 (-[WKWebView _didCommitLayerTree:]):
3063 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
3064 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]): Deleted.
3065 * UIProcess/API/Cocoa/WKWebViewInternal.h:
3066 * UIProcess/PageClient.h:
3067 * UIProcess/WebPageProxy.cpp:
3068 (WebKit::WebPageProxy::WebPageProxy):
3069 (WebKit::WebPageProxy::resetState):
3070 * UIProcess/WebPageProxy.h:
3071 * UIProcess/ios/PageClientImplIOS.h:
3072 * UIProcess/ios/PageClientImplIOS.mm:
3073 (WebKit::PageClientImpl::dynamicViewportUpdateChangedTarget):
3074 * UIProcess/ios/WebPageProxyIOS.mm:
3075 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
3076 (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
3077 (WebKit::WebPageProxy::didCommitLayerTree):
3078 (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
3079 * WebProcess/WebPage/WebPage.cpp:
3080 (WebKit::WebPage::WebPage):
3081 (WebKit::WebPage::didCommitLoad):
3082 * WebProcess/WebPage/WebPage.h:
3083 * WebProcess/WebPage/WebPage.messages.in:
3084 * WebProcess/WebPage/ios/WebPageIOS.mm:
3085 (WebKit::WebPage::synchronizeDynamicViewportUpdate):
3086 (WebKit::WebPage::updateVisibleContentRects):
3087 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3088 (WebKit::RemoteLayerTreeDrawingArea::nextTransactionID):
3089 (WebKit::RemoteLayerTreeDrawingArea::currentTransactionID): Deleted.
3091 2014-07-16 Dan Bernstein <mitz@apple.com>
3093 REGRESSION (r170653): Web Content service’s Info.plist has wrong format
3094 https://bugs.webkit.org/show_bug.cgi?id=134973
3096 Reviewed by Alexey Proskuryakov.
3098 * WebKit2.xcodeproj/project.pbxproj: Updated the Add CFBundle Localization Info.plist Key
3099 script build phases to convert Info.plist back to binary format if the
3100 PLIST_FILE_OUTPUT_FORMAT build setting requires it.
3102 2014-07-15 Benjamin Poulain <bpoulain@apple.com>
3106 * UIProcess/API/Cocoa/WKWebView.mm:
3107 (-[WKWebView _scrollToContentOffset:]):
3108 On landing, I changed the min/max branches to shrunkTo/expandedTo, but the return value
3109 of those was ignored.
3111 2014-07-15 Dan Bernstein <mitz@apple.com>
3113 WKWebView’s FormClient::willSubmitForm should use CompletionHandlerCallChecker
3114 https://bugs.webkit.org/show_bug.cgi?id=134951
3116 Reviewed by Tim Horton.
3118 * UIProcess/API/Cocoa/WKWebView.mm:
3119 (-[WKWebView _setFormDelegate:]):
3121 2014-07-15 Benjamin Poulain <benjamin@webkit.org>
3123 [iOS][WK2] Scrolling request from the scrolling tree must be limited to offsets in the document
3124 https://bugs.webkit.org/show_bug.cgi?id=134952
3125 <rdar://problem/17647116>
3127 Reviewed by Enrica Casucci.
3129 When we received a scroll request, we were taking that offset directly to set the UIScrollView
3130 scroll position. This is a problem if a page request scrolling to an invalid position, we were
3133 This patch limits the position to be inside the document.
3135 -- Why not limit the scroll offset in the WebProcess when we receive the scroll request? --
3137 Some pages rely on the page scale factor changing instantly, because that is how it worked
3140 On WebKit2, the WebProcess cannot know the valid range because the obscured insets are changing
3141 dynamically, and the page scale factor can change in response to WebProcess events (the focus
3142 changing for example). To make the page works, the WebProcess does not restrict the scroll position.
3144 In that architecture, the UIProcess has to sanitize the input, which was not done before this patch.
3146 -- Why not use changeContentOffsetBoundedInValidRange()?
3148 The scroll offset as seen by the page is relative to the unobscured rect. While the position used
3149 for history item is a visual position. All we need in this case is a position in the view.
3151 * UIProcess/API/Cocoa/WKWebView.mm:
3152 (-[WKWebView _scrollToContentOffset:]):
3153 * UIProcess/WebPageProxy.h:
3154 * UIProcess/ios/WebPageProxyIOS.mm:
3155 (WebKit::WebPageProxy::resendLastVisibleContentRects):
3157 2014-07-15 Timothy Horton <timothy_horton@apple.com>
3159 Dispatch top content inset changes immediately if synchronously waiting for view state changes
3160 https://bugs.webkit.org/show_bug.cgi?id=134942
3161 <rdar://problem/17666800>
3163 Reviewed by Simon Fraser.
3165 * UIProcess/API/mac/WKView.mm:
3166 (-[WKView endDeferringViewInWindowChanges]):
3167 (-[WKView endDeferringViewInWindowChangesSync]):
3168 (-[WKView _dispatchSetTopContentInset]):
3169 (-[WKView _setTopContentInset:]):
3170 Send top content inset changes immediately before sync-waiting for new tiles from the Web Process.
3171 This will ensure that the incoming contents have the right top content inset, and we don't
3172 flash between the wrong inset and the right one.
3174 2014-07-15 Enrica Casucci <enrica@apple.com>
3176 REGRESSION(WK2 iOS): Safari hangs when switching focus from a field using the Tab key.
3177 https://bugs.webkit.org/show_bug.cgi?id=134934
3178 <rdar://problem/17224638>
3180 Reviewed by Tim Horton.
3182 * UIProcess/ios/WKContentViewInteraction.mm:
3184 Tab and back tab should be handled as special keys that have
3185 a command associated. The command specifies for each key the relevant
3186 action. This patch implements the commands property to create the association
3187 between key and command and the relevant actions that will execute the same
3188 code executed when the used taps on the < > buttons in the accessory bar.
3190 (-[WKContentView keyCommands]):
3191 (-[WKContentView _nextAccessoryTab:]):
3192 (-[WKContentView _prevAccessoryTab:]):
3194 2014-07-15 Oliver Hunt <oliver@apple.com>
3196 More tidying of the webcontent sandbox profile
3197 https://bugs.webkit.org/show_bug.cgi?id=134938
3199 Reviewed by Alexey Proskuryakov.
3201 Remove some excessive abilities from the profile and make
3202 the required ones explicit.
3204 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3206 2014-07-14 Andreas Kling <akling@apple.com>
3208 [iOS] Don't progressively re-render tiles while pinch-zooming under memory pressure.
3209 <https://webkit.org/b/134915>
3211 When we're under memory pressure, the last thing we want to be doing is
3212 creating gratuitous new IOSurfaces. Just wait for the gesture to end before
3213 rendering at the new scale.
3215 Reviewed by Tim Horton.
3217 * WebProcess/WebPage/ios/WebPageIOS.mm:
3218 (WebKit::WebPage::updateVisibleContentRects):
3220 2014-07-14 Joseph Pecoraro <pecoraro@apple.com>
3222 [Cocoa] _WKRemoteObjectInterface leaks NSString ivar
3223 https://bugs.webkit.org/show_bug.cgi?id=134914
3225 Reviewed by Simon Fraser.
3227 Release our copied NSString in dealloc.
3229 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
3230 (-[_WKRemoteObjectInterface dealloc]):
3232 2014-07-14 Dean Jackson <dino@apple.com>
3234 [PlugIns] Check for a non-null snapshot image before trying to decode it
3235 https://bugs.webkit.org/show_bug.cgi?id=134913
3236 <rdar://problem/17606033>
3238 Reviewed by Tim Horton.
3240 Changeset r169820 introduced a bug where we could examine the pixels of
3241 an image (looking for solid colors) before checking if the image actually
3244 I added a null check, and moved the code around a bit to avoid checking
3245 for existence three times.
3247 * WebProcess/Plugins/PluginView.cpp:
3248 (WebKit::PluginView::pluginSnapshotTimerFired): Check that snapshotImage exists
3249 before trying to look at it.
3251 2014-07-14 Anders Carlsson <andersca@apple.com>
3255 * UIProcess/Cocoa/SessionStateCoding.mm:
3256 (WebKit::encodeSessionState):
3258 2014-07-14 Anders Carlsson <andersca@apple.com>
3260 Use the legacy session coder for encoding/decoding session state
3261 https://bugs.webkit.org/show_bug.cgi?id=134910
3263 Reviewed by Beth Dakin.
3265 * UIProcess/Cocoa/SessionStateCoding.mm:
3266 (WebKit::encodeSessionState):
3267 (WebKit::decodeSessionState):
3269 2014-07-14 Oliver Hunt <oliver@apple.com>
3271 Restrict network process to remote connections
3272 https://bugs.webkit.org/show_bug.cgi?id=134908
3274 Reviewed by Geoffrey Garen.
3276 Further restrict network client
3278 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
3280 2014-07-14 Tim Horton <timothy_horton@apple.com>
3282 ASSERT(isMainThread()) under OneShotDisplayLinkHandler
3283 https://bugs.webkit.org/show_bug.cgi?id=134900
3285 Reviewed by Simon Fraser.
3287 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3288 (-[OneShotDisplayLinkHandler displayLinkFired:]):
3289 isMainThread means the Web thread sometimes.
3291 2014-07-14 Tim Horton <timothy_horton@apple.com>
3295 * UIProcess/API/Cocoa/WKWebView.mm:
3296 (-[WKWebView _frameOrBoundsChanged]):
3297 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3298 * UIProcess/API/ios/WKViewIOS.mm:
3299 (-[WKView _frameOrBoundsChanged]):
3301 2014-07-14 Carlos Alberto Lopez Perez <clopez@igalia.com>
3303 [UNIX] Log error description when failing to create shared memory file.
3304 https://bugs.webkit.org/show_bug.cgi?id=134892
3306 Reviewed by Darin Adler.
3308 * Platform/unix/SharedMemoryUnix.cpp:
3309 (WebKit::SharedMemory::create): Print the string describing the error number (errno).
3311 2014-07-14 Benjamin Poulain <benjamin@webkit.org>
3313 [iOS][WK2] On rotation, RemoteLayerTreeDrawingArea renders one extra frame at the wrong orientation
3314 https://bugs.webkit.org/show_bug.cgi?id=134875
3316 Reviewed by Tim Horton.
3318 On animated resize, the size of the DrawingAreaProxy was changed before the layout parameters were
3319 changed. This in turn caused the WebProcess's DrawingArea to flush the layer tree while still
3320 at the wrong orientation.
3322 This patch fixes the issue by making a special case for animated resize:
3323 -While starting animated resize, _frameOrBoundsChanged can be called several times in response to
3324 the API's client changing the WKWebView. In that case, we do not update the drawing area.
3325 -After the "updateBlock" is executed and the size have been changed, the dynamic viewport update
3326 is computed, the dynamicViewportSizeUpdate is sent to the WebProcess, followed by the message
3327 DrawingArea::updateGeometry(). Since both messages are asynchronous, they are received in that
3328 order, and the updateGeometry() is always done after the viewport configuration has been updated.
3330 * UIProcess/API/Cocoa/WKWebView.mm:
3331 (-[WKWebView _frameOrBoundsChanged]):
3332 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3333 * UIProcess/ios/WKContentView.h:
3334 * UIProcess/ios/WKContentView.mm:
3335 (-[WKContentView setMinimumSize:]): Deleted.
3337 2014-07-14 Benjamin Poulain <bpoulain@apple.com>
3339 [iOS][WK2] Fix withinEpsilon()
3340 https://bugs.webkit.org/show_bug.cgi?id=134798
3342 Reviewed by Darin Adler.
3344 Move the function back to WKWebView, it is no longer needed in WKContentView.
3346 Use the real types as input to properly verify that the two inputs are within
3347 a small value of the 32bit floating point.
3349 The epsilon we use is always on 32 bits float because we want to avoid doing work for changes
3350 that would not make any difference on float.
3352 The source of those small changes comes from the fact UIProcess does a lot of processing
3353 on CGFloat, which are double on 64bits architecture, while the WebProcess use 32bits floating point
3354 for scale. When we are getting updates from the WebProcess, we should ignore any small differences
3355 caused by the computations done with less precision.
3357 * UIProcess/API/Cocoa/WKWebView.mm:
3359 * UIProcess/ios/WKContentViewInteraction.h:
3360 (withinEpsilon): Deleted.
3362 2014-07-14 Bear Travis <betravis@adobe.com>
3364 [Feature Queries] Enable Feature Queries on Mac
3365 https://bugs.webkit.org/show_bug.cgi?id=134404
3367 Reviewed by Antti Koivisto.
3369 Enable Feature Queries on Mac and resume running the
3372 * Configurations/FeatureDefines.xcconfig: Turn on
3373 ENABLE_CSS3_CONDITIONAL_RULES.
3375 2014-07-14 Anders Carlsson <andersca@apple.com>
3377 Make shouldKeepCurrentBackForwardListItemInList part of WKPageLoaderClientV5 to avoid breaking ABI
3378 https://bugs.webkit.org/show_bug.cgi?id=134889
3380 Reviewed by Beth Dakin.
3382 * UIProcess/API/C/WKPage.cpp:
3383 * UIProcess/API/C/WKPageLoaderClient.h:
3385 2014-07-14 Dan Bernstein <mitz@apple.com>
3387 REGRESSION (r171045): Reproducible crash on navigation in PageClientImpl::willRecordNavigationSnapshot
3388 https://bugs.webkit.org/show_bug.cgi?id=134887
3390 Reviewed by Tim Horton.
3392 * UIProcess/mac/PageClientImpl.mm:
3393 (WebKit::PageClientImpl::navigationGestureDidBegin): nil-check m_webView. It can be nil when
3394 the client is using WKView directly.
3395 (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
3396 (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
3397 (WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.
3399 2014-07-14 Eric Carlson <eric.carlson@apple.com>
3401 [Mac] don't enable low power audio mode on external output devices
3402 https://bugs.webkit.org/show_bug.cgi?id=134877
3404 Reviewed by Sam Weinig.
3406 * PluginProcess/PluginProcess.h: Add an empty implementation of
3407 AudioHardwareListener::audioOutputDeviceChanged.
3409 2014-07-14 Tim Horton <timothy_horton@apple.com>
3411 [iOS] Throttle painting using a UI-process-side CADisplayLink
3412 https://bugs.webkit.org/show_bug.cgi?id=134879
3413 <rdar://problem/17641699>
3415 Reviewed by Simon Fraser.
3417 Just waiting for CA to commit is insufficient to actually throttle to 60fps,
3418 because nothing will block the main runloop from spinning.
3420 Instead, listen to a CADisplayLink, and send didUpdate to the WebProcess
3421 the first time it fires after we commit. This is not a guarantee that
3422 our content is on the screen, but we don't have any way to make that guarantee yet.
3424 This will throttle painting, rAF, etc. to the display refresh rate.
3426 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3427 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3428 (-[OneShotDisplayLinkHandler initWithDrawingAreaProxy:]):
3429 (-[OneShotDisplayLinkHandler dealloc]):
3430 (-[OneShotDisplayLinkHandler displayLinkFired:]):
3431 (-[OneShotDisplayLinkHandler invalidate]):
3432 (-[OneShotDisplayLinkHandler schedule]):
3433 (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
3434 (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
3435 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
3436 (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
3437 (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers): Deleted.
3439 2014-07-14 Dan Bernstein <mitz@apple.com>
3441 <rdar://problem/17657391> [iOS] Networking process writes persistent credentials to the keychain
3442 https://bugs.webkit.org/show_bug.cgi?id=134878