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