1 2014-08-08 Tim Horton <timothy_horton@apple.com>
3 [mac] Dynamically update serviceability when the set of services changes
4 https://bugs.webkit.org/show_bug.cgi?id=135738
5 <rdar://problem/17533459>
7 Reviewed by Brady Eidson.
9 * UIProcess/WebContext.cpp:
10 (WebKit::WebContext::createNewWebProcess):
11 Adopt the new universal refreshExistingServices.
13 (WebKit::WebContext::refreshExistingServices): Deleted.
14 * UIProcess/WebContext.h:
15 Remove WebContext::refreshExistingServices; there's no need for it.
17 * UIProcess/mac/ServicesController.h:
18 * UIProcess/mac/ServicesController.mm:
19 Fix the build with only public headers by including NSSharingService.h itself.
20 Place the NSSharingServicePicker (Details) category outside the #ifdef.
21 Forward-declare and possibly import NSExtension SPI.
23 (WebKit::ServicesController::ServicesController):
24 Register a callback to be notified whenever the set of services changes.
25 When this occurs, call refreshExistingServices. We let refreshExistingServices
26 coalesce updates because these notifications can come in small batches.
28 (WebKit::ServicesController::refreshExistingServices):
29 Dispatch changes in service availability to all processes in all contexts.
31 * UIProcess/mac/WebContextMenuProxyMac.mm:
32 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
33 Adjust the referenced rdar:// and call ServicesController::refreshExistingServices
34 instead of the now-removed WebContext:: variant. We can't remove this
35 yet because our services state can still be stale because NSServiceSharingPicker
36 can still sometimes lie about the current service state immediately after a change occurs;
37 once that is fixed, we should get rid of this as well as the refresh in Web Process creation.
39 2014-08-08 Timothy Horton <timothy_horton@apple.com>
41 Clients that request the selection services menu after WebKit2 will get one with different metrics than otherwise
42 https://bugs.webkit.org/show_bug.cgi?id=135765
43 <rdar://problem/17962180>
45 Reviewed by Brady Eidson.
47 * UIProcess/mac/WebContextMenuProxyMac.mm:
48 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
49 The menu is cached between clients, but we make adjustments to it.
50 We should copy it before adjusting.
52 2014-08-08 Timothy Horton <timothy_horton@apple.com>
54 Services overlay dropdown is often in the wrong place with zoomed pages or horizontal scrolling
55 https://bugs.webkit.org/show_bug.cgi?id=135755
56 <rdar://problem/17907752>
58 Reviewed by Brady Eidson.
60 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
61 (WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
62 (WebKit::ServicesOverlayController::maybeCreateSelectionHighlight):
63 DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection adjusts the
64 location of the button based on the visible rect, trying to keep the button visible.
66 We're handing it the wrong visible rect, though, not taking scrolling into account.
68 This leads to pages that scroll horizontally showing the button on the left
69 even if there's space for it on the right, or sometimes not showing it at all.
71 Instead, provide the actual main FrameView visible rect; the same coordinate
72 space that the highlight rects are provided in.
74 2014-08-08 Timothy Horton <timothy_horton@apple.com>
76 Additional items added to selection services menus are misaligned
77 https://bugs.webkit.org/show_bug.cgi?id=135747
78 <rdar://problem/17933167>
80 Reviewed by Brady Eidson.
82 * UIProcess/mac/WebContextMenuProxyMac.mm:
83 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
84 Use NSSharingServicePickerStyleRollover for the rollover image services menu;
85 use NSSharingServicePickerStyleTextSelection for the selection services menu.
87 Set NSMenu's showsStateColumn to YES for selection services menus, so that
88 other items added to the menu line up correctly.
90 Remove an unncessary .get()
92 2014-08-08 Grzegorz Czajkowski <g.czajkowski@samsung.com>
94 [EFL] Remove unnecessary ewk_private.h includes
95 https://bugs.webkit.org/show_bug.cgi?id=135753
97 Reviewed by Gyuyoung Kim.
99 Neither the below file uses the functionality from ewk_private.h.
101 * UIProcess/API/efl/ewk_context.cpp:
102 * UIProcess/API/efl/ewk_context_menu_item.cpp:
103 * UIProcess/API/efl/ewk_cookie_manager.cpp:
104 * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
105 * UIProcess/API/efl/ewk_popup_menu_item.cpp:
106 * UIProcess/API/efl/ewk_view.cpp:
108 2014-08-08 Carlos Garcia Campos <cgarcia@igalia.com>
110 [GTK] Do not use GtkWindow:resize-grip-visible with recent GTK+ versions
111 https://bugs.webkit.org/show_bug.cgi?id=135699
113 Reviewed by Philippe Normand.
115 Resize grips support have been removed from GTK+ since 3.13.4, the
116 API has been deprecated and does nothing.
118 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
119 (webkitWebViewBaseSetToplevelOnScreenWindow):
120 (resizeWebKitWebViewBaseFromAllocation):
122 2014-08-07 Tim Horton <timothy_horton@apple.com>
124 [Services with UI] Action menu does not appear if selection includes both text and an image
125 https://bugs.webkit.org/show_bug.cgi?id=135731
126 <rdar://problem/17837491>
128 Reviewed by Dean Jackson.
130 * UIProcess/WebContext.cpp:
131 (WebKit::WebContext::createNewWebProcess):
132 Initialize hasRichContentServices with the cached value.
134 2014-08-07 Benjamin Poulain <bpoulain@apple.com>
136 Get rid of SCRIPTED_SPEECH
137 https://bugs.webkit.org/show_bug.cgi?id=135729
139 Reviewed by Brent Fulgham.
141 * Configurations/FeatureDefines.xcconfig:
143 2014-08-07 Timothy Horton <timothy_horton@apple.com>
145 setCustomSwipeViews inside didChangeBackForwardList client callback is ignored
146 https://bugs.webkit.org/show_bug.cgi?id=135633
147 <rdar://problem/17926507>
149 Reviewed by Sam Weinig.
151 * UIProcess/PageClient.h:
152 * UIProcess/WebPageProxy.cpp:
153 (WebKit::WebPageProxy::didChangeBackForwardList):
154 * UIProcess/ios/PageClientImplIOS.h:
155 * UIProcess/ios/PageClientImplIOS.mm:
156 (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted.
157 * UIProcess/mac/PageClientImpl.h:
158 * UIProcess/mac/PageClientImpl.mm:
159 (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted.
160 WebKit clears the set of custom swipe views at the end of WebPageProxy::didChangeBackForwardList,
161 *after* calling into the client. This means that if the client wants to setCustomSwipeViews in
162 didChangeBackForwardList, it won't be respected.
164 Since there's only one client of this SPI, let's just stop clearing the list of custom swipe
165 views in WebKit and leave that totally up to the client.
167 2014-08-07 Enrica Casucci <enrica@apple.com>
169 [Services with UI] Action menu does not appear if selection includes both text and an image.
170 https://bugs.webkit.org/show_bug.cgi?id=135731
171 <rdar://problem/17837491>
173 Reviewed by Brady Eidson.
175 Adding a new setting to ServicesController to communicate to the WebProcess if
176 there are services installed that can handle a combination of text and images.
177 This way ServicesOverlayController can decide if it appropriate to show the hightlight
178 based on the type of selection (text only or non text only). This information is retrieved
179 when the selection rects are collected by SelectionGatherer and used by
180 SelectionGatherer::Notifier to communicate the selection change.
182 * Shared/WebProcessCreationParameters.cpp:
183 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
184 * Shared/WebProcessCreationParameters.h:
185 * UIProcess/mac/ServicesController.h:
186 (WebKit::ServicesController::hasRichContentServices):
187 * UIProcess/mac/ServicesController.mm:
188 (WebKit::ServicesController::ServicesController):
189 (WebKit::ServicesController::refreshExistingServices):
190 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
191 (WebKit::WebEditorClient::selectionRectsDidChange):
192 * WebProcess/WebCoreSupport/WebEditorClient.h:
193 * WebProcess/WebPage/ServicesOverlayController.h:
194 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
195 (WebKit::ServicesOverlayController::ServicesOverlayController):
196 (WebKit::ServicesOverlayController::selectionRectsDidChange):
197 (WebKit::ServicesOverlayController::drawSelectionHighlight):
198 * WebProcess/WebProcess.cpp:
199 (WebKit::WebProcess::WebProcess):
200 (WebKit::WebProcess::initializeWebProcess):
201 (WebKit::WebProcess::setEnabledServices):
202 * WebProcess/WebProcess.h:
203 (WebKit::WebProcess::hasRichContentServices):
204 * WebProcess/WebProcess.messages.in:
206 2014-08-07 Ryuan Choi <ryuan.choi@samsung.com>
208 [EFL] Fix several warnings of doxygen
209 https://bugs.webkit.org/show_bug.cgi?id=135643
211 Reviewed by Gyuyoung Kim.
213 * UIProcess/API/efl/ewk_context_menu_item.h: Removed /info which is not doxygen keyword and unnecessary to the user.
214 * UIProcess/API/efl/ewk_cookie_manager.h: Fixed parameter name.
215 * UIProcess/API/efl/ewk_form_submission_request.h: Removed # from Eina_List because doxygen may not know the EFL structures.
216 * UIProcess/API/efl/ewk_page_group.h: Fixed to match with parameter name.
217 * UIProcess/API/efl/ewk_settings.h: Fixed wrong keyword and parameter name.
218 * UIProcess/API/efl/ewk_text_checker.h: Ditto.
219 * UIProcess/API/efl/ewk_view.h:
220 - Used escape string for the tag.
221 - Used @code, @endcode for media query example.
223 2014-08-07 Benjamin Poulain <bpoulain@apple.com>
225 Get rid of INPUT_SPEECH
226 https://bugs.webkit.org/show_bug.cgi?id=135672
228 Reviewed by Andreas Kling.
230 * Configurations/FeatureDefines.xcconfig:
233 2014-08-07 Timothy Hatcher <timothy@apple.com>
235 Web Inspector: Update glyphs to be more like Xcode 6
236 https://bugs.webkit.org/show_bug.cgi?id=135705
238 Reviewed by Joseph Pecoraro.
240 * Resources/DockBottom.pdf: Added.
241 * Resources/DockBottomLegacy.pdf: Copied from Source/WebKit/mac/Resources/Dock.pdf.
242 * Resources/DockRight.pdf: Added.
243 * Resources/DockRightLegacy.pdf: Copied from Source/WebKit2/Resources/DockRight.pdf.
244 * UIProcess/mac/WebInspectorProxyMac.mm:
245 (WebKit::WebInspectorProxy::createInspectorWindow): Use new images.
246 * WebKit2.xcodeproj/project.pbxproj: Added new images.
248 2014-08-07 Oliver Hunt <oliver@apple.com>
250 WebContent needs access to HSTS database due to some networking still being performed in process
251 https://bugs.webkit.org/show_bug.cgi?id=135711
254 Reviewed by Alexey Proskuryakov.
256 Simple patch in the same theme as the equivalent network process
257 extension. Provide an extension that covers the WebContent specific
258 HSTS file and consume it on launch.
260 * Shared/WebProcessCreationParameters.cpp:
261 (WebKit::WebProcessCreationParameters::encode):
262 (WebKit::WebProcessCreationParameters::decode):
263 * Shared/WebProcessCreationParameters.h:
264 * UIProcess/WebContext.cpp:
265 (WebKit::WebContext::createNewWebProcess):
266 * UIProcess/WebContext.h:
267 * UIProcess/mac/WebContextMac.mm:
268 (WebKit::WebContext::webContentHSTSDatabasePath):
269 * WebProcess/cocoa/WebProcessCocoa.mm:
270 (WebKit::WebProcess::platformInitializeWebProcess):
272 2014-08-07 Gordon Sheridan <gordon_sheridan@apple.com>
274 Clear the m_previousItem member of HistoryControllers when it matches the HistoryItem being removed.
275 https://bugs.webkit.org/show_bug.cgi?id=135634
276 <rdar://problem/17388461>
278 Reviewed by Brady Eidson.
280 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
281 (WebKit::WebBackForwardListProxy::removeItem):
282 Call WebCore::Page::clearPreviousItemFromAllPages() for each item removed from
283 the back/forward list to ensure the page URL is released from IconDatabase.
285 2014-08-07 Carlos Garcia Campos <cgarcia@igalia.com>
287 [GTK] Use WebKitNavigationAction also for WebKitNavigationPolicyDecision
288 https://bugs.webkit.org/show_bug.cgi?id=135695
290 Reviewed by Gustavo Noronha Silva.
292 WebKitNavigationAction was introduced to extend WebKitWebView::create signal
293 and its API is mostly duplicated in WebKitNavigationPolicyDecision.
294 Use WebKitNavigationAction insternally in WebKitNavigationPolicyDecision and
295 deprecated all the duplicated API in favor of a single property navigation-action.
297 * UIProcess/API/gtk/WebKitDefines.h: Remove unused macro
298 WEBKIT_OBSOLETE and add WEBKIT_DEPRECATED and WEBKIT_DEPRECATED_FOR.
299 * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
300 (_WebKitNavigationPolicyDecisionPrivate::~_WebKitNavigationPolicyDecisionPrivate):
301 Free the WebKitNavigationAction.
302 (webkitNavigationPolicyDecisionGetProperty): Add getter for
303 navigation-action and use WebKitNavigationAction in all other getters.
304 (webkit_navigation_policy_decision_class_init): Add navigation-action
305 property and deprecated all others except frame-name.
306 (webkit_navigation_policy_decision_get_navigation_action): Return the WebKitNavigationAction.
307 (webkit_navigation_policy_decision_get_navigation_type): Use WebKitNavigationAction.
308 (webkit_navigation_policy_decision_get_mouse_button): Ditto.
309 (webkit_navigation_policy_decision_get_modifiers): Ditto.
310 (webkit_navigation_policy_decision_get_request): Ditto.
311 (webkitNavigationPolicyDecisionCreate):
312 (webkitNewWindowPolicyDecisionCreate):
313 * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
314 * UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h:
315 * UIProcess/API/gtk/WebKitPolicyClient.cpp: Use a custom
316 PolicyClient class so that we receive a NavigationActionData in
318 (attachPolicyClientToView):
319 (toWebKitNavigationType): Deleted.
320 (decidePolicyForNavigationAction): Deleted.
321 (decidePolicyForNewWindowAction): Deleted.
322 (decidePolicyForResponse): Deleted.
323 * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
324 (webkitResponsePolicyDecisionCreate):
325 * UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h:
326 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
328 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
330 2014-08-06 Antti Koivisto <antti@apple.com>
332 Move Soup specific code out of WebCoreArgumentCoders.cpp
333 https://bugs.webkit.org/show_bug.cgi?id=135665
335 Reviewed by Anders Carlsson.
337 * Shared/WebCoreArgumentCoders.cpp:
338 (IPC::ArgumentCoder<ResourceRequest>::encode):
339 (IPC::ArgumentCoder<ResourceRequest>::decode):
340 (IPC::ArgumentCoder<ResourceError>::encode):
341 (IPC::ArgumentCoder<ResourceError>::decode):
342 * Shared/WebCoreArgumentCoders.h:
344 Soup is the only client for this code. Move it to *Soup.cpp
346 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
347 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
348 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
349 (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
350 (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
352 2014-08-06 Tim Horton <timothy_horton@apple.com>
354 Services overlay flashes a lot; should have some hysteresis before showing overlay
355 https://bugs.webkit.org/show_bug.cgi?id=135683
356 <rdar://problem/16878039>
358 Reviewed by Simon Fraser.
360 Don't show the highlight until it's been 200ms since the last change
361 in selection or change in which highlight is hovered, whichever was more recent.
363 * WebProcess/WebPage/ServicesOverlayController.h:
364 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
365 (WebKit::ServicesOverlayController::ServicesOverlayController):
366 (WebKit::ServicesOverlayController::selectionRectsDidChange):
367 Keep track of when the selection last changed.
369 (WebKit::ServicesOverlayController::drawTelephoneNumberHighlightIfVisible):
370 Make establishHoveredTelephoneHighlight take a bool instead of Boolean.
372 (WebKit::ServicesOverlayController::mouseIsOverHighlight):
373 Factor mouseIsOverHighlight out of establishHoveredTelephoneHighlight and drawHighlight.
375 (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
376 Return the amount of time until the highlight should be shown; this is
377 the maximum of (the difference between the last selection change and the timeout)
378 and (the difference between the last change in which highlight is hovered and the timeout).
380 Telephone number highlights are shown immediately, because they are already stable
381 by virtue of being expanded to include the entire telephone number.
383 (WebKit::ServicesOverlayController::repaintHighlightTimerFired):
384 (WebKit::ServicesOverlayController::drawHighlight):
385 If the highlight shouldn't be shown yet (because we haven't hit the two timeouts),
386 schedule a timer to repaint us around when we will hit the timeouts.
388 (WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
389 (WebKit::ServicesOverlayController::mouseEvent):
390 Don't allow mouseUp to trigger the menu if we shouldn't be showing the overlay yet.
392 2014-08-06 Simon Fraser <simon.fraser@apple.com>
394 [iOS WK2] www.france24.com doesn't always load the page, sections stay white
395 https://bugs.webkit.org/show_bug.cgi?id=135684
396 <rdar://problem/17931712>
398 Reviewed by Tim Horton.
400 It's possible for a UIScrollView for overflow to move between one scrolling tree node
401 and another. When this happens, we need to avoid unconditionally clearing the delegate
402 on the node that's being destroyed, because the new node will already have set the
403 UIScrollView delegate to its own delegate.
405 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
406 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::~ScrollingTreeOverflowScrollingNodeIOS):
408 2014-08-06 Dean Jackson <dino@apple.com>
410 ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED is not used anywhere. Remove it.
411 https://bugs.webkit.org/show_bug.cgi?id=135675
413 Reviewed by Sam Weinig.
415 * Configurations/FeatureDefines.xcconfig:
417 2014-08-06 Brady Eidson and Jeffrey Pfau <beidson@apple.com>
419 IDB transactions never reset if the Web Process ends before cleaning up
420 https://bugs.webkit.org/show_bug.cgi?id=135218
422 Reviewed by Darin Adler and David Kilzer.
424 * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
425 (WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
426 (WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage): Added.
427 (WebKit::DatabaseToWebProcessConnection::didClose):
428 * DatabaseProcess/DatabaseToWebProcessConnection.h:
430 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
431 (WebKit::DatabaseProcessIDBConnection::resetTransactionSync): Added
432 Wait until the reset is complete before sending the sync reply.
433 (WebKit::DatabaseProcessIDBConnection::rollbackTransactionSync): Added.
435 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
436 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
438 Keep track of all in progress transactions and make sure they’re cleaned up
439 whenever a connection to a WebProcess is broken:
440 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
441 (WebKit::UniqueIDBDatabase::unregisterConnection):
442 (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
443 (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
444 (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
445 (WebKit::UniqueIDBDatabase::didEstablishTransaction):
446 (WebKit::UniqueIDBDatabase::didResetTransaction):
447 (WebKit::UniqueIDBDatabase::resetAllTransactions):
448 (WebKit::UniqueIDBDatabase::finalizeRollback):
449 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
451 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
452 (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
454 Add sync versions of reset/rollback:
455 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
456 (WebKit::WebIDBServerConnection::resetTransactionSync):
457 (WebKit::WebIDBServerConnection::rollbackTransactionSync):
458 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
460 2014-08-06 Wenson Hsieh <wenson_hsieh@apple.com>
462 Implement parsing for CSS scroll snap points
463 https://bugs.webkit.org/show_bug.cgi?id=134301
465 Reviewed by Dean Jackson.
467 * Configurations/FeatureDefines.xcconfig: Added ENABLE_CSS_SCROLL_SNAP
469 2014-08-06 Andy Estes <aestes@apple.com>
471 [iOS] Subresources referenced in converted QuickLook documents sometimes fail to load
472 https://bugs.webkit.org/show_bug.cgi?id=135676
474 Reviewed by David Kilzer.
476 QuickLookHandle needs to stay alive in order for its NSURLProtocol to service subresource loads originating
477 from the converted HTML document. Some of these loads happen dynamically after the main resource finishes
478 loading, so we cannot tie the lifetime of the QuickLookHandle to that of the main resource's ResourceLoader.
479 Instead, give ownership of the QuickLookHandle to DocumentLoader.
481 * WebProcess/Network/WebResourceLoader.cpp:
482 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Stored the created QuickLookHandle in DocumentLoader.
483 (WebKit::WebResourceLoader::didReceiveData): Accessed DocumentLoader's QuickLookHandle.
484 (WebKit::WebResourceLoader::didFinishResourceLoad): Ditto.
485 (WebKit::WebResourceLoader::didFailResourceLoad): Ditto.
486 (WebKit::WebResourceLoader::didReceiveResource): Ditto.
487 * WebProcess/Network/WebResourceLoader.h: Removed m_quickLookHandle.
489 2014-08-06 Filip Pizlo <fpizlo@apple.com>
491 Merge r171389, r171495, r171508, r171510, r171605, r171606, r171611, r171614, r171763 from ftlopt.
493 2014-08-06 Mark Hahnenberg <mhahnenberg@apple.com>
495 Refactor our current implementation of for-in
496 https://bugs.webkit.org/show_bug.cgi?id=134142
498 Reviewed by Filip Pizlo.
500 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
501 (WebKit::JSNPObject::invalidate): Fixed an invalid ASSERT that was crashing in debug builds.
503 2014-08-06 Alexey Proskuryakov <ap@apple.com>
505 REGRESSION (WebKit2): iOS Safari default encoding doesn't follow system language
506 https://bugs.webkit.org/show_bug.cgi?id=135667
507 <rdar://problem/17862892>
509 Reviewed by Anders Carlsson.
511 * Shared/WebPreferencesDefinitions.h: Compute the actual proper default, don't
512 hardcode it to ISO-8859-1 hoping that someone else will correct it later.
514 * Shared/WebPreferencesStore.cpp: Added an include for WebPreferencesDefinitions.h
515 macro expansion to compile.
517 * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults):
520 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
521 We now use WKGetWebDefaultCFStringEncoding in WebCore, so it needs to be initialized.
523 2014-08-06 Adrian Perez de Castro <aperez@igalia.com>
525 [GTK] Add support for user scripts to WebKitUserContentManager
526 https://bugs.webkit.org/show_bug.cgi?id=134738
528 Reviewed by Carlos Garcia Campos.
530 Add support for user scripts, to complement the user style sheet
531 support already present in WebKitUserContentManager. Most of the
532 moving parts are already present, so this just adds a boxed type
533 for user scripts (WebKitUserScript) and the corresponding methods
534 to add and remove scripts from the WebKitUserContentManager.
536 * UIProcess/API/gtk/WebKitUserContent.cpp: Add a WebKitUserScript
537 boxed type and its corresponding methods and enums.
538 (toUserScriptInjectionTime): Needed to convert
539 WebKitUserScriptInjectionTime values into its WebCore counterparts.
540 (_WebKitUserScript::_WebKitUserScript): Added.
541 (_WebKitUserScript::referenceCount): Ditto.
542 (webkit_user_script_ref):
543 (webkit_user_script_unref):
544 (webkit_user_script_new):
545 (webkitUserScriptGetUserScript): Internal method to obtain the
546 boxed WebCore::UserScript value.
547 * UIProcess/API/gtk/WebKitUserContent.h: Add the new public API
549 * UIProcess/API/gtk/WebKitUserContentManager.cpp: Implement the
550 methods for adding and removing user scripts.
551 (webkit_user_content_manager_add_script):
552 (webkit_user_content_manager_remove_all_scripts):
553 * UIProcess/API/gtk/WebKitUserContentManager.h: Add the new public
555 * UIProcess/API/gtk/WebKitUserContentPrivate.h: Add the definition
556 for the new private function.
557 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the
558 new public methods in the API documentation.
560 2014-08-06 Carlos Garcia Campos <cgarcia@igalia.com>
562 [GTK] Be able to disable gtk2 dependency
563 https://bugs.webkit.org/show_bug.cgi?id=135505
565 Reviewed by Gustavo Noronha Silva.
567 * PlatformGTK.cmake: Only build WebKitPluginProcess2 when
568 ENABLE_PLUGIN_PROCESS_GTK2 is ON.
569 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
570 (WebKit::ProcessLauncher::launchProcess): Do not try to launch
571 WebKitPluginProcess2 executable when ENABLE_PLUGIN_PROCESS_GTK2 is OFF.
573 2014-08-05 Tim Horton <timothy_horton@apple.com>
575 REGRESSION (r164337): Pages are sometimes cut off/oriented incorrectly after using WKThumbnailView
576 https://bugs.webkit.org/show_bug.cgi?id=135622
577 <rdar://problem/17202556>
579 Reviewed by Dan Bernstein.
581 In some cases (when the page changed scroll offset while thumbnailed),
582 when transitioning back to thumbnail scale = 1, we would get the math
583 wrong and end up with a non-identity sublayerTransform on the DrawingArea.
585 Luckily, none of this code is necessary anymore, as the only client
586 of WKThumbnailView only uses its snapshotting mode.
588 * Shared/ImageOptions.h:
589 Remove SnapshotOptionsRespectDrawingAreaTransform; DrawingArea no longer
590 has a rootLayerTransform().
592 * UIProcess/WebPageProxy.cpp:
593 (WebKit::WebPageProxy::setThumbnailScale): Deleted.
594 * UIProcess/WebPageProxy.h:
595 * WebProcess/WebPage/WebPage.cpp:
596 (WebKit::WebPage::WebPage):
597 (WebKit::WebPage::scaledSnapshotWithOptions):
598 (WebKit::WebPage::snapshotAtSize):
600 (WebKit::WebPage::setThumbnailScale): Deleted.
601 * WebProcess/WebPage/WebPage.h:
602 * WebProcess/WebPage/WebPage.messages.in:
603 Remove setThumbnailScale and SnapshotOptionsRespectDrawingAreaTransform.
605 * WebProcess/WebPage/WebPage.cpp:
606 (WebKit::WebPage::didCommitLoad):
607 Revert this to its state before r164337, as we no longer have "thumbnail scale".
609 * UIProcess/API/Cocoa/_WKThumbnailView.h:
610 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
611 (-[_WKThumbnailView initWithFrame:fromWKView:]):
612 (-[_WKThumbnailView _viewWasUnparented]):
613 (-[_WKThumbnailView _viewWasParented]):
614 (-[_WKThumbnailView _requestSnapshotIfNeeded]):
615 (-[_WKThumbnailView setScale:]):
616 Clean up code assuming _shouldApplyThumbnailScale = NO, _usesSnapshot = YES.
618 (-[_WKThumbnailView setUsesSnapshot:]):
619 (-[_WKThumbnailView usesSnapshot]):
620 Always return YES from usesSnapshot; we only support snapshotting WKThumbnailViews.
621 Ignore setUsesSnapshot.
623 * UIProcess/API/mac/WKView.mm:
624 (-[WKView _setThumbnailView:]):
625 (-[WKView _updateThumbnailViewLayer]):
626 Stop checking usesSnapshot; it's always true.
628 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
629 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
630 (WebKit::TiledCoreAnimationDrawingArea::setRootLayerTransform): Deleted.
631 * WebProcess/WebPage/DrawingArea.cpp:
632 (WebKit::DrawingArea::rootLayerTransform): Deleted.
633 * WebProcess/WebPage/DrawingArea.h:
634 (WebKit::DrawingArea::setRootLayerTransform): Deleted.
635 Remove rootLayerTransform() and setRootLayerTransform().
637 2014-08-05 Peyton Randolph <prandolph@apple.com>
639 Rename MAC_LONG_PRESS feature flag to LONG_MOUSE_PRESS.
640 https://bugs.webkit.org/show_bug.cgi?id=135276
642 Reviewed by Beth Dakin.
644 * Configurations/FeatureDefines.xcconfig:
646 2014-08-04 Andy Estes <aestes@apple.com>
648 [iOS] The raw bytes of an iWork document's PDF preview are displayed rather than the PDF itself
649 https://bugs.webkit.org/show_bug.cgi?id=135596
651 Reviewed by David Kilzer.
653 * WebProcess/Network/WebResourceLoader.cpp:
654 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): If the response will be handled by
655 QuickLook, do not call ResourceLoader::didReceiveResponse. It will be called later by
656 WebResourceLoaderQuickLookDelegate once converted data is received.
658 2014-08-05 Alexey Proskuryakov <ap@apple.com>
662 * UIProcess/WebContext.h:
664 2014-08-05 Oliver Hunt <oliver@apple.com>
666 SSO expects to be able to walk parent application's bundle
667 https://bugs.webkit.org/show_bug.cgi?id=135581
668 <rdar://problem/17864079>
670 Reviewed by Alexey Proskuryakov.
672 SSO expects to be able to walk the parent application's
673 bundle looking for Info plists. To allow this to actually
674 work we provide an extension from the ui process that
675 covers the bundle directory, and then in the profile
676 restrict access to the ability to read directories and
677 files named Info.plist.
679 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
680 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
681 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
682 * Shared/Network/NetworkProcessCreationParameters.cpp:
683 (WebKit::NetworkProcessCreationParameters::encode):
684 (WebKit::NetworkProcessCreationParameters::decode):
685 * Shared/Network/NetworkProcessCreationParameters.h:
686 * UIProcess/WebContext.cpp:
687 (WebKit::WebContext::ensureNetworkProcess):
688 (WebKit::WebContext::parentBundleDirectory):
689 * UIProcess/WebContext.h:
690 * UIProcess/mac/WebContextMac.mm:
691 (WebKit::WebContext::parentBundleDirectory):
693 2014-08-04 Benjamin Poulain <benjamin@webkit.org>
695 Add a flag for the CSS Selectors level 4 implementation
696 https://bugs.webkit.org/show_bug.cgi?id=135535
698 Reviewed by Andreas Kling.
700 * Configurations/FeatureDefines.xcconfig:
702 2014-08-04 Benjamin Poulain <bpoulain@apple.com>
704 Check for null frame when processing geolocation authorization request
705 https://bugs.webkit.org/show_bug.cgi?id=135577
706 <rdar://problem/17896295>
708 Reviewed by Geoffrey Garen.
710 I could have put the null check in GeolocationController instead of the WebKit layer,
711 but that would be a little weird as GeolocationController knows nothing about how
712 the WebKit layer decides what to do with requests.
714 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
715 (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
717 2014-08-02 Jeremy Jones <jeremyj@apple.com>
719 Support both window and view based video fullscreen.
720 https://bugs.webkit.org/show_bug.cgi?id=135525
722 Reviewed by Simon Fraser.
724 Parenting in the view instead of the window gives the fullscreen implementation more latitude
725 in how it implements the animation.
727 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
728 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Use view instead of window.
729 * WebProcess/ios/WebVideoFullscreenManager.mm:
730 (WebKit::clientRectForNode): Use client rect instead of screen rect.
731 (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): ditto
732 (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
733 (WebKit::screenRectForNode): Deleted.
735 2014-08-01 Dan Bernstein <mitz@apple.com>
737 <rdar://problem/17891752> [iOS] WebKit links against libraries it doesn’t use
738 https://bugs.webkit.org/show_bug.cgi?id=135536
740 Reviewed by Tim Horton.
742 * Configurations/WebKit.xcconfig: Removed -lassertion_extension and -framework MobileAsset
743 from FRAMEWORK_AND_LIBRARY_LDFLAGS_iphonesimulator.
745 2014-08-01 Joseph Pecoraro <pecoraro@apple.com>
747 [iOS WK2] Add extension read permission to network sandbox profile
748 <rdar://problem/17671574>
750 Reviewed by Alexey Proskuryakov and Oliver Hunt.
752 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
754 2014-08-01 Oliver Hunt <oliver@apple.com>
756 Various frameworks may want to use the container temp directory, so our current restrictions are too tight
757 https://bugs.webkit.org/show_bug.cgi?id=135518
760 Reviewed by Anders Carlsson.
762 We don't (and can't) have complete knowledge of what different frameworks
763 will want to use the container temporary directory for, and so our
764 current attempt to heavily restrict access is simply too tight.
766 This patch recognises this by simply giving read-write access to the
767 entire NSTemporary() directory (e.g. $container/tmp in the general case),
768 rather than the single sub directory we wishfully thought that we would
769 be able to get away with.
771 * Shared/WebProcessCreationParameters.cpp:
772 (WebKit::WebProcessCreationParameters::encode):
773 (WebKit::WebProcessCreationParameters::decode):
774 * Shared/WebProcessCreationParameters.h:
775 * UIProcess/WebContext.cpp:
776 (WebKit::WebContext::createNewWebProcess):
777 (WebKit::WebContext::mediaCacheDirectory): Deleted.
778 * UIProcess/WebContext.h:
779 * UIProcess/efl/WebContextEfl.cpp:
780 (WebKit::WebContext::containerTemporaryDirectory):
781 (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
782 * UIProcess/gtk/WebContextGtk.cpp:
783 (WebKit::WebContext::containerTemporaryDirectory):
784 (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
785 * UIProcess/mac/WebContextMac.mm:
786 (WebKit::WebContext::containerTemporaryDirectory):
787 (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
788 * WebProcess/cocoa/WebProcessCocoa.mm:
789 (WebKit::WebProcess::platformInitializeWebProcess):
791 2014-08-01 Dan Bernstein <mitz@apple.com>
793 <rdar://problem/17862013> REGRESSION (r169357): Disabling "allow plug-ins" doesn't stick on quit/relaunch
794 https://bugs.webkit.org/show_bug.cgi?id=135511
796 Reviewed by Alexey Proskuryakov.
798 Since the values map in the preferences store doesn’t include values that are equal to the
799 defaults, we need to update it when a new default is registered.
801 * UIProcess/WebPreferences.cpp:
802 (WebKit::WebPreferences::createWithLegacyDefaults): Changed to use new member functions
803 for registering defaults.
804 (WebKit::WebPreferences::registerDefaultBoolValueForKey): Added. Sets an override default
805 in the store, and sets the user default, if there is one, on top of it.
806 (WebKit::WebPreferences::registerDefaultUInt32ValueForKey): Ditto.
807 * UIProcess/WebPreferences.h: Declared new member functions for getting the user default
810 * UIProcess/efl/WebPreferencesEfl.cpp:
811 (WebKit::WebPreferences::platformGetStringUserValueForKey): Added an implementation that
812 returns false, because the EFL port doesn’t support persistent user defaults.
813 (WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
814 (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
815 (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.
817 * UIProcess/gtk/WebPreferencesGtk.cpp:
818 (WebKit::WebPreferences::platformGetStringUserValueForKey): Ditto for the GTK port.
819 (WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
820 (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
821 (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.
823 * UIProcess/mac/WebPreferencesMac.mm:
824 (WebKit::WebPreferences::platformGetStringUserValueForKey): Added. Replaces
825 setStringValueIfInUserDefaults, on which it is based.
826 (WebKit::WebPreferences::platformGetBoolUserValueForKey): Similarly for booleans.
827 (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Similarly for integers.
828 (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Similarly for doubles.
829 (WebKit::WebPreferences::platformInitializeStore): Changed to use the above functions.
831 2014-08-01 Brent Fulgham <bfulgham@apple.com>
833 [Mac] Fullscreen mode for some applications shows only a black screen.
834 https://bugs.webkit.org/show_bug.cgi?id=135493
835 <rdar://problem/17628212>
837 Reviewed by Jer Noble.
839 In some applications, the window hosting the WKView is an InProcess layer hosting mode.
840 The fullscreen window created by the WKFullScreenWindowController defaults to an
843 When this kind of mismatch is encountered, the WK2 layer in the UI process is supposed
844 to send a message back to the WebProcess indicating that the layer hosting mode of the
845 containing window is different, so that the WebProcess can adjust its logic accordingly.
846 Unfortunately, the notification that this had happened was not getting sent to the
847 WebProcess due to an optimization in window state change logic (see Bug 135509 for
850 The fix is to check layer hosting mode state when a WKView is added to a window, and
851 notify the WebProcess when it needs to change state to match.
854 * UIProcess/API/mac/WKView.mm:
855 (-[WKView viewDidMoveToWindow]): When moving to a new window, always call
856 'layerHostingModeDidChange' to pick up any changes in the layer hosting mode.
858 2014-08-01 Carlos Garcia Campos <cgarcia@igalia.com>
860 [CMake] GTK and EFL are using PROJECT_VERSION_PATCH to define the micro version
861 https://bugs.webkit.org/show_bug.cgi?id=135501
863 Reviewed by Gyuyoung Kim.
865 Use PROJECT_VERSION_MICRO instead.
867 * UIProcess/API/efl/EWebKit2.h.in:
868 * UIProcess/API/gtk/WebKitVersion.h.in:
870 2014-08-01 Carlos Garcia Campos <cgarcia@igalia.com>
872 Unreviewed. Add missing sections to documentation.
874 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
875 WebKitUserContent and WebKitUserContentManager sections to the
878 2014-08-01 Ryuan Choi <ryuan.choi@samsung.com>
880 [EFL] Unable to do make install since r171901
881 https://bugs.webkit.org/show_bug.cgi?id=135497
883 Reviewed by Gyuyoung Kim.
885 * PlatformEfl.cmake: Removed ewk_defins.h from the installation list.
887 2014-07-31 Ryuan Choi <ryuan.choi@samsung.com>
889 [EFL][WK2] MiniBrower comes to crash when combo box is pressed
890 https://bugs.webkit.org/show_bug.cgi?id=135378
892 Reviewed by Gyuyoung Kim.
894 Added doxygen comment of popup_menu_show/popup_menu_hide not to confuse the usage.
896 * UIProcess/API/efl/ewk_view.h:
898 2014-07-31 Ryuan Choi <ryuan.choi@samsung.com>
900 [EFL] remove ewk_defines.h
901 https://bugs.webkit.org/show_bug.cgi?id=135456
903 Reviewed by Gyuyoung Kim.
905 * UIProcess/API/efl/ewk_context_menu.h:
906 * UIProcess/API/efl/ewk_context_menu_item.h: Moved the declaration from ewk_defines.h
907 * UIProcess/API/efl/ewk_defines.h: Removed.
909 2014-07-31 Brent Fulgham <bfulgham@apple.com>
911 Unreviewed typo correction.
912 https://bugs.webkit.org/show_bug.cgi?id=135482
914 Rename '_fullScreenIsEnabled' -> '_fullScreenEnabled'
916 * UIProcess/API/Cocoa/WKPreferences.mm:
917 (-[WKPreferences _fullScreenEnabled]): Added
918 (-[WKPreferences _fullScreenIsEnabled]): Deleted.
919 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
921 2014-07-31 Brent Fulgham <bfulgham@apple.com>
923 MiniBrowser Should Support Fullscreen Videos in WebKit2 Mode
924 https://bugs.webkit.org/show_bug.cgi?id=135482
926 Reviewed by Simon Fraser.
928 Add accessors for the missing Fullscreen API so that MiniBrowser
931 * UIProcess/API/Cocoa/WKPreferences.mm:
932 (-[WKPreferences _fullScreenIsEnabled]): Added.
933 (-[WKPreferences _setFullScreenEnabled:]): Added.
934 * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Add accessor for
937 2014-07-31 Beth Dakin <bdakin@apple.com>
939 Hit-testing broken in WebKit 1 views with AppKit's contentInsets
940 https://bugs.webkit.org/show_bug.cgi?id=135434
942 <rdar://problem/17850323>
944 Reviewed by Benjamin Poulain.
947 * WebProcess/Plugins/PDF/PDFPlugin.mm:
948 (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
949 (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
951 2014-07-31 Oliver Hunt <oliver@apple.com>
953 Various SSO services need the networking process to be able to spoof its bundle id
954 https://bugs.webkit.org/show_bug.cgi?id=135468
955 <rdar://problem/17864139>
957 Reviewed by Alexey Proskuryakov.
959 Just add the entitlement required to allow the sandbox to let this happen.
961 * Configurations/Network-iOS.entitlements:
963 2014-07-31 Przemyslaw Kuczynski <p.kuczynski@samsung.com>
965 Fix uninitialized scalar variable
966 https://bugs.webkit.org/show_bug.cgi?id=135461
968 Reviewed by Alexey Proskuryakov.
970 If fopen fails, returned ApplicationMemoryStats structure will be uninitialized
972 * Shared/linux/WebMemorySamplerLinux.cpp:
973 (WebKit::sampleMemoryAllocatedForApplication): Initialized applicationStats.
975 2014-07-31 Rohit Kumar <kumar.rohit@samsung.com>
977 Clean up the WebKit build from unused parameter warning in Webkit2/WebProcess module
978 https://bugs.webkit.org/show_bug.cgi?id=135413
980 Reviewed by Darin Adler.
982 * WebProcess/OriginData/WebOriginDataManager.cpp:
983 (WebKit::WebOriginDataManager::getOrigins):
984 (WebKit::WebOriginDataManager::deleteEntriesForOrigin):
985 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
986 (WebKit::WebOriginDataManager::deleteAllEntries):
988 2014-07-31 Chris Fleizach <cfleizach@apple.com>
990 AX: iOS: Crash accessing m_page in WKAccessibilityPageObject
991 https://bugs.webkit.org/show_bug.cgi?id=134617
993 Reviewed by Darin Adler.
995 Provide a way to detach a WK2 WebPage object so that it can uninitialize other pointers, like the accessibility object.
997 * WebProcess/WebPage/WebPage.cpp:
998 (WebKit::WebPage::~WebPage):
999 * WebProcess/WebPage/WebPage.h:
1000 * WebProcess/WebPage/efl/WebPageEfl.cpp:
1001 (WebKit::WebPage::platformDetach):
1002 * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1003 (WebKit::WebPage::platformDetach):
1004 * WebProcess/WebPage/ios/WebPageIOS.mm:
1005 (WebKit::WebPage::platformDetach):
1006 * WebProcess/WebPage/mac/WebPageMac.mm:
1007 (WebKit::WebPage::platformDetach):
1009 2014-07-31 Dan Bernstein <mitz@apple.com>
1011 WebKit part of: Server trust authentication challenges aren’t sent to the navigation delegate
1012 https://bugs.webkit.org/show_bug.cgi?id=135327
1014 Reviewed by Alexey Proskuryakov.
1016 * UIProcess/Cocoa/NavigationState.mm:
1017 (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
1018 Return true for server trust protection spaces if the delegate implements
1019 -webView:didReceiveAuthenticationChallenge:completionHandler:.
1020 (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Removed
1021 an assertion that is no longer true due to the above.
1023 2014-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
1025 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.1 release.
1027 * gtk/NEWS: Add release notes for 2.5.1.
1029 2014-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
1031 Unreviewed. Fix GTK+ make distcheck.
1033 * Shared/InteractionInformationAtPosition.h: Only include
1034 WebCore/SelectionRect.h for IOS.
1036 2014-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
1038 [GTK] Bump binary version for 2.6
1039 https://bugs.webkit.org/show_bug.cgi?id=133724
1041 Reviewed by Philippe Normand.
1043 * PlatformGTK.cmake: Fix JavaScriptCore dependency on
1044 instrospection commands and make them depend on GTK+-3.0.
1046 2014-07-30 Enrica Casucci <enrica@apple.com>
1048 REGRESSION (WK2 iOS): Inline editing for Chinese and Japanese keyboards does not work in Safari.
1049 https://bugs.webkit.org/show_bug.cgi?id=135449
1050 <rdar://problem/17824833>
1052 Reviewed by Benjamin Poulain.
1054 The WebProcess sends the notification that the gesture modified the phrase boundary,
1055 but the flag was not being converted properly, therefore we failed to notify
1056 the text input system that a change had occurred.
1058 * UIProcess/ios/WKContentViewInteraction.mm:
1059 (toUIWKSelectionFlags):
1061 2014-07-30 Andy Estes <aestes@apple.com>
1063 USE(CONTENT_FILTERING) should be ENABLE(CONTENT_FILTERING)
1064 https://bugs.webkit.org/show_bug.cgi?id=135439
1066 Reviewed by Tim Horton.
1068 We now support two different platform content filters, and will soon support a mock content filter (as part of
1069 webkit.org/b/128858). This makes content filtering a feature of WebKit, not just an adoption of a third-party
1070 library. ENABLE() is the correct macro to use for such a feature.
1072 * Configurations/FeatureDefines.xcconfig:
1073 * Shared/WebCoreArgumentCoders.h:
1074 * UIProcess/WebFrameProxy.cpp:
1075 (WebKit::WebFrameProxy::didStartProvisionalLoad):
1076 * UIProcess/WebFrameProxy.h:
1077 * UIProcess/WebPageProxy.cpp:
1078 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1079 * UIProcess/WebPageProxy.h:
1080 * UIProcess/WebPageProxy.messages.in:
1081 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1082 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1084 2014-07-30 Andreas Kling <akling@apple.com>
1086 Static hash tables no longer need to be coupled with a VM.
1087 <https://webkit.org/b/135421>
1089 Reviewed by Geoffrey Garen.
1091 * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1092 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1094 2014-07-30 Dan Bernstein <mitz@apple.com>
1096 Get rid of the WKNSURLProtectionSpace wrapper
1097 https://bugs.webkit.org/show_bug.cgi?id=135425
1099 Reviewed by Sam Weinig.
1101 * Shared/Cocoa/APIObject.mm:
1102 (API::Object::newObject): Don’t allocate WKNSURLProtectionSpace wrappers.
1104 * Shared/Cocoa/WKNSURLProtectionSpace.h: Removed.
1105 * Shared/Cocoa/WKNSURLProtectionSpace.mm: Removed.
1107 * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1108 (canAuthenticateAgainstProtectionSpaceInFrame): Get the NSURLProtectionSpace from the
1109 WebCore::ProtectionSpace in the WebProtectionSpace.
1111 * UIProcess/Cocoa/NavigationState.mm:
1112 (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): Ditto.
1114 * WebKit2.xcodeproj/project.pbxproj: Removed references to removed files.
1116 2014-07-30 Dan Bernstein <mitz@apple.com>
1118 Updated for changes to the WebCore::Credential API.
1119 Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
1121 Reviewed by Alexey Proskuryakov.
1123 * Shared/Downloads/mac/DownloadMac.mm:
1124 (WebKit::Download::receivedCredential):Use new Credential::nsCredential getter.
1126 * Shared/WebCoreArgumentCoders.cpp:
1127 (IPC::ArgumentCoder<Credential>::encode): If encoding the credential requires encoding the
1128 platform data, do that.
1129 (IPC::ArgumentCoder<Credential>::decode): If platform data was encoded, decode it.
1130 * Shared/WebCoreArgumentCoders.h:
1132 * Shared/mac/WebCoreArgumentCodersMac.mm:
1133 (IPC::ArgumentCoder<Credential>::encodePlatformData): Archive the NSURLCredential.
1134 (IPC::ArgumentCoder<Credential>::decodePlatformData): Unarchive it.
1136 * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
1137 (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]): Use
1138 Credential constructor that takes an NSURLCredential.
1140 * UIProcess/Cocoa/NavigationState.mm:
1141 (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Ditto.
1144 2014-07-30 Carlos Garcia Campos <cgarcia@igalia.com>
1146 [GTK] REGRESSION(r171742): Test /webkit2/WebKitWebView/disallow-modal-dialogs fails
1147 https://bugs.webkit.org/show_bug.cgi?id=135412
1149 Reviewed by Philippe Normand.
1151 The problem is that WebPageProxy::setUIClient() calls
1152 setCanRunModal() with the value of m_uiClient->canRunModal() which
1153 is always true for us. We override that manually by calling
1154 setCanRunModal() depending on the WebKitSettings. In r171742,
1155 webkitWebViewUpdateSettings(), the method that overrides
1156 setCanRunModal(), was moved before attachUIClientToView(), so the
1157 value set by WebPageProxy::setUIClient() is the last one and takes
1158 precedence. We need to make sure webkitWebViewUpdateSettings() is
1159 always called after attachUIClientToView().
1161 * UIProcess/API/gtk/WebKitWebView.cpp:
1162 (webkitWebViewConstructed): Move webkitWebViewUpdateSettings()
1163 call after attachUIClientToView() and add a comment to not forget
1166 2014-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
1168 [GTK] Remove WebKitCertificateInfo from WebKit2GTK+ API
1169 https://bugs.webkit.org/show_bug.cgi?id=134830
1171 Reviewed by Gustavo Noronha Silva.
1173 It was added to make the API more convenient but it has ended up
1174 making it more complicated. WebKitWebView::load-failed-with-tls-errors
1175 now receives a GTlsCertificate + GTlsCertificateFlags and
1176 webkit_web_context_allow_tls_certificate_for_host() receives a GTlsCertificate
1177 since the errors are not actually needed. This makes the API more
1178 consistent with the existing method webkit_web_view_get_tls_info().
1180 * PlatformGTK.cmake: Remove files from compilation.
1181 * UIProcess/API/gtk/WebKitCertificateInfo.cpp: Removed.
1182 * UIProcess/API/gtk/WebKitCertificateInfo.h: Removed.
1183 * UIProcess/API/gtk/WebKitCertificateInfoPrivate.h: Removed.
1184 * UIProcess/API/gtk/WebKitWebContext.cpp:
1185 (webkit_web_context_allow_tls_certificate_for_host):
1186 * UIProcess/API/gtk/WebKitWebContext.h:
1187 * UIProcess/API/gtk/WebKitWebView.cpp:
1188 (webkit_web_view_class_init):
1189 (webkitWebViewLoadFailedWithTLSErrors):
1190 * UIProcess/API/gtk/WebKitWebView.h:
1191 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
1192 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1193 * UIProcess/API/gtk/webkit2.h:
1195 2014-07-29 Jinwoo Song <jinwoo7.song@samsung.com>
1197 [EFL] Do not initialize g_type system explicitly in the ewk_init()
1198 https://bugs.webkit.org/show_bug.cgi?id=135407
1200 Reviewed by Gyuyoung Kim.
1202 EFL build requires glib version 2.38 but g_type_init() has been deprecated
1203 since version 2.36. As the type system is initialized automatically since
1204 version 2.36, we do not need to call g_type_init() in the ewk_init().
1206 https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#g-type-init
1208 * UIProcess/API/efl/ewk_main.cpp:
1211 2014-07-29 Enrica Casucci <enrica@apple.com>
1213 REGRESSION [WebKit2 iOS]: Cannot add shortcut to user dictionary from non editable content.
1214 https://bugs.webkit.org/show_bug.cgi?id=135392
1215 <rdar://problem/17760073>
1217 Reviewed by Benjamin Poulain.
1219 Adding a shortcut to the user dictionary needs to be available in non editable content too.
1221 * UIProcess/ios/WKContentViewInteraction.mm:
1222 (-[WKContentView _addShortcut:]):
1224 2014-07-29 Tim Horton <timothy_horton@apple.com>
1226 WKPDFView paints rotated pages squished
1227 https://bugs.webkit.org/show_bug.cgi?id=135401
1228 <rdar://problem/17173916>
1230 Reviewed by Simon Fraser.
1232 * UIProcess/ios/WKPDFView.mm:
1233 (-[WKPDFView _computePageAndDocumentFrames]):
1234 [page size] returns the crop box's size, ignoring rotation.
1235 [page cropBoxAccountForRotation] respects rotation, but otherwise returns the same size.
1236 UIPDFPageView will respect rotation when painting, so we
1237 should make sure that it is given an aspect ratio that also
1238 respects rotation, so that the page isn't squished.
1240 2014-07-29 Csaba Osztrogonác <ossy@webkit.org>
1242 URTBF for !ENABLE(DATABASE_PROCESS) platforms.
1244 * WebProcess/OriginData/WebOriginDataManager.cpp:
1245 (WebKit::WebOriginDataManager::getOrigins):
1246 (WebKit::WebOriginDataManager::deleteEntriesForOrigin):
1247 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
1248 (WebKit::WebOriginDataManager::deleteAllEntries):
1250 2014-07-29 Brady Eidson <beidson@apple.com>
1252 Make WKOriginDataManager actually operate on IndexedDatabases.
1253 https://bugs.webkit.org/show_bug.cgi?id=135346
1255 Reviewed by Sam Weinig (and David Kilzer and Alex Christensen)
1257 * DatabaseProcess/DatabaseProcess.cpp:
1258 (WebKit::DatabaseProcess::DatabaseProcess):
1259 (WebKit::DatabaseProcess::getIndexedDatabaseOrigins):
1260 (WebKit::DatabaseProcess::doGetIndexedDatabaseOrigins):
1261 (WebKit::removeAllDatabasesForOriginPath): Utility to delete all database files for the given origin path
1262 that have been modified between the given dates.
1263 (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
1264 (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesForOrigin):
1265 (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates):
1266 (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesModifiedBetweenDates):
1267 (WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries):
1268 (WebKit::DatabaseProcess::doDeleteAllIndexedDatabaseEntries):
1269 * DatabaseProcess/DatabaseProcess.h:
1271 * Shared/WebCrossThreadCopier.cpp:
1272 (WebCore::SecurityOriginData>::copy):
1273 * Shared/WebCrossThreadCopier.h:
1275 * UIProcess/WebOriginDataManagerProxy.cpp:
1276 (WebKit::WebOriginDataManagerProxy::getOrigins):
1277 (WebKit::WebOriginDataManagerProxy::didGetOrigins):
1278 (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
1279 (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates):
1280 (WebKit::WebOriginDataManagerProxy::deleteAllEntries):
1282 * WebProcess/OriginData/WebOriginDataManager.cpp:
1283 (WebKit::WebOriginDataManager::getOrigins): Pipe IDB requests through to the DatabaseProcess.
1284 (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Ditto.
1285 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Ditto.
1286 (WebKit::WebOriginDataManager::deleteAllEntries): Ditto.
1288 2014-07-29 Commit Queue <commit-queue@webkit.org>
1290 Unreviewed, rolling out r171704.
1291 https://bugs.webkit.org/show_bug.cgi?id=135389
1293 Broke two IndexedDB tests (Requested by ap on #webkit).
1297 "IDB transactions never reset if the Web Process ends before
1299 https://bugs.webkit.org/show_bug.cgi?id=135218
1300 http://trac.webkit.org/changeset/171704
1302 2014-07-29 Daniel Bates <dabates@apple.com>
1304 Use WTF::move() instead of std::move() to help ensure move semantics
1305 https://bugs.webkit.org/show_bug.cgi?id=135351
1307 Reviewed by Alexey Proskuryakov.
1309 * UIProcess/API/Cocoa/_WKSessionState.mm:
1310 (-[_WKSessionState _initWithSessionState:]):
1311 * UIProcess/API/gtk/WebKitUserContent.cpp:
1312 (toStringVector): Remove use of std::move(). It's unnecessary to call std::move() on an rvalue.
1313 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1314 (WebKit::ServicesOverlayController::mouseEvent):
1316 2014-07-28 Pratik Solanki <psolanki@apple.com>
1318 Get SharedBuffer.h out of ResourceBuffer.h (and a few other places)
1319 https://bugs.webkit.org/show_bug.cgi?id=131782
1321 Original patch by Tim Horton.
1322 Reviewed by Darin Adler.
1324 * NetworkProcess/NetworkResourceLoader.cpp:
1325 * WebProcess/Network/NetworkProcessConnection.cpp:
1326 Include SharedBuffer.h in implementation files.
1328 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
1329 Un-indent namespace and remove SharedBuffer forward-declaration.
1331 2014-07-29 Adrian Perez de Castro <aperez@igalia.com>
1333 [GTK] Remove WebKitWebViewGroup from WebKit2 GTK+ API
1334 https://bugs.webkit.org/show_bug.cgi?id=133729
1336 Reviewed by Carlos Garcia Campos.
1338 Removes WebKitWebViewGroup, effectively reverting the changes
1339 introduced by r149117. The motivation for WebKitWebViewGroup
1340 was using the user style sheet injection API, which has been
1341 moved into WebKitUserContentManager, rendering it unneeded.
1343 * PlatformGTK.cmake: Remove WebKitWebViewGroup source files
1345 * UIProcess/API/C/gtk/WKView.cpp:
1346 (WKViewCreate): Accomodate for changes in the signature of
1347 webkitWebViewBaseCreate().
1348 * UIProcess/API/gtk/WebKitSettings.cpp: Update API documentation.
1349 * UIProcess/API/gtk/WebKitWebContext.cpp: Remove the default web
1350 view group from WebKitWebContext.
1351 (webkitWebContextCreatePageForWebView): Allow passing a
1352 WebPreferences object at construction.
1353 (webkitWebContextGetDefaultWebViewGroup): Deleted.
1354 * UIProcess/API/gtk/WebKitWebContextPrivate.h: Ditto.
1355 * UIProcess/API/gtk/WebKitWebView.cpp:
1356 (webkitWebViewUpdateSettings): Use WebPageProxy::setPreferences()
1357 directly. Handle the case when webkit_web_view_set_settings()
1358 is called on construction by doing an early-return.
1359 (webkitWebViewConstructed): Call webkitWebViewUpdateSettings()
1360 after creating the internal WebPageProxy object.
1361 (webkitWebViewSetProperty): Removed "group" property, added
1362 "settings" property.
1363 (webkitWebViewGetProperty): Ditto.
1364 (webkitWebViewDispose): Do not disconnect signal handler for
1365 the (now unexistant) WebKitWebViewGroup.
1366 (webkit_web_view_class_init): Removed "group" property, added
1367 "settings" property.
1368 (webkitWebViewHandleAuthenticationChallenge): Access the
1369 WebKitWebSettings directly.
1370 (webkit_web_view_new_with_related_view): Make new views share
1371 settings with their related view.
1372 (webkit_web_view_new_with_settings): Added.
1373 (webkit_web_view_set_settings): Access the settings directly in
1375 (webkit_web_view_get_settings): Ditto.
1376 (webkit_web_view_set_zoom_level): Ditto.
1377 (webkit_web_view_get_zoom_level): Ditto.
1378 (webkitWebViewSettingsChanged): Deleted.
1379 (webkitWebViewDisconnectSettingsChangedSignalHandler): Deleted.
1380 (webkit_web_view_new_with_group): Deleted.
1381 (webkit_web_view_get_group): Deleted.
1382 * UIProcess/API/gtk/WebKitWebView.h: Removed API methods related
1383 to WebKitWebViewGroup.
1384 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1385 (webkitWebViewBaseCreate): Allow passing a WebPreferences object
1386 for constructing the WebPageProxy.
1387 (webkitWebViewBaseUpdatePreferences): Instead of going through
1388 the page group, use WebPageProxy::preferences() directly.
1389 (webkitWebViewBaseCreateWebPage): Allow passing a WebPreferences
1390 object for constructing the WebPageProxy.
1391 * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Update the
1392 prototypes of the internal functions.
1393 * UIProcess/API/gtk/WebKitWebViewGroup.cpp: Removed.
1394 * UIProcess/API/gtk/WebKitWebViewGroup.h: Removed.
1395 * UIProcess/API/gtk/WebKitWebViewGroupPrivate.h: Removed.
1396 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Change public API
1397 bits in the documentation.
1398 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
1399 * UIProcess/API/gtk/docs/webkit2gtk.types: Ditto.
1400 * UIProcess/API/gtk/webkit2.h: Removed WebKitWebViewGroup.h header.
1401 * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1402 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1403 Accomodate for changes in the signature of
1404 webkitWebViewBaseCreate().
1406 2014-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
1408 Implement webkit_web_view_load_string() in WebKit2
1409 https://bugs.webkit.org/show_bug.cgi?id=134735
1411 Reviewed by Sergio Villar Senin.
1413 Add webkit_web_view_load_bytes() that receives a GBytes to load
1414 random data in the web view using the given MIME-Type, encoding
1417 * UIProcess/API/gtk/WebKitWebView.cpp:
1419 (webkit_web_view_load_bytes):
1420 * UIProcess/API/gtk/WebKitWebView.h:
1421 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
1422 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1424 2014-07-29 Ryuan Choi <ryuan.choi@samsung.com>
1426 [EFL] Alpha value of ewk_view_bg_color_set is not working
1427 https://bugs.webkit.org/show_bug.cgi?id=135333
1429 Reviewed by Gyuyoung Kim.
1431 evas_object_image_alpha_set should be called for the transparent evas object.
1433 * UIProcess/API/efl/EwkView.cpp:
1434 (EwkView::handleEvasObjectColorSet):
1435 (EwkView::setBackgroundColor): Checked the alpha value of object and called evas_object_image_alpha_set.
1436 * UIProcess/API/efl/EwkView.h:
1437 * UIProcess/API/efl/ewk_view.cpp:
1438 (ewk_view_bg_color_set): Moved the logic to EwkView.
1440 2014-07-28 Mark Rowe <mrowe@apple.com>
1442 Web process crash causes UI process to die with an assertion failure in Connection::exceptionSourceEventHandler
1443 https://bugs.webkit.org/show_bug.cgi?id=135366
1445 Reviewed by Dan Bernstein.
1447 * Platform/IPC/mac/ConnectionMac.mm:
1448 (IPC::Connection::exceptionSourceEventHandler): Remove the assertion since it frequently fires during
1449 normal development with debug builds.
1451 2014-07-28 Benjamin Poulain <bpoulain@apple.com>
1453 [iOS WK2] WKWebView sometime tries to change the size of a null DrawingAreaProxy
1454 https://bugs.webkit.org/show_bug.cgi?id=135368
1455 <rdar://problem/16988887>
1457 Reviewed by Simon Fraser.
1459 We should never assume DrawingAreaProxy exists in the API invoked by the clients
1460 of WKWebView. There are at least two cases where the DrawingAreaProxy is null:
1461 -In some path on initialization.
1464 * UIProcess/API/Cocoa/WKWebView.mm:
1465 (-[WKWebView _frameOrBoundsChanged]):
1466 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1467 We can safely null check and skip setting the size. If the call was skipped,
1468 the size is set on DrawingAreaProxy initialization by querying the current
1469 size through the page client.
1471 2014-07-28 Roger Fong <roger_fong@apple.com>
1473 Disable tagged strings for the plugin process.
1474 https://bugs.webkit.org/show_bug.cgi?id=135354
1475 <rdar://problem/17295639>.
1477 Patch by Alexey Proskuryakov and Roger Fong.
1479 Reviewed by Anders Carlsson.
1481 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
1482 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1483 (WebKit::connectToReExecService):
1485 2014-07-25 Jeffrey Pfau <jpfau@apple.com>
1487 IDB transactions never reset if the Web Process ends before cleaning up
1488 https://bugs.webkit.org/show_bug.cgi?id=135218
1490 Reviewed by Darin Adler.
1492 * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
1493 (WebKit::DatabaseToWebProcessConnection::didClose):
1494 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1495 (WebKit::UniqueIDBDatabase::unregisterConnection):
1496 (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
1497 (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
1498 (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
1499 (WebKit::UniqueIDBDatabase::didEstablishTransaction):
1500 (WebKit::UniqueIDBDatabase::didResetTransaction):
1501 (WebKit::UniqueIDBDatabase::resetAllTransactions):
1502 (WebKit::UniqueIDBDatabase::finalizeRollback):
1503 (WebKit::UniqueIDBDatabase::absoluteDatabaseDirectory):
1504 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1505 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1506 (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
1508 2014-07-27 Yusuke Suzuki <utatane.tea@gmail.com>
1510 [GTK] Keep non-DATABASE_PROCESS build
1511 https://bugs.webkit.org/show_bug.cgi?id=135321
1513 Reviewed by Gyuyoung Kim.
1515 This is the patch for r171622 in non-DATABASE_PROCESS builds.
1516 Change sendToDatabaseProcessRelaunchingIfNecessary to support non-DATABASE_PROCESS implementation.
1519 * UIProcess/WebContext.h:
1520 (WebKit::WebContext::sendToDatabaseProcessRelaunchingIfNecessary):
1522 2014-07-27 Gavin Barraclough <baraclough@apple.com>
1524 Don't rely on reading applicationState from within DidEnterBackground/WillEnterForeground
1525 https://bugs.webkit.org/show_bug.cgi?id=135329
1526 rdar://problem/17818308
1528 Reviewed by Sam Weinig.
1530 API may not be stable.
1532 * UIProcess/ios/PageClientImplIOS.mm:
1533 (WebKit::PageClientImpl::isViewVisible):
1534 - changed to use -[WKContentView isBackground]
1535 * UIProcess/ios/ProcessAssertionIOS.mm:
1536 (-[WKProcessAssertionBackgroundTaskManager init]):
1537 - split notification handlers
1538 (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground:]):
1539 (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground:]):
1540 (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackgroundOrWillEnterForeground:]): Deleted.
1541 - Assume application is background is after DidEnterBackground, and not after WillEnterForeground
1542 * UIProcess/ios/WKContentView.h:
1543 - added isBackground.
1544 * UIProcess/ios/WKContentView.mm:
1545 (-[WKContentView initWithFrame:context:configuration:webView:]):
1546 - check applicationState at init.
1547 (-[WKContentView isBackground]):
1549 (-[WKContentView _applicationDidEnterBackground:]):
1550 (-[WKContentView _applicationWillEnterForeground:]):
1551 - update isBackground
1553 2014-07-26 Enrica Casucci <enrica@apple.com>
1555 [WebKit2 iOS]Add support for caret movement for the 3rd party keyboard protocol.
1556 https://bugs.webkit.org/show_bug.cgi?id=135325
1557 <rdar://problem/17682120>
1559 Reviewed by Sam Weinig.
1561 WKContentView now implements moveByOffset to support the
1562 protocol for 3rd party keyboards.
1564 * UIProcess/WebPageProxy.h:
1565 * UIProcess/ios/WKContentViewInteraction.mm:
1566 (-[WKContentView moveByOffset:]):
1567 * UIProcess/ios/WebPageProxyIOS.mm:
1568 (WebKit::WebPageProxy::moveSelectionByOffset):
1569 * WebProcess/WebPage/WebPage.h:
1570 * WebProcess/WebPage/WebPage.messages.in:
1571 * WebProcess/WebPage/ios/WebPageIOS.mm:
1572 (WebKit::WebPage::moveSelectionByOffset):
1574 2014-07-26 Timothy Horton <timothy_horton@apple.com>
1576 Crash in Web Content Process under ~PDFDocument under clearTouchEventListeners at topDocument()
1577 https://bugs.webkit.org/show_bug.cgi?id=135319
1578 <rdar://problem/17315168>
1580 Reviewed by Darin Adler and Antti Koivisto.
1582 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1583 (WebKit::WebFrameLoaderClient::committedLoad):
1584 Allow data through to WebCore for frames with custom content providers;
1585 the only custom content provider currently implemented is main frame PDF
1586 on iOS, which will end up creating a PDFDocument in WebCore, which drops all
1587 data on the floor immediately, so this won't result in WebCore doing anything
1588 with the data, but makes sure that more of the normal document lifecycle is maintained.
1590 In the future, we might want to consider ensuring that all custom content providers
1591 end up creating a SinkDocument or something similarly generic to ensure that
1592 WebCore doesn't try to do anything with their data, but for now, the only client is covered.
1594 2014-07-25 Jeremy Jones <jeremyj@apple.com>
1596 Parent fullscreen from window instead of view
1597 https://bugs.webkit.org/show_bug.cgi?id=135310
1599 Reviewed by Jer Noble.
1601 Parenting in the view causes an incorrect animation to fullscreen, and can cause
1602 fullscreen to only expand to the size of the view instead of the whole window.
1604 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1605 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass view's window.
1606 * WebProcess/ios/WebVideoFullscreenManager.mm: screenRect instead of clientRect
1607 (WebKit::screenRectForNode): was clientRectForNode
1608 (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): use screenRectForNode
1609 (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
1610 (WebKit::clientRectForNode): Deleted.
1612 2014-07-25 Oliver Hunt <oliver@apple.com>
1614 Creating incorrect sandbox extension for hsts plist due to missing /
1615 https://bugs.webkit.org/show_bug.cgi?id=135309
1617 Reviewed by Sam Weinig.
1619 So it turns out that you do actually need /'s in paths...
1620 Now we actually create the correct extension.
1622 * UIProcess/mac/WebContextMac.mm:
1623 (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
1625 2014-07-24 Anders Carlsson <andersca@apple.com>
1627 WKNavigation's properties are either always nil or don't behave as documented
1628 https://bugs.webkit.org/show_bug.cgi?id=135267
1629 <rdar://problem/17730536>
1631 Reviewed by Andreas Kling.
1633 Remove the properties from WKNavigation and introduce -[WKNavigation _request] as SPI for now.
1635 * Shared/API/Cocoa/WebKitPrivate.h:
1636 * UIProcess/API/Cocoa/WKNavigation.h:
1637 * UIProcess/API/Cocoa/WKNavigation.mm:
1638 (-[WKNavigation _request]):
1639 (-[WKNavigation initialRequest]): Deleted.
1640 (-[WKNavigation request]): Deleted.
1641 (-[WKNavigation setRequest:]): Deleted.
1642 (-[WKNavigation response]): Deleted.
1643 (-[WKNavigation error]): Deleted.
1644 * UIProcess/API/Cocoa/WKNavigationInternal.h:
1645 * UIProcess/API/Cocoa/WKNavigationPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationInternal.h.
1646 * UIProcess/Cocoa/NavigationState.mm:
1647 (WebKit::NavigationState::createLoadRequestNavigation):
1648 * WebKit2.xcodeproj/project.pbxproj:
1650 2014-07-25 Brady Eidson <beidson@apple.com>
1652 Clean up WKOriginDataManager and get it messaging to the DatabaseProcess
1653 https://bugs.webkit.org/show_bug.cgi?id=135035
1655 Reviewed by Sam Weinig.
1657 * DatabaseProcess/DatabaseProcess.cpp:
1658 (WebKit::DatabaseProcess::DatabaseProcess): Instantiate the WebOriginDataManager, installing its message handler.
1659 (WebKit::DatabaseProcess::didReceiveMessage): Try the message receiver map, which will try the WebOriginDataManager.
1660 * DatabaseProcess/DatabaseProcess.h:
1661 * DatabaseProcess/DatabaseProcess.messages.in:
1663 * UIProcess/API/C/WKOriginDataManager.cpp:
1664 (WKOriginDataManagerDeleteEntriesForOrigin): Updated to also take a callback.
1665 (WKOriginDataManagerDeleteEntriesModifiedBetweenDates): Added.
1666 (WKOriginDataManagerDeleteAllEntries): Updated to also take a callback.
1667 (WKOriginDataManagerStartObservingChanges): Deleted.
1668 (WKOriginDataManagerStopObservingChanges): Deleted.
1669 (WKOriginDataManagerSetChangeClient): Deleted.
1670 * UIProcess/API/C/WKOriginDataManager.h:
1672 * UIProcess/Databases/DatabaseProcessProxy.cpp:
1673 (WebKit::DatabaseProcessProxy::didReceiveMessage): Send messages to the WebOriginDataManagerProxy supplement if appropriate.
1674 * UIProcess/Databases/DatabaseProcessProxy.h:
1675 * UIProcess/Databases/DatabaseProcessProxy.messages.in:
1677 * UIProcess/WebContext.cpp:
1678 (WebKit::WebContext::WebContext): Instantiate the WebOriginDataManagerProxy supplement.
1679 * UIProcess/WebContext.h:
1680 (WebKit::WebContext::sendToDatabaseProcessRelaunchingIfNecessary):
1682 * UIProcess/WebOriginDataManagerProxy.cpp:
1683 (WebKit::WebOriginDataManagerProxy::contextDestroyed):
1684 (WebKit::WebOriginDataManagerProxy::processDidClose):
1685 (WebKit::WebOriginDataManagerProxy::getOrigins):
1686 (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin): Setup a callback with the message.
1687 (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates): Added
1688 (WebKit::WebOriginDataManagerProxy::didDeleteEntries): Call the callback.
1689 (WebKit::WebOriginDataManagerProxy::deleteAllEntries): Setup a callback with the message.
1690 (WebKit::WebOriginDataManagerProxy::didDeleteAllEntries): Call the callback.
1691 (WebKit::WebOriginDataManagerProxy::startObservingChanges): Deleted.
1692 (WebKit::WebOriginDataManagerProxy::stopObservingChanges): Deleted.
1693 (WebKit::WebOriginDataManagerProxy::setChangeClient): Deleted.
1694 (WebKit::WebOriginDataManagerProxy::didChange): Deleted.
1695 * UIProcess/WebOriginDataManagerProxy.h:
1696 * UIProcess/WebOriginDataManagerProxy.messages.in:
1698 * UIProcess/WebOriginDataManagerProxyChangeClient.cpp: Removed.
1699 * UIProcess/WebOriginDataManagerProxyChangeClient.h: Removed.
1701 * WebKit2.xcodeproj/project.pbxproj:
1703 * WebProcess/OriginData/WebOriginDataManager.cpp:
1704 (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Send the callback reply.
1705 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Added.
1706 (WebKit::WebOriginDataManager::deleteAllEntries): Send the callback reply.
1707 (WebKit::WebOriginDataManager::startObservingChanges): Deleted.
1708 (WebKit::WebOriginDataManager::stopObservingChanges): Deleted.
1709 * WebProcess/OriginData/WebOriginDataManager.h:
1710 * WebProcess/OriginData/WebOriginDataManager.messages.in:
1712 2014-07-25 Gavin Barraclough <baraclough@apple.com>
1714 Yosemite version number is 101000
1715 https://bugs.webkit.org/show_bug.cgi?id=135301
1717 Reviewed by Sam Weinig.
1719 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1720 (WebKit::connectToService):
1721 * WebProcess/com.apple.WebProcess.sb.in:
1723 2014-07-24 Benjamin Poulain <bpoulain@apple.com>
1725 [iOS][WK2] Do not try to hit test a null mainFrameRenderView on dynamicViewportSizeUpdate()
1726 https://bugs.webkit.org/show_bug.cgi?id=135277
1727 <rdar://problem/17804891>
1729 Reviewed by Tim Horton.
1731 * WebProcess/WebPage/ios/WebPageIOS.mm:
1732 (WebKit::WebPage::dynamicViewportSizeUpdate):
1733 There is no guarantee that the main frame have its root view when performing a dynamicViewportSizeUpdate(),
1734 we should not attempt to use the layer without null checking it first.
1736 The odd part for me is <rdar://problem/17804891> is a little too frequent. In the vast majority of cases,
1737 there is a RenderView, it seems actually pretty hard not to have one on dynamicViewportSizeUpdate().
1739 Skipping hit testing is safe because it is a completely optional part of this algorithm.
1740 When the hit test is not done, the new position is computed based on the relative position prior to
1743 2014-07-24 Dan Bernstein <mitz@apple.com>
1745 WebKit2 part of <rdar://problem/17593701> Assertion failure in WebPage::reload (!m_pendingNavigationID) when reloading after a same-document back navigation
1746 https://bugs.webkit.org/show_bug.cgi?id=135129
1748 Reviewed by Darin Adler.
1750 * Shared/WebBackForwardListItem.cpp:
1751 (WebKit::childItemWithDocumentSequenceNumber): New helper function based on
1752 WebCore::HistoryItem::childItemWithDocumentSequenceNumber.
1753 (WebKit::documentTreesAreEqual): New helper function based on
1754 WebCore::HistoryItem::hasSameDocumentTree.
1755 (WebKit::WebBackForwardListItem::itemIsInSameDocument): Added. Based on
1756 WebCore::HistoryItem::shouldDoSameDocumentNavigationTo.
1757 * Shared/WebBackForwardListItem.h:
1759 * UIProcess/WebPageProxy.cpp:
1760 (WebKit::WebPageProxy::goForward): Don’t assign a new navigation ID if the back-forward
1761 navigation is a same-document navigation.
1762 (WebKit::WebPageProxy::goBack): Ditto.
1763 (WebKit::WebPageProxy::goToBackForwardItem): Ditto.
1765 2014-07-24 Tim Horton <timothy_horton@apple.com>
1767 Sometimes WKWebView is blank after resuming the app, until you scroll
1768 https://bugs.webkit.org/show_bug.cgi?id=135275
1769 <rdar://problem/17803170>
1771 Reviewed by Benjamin Poulain.
1773 * UIProcess/WebPageProxy.cpp:
1774 (WebKit::WebPageProxy::dispatchViewStateChange):
1775 If the UI process is waiting for a didUpdateViewState, we need to *always*
1776 get a reply from the Web Process, so dispatchViewStateChange should *always*
1777 send SetViewState even if nothing changed (so that we get the reply).
1779 2014-07-24 Simon Fraser <simon.fraser@apple.com>
1781 [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
1782 https://bugs.webkit.org/show_bug.cgi?id=135221
1783 <rdar://problem/17542454>
1785 Reviewed by Benjamin Poulain.
1787 The call to didCommitLayerTree() can cause one or two visible rect updates,
1788 via changes to the UIScrollView contentSize and contentOffset. As a result, we
1789 would notify the scrolling tree about a viewport change, but using the old
1790 scrolling tree rather than the new one, so we could move layers around for
1791 nodes which are about to be removed from the tree.
1793 However, we also have to ensure that programmatic scrolls are applied after
1794 didCommitLayerTree() has updated the view size, so have RemoteScrollingCoordinatorProxy
1795 store data about programmatic scrolls and return them to the caller, which
1796 can apply them after didCommitLayerTree().
1798 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: Store a pointer to a RequestedScrollInfo
1799 for the duration of the tree update, so that we can store requested scroll info in it.
1800 (WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
1801 (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
1802 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):
1803 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1804 * UIProcess/WebPageProxy.cpp:
1805 (WebKit::WebPageProxy::didCommitLayerTree): Give Mac a stub implementation.
1806 * UIProcess/WebPageProxy.h: Group some editing-related functions together.
1807 (WebKit::WebPageProxy::editorState):
1808 (WebKit::WebPageProxy::canDelete):
1809 (WebKit::WebPageProxy::hasSelectedRange):
1810 (WebKit::WebPageProxy::isContentEditable):
1811 (WebKit::WebPageProxy::maintainsInactiveSelection):
1812 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1813 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): Ordering change: update
1814 the layer tree, then call didCommitLayerTree(), then do the viewport update, followed
1815 by any programmatic scroll.
1817 2014-07-24 Peyton Randolph <prandolph@apple.com>
1819 Rename feature flag for long-press gesture on Mac.
1820 https://bugs.webkit.org/show_bug.cgi?id=135259
1822 Reviewed by Beth Dakin.
1824 * Configurations/FeatureDefines.xcconfig:
1825 Rename LINK_LONG_PRESS to MAC_LONG_PRESS.
1827 2014-07-24 Dan Bernstein <mitz@apple.com>
1829 WebKit2 part of <rdar://problem/17766348> [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
1830 https://bugs.webkit.org/show_bug.cgi?id=135229
1832 Reviewed by Alexey Proskuryakov.
1834 * Shared/Cocoa/WKNSURLProtectionSpace.mm: Changed to use ProtectionSpace::nsSpace.
1836 * Shared/WebCoreArgumentCoders.cpp:
1837 (IPC::ArgumentCoder<ProtectionSpace>::encode): If encoding the space requires encoding the
1838 platform data, do that.
1839 (IPC::ArgumentCoder<ProtectionSpace>::decode): If platform data was encoded, decode it.
1840 * Shared/WebCoreArgumentCoders.h:
1842 * Shared/mac/WebCoreArgumentCodersMac.mm:
1843 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Archive the NSURLProtectionSpace.
1844 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Unarchive it.
1846 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
1847 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Added.
1848 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Added.
1850 2014-07-24 Benjamin Poulain <benjamin@webkit.org>
1852 [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
1853 https://bugs.webkit.org/show_bug.cgi?id=135227
1854 <rdar://problem/17279500>
1856 Reviewed by Simon Fraser.
1858 In some cases, a fixed or sticky positioned layer would end up at its position corresponding to the WebProcess
1859 instead of sticking the to real viewport in the UIProcess.
1861 The sequence of event is:
1862 1) A layer becomes fixed in some ScrollingTree transaction.
1863 2) Later, some change in the WebProcess causes a LayerTree update for that exact same layer, but no corresponding
1864 ScrollingTree update is made.
1865 3) In the UIProcess, the position of the fixed layer is changed due to the LayerTree update.
1866 But! There is no ScrollingTree change, updateScrollingTree() never sets fixedOrStickyLayerChanged to true,
1867 and the position is not corrected.
1868 -> The layer is now at the wrong position until the next VisibleContentRectUpdate.
1870 Ideally, we should have fixedOrStickyLayerChanged track if either the position or size of a fixed layer changed
1871 in the layer tree. This is tricky since the layer tree does not keep track of the fixed nodes of the scrolling tree.
1873 Since this complexity seems risky at this point, I went for something simpler but with more overhead:
1874 any time the scrolling tree contains either a fixed or sticky layer, viewportChangedViaDelegatedScrolling()
1875 is called to "fix" the position.
1877 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1878 (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
1879 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1880 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1881 (WebKit::RemoteScrollingCoordinatorProxy::hasFixedOrSticky):
1882 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1883 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1884 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1885 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1887 2014-07-24 Oliver Hunt <oliver@apple.com>
1889 Need to explicitly support location services in webcontent profile
1890 https://bugs.webkit.org/show_bug.cgi?id=135251
1893 Reviewed by Dan Bernstein.
1895 Switching to uikit-app means that we remove the implicit support
1896 for location services. This makes us explicitly opt-in.
1898 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1900 2014-07-24 Tim Horton <timothy_horton@apple.com>
1902 Crash at [WKContentView _applicationWillEnterForeground:] + 28
1903 <rdar://problem/17797103>
1905 Reviewed by Sam Weinig.
1907 * UIProcess/ios/WKContentView.mm:
1908 (-[WKContentView _applicationWillEnterForeground:]):
1909 Drawing area can be null; null check it!
1910 It's ok if we don't hide the content in this case, because if the drawing area is null,
1911 it doesn't have any layers in the tree anyway.
1913 2014-07-23 Simon Fraser <simon.fraser@apple.com>
1915 [iOS WK2] Some help.apple.com pages not scrollable
1916 https://bugs.webkit.org/show_bug.cgi?id=135228
1917 <rdar://problem/17790792>
1919 Reviewed by Benjamin Poulain.
1921 On pages which size their document to the device size, the WKContentView size
1922 never changes after it's created. In this situation, we never set a bounds
1923 on the _rootContentView, so it remains zero-sized which breaks hit testing
1924 on all enclosed UIScrollViews for overflow:scroll.
1926 Fix by making the _rootContentView and the _inspectorIndicationView use autosizing
1927 so they are always the size of their parent view, and remove the explicit setting
1930 * UIProcess/ios/WKContentView.mm:
1931 (-[WKContentView initWithFrame:context:configuration:webView:]):
1932 (-[WKContentView setShowingInspectorIndication:]):
1933 (-[WKContentView _didCommitLayerTree:]):
1935 2014-07-23 Benjamin Poulain <bpoulain@apple.com>
1937 [iOS][WK2] r171124 is incorrect when the virtual keyboard is up
1938 https://bugs.webkit.org/show_bug.cgi?id=135187
1940 Reviewed by Simon Fraser.
1942 Unfortunately, restricting the input into the document rect does not work.
1943 When the keyboard is up, the keyboard bounds can overlap the WKWebView, and
1944 the valid range should account for that.
1946 Instead of playing with the keyboard rect, we can limit the scroll position
1947 inside the valid range of UIScrollView. The keyboard always adjusts the UIScrollView
1948 range as needed to give access to the content. Using that range is a bit more permissive
1949 because the page could scroll to reveal content in the content inset defined by the client
1950 of the API (this could actually be quite useful for hybrid apps).
1952 There was already a function to change the content offset in the valid scrollview
1953 range: changeContentOffsetBoundedInValidRange(), I extracted the range check
1954 to contentOffsetBoundedInValidRange() for the needs of -[WKWebView _scrollToContentOffset:].
1956 So...contentOffsetBoundedInValidRange() is cool, but it is not in the right coordinate
1957 system. The scroll position we get from the WebProcess is in document coordinates, while
1958 contentOffsetBoundedInValidRange() works with the UIScrollView coordinates.
1959 To fix that, we scale the input position to get to the same scale as UIScrollView, then
1960 apply the insets with the weirdly named [WKWebView _adjustedContentOffset:].
1962 * UIProcess/API/Cocoa/WKWebView.mm:
1963 (contentOffsetBoundedInValidRange):
1964 (changeContentOffsetBoundedInValidRange):
1965 (-[WKWebView _scrollToContentOffset:]):
1967 2014-07-23 Commit Queue <commit-queue@webkit.org>
1969 Unreviewed, rolling out r171498.
1970 https://bugs.webkit.org/show_bug.cgi?id=135223
1972 It will regress some scroll position restoration on navigation
1973 (r167916). (Requested by smfr on #webkit).
1977 "[iOS WK2] Header bar on nytimes articles lands in the wrong
1978 place after rubberbanding"
1979 https://bugs.webkit.org/show_bug.cgi?id=135221
1980 http://trac.webkit.org/changeset/171498
1982 2014-07-23 Simon Fraser <simon.fraser@apple.com>
1984 [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
1985 https://bugs.webkit.org/show_bug.cgi?id=135221
1987 Reviewed by Tim Horton.
1989 The call to didCommitLayerTree() can cause one or two visible rect updates,
1990 via changes to the UIScrollView contentSize and contentOffset. As a result, we
1991 would notify the scrolling tree about a viewport change, but using the old
1992 scrolling tree rather than the new one, so we could move layers around for
1993 nodes which are about to be removed from the tree.
1995 Fix by m_webPageProxy->didCommitLayerTree() after the scrolling tree has been
1998 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1999 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2001 2014-07-23 Oliver Hunt <oliver@apple.com>
2003 Add a pseudo target to create sandbox override roots
2004 https://bugs.webkit.org/show_bug.cgi?id=135216
2007 Reviewed by Alexey Proskuryakov.
2009 Just a duplicate of the standard ios sandbox target, targetting
2010 the profile overrides directory. This means we can make roots
2013 * WebKit2.xcodeproj/project.pbxproj:
2015 2014-07-23 Oliver Hunt <oliver@apple.com>
2017 Incorrect commit for sandbox profile
2018 https://bugs.webkit.org/show_bug.cgi?id=135214
2021 Reviewed by Anders Carlsson.
2023 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2025 2014-07-23 Dan Bernstein <mitz@apple.com>
2027 <rdar://problem/17782623> [iOS] Client-certificate authentication isn’t working with some certificates
2028 https://bugs.webkit.org/show_bug.cgi?id=135206
2030 Reviewed by Anders Carlsson.
2032 * Shared/cf/ArgumentCodersCF.cpp:
2033 (IPC::copyPersistentRef): Added this helper function. It differs from
2034 SecKeyCopyPersistentRef in that if multiple copies of the key exist in the keychain, it
2035 ensures that we get a reference to the copy that is in the keychain access group that the
2036 Networking process can use.
2037 (IPC::encode): Use copyPersistentRef.
2039 2014-07-23 Bem Jones-Bey <bjonesbe@adobe.com>
2041 Remove CSS_EXCLUSIONS compile flag and leftover code
2042 https://bugs.webkit.org/show_bug.cgi?id=135175
2044 Reviewed by Zoltan Horvath.
2046 At this point, the CSS_EXCLUSIONS flag guards nothing but some useless
2047 stubs. This removes the flag and the useless code.
2049 * Configurations/FeatureDefines.xcconfig:
2051 2014-07-23 Timothy Horton <timothy_horton@apple.com>
2053 REGRESSION (r171239): Much more time spent taking snapshots during the PLT
2054 https://bugs.webkit.org/show_bug.cgi?id=135177
2055 <rdar://problem/17764847>
2057 Reviewed by Dan Bernstein.
2059 * UIProcess/WebPageProxy.cpp:
2060 (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
2061 (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
2062 * UIProcess/WebPageProxy.h:
2063 * UIProcess/WebPageProxy.messages.in:
2064 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2065 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
2066 * WebProcess/WebPage/WebPage.cpp:
2067 (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
2068 (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
2069 * WebProcess/WebPage/WebPage.h:
2070 Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
2071 Only send it when the current history item for the main frame changes.
2073 2014-07-23 Ryuan Choi <ryuan.choi@samsung.com>
2075 [EFL] EWebKit2.h should contain version information
2076 https://bugs.webkit.org/show_bug.cgi?id=135189
2078 Reviewed by Gyuyoung Kim.
2080 Generate EWebKit2.h to contain the version information.
2082 * PlatformEfl.cmake:
2083 * UIProcess/API/efl/EWebKit2.h.in: Renamed from Source/WebKit2/UIProcess/API/efl/EWebKit2.h.
2085 2014-07-23 Ryuan Choi <ryuan.choi@samsung.com>
2087 [EFL] Do not generate forwarding header for ewk headers
2088 https://bugs.webkit.org/show_bug.cgi?id=135147
2090 Reviewed by Gyuyoung Kim.
2092 Only EWebKit2.h and ewk_text_checker.h are generated as forwarding header.
2093 This is unnecessary.
2095 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
2096 * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
2097 * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
2098 * UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
2099 * UIProcess/efl/TextCheckerClientEfl.h:
2101 2014-07-22 Commit Queue <commit-queue@webkit.org>
2103 Unreviewed, rolling out r171366.
2104 https://bugs.webkit.org/show_bug.cgi?id=135190
2106 Broke three API tests (Requested by ap on #webkit).
2110 "REGRESSION (r171239): Much more time spent taking snapshots
2112 https://bugs.webkit.org/show_bug.cgi?id=135177
2113 http://trac.webkit.org/changeset/171366
2115 2014-07-22 Oliver Hunt <oliver@apple.com>
2117 Reduce the size of the root WebContent sandbox profile
2118 https://bugs.webkit.org/show_bug.cgi?id=135182
2119 <rdar://problem/17739108>
2121 Reviewed by Alexey Proskuryakov.
2123 Switch from apple-ui-app to uikit-app as the root of the webcontent
2126 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2128 2014-07-22 Jinwoo Song <jinwoo7.song@samsung.com>
2130 Unreviewed build fix on EFL port after r171356.
2132 Implement a dummy platformMediaCacheDirectory() to avoid undefined reference error.
2134 * UIProcess/efl/WebContextEfl.cpp:
2135 (WebKit::WebContext::platformMediaCacheDirectory):
2137 2014-07-22 Enrica Casucci <enrica@apple.com>
2139 REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track scrolling.
2140 https://bugs.webkit.org/show_bug.cgi?id=135180
2141 <rdar://problem/16721055>
2143 Reviewed by Simon Fraser.
2145 Adds notifications to the WKContentView to know when scrolling starts and ends
2146 in an overflow scroll. When scrolling starts, we hide the selection and we restore
2147 it when scrolling ends, though not before the selection information in the editor
2148 state has been updated.
2149 It also adds a new method to the EditorClient class to force the
2150 selection update when scrolling is completed.
2152 * UIProcess/PageClient.h:
2153 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2154 * UIProcess/Scrolling/RemoteScrollingTree.cpp:
2155 (WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartScroll):
2156 (WebKit::RemoteScrollingTree::scrollingTreeNodeDidEndScroll):
2157 * UIProcess/Scrolling/RemoteScrollingTree.h:
2158 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
2159 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2160 (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
2161 (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
2162 (-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]):
2163 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollWillStart):
2164 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollDidEnd):
2165 * UIProcess/WebPageProxy.h:
2166 * UIProcess/ios/PageClientImplIOS.h:
2167 * UIProcess/ios/PageClientImplIOS.mm:
2168 (WebKit::PageClientImpl::overflowScrollWillStartScroll):
2169 (WebKit::PageClientImpl::overflowScrollDidEndScroll):
2170 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2171 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll):
2172 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll):
2173 * UIProcess/ios/WKContentViewInteraction.h:
2174 * UIProcess/ios/WKContentViewInteraction.mm:
2175 (-[WKContentView _overflowScrollingWillBegin]):
2176 (-[WKContentView _overflowScrollingDidEnd]):
2177 (-[WKContentView _updateChangedSelection]):
2178 * UIProcess/ios/WebPageProxyIOS.mm:
2179 (WebKit::WebPageProxy::overflowScrollWillStartScroll):
2180 (WebKit::WebPageProxy::overflowScrollDidEndScroll):
2181 * WebProcess/WebCoreSupport/WebEditorClient.h:
2182 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2183 * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
2184 (WebKit::WebEditorClient::updateSelection):
2186 2014-07-22 Benjamin Poulain <bpoulain@apple.com>
2188 [iOS][WK2] WebPageProxy should not do anything when responding to an animated resize is the page is not in a valid state
2189 https://bugs.webkit.org/show_bug.cgi?id=135169
2190 <rdar://problem/17740149>
2192 Reviewed by Tim Horton.
2194 * UIProcess/ios/WebPageProxyIOS.mm:
2195 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2196 Neither m_dynamicViewportSizeUpdateWaitingForTarget nor m_dynamicViewportSizeUpdateWaitingForLayerTreeCommit should
2197 be modified if there is not WebProcess to respond to DynamicViewportSizeUpdate.
2199 (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
2200 We should not attempt to synchronize anything if the page was closed before the end of the dynamic viewport
2203 2014-07-22 Timothy Horton <timothy_horton@apple.com>
2205 REGRESSION (r171239): Much more time spent taking snapshots during the PLT
2206 https://bugs.webkit.org/show_bug.cgi?id=135177
2207 <rdar://problem/17764847>
2209 Reviewed by Dan Bernstein.
2211 * UIProcess/WebPageProxy.cpp:
2212 (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
2213 (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
2214 * UIProcess/WebPageProxy.h:
2215 * UIProcess/WebPageProxy.messages.in:
2216 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2217 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
2218 * WebProcess/WebPage/WebPage.cpp:
2219 (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
2220 (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
2221 * WebProcess/WebPage/WebPage.h:
2222 Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
2223 Only send it when the current history item for the main frame changes.
2225 2014-07-22 Oliver Hunt <oliver@apple.com>
2227 Add accountsd access to network sandbox profile
2228 https://bugs.webkit.org/show_bug.cgi?id=135176
2231 Reviewed by Anders Carlsson.
2233 This is available to the webcontent process already, but is also
2234 needed for the networking process.
2236 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2238 2014-07-22 Oliver Hunt <oliver@apple.com>
2240 Remove unused com.apple.webkit.* rules from profiles
2241 https://bugs.webkit.org/show_bug.cgi?id=135174
2244 Reviewed by Anders Carlsson.
2246 We never send these rules so we should just remove use of them
2249 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2250 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2252 2014-07-22 Oliver Hunt <oliver@apple.com>
2254 Provide networking process with access to its HSTS db
2255 https://bugs.webkit.org/show_bug.cgi?id=135121
2258 Reviewed by Alexey Proskuryakov.
2260 Add an extension parameter to pass the hsts database file.
2261 This requires us to create the Caches/com.apple.WebKit.Networking
2262 directory in the UI process, as the network sandbox
2263 does not allow it to create the containing directory.
2265 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2266 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2267 * Shared/Network/NetworkProcessCreationParameters.cpp:
2268 (WebKit::NetworkProcessCreationParameters::encode):
2269 (WebKit::NetworkProcessCreationParameters::decode):
2270 * Shared/Network/NetworkProcessCreationParameters.h:
2271 * UIProcess/WebContext.cpp:
2272 (WebKit::WebContext::ensureNetworkProcess):
2273 (WebKit::WebContext::networkingHSTSDatabasePath):
2274 * UIProcess/WebContext.h:
2275 * UIProcess/mac/WebContextMac.mm:
2276 (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
2278 2014-07-22 Benjamin Poulain <bpoulain@apple.com>
2280 [iOS][WK2] UI helpers that zoom on an element ignore the viewport's allowsUserScaling
2281 https://bugs.webkit.org/show_bug.cgi?id=135140
2282 <rdar://problem/17754921>
2284 Reviewed by Tim Horton.
2286 UIScrollView makes a difference between min/max zoom and allowUserScaling. To express that,
2287 everything is set up on the LayerTransaction.
2289 For zooming related helpers (find on page, double tap to zoom, etc), the min and max zoom
2290 should be the actual min/max for the current page state.
2292 This patch split the two explicitely.
2293 For layer transactions, the values are taken from the viewport configuration directly.
2294 For everything else, we should use minimumPageScaleFactor/maximumPageScaleFactor. Those two methods
2295 have been updated to take into account allowsUserScaling.
2297 * WebProcess/WebPage/WebPage.cpp:
2298 (WebKit::WebPage::willCommitLayerTree):
2299 * WebProcess/WebPage/ios/WebPageIOS.mm:
2300 (WebKit::WebPage::minimumPageScaleFactor):
2301 (WebKit::WebPage::maximumPageScaleFactor):
2302 (WebKit::WebPage::getAssistedNodeInformation):
2304 2014-07-22 Shivakumar JM <shiva.jm@samsung.com>
2306 Web Inspector: Fix unused parameter build warning
2307 https://bugs.webkit.org/show_bug.cgi?id=135151
2309 Reviewed by Joseph Pecoraro.
2311 Fix unused parameter build warning by removing the parameter name
2313 * WebProcess/WebPage/WebInspector.cpp:
2314 (WebKit::WebInspector::setJavaScriptProfilingEnabled):
2316 2014-07-22 Shivakumar JM <shiva.jm@samsung.com>
2318 Fix unused parameter build warning in UIProcess module
2319 https://bugs.webkit.org/show_bug.cgi?id=135154
2321 Reviewed by Alexey Proskuryakov.
2323 Fix unused parameter build warning in UIProcess module by using UNUSED_PARAM macro.
2325 * UIProcess/WebPageProxy.cpp:
2326 (WebKit::WebPageProxy::viewStateDidChange):
2328 2014-07-22 Jeremy Jones <jeremyj@apple.com>
2330 Don't create new UIWindow for video fullscreen.
2331 https://bugs.webkit.org/show_bug.cgi?id=135038
2333 Reviewed by Darin Adler.
2335 Use root UIView to parent fullscreen interface.
2337 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2338 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass parent UIView
2339 * WebProcess/ios/WebVideoFullscreenManager.mm:
2340 (WebKit::screenRectForNode): Use client rect instead of screen rect.
2342 2014-07-21 Ryuan Choi <ryuan.choi@samsung.com>
2344 [EFL] Add Ewk prefix to enums of ewk_navigation_policy
2345 https://bugs.webkit.org/show_bug.cgi?id=135144
2347 Reviewed by Gyuyoung Kim.
2349 All public enums of ewebkit should start with Ewk prefix.
2350 This patch added Ewk prefix to Ewk_Event_Mouse_Button and Ewk_Event_Modifiers.
2351 In addition, added missing description and default value for Ewk_Event_Modifier.
2353 * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
2354 (toEwkEventMouseButton):
2355 (toEwkEventModifiers):
2356 (EwkNavigationPolicyDecision::mouseButton):
2357 (EwkNavigationPolicyDecision::modifiers):
2358 (ewk_navigation_policy_mouse_button_get):
2359 (ewk_navigation_policy_modifiers_get):
2360 (toEventMouseButton): Deleted.
2361 (toEventModifierKeys): Deleted.
2362 * UIProcess/API/efl/ewk_navigation_policy_decision.h:
2363 * UIProcess/API/efl/ewk_navigation_policy_decision_private.h:
2365 2014-07-21 Benjamin Poulain <bpoulain@apple.com>
2367 [iOS][WK2] Improve event throttling for Scroll Events
2368 https://bugs.webkit.org/show_bug.cgi?id=135082
2369 <rdar://problem/17445266>
2371 Reviewed by Simon Fraser.
2373 In the WebKit layer, we want a measure that is representative of the responsiveness.
2375 In this patch, I use the total delay between a VisibleContentRectUpdate being dispatched
2376 by the UIProcess, and the time RemoteLayerTreeDrawingArea flushes the layer tree.
2378 The value used for eventThrottlingDelay() is computed by averaging the new value with
2379 the old values with a 80/20 split, favoring the old data. Favoring historical data
2380 over the last timing avoid excessively throttling for a single slow frame.
2382 The computation of m_estimatedMainThreadLatency can be improved in the future, this is
2383 a first cut keeping things simple.
2385 With m_estimatedMainThreadLatency in our hands, we can compute our eventThrottlingDelay().
2386 If m_estimatedMainThreadLatency is smaller than a single frame timespan, we have a fast page
2387 and nothing is throttled.
2389 If is it more than a frame, we throttle such that we can at least render two frames
2390 per event dispatch based on the historical data.
2392 The exact values will need some tweaking, but this set ensures well written pages get
2393 60 events per seconds, while slow pages do not waste too much time on events.
2395 * WebProcess/WebCoreSupport/WebChromeClient.h:
2396 * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
2397 (WebKit::WebChromeClient::eventThrottlingDelay):
2398 * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
2399 (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
2400 (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
2401 * WebProcess/WebPage/ViewUpdateDispatcher.h:
2402 * WebProcess/WebPage/WebPage.cpp:
2403 (WebKit::WebPage::WebPage):
2404 (WebKit::WebPage::didFlushLayerTreeAtTime):
2405 (WebKit::WebPage::didCommitLoad):
2406 * WebProcess/WebPage/WebPage.h:
2407 * WebProcess/WebPage/ios/WebPageIOS.mm:
2408 (WebKit::WebPage::eventThrottlingDelay):
2409 (WebKit::WebPage::updateVisibleContentRects):
2410 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2411 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2413 2014-07-21 Simon Fraser <simon.fraser@apple.com>
2415 REGRESSION (r170361): In landscape with UI hidden, fixed position elements at top of screen are too low
2416 https://bugs.webkit.org/show_bug.cgi?id=135141
2417 <rdar://problem/17627525>
2419 Reviewed by Benjamin Poulain.
2421 We can't use the WKWebView's UIScrollView contentInsets to determine the unobscured rect
2422 in MobileSafari, because contentInsets can't be changed dynamically while scrolling.
2423 To get around this, MobileSafari sets obscured insets instead (but also sets a fixed
2426 So if the client calls _setObscuredInsets:, always use _obscuredInsets to compute the
2429 * UIProcess/API/Cocoa/WKWebView.mm:
2430 (-[WKWebView _computedContentInset]):
2431 (-[WKWebView _setObscuredInsets:]):
2433 2014-07-21 Oliver Hunt <oliver@apple.com>
2435 Remove global cookie workaround from sandbox profiles
2436 https://bugs.webkit.org/show_bug.cgi?id=135138
2439 Reviewed by Alexey Proskuryakov.
2441 Remove the workaround needed for global cookie access, and silencing
2442 of the associated sandbox violation.
2444 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2445 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2446 * UIProcess/mac/WebContextMac.mm:
2447 (WebKit::WebContext::platformDefaultCookieStorageDirectory):
2449 2014-07-21 Oliver Hunt <oliver@apple.com>
2451 Correct sandbox profiles to fix some excess privileges
2452 https://bugs.webkit.org/show_bug.cgi?id=135134
2453 <rdar://problem/17741886>
2454 <rdar://problem/17739080>
2456 Reviewed by Alexey Proskuryakov.
2458 This cleans up our sandbox profiles to fix a few issues - the profiles
2459 no longer allow us to issue file extension we have the ability to consume,
2460 and tightens some of the other file access rules.
2462 This means we have to addd some rules to allow us to access things
2463 that we previously had access to due to lax file system restrictions.
2465 Some of the features were fixable simply by using entitlements on the
2466 process rather than custom rules.
2468 * Configurations/WebContent-iOS.entitlements:
2469 * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
2470 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2471 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2473 2014-07-21 Simon Fraser <simon.fraser@apple.com>
2475 [iOS WK2] Turn off position:fixed behavior when the keyboard is up
2476 https://bugs.webkit.org/show_bug.cgi?id=132537
2478 Reviewed by Benjamin Poulain.
2480 Make interaction with form elements inside position:fixed less terrible by re-laying out
2481 fixed elements relative to the document while we have an assisted node. This ensures
2482 that all parts of a position:fixed are accessible (e.g. inputs on the right side
2483 of a fixed-width top bar).
2485 * Shared/AssistedNodeInformation.cpp: Add a flag for being inside postion:fixed,
2486 and encode/decode it.
2487 (WebKit::AssistedNodeInformation::encode):
2488 (WebKit::AssistedNodeInformation::decode):
2489 * Shared/AssistedNodeInformation.h:
2490 (WebKit::AssistedNodeInformation::AssistedNodeInformation):
2491 * UIProcess/PageClient.h: Add isAssistingNode().
2492 * UIProcess/ios/PageClientImplIOS.h:
2493 * UIProcess/ios/PageClientImplIOS.mm:
2494 (WebKit::PageClientImpl::isAssistingNode):
2495 * UIProcess/ios/WebPageProxyIOS.mm:
2496 (WebKit::WebPageProxy::computeCustomFixedPositionRect): If we have an assisted
2497 node, just use the document rect as the custom fixed position rect.
2498 * WebProcess/WebPage/ios/WebPageIOS.mm:
2499 (WebKit::WebPage::getAssistedNodeInformation): Get the selection rect first,
2500 since we have to fix it up for position:fixed. If the element is inside fixed
2501 position in the main frame, re-set the fixed position rect to the document rect
2502 (which forces a layout), re-fetch elementRect, then set it back. This ensures
2503 that the UI process gets an elementRect which it can zoom to correctly.
2505 2014-07-21 Timothy Horton <timothy_horton@apple.com>
2507 Random crashes on the Web Thread due to Timers firing on the wrong thread in the UI process
2508 https://bugs.webkit.org/show_bug.cgi?id=135132
2509 <rdar://problem/17719832>
2511 Reviewed by Simon Fraser.
2513 * UIProcess/ProcessThrottler.cpp:
2514 (WebKit::ProcessThrottler::ProcessThrottler):
2515 (WebKit::ProcessThrottler::suspendTimerFired):
2516 * UIProcess/ProcessThrottler.h:
2517 * UIProcess/ios/ViewGestureControllerIOS.mm:
2518 (WebKit::ViewGestureController::ViewGestureController):
2519 (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
2520 * UIProcess/mac/ViewGestureController.h:
2521 * UIProcess/mac/ViewGestureControllerMac.mm:
2522 (WebKit::ViewGestureController::ViewGestureController):
2523 (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
2524 We can't use WebCore timers in the UI process because of coexistence concerns
2525 (they fire on the Web Thread if there is one!), so use RunLoop::Timer instead.
2527 2014-07-21 Andy Estes <aestes@apple.com>
2529 [iOS] Handle QuickLook ResourceLoaders in the web process
2530 https://bugs.webkit.org/show_bug.cgi?id=135113
2532 Reviewed by David Kilzer.
2534 The QuickLook framework registers a NSURLProtocol to handle loading subresources of the HTML documents it
2535 generates. In order for these loads to succeed, we need to start them in the same process in which QuickLook
2536 generated the main resource.
2538 * WebProcess/Network/WebResourceLoadScheduler.cpp:
2539 (WebKit::WebResourceLoadScheduler::scheduleLoad):
2541 2014-07-21 Brady Eidson <beidson@apple.com>
2543 DatabaseProcess doesn't relaunch after crashing.
2544 <rdar://problem/17717343> and https://bugs.webkit.org/show_bug.cgi?id=135117
2546 Reviewed by Alexey Proskuryakov.
2548 * UIProcess/Databases/DatabaseProcessProxy.cpp:
2549 (WebKit::DatabaseProcessProxy::didClose): Tell the WebContext.
2551 * UIProcess/WebContext.cpp:
2552 (WebKit::WebContext::databaseProcessCrashed): Notify supplements, then clear the DatabaseProcessProxy pointer.
2553 * UIProcess/WebContext.h:
2555 * UIProcess/WebContextSupplement.h:
2556 (WebKit::WebContextSupplement::processDidClose): Added. No users right now, but the patch in bug 135035 will need this.
2558 2014-07-20 KwangHyuk Kim <hyuki.kim@samsung.com>
2560 Fix warnings caused by unused parameter.
2561 https://bugs.webkit.org/show_bug.cgi?id=134975
2563 Reviewed by Gyuyoung Kim.
2565 Fix warnings on EwkView.cpp and LegacySessionStateCodingNone.cpp that are caused by unused parameter data.
2567 * UIProcess/API/efl/EwkView.cpp:
2568 (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
2569 * UIProcess/LegacySessionStateCodingNone.cpp:
2570 (WebKit::decodeLegacySessionState):
2572 2014-07-20 Jeremy Jones <jeremyj@apple.com>
2574 Disable ff/rw based on canPlayFastForward and canPlayFastRewind.
2575 https://bugs.webkit.org/show_bug.cgi?id=134894
2577 Reviewed by Darin Adler.
2579 Add setCanPlayFastReverse
2581 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: ditto
2582 * WebProcess/ios/WebVideoFullscreenManager.h: ditto
2583 * WebProcess/ios/WebVideoFullscreenManager.mm: ditto
2584 (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse): ditto
2586 2014-07-20 Jeremy Jones <jeremyj@apple.com>
2588 Decrease flicker when enter and exit fullscreen.
2589 https://bugs.webkit.org/show_bug.cgi?id=134919
2591 Reviewed by Simon Fraser.
2593 Change the sequence of tear down and use transparency to prevent flicker when entering and exiting fullscreen.
2595 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: wait to remove layerHost until didCleanupFullscreen
2596 (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen): removed from here
2597 (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): added here
2598 * WebProcess/ios/WebVideoFullscreenManager.mm:
2599 (WebKit::WebVideoFullscreenManager::didSetupFullscreen): use transparent background during transition
2601 2014-07-20 Dan Bernstein <mitz@apple.com>
2603 <rdar://problem/17739526> REGRESSION (r171057): Crash in WebPage::getPositionInformation()
2604 https://bugs.webkit.org/show_bug.cgi?id=135099
2606 Reviewed by David Kilzer.
2608 * WebProcess/WebPage/ios/WebPageIOS.mm:
2609 (WebKit::WebPage::getPositionInformation): Added a null check.
2611 2014-07-19 Zan Dobersek <zdobersek@igalia.com>
2613 Consistently use uint64_t as the handle parameter type for the SetAcceleratedCompositingWindowId message
2614 https://bugs.webkit.org/show_bug.cgi?id=135047
2616 Reviewed by Darin Adler.
2618 UIProcess' WebPageProxy is handling this parameter as an uint64_t, it should be handled as such
2619 in WebProcess as well.
2621 * WebProcess/WebPage/WebPage.h:
2622 * WebProcess/WebPage/WebPage.messages.in: Also changed the parameter name to match other places.
2623 * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2624 (WebKit::WebPage::setAcceleratedCompositingWindowId):
2626 2014-07-18 Oliver Hunt <oliver@apple.com>
2628 We don't provide an extension to the temp file used for uploads
2629 https://bugs.webkit.org/show_bug.cgi?id=135079
2631 Reviewed by Sam Weinig.
2633 Make sure didChooseFilesForOpenPanelWithDisplayStringAndIcon vends
2634 extensions for the files passed to the content process.
2636 * UIProcess/WebPageProxy.cpp:
2637 (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
2639 2014-07-18 Tim Horton <timothy_horton@apple.com>
2641 ASSERTion failures in ViewGestureController indicating that we're copying WebBackForwardList
2642 https://bugs.webkit.org/show_bug.cgi?id=135080
2643 <rdar://problem/17734714>
2645 Reviewed by Sam Weinig.
2647 * UIProcess/ios/ViewGestureControllerIOS.mm:
2648 (WebKit::ViewGestureController::beginSwipeGesture):
2649 (WebKit::ViewGestureController::canSwipeInDirection):
2651 2014-07-18 Yongjun Zhang <yongjun_zhang@apple.com>
2653 _WKActivatedElementInfo.title should fallback to innerText if the link doesn't have title attribute.
2654 https://bugs.webkit.org/show_bug.cgi?id=135077
2656 When populate InteractionInformationAtPosition's title value, use a link element's innerText if it
2657 doesn't have title attribute.
2659 Reviewed by Dan Bernstein.
2661 * WebProcess/WebPage/ios/WebPageIOS.mm:
2662 (WebKit::WebPage::getPositionInformation):
2664 2014-07-18 Andy Estes <aestes@apple.com>
2666 [iOS] Tapping "Allow Website" on a restricted page does not bring up the keypad
2667 https://bugs.webkit.org/show_bug.cgi?id=135072
2668 <rdar://problem/17528188>
2670 Reviewed by David Kilzer.
2672 * Shared/WebCoreArgumentCoders.h: Declared an ArgumentCoder for WebCore::ContentFilter.
2673 * Shared/mac/WebCoreArgumentCodersMac.mm:
2674 (IPC::ArgumentCoder<ContentFilter>::encode): Encoded the ContentFilter using a NSKeyedArchiver.
2675 (IPC::ArgumentCoder<ContentFilter>::decode): Decoded the ContentFilter using a NSKeyedUnarchiver.
2676 * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2677 (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Called WebFrameProxy::setContentFilterForBlockedLoad().
2678 * UIProcess/WebFrameProxy.cpp:
2679 (WebKit::WebFrameProxy::didStartProvisionalLoad): Reset m_contentFilterForBlockedLoad to nullptr.
2680 (WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction): Called ContentFilter::handleUnblockRequestAndDispatchIfSuccessful().
2681 If the unblock is successful, reload the WebPageProxy.
2682 * UIProcess/WebFrameProxy.h:
2683 (WebKit::WebFrameProxy::setContentFilterForBlockedLoad):
2684 * UIProcess/WebPageProxy.cpp:
2685 (WebKit::WebPageProxy::decidePolicyForNavigationAction): Check if this is navigation represents an unblock
2686 request and ignore if so.
2687 * UIProcess/WebPageProxy.h:
2688 * UIProcess/WebPageProxy.messages.in: Defined ContentFilterDidBlockLoadForFrame.
2689 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2690 (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad): Sent ContentFilterDidBlockLoadForFrame to the WebPageProxy.
2691 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2693 2014-07-18 Simon Fraser <simon.fraser@apple.com>
2695 [iOS WK2] position:fixed in iframes with programmatic scroll could end up in the wrong place
2696 https://bugs.webkit.org/show_bug.cgi?id=135078
2697 <rdar://problem/17401823>
2699 Reviewed by Tim Horton.
2701 Fix the logging of requested scroll position and frame scale factor.
2703 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2704 (WebKit::RemoteScrollingTreeTextStream::dump):
2706 2014-07-18 Joseph Pecoraro <pecoraro@apple.com>
2708 [Cocoa] Use RetainPtr in _WKRemoteObjectInterface
2709 https://bugs.webkit.org/show_bug.cgi?id=135062
2711 Reviewed by Anders Carlsson.
2713 Switch to RetainPtr instead of manual memory management of ivars.
2715 * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
2716 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
2717 (-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
2718 (-[_WKRemoteObjectInterface identifier]):
2719 (-[_WKRemoteObjectInterface description]):
2720 (-[_WKRemoteObjectInterface dealloc]): Deleted.
2722 2014-07-18 Tim Horton <timothy_horton@apple.com>
2724 Take navigation snapshots whenever the current back-forward item is going to change
2725 https://bugs.webkit.org/show_bug.cgi?id=135058
2726 <rdar://problem/17464515>
2728 Reviewed by Dan Bernstein.
2730 Instead of trying to have the UI process figure out when to take navigation snapshots by itself,
2731 snapshot whenever the Web process says that the current back-forward item is going to change.
2732 This fixes snapshotting timing with pushState, and lets us bottleneck snapshotting down to
2733 just two places instead of 5.
2735 * UIProcess/WebPageProxy.cpp:
2736 (WebKit::WebPageProxy::goForward):
2737 (WebKit::WebPageProxy::goBack):
2738 (WebKit::WebPageProxy::goToBackForwardItem):
2739 (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
2740 We no longer need to special-case taking navigation snapshots
2741 when the UI process changes the back forward item or upon
2742 didStartProvisionalLoadForFrame, because we'll always snapshot
2743 in willChangeCurrentHistoryItem in all of these cases.
2745 * UIProcess/WebPageProxy.cpp:
2746 (WebKit::WebPageProxy::willChangeCurrentHistoryItem):
2747 * UIProcess/WebPageProxy.h:
2748 * UIProcess/WebPageProxy.messages.in:
2749 Add willChangeCurrentHistoryItem message, which comes from the Web process.
2750 When it arrives, take a navigation snapshot.
2752 * UIProcess/ios/ViewGestureControllerIOS.mm:
2753 (WebKit::ViewGestureController::beginSwipeGesture):
2754 Take the pre-swipe navigation snapshot before telling WebPageProxy that we're doing a swipe,
2755 so that it doesn't bail from taking the snapshot because we have a snapshot up.
2757 (WebKit::ViewGestureController::endSwipeGesture):
2758 We no longer need to explicitly disable snapshotting while navigating, because
2759 we will avoid taking the snapshot if there's a snapshot being displayed.
2761 * UIProcess/mac/ViewGestureControllerMac.mm:
2762 (WebKit::ViewGestureController::~ViewGestureController):
2763 Remove the snapshot if it's still up when ViewGestureController is destroyed.
2764 The Mac version of ViewGestureController is destroyed on Web process crashes
2765 because it is a message receiver, so it is not guaranteed to have the same
2766 lifetime as the WebPageProxy and friends.
2768 (WebKit::ViewGestureController::trackSwipeGesture):
2769 Make use of recordNavigationSnapshot.
2771 (WebKit::ViewGestureController::endSwipeGesture):
2772 Ditto from the Mac version.
2774 * UIProcess/mac/ViewSnapshotStore.h:
2775 (WebKit::ViewSnapshotStore::disableSnapshotting): Deleted.
2776 (WebKit::ViewSnapshotStore::enableSnapshotting): Deleted.
2777 * UIProcess/mac/ViewSnapshotStore.mm:
2778 (WebKit::ViewSnapshotStore::ViewSnapshotStore):
2779 (WebKit::ViewSnapshotStore::recordSnapshot):
2780 Remove the snapshot disabling mechanism and bail from snapshotting if we're
2781 showing a snapshot, as mentioned above.
2783 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2784 (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
2785 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2786 * WebProcess/WebPage/WebPage.cpp:
2787 (WebKit::WebPage::willChangeCurrentHistoryItem):
2788 * WebProcess/WebPage/WebPage.h:
2789 Proxy willChangeCurrentHistoryItem from HistoryController to the UI process.
2791 2014-07-18 Jon Honeycutt <jhoneycutt@apple.com>
2793 REGRESSION: Crash when typing into text field that clears itself on iOS
2795 <https://bugs.webkit.org/show_bug.cgi?id=135044>
2796 <rdar://problem/17640443>
2798 Reviewed by Darin Adler.
2800 * WebProcess/WebPage/ios/WebPageIOS.mm:
2801 (WebKit::WebPage::requestAutocorrectionData):
2802 wordRangeFromPosition() returns null in some cases; null check range
2803 before dereferencing it. Moved some variable declarations around to
2804 better match our style.
2806 2014-07-18 Tim Horton <timothy_horton@apple.com>
2808 [WK2] Provide a mechanism to grab the back-forward list for gesture navigation purposes from another WKWebView
2809 https://bugs.webkit.org/show_bug.cgi?id=134999
2810 <rdar://problem/17238025>
2812 Reviewed by Sam Weinig.
2814 In some cases, clients may need to throw a WKWebView with no back-forward list over
2815 another WKWebView, and want to participate in gesture swipe as if they were actually
2816 the page being overlaid.
2818 * UIProcess/API/Cocoa/WKWebView.mm:
2819 (-[WKWebView setAllowsBackForwardNavigationGestures:]):
2820 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2821 (-[WKWebViewConfiguration copyWithZone:]):
2822 (-[WKWebViewConfiguration _alternateWebViewForNavigationGestures]):
2823 (-[WKWebViewConfiguration _setAlternateWebViewForNavigationGestures:]):
2824 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2825 Keep an "alternate" WKWebView "for navigation gestures", which ViewGestureController
2826 will use as the real source of back-forward items, and the destination of the swipe navigation.
2827 All swipe delegate callbacks will also fire from the alternate view, because it owns the items
2828 and will be doing the navigation.
2830 * UIProcess/ios/ViewGestureControllerIOS.mm:
2831 (WebKit::ViewGestureController::setAlternateBackForwardListSourceView):
2832 (WebKit::ViewGestureController::beginSwipeGesture):
2833 Send navigationGestureDidBegin via the alternate view's WebPageProxy if it exists.
2834 Record a new snapshot on the current page, but copy it to the alternate view if necessary,
2835 so that when swiping forward from the alternate view, it will have the "right" snapshot.
2836 Get the target back forward item from the alternate view.
2837 Send navigationGestureWillEnd via the alternate view's WebPageProxy if it exists.
2839 (WebKit::ViewGestureController::canSwipeInDirection):
2840 Determine if we can swipe in a direction by looking at the alternate view's back-forward list if necessary.
2842 (WebKit::ViewGestureController::endSwipeGesture):
2843 Send navigationGestureDidEnd via the alternate view's WebPageProxy if it exists.
2844 Perform the navigation on the alternate view if necessary.
2846 (WebKit::ViewGestureController::removeSwipeSnapshot):
2847 Send navigationGestureSnapshotWasRemoved via the alternate view's WebPageProxy if it exists.
2849 * UIProcess/mac/ViewGestureController.h:
2851 2014-07-17 David Kilzer <ddkilzer@apple.com>
2853 SECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
2854 <http://webkit.org/b/135006>
2856 Reviewed by Darin Adler.
2858 * Configurations/Base.xcconfig: Move SECTORDER_FLAGS to
2860 * Configurations/DebugRelease.xcconfig: Remove empty
2861 SECTORDER_FLAGS definition.
2862 * Configurations/WebKit.xcconfig: Use $(CONFIGURATION) so
2863 SECTORDER_FLAGS is only set on Production builds.
2865 2014-07-17 Alexey Proskuryakov <ap@apple.com>
2867 REGRESSION (r171167): LoaderClient processDidCrash call is made after load state changes
2868 https://bugs.webkit.org/show_bug.cgi?id=135032
2869 <rdar://problem/17716602>
2871 Reviewed by Dan Bernstein.
2873 * UIProcess/WebPageProxy.cpp:
2874 (WebKit::WebPageProxy::processDidCrash): Create a transaction, so that the nested
2875 transaction in resetStateAfterProcessExited() wouldn't be committed.
2876 (WebKit::WebPageProxy::resetStateAfterProcessExited): Don't use auto - it was hiding
2877 the most important fact that this is a stack object that can't be simply moved to
2878 a different function.
2880 2014-07-17 Benjamin Poulain <bpoulain@apple.com>
2882 [iOS][WK2] Fix the updateVisibleContentRects synchronization for load after r171154
2883 https://bugs.webkit.org/show_bug.cgi?id=135036
2885 Reviewed by Dan Bernstein.
2887 * WebProcess/WebPage/ios/WebPageIOS.mm:
2888 (WebKit::WebPage::updateVisibleContentRects):
2889 I forgot to update one of the condition after changing from lastTransaction to next transaction
2892 2014-07-17 Enrica Casucci <enrica@apple.com>
2894 [REGRESSION WK2]The menu bar does not show up when tapping on the caret.
2895 https://bugs.webkit.org/show_bug.cgi?id=135023
2896 <rdar://problem/17617282>
2898 Reviewed by Benjamin Poulain and Ryosuke Niwa.
2900 WKContentView needs to implement hasContent to correctly show
2901 the appropriate menu bar content. The patch adds this information
2904 * Shared/EditorState.cpp:
2905 (WebKit::EditorState::encode):
2906 (WebKit::EditorState::decode):
2907 * Shared/EditorState.h:
2908 (WebKit::EditorState::EditorState):
2909 * UIProcess/ios/WKContentViewInteraction.mm:
2910 (-[WKContentView hasContent]):
2911 * WebProcess/WebPage/WebPage.cpp:
2912 (WebKit::WebPage::editorState):
2914 2014-07-17 Benjamin Poulain <benjamin@webkit.org>
2916 [iOS][WK2] Add SPI to do a dynamic viewport update without showing any content
2917 https://bugs.webkit.org/show_bug.cgi?id=135010
2919 Reviewed by Darin Adler.
2921 This patch add a new SPI, [WKWebView _resizeWhileHidingContentWithUpdates:] to perform all the work
2922 of a dynamic viewport size update, but instead of animating the old content, it is hidden.
2924 The patch is built on top of the animated resize mechanism. Instead of having an animation driving
2925 the beginning and end, we let the content do that. The dynamic resize begins, it runs for as long as
2926 the WebProcess needs, and it ends when first layer tree commit with the new content is processed.
2928 The attribute "_isAnimatingResize" is generalized to support two modes of resizing: animated and
2931 The attribute "_hasCommittedLoadForMainFrame" is rather silly. It is only needed because
2932 [WKWebView _resizeWhileHidingContentWithUpdates:] is intended to be called a lot before the page
2933 is initialized, and doing an animated resize would trash the WebProcess state.
2934 I wish I had a better solution, this is not great.
2936 * UIProcess/API/Cocoa/WKWebView.mm:
2937 (-[WKWebView _processDidExit]):
2938 (-[WKWebView _didCommitLoadForMainFrame]):
2939 (-[WKWebView _didCommitLayerTree:]):
2940 This is the key to make this work properly. We want _resizeWhileHidingContentWithUpdates: to behave
2941 exactly like an animated resize to avoid bugs. So we went to the whole update mechanism using
2942 _resizeAnimationTransformAdjustments to accumulate the adjustments, now we need to restore a correct
2945 Calling [WKWebView _endAnimatedResize] will do exactly that, but we need to make sure we do not hit
2946 the synchronization path or we would be blocked there for a while, which is what we are trying to avoid.
2948 After r171154, WebPageProxy keeps track of what stage of dynamic viewport update we are in. Since we are
2949 executing the layer tree update stage, with the right transaction ID, WebPageProxy already knows we have
2950 everything we need and does not use any synchronous messages.
2952 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
2953 (-[WKWebView _restorePageStateToExposedRect:scale:]):
2954 (-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
2955 (-[WKWebView _scrollToContentOffset:]):
2956 (-[WKWebView _frameOrBoundsChanged]):
2957 (-[WKWebView _updateVisibleContentRects]):
2958 (-[WKWebView _setMinimumLayoutSizeOverride:]):
2959 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
2960 (-[WKWebView _setInterfaceOrientationOverride:]):
2961 (-[WKWebView _setMaximumUnobscuredSizeOverride:]):
2962 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2963 (-[WKWebView _endAnimatedResize]):
2964 (-[WKWebView _resizeWhileHidingContentWithUpdates:]):
2965 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2967 2014-07-17 Brent Fulgham <bfulgham@apple.com>
2969 [Mac] Full screen video not always animating in the correct Space
2970 https://bugs.webkit.org/show_bug.cgi?id=135020
2971 <rdar://problem/17542310>
2973 Reviewed by Dean Jackson.
2975 The fullscreen window can "remember" the Space it was part of the first time you enter fullscreen
2976 mode. Subsequent fullscreen transitions will always start from this Space, even if you move
2977 the WebKit-hosted application to a different Space.
2979 We can help the display system know when we've moved to a new Space by calling NSWindow's
2980 'orderBack' method on the fullscreen window prior to starting the transition to fullscreen mode.
2981 This method call hooks the window into the current Space so everything works properly.
2983 * UIProcess/mac/WKFullScreenWindowController.mm:
2984 (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): Add the
2985 new fullscreen window to the current Space before starting transition to fullscreen.
2987 2014-07-17 Timothy Hatcher <timothy@apple.com>
2989 Make console.profile record to the Timeline.
2991 https://bugs.webkit.org/show_bug.cgi?id=134643
2993 Reviewed by Joseph Pecoraro.
2995 * WebProcess/WebPage/WebInspector.cpp:
2996 (WebKit::WebInspector::setJavaScriptProfilingEnabled):
2997 (WebKit::WebInspector::startJavaScriptProfiling):
2998 (WebKit::WebInspector::stopJavaScriptProfiling):
3000 2014-07-17 Brady Eidson <beidson@apple.com>
3002 Crash in ServicesOverlayController::~ServicesOverlayController.
3003 <rdar://problem/17622172> and https://bugs.webkit.org/show_bug.cgi?id=135022
3005 Reviewed by Tim Horton.
3007 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
3008 (WebKit::ServicesOverlayController::~ServicesOverlayController): Don’t need to uninstall the
3009 PageOverlay as it has already been destroyed by this point in WebPage::~WebPage.
3011 2014-07-17 Tim Horton <timothy_horton@apple.com>
3013 Sometimes purgeable (or empty!) tiles are shown on screen when resuming the app
3014 https://bugs.webkit.org/show_bug.cgi?id=135018
3015 <rdar://problem/17615038>
3017 Reviewed by Simon Fraser.
3019 * UIProcess/DrawingAreaProxy.h:
3020 (WebKit::DrawingAreaProxy::hideContentUntilNextUpdate):
3021 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3022 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3023 (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate):
3024 * UIProcess/mac/RemoteLayerTreeHost.h:
3025 * UIProcess/mac/RemoteLayerTreeHost.mm:
3026 (WebKit::RemoteLayerTreeHost::detachRootLayer):
3027 Add a mechanism to "hide" drawing area content until the next commit,
3028 by detaching the root layer. RemoteLayerTreeHost will automatically reattach
3029 it at the next commit.
3031 * UIProcess/WebPageProxy.cpp:
3032 (WebKit::WebPageProxy::viewStateDidChange):
3033 * UIProcess/WebPageProxy.h:
3034 Add a parameter to viewStateDidChange specifying whether dispatching the change
3035 to the Web process is deferrable or not. We will also automatically use "Immediate" if
3036 the view is coming in-window, like we did before.
3038 * UIProcess/ios/WKContentView.mm:
3039 (-[WKContentView _applicationWillEnterForeground:]):
3040 Make use of the aforementioned new mechanisms to ensure that we immediately dispatch
3041 view state changes when coming into the foreground, and will have removed the root layer
3042 if a commit didn't come in while waitForDidUpdateViewState blocks.
3044 2014-07-17 Sanghyup Lee <sh53.lee@samsung.com>
3046 [EFL][WK2] Add a "focus,notfound" signal.
3047 https://bugs.webkit.org/show_bug.cgi?id=134674
3049 Reviewed by Gyuyoung Kim.
3051 Add a "focus,notfound" signal to handover focus control to application
3052 because there are no elements of webview to focus on the given direction.
3054 Application can decide to move the focus to next widget of ewk_view or something else
3055 by using this signal.
3057 * UIProcess/API/efl/EwkViewCallbacks.h:
3058 * UIProcess/API/efl/ewk_view.h:
3059 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Added keyDown and keyUp function.
3060 (EWK2UnitTest::EWK2UnitTestBase::waitUntilDirectionChanged):
3061 (EWK2UnitTest::EWK2UnitTestBase::keyDown):
3062 (EWK2UnitTest::EWK2UnitTestBase::keyUp):
3063 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
3064 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
3065 (EWK2ViewTest::FocusNotFoundCallback):
3067 * UIProcess/efl/PageUIClientEfl.cpp: Removed unnecessary calls to evas_object_focus_set().
3068 (WebKit::PageUIClientEfl::takeFocus):
3070 2014-07-16 Brady Eidson <beidson@apple.com>
3072 Reintroduce the SPI _websiteDataURLForContainerWithURL: that was removed in r171160
3073 https://bugs.webkit.org/show_bug.cgi?id=134984
3075 Reviewed by David Kilzer.
3077 * UIProcess/API/Cocoa/WKProcessPool.mm:
3078 (+[WKProcessPool _websiteDataURLForContainerWithURL:]):
3079 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3081 2014-07-16 Alexey Proskuryakov <ap@apple.com>
3083 A test that hangs at cleanup stage confuses webkitpy hugely
3084 https://bugs.webkit.org/show_bug.cgi?id=122475
3085 <rdar://problem/17184354>
3087 Reviewed by Anders Carlsson.
3089 Reset m_pageLoadState when the process exits cleanly - otherwise messages from a
3090 new process for the same WebPageProxy would hit assertions.
3092 * UIProcess/WebPageProxy.cpp:
3093 (WebKit::WebPageProxy::processDidCrash):
3094 (WebKit::WebPageProxy::resetStateAfterProcessExited):
3096 2014-07-16 David Kilzer <ddkilzer@apple.com>
3098 [iOS] Update order file paths for WebKit and WebKit2
3099 <http://webkit.org/b/134993>
3100 <rdar://problem/17557776>
3102 Reviewed by Darin Adler.
3104 * Configurations/Base.xcconfig: Add order file for iOS
3107 2014-07-16 Brady Eidson <beidson@apple.com>
3109 Add WebSecurityOrigin "webSecurityOriginFromDatabaseIdentifier" SPI and change _websiteDataURLForContainerWithURL: SPI
3110 <rdar://problem/17454712> and https://bugs.webkit.org/show_bug.cgi?id=134984
3112 Reviewed by Dan Bernstein.
3114 Change _websiteDataURLForContainerWithURL: SPI to include an optional bundle identifier argument:
3115 * UIProcess/API/Cocoa/WKProcessPool.mm:
3116 (+[WKProcessPool _websiteDataURLForContainerWithURL:bundleIdentifierIfNotInContainer:]):
3117 (+[WKProcessPool _websiteDataURLForContainerWithURL:]): Deleted.
3118 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3120 Add a big shiny comment in a few key places:
3121 * DatabaseProcess/DatabaseProcess.cpp:
3122 (WebKit::DatabaseProcess::initializeDatabaseProcess):
3123 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
3124 (WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
3125 * UIProcess/WebContext.cpp:
3126 (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
3127 (WebKit::WebContext::ensureDatabaseProcess):
3129 2014-07-16 Enrica Casucci <enrica@apple.com>
3131 REGRESSION (iOS WebKit2): Cannot scroll while dragging a selection.
3132 https://bugs.webkit.org/show_bug.cgi?id=134992
3133 <rdar://problem/17528020>
3135 Reviewed by Benjamin Poulain.
3137 This patch exposes the scroller and the visible content rect so that
3138 UIKit can implement autoscroll when dragging the selections.
3139 It also changes that way we do hit testing to allow hit test outside
3140 the clipping region and fixes the way we compute the selection rectangle
3141 for the block selection, ensuring that we consider also non text elements
3144 * UIProcess/ios/WKContentViewInteraction.mm:
3145 (-[WKContentView scroller]):
3146 (-[WKContentView visibleRect]):
3147 * WebProcess/WebPage/ios/WebPageIOS.mm:
3148 (WebKit::selectionBoxForRange):
3149 (WebKit::WebPage::rangeForWebSelectionAtPosition):
3150 (WebKit::WebPage::rangeForBlockAtPoint):
3151 (WebKit::WebPage::expandedRangeFromHandle):
3152 (WebKit::WebPage::contractedRangeFromHandle):
3153 (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
3154 (WebKit::WebPage::changeBlockSelection):
3156 2014-07-16 Alexey Proskuryakov <ap@apple.com>
3158 <rdar://problem/17669097> REGRESSION (r170155): Sandbox violations using a wrong
3159 CFNetwork cache path in WebContent process
3161 Rubber-stamped by Sam Weinig.
3163 Before r170155, we incorrectly checked usesNetworkProcess(), which always returns
3164 false at this point in initialization sequence. But we did the right thing, as we
3165 always need to set the cache path, even when network process is used for most loading.
3167 * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):
3169 2014-07-16 Timothy Horton <timothy_horton@apple.com>
3171 Dispatch top content inset changes immediately if synchronously waiting for view state changes
3172 ​https://bugs.webkit.org/show_bug.cgi?id=134942
3173 <rdar://problem/17666800>
3175 Reviewed by Simon Fraser.
3177 * UIProcess/API/mac/WKView.mm:
3178 (-[WKView _dispatchSetTopContentInset]):
3179 (-[WKView _setTopContentInset:]):
3180 Move the check from _setTopContentInset: to _dispatchSetTopContentInset
3181 that ensures that we only send the message if the top content inset changed.
3183 2014-07-16 Benjamin Poulain <bpoulain@apple.com>
3185 [iOS][WK2] Synchronize the dynamic viewport updates with their layer tree commit
3186 https://bugs.webkit.org/show_bug.cgi?id=134965
3187 Related to <rdar://problem/17082607>
3189 Reviewed by Tim Horton.
3191 Dynamic viewport update relies on the _resizeAnimationTransformAdjustments being applied
3192 to the page at the new size during the transition.
3194 Because of the races between the LayerTree Commit and DynamicViewportSizeUpdate, the transform
3195 can be applied to the wrong set of tiles.
3196 This is mostly a problem for unresponsive WebProcess or when the synchronization is done
3199 There is at least one more case that is not handled: if synchronizeDynamicViewportUpdate()
3200 completely fails to get the new page, the UIProcess is in a somewhat messy state.
3201 I will look into that separately than the layer tree synchronization.
3203 * UIProcess/API/Cocoa/WKWebView.mm:
3204 (-[WKWebView _didCommitLayerTree:]):
3205 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
3206 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]): Deleted.
3207 * UIProcess/API/Cocoa/WKWebViewInternal.h:
3208 * UIProcess/PageClient.h:
3209 * UIProcess/WebPageProxy.cpp:
3210 (WebKit::WebPageProxy::WebPageProxy):
3211 (WebKit::WebPageProxy::resetState):
3212 * UIProcess/WebPageProxy.h:
3213 * UIProcess/ios/PageClientImplIOS.h:
3214 * UIProcess/ios/PageClientImplIOS.mm:
3215 (WebKit::PageClientImpl::dynamicViewportUpdateChangedTarget):
3216 * UIProcess/ios/WebPageProxyIOS.mm:
3217 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
3218 (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
3219 (WebKit::WebPageProxy::didCommitLayerTree):
3220 (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
3221 * WebProcess/WebPage/WebPage.cpp:
3222 (WebKit::WebPage::WebPage):
3223 (WebKit::WebPage::didCommitLoad):
3224 * WebProcess/WebPage/WebPage.h:
3225 * WebProcess/WebPage/WebPage.messages.in:
3226 * WebProcess/WebPage/ios/WebPageIOS.mm:
3227 (WebKit::WebPage::synchronizeDynamicViewportUpdate):
3228 (WebKit::WebPage::updateVisibleContentRects):
3229 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3230 (WebKit::RemoteLayerTreeDrawingArea::nextTransactionID):
3231 (WebKit::RemoteLayerTreeDrawingArea::currentTransactionID): Deleted.
3233 2014-07-16 Dan Bernstein <mitz@apple.com>
3235 REGRESSION (r170653): Web Content service’s Info.plist has wrong format
3236 https://bugs.webkit.org/show_bug.cgi?id=134973
3238 Reviewed by Alexey Proskuryakov.
3240 * WebKit2.xcodeproj/project.pbxproj: Updated the Add CFBundle Localization Info.plist Key
3241 script build phases to convert Info.plist back to binary format if the
3242 PLIST_FILE_OUTPUT_FORMAT build setting requires it.
3244 2014-07-15 Benjamin Poulain <bpoulain@apple.com>
3248 * UIProcess/API/Cocoa/WKWebView.mm:
3249 (-[WKWebView _scrollToContentOffset:]):
3250 On landing, I changed the min/max branches to shrunkTo/expandedTo, but the return value
3251 of those was ignored.
3253 2014-07-15 Dan Bernstein <mitz@apple.com>
3255 WKWebView’s FormClient::willSubmitForm should use CompletionHandlerCallChecker
3256 https://bugs.webkit.org/show_bug.cgi?id=134951
3258 Reviewed by Tim Horton.
3260 * UIProcess/API/Cocoa/WKWebView.mm:
3261 (-[WKWebView _setFormDelegate:]):
3263 2014-07-15 Benjamin Poulain <benjamin@webkit.org>
3265 [iOS][WK2] Scrolling request from the scrolling tree must be limited to offsets in the document
3266 https://bugs.webkit.org/show_bug.cgi?id=134952
3267 <rdar://problem/17647116>
3269 Reviewed by Enrica Casucci.
3271 When we received a scroll request, we were taking that offset directly to set the UIScrollView
3272 scroll position. This is a problem if a page request scrolling to an invalid position, we were
3275 This patch limits the position to be inside the document.
3277 -- Why not limit the scroll offset in the WebProcess when we receive the scroll request? --
3279 Some pages rely on the page scale factor changing instantly, because that is how it worked
3282 On WebKit2, the WebProcess cannot know the valid range because the obscured insets are changing
3283 dynamically, and the page scale factor can change in response to WebProcess events (the focus
3284 changing for example). To make the page works, the WebProcess does not restrict the scroll position.
3286 In that architecture, the UIProcess has to sanitize the input, which was not done before this patch.
3288 -- Why not use changeContentOffsetBoundedInValidRange()?
3290 The scroll offset as seen by the page is relative to the unobscured rect. While the position used
3291 for history item is a visual position. All we need in this case is a position in the view.
3293 * UIProcess/API/Cocoa/WKWebView.mm:
3294 (-[WKWebView _scrollToContentOffset:]):
3295 * UIProcess/WebPageProxy.h:
3296 * UIProcess/ios/WebPageProxyIOS.mm:
3297 (WebKit::WebPageProxy::resendLastVisibleContentRects):
3299 2014-07-15 Timothy Horton <timothy_horton@apple.com>
3301 Dispatch top content inset changes immediately if synchronously waiting for view state changes
3302 https://bugs.webkit.org/show_bug.cgi?id=134942
3303 <rdar://problem/17666800>
3305 Reviewed by Simon Fraser.
3307 * UIProcess/API/mac/WKView.mm:
3308 (-[WKView endDeferringViewInWindowChanges]):
3309 (-[WKView endDeferringViewInWindowChangesSync]):
3310 (-[WKView _dispatchSetTopContentInset]):
3311 (-[WKView _setTopContentInset:]):
3312 Send top content inset changes immediately before sync-waiting for new tiles from the Web Process.
3313 This will ensure that the incoming contents have the right top content inset, and we don't
3314 flash between the wrong inset and the right one.
3316 2014-07-15 Enrica Casucci <enrica@apple.com>
3318 REGRESSION(WK2 iOS): Safari hangs when switching focus from a field using the Tab key.
3319 https://bugs.webkit.org/show_bug.cgi?id=134934
3320 <rdar://problem/17224638>
3322 Reviewed by Tim Horton.
3324 * UIProcess/ios/WKContentViewInteraction.mm:
3326 Tab and back tab should be handled as special keys that have
3327 a command associated. The command specifies for each key the relevant
3328 action. This patch implements the commands property to create the association
3329 between key and command and the relevant actions that will execute the same
3330 code executed when the used taps on the < > buttons in the accessory bar.
3332 (-[WKContentView keyCommands]):
3333 (-[WKContentView _nextAccessoryTab:]):
3334 (-[WKContentView _prevAccessoryTab:]):
3336 2014-07-15 Oliver Hunt <oliver@apple.com>
3338 More tidying of the webcontent sandbox profile
3339 https://bugs.webkit.org/show_bug.cgi?id=134938
3341 Reviewed by Alexey Proskuryakov.
3343 Remove some excessive abilities from the profile and make
3344 the required ones explicit.
3346 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3348 2014-07-14 Andreas Kling <akling@apple.com>
3350 [iOS] Don't progressively re-render tiles while pinch-zooming under memory pressure.
3351 <https://webkit.org/b/134915>
3353 When we're under memory pressure, the last thing we want to be doing is
3354 creating gratuitous new IOSurfaces. Just wait for the gesture to end before
3355 rendering at the new scale.
3357 Reviewed by Tim Horton.
3359 * WebProcess/WebPage/ios/WebPageIOS.mm:
3360 (WebKit::WebPage::updateVisibleContentRects):
3362 2014-07-14 Joseph Pecoraro <pecoraro@apple.com>
3364 [Cocoa] _WKRemoteObjectInterface leaks NSString ivar
3365 https://bugs.webkit.org/show_bug.cgi?id=134914
3367 Reviewed by Simon Fraser.
3369 Release our copied NSString in dealloc.
3371 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
3372 (-[_WKRemoteObjectInterface dealloc]):
3374 2014-07-14 Dean Jackson <dino@apple.com>
3376 [PlugIns] Check for a non-null snapshot image before trying to decode it
3377 https://bugs.webkit.org/show_bug.cgi?id=134913
3378 <rdar://problem/17606033>
3380 Reviewed by Tim Horton.
3382 Changeset r169820 introduced a bug where we could examine the pixels of
3383 an image (looking for solid colors) before checking if the image actually
3386 I added a null check, and moved the code around a bit to avoid checking
3387 for existence three times.
3389 * WebProcess/Plugins/PluginView.cpp:
3390 (WebKit::PluginView::pluginSnapshotTimerFired): Check that snapshotImage exists
3391 before trying to look at it.
3393 2014-07-14 Anders Carlsson <andersca@apple.com>
3397 * UIProcess/Cocoa/SessionStateCoding.mm:
3398 (WebKit::encodeSessionState):
3400 2014-07-14 Anders Carlsson <andersca@apple.com>
3402 Use the legacy session coder for encoding/decoding session state
3403 https://bugs.webkit.org/show_bug.cgi?id=134910
3405 Reviewed by Beth Dakin.
3407 * UIProcess/Cocoa/SessionStateCoding.mm:
3408 (WebKit::encodeSessionState):
3409 (WebKit::decodeSessionState):
3411 2014-07-14 Oliver Hunt <oliver@apple.com>
3413 Restrict network process to remote connections
3414 https://bugs.webkit.org/show_bug.cgi?id=134908
3416 Reviewed by Geoffrey Garen.
3418 Further restrict network client
3420 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
3422 2014-07-14 Tim Horton <timothy_horton@apple.com>
3424 ASSERT(isMainThread()) under OneShotDisplayLinkHandler
3425 https://bugs.webkit.org/show_bug.cgi?id=134900
3427 Reviewed by Simon Fraser.
3429 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3430 (-[OneShotDisplayLinkHandler displayLinkFired:]):
3431 isMainThread means the Web thread sometimes.
3433 2014-07-14 Tim Horton <timothy_horton@apple.com>
3437 * UIProcess/API/Cocoa/WKWebView.mm:
3438 (-[WKWebView _frameOrBoundsChanged]):
3439 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3440 * UIProcess/API/ios/WKViewIOS.mm:
3441 (-[WKView _frameOrBoundsChanged]):
3443 2014-07-14 Carlos Alberto Lopez Perez <clopez@igalia.com>
3445 [UNIX] Log error description when failing to create shared memory file.
3446 https://bugs.webkit.org/show_bug.cgi?id=134892
3448 Reviewed by Darin Adler.
3450 * Platform/unix/SharedMemoryUnix.cpp:
3451 (WebKit::SharedMemory::create): Print the string describing the error number (errno).
3453 2014-07-14 Benjamin Poulain <benjamin@webkit.org>
3455 [iOS][WK2] On rotation, RemoteLayerTreeDrawingArea renders one extra frame at the wrong orientation
3456 https://bugs.webkit.org/show_bug.cgi?id=134875
3458 Reviewed by Tim Horton.
3460 On animated resize, the size of the DrawingAreaProxy was changed before the layout parameters were
3461 changed. This in turn caused the WebProcess's DrawingArea to flush the layer tree while still
3462 at the wrong orientation.
3464 This patch fixes the issue by making a special case for animated resize:
3465 -While starting animated resize, _frameOrBoundsChanged can be called several times in response to
3466 the API's client changing the WKWebView. In that case, we do not update the drawing area.
3467 -After the "updateBlock" is executed and the size have been changed, the dynamic viewport update
3468 is computed, the dynamicViewportSizeUpdate is sent to the WebProcess, followed by the message
3469 DrawingArea::updateGeometry(). Since both messages are asynchronous, they are received in that
3470 order, and the updateGeometry() is always done after the viewport configuration has been updated.
3472 * UIProcess/API/Cocoa/WKWebView.mm:
3473 (-[WKWebView _frameOrBoundsChanged]):
3474 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3475 * UIProcess/ios/WKContentView.h:
3476 * UIProcess/ios/WKContentView.mm:
3477 (-[WKContentView setMinimumSize:]): Deleted.
3479 2014-07-14 Benjamin Poulain <bpoulain@apple.com>
3481 [iOS][WK2] Fix withinEpsilon()
3482 https://bugs.webkit.org/show_bug.cgi?id=134798
3484 Reviewed by Darin Adler.
3486 Move the function back to WKWebView, it is no longer needed in WKContentView.
3488 Use the real types as input to properly verify that the two inputs are within
3489 a small value of the 32bit floating point.
3491 The epsilon we use is always on 32 bits float because we want to avoid doing work for changes
3492 that would not make any difference on float.
3494 The source of those small changes comes from the fact UIProcess does a lot of processing
3495 on CGFloat, which are double on 64bits architecture, while the WebProcess use 32bits floating point
3496 for scale. When we are getting updates from the WebProcess, we should ignore any small differences
3497 caused by the computations done with less precision.
3499 * UIProcess/API/Cocoa/WKWebView.mm:
3501 * UIProcess/ios/WKContentViewInteraction.h:
3502 (withinEpsilon): Deleted.
3504 2014-07-14 Bear Travis <betravis@adobe.com>
3506 [Feature Queries] Enable Feature Queries on Mac
3507 https://bugs.webkit.org/show_bug.cgi?id=134404
3509 Reviewed by Antti Koivisto.
3511 Enable Feature Queries on Mac and resume running the
3514 * Configurations/FeatureDefines.xcconfig: Turn on
3515 ENABLE_CSS3_CONDITIONAL_RULES.
3517 2014-07-14 Anders Carlsson <andersca@apple.com>
3519 Make shouldKeepCurrentBackForwardListItemInList part of WKPageLoaderClientV5 to avoid breaking ABI
3520 https://bugs.webkit.org/show_bug.cgi?id=134889
3522 Reviewed by Beth Dakin.
3524 * UIProcess/API/C/WKPage.cpp:
3525 * UIProcess/API/C/WKPageLoaderClient.h:
3527 2014-07-14 Dan Bernstein <mitz@apple.com>
3529 REGRESSION (r171045): Reproducible crash on navigation in PageClientImpl::willRecordNavigationSnapshot
3530 https://bugs.webkit.org/show_bug.cgi?id=134887
3532 Reviewed by Tim Horton.
3534 * UIProcess/mac/PageClientImpl.mm:
3535 (WebKit::PageClientImpl::navigationGestureDidBegin): nil-check m_webView. It can be nil when
3536 the client is using WKView directly.
3537 (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
3538 (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
3539 (WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.
3541 2014-07-14 Eric Carlson <eric.carlson@apple.com>
3543 [Mac] don't enable low power audio mode on external output devices
3544 https://bugs.webkit.org/show_bug.cgi?id=134877
3546 Reviewed by Sam Weinig.
3548 * PluginProcess/PluginProcess.h: Add an empty implementation of
3549 AudioHardwareListener::audioOutputDeviceChanged.
3551 2014-07-14 Tim Horton <timothy_horton@apple.com>
3553 [iOS] Throttle painting using a UI-process-side CADisplayLink
3554 https://bugs.webkit.org/show_bug.cgi?id=134879
3555 <rdar://problem/17641699>
3557 Reviewed by Simon Fraser.
3559 Just waiting for CA to commit is insufficient to actually throttle to 60fps,
3560 because nothing will block the main runloop from spinning.
3562 Instead, listen to a CADisplayLink, and send didUpdate to the WebProcess
3563 the first time it fires after we commit. This is not a guarantee that
3564 our content is on the screen, but we don't have any way to make that guarantee yet.
3566 This will throttle painting, rAF, etc. to the display refresh rate.
3568 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3569 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3570 (-[OneShotDisplayLinkHandler initWithDrawingAreaProxy:]):
3571 (-[OneShotDisplayLinkHandler dealloc]):
3572 (-[OneShotDisplayLinkHandler displayLinkFired:]):
3573 (-[OneShotDisplayLinkHandler invalidate]):
3574 (-[OneShotDisplayLinkHandler schedule]):
3575 (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
3576 (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
3577 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
3578 (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
3579 (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers): Deleted.
3581 2014-07-14 Dan Bernstein <mitz@apple.com>
3583 <rdar://problem/17657391> [iOS] Networking process writes persistent credentials to the keychain
3584 https://bugs.webkit.org/show_bug.cgi?id=134878
3586 Reviewed by Sam Weinig.
3588 Route CFNetwork’s calls to Security API through to the UI process.
3590 * NetworkProcess/ios/NetworkProcessIOS.mm:
3591 (WebKit::NetworkProcess::platformInitializeNetworkProcess): Initialize SecItemShim.
3593 * Shared/mac/SecItemShim.cpp:
3594 (WebKit::SecItemShim::initialize): On iOS, rather than using a shim library, supply
3595 CFNetwork with alternate functions to call.
3597 * Shared/mac/SecItemShim.messages.in: Removed #if !PLATFORM(IOS).
3598 * UIProcess/mac/SecItemShimProxy.messages.in: Ditto.
3600 * config.h: Define ENABLE_SEC_ITEM_SHIM to 1 on iOS as well.
3602 2014-07-14 Dan Bernstein <mitz@apple.com>
3604 <rdar://problem/17398060> NetworkProcess sometimes hangs under copyDefaultCredentialForProtectionSpace
3605 https://bugs.webkit.org/show_bug.cgi?id=134666
3607 Reviewed by Tim Horton.
3609 A SecItem may have an attribute whose value is a SecAccessControlRef, which is not supported
3610 by ArgumentCodersCF. In debug builds, trying to encode a CFDictionary containing a value of
3611 unsupprted type causes an assertion to fail, but in release builds encoding succeeds, and
3612 only decoding fails, in this case silently, simply not delivering the
3613 SecItemShim::secItemResponse message.
3615 The fix is to teach ArgumentCodersCF about SecAccessControlRef.
3617 * Shared/cf/ArgumentCodersCF.cpp:
3618 (IPC::typeFromCFTypeRef): Check for the SecAccessControlRef type.
3619 (IPC::encode): Encode the SecAccessControl serialized into CFData.
3620 (IPC::decode): Deserialize a SecAccessControl from the decoded CFData.
3621 * Shared/cf/ArgumentCodersCF.h:
3622 * config.h: Defined HAVE_SEC_ACCESS_CONTROL.
3624 2014-07-13 Dan Bernstein <mitz@apple.com>
3626 <rdar://problem/17295636> [Cocoa] Include element snapshot in _WKActivatedElementInfo
3627 https://bugs.webkit.org/show_bug.cgi?id=134872
3629 Reviewed by Sam Weinig.
3631 * Shared/InteractionInformationAtPosition.cpp:
3632 (WebKit::InteractionInformationAtPosition::encode): Encode the image if there is one.
3633 (WebKit::InteractionInformationAtPosition::decode): Decode the image if there is one.
3634 * Shared/InteractionInformationAtPosition.h: Added an image member to the struct.
3636 * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Exposed the boundingRect property and added
3638 * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
3639 (-[_WKActivatedElementInfo _initWithType:URL:location:title:rect:image:]): Added an image
3640 parameter, which is stored in a new ivar.
3641 (-[_WKActivatedElementInfo image]): Added this getter, which converts the ShareableBitmap
3642 into a cached Cocoa image and returns it.
3643 * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: Added image parameter to the
3644 initializer, removed _boundingRect property declaration from here.
3646 * UIProcess/ios/WKActionSheetAssistant.mm:
3647 (-[WKActionSheetAssistant showImageSheet]): Pass the image from the position information
3648 into the _WKActivatedElementInfo initializer.
3649 (-[WKActionSheetAssistant showLinkSheet]): Ditto.
3651 * WebProcess/WebPage/WebPage.cpp:
3652 (WebKit::WebPage::snapshotNode): Added.
3653 * WebProcess/WebPage/WebPage.h:
3655 * WebProcess/WebPage/ios/WebPageIOS.mm:
3656 (WebKit::WebPage::getPositionInformation): If the element is a link or an image, store a
3657 snapshot of it in the image member of the InteractionInformationAtPosition.
3659 2014-07-13 Dan Bernstein <mitz@apple.com>
3661 [Cocoa] Clean up session state API a little
3662 https://bugs.webkit.org/show_bug.cgi?id=134871
3664 Reviewed by Darin Adler.
3666 * UIProcess/API/Cocoa/WKWebView.mm:
3667 (-[WKWebView _sessionState]):
3668 (-[WKWebView _restoreFromSessionState:]): Deleted.
3669 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3671 2014-07-13 Javier Fernandez <jfernandez@igalia.com>
3673 REGRESSION(r171045) [GTK] Build broken.
3674 https://bugs.webkit.org/show_bug.cgi?id=134867
3676 Unreviewed GTK build fix after r171045.
3678 * UIProcess/API/gtk/PageClientImpl.cpp:
3679 (WebKit::PageClientImpl::willRecordNavigationSnapshot):
3680 * UIProcess/API/gtk/PageClientImpl.h:
3682 2014-07-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3684 Unreviewed, EFL build fix since r171045.
3686 * UIProcess/CoordinatedGraphics/WebView.h:
3688 2014-07-12 Dan Bernstein <mitz@apple.com>
3690 [Cocoa] Notify the client when a navigation snapshot is taken
3691 https://bugs.webkit.org/show_bug.cgi?id=134865
3693 Reviewed by Sam Weinig.
3695 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
3697 * UIProcess/Cocoa/NavigationState.h:
3698 * UIProcess/Cocoa/NavigationState.mm:
3699 (WebKit::NavigationState::setNavigationDelegate): Initialize new flag in
3700 m_navigationDelegateMethods.
3701 (WebKit::NavigationState::willRecordNavigationSnapshot): Added. Calls the new
3702 WKNavigationDelegate method.
3704 * UIProcess/PageClient.h: Declared new client function.
3706 * UIProcess/WebPageProxy.cpp:
3707 (WebKit::WebPageProxy::willRecordNavigationSnapshot): Added. Calls the new client function.
3708 * UIProcess/WebPageProxy.h:
3710 * UIProcess/ios/PageClientImplIOS.h:
3711 * UIProcess/ios/PageClientImplIOS.mm:
3712 (WebKit::PageClientImpl::willRecordNavigationSnapshot): Override that calls
3713 NavigationState::willRecordNavigationSnapshot.
3715 * UIProcess/mac/PageClientImpl.h:
3716 * UIProcess/mac/PageClientImpl.mm:
3717 (WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.
3719 * UIProcess/mac/ViewSnapshotStore.mm:
3720 (WebKit::ViewSnapshotStore::recordSnapshot): Added a call to
3721 WebPageProxy::willRecordNavigationSnapshot.
3723 2014-07-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3725 Unreviewed, fix EFL build break since r171034.
3727 * UIProcess/CoordinatedGraphics/WebView.h:
3728 * UIProcess/efl/WebContextEfl.cpp:
3729 (WebKit::WebContext::platformMediaCacheDirectory):
3731 2014-07-12 Darin Adler <darin@apple.com>
3733 Try to fix 32-bit Mac build.
3735 * UIProcess/mac/PageClientImpl.mm:
3736 (WebKit::PageClientImpl::navigationGestureDidBegin): Added WK_API_ENABLED conditional.
3737 (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
3738 (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
3740 2014-07-12 Javier Fernandez <jfernandez@igalia.com>
3742 REGRESSION(r171034) [GTK] Build broken.
3743 https://bugs.webkit.org/show_bug.cgi?id=134861
3745 Unreviewed GTK build fix.
3747 * UIProcess/API/gtk/PageClientImpl.cpp:
3748 (WebKit::PageClientImpl::navigationGestureDidBegin):
3749 (WebKit::PageClientImpl::navigationGestureWillEnd):
3750 (WebKit::PageClientImpl::navigationGestureDidEnd):
3751 * UIProcess/API/gtk/PageClientImpl.h:
3753 2014-07-12 Javier Fernandez <jfernandez@igalia.com>
3755 REGRESSION(r171024) [GTK] Build broken.
3756 https://bugs.webkit.org/show_bug.cgi?id=134859
3758 Unreviewed GTK build fix.
3760 * UIProcess/gtk/WebContextGtk.cpp:
3761 (WebKit::WebContext::platformMediaCacheDirectory):
3763 2014-07-12 Dan Bernstein <mitz@apple.com>
3765 <rdar://problem/16020380> [Cocoa] Inform the client when back-forward navigation gestures begin and end
3766 https://bugs.webkit.org/show_bug.cgi?id=134853
3768 Reviewed by Sam Weinig.
3770 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new WKNavigationDelegate
3773 * UIProcess/API/Cocoa/WKWebView.mm:
3774 (-[WKWebView _isShowingNavigationGestureSnapshot]): Added this getter.
3776 * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new property
3777 _isShowingNavigationGestureSnapshot.
3779 * UIProcess/Cocoa/NavigationState.h:
3780 * UIProcess/Cocoa/NavigationState.mm:
3781 (WebKit::NavigationState::setNavigationDelegate): Initialize new flags in
3782 m_navigationDelegateMethods.
3783 (WebKit::NavigationState::navigationGestureDidBegin): Added. Calls the new
3784 WKNavigationDelegate method.
3785 (WebKit::NavigationState::navigationGestureWillEnd): Ditto.
3786 (WebKit::NavigationState::navigationGestureDidEnd): Ditto.
3788 * UIProcess/PageClient.h: Declared new client functions.
3790 * UIProcess/WebPageProxy.cpp:
3791 (WebKit::WebPageProxy::WebPageProxy): Initialize new member variable.
3792 (WebKit::WebPageProxy::navigationGestureDidBegin): Set m_isShowingNavigationGestureSnapshot
3793 and call the new client function.
3794 (WebKit::WebPageProxy::navigationGestureWillEnd): Call the new client function.
3795 (WebKit::WebPageProxy::navigationGestureDidEnd): Ditto.
3796 (WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved): Clear
3797 m_isShowingNavigationGestureSnapshot.
3798 * UIProcess/WebPageProxy.h:
3799 (WebKit::WebPageProxy::isShowingNavigationGestureSnapshot): Added this getter.
3801 * UIProcess/ios/PageClientImplIOS.h: Declared overrides of new client functions.
3802 * UIProcess/ios/PageClientImplIOS.mm:
3803 (WebKit::PageClientImpl::navigationGestureDidBegin): Override that calls the new
3804 NavigationState function.
3805 (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
3806 (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
3808 * UIProcess/ios/ViewGestureControllerIOS.mm:
3809 (WebKit::ViewGestureController::beginSwipeGesture): Added calls to
3810 WebPageProxy::navigationGestureDidBegin and WebPageProxy::navigationGestureWillEnd.
3811 (WebKit::ViewGestureController::endSwipeGesture): Added calls to
3812 WebPageProxy::navigationGestureDidEnd.
3813 (WebKit::ViewGestureController::removeSwipeSnapshot): Added call to
3814 WebPageProxy::navigationGestureSnapshotWasRemoved.
3816 * UIProcess/mac/PageClientImpl.h: Declared overrides of new client functions.
3817 * UIProcess/mac/PageClientImpl.mm:
3818 (WebKit::PageClientImpl::navigationGestureDidBegin): Override that calls the new
3819 NavigationState function.
3820 (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
3821 (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
3823 * UIProcess/mac/ViewGestureControllerMac.mm:
3824 (WebKit::ViewGestureController::beginSwipeGesture): Added call to
3825 WebPageProxy::navigationGestureDidBegin.
3826 (WebKit::ViewGestureController::endSwipeGesture): Added calls to
3827 WebPageProxy::navigationGestureDidEnd.
3828 (WebKit::ViewGestureController::removeSwipeSnapshot): Added call to
3829 WebPageProxy::navigationGestureSnapshotWasRemoved.
3831 2014-07-12 Oliver Hunt <oliver@apple.com>
3833 Fix typo in prior patch
3834 https://bugs.webkit.org/show_bug.cgi?id=134858
3836 Reviewed by Sam Weinig.
3840 * UIProcess/mac/WebContextMac.mm:
3841 (WebKit::WebContext::platformDefaultCookieStorageDirectory):
3843 2014-07-12 Dan Bernstein <mitz@apple.com>
3845 [Cocoa] Client is not notified of same-document navigations
3846 https://bugs.webkit.org/show_bug.cgi?id=134855
3848 Reviewed by Sam Weinig.
3850 * UIProcess/API/APILoaderClient.h:
3851 (API::LoaderClient::didSameDocumentNavigationForFrame): Added navigationID parameter.
3853 * UIProcess/API/C/WKPage.cpp:
3854 (WKPageSetPageLoaderClient): Ditto.
3856 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Added new enum and delegate method.
3858 * UIProcess/Cocoa/NavigationState.h: Declare override of
3859 API::LoaderClient::didSameDocumentNavigationForFrame. Added flag in
3860 m_navigationDelegateMethods struct.
3861 * UIProcess/Cocoa/NavigationState.mm:
3862 (WebKit::NavigationState::setNavigationDelegate): Initialize new m_navigationDelegateMethods
3864 (WebKit::toWKSameDocumentNavigationType): Added this helper to convert from internal to API
3866 (WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame): Override to call
3867 the delegate method, if implemented.
3869 * UIProcess/WebPageProxy.cpp:
3870 (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Added navigationID parameter,
3871 which is forwarded to the client.
3872 * UIProcess/WebPageProxy.h: Added navigationID parameter.
3873 * UIProcess/WebPageProxy.messages.in: Ditto.
3875 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3876 (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): Send the navigation ID.
3877 (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage): Ditto.
3878 (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage): Ditto.
3879 (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage): Ditto.
3881 2014-07-12 Oliver Hunt <oliver@apple.com>
3883 Extend WebContent sandbox to allow some extra access for frameworks
3884 https://bugs.webkit.org/show_bug.cgi?id=134844
3886 Reviewed by Sam Weinig.
3888 Open up the webcontent sandbox a bit so that some external frameworks
3891 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3892 * Shared/WebProcessCreationParameters.cpp:
3893 (WebKit::WebProcessCreationParameters::encode):
3894 (WebKit::WebProcessCreationParameters::decode):
3895 * Shared/WebProcessCreationParameters.h:
3896 * UIProcess/WebContext.cpp:
3897 (WebKit::WebContext::createNewWebProcess):
3898 (WebKit::WebContext::mediaCacheDirectory):
3899 * UIProcess/WebContext.h:
3900 * UIProcess/mac/WebContextMac.mm:
3901 (WebKit::WebContext::platformMediaCacheDirectory):
3902 * WebProcess/cocoa/WebProcessCocoa.mm:
3903 (WebKit::WebProcess::platformInitializeWebProcess):
3905 2014-07-12 Oliver Hunt <oliver@apple.com>
3907 Temporary work around for <rdar://<rdar://problem/17513375>
3908 https://bugs.webkit.org/show_bug.cgi?id=134848
3910 Reviewed by Sam Weinig.
3912 Temporarily work around <rdar://<rdar://problem/17513375> by
3913 dropping the explicit cookie storage if it points out of the
3916 * UIProcess/mac/WebContextMac.mm:
3917 (WebKit::WebContext::platformDefaultCookieStorageDirectory):
3919 2014-07-11 Enrica Casucci <enrica@apple.com>
3921 Implement textStylingAtPosition in WK2.
3922 https://bugs.webkit.org/show_bug.cgi?id=134843
3923 <rdar://problem/17614981>
3925 Reviewed by Benjamin Poulain.
3927 Adding information about typing attributes to EditorState so
3928 that we can implement textStylingAtPosition.
3930 * Shared/EditorState.cpp:
3931 (WebKit::EditorState::encode):
3932 (WebKit::EditorState::decode):
3933 * Shared/EditorState.h:
3934 (WebKit::EditorState::EditorState):
3935 * UIProcess/ios/WKContentViewInteraction.mm:
3936 (-[WKContentView textStylingAtPosition:inDirection:]):
3937 (-[WKContentView canPerformAction:withSender:]):
3938 (-[WKContentView toggleBoldface:]):
3939 (-[WKContentView toggleItalics:]):
3940 (-[WKContentView toggleUnderline:]):
3941 * WebProcess/WebPage/WebPage.cpp:
3942 (WebKit::WebPage::editorState):
3944 2014-07-11 Oliver Hunt <oliver@apple.com>
3946 Tighten WebContent sandbox
3947 https://bugs.webkit.org/show_bug.cgi?id=134834
3949 Reviewed by Sam Weinig.
3951 Define a much tighter sandbox profile for the WebContent process
3953 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3955 2014-07-11 Antti Koivisto <antti@apple.com>
3957 REGRESSION (r170163?): Web content shifts revealing space equivalent to the find bar when clicking a link while a phrase is targeted via Cmd+F
3958 https://bugs.webkit.org/show_bug.cgi?id=134833
3959 <rdar://problem/17580021>
3961 Reviewed by Zalan Bujtas.
3963 Some versions of OS X Safari can't handle the new unfreeze timing. Revert back to DidFirstLayout on Mac.
3965 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3966 (WebKit::WebFrameLoaderClient::dispatchDidLayout):
3968 2014-07-11 Zalan Bujtas <zalan@apple.com>
3970 Subpixel layout: return integral results for offset*, client*, scroll* by default.
3971 https://bugs.webkit.org/show_bug.cgi?id=134651
3973 Reviewed by Simon Fraser.
3975 Revert to returning integral values for Element.offset* client* scroll* by default.
3976 Fractional values break number of sites(tight design) and JS frameworks(fail to handle fractional values).
3978 Since snapped dimension depends on both the original point and the width/height of the box,
3979 we need to call RenderBoxModelObject::pixelSnapped*() helpers, instead of round().
3981 Covered by existing tests
3983 * Shared/WebPreferencesDefinitions.h:
3984 * UIProcess/API/C/WKPreferencesRefPrivate.h:
3986 2014-07-10 Jinwoo Song <jinwoo7.song@samsung.com>
3988 Unreviewed EFL build fix after r170970.
3990 * UIProcess/efl/WebContextEfl.cpp:
3991 (WebKit::WebContext::platformDefaultOpenGLCacheDirectory):
3993 2014-07-10 Carlos Alberto Lopez Perez <clopez@igalia.com>
3995 REGRESSION(r170970) REGRESSION(r170974): [GTK] Build broken.
3996 https://bugs.webkit.org/show_bug.cgi?id=134825
3998 Unreviewed GTK build fix.
4000 * Shared/SessionState.h: Put ifdefs for ViewSnapshot on Mac port.
4001 * Shared/WebBackForwardListItem.h: Idem.
4002 * UIProcess/gtk/WebContextGtk.cpp:
4003 (WebKit::WebContext::platformDefaultOpenGLCacheDirectory): Implement skeleton.
4005 2014-07-10 Benjamin Poulain <bpoulain@apple.com>
4007 [iOS][WK2] It should be safe to call WKContentViewInteraction's cleanupInteraction multiple times
4008 https://bugs.webkit.org/show_bug.cgi?id=134820
4010 Reviewed by Andreas Kling.
4012 If a view is destroyed just after a crash, "cleanupInteraction" is called twice: once on crash,
4015 The code handling _interactionViewsContainerView is using KVO to monitor transform changes. It is not safe
4016 to remove the observer if we are not already observing on that view.
4018 To solve the problem, this patch makes the cleanup actually remove the view so that setup and cleanup
4019 are completely symmetrical. If cleanup is called twice, the second time would not enter the branch because
4020 the view is already nil.
4022 * UIProcess/ios/WKContentViewInteraction.mm:
4023 (-[WKContentView setupInteraction]):
4024 (-[WKContentView cleanupInteraction]):
4026 2014-07-10 Simon Fraser <simon.fraser@apple.com>
4028 [iOS WK2] Move WKInspectorHighlightView to its own file
4029 https://bugs.webkit.org/show_bug.cgi?id=134819
4031 Reviewed by Joseph Pecoraro.
4033 WKInspectorHighlightView brought a lot of path/quad-related code into WKContentView.mm,
4034 so move it into its own file.
4036 * UIProcess/WKInspectorHighlightView.h: Added.
4037 * UIProcess/WKInspectorHighlightView.mm: Added.
4038 (-[WKInspectorHighlightView dealloc]):
4039 (-[WKInspectorHighlightView _removeAllLayers]):
4040 (-[WKInspectorHighlightView _createLayers:]):
4041 (findIntersectionOnLineBetweenPoints):
4043 (layerPathWithHole):
4045 (-[WKInspectorHighlightView _layoutForNodeHighlight:]):