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