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