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