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