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