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