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