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