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