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