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