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