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