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