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