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