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