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