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