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