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