1 2014-08-07 Enrica Casucci <enrica@apple.com>
3 [Services with UI] Action menu does not appear if selection includes both text and an image.
4 https://bugs.webkit.org/show_bug.cgi?id=135731
5 <rdar://problem/17837491>
7 Reviewed by Brady Eidson.
9 Adding a new setting to ServicesController to communicate to the WebProcess if
10 there are services installed that can handle a combination of text and images.
11 This way ServicesOverlayController can decide if it appropriate to show the hightlight
12 based on the type of selection (text only or non text only). This information is retrieved
13 when the selection rects are collected by SelectionGatherer and used by
14 SelectionGatherer::Notifier to communicate the selection change.
16 * Shared/WebProcessCreationParameters.cpp:
17 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
18 * Shared/WebProcessCreationParameters.h:
19 * UIProcess/mac/ServicesController.h:
20 (WebKit::ServicesController::hasRichContentServices):
21 * UIProcess/mac/ServicesController.mm:
22 (WebKit::ServicesController::ServicesController):
23 (WebKit::ServicesController::refreshExistingServices):
24 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
25 (WebKit::WebEditorClient::selectionRectsDidChange):
26 * WebProcess/WebCoreSupport/WebEditorClient.h:
27 * WebProcess/WebPage/ServicesOverlayController.h:
28 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
29 (WebKit::ServicesOverlayController::ServicesOverlayController):
30 (WebKit::ServicesOverlayController::selectionRectsDidChange):
31 (WebKit::ServicesOverlayController::drawSelectionHighlight):
32 * WebProcess/WebProcess.cpp:
33 (WebKit::WebProcess::WebProcess):
34 (WebKit::WebProcess::initializeWebProcess):
35 (WebKit::WebProcess::setEnabledServices):
36 * WebProcess/WebProcess.h:
37 (WebKit::WebProcess::hasRichContentServices):
38 * WebProcess/WebProcess.messages.in:
40 2014-08-07 Ryuan Choi <ryuan.choi@samsung.com>
42 [EFL] Fix several warnings of doxygen
43 https://bugs.webkit.org/show_bug.cgi?id=135643
45 Reviewed by Gyuyoung Kim.
47 * UIProcess/API/efl/ewk_context_menu_item.h: Removed /info which is not doxygen keyword and unnecessary to the user.
48 * UIProcess/API/efl/ewk_cookie_manager.h: Fixed parameter name.
49 * UIProcess/API/efl/ewk_form_submission_request.h: Removed # from Eina_List because doxygen may not know the EFL structures.
50 * UIProcess/API/efl/ewk_page_group.h: Fixed to match with parameter name.
51 * UIProcess/API/efl/ewk_settings.h: Fixed wrong keyword and parameter name.
52 * UIProcess/API/efl/ewk_text_checker.h: Ditto.
53 * UIProcess/API/efl/ewk_view.h:
54 - Used escape string for the tag.
55 - Used @code, @endcode for media query example.
57 2014-08-07 Benjamin Poulain <bpoulain@apple.com>
59 Get rid of INPUT_SPEECH
60 https://bugs.webkit.org/show_bug.cgi?id=135672
62 Reviewed by Andreas Kling.
64 * Configurations/FeatureDefines.xcconfig:
67 2014-08-07 Timothy Hatcher <timothy@apple.com>
69 Web Inspector: Update glyphs to be more like Xcode 6
70 https://bugs.webkit.org/show_bug.cgi?id=135705
72 Reviewed by Joseph Pecoraro.
74 * Resources/DockBottom.pdf: Added.
75 * Resources/DockBottomLegacy.pdf: Copied from Source/WebKit/mac/Resources/Dock.pdf.
76 * Resources/DockRight.pdf: Added.
77 * Resources/DockRightLegacy.pdf: Copied from Source/WebKit2/Resources/DockRight.pdf.
78 * UIProcess/mac/WebInspectorProxyMac.mm:
79 (WebKit::WebInspectorProxy::createInspectorWindow): Use new images.
80 * WebKit2.xcodeproj/project.pbxproj: Added new images.
82 2014-08-07 Oliver Hunt <oliver@apple.com>
84 WebContent needs access to HSTS database due to some networking still being performed in process
85 https://bugs.webkit.org/show_bug.cgi?id=135711
88 Reviewed by Alexey Proskuryakov.
90 Simple patch in the same theme as the equivalent network process
91 extension. Provide an extension that covers the WebContent specific
92 HSTS file and consume it on launch.
94 * Shared/WebProcessCreationParameters.cpp:
95 (WebKit::WebProcessCreationParameters::encode):
96 (WebKit::WebProcessCreationParameters::decode):
97 * Shared/WebProcessCreationParameters.h:
98 * UIProcess/WebContext.cpp:
99 (WebKit::WebContext::createNewWebProcess):
100 * UIProcess/WebContext.h:
101 * UIProcess/mac/WebContextMac.mm:
102 (WebKit::WebContext::webContentHSTSDatabasePath):
103 * WebProcess/cocoa/WebProcessCocoa.mm:
104 (WebKit::WebProcess::platformInitializeWebProcess):
106 2014-08-07 Gordon Sheridan <gordon_sheridan@apple.com>
108 Clear the m_previousItem member of HistoryControllers when it matches the HistoryItem being removed.
109 https://bugs.webkit.org/show_bug.cgi?id=135634
110 <rdar://problem/17388461>
112 Reviewed by Brady Eidson.
114 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
115 (WebKit::WebBackForwardListProxy::removeItem):
116 Call WebCore::Page::clearPreviousItemFromAllPages() for each item removed from
117 the back/forward list to ensure the page URL is released from IconDatabase.
119 2014-08-07 Carlos Garcia Campos <cgarcia@igalia.com>
121 [GTK] Use WebKitNavigationAction also for WebKitNavigationPolicyDecision
122 https://bugs.webkit.org/show_bug.cgi?id=135695
124 Reviewed by Gustavo Noronha Silva.
126 WebKitNavigationAction was introduced to extend WebKitWebView::create signal
127 and its API is mostly duplicated in WebKitNavigationPolicyDecision.
128 Use WebKitNavigationAction insternally in WebKitNavigationPolicyDecision and
129 deprecated all the duplicated API in favor of a single property navigation-action.
131 * UIProcess/API/gtk/WebKitDefines.h: Remove unused macro
132 WEBKIT_OBSOLETE and add WEBKIT_DEPRECATED and WEBKIT_DEPRECATED_FOR.
133 * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
134 (_WebKitNavigationPolicyDecisionPrivate::~_WebKitNavigationPolicyDecisionPrivate):
135 Free the WebKitNavigationAction.
136 (webkitNavigationPolicyDecisionGetProperty): Add getter for
137 navigation-action and use WebKitNavigationAction in all other getters.
138 (webkit_navigation_policy_decision_class_init): Add navigation-action
139 property and deprecated all others except frame-name.
140 (webkit_navigation_policy_decision_get_navigation_action): Return the WebKitNavigationAction.
141 (webkit_navigation_policy_decision_get_navigation_type): Use WebKitNavigationAction.
142 (webkit_navigation_policy_decision_get_mouse_button): Ditto.
143 (webkit_navigation_policy_decision_get_modifiers): Ditto.
144 (webkit_navigation_policy_decision_get_request): Ditto.
145 (webkitNavigationPolicyDecisionCreate):
146 (webkitNewWindowPolicyDecisionCreate):
147 * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
148 * UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h:
149 * UIProcess/API/gtk/WebKitPolicyClient.cpp: Use a custom
150 PolicyClient class so that we receive a NavigationActionData in
152 (attachPolicyClientToView):
153 (toWebKitNavigationType): Deleted.
154 (decidePolicyForNavigationAction): Deleted.
155 (decidePolicyForNewWindowAction): Deleted.
156 (decidePolicyForResponse): Deleted.
157 * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
158 (webkitResponsePolicyDecisionCreate):
159 * UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h:
160 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
162 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
164 2014-08-06 Antti Koivisto <antti@apple.com>
166 Move Soup specific code out of WebCoreArgumentCoders.cpp
167 https://bugs.webkit.org/show_bug.cgi?id=135665
169 Reviewed by Anders Carlsson.
171 * Shared/WebCoreArgumentCoders.cpp:
172 (IPC::ArgumentCoder<ResourceRequest>::encode):
173 (IPC::ArgumentCoder<ResourceRequest>::decode):
174 (IPC::ArgumentCoder<ResourceError>::encode):
175 (IPC::ArgumentCoder<ResourceError>::decode):
176 * Shared/WebCoreArgumentCoders.h:
178 Soup is the only client for this code. Move it to *Soup.cpp
180 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
181 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
182 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
183 (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
184 (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
186 2014-08-06 Tim Horton <timothy_horton@apple.com>
188 Services overlay flashes a lot; should have some hysteresis before showing overlay
189 https://bugs.webkit.org/show_bug.cgi?id=135683
190 <rdar://problem/16878039>
192 Reviewed by Simon Fraser.
194 Don't show the highlight until it's been 200ms since the last change
195 in selection or change in which highlight is hovered, whichever was more recent.
197 * WebProcess/WebPage/ServicesOverlayController.h:
198 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
199 (WebKit::ServicesOverlayController::ServicesOverlayController):
200 (WebKit::ServicesOverlayController::selectionRectsDidChange):
201 Keep track of when the selection last changed.
203 (WebKit::ServicesOverlayController::drawTelephoneNumberHighlightIfVisible):
204 Make establishHoveredTelephoneHighlight take a bool instead of Boolean.
206 (WebKit::ServicesOverlayController::mouseIsOverHighlight):
207 Factor mouseIsOverHighlight out of establishHoveredTelephoneHighlight and drawHighlight.
209 (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
210 Return the amount of time until the highlight should be shown; this is
211 the maximum of (the difference between the last selection change and the timeout)
212 and (the difference between the last change in which highlight is hovered and the timeout).
214 Telephone number highlights are shown immediately, because they are already stable
215 by virtue of being expanded to include the entire telephone number.
217 (WebKit::ServicesOverlayController::repaintHighlightTimerFired):
218 (WebKit::ServicesOverlayController::drawHighlight):
219 If the highlight shouldn't be shown yet (because we haven't hit the two timeouts),
220 schedule a timer to repaint us around when we will hit the timeouts.
222 (WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
223 (WebKit::ServicesOverlayController::mouseEvent):
224 Don't allow mouseUp to trigger the menu if we shouldn't be showing the overlay yet.
226 2014-08-06 Simon Fraser <simon.fraser@apple.com>
228 [iOS WK2] www.france24.com doesn't always load the page, sections stay white
229 https://bugs.webkit.org/show_bug.cgi?id=135684
230 <rdar://problem/17931712>
232 Reviewed by Tim Horton.
234 It's possible for a UIScrollView for overflow to move between one scrolling tree node
235 and another. When this happens, we need to avoid unconditionally clearing the delegate
236 on the node that's being destroyed, because the new node will already have set the
237 UIScrollView delegate to its own delegate.
239 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
240 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::~ScrollingTreeOverflowScrollingNodeIOS):
242 2014-08-06 Dean Jackson <dino@apple.com>
244 ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED is not used anywhere. Remove it.
245 https://bugs.webkit.org/show_bug.cgi?id=135675
247 Reviewed by Sam Weinig.
249 * Configurations/FeatureDefines.xcconfig:
251 2014-08-06 Brady Eidson and Jeffrey Pfau <beidson@apple.com>
253 IDB transactions never reset if the Web Process ends before cleaning up
254 https://bugs.webkit.org/show_bug.cgi?id=135218
256 Reviewed by Darin Adler and David Kilzer.
258 * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
259 (WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
260 (WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage): Added.
261 (WebKit::DatabaseToWebProcessConnection::didClose):
262 * DatabaseProcess/DatabaseToWebProcessConnection.h:
264 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
265 (WebKit::DatabaseProcessIDBConnection::resetTransactionSync): Added
266 Wait until the reset is complete before sending the sync reply.
267 (WebKit::DatabaseProcessIDBConnection::rollbackTransactionSync): Added.
269 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
270 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
272 Keep track of all in progress transactions and make sure they’re cleaned up
273 whenever a connection to a WebProcess is broken:
274 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
275 (WebKit::UniqueIDBDatabase::unregisterConnection):
276 (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
277 (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
278 (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
279 (WebKit::UniqueIDBDatabase::didEstablishTransaction):
280 (WebKit::UniqueIDBDatabase::didResetTransaction):
281 (WebKit::UniqueIDBDatabase::resetAllTransactions):
282 (WebKit::UniqueIDBDatabase::finalizeRollback):
283 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
285 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
286 (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
288 Add sync versions of reset/rollback:
289 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
290 (WebKit::WebIDBServerConnection::resetTransactionSync):
291 (WebKit::WebIDBServerConnection::rollbackTransactionSync):
292 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
294 2014-08-06 Wenson Hsieh <wenson_hsieh@apple.com>
296 Implement parsing for CSS scroll snap points
297 https://bugs.webkit.org/show_bug.cgi?id=134301
299 Reviewed by Dean Jackson.
301 * Configurations/FeatureDefines.xcconfig: Added ENABLE_CSS_SCROLL_SNAP
303 2014-08-06 Andy Estes <aestes@apple.com>
305 [iOS] Subresources referenced in converted QuickLook documents sometimes fail to load
306 https://bugs.webkit.org/show_bug.cgi?id=135676
308 Reviewed by David Kilzer.
310 QuickLookHandle needs to stay alive in order for its NSURLProtocol to service subresource loads originating
311 from the converted HTML document. Some of these loads happen dynamically after the main resource finishes
312 loading, so we cannot tie the lifetime of the QuickLookHandle to that of the main resource's ResourceLoader.
313 Instead, give ownership of the QuickLookHandle to DocumentLoader.
315 * WebProcess/Network/WebResourceLoader.cpp:
316 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Stored the created QuickLookHandle in DocumentLoader.
317 (WebKit::WebResourceLoader::didReceiveData): Accessed DocumentLoader's QuickLookHandle.
318 (WebKit::WebResourceLoader::didFinishResourceLoad): Ditto.
319 (WebKit::WebResourceLoader::didFailResourceLoad): Ditto.
320 (WebKit::WebResourceLoader::didReceiveResource): Ditto.
321 * WebProcess/Network/WebResourceLoader.h: Removed m_quickLookHandle.
323 2014-08-06 Filip Pizlo <fpizlo@apple.com>
325 Merge r171389, r171495, r171508, r171510, r171605, r171606, r171611, r171614, r171763 from ftlopt.
327 2014-08-06 Mark Hahnenberg <mhahnenberg@apple.com>
329 Refactor our current implementation of for-in
330 https://bugs.webkit.org/show_bug.cgi?id=134142
332 Reviewed by Filip Pizlo.
334 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
335 (WebKit::JSNPObject::invalidate): Fixed an invalid ASSERT that was crashing in debug builds.
337 2014-08-06 Alexey Proskuryakov <ap@apple.com>
339 REGRESSION (WebKit2): iOS Safari default encoding doesn't follow system language
340 https://bugs.webkit.org/show_bug.cgi?id=135667
341 <rdar://problem/17862892>
343 Reviewed by Anders Carlsson.
345 * Shared/WebPreferencesDefinitions.h: Compute the actual proper default, don't
346 hardcode it to ISO-8859-1 hoping that someone else will correct it later.
348 * Shared/WebPreferencesStore.cpp: Added an include for WebPreferencesDefinitions.h
349 macro expansion to compile.
351 * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults):
354 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
355 We now use WKGetWebDefaultCFStringEncoding in WebCore, so it needs to be initialized.
357 2014-08-06 Adrian Perez de Castro <aperez@igalia.com>
359 [GTK] Add support for user scripts to WebKitUserContentManager
360 https://bugs.webkit.org/show_bug.cgi?id=134738
362 Reviewed by Carlos Garcia Campos.
364 Add support for user scripts, to complement the user style sheet
365 support already present in WebKitUserContentManager. Most of the
366 moving parts are already present, so this just adds a boxed type
367 for user scripts (WebKitUserScript) and the corresponding methods
368 to add and remove scripts from the WebKitUserContentManager.
370 * UIProcess/API/gtk/WebKitUserContent.cpp: Add a WebKitUserScript
371 boxed type and its corresponding methods and enums.
372 (toUserScriptInjectionTime): Needed to convert
373 WebKitUserScriptInjectionTime values into its WebCore counterparts.
374 (_WebKitUserScript::_WebKitUserScript): Added.
375 (_WebKitUserScript::referenceCount): Ditto.
376 (webkit_user_script_ref):
377 (webkit_user_script_unref):
378 (webkit_user_script_new):
379 (webkitUserScriptGetUserScript): Internal method to obtain the
380 boxed WebCore::UserScript value.
381 * UIProcess/API/gtk/WebKitUserContent.h: Add the new public API
383 * UIProcess/API/gtk/WebKitUserContentManager.cpp: Implement the
384 methods for adding and removing user scripts.
385 (webkit_user_content_manager_add_script):
386 (webkit_user_content_manager_remove_all_scripts):
387 * UIProcess/API/gtk/WebKitUserContentManager.h: Add the new public
389 * UIProcess/API/gtk/WebKitUserContentPrivate.h: Add the definition
390 for the new private function.
391 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the
392 new public methods in the API documentation.
394 2014-08-06 Carlos Garcia Campos <cgarcia@igalia.com>
396 [GTK] Be able to disable gtk2 dependency
397 https://bugs.webkit.org/show_bug.cgi?id=135505
399 Reviewed by Gustavo Noronha Silva.
401 * PlatformGTK.cmake: Only build WebKitPluginProcess2 when
402 ENABLE_PLUGIN_PROCESS_GTK2 is ON.
403 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
404 (WebKit::ProcessLauncher::launchProcess): Do not try to launch
405 WebKitPluginProcess2 executable when ENABLE_PLUGIN_PROCESS_GTK2 is OFF.
407 2014-08-05 Tim Horton <timothy_horton@apple.com>
409 REGRESSION (r164337): Pages are sometimes cut off/oriented incorrectly after using WKThumbnailView
410 https://bugs.webkit.org/show_bug.cgi?id=135622
411 <rdar://problem/17202556>
413 Reviewed by Dan Bernstein.
415 In some cases (when the page changed scroll offset while thumbnailed),
416 when transitioning back to thumbnail scale = 1, we would get the math
417 wrong and end up with a non-identity sublayerTransform on the DrawingArea.
419 Luckily, none of this code is necessary anymore, as the only client
420 of WKThumbnailView only uses its snapshotting mode.
422 * Shared/ImageOptions.h:
423 Remove SnapshotOptionsRespectDrawingAreaTransform; DrawingArea no longer
424 has a rootLayerTransform().
426 * UIProcess/WebPageProxy.cpp:
427 (WebKit::WebPageProxy::setThumbnailScale): Deleted.
428 * UIProcess/WebPageProxy.h:
429 * WebProcess/WebPage/WebPage.cpp:
430 (WebKit::WebPage::WebPage):
431 (WebKit::WebPage::scaledSnapshotWithOptions):
432 (WebKit::WebPage::snapshotAtSize):
434 (WebKit::WebPage::setThumbnailScale): Deleted.
435 * WebProcess/WebPage/WebPage.h:
436 * WebProcess/WebPage/WebPage.messages.in:
437 Remove setThumbnailScale and SnapshotOptionsRespectDrawingAreaTransform.
439 * WebProcess/WebPage/WebPage.cpp:
440 (WebKit::WebPage::didCommitLoad):
441 Revert this to its state before r164337, as we no longer have "thumbnail scale".
443 * UIProcess/API/Cocoa/_WKThumbnailView.h:
444 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
445 (-[_WKThumbnailView initWithFrame:fromWKView:]):
446 (-[_WKThumbnailView _viewWasUnparented]):
447 (-[_WKThumbnailView _viewWasParented]):
448 (-[_WKThumbnailView _requestSnapshotIfNeeded]):
449 (-[_WKThumbnailView setScale:]):
450 Clean up code assuming _shouldApplyThumbnailScale = NO, _usesSnapshot = YES.
452 (-[_WKThumbnailView setUsesSnapshot:]):
453 (-[_WKThumbnailView usesSnapshot]):
454 Always return YES from usesSnapshot; we only support snapshotting WKThumbnailViews.
455 Ignore setUsesSnapshot.
457 * UIProcess/API/mac/WKView.mm:
458 (-[WKView _setThumbnailView:]):
459 (-[WKView _updateThumbnailViewLayer]):
460 Stop checking usesSnapshot; it's always true.
462 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
463 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
464 (WebKit::TiledCoreAnimationDrawingArea::setRootLayerTransform): Deleted.
465 * WebProcess/WebPage/DrawingArea.cpp:
466 (WebKit::DrawingArea::rootLayerTransform): Deleted.
467 * WebProcess/WebPage/DrawingArea.h:
468 (WebKit::DrawingArea::setRootLayerTransform): Deleted.
469 Remove rootLayerTransform() and setRootLayerTransform().
471 2014-08-05 Peyton Randolph <prandolph@apple.com>
473 Rename MAC_LONG_PRESS feature flag to LONG_MOUSE_PRESS.
474 https://bugs.webkit.org/show_bug.cgi?id=135276
476 Reviewed by Beth Dakin.
478 * Configurations/FeatureDefines.xcconfig:
480 2014-08-04 Andy Estes <aestes@apple.com>
482 [iOS] The raw bytes of an iWork document's PDF preview are displayed rather than the PDF itself
483 https://bugs.webkit.org/show_bug.cgi?id=135596
485 Reviewed by David Kilzer.
487 * WebProcess/Network/WebResourceLoader.cpp:
488 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): If the response will be handled by
489 QuickLook, do not call ResourceLoader::didReceiveResponse. It will be called later by
490 WebResourceLoaderQuickLookDelegate once converted data is received.
492 2014-08-05 Alexey Proskuryakov <ap@apple.com>
496 * UIProcess/WebContext.h:
498 2014-08-05 Oliver Hunt <oliver@apple.com>
500 SSO expects to be able to walk parent application's bundle
501 https://bugs.webkit.org/show_bug.cgi?id=135581
502 <rdar://problem/17864079>
504 Reviewed by Alexey Proskuryakov.
506 SSO expects to be able to walk the parent application's
507 bundle looking for Info plists. To allow this to actually
508 work we provide an extension from the ui process that
509 covers the bundle directory, and then in the profile
510 restrict access to the ability to read directories and
511 files named Info.plist.
513 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
514 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
515 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
516 * Shared/Network/NetworkProcessCreationParameters.cpp:
517 (WebKit::NetworkProcessCreationParameters::encode):
518 (WebKit::NetworkProcessCreationParameters::decode):
519 * Shared/Network/NetworkProcessCreationParameters.h:
520 * UIProcess/WebContext.cpp:
521 (WebKit::WebContext::ensureNetworkProcess):
522 (WebKit::WebContext::parentBundleDirectory):
523 * UIProcess/WebContext.h:
524 * UIProcess/mac/WebContextMac.mm:
525 (WebKit::WebContext::parentBundleDirectory):
527 2014-08-04 Benjamin Poulain <benjamin@webkit.org>
529 Add a flag for the CSS Selectors level 4 implementation
530 https://bugs.webkit.org/show_bug.cgi?id=135535
532 Reviewed by Andreas Kling.
534 * Configurations/FeatureDefines.xcconfig:
536 2014-08-04 Benjamin Poulain <bpoulain@apple.com>
538 Check for null frame when processing geolocation authorization request
539 https://bugs.webkit.org/show_bug.cgi?id=135577
540 <rdar://problem/17896295>
542 Reviewed by Geoffrey Garen.
544 I could have put the null check in GeolocationController instead of the WebKit layer,
545 but that would be a little weird as GeolocationController knows nothing about how
546 the WebKit layer decides what to do with requests.
548 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
549 (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
551 2014-08-02 Jeremy Jones <jeremyj@apple.com>
553 Support both window and view based video fullscreen.
554 https://bugs.webkit.org/show_bug.cgi?id=135525
556 Reviewed by Simon Fraser.
558 Parenting in the view instead of the window gives the fullscreen implementation more latitude
559 in how it implements the animation.
561 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
562 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Use view instead of window.
563 * WebProcess/ios/WebVideoFullscreenManager.mm:
564 (WebKit::clientRectForNode): Use client rect instead of screen rect.
565 (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): ditto
566 (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
567 (WebKit::screenRectForNode): Deleted.
569 2014-08-01 Dan Bernstein <mitz@apple.com>
571 <rdar://problem/17891752> [iOS] WebKit links against libraries it doesn’t use
572 https://bugs.webkit.org/show_bug.cgi?id=135536
574 Reviewed by Tim Horton.
576 * Configurations/WebKit.xcconfig: Removed -lassertion_extension and -framework MobileAsset
577 from FRAMEWORK_AND_LIBRARY_LDFLAGS_iphonesimulator.
579 2014-08-01 Joseph Pecoraro <pecoraro@apple.com>
581 [iOS WK2] Add extension read permission to network sandbox profile
582 <rdar://problem/17671574>
584 Reviewed by Alexey Proskuryakov and Oliver Hunt.
586 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
588 2014-08-01 Oliver Hunt <oliver@apple.com>
590 Various frameworks may want to use the container temp directory, so our current restrictions are too tight
591 https://bugs.webkit.org/show_bug.cgi?id=135518
594 Reviewed by Anders Carlsson.
596 We don't (and can't) have complete knowledge of what different frameworks
597 will want to use the container temporary directory for, and so our
598 current attempt to heavily restrict access is simply too tight.
600 This patch recognises this by simply giving read-write access to the
601 entire NSTemporary() directory (e.g. $container/tmp in the general case),
602 rather than the single sub directory we wishfully thought that we would
603 be able to get away with.
605 * Shared/WebProcessCreationParameters.cpp:
606 (WebKit::WebProcessCreationParameters::encode):
607 (WebKit::WebProcessCreationParameters::decode):
608 * Shared/WebProcessCreationParameters.h:
609 * UIProcess/WebContext.cpp:
610 (WebKit::WebContext::createNewWebProcess):
611 (WebKit::WebContext::mediaCacheDirectory): Deleted.
612 * UIProcess/WebContext.h:
613 * UIProcess/efl/WebContextEfl.cpp:
614 (WebKit::WebContext::containerTemporaryDirectory):
615 (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
616 * UIProcess/gtk/WebContextGtk.cpp:
617 (WebKit::WebContext::containerTemporaryDirectory):
618 (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
619 * UIProcess/mac/WebContextMac.mm:
620 (WebKit::WebContext::containerTemporaryDirectory):
621 (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
622 * WebProcess/cocoa/WebProcessCocoa.mm:
623 (WebKit::WebProcess::platformInitializeWebProcess):
625 2014-08-01 Dan Bernstein <mitz@apple.com>
627 <rdar://problem/17862013> REGRESSION (r169357): Disabling "allow plug-ins" doesn't stick on quit/relaunch
628 https://bugs.webkit.org/show_bug.cgi?id=135511
630 Reviewed by Alexey Proskuryakov.
632 Since the values map in the preferences store doesn’t include values that are equal to the
633 defaults, we need to update it when a new default is registered.
635 * UIProcess/WebPreferences.cpp:
636 (WebKit::WebPreferences::createWithLegacyDefaults): Changed to use new member functions
637 for registering defaults.
638 (WebKit::WebPreferences::registerDefaultBoolValueForKey): Added. Sets an override default
639 in the store, and sets the user default, if there is one, on top of it.
640 (WebKit::WebPreferences::registerDefaultUInt32ValueForKey): Ditto.
641 * UIProcess/WebPreferences.h: Declared new member functions for getting the user default
644 * UIProcess/efl/WebPreferencesEfl.cpp:
645 (WebKit::WebPreferences::platformGetStringUserValueForKey): Added an implementation that
646 returns false, because the EFL port doesn’t support persistent user defaults.
647 (WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
648 (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
649 (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.
651 * UIProcess/gtk/WebPreferencesGtk.cpp:
652 (WebKit::WebPreferences::platformGetStringUserValueForKey): Ditto for the GTK port.
653 (WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
654 (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
655 (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.
657 * UIProcess/mac/WebPreferencesMac.mm:
658 (WebKit::WebPreferences::platformGetStringUserValueForKey): Added. Replaces
659 setStringValueIfInUserDefaults, on which it is based.
660 (WebKit::WebPreferences::platformGetBoolUserValueForKey): Similarly for booleans.
661 (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Similarly for integers.
662 (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Similarly for doubles.
663 (WebKit::WebPreferences::platformInitializeStore): Changed to use the above functions.
665 2014-08-01 Brent Fulgham <bfulgham@apple.com>
667 [Mac] Fullscreen mode for some applications shows only a black screen.
668 https://bugs.webkit.org/show_bug.cgi?id=135493
669 <rdar://problem/17628212>
671 Reviewed by Jer Noble.
673 In some applications, the window hosting the WKView is an InProcess layer hosting mode.
674 The fullscreen window created by the WKFullScreenWindowController defaults to an
677 When this kind of mismatch is encountered, the WK2 layer in the UI process is supposed
678 to send a message back to the WebProcess indicating that the layer hosting mode of the
679 containing window is different, so that the WebProcess can adjust its logic accordingly.
680 Unfortunately, the notification that this had happened was not getting sent to the
681 WebProcess due to an optimization in window state change logic (see Bug 135509 for
684 The fix is to check layer hosting mode state when a WKView is added to a window, and
685 notify the WebProcess when it needs to change state to match.
688 * UIProcess/API/mac/WKView.mm:
689 (-[WKView viewDidMoveToWindow]): When moving to a new window, always call
690 'layerHostingModeDidChange' to pick up any changes in the layer hosting mode.
692 2014-08-01 Carlos Garcia Campos <cgarcia@igalia.com>
694 [CMake] GTK and EFL are using PROJECT_VERSION_PATCH to define the micro version
695 https://bugs.webkit.org/show_bug.cgi?id=135501
697 Reviewed by Gyuyoung Kim.
699 Use PROJECT_VERSION_MICRO instead.
701 * UIProcess/API/efl/EWebKit2.h.in:
702 * UIProcess/API/gtk/WebKitVersion.h.in:
704 2014-08-01 Carlos Garcia Campos <cgarcia@igalia.com>
706 Unreviewed. Add missing sections to documentation.
708 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
709 WebKitUserContent and WebKitUserContentManager sections to the
712 2014-08-01 Ryuan Choi <ryuan.choi@samsung.com>
714 [EFL] Unable to do make install since r171901
715 https://bugs.webkit.org/show_bug.cgi?id=135497
717 Reviewed by Gyuyoung Kim.
719 * PlatformEfl.cmake: Removed ewk_defins.h from the installation list.
721 2014-07-31 Ryuan Choi <ryuan.choi@samsung.com>
723 [EFL][WK2] MiniBrower comes to crash when combo box is pressed
724 https://bugs.webkit.org/show_bug.cgi?id=135378
726 Reviewed by Gyuyoung Kim.
728 Added doxygen comment of popup_menu_show/popup_menu_hide not to confuse the usage.
730 * UIProcess/API/efl/ewk_view.h:
732 2014-07-31 Ryuan Choi <ryuan.choi@samsung.com>
734 [EFL] remove ewk_defines.h
735 https://bugs.webkit.org/show_bug.cgi?id=135456
737 Reviewed by Gyuyoung Kim.
739 * UIProcess/API/efl/ewk_context_menu.h:
740 * UIProcess/API/efl/ewk_context_menu_item.h: Moved the declaration from ewk_defines.h
741 * UIProcess/API/efl/ewk_defines.h: Removed.
743 2014-07-31 Brent Fulgham <bfulgham@apple.com>
745 Unreviewed typo correction.
746 https://bugs.webkit.org/show_bug.cgi?id=135482
748 Rename '_fullScreenIsEnabled' -> '_fullScreenEnabled'
750 * UIProcess/API/Cocoa/WKPreferences.mm:
751 (-[WKPreferences _fullScreenEnabled]): Added
752 (-[WKPreferences _fullScreenIsEnabled]): Deleted.
753 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
755 2014-07-31 Brent Fulgham <bfulgham@apple.com>
757 MiniBrowser Should Support Fullscreen Videos in WebKit2 Mode
758 https://bugs.webkit.org/show_bug.cgi?id=135482
760 Reviewed by Simon Fraser.
762 Add accessors for the missing Fullscreen API so that MiniBrowser
765 * UIProcess/API/Cocoa/WKPreferences.mm:
766 (-[WKPreferences _fullScreenIsEnabled]): Added.
767 (-[WKPreferences _setFullScreenEnabled:]): Added.
768 * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Add accessor for
771 2014-07-31 Beth Dakin <bdakin@apple.com>
773 Hit-testing broken in WebKit 1 views with AppKit's contentInsets
774 https://bugs.webkit.org/show_bug.cgi?id=135434
776 <rdar://problem/17850323>
778 Reviewed by Benjamin Poulain.
781 * WebProcess/Plugins/PDF/PDFPlugin.mm:
782 (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
783 (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
785 2014-07-31 Oliver Hunt <oliver@apple.com>
787 Various SSO services need the networking process to be able to spoof its bundle id
788 https://bugs.webkit.org/show_bug.cgi?id=135468
789 <rdar://problem/17864139>
791 Reviewed by Alexey Proskuryakov.
793 Just add the entitlement required to allow the sandbox to let this happen.
795 * Configurations/Network-iOS.entitlements:
797 2014-07-31 Przemyslaw Kuczynski <p.kuczynski@samsung.com>
799 Fix uninitialized scalar variable
800 https://bugs.webkit.org/show_bug.cgi?id=135461
802 Reviewed by Alexey Proskuryakov.
804 If fopen fails, returned ApplicationMemoryStats structure will be uninitialized
806 * Shared/linux/WebMemorySamplerLinux.cpp:
807 (WebKit::sampleMemoryAllocatedForApplication): Initialized applicationStats.
809 2014-07-31 Rohit Kumar <kumar.rohit@samsung.com>
811 Clean up the WebKit build from unused parameter warning in Webkit2/WebProcess module
812 https://bugs.webkit.org/show_bug.cgi?id=135413
814 Reviewed by Darin Adler.
816 * WebProcess/OriginData/WebOriginDataManager.cpp:
817 (WebKit::WebOriginDataManager::getOrigins):
818 (WebKit::WebOriginDataManager::deleteEntriesForOrigin):
819 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
820 (WebKit::WebOriginDataManager::deleteAllEntries):
822 2014-07-31 Chris Fleizach <cfleizach@apple.com>
824 AX: iOS: Crash accessing m_page in WKAccessibilityPageObject
825 https://bugs.webkit.org/show_bug.cgi?id=134617
827 Reviewed by Darin Adler.
829 Provide a way to detach a WK2 WebPage object so that it can uninitialize other pointers, like the accessibility object.
831 * WebProcess/WebPage/WebPage.cpp:
832 (WebKit::WebPage::~WebPage):
833 * WebProcess/WebPage/WebPage.h:
834 * WebProcess/WebPage/efl/WebPageEfl.cpp:
835 (WebKit::WebPage::platformDetach):
836 * WebProcess/WebPage/gtk/WebPageGtk.cpp:
837 (WebKit::WebPage::platformDetach):
838 * WebProcess/WebPage/ios/WebPageIOS.mm:
839 (WebKit::WebPage::platformDetach):
840 * WebProcess/WebPage/mac/WebPageMac.mm:
841 (WebKit::WebPage::platformDetach):
843 2014-07-31 Dan Bernstein <mitz@apple.com>
845 WebKit part of: Server trust authentication challenges aren’t sent to the navigation delegate
846 https://bugs.webkit.org/show_bug.cgi?id=135327
848 Reviewed by Alexey Proskuryakov.
850 * UIProcess/Cocoa/NavigationState.mm:
851 (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
852 Return true for server trust protection spaces if the delegate implements
853 -webView:didReceiveAuthenticationChallenge:completionHandler:.
854 (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Removed
855 an assertion that is no longer true due to the above.
857 2014-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
859 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.1 release.
861 * gtk/NEWS: Add release notes for 2.5.1.
863 2014-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
865 Unreviewed. Fix GTK+ make distcheck.
867 * Shared/InteractionInformationAtPosition.h: Only include
868 WebCore/SelectionRect.h for IOS.
870 2014-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
872 [GTK] Bump binary version for 2.6
873 https://bugs.webkit.org/show_bug.cgi?id=133724
875 Reviewed by Philippe Normand.
877 * PlatformGTK.cmake: Fix JavaScriptCore dependency on
878 instrospection commands and make them depend on GTK+-3.0.
880 2014-07-30 Enrica Casucci <enrica@apple.com>
882 REGRESSION (WK2 iOS): Inline editing for Chinese and Japanese keyboards does not work in Safari.
883 https://bugs.webkit.org/show_bug.cgi?id=135449
884 <rdar://problem/17824833>
886 Reviewed by Benjamin Poulain.
888 The WebProcess sends the notification that the gesture modified the phrase boundary,
889 but the flag was not being converted properly, therefore we failed to notify
890 the text input system that a change had occurred.
892 * UIProcess/ios/WKContentViewInteraction.mm:
893 (toUIWKSelectionFlags):
895 2014-07-30 Andy Estes <aestes@apple.com>
897 USE(CONTENT_FILTERING) should be ENABLE(CONTENT_FILTERING)
898 https://bugs.webkit.org/show_bug.cgi?id=135439
900 Reviewed by Tim Horton.
902 We now support two different platform content filters, and will soon support a mock content filter (as part of
903 webkit.org/b/128858). This makes content filtering a feature of WebKit, not just an adoption of a third-party
904 library. ENABLE() is the correct macro to use for such a feature.
906 * Configurations/FeatureDefines.xcconfig:
907 * Shared/WebCoreArgumentCoders.h:
908 * UIProcess/WebFrameProxy.cpp:
909 (WebKit::WebFrameProxy::didStartProvisionalLoad):
910 * UIProcess/WebFrameProxy.h:
911 * UIProcess/WebPageProxy.cpp:
912 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
913 * UIProcess/WebPageProxy.h:
914 * UIProcess/WebPageProxy.messages.in:
915 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
916 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
918 2014-07-30 Andreas Kling <akling@apple.com>
920 Static hash tables no longer need to be coupled with a VM.
921 <https://webkit.org/b/135421>
923 Reviewed by Geoffrey Garen.
925 * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
926 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
928 2014-07-30 Dan Bernstein <mitz@apple.com>
930 Get rid of the WKNSURLProtectionSpace wrapper
931 https://bugs.webkit.org/show_bug.cgi?id=135425
933 Reviewed by Sam Weinig.
935 * Shared/Cocoa/APIObject.mm:
936 (API::Object::newObject): Don’t allocate WKNSURLProtectionSpace wrappers.
938 * Shared/Cocoa/WKNSURLProtectionSpace.h: Removed.
939 * Shared/Cocoa/WKNSURLProtectionSpace.mm: Removed.
941 * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
942 (canAuthenticateAgainstProtectionSpaceInFrame): Get the NSURLProtectionSpace from the
943 WebCore::ProtectionSpace in the WebProtectionSpace.
945 * UIProcess/Cocoa/NavigationState.mm:
946 (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): Ditto.
948 * WebKit2.xcodeproj/project.pbxproj: Removed references to removed files.
950 2014-07-30 Dan Bernstein <mitz@apple.com>
952 Updated for changes to the WebCore::Credential API.
953 Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
955 Reviewed by Alexey Proskuryakov.
957 * Shared/Downloads/mac/DownloadMac.mm:
958 (WebKit::Download::receivedCredential):Use new Credential::nsCredential getter.
960 * Shared/WebCoreArgumentCoders.cpp:
961 (IPC::ArgumentCoder<Credential>::encode): If encoding the credential requires encoding the
962 platform data, do that.
963 (IPC::ArgumentCoder<Credential>::decode): If platform data was encoded, decode it.
964 * Shared/WebCoreArgumentCoders.h:
966 * Shared/mac/WebCoreArgumentCodersMac.mm:
967 (IPC::ArgumentCoder<Credential>::encodePlatformData): Archive the NSURLCredential.
968 (IPC::ArgumentCoder<Credential>::decodePlatformData): Unarchive it.
970 * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
971 (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]): Use
972 Credential constructor that takes an NSURLCredential.
974 * UIProcess/Cocoa/NavigationState.mm:
975 (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Ditto.
978 2014-07-30 Carlos Garcia Campos <cgarcia@igalia.com>
980 [GTK] REGRESSION(r171742): Test /webkit2/WebKitWebView/disallow-modal-dialogs fails
981 https://bugs.webkit.org/show_bug.cgi?id=135412
983 Reviewed by Philippe Normand.
985 The problem is that WebPageProxy::setUIClient() calls
986 setCanRunModal() with the value of m_uiClient->canRunModal() which
987 is always true for us. We override that manually by calling
988 setCanRunModal() depending on the WebKitSettings. In r171742,
989 webkitWebViewUpdateSettings(), the method that overrides
990 setCanRunModal(), was moved before attachUIClientToView(), so the
991 value set by WebPageProxy::setUIClient() is the last one and takes
992 precedence. We need to make sure webkitWebViewUpdateSettings() is
993 always called after attachUIClientToView().
995 * UIProcess/API/gtk/WebKitWebView.cpp:
996 (webkitWebViewConstructed): Move webkitWebViewUpdateSettings()
997 call after attachUIClientToView() and add a comment to not forget
1000 2014-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
1002 [GTK] Remove WebKitCertificateInfo from WebKit2GTK+ API
1003 https://bugs.webkit.org/show_bug.cgi?id=134830
1005 Reviewed by Gustavo Noronha Silva.
1007 It was added to make the API more convenient but it has ended up
1008 making it more complicated. WebKitWebView::load-failed-with-tls-errors
1009 now receives a GTlsCertificate + GTlsCertificateFlags and
1010 webkit_web_context_allow_tls_certificate_for_host() receives a GTlsCertificate
1011 since the errors are not actually needed. This makes the API more
1012 consistent with the existing method webkit_web_view_get_tls_info().
1014 * PlatformGTK.cmake: Remove files from compilation.
1015 * UIProcess/API/gtk/WebKitCertificateInfo.cpp: Removed.
1016 * UIProcess/API/gtk/WebKitCertificateInfo.h: Removed.
1017 * UIProcess/API/gtk/WebKitCertificateInfoPrivate.h: Removed.
1018 * UIProcess/API/gtk/WebKitWebContext.cpp:
1019 (webkit_web_context_allow_tls_certificate_for_host):
1020 * UIProcess/API/gtk/WebKitWebContext.h:
1021 * UIProcess/API/gtk/WebKitWebView.cpp:
1022 (webkit_web_view_class_init):
1023 (webkitWebViewLoadFailedWithTLSErrors):
1024 * UIProcess/API/gtk/WebKitWebView.h:
1025 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
1026 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1027 * UIProcess/API/gtk/webkit2.h:
1029 2014-07-29 Jinwoo Song <jinwoo7.song@samsung.com>
1031 [EFL] Do not initialize g_type system explicitly in the ewk_init()
1032 https://bugs.webkit.org/show_bug.cgi?id=135407
1034 Reviewed by Gyuyoung Kim.
1036 EFL build requires glib version 2.38 but g_type_init() has been deprecated
1037 since version 2.36. As the type system is initialized automatically since
1038 version 2.36, we do not need to call g_type_init() in the ewk_init().
1040 https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#g-type-init
1042 * UIProcess/API/efl/ewk_main.cpp:
1045 2014-07-29 Enrica Casucci <enrica@apple.com>
1047 REGRESSION [WebKit2 iOS]: Cannot add shortcut to user dictionary from non editable content.
1048 https://bugs.webkit.org/show_bug.cgi?id=135392
1049 <rdar://problem/17760073>
1051 Reviewed by Benjamin Poulain.
1053 Adding a shortcut to the user dictionary needs to be available in non editable content too.
1055 * UIProcess/ios/WKContentViewInteraction.mm:
1056 (-[WKContentView _addShortcut:]):
1058 2014-07-29 Tim Horton <timothy_horton@apple.com>
1060 WKPDFView paints rotated pages squished
1061 https://bugs.webkit.org/show_bug.cgi?id=135401
1062 <rdar://problem/17173916>
1064 Reviewed by Simon Fraser.
1066 * UIProcess/ios/WKPDFView.mm:
1067 (-[WKPDFView _computePageAndDocumentFrames]):
1068 [page size] returns the crop box's size, ignoring rotation.
1069 [page cropBoxAccountForRotation] respects rotation, but otherwise returns the same size.
1070 UIPDFPageView will respect rotation when painting, so we
1071 should make sure that it is given an aspect ratio that also
1072 respects rotation, so that the page isn't squished.
1074 2014-07-29 Csaba Osztrogonác <ossy@webkit.org>
1076 URTBF for !ENABLE(DATABASE_PROCESS) platforms.
1078 * WebProcess/OriginData/WebOriginDataManager.cpp:
1079 (WebKit::WebOriginDataManager::getOrigins):
1080 (WebKit::WebOriginDataManager::deleteEntriesForOrigin):
1081 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
1082 (WebKit::WebOriginDataManager::deleteAllEntries):
1084 2014-07-29 Brady Eidson <beidson@apple.com>
1086 Make WKOriginDataManager actually operate on IndexedDatabases.
1087 https://bugs.webkit.org/show_bug.cgi?id=135346
1089 Reviewed by Sam Weinig (and David Kilzer and Alex Christensen)
1091 * DatabaseProcess/DatabaseProcess.cpp:
1092 (WebKit::DatabaseProcess::DatabaseProcess):
1093 (WebKit::DatabaseProcess::getIndexedDatabaseOrigins):
1094 (WebKit::DatabaseProcess::doGetIndexedDatabaseOrigins):
1095 (WebKit::removeAllDatabasesForOriginPath): Utility to delete all database files for the given origin path
1096 that have been modified between the given dates.
1097 (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
1098 (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesForOrigin):
1099 (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates):
1100 (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesModifiedBetweenDates):
1101 (WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries):
1102 (WebKit::DatabaseProcess::doDeleteAllIndexedDatabaseEntries):
1103 * DatabaseProcess/DatabaseProcess.h:
1105 * Shared/WebCrossThreadCopier.cpp:
1106 (WebCore::SecurityOriginData>::copy):
1107 * Shared/WebCrossThreadCopier.h:
1109 * UIProcess/WebOriginDataManagerProxy.cpp:
1110 (WebKit::WebOriginDataManagerProxy::getOrigins):
1111 (WebKit::WebOriginDataManagerProxy::didGetOrigins):
1112 (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
1113 (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates):
1114 (WebKit::WebOriginDataManagerProxy::deleteAllEntries):
1116 * WebProcess/OriginData/WebOriginDataManager.cpp:
1117 (WebKit::WebOriginDataManager::getOrigins): Pipe IDB requests through to the DatabaseProcess.
1118 (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Ditto.
1119 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Ditto.
1120 (WebKit::WebOriginDataManager::deleteAllEntries): Ditto.
1122 2014-07-29 Commit Queue <commit-queue@webkit.org>
1124 Unreviewed, rolling out r171704.
1125 https://bugs.webkit.org/show_bug.cgi?id=135389
1127 Broke two IndexedDB tests (Requested by ap on #webkit).
1131 "IDB transactions never reset if the Web Process ends before
1133 https://bugs.webkit.org/show_bug.cgi?id=135218
1134 http://trac.webkit.org/changeset/171704
1136 2014-07-29 Daniel Bates <dabates@apple.com>
1138 Use WTF::move() instead of std::move() to help ensure move semantics
1139 https://bugs.webkit.org/show_bug.cgi?id=135351
1141 Reviewed by Alexey Proskuryakov.
1143 * UIProcess/API/Cocoa/_WKSessionState.mm:
1144 (-[_WKSessionState _initWithSessionState:]):
1145 * UIProcess/API/gtk/WebKitUserContent.cpp:
1146 (toStringVector): Remove use of std::move(). It's unnecessary to call std::move() on an rvalue.
1147 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1148 (WebKit::ServicesOverlayController::mouseEvent):
1150 2014-07-28 Pratik Solanki <psolanki@apple.com>
1152 Get SharedBuffer.h out of ResourceBuffer.h (and a few other places)
1153 https://bugs.webkit.org/show_bug.cgi?id=131782
1155 Original patch by Tim Horton.
1156 Reviewed by Darin Adler.
1158 * NetworkProcess/NetworkResourceLoader.cpp:
1159 * WebProcess/Network/NetworkProcessConnection.cpp:
1160 Include SharedBuffer.h in implementation files.
1162 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
1163 Un-indent namespace and remove SharedBuffer forward-declaration.
1165 2014-07-29 Adrian Perez de Castro <aperez@igalia.com>
1167 [GTK] Remove WebKitWebViewGroup from WebKit2 GTK+ API
1168 https://bugs.webkit.org/show_bug.cgi?id=133729
1170 Reviewed by Carlos Garcia Campos.
1172 Removes WebKitWebViewGroup, effectively reverting the changes
1173 introduced by r149117. The motivation for WebKitWebViewGroup
1174 was using the user style sheet injection API, which has been
1175 moved into WebKitUserContentManager, rendering it unneeded.
1177 * PlatformGTK.cmake: Remove WebKitWebViewGroup source files
1179 * UIProcess/API/C/gtk/WKView.cpp:
1180 (WKViewCreate): Accomodate for changes in the signature of
1181 webkitWebViewBaseCreate().
1182 * UIProcess/API/gtk/WebKitSettings.cpp: Update API documentation.
1183 * UIProcess/API/gtk/WebKitWebContext.cpp: Remove the default web
1184 view group from WebKitWebContext.
1185 (webkitWebContextCreatePageForWebView): Allow passing a
1186 WebPreferences object at construction.
1187 (webkitWebContextGetDefaultWebViewGroup): Deleted.
1188 * UIProcess/API/gtk/WebKitWebContextPrivate.h: Ditto.
1189 * UIProcess/API/gtk/WebKitWebView.cpp:
1190 (webkitWebViewUpdateSettings): Use WebPageProxy::setPreferences()
1191 directly. Handle the case when webkit_web_view_set_settings()
1192 is called on construction by doing an early-return.
1193 (webkitWebViewConstructed): Call webkitWebViewUpdateSettings()
1194 after creating the internal WebPageProxy object.
1195 (webkitWebViewSetProperty): Removed "group" property, added
1196 "settings" property.
1197 (webkitWebViewGetProperty): Ditto.
1198 (webkitWebViewDispose): Do not disconnect signal handler for
1199 the (now unexistant) WebKitWebViewGroup.
1200 (webkit_web_view_class_init): Removed "group" property, added
1201 "settings" property.
1202 (webkitWebViewHandleAuthenticationChallenge): Access the
1203 WebKitWebSettings directly.
1204 (webkit_web_view_new_with_related_view): Make new views share
1205 settings with their related view.
1206 (webkit_web_view_new_with_settings): Added.
1207 (webkit_web_view_set_settings): Access the settings directly in
1209 (webkit_web_view_get_settings): Ditto.
1210 (webkit_web_view_set_zoom_level): Ditto.
1211 (webkit_web_view_get_zoom_level): Ditto.
1212 (webkitWebViewSettingsChanged): Deleted.
1213 (webkitWebViewDisconnectSettingsChangedSignalHandler): Deleted.
1214 (webkit_web_view_new_with_group): Deleted.
1215 (webkit_web_view_get_group): Deleted.
1216 * UIProcess/API/gtk/WebKitWebView.h: Removed API methods related
1217 to WebKitWebViewGroup.
1218 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1219 (webkitWebViewBaseCreate): Allow passing a WebPreferences object
1220 for constructing the WebPageProxy.
1221 (webkitWebViewBaseUpdatePreferences): Instead of going through
1222 the page group, use WebPageProxy::preferences() directly.
1223 (webkitWebViewBaseCreateWebPage): Allow passing a WebPreferences
1224 object for constructing the WebPageProxy.
1225 * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Update the
1226 prototypes of the internal functions.
1227 * UIProcess/API/gtk/WebKitWebViewGroup.cpp: Removed.
1228 * UIProcess/API/gtk/WebKitWebViewGroup.h: Removed.
1229 * UIProcess/API/gtk/WebKitWebViewGroupPrivate.h: Removed.
1230 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Change public API
1231 bits in the documentation.
1232 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
1233 * UIProcess/API/gtk/docs/webkit2gtk.types: Ditto.
1234 * UIProcess/API/gtk/webkit2.h: Removed WebKitWebViewGroup.h header.
1235 * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1236 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1237 Accomodate for changes in the signature of
1238 webkitWebViewBaseCreate().
1240 2014-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
1242 Implement webkit_web_view_load_string() in WebKit2
1243 https://bugs.webkit.org/show_bug.cgi?id=134735
1245 Reviewed by Sergio Villar Senin.
1247 Add webkit_web_view_load_bytes() that receives a GBytes to load
1248 random data in the web view using the given MIME-Type, encoding
1251 * UIProcess/API/gtk/WebKitWebView.cpp:
1253 (webkit_web_view_load_bytes):
1254 * UIProcess/API/gtk/WebKitWebView.h:
1255 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
1256 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1258 2014-07-29 Ryuan Choi <ryuan.choi@samsung.com>
1260 [EFL] Alpha value of ewk_view_bg_color_set is not working
1261 https://bugs.webkit.org/show_bug.cgi?id=135333
1263 Reviewed by Gyuyoung Kim.
1265 evas_object_image_alpha_set should be called for the transparent evas object.
1267 * UIProcess/API/efl/EwkView.cpp:
1268 (EwkView::handleEvasObjectColorSet):
1269 (EwkView::setBackgroundColor): Checked the alpha value of object and called evas_object_image_alpha_set.
1270 * UIProcess/API/efl/EwkView.h:
1271 * UIProcess/API/efl/ewk_view.cpp:
1272 (ewk_view_bg_color_set): Moved the logic to EwkView.
1274 2014-07-28 Mark Rowe <mrowe@apple.com>
1276 Web process crash causes UI process to die with an assertion failure in Connection::exceptionSourceEventHandler
1277 https://bugs.webkit.org/show_bug.cgi?id=135366
1279 Reviewed by Dan Bernstein.
1281 * Platform/IPC/mac/ConnectionMac.mm:
1282 (IPC::Connection::exceptionSourceEventHandler): Remove the assertion since it frequently fires during
1283 normal development with debug builds.
1285 2014-07-28 Benjamin Poulain <bpoulain@apple.com>
1287 [iOS WK2] WKWebView sometime tries to change the size of a null DrawingAreaProxy
1288 https://bugs.webkit.org/show_bug.cgi?id=135368
1289 <rdar://problem/16988887>
1291 Reviewed by Simon Fraser.
1293 We should never assume DrawingAreaProxy exists in the API invoked by the clients
1294 of WKWebView. There are at least two cases where the DrawingAreaProxy is null:
1295 -In some path on initialization.
1298 * UIProcess/API/Cocoa/WKWebView.mm:
1299 (-[WKWebView _frameOrBoundsChanged]):
1300 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1301 We can safely null check and skip setting the size. If the call was skipped,
1302 the size is set on DrawingAreaProxy initialization by querying the current
1303 size through the page client.
1305 2014-07-28 Roger Fong <roger_fong@apple.com>
1307 Disable tagged strings for the plugin process.
1308 https://bugs.webkit.org/show_bug.cgi?id=135354
1309 <rdar://problem/17295639>.
1311 Patch by Alexey Proskuryakov and Roger Fong.
1313 Reviewed by Anders Carlsson.
1315 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
1316 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1317 (WebKit::connectToReExecService):
1319 2014-07-25 Jeffrey Pfau <jpfau@apple.com>
1321 IDB transactions never reset if the Web Process ends before cleaning up
1322 https://bugs.webkit.org/show_bug.cgi?id=135218
1324 Reviewed by Darin Adler.
1326 * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
1327 (WebKit::DatabaseToWebProcessConnection::didClose):
1328 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1329 (WebKit::UniqueIDBDatabase::unregisterConnection):
1330 (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
1331 (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
1332 (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
1333 (WebKit::UniqueIDBDatabase::didEstablishTransaction):
1334 (WebKit::UniqueIDBDatabase::didResetTransaction):
1335 (WebKit::UniqueIDBDatabase::resetAllTransactions):
1336 (WebKit::UniqueIDBDatabase::finalizeRollback):
1337 (WebKit::UniqueIDBDatabase::absoluteDatabaseDirectory):
1338 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1339 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1340 (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
1342 2014-07-27 Yusuke Suzuki <utatane.tea@gmail.com>
1344 [GTK] Keep non-DATABASE_PROCESS build
1345 https://bugs.webkit.org/show_bug.cgi?id=135321
1347 Reviewed by Gyuyoung Kim.
1349 This is the patch for r171622 in non-DATABASE_PROCESS builds.
1350 Change sendToDatabaseProcessRelaunchingIfNecessary to support non-DATABASE_PROCESS implementation.
1353 * UIProcess/WebContext.h:
1354 (WebKit::WebContext::sendToDatabaseProcessRelaunchingIfNecessary):
1356 2014-07-27 Gavin Barraclough <baraclough@apple.com>
1358 Don't rely on reading applicationState from within DidEnterBackground/WillEnterForeground
1359 https://bugs.webkit.org/show_bug.cgi?id=135329
1360 rdar://problem/17818308
1362 Reviewed by Sam Weinig.
1364 API may not be stable.
1366 * UIProcess/ios/PageClientImplIOS.mm:
1367 (WebKit::PageClientImpl::isViewVisible):
1368 - changed to use -[WKContentView isBackground]
1369 * UIProcess/ios/ProcessAssertionIOS.mm:
1370 (-[WKProcessAssertionBackgroundTaskManager init]):
1371 - split notification handlers
1372 (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground:]):
1373 (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground:]):
1374 (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackgroundOrWillEnterForeground:]): Deleted.
1375 - Assume application is background is after DidEnterBackground, and not after WillEnterForeground
1376 * UIProcess/ios/WKContentView.h:
1377 - added isBackground.
1378 * UIProcess/ios/WKContentView.mm:
1379 (-[WKContentView initWithFrame:context:configuration:webView:]):
1380 - check applicationState at init.
1381 (-[WKContentView isBackground]):
1383 (-[WKContentView _applicationDidEnterBackground:]):
1384 (-[WKContentView _applicationWillEnterForeground:]):
1385 - update isBackground
1387 2014-07-26 Enrica Casucci <enrica@apple.com>
1389 [WebKit2 iOS]Add support for caret movement for the 3rd party keyboard protocol.
1390 https://bugs.webkit.org/show_bug.cgi?id=135325
1391 <rdar://problem/17682120>
1393 Reviewed by Sam Weinig.
1395 WKContentView now implements moveByOffset to support the
1396 protocol for 3rd party keyboards.
1398 * UIProcess/WebPageProxy.h:
1399 * UIProcess/ios/WKContentViewInteraction.mm:
1400 (-[WKContentView moveByOffset:]):
1401 * UIProcess/ios/WebPageProxyIOS.mm:
1402 (WebKit::WebPageProxy::moveSelectionByOffset):
1403 * WebProcess/WebPage/WebPage.h:
1404 * WebProcess/WebPage/WebPage.messages.in:
1405 * WebProcess/WebPage/ios/WebPageIOS.mm:
1406 (WebKit::WebPage::moveSelectionByOffset):
1408 2014-07-26 Timothy Horton <timothy_horton@apple.com>
1410 Crash in Web Content Process under ~PDFDocument under clearTouchEventListeners at topDocument()
1411 https://bugs.webkit.org/show_bug.cgi?id=135319
1412 <rdar://problem/17315168>
1414 Reviewed by Darin Adler and Antti Koivisto.
1416 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1417 (WebKit::WebFrameLoaderClient::committedLoad):
1418 Allow data through to WebCore for frames with custom content providers;
1419 the only custom content provider currently implemented is main frame PDF
1420 on iOS, which will end up creating a PDFDocument in WebCore, which drops all
1421 data on the floor immediately, so this won't result in WebCore doing anything
1422 with the data, but makes sure that more of the normal document lifecycle is maintained.
1424 In the future, we might want to consider ensuring that all custom content providers
1425 end up creating a SinkDocument or something similarly generic to ensure that
1426 WebCore doesn't try to do anything with their data, but for now, the only client is covered.
1428 2014-07-25 Jeremy Jones <jeremyj@apple.com>
1430 Parent fullscreen from window instead of view
1431 https://bugs.webkit.org/show_bug.cgi?id=135310
1433 Reviewed by Jer Noble.
1435 Parenting in the view causes an incorrect animation to fullscreen, and can cause
1436 fullscreen to only expand to the size of the view instead of the whole window.
1438 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1439 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass view's window.
1440 * WebProcess/ios/WebVideoFullscreenManager.mm: screenRect instead of clientRect
1441 (WebKit::screenRectForNode): was clientRectForNode
1442 (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): use screenRectForNode
1443 (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
1444 (WebKit::clientRectForNode): Deleted.
1446 2014-07-25 Oliver Hunt <oliver@apple.com>
1448 Creating incorrect sandbox extension for hsts plist due to missing /
1449 https://bugs.webkit.org/show_bug.cgi?id=135309
1451 Reviewed by Sam Weinig.
1453 So it turns out that you do actually need /'s in paths...
1454 Now we actually create the correct extension.
1456 * UIProcess/mac/WebContextMac.mm:
1457 (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
1459 2014-07-24 Anders Carlsson <andersca@apple.com>
1461 WKNavigation's properties are either always nil or don't behave as documented
1462 https://bugs.webkit.org/show_bug.cgi?id=135267
1463 <rdar://problem/17730536>
1465 Reviewed by Andreas Kling.
1467 Remove the properties from WKNavigation and introduce -[WKNavigation _request] as SPI for now.
1469 * Shared/API/Cocoa/WebKitPrivate.h:
1470 * UIProcess/API/Cocoa/WKNavigation.h:
1471 * UIProcess/API/Cocoa/WKNavigation.mm:
1472 (-[WKNavigation _request]):
1473 (-[WKNavigation initialRequest]): Deleted.
1474 (-[WKNavigation request]): Deleted.
1475 (-[WKNavigation setRequest:]): Deleted.
1476 (-[WKNavigation response]): Deleted.
1477 (-[WKNavigation error]): Deleted.
1478 * UIProcess/API/Cocoa/WKNavigationInternal.h:
1479 * UIProcess/API/Cocoa/WKNavigationPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationInternal.h.
1480 * UIProcess/Cocoa/NavigationState.mm:
1481 (WebKit::NavigationState::createLoadRequestNavigation):
1482 * WebKit2.xcodeproj/project.pbxproj:
1484 2014-07-25 Brady Eidson <beidson@apple.com>
1486 Clean up WKOriginDataManager and get it messaging to the DatabaseProcess
1487 https://bugs.webkit.org/show_bug.cgi?id=135035
1489 Reviewed by Sam Weinig.
1491 * DatabaseProcess/DatabaseProcess.cpp:
1492 (WebKit::DatabaseProcess::DatabaseProcess): Instantiate the WebOriginDataManager, installing its message handler.
1493 (WebKit::DatabaseProcess::didReceiveMessage): Try the message receiver map, which will try the WebOriginDataManager.
1494 * DatabaseProcess/DatabaseProcess.h:
1495 * DatabaseProcess/DatabaseProcess.messages.in:
1497 * UIProcess/API/C/WKOriginDataManager.cpp:
1498 (WKOriginDataManagerDeleteEntriesForOrigin): Updated to also take a callback.
1499 (WKOriginDataManagerDeleteEntriesModifiedBetweenDates): Added.
1500 (WKOriginDataManagerDeleteAllEntries): Updated to also take a callback.
1501 (WKOriginDataManagerStartObservingChanges): Deleted.
1502 (WKOriginDataManagerStopObservingChanges): Deleted.
1503 (WKOriginDataManagerSetChangeClient): Deleted.
1504 * UIProcess/API/C/WKOriginDataManager.h:
1506 * UIProcess/Databases/DatabaseProcessProxy.cpp:
1507 (WebKit::DatabaseProcessProxy::didReceiveMessage): Send messages to the WebOriginDataManagerProxy supplement if appropriate.
1508 * UIProcess/Databases/DatabaseProcessProxy.h:
1509 * UIProcess/Databases/DatabaseProcessProxy.messages.in:
1511 * UIProcess/WebContext.cpp:
1512 (WebKit::WebContext::WebContext): Instantiate the WebOriginDataManagerProxy supplement.
1513 * UIProcess/WebContext.h:
1514 (WebKit::WebContext::sendToDatabaseProcessRelaunchingIfNecessary):
1516 * UIProcess/WebOriginDataManagerProxy.cpp:
1517 (WebKit::WebOriginDataManagerProxy::contextDestroyed):
1518 (WebKit::WebOriginDataManagerProxy::processDidClose):
1519 (WebKit::WebOriginDataManagerProxy::getOrigins):
1520 (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin): Setup a callback with the message.
1521 (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates): Added
1522 (WebKit::WebOriginDataManagerProxy::didDeleteEntries): Call the callback.
1523 (WebKit::WebOriginDataManagerProxy::deleteAllEntries): Setup a callback with the message.
1524 (WebKit::WebOriginDataManagerProxy::didDeleteAllEntries): Call the callback.
1525 (WebKit::WebOriginDataManagerProxy::startObservingChanges): Deleted.
1526 (WebKit::WebOriginDataManagerProxy::stopObservingChanges): Deleted.
1527 (WebKit::WebOriginDataManagerProxy::setChangeClient): Deleted.
1528 (WebKit::WebOriginDataManagerProxy::didChange): Deleted.
1529 * UIProcess/WebOriginDataManagerProxy.h:
1530 * UIProcess/WebOriginDataManagerProxy.messages.in:
1532 * UIProcess/WebOriginDataManagerProxyChangeClient.cpp: Removed.
1533 * UIProcess/WebOriginDataManagerProxyChangeClient.h: Removed.
1535 * WebKit2.xcodeproj/project.pbxproj:
1537 * WebProcess/OriginData/WebOriginDataManager.cpp:
1538 (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Send the callback reply.
1539 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Added.
1540 (WebKit::WebOriginDataManager::deleteAllEntries): Send the callback reply.
1541 (WebKit::WebOriginDataManager::startObservingChanges): Deleted.
1542 (WebKit::WebOriginDataManager::stopObservingChanges): Deleted.
1543 * WebProcess/OriginData/WebOriginDataManager.h:
1544 * WebProcess/OriginData/WebOriginDataManager.messages.in:
1546 2014-07-25 Gavin Barraclough <baraclough@apple.com>
1548 Yosemite version number is 101000
1549 https://bugs.webkit.org/show_bug.cgi?id=135301
1551 Reviewed by Sam Weinig.
1553 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1554 (WebKit::connectToService):
1555 * WebProcess/com.apple.WebProcess.sb.in:
1557 2014-07-24 Benjamin Poulain <bpoulain@apple.com>
1559 [iOS][WK2] Do not try to hit test a null mainFrameRenderView on dynamicViewportSizeUpdate()
1560 https://bugs.webkit.org/show_bug.cgi?id=135277
1561 <rdar://problem/17804891>
1563 Reviewed by Tim Horton.
1565 * WebProcess/WebPage/ios/WebPageIOS.mm:
1566 (WebKit::WebPage::dynamicViewportSizeUpdate):
1567 There is no guarantee that the main frame have its root view when performing a dynamicViewportSizeUpdate(),
1568 we should not attempt to use the layer without null checking it first.
1570 The odd part for me is <rdar://problem/17804891> is a little too frequent. In the vast majority of cases,
1571 there is a RenderView, it seems actually pretty hard not to have one on dynamicViewportSizeUpdate().
1573 Skipping hit testing is safe because it is a completely optional part of this algorithm.
1574 When the hit test is not done, the new position is computed based on the relative position prior to
1577 2014-07-24 Dan Bernstein <mitz@apple.com>
1579 WebKit2 part of <rdar://problem/17593701> Assertion failure in WebPage::reload (!m_pendingNavigationID) when reloading after a same-document back navigation
1580 https://bugs.webkit.org/show_bug.cgi?id=135129
1582 Reviewed by Darin Adler.
1584 * Shared/WebBackForwardListItem.cpp:
1585 (WebKit::childItemWithDocumentSequenceNumber): New helper function based on
1586 WebCore::HistoryItem::childItemWithDocumentSequenceNumber.
1587 (WebKit::documentTreesAreEqual): New helper function based on
1588 WebCore::HistoryItem::hasSameDocumentTree.
1589 (WebKit::WebBackForwardListItem::itemIsInSameDocument): Added. Based on
1590 WebCore::HistoryItem::shouldDoSameDocumentNavigationTo.
1591 * Shared/WebBackForwardListItem.h:
1593 * UIProcess/WebPageProxy.cpp:
1594 (WebKit::WebPageProxy::goForward): Don’t assign a new navigation ID if the back-forward
1595 navigation is a same-document navigation.
1596 (WebKit::WebPageProxy::goBack): Ditto.
1597 (WebKit::WebPageProxy::goToBackForwardItem): Ditto.
1599 2014-07-24 Tim Horton <timothy_horton@apple.com>
1601 Sometimes WKWebView is blank after resuming the app, until you scroll
1602 https://bugs.webkit.org/show_bug.cgi?id=135275
1603 <rdar://problem/17803170>
1605 Reviewed by Benjamin Poulain.
1607 * UIProcess/WebPageProxy.cpp:
1608 (WebKit::WebPageProxy::dispatchViewStateChange):
1609 If the UI process is waiting for a didUpdateViewState, we need to *always*
1610 get a reply from the Web Process, so dispatchViewStateChange should *always*
1611 send SetViewState even if nothing changed (so that we get the reply).
1613 2014-07-24 Simon Fraser <simon.fraser@apple.com>
1615 [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
1616 https://bugs.webkit.org/show_bug.cgi?id=135221
1617 <rdar://problem/17542454>
1619 Reviewed by Benjamin Poulain.
1621 The call to didCommitLayerTree() can cause one or two visible rect updates,
1622 via changes to the UIScrollView contentSize and contentOffset. As a result, we
1623 would notify the scrolling tree about a viewport change, but using the old
1624 scrolling tree rather than the new one, so we could move layers around for
1625 nodes which are about to be removed from the tree.
1627 However, we also have to ensure that programmatic scrolls are applied after
1628 didCommitLayerTree() has updated the view size, so have RemoteScrollingCoordinatorProxy
1629 store data about programmatic scrolls and return them to the caller, which
1630 can apply them after didCommitLayerTree().
1632 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: Store a pointer to a RequestedScrollInfo
1633 for the duration of the tree update, so that we can store requested scroll info in it.
1634 (WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
1635 (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
1636 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):
1637 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1638 * UIProcess/WebPageProxy.cpp:
1639 (WebKit::WebPageProxy::didCommitLayerTree): Give Mac a stub implementation.
1640 * UIProcess/WebPageProxy.h: Group some editing-related functions together.
1641 (WebKit::WebPageProxy::editorState):
1642 (WebKit::WebPageProxy::canDelete):
1643 (WebKit::WebPageProxy::hasSelectedRange):
1644 (WebKit::WebPageProxy::isContentEditable):
1645 (WebKit::WebPageProxy::maintainsInactiveSelection):
1646 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1647 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): Ordering change: update
1648 the layer tree, then call didCommitLayerTree(), then do the viewport update, followed
1649 by any programmatic scroll.
1651 2014-07-24 Peyton Randolph <prandolph@apple.com>
1653 Rename feature flag for long-press gesture on Mac.
1654 https://bugs.webkit.org/show_bug.cgi?id=135259
1656 Reviewed by Beth Dakin.
1658 * Configurations/FeatureDefines.xcconfig:
1659 Rename LINK_LONG_PRESS to MAC_LONG_PRESS.
1661 2014-07-24 Dan Bernstein <mitz@apple.com>
1663 WebKit2 part of <rdar://problem/17766348> [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
1664 https://bugs.webkit.org/show_bug.cgi?id=135229
1666 Reviewed by Alexey Proskuryakov.
1668 * Shared/Cocoa/WKNSURLProtectionSpace.mm: Changed to use ProtectionSpace::nsSpace.
1670 * Shared/WebCoreArgumentCoders.cpp:
1671 (IPC::ArgumentCoder<ProtectionSpace>::encode): If encoding the space requires encoding the
1672 platform data, do that.
1673 (IPC::ArgumentCoder<ProtectionSpace>::decode): If platform data was encoded, decode it.
1674 * Shared/WebCoreArgumentCoders.h:
1676 * Shared/mac/WebCoreArgumentCodersMac.mm:
1677 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Archive the NSURLProtectionSpace.
1678 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Unarchive it.
1680 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
1681 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Added.
1682 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Added.
1684 2014-07-24 Benjamin Poulain <benjamin@webkit.org>
1686 [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
1687 https://bugs.webkit.org/show_bug.cgi?id=135227
1688 <rdar://problem/17279500>
1690 Reviewed by Simon Fraser.
1692 In some cases, a fixed or sticky positioned layer would end up at its position corresponding to the WebProcess
1693 instead of sticking the to real viewport in the UIProcess.
1695 The sequence of event is:
1696 1) A layer becomes fixed in some ScrollingTree transaction.
1697 2) Later, some change in the WebProcess causes a LayerTree update for that exact same layer, but no corresponding
1698 ScrollingTree update is made.
1699 3) In the UIProcess, the position of the fixed layer is changed due to the LayerTree update.
1700 But! There is no ScrollingTree change, updateScrollingTree() never sets fixedOrStickyLayerChanged to true,
1701 and the position is not corrected.
1702 -> The layer is now at the wrong position until the next VisibleContentRectUpdate.
1704 Ideally, we should have fixedOrStickyLayerChanged track if either the position or size of a fixed layer changed
1705 in the layer tree. This is tricky since the layer tree does not keep track of the fixed nodes of the scrolling tree.
1707 Since this complexity seems risky at this point, I went for something simpler but with more overhead:
1708 any time the scrolling tree contains either a fixed or sticky layer, viewportChangedViaDelegatedScrolling()
1709 is called to "fix" the position.
1711 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1712 (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
1713 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1714 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1715 (WebKit::RemoteScrollingCoordinatorProxy::hasFixedOrSticky):
1716 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1717 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1718 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1719 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1721 2014-07-24 Oliver Hunt <oliver@apple.com>
1723 Need to explicitly support location services in webcontent profile
1724 https://bugs.webkit.org/show_bug.cgi?id=135251
1727 Reviewed by Dan Bernstein.
1729 Switching to uikit-app means that we remove the implicit support
1730 for location services. This makes us explicitly opt-in.
1732 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1734 2014-07-24 Tim Horton <timothy_horton@apple.com>
1736 Crash at [WKContentView _applicationWillEnterForeground:] + 28
1737 <rdar://problem/17797103>
1739 Reviewed by Sam Weinig.
1741 * UIProcess/ios/WKContentView.mm:
1742 (-[WKContentView _applicationWillEnterForeground:]):
1743 Drawing area can be null; null check it!
1744 It's ok if we don't hide the content in this case, because if the drawing area is null,
1745 it doesn't have any layers in the tree anyway.
1747 2014-07-23 Simon Fraser <simon.fraser@apple.com>
1749 [iOS WK2] Some help.apple.com pages not scrollable
1750 https://bugs.webkit.org/show_bug.cgi?id=135228
1751 <rdar://problem/17790792>
1753 Reviewed by Benjamin Poulain.
1755 On pages which size their document to the device size, the WKContentView size
1756 never changes after it's created. In this situation, we never set a bounds
1757 on the _rootContentView, so it remains zero-sized which breaks hit testing
1758 on all enclosed UIScrollViews for overflow:scroll.
1760 Fix by making the _rootContentView and the _inspectorIndicationView use autosizing
1761 so they are always the size of their parent view, and remove the explicit setting
1764 * UIProcess/ios/WKContentView.mm:
1765 (-[WKContentView initWithFrame:context:configuration:webView:]):
1766 (-[WKContentView setShowingInspectorIndication:]):
1767 (-[WKContentView _didCommitLayerTree:]):
1769 2014-07-23 Benjamin Poulain <bpoulain@apple.com>
1771 [iOS][WK2] r171124 is incorrect when the virtual keyboard is up
1772 https://bugs.webkit.org/show_bug.cgi?id=135187
1774 Reviewed by Simon Fraser.
1776 Unfortunately, restricting the input into the document rect does not work.
1777 When the keyboard is up, the keyboard bounds can overlap the WKWebView, and
1778 the valid range should account for that.
1780 Instead of playing with the keyboard rect, we can limit the scroll position
1781 inside the valid range of UIScrollView. The keyboard always adjusts the UIScrollView
1782 range as needed to give access to the content. Using that range is a bit more permissive
1783 because the page could scroll to reveal content in the content inset defined by the client
1784 of the API (this could actually be quite useful for hybrid apps).
1786 There was already a function to change the content offset in the valid scrollview
1787 range: changeContentOffsetBoundedInValidRange(), I extracted the range check
1788 to contentOffsetBoundedInValidRange() for the needs of -[WKWebView _scrollToContentOffset:].
1790 So...contentOffsetBoundedInValidRange() is cool, but it is not in the right coordinate
1791 system. The scroll position we get from the WebProcess is in document coordinates, while
1792 contentOffsetBoundedInValidRange() works with the UIScrollView coordinates.
1793 To fix that, we scale the input position to get to the same scale as UIScrollView, then
1794 apply the insets with the weirdly named [WKWebView _adjustedContentOffset:].
1796 * UIProcess/API/Cocoa/WKWebView.mm:
1797 (contentOffsetBoundedInValidRange):
1798 (changeContentOffsetBoundedInValidRange):
1799 (-[WKWebView _scrollToContentOffset:]):
1801 2014-07-23 Commit Queue <commit-queue@webkit.org>
1803 Unreviewed, rolling out r171498.
1804 https://bugs.webkit.org/show_bug.cgi?id=135223
1806 It will regress some scroll position restoration on navigation
1807 (r167916). (Requested by smfr on #webkit).
1811 "[iOS WK2] Header bar on nytimes articles lands in the wrong
1812 place after rubberbanding"
1813 https://bugs.webkit.org/show_bug.cgi?id=135221
1814 http://trac.webkit.org/changeset/171498
1816 2014-07-23 Simon Fraser <simon.fraser@apple.com>
1818 [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
1819 https://bugs.webkit.org/show_bug.cgi?id=135221
1821 Reviewed by Tim Horton.
1823 The call to didCommitLayerTree() can cause one or two visible rect updates,
1824 via changes to the UIScrollView contentSize and contentOffset. As a result, we
1825 would notify the scrolling tree about a viewport change, but using the old
1826 scrolling tree rather than the new one, so we could move layers around for
1827 nodes which are about to be removed from the tree.
1829 Fix by m_webPageProxy->didCommitLayerTree() after the scrolling tree has been
1832 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1833 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1835 2014-07-23 Oliver Hunt <oliver@apple.com>
1837 Add a pseudo target to create sandbox override roots
1838 https://bugs.webkit.org/show_bug.cgi?id=135216
1841 Reviewed by Alexey Proskuryakov.
1843 Just a duplicate of the standard ios sandbox target, targetting
1844 the profile overrides directory. This means we can make roots
1847 * WebKit2.xcodeproj/project.pbxproj:
1849 2014-07-23 Oliver Hunt <oliver@apple.com>
1851 Incorrect commit for sandbox profile
1852 https://bugs.webkit.org/show_bug.cgi?id=135214
1855 Reviewed by Anders Carlsson.
1857 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1859 2014-07-23 Dan Bernstein <mitz@apple.com>
1861 <rdar://problem/17782623> [iOS] Client-certificate authentication isn’t working with some certificates
1862 https://bugs.webkit.org/show_bug.cgi?id=135206
1864 Reviewed by Anders Carlsson.
1866 * Shared/cf/ArgumentCodersCF.cpp:
1867 (IPC::copyPersistentRef): Added this helper function. It differs from
1868 SecKeyCopyPersistentRef in that if multiple copies of the key exist in the keychain, it
1869 ensures that we get a reference to the copy that is in the keychain access group that the
1870 Networking process can use.
1871 (IPC::encode): Use copyPersistentRef.
1873 2014-07-23 Bem Jones-Bey <bjonesbe@adobe.com>
1875 Remove CSS_EXCLUSIONS compile flag and leftover code
1876 https://bugs.webkit.org/show_bug.cgi?id=135175
1878 Reviewed by Zoltan Horvath.
1880 At this point, the CSS_EXCLUSIONS flag guards nothing but some useless
1881 stubs. This removes the flag and the useless code.
1883 * Configurations/FeatureDefines.xcconfig:
1885 2014-07-23 Timothy Horton <timothy_horton@apple.com>
1887 REGRESSION (r171239): Much more time spent taking snapshots during the PLT
1888 https://bugs.webkit.org/show_bug.cgi?id=135177
1889 <rdar://problem/17764847>
1891 Reviewed by Dan Bernstein.
1893 * UIProcess/WebPageProxy.cpp:
1894 (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
1895 (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
1896 * UIProcess/WebPageProxy.h:
1897 * UIProcess/WebPageProxy.messages.in:
1898 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1899 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
1900 * WebProcess/WebPage/WebPage.cpp:
1901 (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
1902 (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
1903 * WebProcess/WebPage/WebPage.h:
1904 Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
1905 Only send it when the current history item for the main frame changes.
1907 2014-07-23 Ryuan Choi <ryuan.choi@samsung.com>
1909 [EFL] EWebKit2.h should contain version information
1910 https://bugs.webkit.org/show_bug.cgi?id=135189
1912 Reviewed by Gyuyoung Kim.
1914 Generate EWebKit2.h to contain the version information.
1916 * PlatformEfl.cmake:
1917 * UIProcess/API/efl/EWebKit2.h.in: Renamed from Source/WebKit2/UIProcess/API/efl/EWebKit2.h.
1919 2014-07-23 Ryuan Choi <ryuan.choi@samsung.com>
1921 [EFL] Do not generate forwarding header for ewk headers
1922 https://bugs.webkit.org/show_bug.cgi?id=135147
1924 Reviewed by Gyuyoung Kim.
1926 Only EWebKit2.h and ewk_text_checker.h are generated as forwarding header.
1927 This is unnecessary.
1929 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
1930 * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
1931 * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
1932 * UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
1933 * UIProcess/efl/TextCheckerClientEfl.h:
1935 2014-07-22 Commit Queue <commit-queue@webkit.org>
1937 Unreviewed, rolling out r171366.
1938 https://bugs.webkit.org/show_bug.cgi?id=135190
1940 Broke three API tests (Requested by ap on #webkit).
1944 "REGRESSION (r171239): Much more time spent taking snapshots
1946 https://bugs.webkit.org/show_bug.cgi?id=135177
1947 http://trac.webkit.org/changeset/171366
1949 2014-07-22 Oliver Hunt <oliver@apple.com>
1951 Reduce the size of the root WebContent sandbox profile
1952 https://bugs.webkit.org/show_bug.cgi?id=135182
1953 <rdar://problem/17739108>
1955 Reviewed by Alexey Proskuryakov.
1957 Switch from apple-ui-app to uikit-app as the root of the webcontent
1960 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1962 2014-07-22 Jinwoo Song <jinwoo7.song@samsung.com>
1964 Unreviewed build fix on EFL port after r171356.
1966 Implement a dummy platformMediaCacheDirectory() to avoid undefined reference error.
1968 * UIProcess/efl/WebContextEfl.cpp:
1969 (WebKit::WebContext::platformMediaCacheDirectory):
1971 2014-07-22 Enrica Casucci <enrica@apple.com>
1973 REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track scrolling.
1974 https://bugs.webkit.org/show_bug.cgi?id=135180
1975 <rdar://problem/16721055>
1977 Reviewed by Simon Fraser.
1979 Adds notifications to the WKContentView to know when scrolling starts and ends
1980 in an overflow scroll. When scrolling starts, we hide the selection and we restore
1981 it when scrolling ends, though not before the selection information in the editor
1982 state has been updated.
1983 It also adds a new method to the EditorClient class to force the
1984 selection update when scrolling is completed.
1986 * UIProcess/PageClient.h:
1987 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1988 * UIProcess/Scrolling/RemoteScrollingTree.cpp:
1989 (WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartScroll):
1990 (WebKit::RemoteScrollingTree::scrollingTreeNodeDidEndScroll):
1991 * UIProcess/Scrolling/RemoteScrollingTree.h:
1992 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1993 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1994 (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
1995 (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
1996 (-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]):
1997 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollWillStart):
1998 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollDidEnd):
1999 * UIProcess/WebPageProxy.h:
2000 * UIProcess/ios/PageClientImplIOS.h:
2001 * UIProcess/ios/PageClientImplIOS.mm:
2002 (WebKit::PageClientImpl::overflowScrollWillStartScroll):
2003 (WebKit::PageClientImpl::overflowScrollDidEndScroll):
2004 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2005 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll):
2006 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll):
2007 * UIProcess/ios/WKContentViewInteraction.h:
2008 * UIProcess/ios/WKContentViewInteraction.mm:
2009 (-[WKContentView _overflowScrollingWillBegin]):
2010 (-[WKContentView _overflowScrollingDidEnd]):
2011 (-[WKContentView _updateChangedSelection]):
2012 * UIProcess/ios/WebPageProxyIOS.mm:
2013 (WebKit::WebPageProxy::overflowScrollWillStartScroll):
2014 (WebKit::WebPageProxy::overflowScrollDidEndScroll):
2015 * WebProcess/WebCoreSupport/WebEditorClient.h:
2016 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2017 * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
2018 (WebKit::WebEditorClient::updateSelection):
2020 2014-07-22 Benjamin Poulain <bpoulain@apple.com>
2022 [iOS][WK2] WebPageProxy should not do anything when responding to an animated resize is the page is not in a valid state
2023 https://bugs.webkit.org/show_bug.cgi?id=135169
2024 <rdar://problem/17740149>
2026 Reviewed by Tim Horton.
2028 * UIProcess/ios/WebPageProxyIOS.mm:
2029 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2030 Neither m_dynamicViewportSizeUpdateWaitingForTarget nor m_dynamicViewportSizeUpdateWaitingForLayerTreeCommit should
2031 be modified if there is not WebProcess to respond to DynamicViewportSizeUpdate.
2033 (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
2034 We should not attempt to synchronize anything if the page was closed before the end of the dynamic viewport
2037 2014-07-22 Timothy Horton <timothy_horton@apple.com>
2039 REGRESSION (r171239): Much more time spent taking snapshots during the PLT
2040 https://bugs.webkit.org/show_bug.cgi?id=135177
2041 <rdar://problem/17764847>
2043 Reviewed by Dan Bernstein.
2045 * UIProcess/WebPageProxy.cpp:
2046 (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
2047 (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
2048 * UIProcess/WebPageProxy.h:
2049 * UIProcess/WebPageProxy.messages.in:
2050 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2051 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
2052 * WebProcess/WebPage/WebPage.cpp:
2053 (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
2054 (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
2055 * WebProcess/WebPage/WebPage.h:
2056 Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
2057 Only send it when the current history item for the main frame changes.
2059 2014-07-22 Oliver Hunt <oliver@apple.com>
2061 Add accountsd access to network sandbox profile
2062 https://bugs.webkit.org/show_bug.cgi?id=135176
2065 Reviewed by Anders Carlsson.
2067 This is available to the webcontent process already, but is also
2068 needed for the networking process.
2070 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2072 2014-07-22 Oliver Hunt <oliver@apple.com>
2074 Remove unused com.apple.webkit.* rules from profiles
2075 https://bugs.webkit.org/show_bug.cgi?id=135174
2078 Reviewed by Anders Carlsson.
2080 We never send these rules so we should just remove use of them
2083 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2084 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2086 2014-07-22 Oliver Hunt <oliver@apple.com>
2088 Provide networking process with access to its HSTS db
2089 https://bugs.webkit.org/show_bug.cgi?id=135121
2092 Reviewed by Alexey Proskuryakov.
2094 Add an extension parameter to pass the hsts database file.
2095 This requires us to create the Caches/com.apple.WebKit.Networking
2096 directory in the UI process, as the network sandbox
2097 does not allow it to create the containing directory.
2099 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2100 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2101 * Shared/Network/NetworkProcessCreationParameters.cpp:
2102 (WebKit::NetworkProcessCreationParameters::encode):
2103 (WebKit::NetworkProcessCreationParameters::decode):
2104 * Shared/Network/NetworkProcessCreationParameters.h:
2105 * UIProcess/WebContext.cpp:
2106 (WebKit::WebContext::ensureNetworkProcess):
2107 (WebKit::WebContext::networkingHSTSDatabasePath):
2108 * UIProcess/WebContext.h:
2109 * UIProcess/mac/WebContextMac.mm:
2110 (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
2112 2014-07-22 Benjamin Poulain <bpoulain@apple.com>
2114 [iOS][WK2] UI helpers that zoom on an element ignore the viewport's allowsUserScaling
2115 https://bugs.webkit.org/show_bug.cgi?id=135140
2116 <rdar://problem/17754921>
2118 Reviewed by Tim Horton.
2120 UIScrollView makes a difference between min/max zoom and allowUserScaling. To express that,
2121 everything is set up on the LayerTransaction.
2123 For zooming related helpers (find on page, double tap to zoom, etc), the min and max zoom
2124 should be the actual min/max for the current page state.
2126 This patch split the two explicitely.
2127 For layer transactions, the values are taken from the viewport configuration directly.
2128 For everything else, we should use minimumPageScaleFactor/maximumPageScaleFactor. Those two methods
2129 have been updated to take into account allowsUserScaling.
2131 * WebProcess/WebPage/WebPage.cpp:
2132 (WebKit::WebPage::willCommitLayerTree):
2133 * WebProcess/WebPage/ios/WebPageIOS.mm:
2134 (WebKit::WebPage::minimumPageScaleFactor):
2135 (WebKit::WebPage::maximumPageScaleFactor):
2136 (WebKit::WebPage::getAssistedNodeInformation):
2138 2014-07-22 Shivakumar JM <shiva.jm@samsung.com>
2140 Web Inspector: Fix unused parameter build warning
2141 https://bugs.webkit.org/show_bug.cgi?id=135151
2143 Reviewed by Joseph Pecoraro.
2145 Fix unused parameter build warning by removing the parameter name
2147 * WebProcess/WebPage/WebInspector.cpp:
2148 (WebKit::WebInspector::setJavaScriptProfilingEnabled):
2150 2014-07-22 Shivakumar JM <shiva.jm@samsung.com>
2152 Fix unused parameter build warning in UIProcess module
2153 https://bugs.webkit.org/show_bug.cgi?id=135154
2155 Reviewed by Alexey Proskuryakov.
2157 Fix unused parameter build warning in UIProcess module by using UNUSED_PARAM macro.
2159 * UIProcess/WebPageProxy.cpp:
2160 (WebKit::WebPageProxy::viewStateDidChange):
2162 2014-07-22 Jeremy Jones <jeremyj@apple.com>
2164 Don't create new UIWindow for video fullscreen.
2165 https://bugs.webkit.org/show_bug.cgi?id=135038
2167 Reviewed by Darin Adler.
2169 Use root UIView to parent fullscreen interface.
2171 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2172 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass parent UIView
2173 * WebProcess/ios/WebVideoFullscreenManager.mm:
2174 (WebKit::screenRectForNode): Use client rect instead of screen rect.
2176 2014-07-21 Ryuan Choi <ryuan.choi@samsung.com>
2178 [EFL] Add Ewk prefix to enums of ewk_navigation_policy
2179 https://bugs.webkit.org/show_bug.cgi?id=135144
2181 Reviewed by Gyuyoung Kim.
2183 All public enums of ewebkit should start with Ewk prefix.
2184 This patch added Ewk prefix to Ewk_Event_Mouse_Button and Ewk_Event_Modifiers.
2185 In addition, added missing description and default value for Ewk_Event_Modifier.
2187 * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
2188 (toEwkEventMouseButton):
2189 (toEwkEventModifiers):
2190 (EwkNavigationPolicyDecision::mouseButton):
2191 (EwkNavigationPolicyDecision::modifiers):
2192 (ewk_navigation_policy_mouse_button_get):
2193 (ewk_navigation_policy_modifiers_get):
2194 (toEventMouseButton): Deleted.
2195 (toEventModifierKeys): Deleted.
2196 * UIProcess/API/efl/ewk_navigation_policy_decision.h:
2197 * UIProcess/API/efl/ewk_navigation_policy_decision_private.h:
2199 2014-07-21 Benjamin Poulain <bpoulain@apple.com>
2201 [iOS][WK2] Improve event throttling for Scroll Events
2202 https://bugs.webkit.org/show_bug.cgi?id=135082
2203 <rdar://problem/17445266>
2205 Reviewed by Simon Fraser.
2207 In the WebKit layer, we want a measure that is representative of the responsiveness.
2209 In this patch, I use the total delay between a VisibleContentRectUpdate being dispatched
2210 by the UIProcess, and the time RemoteLayerTreeDrawingArea flushes the layer tree.
2212 The value used for eventThrottlingDelay() is computed by averaging the new value with
2213 the old values with a 80/20 split, favoring the old data. Favoring historical data
2214 over the last timing avoid excessively throttling for a single slow frame.
2216 The computation of m_estimatedMainThreadLatency can be improved in the future, this is
2217 a first cut keeping things simple.
2219 With m_estimatedMainThreadLatency in our hands, we can compute our eventThrottlingDelay().
2220 If m_estimatedMainThreadLatency is smaller than a single frame timespan, we have a fast page
2221 and nothing is throttled.
2223 If is it more than a frame, we throttle such that we can at least render two frames
2224 per event dispatch based on the historical data.
2226 The exact values will need some tweaking, but this set ensures well written pages get
2227 60 events per seconds, while slow pages do not waste too much time on events.
2229 * WebProcess/WebCoreSupport/WebChromeClient.h:
2230 * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
2231 (WebKit::WebChromeClient::eventThrottlingDelay):
2232 * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
2233 (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
2234 (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
2235 * WebProcess/WebPage/ViewUpdateDispatcher.h:
2236 * WebProcess/WebPage/WebPage.cpp:
2237 (WebKit::WebPage::WebPage):
2238 (WebKit::WebPage::didFlushLayerTreeAtTime):
2239 (WebKit::WebPage::didCommitLoad):
2240 * WebProcess/WebPage/WebPage.h:
2241 * WebProcess/WebPage/ios/WebPageIOS.mm:
2242 (WebKit::WebPage::eventThrottlingDelay):
2243 (WebKit::WebPage::updateVisibleContentRects):
2244 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2245 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2247 2014-07-21 Simon Fraser <simon.fraser@apple.com>
2249 REGRESSION (r170361): In landscape with UI hidden, fixed position elements at top of screen are too low
2250 https://bugs.webkit.org/show_bug.cgi?id=135141
2251 <rdar://problem/17627525>
2253 Reviewed by Benjamin Poulain.
2255 We can't use the WKWebView's UIScrollView contentInsets to determine the unobscured rect
2256 in MobileSafari, because contentInsets can't be changed dynamically while scrolling.
2257 To get around this, MobileSafari sets obscured insets instead (but also sets a fixed
2260 So if the client calls _setObscuredInsets:, always use _obscuredInsets to compute the
2263 * UIProcess/API/Cocoa/WKWebView.mm:
2264 (-[WKWebView _computedContentInset]):
2265 (-[WKWebView _setObscuredInsets:]):
2267 2014-07-21 Oliver Hunt <oliver@apple.com>
2269 Remove global cookie workaround from sandbox profiles
2270 https://bugs.webkit.org/show_bug.cgi?id=135138
2273 Reviewed by Alexey Proskuryakov.
2275 Remove the workaround needed for global cookie access, and silencing
2276 of the associated sandbox violation.
2278 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2279 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2280 * UIProcess/mac/WebContextMac.mm:
2281 (WebKit::WebContext::platformDefaultCookieStorageDirectory):
2283 2014-07-21 Oliver Hunt <oliver@apple.com>
2285 Correct sandbox profiles to fix some excess privileges
2286 https://bugs.webkit.org/show_bug.cgi?id=135134
2287 <rdar://problem/17741886>
2288 <rdar://problem/17739080>
2290 Reviewed by Alexey Proskuryakov.
2292 This cleans up our sandbox profiles to fix a few issues - the profiles
2293 no longer allow us to issue file extension we have the ability to consume,
2294 and tightens some of the other file access rules.
2296 This means we have to addd some rules to allow us to access things
2297 that we previously had access to due to lax file system restrictions.
2299 Some of the features were fixable simply by using entitlements on the
2300 process rather than custom rules.
2302 * Configurations/WebContent-iOS.entitlements:
2303 * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
2304 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2305 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2307 2014-07-21 Simon Fraser <simon.fraser@apple.com>
2309 [iOS WK2] Turn off position:fixed behavior when the keyboard is up
2310 https://bugs.webkit.org/show_bug.cgi?id=132537
2312 Reviewed by Benjamin Poulain.
2314 Make interaction with form elements inside position:fixed less terrible by re-laying out
2315 fixed elements relative to the document while we have an assisted node. This ensures
2316 that all parts of a position:fixed are accessible (e.g. inputs on the right side
2317 of a fixed-width top bar).
2319 * Shared/AssistedNodeInformation.cpp: Add a flag for being inside postion:fixed,
2320 and encode/decode it.
2321 (WebKit::AssistedNodeInformation::encode):
2322 (WebKit::AssistedNodeInformation::decode):
2323 * Shared/AssistedNodeInformation.h:
2324 (WebKit::AssistedNodeInformation::AssistedNodeInformation):
2325 * UIProcess/PageClient.h: Add isAssistingNode().
2326 * UIProcess/ios/PageClientImplIOS.h:
2327 * UIProcess/ios/PageClientImplIOS.mm:
2328 (WebKit::PageClientImpl::isAssistingNode):
2329 * UIProcess/ios/WebPageProxyIOS.mm:
2330 (WebKit::WebPageProxy::computeCustomFixedPositionRect): If we have an assisted
2331 node, just use the document rect as the custom fixed position rect.
2332 * WebProcess/WebPage/ios/WebPageIOS.mm:
2333 (WebKit::WebPage::getAssistedNodeInformation): Get the selection rect first,
2334 since we have to fix it up for position:fixed. If the element is inside fixed
2335 position in the main frame, re-set the fixed position rect to the document rect
2336 (which forces a layout), re-fetch elementRect, then set it back. This ensures
2337 that the UI process gets an elementRect which it can zoom to correctly.
2339 2014-07-21 Timothy Horton <timothy_horton@apple.com>
2341 Random crashes on the Web Thread due to Timers firing on the wrong thread in the UI process
2342 https://bugs.webkit.org/show_bug.cgi?id=135132
2343 <rdar://problem/17719832>
2345 Reviewed by Simon Fraser.
2347 * UIProcess/ProcessThrottler.cpp:
2348 (WebKit::ProcessThrottler::ProcessThrottler):
2349 (WebKit::ProcessThrottler::suspendTimerFired):
2350 * UIProcess/ProcessThrottler.h:
2351 * UIProcess/ios/ViewGestureControllerIOS.mm:
2352 (WebKit::ViewGestureController::ViewGestureController):
2353 (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
2354 * UIProcess/mac/ViewGestureController.h:
2355 * UIProcess/mac/ViewGestureControllerMac.mm:
2356 (WebKit::ViewGestureController::ViewGestureController):
2357 (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
2358 We can't use WebCore timers in the UI process because of coexistence concerns
2359 (they fire on the Web Thread if there is one!), so use RunLoop::Timer instead.
2361 2014-07-21 Andy Estes <aestes@apple.com>
2363 [iOS] Handle QuickLook ResourceLoaders in the web process
2364 https://bugs.webkit.org/show_bug.cgi?id=135113
2366 Reviewed by David Kilzer.
2368 The QuickLook framework registers a NSURLProtocol to handle loading subresources of the HTML documents it
2369 generates. In order for these loads to succeed, we need to start them in the same process in which QuickLook
2370 generated the main resource.
2372 * WebProcess/Network/WebResourceLoadScheduler.cpp:
2373 (WebKit::WebResourceLoadScheduler::scheduleLoad):
2375 2014-07-21 Brady Eidson <beidson@apple.com>
2377 DatabaseProcess doesn't relaunch after crashing.
2378 <rdar://problem/17717343> and https://bugs.webkit.org/show_bug.cgi?id=135117
2380 Reviewed by Alexey Proskuryakov.
2382 * UIProcess/Databases/DatabaseProcessProxy.cpp:
2383 (WebKit::DatabaseProcessProxy::didClose): Tell the WebContext.
2385 * UIProcess/WebContext.cpp:
2386 (WebKit::WebContext::databaseProcessCrashed): Notify supplements, then clear the DatabaseProcessProxy pointer.
2387 * UIProcess/WebContext.h:
2389 * UIProcess/WebContextSupplement.h:
2390 (WebKit::WebContextSupplement::processDidClose): Added. No users right now, but the patch in bug 135035 will need this.
2392 2014-07-20 KwangHyuk Kim <hyuki.kim@samsung.com>
2394 Fix warnings caused by unused parameter.
2395 https://bugs.webkit.org/show_bug.cgi?id=134975
2397 Reviewed by Gyuyoung Kim.
2399 Fix warnings on EwkView.cpp and LegacySessionStateCodingNone.cpp that are caused by unused parameter data.
2401 * UIProcess/API/efl/EwkView.cpp:
2402 (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
2403 * UIProcess/LegacySessionStateCodingNone.cpp:
2404 (WebKit::decodeLegacySessionState):
2406 2014-07-20 Jeremy Jones <jeremyj@apple.com>
2408 Disable ff/rw based on canPlayFastForward and canPlayFastRewind.
2409 https://bugs.webkit.org/show_bug.cgi?id=134894
2411 Reviewed by Darin Adler.
2413 Add setCanPlayFastReverse
2415 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: ditto
2416 * WebProcess/ios/WebVideoFullscreenManager.h: ditto
2417 * WebProcess/ios/WebVideoFullscreenManager.mm: ditto
2418 (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse): ditto
2420 2014-07-20 Jeremy Jones <jeremyj@apple.com>
2422 Decrease flicker when enter and exit fullscreen.
2423 https://bugs.webkit.org/show_bug.cgi?id=134919
2425 Reviewed by Simon Fraser.
2427 Change the sequence of tear down and use transparency to prevent flicker when entering and exiting fullscreen.
2429 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: wait to remove layerHost until didCleanupFullscreen
2430 (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen): removed from here
2431 (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): added here
2432 * WebProcess/ios/WebVideoFullscreenManager.mm:
2433 (WebKit::WebVideoFullscreenManager::didSetupFullscreen): use transparent background during transition
2435 2014-07-20 Dan Bernstein <mitz@apple.com>
2437 <rdar://problem/17739526> REGRESSION (r171057): Crash in WebPage::getPositionInformation()
2438 https://bugs.webkit.org/show_bug.cgi?id=135099
2440 Reviewed by David Kilzer.
2442 * WebProcess/WebPage/ios/WebPageIOS.mm:
2443 (WebKit::WebPage::getPositionInformation): Added a null check.
2445 2014-07-19 Zan Dobersek <zdobersek@igalia.com>
2447 Consistently use uint64_t as the handle parameter type for the SetAcceleratedCompositingWindowId message
2448 https://bugs.webkit.org/show_bug.cgi?id=135047
2450 Reviewed by Darin Adler.
2452 UIProcess' WebPageProxy is handling this parameter as an uint64_t, it should be handled as such
2453 in WebProcess as well.
2455 * WebProcess/WebPage/WebPage.h:
2456 * WebProcess/WebPage/WebPage.messages.in: Also changed the parameter name to match other places.
2457 * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2458 (WebKit::WebPage::setAcceleratedCompositingWindowId):
2460 2014-07-18 Oliver Hunt <oliver@apple.com>
2462 We don't provide an extension to the temp file used for uploads
2463 https://bugs.webkit.org/show_bug.cgi?id=135079
2465 Reviewed by Sam Weinig.
2467 Make sure didChooseFilesForOpenPanelWithDisplayStringAndIcon vends
2468 extensions for the files passed to the content process.
2470 * UIProcess/WebPageProxy.cpp:
2471 (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
2473 2014-07-18 Tim Horton <timothy_horton@apple.com>
2475 ASSERTion failures in ViewGestureController indicating that we're copying WebBackForwardList
2476 https://bugs.webkit.org/show_bug.cgi?id=135080
2477 <rdar://problem/17734714>
2479 Reviewed by Sam Weinig.
2481 * UIProcess/ios/ViewGestureControllerIOS.mm:
2482 (WebKit::ViewGestureController::beginSwipeGesture):
2483 (WebKit::ViewGestureController::canSwipeInDirection):
2485 2014-07-18 Yongjun Zhang <yongjun_zhang@apple.com>
2487 _WKActivatedElementInfo.title should fallback to innerText if the link doesn't have title attribute.
2488 https://bugs.webkit.org/show_bug.cgi?id=135077
2490 When populate InteractionInformationAtPosition's title value, use a link element's innerText if it
2491 doesn't have title attribute.
2493 Reviewed by Dan Bernstein.
2495 * WebProcess/WebPage/ios/WebPageIOS.mm:
2496 (WebKit::WebPage::getPositionInformation):
2498 2014-07-18 Andy Estes <aestes@apple.com>
2500 [iOS] Tapping "Allow Website" on a restricted page does not bring up the keypad
2501 https://bugs.webkit.org/show_bug.cgi?id=135072
2502 <rdar://problem/17528188>
2504 Reviewed by David Kilzer.
2506 * Shared/WebCoreArgumentCoders.h: Declared an ArgumentCoder for WebCore::ContentFilter.
2507 * Shared/mac/WebCoreArgumentCodersMac.mm:
2508 (IPC::ArgumentCoder<ContentFilter>::encode): Encoded the ContentFilter using a NSKeyedArchiver.
2509 (IPC::ArgumentCoder<ContentFilter>::decode): Decoded the ContentFilter using a NSKeyedUnarchiver.
2510 * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2511 (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Called WebFrameProxy::setContentFilterForBlockedLoad().
2512 * UIProcess/WebFrameProxy.cpp:
2513 (WebKit::WebFrameProxy::didStartProvisionalLoad): Reset m_contentFilterForBlockedLoad to nullptr.
2514 (WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction): Called ContentFilter::handleUnblockRequestAndDispatchIfSuccessful().
2515 If the unblock is successful, reload the WebPageProxy.
2516 * UIProcess/WebFrameProxy.h:
2517 (WebKit::WebFrameProxy::setContentFilterForBlockedLoad):
2518 * UIProcess/WebPageProxy.cpp:
2519 (WebKit::WebPageProxy::decidePolicyForNavigationAction): Check if this is navigation represents an unblock
2520 request and ignore if so.
2521 * UIProcess/WebPageProxy.h:
2522 * UIProcess/WebPageProxy.messages.in: Defined ContentFilterDidBlockLoadForFrame.
2523 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2524 (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad): Sent ContentFilterDidBlockLoadForFrame to the WebPageProxy.
2525 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2527 2014-07-18 Simon Fraser <simon.fraser@apple.com>
2529 [iOS WK2] position:fixed in iframes with programmatic scroll could end up in the wrong place
2530 https://bugs.webkit.org/show_bug.cgi?id=135078
2531 <rdar://problem/17401823>
2533 Reviewed by Tim Horton.
2535 Fix the logging of requested scroll position and frame scale factor.
2537 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2538 (WebKit::RemoteScrollingTreeTextStream::dump):
2540 2014-07-18 Joseph Pecoraro <pecoraro@apple.com>
2542 [Cocoa] Use RetainPtr in _WKRemoteObjectInterface
2543 https://bugs.webkit.org/show_bug.cgi?id=135062
2545 Reviewed by Anders Carlsson.
2547 Switch to RetainPtr instead of manual memory management of ivars.
2549 * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
2550 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
2551 (-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
2552 (-[_WKRemoteObjectInterface identifier]):
2553 (-[_WKRemoteObjectInterface description]):
2554 (-[_WKRemoteObjectInterface dealloc]): Deleted.
2556 2014-07-18 Tim Horton <timothy_horton@apple.com>
2558 Take navigation snapshots whenever the current back-forward item is going to change
2559 https://bugs.webkit.org/show_bug.cgi?id=135058
2560 <rdar://problem/17464515>
2562 Reviewed by Dan Bernstein.
2564 Instead of trying to have the UI process figure out when to take navigation snapshots by itself,
2565 snapshot whenever the Web process says that the current back-forward item is going to change.
2566 This fixes snapshotting timing with pushState, and lets us bottleneck snapshotting down to
2567 just two places instead of 5.
2569 * UIProcess/WebPageProxy.cpp:
2570 (WebKit::WebPageProxy::goForward):
2571 (WebKit::WebPageProxy::goBack):
2572 (WebKit::WebPageProxy::goToBackForwardItem):
2573 (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
2574 We no longer need to special-case taking navigation snapshots
2575 when the UI process changes the back forward item or upon
2576 didStartProvisionalLoadForFrame, because we'll always snapshot
2577 in willChangeCurrentHistoryItem in all of these cases.
2579 * UIProcess/WebPageProxy.cpp:
2580 (WebKit::WebPageProxy::willChangeCurrentHistoryItem):
2581 * UIProcess/WebPageProxy.h:
2582 * UIProcess/WebPageProxy.messages.in:
2583 Add willChangeCurrentHistoryItem message, which comes from the Web process.
2584 When it arrives, take a navigation snapshot.
2586 * UIProcess/ios/ViewGestureControllerIOS.mm:
2587 (WebKit::ViewGestureController::beginSwipeGesture):
2588 Take the pre-swipe navigation snapshot before telling WebPageProxy that we're doing a swipe,
2589 so that it doesn't bail from taking the snapshot because we have a snapshot up.
2591 (WebKit::ViewGestureController::endSwipeGesture):
2592 We no longer need to explicitly disable snapshotting while navigating, because
2593 we will avoid taking the snapshot if there's a snapshot being displayed.
2595 * UIProcess/mac/ViewGestureControllerMac.mm:
2596 (WebKit::ViewGestureController::~ViewGestureController):
2597 Remove the snapshot if it's still up when ViewGestureController is destroyed.
2598 The Mac version of ViewGestureController is destroyed on Web process crashes
2599 because it is a message receiver, so it is not guaranteed to have the same
2600 lifetime as the WebPageProxy and friends.
2602 (WebKit::ViewGestureController::trackSwipeGesture):
2603 Make use of recordNavigationSnapshot.
2605 (WebKit::ViewGestureController::endSwipeGesture):
2606 Ditto from the Mac version.
2608 * UIProcess/mac/ViewSnapshotStore.h:
2609 (WebKit::ViewSnapshotStore::disableSnapshotting): Deleted.
2610 (WebKit::ViewSnapshotStore::enableSnapshotting): Deleted.
2611 * UIProcess/mac/ViewSnapshotStore.mm:
2612 (WebKit::ViewSnapshotStore::ViewSnapshotStore):
2613 (WebKit::ViewSnapshotStore::recordSnapshot):
2614 Remove the snapshot disabling mechanism and bail from snapshotting if we're
2615 showing a snapshot, as mentioned above.
2617 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2618 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
2619 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2620 * WebProcess/WebPage/WebPage.cpp:
2621 (WebKit::WebPage::willChangeCurrentHistoryItem):
2622 * WebProcess/WebPage/WebPage.h:
2623 Proxy willChangeCurrentHistoryItem from HistoryController to the UI process.
2625 2014-07-18 Jon Honeycutt <jhoneycutt@apple.com>
2627 REGRESSION: Crash when typing into text field that clears itself on iOS
2629 <https://bugs.webkit.org/show_bug.cgi?id=135044>
2630 <rdar://problem/17640443>
2632 Reviewed by Darin Adler.
2634 * WebProcess/WebPage/ios/WebPageIOS.mm:
2635 (WebKit::WebPage::requestAutocorrectionData):
2636 wordRangeFromPosition() returns null in some cases; null check range
2637 before dereferencing it. Moved some variable declarations around to
2638 better match our style.
2640 2014-07-18 Tim Horton <timothy_horton@apple.com>
2642 [WK2] Provide a mechanism to grab the back-forward list for gesture navigation purposes from another WKWebView
2643 https://bugs.webkit.org/show_bug.cgi?id=134999
2644 <rdar://problem/17238025>
2646 Reviewed by Sam Weinig.
2648 In some cases, clients may need to throw a WKWebView with no back-forward list over
2649 another WKWebView, and want to participate in gesture swipe as if they were actually
2650 the page being overlaid.
2652 * UIProcess/API/Cocoa/WKWebView.mm:
2653 (-[WKWebView setAllowsBackForwardNavigationGestures:]):
2654 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2655 (-[WKWebViewConfiguration copyWithZone:]):
2656 (-[WKWebViewConfiguration _alternateWebViewForNavigationGestures]):
2657 (-[WKWebViewConfiguration _setAlternateWebViewForNavigationGestures:]):
2658 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2659 Keep an "alternate" WKWebView "for navigation gestures", which ViewGestureController
2660 will use as the real source of back-forward items, and the destination of the swipe navigation.
2661 All swipe delegate callbacks will also fire from the alternate view, because it owns the items
2662 and will be doing the navigation.
2664 * UIProcess/ios/ViewGestureControllerIOS.mm:
2665 (WebKit::ViewGestureController::setAlternateBackForwardListSourceView):
2666 (WebKit::ViewGestureController::beginSwipeGesture):
2667 Send navigationGestureDidBegin via the alternate view's WebPageProxy if it exists.
2668 Record a new snapshot on the current page, but copy it to the alternate view if necessary,
2669 so that when swiping forward from the alternate view, it will have the "right" snapshot.
2670 Get the target back forward item from the alternate view.
2671 Send navigationGestureWillEnd via the alternate view's WebPageProxy if it exists.
2673 (WebKit::ViewGestureController::canSwipeInDirection):
2674 Determine if we can swipe in a direction by looking at the alternate view's back-forward list if necessary.
2676 (WebKit::ViewGestureController::endSwipeGesture):
2677 Send navigationGestureDidEnd via the alternate view's WebPageProxy if it exists.
2678 Perform the navigation on the alternate view if necessary.
2680 (WebKit::ViewGestureController::removeSwipeSnapshot):
2681 Send navigationGestureSnapshotWasRemoved via the alternate view's WebPageProxy if it exists.
2683 * UIProcess/mac/ViewGestureController.h:
2685 2014-07-17 David Kilzer <ddkilzer@apple.com>
2687 SECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
2688 <http://webkit.org/b/135006>
2690 Reviewed by Darin Adler.
2692 * Configurations/Base.xcconfig: Move SECTORDER_FLAGS to
2694 * Configurations/DebugRelease.xcconfig: Remove empty
2695 SECTORDER_FLAGS definition.
2696 * Configurations/WebKit.xcconfig: Use $(CONFIGURATION) so
2697 SECTORDER_FLAGS is only set on Production builds.
2699 2014-07-17 Alexey Proskuryakov <ap@apple.com>
2701 REGRESSION (r171167): LoaderClient processDidCrash call is made after load state changes
2702 https://bugs.webkit.org/show_bug.cgi?id=135032
2703 <rdar://problem/17716602>
2705 Reviewed by Dan Bernstein.
2707 * UIProcess/WebPageProxy.cpp:
2708 (WebKit::WebPageProxy::processDidCrash): Create a transaction, so that the nested
2709 transaction in resetStateAfterProcessExited() wouldn't be committed.
2710 (WebKit::WebPageProxy::resetStateAfterProcessExited): Don't use auto - it was hiding
2711 the most important fact that this is a stack object that can't be simply moved to
2712 a different function.
2714 2014-07-17 Benjamin Poulain <bpoulain@apple.com>
2716 [iOS][WK2] Fix the updateVisibleContentRects synchronization for load after r171154
2717 https://bugs.webkit.org/show_bug.cgi?id=135036
2719 Reviewed by Dan Bernstein.
2721 * WebProcess/WebPage/ios/WebPageIOS.mm:
2722 (WebKit::WebPage::updateVisibleContentRects):
2723 I forgot to update one of the condition after changing from lastTransaction to next transaction
2726 2014-07-17 Enrica Casucci <enrica@apple.com>
2728 [REGRESSION WK2]The menu bar does not show up when tapping on the caret.
2729 https://bugs.webkit.org/show_bug.cgi?id=135023
2730 <rdar://problem/17617282>
2732 Reviewed by Benjamin Poulain and Ryosuke Niwa.
2734 WKContentView needs to implement hasContent to correctly show
2735 the appropriate menu bar content. The patch adds this information
2738 * Shared/EditorState.cpp:
2739 (WebKit::EditorState::encode):
2740 (WebKit::EditorState::decode):
2741 * Shared/EditorState.h:
2742 (WebKit::EditorState::EditorState):
2743 * UIProcess/ios/WKContentViewInteraction.mm:
2744 (-[WKContentView hasContent]):
2745 * WebProcess/WebPage/WebPage.cpp:
2746 (WebKit::WebPage::editorState):
2748 2014-07-17 Benjamin Poulain <benjamin@webkit.org>
2750 [iOS][WK2] Add SPI to do a dynamic viewport update without showing any content
2751 https://bugs.webkit.org/show_bug.cgi?id=135010
2753 Reviewed by Darin Adler.
2755 This patch add a new SPI, [WKWebView _resizeWhileHidingContentWithUpdates:] to perform all the work
2756 of a dynamic viewport size update, but instead of animating the old content, it is hidden.
2758 The patch is built on top of the animated resize mechanism. Instead of having an animation driving
2759 the beginning and end, we let the content do that. The dynamic resize begins, it runs for as long as
2760 the WebProcess needs, and it ends when first layer tree commit with the new content is processed.
2762 The attribute "_isAnimatingResize" is generalized to support two modes of resizing: animated and
2765 The attribute "_hasCommittedLoadForMainFrame" is rather silly. It is only needed because
2766 [WKWebView _resizeWhileHidingContentWithUpdates:] is intended to be called a lot before the page
2767 is initialized, and doing an animated resize would trash the WebProcess state.
2768 I wish I had a better solution, this is not great.
2770 * UIProcess/API/Cocoa/WKWebView.mm:
2771 (-[WKWebView _processDidExit]):
2772 (-[WKWebView _didCommitLoadForMainFrame]):
2773 (-[WKWebView _didCommitLayerTree:]):
2774 This is the key to make this work properly. We want _resizeWhileHidingContentWithUpdates: to behave
2775 exactly like an animated resize to avoid bugs. So we went to the whole update mechanism using
2776 _resizeAnimationTransformAdjustments to accumulate the adjustments, now we need to restore a correct
2779 Calling [WKWebView _endAnimatedResize] will do exactly that, but we need to make sure we do not hit
2780 the synchronization path or we would be blocked there for a while, which is what we are trying to avoid.
2782 After r171154, WebPageProxy keeps track of what stage of dynamic viewport update we are in. Since we are
2783 executing the layer tree update stage, with the right transaction ID, WebPageProxy already knows we have
2784 everything we need and does not use any synchronous messages.
2786 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
2787 (-[WKWebView _restorePageStateToExposedRect:scale:]):
2788 (-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
2789 (-[WKWebView _scrollToContentOffset:]):
2790 (-[WKWebView _frameOrBoundsChanged]):
2791 (-[WKWebView _updateVisibleContentRects]):
2792 (-[WKWebView _setMinimumLayoutSizeOverride:]):
2793 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
2794 (-[WKWebView _setInterfaceOrientationOverride:]):
2795 (-[WKWebView _setMaximumUnobscuredSizeOverride:]):
2796 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2797 (-[WKWebView _endAnimatedResize]):
2798 (-[WKWebView _resizeWhileHidingContentWithUpdates:]):
2799 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2801 2014-07-17 Brent Fulgham <bfulgham@apple.com>
2803 [Mac] Full screen video not always animating in the correct Space
2804 https://bugs.webkit.org/show_bug.cgi?id=135020
2805 <rdar://problem/17542310>
2807 Reviewed by Dean Jackson.
2809 The fullscreen window can "remember" the Space it was part of the first time you enter fullscreen
2810 mode. Subsequent fullscreen transitions will always start from this Space, even if you move
2811 the WebKit-hosted application to a different Space.
2813 We can help the display system know when we've moved to a new Space by calling NSWindow's
2814 'orderBack' method on the fullscreen window prior to starting the transition to fullscreen mode.
2815 This method call hooks the window into the current Space so everything works properly.
2817 * UIProcess/mac/WKFullScreenWindowController.mm:
2818 (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): Add the
2819 new fullscreen window to the current Space before starting transition to fullscreen.
2821 2014-07-17 Timothy Hatcher <timothy@apple.com>
2823 Make console.profile record to the Timeline.
2825 https://bugs.webkit.org/show_bug.cgi?id=134643
2827 Reviewed by Joseph Pecoraro.
2829 * WebProcess/WebPage/WebInspector.cpp:
2830 (WebKit::WebInspector::setJavaScriptProfilingEnabled):
2831 (WebKit::WebInspector::startJavaScriptProfiling):
2832 (WebKit::WebInspector::stopJavaScriptProfiling):
2834 2014-07-17 Brady Eidson <beidson@apple.com>
2836 Crash in ServicesOverlayController::~ServicesOverlayController.
2837 <rdar://problem/17622172> and https://bugs.webkit.org/show_bug.cgi?id=135022
2839 Reviewed by Tim Horton.
2841 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2842 (WebKit::ServicesOverlayController::~ServicesOverlayController): Don’t need to uninstall the
2843 PageOverlay as it has already been destroyed by this point in WebPage::~WebPage.
2845 2014-07-17 Tim Horton <timothy_horton@apple.com>
2847 Sometimes purgeable (or empty!) tiles are shown on screen when resuming the app
2848 https://bugs.webkit.org/show_bug.cgi?id=135018
2849 <rdar://problem/17615038>
2851 Reviewed by Simon Fraser.
2853 * UIProcess/DrawingAreaProxy.h:
2854 (WebKit::DrawingAreaProxy::hideContentUntilNextUpdate):
2855 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2856 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2857 (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate):
2858 * UIProcess/mac/RemoteLayerTreeHost.h:
2859 * UIProcess/mac/RemoteLayerTreeHost.mm:
2860 (WebKit::RemoteLayerTreeHost::detachRootLayer):
2861 Add a mechanism to "hide" drawing area content until the next commit,
2862 by detaching the root layer. RemoteLayerTreeHost will automatically reattach
2863 it at the next commit.
2865 * UIProcess/WebPageProxy.cpp:
2866 (WebKit::WebPageProxy::viewStateDidChange):
2867 * UIProcess/WebPageProxy.h:
2868 Add a parameter to viewStateDidChange specifying whether dispatching the change
2869 to the Web process is deferrable or not. We will also automatically use "Immediate" if
2870 the view is coming in-window, like we did before.
2872 * UIProcess/ios/WKContentView.mm:
2873 (-[WKContentView _applicationWillEnterForeground:]):
2874 Make use of the aforementioned new mechanisms to ensure that we immediately dispatch
2875 view state changes when coming into the foreground, and will have removed the root layer
2876 if a commit didn't come in while waitForDidUpdateViewState blocks.
2878 2014-07-17 Sanghyup Lee <sh53.lee@samsung.com>
2880 [EFL][WK2] Add a "focus,notfound" signal.
2881 https://bugs.webkit.org/show_bug.cgi?id=134674
2883 Reviewed by Gyuyoung Kim.
2885 Add a "focus,notfound" signal to handover focus control to application
2886 because there are no elements of webview to focus on the given direction.
2888 Application can decide to move the focus to next widget of ewk_view or something else
2889 by using this signal.
2891 * UIProcess/API/efl/EwkViewCallbacks.h:
2892 * UIProcess/API/efl/ewk_view.h:
2893 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Added keyDown and keyUp function.
2894 (EWK2UnitTest::EWK2UnitTestBase::waitUntilDirectionChanged):
2895 (EWK2UnitTest::EWK2UnitTestBase::keyDown):
2896 (EWK2UnitTest::EWK2UnitTestBase::keyUp):
2897 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
2898 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2899 (EWK2ViewTest::FocusNotFoundCallback):
2901 * UIProcess/efl/PageUIClientEfl.cpp: Removed unnecessary calls to evas_object_focus_set().
2902 (WebKit::PageUIClientEfl::takeFocus):
2904 2014-07-16 Brady Eidson <beidson@apple.com>
2906 Reintroduce the SPI _websiteDataURLForContainerWithURL: that was removed in r171160
2907 https://bugs.webkit.org/show_bug.cgi?id=134984
2909 Reviewed by David Kilzer.
2911 * UIProcess/API/Cocoa/WKProcessPool.mm:
2912 (+[WKProcessPool _websiteDataURLForContainerWithURL:]):
2913 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2915 2014-07-16 Alexey Proskuryakov <ap@apple.com>
2917 A test that hangs at cleanup stage confuses webkitpy hugely
2918 https://bugs.webkit.org/show_bug.cgi?id=122475
2919 <rdar://problem/17184354>
2921 Reviewed by Anders Carlsson.
2923 Reset m_pageLoadState when the process exits cleanly - otherwise messages from a
2924 new process for the same WebPageProxy would hit assertions.
2926 * UIProcess/WebPageProxy.cpp:
2927 (WebKit::WebPageProxy::processDidCrash):
2928 (WebKit::WebPageProxy::resetStateAfterProcessExited):
2930 2014-07-16 David Kilzer <ddkilzer@apple.com>
2932 [iOS] Update order file paths for WebKit and WebKit2
2933 <http://webkit.org/b/134993>
2934 <rdar://problem/17557776>
2936 Reviewed by Darin Adler.
2938 * Configurations/Base.xcconfig: Add order file for iOS
2941 2014-07-16 Brady Eidson <beidson@apple.com>
2943 Add WebSecurityOrigin "webSecurityOriginFromDatabaseIdentifier" SPI and change _websiteDataURLForContainerWithURL: SPI
2944 <rdar://problem/17454712> and https://bugs.webkit.org/show_bug.cgi?id=134984
2946 Reviewed by Dan Bernstein.
2948 Change _websiteDataURLForContainerWithURL: SPI to include an optional bundle identifier argument:
2949 * UIProcess/API/Cocoa/WKProcessPool.mm:
2950 (+[WKProcessPool _websiteDataURLForContainerWithURL:bundleIdentifierIfNotInContainer:]):
2951 (+[WKProcessPool _websiteDataURLForContainerWithURL:]): Deleted.
2952 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2954 Add a big shiny comment in a few key places:
2955 * DatabaseProcess/DatabaseProcess.cpp:
2956 (WebKit::DatabaseProcess::initializeDatabaseProcess):
2957 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2958 (WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
2959 * UIProcess/WebContext.cpp:
2960 (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
2961 (WebKit::WebContext::ensureDatabaseProcess):
2963 2014-07-16 Enrica Casucci <enrica@apple.com>
2965 REGRESSION (iOS WebKit2): Cannot scroll while dragging a selection.
2966 https://bugs.webkit.org/show_bug.cgi?id=134992
2967 <rdar://problem/17528020>
2969 Reviewed by Benjamin Poulain.
2971 This patch exposes the scroller and the visible content rect so that
2972 UIKit can implement autoscroll when dragging the selections.
2973 It also changes that way we do hit testing to allow hit test outside
2974 the clipping region and fixes the way we compute the selection rectangle
2975 for the block selection, ensuring that we consider also non text elements
2978 * UIProcess/ios/WKContentViewInteraction.mm:
2979 (-[WKContentView scroller]):
2980 (-[WKContentView visibleRect]):
2981 * WebProcess/WebPage/ios/WebPageIOS.mm:
2982 (WebKit::selectionBoxForRange):
2983 (WebKit::WebPage::rangeForWebSelectionAtPosition):
2984 (WebKit::WebPage::rangeForBlockAtPoint):
2985 (WebKit::WebPage::expandedRangeFromHandle):
2986 (WebKit::WebPage::contractedRangeFromHandle):
2987 (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
2988 (WebKit::WebPage::changeBlockSelection):
2990 2014-07-16 Alexey Proskuryakov <ap@apple.com>
2992 <rdar://problem/17669097> REGRESSION (r170155): Sandbox violations using a wrong
2993 CFNetwork cache path in WebContent process
2995 Rubber-stamped by Sam Weinig.
2997 Before r170155, we incorrectly checked usesNetworkProcess(), which always returns
2998 false at this point in initialization sequence. But we did the right thing, as we
2999 always need to set the cache path, even when network process is used for most loading.
3001 * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):
3003 2014-07-16 Timothy Horton <timothy_horton@apple.com>
3005 Dispatch top content inset changes immediately if synchronously waiting for view state changes
3006 https://bugs.webkit.org/show_bug.cgi?id=134942
3007 <rdar://problem/17666800>
3009 Reviewed by Simon Fraser.
3011 * UIProcess/API/mac/WKView.mm:
3012 (-[WKView _dispatchSetTopContentInset]):
3013 (-[WKView _setTopContentInset:]):
3014 Move the check from _setTopContentInset: to _dispatchSetTopContentInset
3015 that ensures that we only send the message if the top content inset changed.
3017 2014-07-16 Benjamin Poulain <bpoulain@apple.com>
3019 [iOS][WK2] Synchronize the dynamic viewport updates with their layer tree commit
3020 https://bugs.webkit.org/show_bug.cgi?id=134965
3021 Related to <rdar://problem/17082607>
3023 Reviewed by Tim Horton.
3025 Dynamic viewport update relies on the _resizeAnimationTransformAdjustments being applied
3026 to the page at the new size during the transition.
3028 Because of the races between the LayerTree Commit and DynamicViewportSizeUpdate, the transform
3029 can be applied to the wrong set of tiles.
3030 This is mostly a problem for unresponsive WebProcess or when the synchronization is done
3033 There is at least one more case that is not handled: if synchronizeDynamicViewportUpdate()
3034 completely fails to get the new page, the UIProcess is in a somewhat messy state.
3035 I will look into that separately than the layer tree synchronization.
3037 * UIProcess/API/Cocoa/WKWebView.mm:
3038 (-[WKWebView _didCommitLayerTree:]):
3039 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
3040 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]): Deleted.
3041 * UIProcess/API/Cocoa/WKWebViewInternal.h:
3042 * UIProcess/PageClient.h:
3043 * UIProcess/WebPageProxy.cpp:
3044 (WebKit::WebPageProxy::WebPageProxy):
3045 (WebKit::WebPageProxy::resetState):
3046 * UIProcess/WebPageProxy.h:
3047 * UIProcess/ios/PageClientImplIOS.h:
3048 * UIProcess/ios/PageClientImplIOS.mm:
3049 (WebKit::PageClientImpl::dynamicViewportUpdateChangedTarget):
3050 * UIProcess/ios/WebPageProxyIOS.mm:
3051 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
3052 (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
3053 (WebKit::WebPageProxy::didCommitLayerTree):
3054 (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
3055 * WebProcess/WebPage/WebPage.cpp:
3056 (WebKit::WebPage::WebPage):
3057 (WebKit::WebPage::didCommitLoad):
3058 * WebProcess/WebPage/WebPage.h:
3059 * WebProcess/WebPage/WebPage.messages.in:
3060 * WebProcess/WebPage/ios/WebPageIOS.mm:
3061 (WebKit::WebPage::synchronizeDynamicViewportUpdate):
3062 (WebKit::WebPage::updateVisibleContentRects):
3063 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3064 (WebKit::RemoteLayerTreeDrawingArea::nextTransactionID):
3065 (WebKit::RemoteLayerTreeDrawingArea::currentTransactionID): Deleted.
3067 2014-07-16 Dan Bernstein <mitz@apple.com>
3069 REGRESSION (r170653): Web Content service’s Info.plist has wrong format
3070 https://bugs.webkit.org/show_bug.cgi?id=134973
3072 Reviewed by Alexey Proskuryakov.
3074 * WebKit2.xcodeproj/project.pbxproj: Updated the Add CFBundle Localization Info.plist Key
3075 script build phases to convert Info.plist back to binary format if the
3076 PLIST_FILE_OUTPUT_FORMAT build setting requires it.
3078 2014-07-15 Benjamin Poulain <bpoulain@apple.com>
3082 * UIProcess/API/Cocoa/WKWebView.mm:
3083 (-[WKWebView _scrollToContentOffset:]):
3084 On landing, I changed the min/max branches to shrunkTo/expandedTo, but the return value
3085 of those was ignored.
3087 2014-07-15 Dan Bernstein <mitz@apple.com>
3089 WKWebView’s FormClient::willSubmitForm should use CompletionHandlerCallChecker
3090 https://bugs.webkit.org/show_bug.cgi?id=134951
3092 Reviewed by Tim Horton.
3094 * UIProcess/API/Cocoa/WKWebView.mm:
3095 (-[WKWebView _setFormDelegate:]):
3097 2014-07-15 Benjamin Poulain <benjamin@webkit.org>
3099 [iOS][WK2] Scrolling request from the scrolling tree must be limited to offsets in the document
3100 https://bugs.webkit.org/show_bug.cgi?id=134952
3101 <rdar://problem/17647116>
3103 Reviewed by Enrica Casucci.
3105 When we received a scroll request, we were taking that offset directly to set the UIScrollView
3106 scroll position. This is a problem if a page request scrolling to an invalid position, we were
3109 This patch limits the position to be inside the document.
3111 -- Why not limit the scroll offset in the WebProcess when we receive the scroll request? --
3113 Some pages rely on the page scale factor changing instantly, because that is how it worked
3116 On WebKit2, the WebProcess cannot know the valid range because the obscured insets are changing
3117 dynamically, and the page scale factor can change in response to WebProcess events (the focus
3118 changing for example). To make the page works, the WebProcess does not restrict the scroll position.
3120 In that architecture, the UIProcess has to sanitize the input, which was not done before this patch.
3122 -- Why not use changeContentOffsetBoundedInValidRange()?
3124 The scroll offset as seen by the page is relative to the unobscured rect. While the position used
3125 for history item is a visual position. All we need in this case is a position in the view.
3127 * UIProcess/API/Cocoa/WKWebView.mm:
3128 (-[WKWebView _scrollToContentOffset:]):
3129 * UIProcess/WebPageProxy.h:
3130 * UIProcess/ios/WebPageProxyIOS.mm:
3131 (WebKit::WebPageProxy::resendLastVisibleContentRects):
3133 2014-07-15 Timothy Horton <timothy_horton@apple.com>
3135 Dispatch top content inset changes immediately if synchronously waiting for view state changes
3136 https://bugs.webkit.org/show_bug.cgi?id=134942
3137 <rdar://problem/17666800>
3139 Reviewed by Simon Fraser.
3141 * UIProcess/API/mac/WKView.mm:
3142 (-[WKView endDeferringViewInWindowChanges]):
3143 (-[WKView endDeferringViewInWindowChangesSync]):
3144 (-[WKView _dispatchSetTopContentInset]):
3145 (-[WKView _setTopContentInset:]):
3146 Send top content inset changes immediately before sync-waiting for new tiles from the Web Process.
3147 This will ensure that the incoming contents have the right top content inset, and we don't
3148 flash between the wrong inset and the right one.
3150 2014-07-15 Enrica Casucci <enrica@apple.com>
3152 REGRESSION(WK2 iOS): Safari hangs when switching focus from a field using the Tab key.
3153 https://bugs.webkit.org/show_bug.cgi?id=134934
3154 <rdar://problem/17224638>
3156 Reviewed by Tim Horton.
3158 * UIProcess/ios/WKContentViewInteraction.mm:
3160 Tab and back tab should be handled as special keys that have
3161 a command associated. The command specifies for each key the relevant
3162 action. This patch implements the commands property to create the association
3163 between key and command and the relevant actions that will execute the same
3164 code executed when the used taps on the < > buttons in the accessory bar.
3166 (-[WKContentView keyCommands]):
3167 (-[WKContentView _nextAccessoryTab:]):
3168 (-[WKContentView _prevAccessoryTab:]):
3170 2014-07-15 Oliver Hunt <oliver@apple.com>
3172 More tidying of the webcontent sandbox profile
3173 https://bugs.webkit.org/show_bug.cgi?id=134938
3175 Reviewed by Alexey Proskuryakov.
3177 Remove some excessive abilities from the profile and make
3178 the required ones explicit.
3180 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3182 2014-07-14 Andreas Kling <akling@apple.com>
3184 [iOS] Don't progressively re-render tiles while pinch-zooming under memory pressure.
3185 <https://webkit.org/b/134915>
3187 When we're under memory pressure, the last thing we want to be doing is
3188 creating gratuitous new IOSurfaces. Just wait for the gesture to end before
3189 rendering at the new scale.
3191 Reviewed by Tim Horton.
3193 * WebProcess/WebPage/ios/WebPageIOS.mm:
3194 (WebKit::WebPage::updateVisibleContentRects):
3196 2014-07-14 Joseph Pecoraro <pecoraro@apple.com>
3198 [Cocoa] _WKRemoteObjectInterface leaks NSString ivar
3199 https://bugs.webkit.org/show_bug.cgi?id=134914
3201 Reviewed by Simon Fraser.
3203 Release our copied NSString in dealloc.
3205 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
3206 (-[_WKRemoteObjectInterface dealloc]):
3208 2014-07-14 Dean Jackson <dino@apple.com>
3210 [PlugIns] Check for a non-null snapshot image before trying to decode it
3211 https://bugs.webkit.org/show_bug.cgi?id=134913
3212 <rdar://problem/17606033>
3214 Reviewed by Tim Horton.
3216 Changeset r169820 introduced a bug where we could examine the pixels of
3217 an image (looking for solid colors) before checking if the image actually
3220 I added a null check, and moved the code around a bit to avoid checking
3221 for existence three times.
3223 * WebProcess/Plugins/PluginView.cpp:
3224 (WebKit::PluginView::pluginSnapshotTimerFired): Check that snapshotImage exists
3225 before trying to look at it.
3227 2014-07-14 Anders Carlsson <andersca@apple.com>
3231 * UIProcess/Cocoa/SessionStateCoding.mm:
3232 (WebKit::encodeSessionState):
3234 2014-07-14 Anders Carlsson <andersca@apple.com>
3236 Use the legacy session coder for encoding/decoding session state
3237 https://bugs.webkit.org/show_bug.cgi?id=134910
3239 Reviewed by Beth Dakin.
3241 * UIProcess/Cocoa/SessionStateCoding.mm:
3242 (WebKit::encodeSessionState):
3243 (WebKit::decodeSessionState):
3245 2014-07-14 Oliver Hunt <oliver@apple.com>
3247 Restrict network process to remote connections
3248 https://bugs.webkit.org/show_bug.cgi?id=134908
3250 Reviewed by Geoffrey Garen.
3252 Further restrict network client
3254 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
3256 2014-07-14 Tim Horton <timothy_horton@apple.com>
3258 ASSERT(isMainThread()) under OneShotDisplayLinkHandler
3259 https://bugs.webkit.org/show_bug.cgi?id=134900
3261 Reviewed by Simon Fraser.
3263 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3264 (-[OneShotDisplayLinkHandler displayLinkFired:]):
3265 isMainThread means the Web thread sometimes.
3267 2014-07-14 Tim Horton <timothy_horton@apple.com>
3271 * UIProcess/API/Cocoa/WKWebView.mm:
3272 (-[WKWebView _frameOrBoundsChanged]):
3273 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3274 * UIProcess/API/ios/WKViewIOS.mm:
3275 (-[WKView _frameOrBoundsChanged]):
3277 2014-07-14 Carlos Alberto Lopez Perez <clopez@igalia.com>
3279 [UNIX] Log error description when failing to create shared memory file.
3280 https://bugs.webkit.org/show_bug.cgi?id=134892
3282 Reviewed by Darin Adler.
3284 * Platform/unix/SharedMemoryUnix.cpp:
3285 (WebKit::SharedMemory::create): Print the string describing the error number (errno).
3287 2014-07-14 Benjamin Poulain <benjamin@webkit.org>
3289 [iOS][WK2] On rotation, RemoteLayerTreeDrawingArea renders one extra frame at the wrong orientation
3290 https://bugs.webkit.org/show_bug.cgi?id=134875
3292 Reviewed by Tim Horton.
3294 On animated resize, the size of the DrawingAreaProxy was changed before the layout parameters were
3295 changed. This in turn caused the WebProcess's DrawingArea to flush the layer tree while still
3296 at the wrong orientation.
3298 This patch fixes the issue by making a special case for animated resize:
3299 -While starting animated resize, _frameOrBoundsChanged can be called several times in response to
3300 the API's client changing the WKWebView. In that case, we do not update the drawing area.
3301 -After the "updateBlock" is executed and the size have been changed, the dynamic viewport update
3302 is computed, the dynamicViewportSizeUpdate is sent to the WebProcess, followed by the message
3303 DrawingArea::updateGeometry(). Since both messages are asynchronous, they are received in that
3304 order, and the updateGeometry() is always done after the viewport configuration has been updated.
3306 * UIProcess/API/Cocoa/WKWebView.mm:
3307 (-[WKWebView _frameOrBoundsChanged]):
3308 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3309 * UIProcess/ios/WKContentView.h:
3310 * UIProcess/ios/WKContentView.mm:
3311 (-[WKContentView setMinimumSize:]): Deleted.
3313 2014-07-14 Benjamin Poulain <bpoulain@apple.com>
3315 [iOS][WK2] Fix withinEpsilon()
3316 https://bugs.webkit.org/show_bug.cgi?id=134798
3318 Reviewed by Darin Adler.
3320 Move the function back to WKWebView, it is no longer needed in WKContentView.
3322 Use the real types as input to properly verify that the two inputs are within
3323 a small value of the 32bit floating point.
3325 The epsilon we use is always on 32 bits float because we want to avoid doing work for changes
3326 that would not make any difference on float.
3328 The source of those small changes comes from the fact UIProcess does a lot of processing
3329 on CGFloat, which are double on 64bits architecture, while the WebProcess use 32bits floating point
3330 for scale. When we are getting updates from the WebProcess, we should ignore any small differences
3331 caused by the computations done with less precision.
3333 * UIProcess/API/Cocoa/WKWebView.mm:
3335 * UIProcess/ios/WKContentViewInteraction.h:
3336 (withinEpsilon): Deleted.
3338 2014-07-14 Bear Travis <betravis@adobe.com>
3340 [Feature Queries] Enable Feature Queries on Mac
3341 https://bugs.webkit.org/show_bug.cgi?id=134404
3343 Reviewed by Antti Koivisto.
3345 Enable Feature Queries on Mac and resume running the
3348 * Configurations/FeatureDefines.xcconfig: Turn on
3349 ENABLE_CSS3_CONDITIONAL_RULES.
3351 2014-07-14 Anders Carlsson <andersca@apple.com>
3353 Make shouldKeepCurrentBackForwardListItemInList part of WKPageLoaderClientV5 to avoid breaking ABI
3354 https://bugs.webkit.org/show_bug.cgi?id=134889
3356 Reviewed by Beth Dakin.
3358 * UIProcess/API/C/WKPage.cpp:
3359 * UIProcess/API/C/WKPageLoaderClient.h:
3361 2014-07-14 Dan Bernstein <mitz@apple.com>
3363 REGRESSION (r171045): Reproducible crash on navigation in PageClientImpl::willRecordNavigationSnapshot
3364 https://bugs.webkit.org/show_bug.cgi?id=134887
3366 Reviewed by Tim Horton.
3368 * UIProcess/mac/PageClientImpl.mm:
3369 (WebKit::PageClientImpl::navigationGestureDidBegin): nil-check m_webView. It can be nil when
3370 the client is using WKView directly.
3371 (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
3372 (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
3373 (WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.
3375 2014-07-14 Eric Carlson <eric.carlson@apple.com>
3377 [Mac] don't enable low power audio mode on external output devices
3378 https://bugs.webkit.org/show_bug.cgi?id=134877
3380 Reviewed by Sam Weinig.
3382 * PluginProcess/PluginProcess.h: Add an empty implementation of
3383 AudioHardwareListener::audioOutputDeviceChanged.
3385 2014-07-14 Tim Horton <timothy_horton@apple.com>
3387 [iOS] Throttle painting using a UI-process-side CADisplayLink
3388 https://bugs.webkit.org/show_bug.cgi?id=134879
3389 <rdar://problem/17641699>
3391 Reviewed by Simon Fraser.
3393 Just waiting for CA to commit is insufficient to actually throttle to 60fps,
3394 because nothing will block the main runloop from spinning.
3396 Instead, listen to a CADisplayLink, and send didUpdate to the WebProcess
3397 the first time it fires after we commit. This is not a guarantee that
3398 our content is on the screen, but we don't have any way to make that guarantee yet.
3400 This will throttle painting, rAF, etc. to the display refresh rate.
3402 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3403 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3404 (-[OneShotDisplayLinkHandler initWithDrawingAreaProxy:]):
3405 (-[OneShotDisplayLinkHandler dealloc]):
3406 (-[OneShotDisplayLinkHandler displayLinkFired:]):
3407 (-[OneShotDisplayLinkHandler invalidate]):
3408 (-[OneShotDisplayLinkHandler schedule]):
3409 (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
3410 (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
3411 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
3412 (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
3413 (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers): Deleted.
3415 2014-07-14 Dan Bernstein <mitz@apple.com>
3417 <rdar://problem/17657391> [iOS] Networking process writes persistent credentials to the keychain
3418 https://bugs.webkit.org/show_bug.cgi?id=134878
3420 Reviewed by Sam Weinig.
3422 Route CFNetwork’s calls to Security API through to the UI process.
3424 * NetworkProcess/ios/NetworkProcessIOS.mm:
3425 (WebKit::NetworkProcess::platformInitializeNetworkProcess): Initialize SecItemShim.
3427 * Shared/mac/SecItemShim.cpp:
3428 (WebKit::SecItemShim::initialize): On iOS, rather than using a shim library, supply
3429 CFNetwork with alternate functions to call.
3431 * Shared/mac/SecItemShim.messages.in: Removed #if !PLATFORM(IOS).
3432 * UIProcess/mac/SecItemShimProxy.messages.in: Ditto.
3434 * config.h: Define ENABLE_SEC_ITEM_SHIM to 1 on iOS as well.
3436 2014-07-14 Dan Bernstein <mitz@apple.com>
3438 <rdar://problem/17398060> NetworkProcess sometimes hangs under copyDefaultCredentialForProtectionSpace
3439 https://bugs.webkit.org/show_bug.cgi?id=134666
3441 Reviewed by Tim Horton.
3443 A SecItem may have an attribute whose value is a SecAccessControlRef, which is not supported