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