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