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