Occasional thread-safety-related crashes on the ServicesController queue
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-08-28  Tim Horton  <timothy_horton@apple.com>
2
3         Occasional thread-safety-related crashes on the ServicesController queue
4         https://bugs.webkit.org/show_bug.cgi?id=136356
5         <rdar://problem/18045685>
6
7         Reviewed by Dan Bernstein.
8
9         * UIProcess/mac/ServicesController.mm:
10         (WebKit::hasCompatibleServicesForItems):
11         Added. Check directly with NSSharingService if we have any services for the given items.
12         We should eventually check Viewer and Editor services separately so the Web process can
13         be smarter about when it shows the overlay, but for now this maintains the existing behavior.
14
15         (WebKit::ServicesController::refreshExistingServices):
16         Make use of hasCompatibleServicesForItems instead of having NSSharingServicePicker construct NSMenus.
17
18 2014-08-28  Tim Horton  <timothy_horton@apple.com>
19
20         WebKit2 doesn't support viewer services that accept image attachments
21         https://bugs.webkit.org/show_bug.cgi?id=136349
22         <rdar://problem/18164606>
23
24         Reviewed by Brady Eidson.
25
26         * Shared/WebProcessCreationParameters.cpp:
27         (WebKit::WebProcessCreationParameters::encode):
28         (WebKit::WebProcessCreationParameters::decode):
29         Encode the already-existing parameter.
30
31 2014-08-28  Zalan Bujtas  <zalan@apple.com>
32
33         Subpixel layout: Remove unused pixel snapping functions.
34         https://bugs.webkit.org/show_bug.cgi?id=136341
35
36         Reviewed by Simon Fraser.
37
38         Let's not encourage integral snapping by having these functions around.
39         
40         No change in functionality.
41
42         * Shared/WebRenderObject.cpp:
43         (WebKit::WebRenderObject::WebRenderObject):
44
45 2014-08-27  Enrica Casucci  <enrica@apple.com>
46
47         textStylingAtPosition returns incorrect values after executing toggleBold, toggleItalic and toggleUnderline.
48         https://bugs.webkit.org/show_bug.cgi?id=136323
49         rdar://problem/18141964
50
51         Reviewed by Antti Koivisto.
52
53         For underline style we need to check typingStyle first and use that information to populate
54         the dictionary. If there is no typing style we can use the render style.
55         We also need to update the editor state for the toggle commands to reflect the state in the UIProcess
56         even for commands that don't change the selection.
57
58         * WebProcess/WebPage/WebPage.cpp:
59         (WebKit::WebPage::editorState):
60         * WebProcess/WebPage/ios/WebPageIOS.mm:
61         (WebKit::WebPage::executeEditCommandWithCallback):
62
63 2014-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
64
65         [GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API
66         https://bugs.webkit.org/show_bug.cgi?id=136248
67
68         Reviewed by Gustavo Noronha Silva.
69
70         Add webkit_uri_response_get_http_headers() that returns the HTTP
71         headers as a SoupMessageHeaders* like webkit_uri_request_get_http_headers().
72
73         * UIProcess/API/gtk/WebKitURIResponse.cpp:
74         (webkitURIResponseGetProperty): Add http-headers property getter.
75         (webkit_uri_response_class_init): Add http-headers property.
76         (webkit_uri_response_get_http_headers): Return the HTTP headers as
77         a SoupMessageHeaders* or NULL for non HTTP responses.
78         * UIProcess/API/gtk/WebKitURIResponse.h:
79         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
80
81 2014-08-27  Zalan Bujtas  <zalan@apple.com>
82
83         Subpixel layout: Rename LayoutRect's device pixel snapping functions.
84         https://bugs.webkit.org/show_bug.cgi?id=136319
85
86         Reviewed by Simon Fraser.
87
88         From pixelSnappedForPainting() to snapRectToDevicePixels() and 
89         pixelSnappedIntRect*() to snappedIntRect*().
90
91         No change in functionality.
92
93         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
94         (WebKit::InjectedBundleNodeHandle::renderedImage):
95         * WebProcess/WebPage/WebPage.cpp:
96         (WebKit::WebPage::snapshotNode):
97         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
98         (WebKit::ServicesOverlayController::buildSelectionHighlight):
99
100 2014-08-27  Zalan Bujtas  <zalan@apple.com>
101
102         Subpixel layout: Rename FloatPoint/FloatRect device pixel snapping functions.
103         https://bugs.webkit.org/show_bug.cgi?id=136314
104
105         Reviewed by Simon Fraser.
106
107         From *edToDevicePixels() to *PointToDevicePixels() (* = floor/round/ceil)
108
109         EnclosedIntRect -> enclosingIntRect() changes functionality for InspectorOverlay painting,
110         but currently untestable.
111
112         * UIProcess/ios/WKContentViewInteraction.mm:
113         (-[WKContentView _updateTapHighlight]):
114
115 2014-08-27  Tim Horton  <timothy_horton@apple.com>
116
117         WebKit2 swipe gesture should report the position of the snapshot to the client
118         https://bugs.webkit.org/show_bug.cgi?id=136308
119         rdar://problem/18105827
120
121         Reviewed by Simon Fraser.
122
123         * UIProcess/API/Cocoa/WKViewPrivate.h:
124         * UIProcess/API/mac/WKView.mm:
125         (-[WKView _setDidMoveSwipeSnapshotCallback:]):
126         Add _setDidMoveSwipeSnapshotCallback, and plumb it to ViewGestureController.
127         Callers provide a block which is called whenever ViewGestureController moves the
128         swipe *snapshot* layer around.
129
130         * UIProcess/PageClient.h:
131         * UIProcess/WebPageProxy.h:
132         * UIProcess/mac/PageClientImpl.h:
133         * UIProcess/mac/PageClientImpl.mm:
134         (WebKit::PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates):
135         * UIProcess/mac/WebPageProxyMac.mm:
136         (WebKit::WebPageProxy::boundsOfLayerInLayerBackedWindowCoordinates):
137         Expose a Mac-only way to get the bounds of a given CALayer in window coordinates,
138         respecting transforms. This only works for layer-backed windows because
139         it uses CA in order to do the mapping respecting transforms.
140
141         * UIProcess/mac/ViewGestureController.h:
142         * UIProcess/mac/ViewGestureControllerMac.mm:
143         (WebKit::ViewGestureController::ViewGestureController):
144         (WebKit::ViewGestureController::~ViewGestureController):
145         (WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
146         Do the Block_copy and Block_release dance to keep our copy of the callback block.
147
148         (WebKit::ViewGestureController::beginSwipeGesture):
149         (WebKit::ViewGestureController::handleSwipeGesture):
150         (WebKit::ViewGestureController::didMoveSwipeSnapshotLayer):
151         When the swipe snapshot layer moves around, call the block.
152
153 2014-08-27  Tim Horton  <timothy_horton@apple.com>
154
155         Occasional crashes in commitTransientZoom's transaction completion block
156         https://bugs.webkit.org/show_bug.cgi?id=136309
157         <rdar://problem/17215064>
158
159         Reviewed by Dan Bernstein.
160
161         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
162         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
163         Hold a reference to zoomLayer and the WebPage. It's possible that either
164         of these things could have gone away by the time the transaction is committed.
165
166 2014-08-27  Benjamin Poulain  <bpoulain@apple.com>
167
168         [iOS WK2] Provide a delegate callback to skip Geolocation authorization per page for WebApp
169         https://bugs.webkit.org/show_bug.cgi?id=136243
170
171         Reviewed by Sam Weinig.
172
173         Just ask the UI if the authorization dialog needs to be skipped.
174
175         * UIProcess/API/Cocoa/WKUIDelegate.h:
176         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
177         * UIProcess/ios/PageClientImplIOS.mm:
178         (WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest):
179
180         * UIProcess/ios/WKContentView.h:
181         * UIProcess/ios/WKContentView.mm:
182         (-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]): Deleted.
183         The code in WKContentView only exists due to legacy. Instead, the PageClient dispatch the request
184         to the GeolocationProvider directly.
185
186         * UIProcess/ios/WKGeolocationProviderIOS.h:
187         * UIProcess/ios/WKGeolocationProviderIOS.mm:
188         (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:view:]):
189         (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
190         (-[WKGeolocationProviderIOS positionChanged:]):
191         (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]): Deleted.
192
193 2014-08-27  Beth Dakin  <bdakin@apple.com>
194
195         overflow:scroll elements should not latch to the body if the body is 
196         overflow:hidden
197         https://bugs.webkit.org/show_bug.cgi?id=136273
198
199         Reviewed by Darin Adler.
200
201         New ScrollabeArea virtual function.
202         * WebProcess/Plugins/PDF/PDFPlugin.h:
203
204 2014-08-26  Matt Lilek  <mrl@apple.com>
205
206         Add WebKit SPI to control the navigator.standalone property
207         https://bugs.webkit.org/show_bug.cgi?id=136189
208
209         Reviewed by Andy Estes.
210
211         Add a property to WKPreferences that allows toggling this setting.
212
213         * UIProcess/API/Cocoa/WKPreferences.mm:
214         (-[WKPreferences _isStandalone]):
215         (-[WKPreferences _setStandalone:]):
216         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
217
218 2014-08-26  Joseph Pecoraro  <pecoraro@apple.com>
219
220         FileReader cannot read files selected with <input type="file"> in iOS 8
221         https://bugs.webkit.org/show_bug.cgi?id=136117
222
223         Reviewed by Alexey Proskuryakov.
224
225         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
226         Correct an overzealous deny that was accidentally denying all
227         com.apple.app-sandbox.read extensions instead of just the ones
228         in Application bundles it was trying to deny.
229
230 2014-08-26  Tim Horton  <timothy_horton@apple.com>
231
232         Crashes in ViewGestureController::beginSwipeGesture when swiping in rapid succession
233         https://bugs.webkit.org/show_bug.cgi?id=136271
234         <rdar://problem/17923694>
235
236         Reviewed by Simon Fraser.
237
238         It was possible to get into trackSwipeGesture while another swipe was still
239         occurring, because the guard against this happening depended on m_pendingSwipeReason
240         never being set while a swipe was occurring. However, if the very first scroll event
241         had sufficient magnitude, we would still set m_pendingSwipeReason to InsufficientMagnitude,
242         and then *never clear it*, leading to a path around the guard against multiple live swipes.
243         This in turn allowed stale layers in m_liveSwipeLayers, which lead to the crash.
244
245         * UIProcess/mac/ViewGestureControllerMac.mm:
246         (WebKit::ViewGestureController::handleScrollWheelEvent):
247         Don't unset m_pendingSwipeReason before calling trackSwipeGesture;
248         trackSwipeGesture will do it itself.
249
250         Don't set m_pendingSwipeReason to InsufficientMagnitude
251         if the event actually *has* sufficient magnitude to start a swipe.
252
253         (WebKit::ViewGestureController::trackSwipeGesture):
254         Assert that we don't have an active gesture while starting a swipe.
255
256         Reset m_pendingSwipeReason, because the swipe is no longer pending!
257
258 2014-08-26  Andy Estes  <aestes@apple.com>
259
260         [Cocoa] Some projects are incorrectly installed to $BUILT_PRODUCTS_DIR
261         https://bugs.webkit.org/show_bug.cgi?id=136267
262
263         Reviewed by Dan Bernstein.
264
265         INSTALL_PATH was set to $BUILT_PRODUCTS_DIR for engineering configurations in r20225 as part of a build fix.
266         Not only is this no longer necessary to build, but it causes built products to be incorrectly installed in
267         engineering configurations.
268
269         Remove the setting of INSTALL_PATH from the pbxproj file so that the value specified in the xcconfig files is
270         used instead.
271
272         * WebKit2.xcodeproj/project.pbxproj:
273
274 2014-08-25  Maciej Stachowiak  <mjs@apple.com>
275
276         Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
277         https://bugs.webkit.org/show_bug.cgi?id=136082
278
279         Reviewed by Alexey Proskuryakov.
280
281         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
282         (WebKit::connectToService): Remove accidental leftover retrieval
283         of the localization.
284         (WebKit::createProcess): Get current localization name from
285         CFBundle API instead of using SPI.
286         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
287         (InitWebCoreSystemInterface): Remove mention of WKCopyCFLocalizationPreferredName
288         * mac/WebKit2.order: ditto
289
290 2014-08-26  Dana Burkart  <dburkart@apple.com>
291
292         The UNUSED_PARAM macros in ServicesOverlayController.mm are causing ASan build failures.
293         https://bugs.webkit.org/show_bug.cgi?id=136262
294
295         Reviewed by David Kilzer.
296
297         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
298         (WebKit::ServicesOverlayController::selectionRectsDidChange):
299         (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
300
301 2014-08-26  Csaba Osztrogonác  <ossy@webkit.org>
302
303         [EFL] URTBF after r172966.
304
305         * UIProcess/efl/WebViewEfl.h:
306
307 2014-08-26  Carlos Alberto Lopez Perez  <clopez@igalia.com>
308
309         REGRESSION(r172966) [GTK] Build broken.
310
311         Unreviewed build fix after r172966.
312
313         * UIProcess/API/gtk/PageClientImpl.cpp:
314         (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
315         * UIProcess/API/gtk/PageClientImpl.h:
316
317 2014-08-26  Simon Fraser  <simon.fraser@apple.com>
318
319         Crashes in hit testing under WebPage::determinePrimarySnapshottedPlugIn()
320         https://bugs.webkit.org/show_bug.cgi?id=136240
321         rdar://problem/17231462
322
323         Reviewed by Darin Adler.
324         
325         determinePrimarySnapshottedPlugIn() does render tree hit testing, so needs
326         to ensure that layout is up-to-date.
327
328         * WebProcess/WebPage/WebPage.cpp:
329         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
330
331 2014-08-26  Tim Horton  <timothy_horton@apple.com>
332
333         REGRESSION (r172771): Amazon product page becomes unresponsive after swiping back to it
334         https://bugs.webkit.org/show_bug.cgi?id=136260
335         <rdar://problem/18107826>
336
337         Reviewed by Dan Bernstein.
338
339         Previously, when a swipe ended up performing a same-document navigation,
340         we would never get didFinishLoadForMainFrame nor didFirstVisuallyNonEmptyLayoutForMainFrame
341         nor would we even get didHitRenderTreeSizeThreshold in all cases, so we would never
342         remove the swipe snapshot. Previous implementations removed the snapshot on
343         didSameDocumentNavigation for the main frame if the navigation type was Replace or Pop,
344         so we will match that behavior.
345
346         Also, reinstate the watchdog that starts at swipe-end which would have prevented
347         this bug from forever breaking the view it was associated with.
348
349         Also, defend against removing the snapshot before the swipe has finished (before
350         we have even caused the navigation that we're watching for the effects of).
351
352         * UIProcess/API/mac/WKView.mm:
353         (-[WKView _didSameDocumentNavigationForMainFrame:]):
354         * UIProcess/API/mac/WKViewInternal.h:
355         * UIProcess/PageClient.h:
356         * UIProcess/WebPageProxy.cpp:
357         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
358         * UIProcess/ios/PageClientImplIOS.h:
359         * UIProcess/ios/PageClientImplIOS.mm:
360         (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
361         * UIProcess/mac/PageClientImpl.h:
362         * UIProcess/mac/PageClientImpl.mm:
363         (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
364         Plumb main-frame same-document navigation notification from WebPageProxy
365         to ViewGestureControllerMac via PageClient and WKView.
366
367         * UIProcess/mac/ViewGestureController.h:
368         * UIProcess/mac/ViewGestureControllerMac.mm:
369         (WebKit::ViewGestureController::ViewGestureController):
370         (WebKit::ViewGestureController::beginSwipeGesture):
371         (WebKit::ViewGestureController::endSwipeGesture):
372         Keep track of whether a swipe is currently occurring. We can't use
373         activeGestureType for this because the swipe currently remains the "active"
374         gesture until the snapshot is removed.
375
376         Reintroduce the old swipeWatchdogTimer (and rename the shorter timer that starts
377         when we get a visually non-empty layout) so that we will always remove the
378         snapshot after 5 seconds, even if we haven't committed the load.
379         This could lead to flashing back to the old content if we fail to get a single
380         byte for 5 seconds, but that is a rare case and should eventually get additional
381         special treatment (dropping the tiles until we do get content, or some such).
382
383         (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
384         If a swipe is still in progress, we haven't done our navigation and thus
385         don't care about render tree size changes.
386
387         (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
388         If a swipe is still in progress, we haven't done our navigation and thus
389         don't care about layouts.
390
391         Stop the 5 second overall watchdog if we start the 3 second after-visuallyNonEmptyLayout
392         watchdog. This means that the snapshot could stay up for a maximum of 8 seconds
393         for a very, very slow load.
394
395         (WebKit::ViewGestureController::didFinishLoadForMainFrame):
396         If a swipe is still in progress, we haven't done our navigation and thus
397         don't care about loads that complete.
398
399         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
400         Remove the swipe snapshot after painting if we do replaceState or popState.
401
402         (WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint):
403         If a swipe is still in progress, we shouldn't remove the snapshot yet.
404
405 2014-08-26  Carlos Garcia Campos  <cgarcia@igalia.com>
406
407         [GTK] Translations are not initialized in the UI process
408         https://bugs.webkit.org/show_bug.cgi?id=136249
409
410         Reviewed by Philippe Normand.
411
412         This is breaking things like webkitContextMenuActionGetForContextMenuItem()
413         for non English locales in the cases where we use the action title to guess the
414         action, because the action title we get from the web process is translated while
415         the one in the UI process is in English.
416
417         * UIProcess/API/gtk/WebKitWebContext.cpp:
418         (createDefaultWebContext): Initialize gettext right before
419         creating the default web context.
420
421 2014-08-26  Ryuan Choi  <ryuan.choi@samsung.com>
422
423         [EFL] Remove dead code in WebPageEfl.cpp
424         https://bugs.webkit.org/show_bug.cgi?id=136246
425
426         Reviewed by Gyuyoung Kim.
427
428         * WebProcess/WebPage/efl/WebPageEfl.cpp:
429         (WebKit::scroll): Deleted.
430
431 2014-08-26  Ryuan Choi  <ryuan.choi@samsung.com>
432
433         [EFL] Build break using clang
434         https://bugs.webkit.org/show_bug.cgi?id=136245
435
436         Reviewed by Gyuyoung Kim.
437
438         * PlatformEfl.cmake: defines GTEST_HAS_RTTI=0
439
440 2014-08-25  Zalan Bujtas  <zalan@apple.com>
441
442         Subpixel layout: remove roundedLayoutPoint/roundedLayoutSize functions.
443         https://bugs.webkit.org/show_bug.cgi?id=136236
444
445         Reviewed by Simon Fraser.
446
447         These functions simply call LayoutPoint/LayoutSize c'tors. They don't round the input value at all.
448
449         Non change in functionality.
450
451         * UIProcess/ios/WebPageProxyIOS.mm:
452         (WebKit::WebPageProxy::computeCustomFixedPositionRect):
453
454 2014-08-25  Antti Koivisto  <antti@apple.com>
455
456         Don't pass priority as parameter to ResourceLoadScheduler
457         https://bugs.webkit.org/show_bug.cgi?id=136232
458
459         Reviewed by Sam Weinig.
460
461         * NetworkProcess/NetworkResourceLoader.cpp:
462         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
463         * NetworkProcess/NetworkResourceLoader.h:
464         (WebKit::NetworkResourceLoader::priority): Deleted.
465         * Shared/Network/NetworkResourceLoadParameters.cpp:
466         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
467         (WebKit::NetworkResourceLoadParameters::encode):
468         (WebKit::NetworkResourceLoadParameters::decode):
469         * Shared/Network/NetworkResourceLoadParameters.h:
470         * WebProcess/Network/WebResourceLoadScheduler.cpp:
471         (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad):
472         (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad):
473         (WebKit::WebResourceLoadScheduler::scheduleLoad):
474         * WebProcess/Network/WebResourceLoadScheduler.h:
475         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
476         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
477
478 2014-08-25  Brady Eidson  <beidson@apple.com>
479
480         Don't crash when the DataDetectors framework is unavailable.
481         <rdar://problem/18106066> and https://bugs.webkit.org/show_bug.cgi?id=136234
482
483         Reviewed by Tim Horton.
484
485         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
486         (WebKit::ServicesOverlayController::buildPhoneNumberHighlights): Bail if DD.framework didn’t soft link.
487         (WebKit::ServicesOverlayController::buildSelectionHighlight): Ditto.
488
489 2014-08-25  Antti Koivisto  <antti@apple.com>
490
491         Remove load scheduling code from network process
492         https://bugs.webkit.org/show_bug.cgi?id=136199
493
494         Reviewed by Darin Adler.
495
496         Most platforms just flush resource loads directly to the networking layer by
497         making the parallel load count large. Also we always pass ResourceLoadPriorityHighest
498         to the scheduler so no actual scheduling happens. This is effectively dead code.
499
500         Keep basic support for serializing loads. This is only used for testing.
501
502         * NetworkProcess/HostRecord.cpp: Removed.
503         * NetworkProcess/HostRecord.h: Removed.
504         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
505         (WebKit::NetworkConnectionToWebProcess::servePendingRequests):
506         * NetworkProcess/NetworkProcess.cpp:
507         (WebKit::NetworkProcess::getNetworkProcessStatistics):
508         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
509         (WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler):
510         (WebKit::NetworkResourceLoadScheduler::scheduleLoader):
511         (WebKit::NetworkResourceLoadScheduler::removeLoader):
512         (WebKit::NetworkResourceLoadScheduler::loadsPendingCount):
513         (WebKit::NetworkResourceLoadScheduler::loadsActiveCount):
514         (WebKit::NetworkResourceLoadScheduler::scheduleServePendingRequests): Deleted.
515         (WebKit::NetworkResourceLoadScheduler::requestTimerFired): Deleted.
516         (WebKit::NetworkResourceLoadScheduler::hostForURL): Deleted.
517         (WebKit::NetworkResourceLoadScheduler::receivedRedirect): Deleted.
518         (WebKit::NetworkResourceLoadScheduler::servePendingRequests): Deleted.
519         (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders): Deleted.
520         (WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader): Deleted.
521         (WebKit::NetworkResourceLoadScheduler::hostsPendingCount): Deleted.
522         (WebKit::NetworkResourceLoadScheduler::hostsActiveCount): Deleted.
523         * NetworkProcess/NetworkResourceLoadScheduler.h:
524         * NetworkProcess/NetworkResourceLoader.cpp:
525         (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
526         (WebKit::NetworkResourceLoader::cleanup):
527         (WebKit::NetworkResourceLoader::continueWillSendRequest):
528         * NetworkProcess/NetworkResourceLoader.h:
529         (WebKit::NetworkResourceLoader::isLoadingMainResource):
530         (WebKit::NetworkResourceLoader::setHostRecord): Deleted.
531         (WebKit::NetworkResourceLoader::hostRecord): Deleted.
532         * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
533         (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
534         (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Deleted.
535         * NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp:
536         (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
537         (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Deleted.
538         * WebKit2.xcodeproj/project.pbxproj:
539
540 2014-08-25  Carlos Garcia Campos  <cgarcia@igalia.com>
541
542         [GTK] Older versions of WebKit should use the plugins cache in read only mode
543         https://bugs.webkit.org/show_bug.cgi?id=136215
544
545         Reviewed by Philippe Normand.
546
547         Now that WebKitGTK+ 2.4 and 2.5 are parallel installable, since
548         they use different versions of the plugins cache, apps using 2.4
549         might override the plugins cache file. We should prevent this from
550         happening by making older versions use the plugin cache, but not
551         downgrade it.
552
553         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
554         (WebKit::PluginInfoCache::PluginInfoCache):
555         (WebKit::PluginInfoCache::updatePluginInfo):
556         * UIProcess/Plugins/gtk/PluginInfoCache.h:
557
558 2014-08-25  Carlos Garcia Campos  <cgarcia@igalia.com>
559
560         [GTK] Should check if a plugin mixes GTK+ symbols earlier
561         https://bugs.webkit.org/show_bug.cgi?id=136214
562
563         Reviewed by Philippe Normand.
564
565         We are currently checking if the plugin module and the plugin
566         process mix GTK symbols after the plugin has been loaded and
567         initialized. This is too late in many cases, since plugins can use
568         GTK methods in the NP_Initialize implementation. This is causing
569         the apps using WebKitGTK+ 2.4 to freeze when the plugin process
570         scans the plugins and there's a plugin using GTK+3 installed. We
571         should move the check earlier, once the module is loaded but
572         before calling NP_Initialize.
573
574         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
575         (WebKit::moduleMixesGtkSymbols):
576         (WebKit::NetscapePluginModule::tryLoad):
577         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
578         (WebKit::NetscapePlugin::platformPostInitialize):
579
580 2014-08-25  Zan Dobersek  <zdobersek@igalia.com>
581
582         Improve virtual method declarations in LayerTreeHostGtk
583         https://bugs.webkit.org/show_bug.cgi?id=136210
584
585         Reviewed by Carlos Garcia Campos.
586
587         Mark the LayerTreeHostGtk class as final in the virtual inheritance hierarchy.
588
589         Order the public and private virtual method overrides from the LayerTreeHost
590         and GraphicsLayerClient interfaces. Explicitly mark them as overriding the
591         base class methods.
592
593         Remove the overriding notifyAnimationStarted() and notifyFlushRequired()
594         methods since they are identical to the methods in the base class.
595
596         De-virtualize flushPendingLayerChanges(). It's not inherited and is not
597         overriden by anything (and nothing can inherit from LayerTreeHostGtk from
598         now on due to the final specifier).
599
600         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
601         (WebKit::LayerTreeHostGtk::notifyAnimationStarted): Deleted.
602         (WebKit::LayerTreeHostGtk::notifyFlushRequired): Deleted.
603         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
604         (WebKit::LayerTreeHostGtk::didCommitChangesForLayer): Deleted.
605
606 2014-08-24  Brian J. Burg  <burg@cs.washington.edu>
607
608         Remove unused method declarations replaced by WebPage::setViewState
609         https://bugs.webkit.org/show_bug.cgi?id=136180
610
611         Reviewed by Darin Adler.
612
613         * WebProcess/WebPage/WebPage.h:
614         Remove setFocused, setActive, setViewIsVisible. No longer used.
615
616 2014-08-23  Byungseon Shin  <sun.shin@lge.com>
617  
618         Unify GraphicsLayer::setContentsToMedia and setContentsToCanvas
619         https://bugs.webkit.org/show_bug.cgi?id=109658
620  
621         Reviewed by Martin Robinson.
622  
623         Based on patch originally written by Tim Horton.
624         Merge setContentsToMedia and setContentsToCanvas into setContentsToPlatformLayer.
625  
626         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
627         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
628         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
629         Rename canvas -> platformLayer.
630
631 2014-08-22  Commit Queue  <commit-queue@webkit.org>
632
633         Unreviewed, rolling out r172866.
634         https://bugs.webkit.org/show_bug.cgi?id=136177
635
636         Broke iOS build (Requested by othermaciej on #webkit).
637
638         Reverted changeset:
639
640         "Replace use of WKCopyCFLocalizationPreferredName with
641         NSLocale public API"
642         https://bugs.webkit.org/show_bug.cgi?id=136082
643         http://trac.webkit.org/changeset/172866
644
645 2014-08-19  Maciej Stachowiak  <mjs@apple.com>
646
647         Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
648         https://bugs.webkit.org/show_bug.cgi?id=136082
649
650         Reviewed by Alexey Proskuryakov.
651
652         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
653         (WebKit::connectToService): Remove accidental leftover retrieval
654         of the localization.
655         (WebKit::createProcess): Get current localization name from
656         CFBundle API instead of using SPI.
657         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
658         (InitWebCoreSystemInterface): Remove mention of WKCopyCFLocalizationPreferredName
659         * mac/WebKit2.order: ditto
660
661 2014-08-22  Daniel Bates  <dabates@apple.com>
662
663         [iOS] Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, and temporarily disable ENABLE_TOUCH_EVENTS
664         and ENABLE_XSLT when building with the iOS public SDK
665         https://bugs.webkit.org/show_bug.cgi?id=135945
666
667         Reviewed by Andy Estes.
668
669         * Configurations/FeatureDefines.xcconfig: Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, ENABLE_TOUCH_EVENTS
670         and ENABLE_XSLT when building with the public SDK.
671         * Shared/WebEventConversion.h: Write preprocessor logic in terms of ENABLE(IOS_TOUCH_EVENTS).
672         * WebProcess/WebPage/WebPage.h: Ditto.
673
674 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
675
676         Implement paint flashing via GraphicsLayers in the WK2 inspector overlay
677         https://bugs.webkit.org/show_bug.cgi?id=136136
678
679         Reviewed by Sam Weinig, Joseph Pecoraro.
680         
681         Allow InspectorClient to have a custom implementation of showPaintRect(). For
682         WebKit2's WebInspectorClient, implement this by creating a set of GraphicsLayers
683         which are parented in a document overlay, with 0.25s fade-out animations.
684         
685         Also change InspectorInstrumentation::didPaintImpl() to no longer take a GraphicsContext;
686         it makes no sense to paint the paint rects directly into the context of the web page.
687         Now that the paint rects are painted into an overlay, the rectangles need to be converted
688         to root document coordinates, which is done in InspectorInstrumentation::didPaintImpl().
689         
690         Remove the generic InspectorOverlay::drawOutline()-based indicators; they will
691         be reimplemented in a later patch.
692
693         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
694         (WebKit::RepaintIndicatorLayerClient::RepaintIndicatorLayerClient):
695         (WebKit::RepaintIndicatorLayerClient::~RepaintIndicatorLayerClient):
696         (WebKit::RepaintIndicatorLayerClient::notifyAnimationEnded):
697         (WebKit::WebInspectorClient::WebInspectorClient):
698         (WebKit::WebInspectorClient::~WebInspectorClient):
699         (WebKit::WebInspectorClient::showPaintRect):
700         (WebKit::WebInspectorClient::animationEndedForLayer):
701         * WebProcess/WebCoreSupport/WebInspectorClient.h:
702         (WebKit::WebInspectorClient::WebInspectorClient): Deleted.
703
704 2014-08-22  Jon Lee  <jonlee@apple.com>
705
706         Fix iOS build due to r172832 and move RUBBER_BANDING out of FeatureDefines.h
707         https://bugs.webkit.org/show_bug.cgi?id=136157
708
709         Reviewed by Simon Fraser.
710
711         * Configurations/FeatureDefines.xcconfig: Add ENABLE(RUBBER_BANDING).
712
713 2014-08-21  Joseph Pecoraro  <pecoraro@apple.com>
714
715         Possible RetainPtr misuse in WKScriptMessage.mm - could leak
716         https://bugs.webkit.org/show_bug.cgi?id=136140
717
718         Reviewed by Darin Adler.
719
720         Adopt a copy into a RetainPtr to avoid leaking.
721
722         * UIProcess/API/Cocoa/WKScriptMessage.mm:
723         (-[WKScriptMessage _initWithBody:webView:frameInfo:name:]):
724
725 2014-08-21  Simon Fraser  <simon.fraser@apple.com>
726
727         Add animationDidEnd callbacks on GraphicsLayer
728         https://bugs.webkit.org/show_bug.cgi?id=136084
729
730         Reviewed by Tim Horton.
731
732         Hook up GraphicsLayerClient::notifyAnimationEnded() so that code using GraphicsLayers directly
733         can add animations, and know when they finish.
734
735         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
736         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
737         (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd):
738         * UIProcess/mac/RemoteLayerTreeHost.h:
739         * UIProcess/mac/RemoteLayerTreeHost.mm:
740         (WebKit::RemoteLayerTreeHost::animationDidEnd):
741         * WebProcess/WebPage/DrawingArea.h:
742         (WebKit::DrawingArea::acceleratedAnimationDidEnd):
743         * WebProcess/WebPage/DrawingArea.messages.in:
744         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
745         (-[WKAnimationDelegate animationDidStop:finished:]):
746         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
747         (WebKit::PlatformCALayerRemote::animationStarted):
748         (WebKit::PlatformCALayerRemote::animationEnded):
749         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
750         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
751         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
752         (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
753         (WebKit::RemoteLayerTreeContext::willStartAnimationOnLayer):
754         (WebKit::RemoteLayerTreeContext::animationDidStart):
755         (WebKit::RemoteLayerTreeContext::animationDidEnd):
756         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
757         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
758         (WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidEnd):
759
760 2014-08-21  Zalan Bujtas  <zalan@apple.com>
761
762         Enable SATURATED_LAYOUT_ARITHMETIC.
763         https://bugs.webkit.org/show_bug.cgi?id=136106
764
765         Reviewed by Simon Fraser.
766
767         SATURATED_LAYOUT_ARITHMETIC protects LayoutUnit against arithmetic overflow.
768         (No measurable performance regression on Mac.)
769
770         * Configurations/FeatureDefines.xcconfig:
771
772 2014-08-21  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
773
774         [GTK] WebkitWebProcess crashing navigating away from ogg video element
775         https://bugs.webkit.org/show_bug.cgi?id=135348
776
777         Reviewed by Philippe Normand.
778
779         When a page is cached, by default doesn't recreate the backing store
780         (an optimization added in r89316).
781
782         Not all the ports uses that optimization. For example IOS port doesn't
783         use it (r161185).
784
785         In the case of the GTK port, the MediaPlayerPrivateGStreamer, not only
786         processes video buffers, also display them, because it is a
787         TextureMapperPlatformLayer too.
788
789         Nevertheless, in r153937, when a page is cached, the player is
790         destroyed. But our player has a backing store and the render tree
791         doesn't know that the player has gone. Hence, when the page is redraw,
792         the TextureMapper tree visits the video element, which doesn't exist
793         anymore, a segmentation fault occurs.
794
795         So, as our media player renders, and as we cannot trust that the
796         player exists when a page is painted, we cannot rely in the r89316
797         optimization.
798
799         Disabling the backing stores optimization fixes the problem.
800
801         Covered by existing tests.
802
803         * WebProcess/soup/WebProcessSoup.cpp:
804         (WebKit::WebProcess::platformSetCacheModel): Enable the backing store
805         clearing when page caching for GTK.
806
807 2014-08-20  Alex Christensen  <achristensen@webkit.org>
808
809         Introducing WEBCORE_EXPORT macro.
810         https://bugs.webkit.org/show_bug.cgi?id=136108
811
812         Reviewed by Antti Koivisto.
813
814         * config.h:
815         Added stub definition of WEBCORE_EXPORT defined to nothing to be able to compile with WebCore headers.
816
817 2014-08-20  Pratik Solanki  <psolanki@apple.com>
818
819         Move DiskCacheMonitor to WebCore so that WebKit1 clients can use it as well
820         https://bugs.webkit.org/show_bug.cgi?id=135896
821
822         Reviewed by Andreas Kling.
823
824         * NetworkProcess/mac/NetworkDiskCacheMonitor.h:
825             Inherit from WebCore::DiskCacheMonitor which has the bulk of the functionality now.
826         (WebKit::NetworkDiskCacheMonitor::~NetworkDiskCacheMonitor):
827         * NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
828         (WebKit::NetworkDiskCacheMonitor::monitorFileBackingStoreCreation):
829         (WebKit::NetworkDiskCacheMonitor::NetworkDiskCacheMonitor):
830         (WebKit::NetworkDiskCacheMonitor::resourceBecameFileBacked):
831             Override virtual method and send the data to the WebContent process as before.
832
833 2014-08-19  Pratik Solanki  <psolanki@apple.com>
834
835         Remove PurgeableBuffer since it is not very useful any more
836         https://bugs.webkit.org/show_bug.cgi?id=135939
837
838         Reviewed by Andreas Kling.
839
840         * WebProcess/WebProcess.cpp:
841         (WebKit::getWebCoreMemoryCacheStatistics):
842
843 2014-08-19  Peyton Randolph  <prandolph@apple.com>
844
845         Expose injected bundle SPI to get a node's URL element, get the visible selection range of that
846         element, and snapshot that range
847         https://bugs.webkit.org/show_bug.cgi?id=136076
848
849         Reviewed by Tim Horton.
850
851         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
852         (WKBundleHitTestResultCopyURLElementHandle): Added.
853         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
854         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
855         (WKBundleNodeHandleCopyVisibleRange): Added.
856         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
857         * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:
858         (WKBundleRangeHandleGetBoundingRectInWindowCoordinates): Added.
859         (WKBundleRangeHandleCopySnapshotWithOptions): Added.
860         * WebProcess/InjectedBundle/API/c/WKBundleRangeHandlePrivate.h:
861         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
862         (WebKit::InjectedBundleNodeHandle::visibleRange): Added.
863         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
864         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
865         (WebKit::InjectedBundleRangeHandle::boundingRectInWindowCoordinates): Added.
866         (WebKit::InjectedBundleRangeHandle::renderedImage): Added.
867         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
868         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
869         (WebKit::InjectedBundleHitTestResult::urlElementHandle): Added.
870         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
871
872 2014-08-19  Zalan Bujtas  <zalan@apple.com>
873
874         Remove ENABLE(SUBPIXEL_LAYOUT).
875         https://bugs.webkit.org/show_bug.cgi?id=136077
876
877         Reviewed by Simon Fraser.
878
879         Remove compile time flag SUBPIXEL_LAYOUT. All ports have it enabled for a while now.
880
881         * Configurations/FeatureDefines.xcconfig:
882
883 2014-08-19  Peyton Randolph  <prandolph@apple.com>
884
885         Extend injected bundle node snapshotting to support forced white and black text
886         https://bugs.webkit.org/show_bug.cgi?id=136061
887
888         Reviewed by Beth Dakin.
889
890         * Shared/API/c/WKImage.h:
891         Add -ForceBlackText and -ForceWhiteText snapshotting options.
892         * Shared/API/c/WKSharedAPICast.h:
893         (WebKit::toSnapshotOptions):
894         Support aforementioned text snapshotting options.
895         * Shared/ImageOptions.h:
896         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
897         (WebKit::imageForRect):
898         Respect text color snapshotting options by setting appropriate paint behaviors.
899
900 2014-08-18  Maciej Stachowiak  <mjs@apple.com>
901
902         Use NSURLFileTypeMappings directly instead of depending on WebKitSystemInterface wrappers for it
903         https://bugs.webkit.org/show_bug.cgi?id=136035
904
905         Reviewed by Dan Bernstein.
906
907         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
908         (InitWebCoreSystemInterface): Don't initialize the no-longer-used WKGetExtensionsForMIMEType,
909         WKGetPreferredExtensionForMIMEType, or WKGetMIMETypeForExtension
910         * mac/WebKit2.order: Remove exports related to above.
911
912 2014-08-18  Commit Queue  <commit-queue@webkit.org>
913
914         Unreviewed, rolling out r172736.
915         https://bugs.webkit.org/show_bug.cgi?id=136060
916
917         Caused 14% PLT regressions (Requested by rniwa on #webkit).
918
919         Reverted changeset:
920
921         "Remove PurgeableBuffer since it is not very useful any more"
922         https://bugs.webkit.org/show_bug.cgi?id=135939
923         http://trac.webkit.org/changeset/172736
924
925 2014-08-18  Simon Fraser  <simon.fraser@apple.com>
926
927         Provide default implementations of all GraphicsLayerClient methods
928         https://bugs.webkit.org/show_bug.cgi?id=136054
929
930         Reviewed by Tim Horton.
931         
932         Remove overrides which are no longer required.
933
934         * WebProcess/WebPage/PageOverlayController.h:
935         * WebProcess/WebPage/ServicesOverlayController.h:
936         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
937
938 2014-08-18  Pratik Solanki  <psolanki@apple.com>
939
940         Remove PurgeableBuffer since it is not very useful any more
941         https://bugs.webkit.org/show_bug.cgi?id=135939
942
943         Reviewed by Geoffrey Garen.
944
945         * WebProcess/WebProcess.cpp:
946         (WebKit::getWebCoreMemoryCacheStatistics):
947
948 2014-08-18  Peyton Randolph  <prandolph@apple.com>
949
950         Expose long mouse press WebKit API. Part of 135257 - Add long mouse press gesture
951         https://bugs.webkit.org/show_bug.cgi?id=136048
952
953         Reviewed by Dan Bernstein.
954
955         This patch exposes long mouse press API callbacks in both the injected bundle and on the UI process
956         through their respective page UI clients. The callbacks are modeled off of the mouseDidMoveOverElement
957         callback. Like the mouseDidMoveOverElement callback, these callbacks allow the bundle to pass 
958         information to the UI process via a userData out parameter.
959
960         * UIProcess/API/APIUIClient.h:
961         (API::UIClient::didBeginTrackingPotentialLongMousePress): Added.
962         (API::UIClient::didRecognizeLongMousePress): Added.
963         (API::UIClient::didCancelTrackingPotentialLongMousePress): Added.
964         * UIProcess/API/C/WKPage.cpp:
965         (WKPageSetPageUIClient):
966         * UIProcess/API/C/WKPageUIClient.h:
967         * UIProcess/WebPageProxy.cpp:
968         (WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress): Added.
969         (WebKit::WebPageProxy::didRecognizeLongMousePress): Added.
970         (WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress): Added.
971         * UIProcess/WebPageProxy.h:
972         * UIProcess/WebPageProxy.messages.in:
973         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
974         (API::InjectedBundle::PageUIClient::didBeginTrackingPotentialLongMousePress): Added.
975         (API::InjectedBundle::PageUIClient::didRecognizeLongMousePress): Added.
976         (API::InjectedBundle::PageUIClient::didCancelTrackingPotentialLongMousePress): Added.
977         * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
978         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Added.
979         (WebKit::InjectedBundlePageUIClient::didBeginTrackingPotentialLongMousePress): Added.
980         (WebKit::InjectedBundlePageUIClient::didRecognizeLongMousePress): Added.
981         (WebKit::InjectedBundlePageUIClient::didCancelTrackingPotentialLongMousePress): Added.
982         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
983         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
984         (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress): Added.
985         (WebKit::WebChromeClient::didRecognizeLongMousePress): Added.
986         (WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress): Added.
987         * WebProcess/WebCoreSupport/WebChromeClient.h:
988
989 2014-08-18  Przemyslaw Kuczynski  <p.kuczynski@samsung.com>
990
991         Fix unintentional integer overflow before widen
992         https://bugs.webkit.org/show_bug.cgi?id=135463
993
994         Reviewed by Oliver Hunt.
995
996         Overflowing expression is evaluated using operands arithmetic but then is used in
997         context which expects an wider integer type. To avoid overflow at least one operand
998         has to be representative of the wider type.
999
1000         * WebProcess/soup/WebProcessSoup.cpp:
1001         (WebKit::getMemorySize): Added long long literal.
1002
1003 2014-08-18  Przemyslaw Kuczynski  <p.kuczynski@samsung.com>
1004
1005         Fix resource leak in unclosed file descriptor handles
1006         https://bugs.webkit.org/show_bug.cgi?id=135458
1007
1008         Reviewed by Oliver Hunt.
1009
1010         Leaving descriptor unclosed will cause the resources associated with the open
1011         file description never be freed (they are freed on closing the last descriptor
1012         refering to the underlying file).
1013
1014         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
1015         (WebKit::StdoutDevNullRedirector::StdoutDevNullRedirector): Closed newStdout descriptor.
1016         (WebKit::StdoutDevNullRedirector::~StdoutDevNullRedirector): Closed m_savedStdout descriptor.
1017
1018 2014-08-18  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1019
1020         [EFL] ewk_init() is sufficient to initialize EFL components
1021         https://bugs.webkit.org/show_bug.cgi?id=136036
1022
1023         Reviewed by Gyuyoung Kim.
1024
1025         Developers do not have to initialize EFL components as ewk_init()
1026         already does it.
1027
1028         * UIProcess/API/efl/ewk_intro.h:
1029
1030 2014-08-16  Pratik Solanki  <psolanki@apple.com>
1031
1032         Rename DiskCacheMonitor to NetworkDiskCacheMonitor
1033         https://bugs.webkit.org/show_bug.cgi?id=135897
1034
1035         Reviewed by Andreas Kling.
1036
1037         In preparation for moving DiskCacheMonitor code to WebCore in bug 135896, rename the WebKit2
1038         class to NetworkDiskCacheMonitor.
1039
1040         * NetworkProcess/mac/NetworkDiskCacheMonitor.h: Renamed from Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.h.
1041         (WebKit::NetworkDiskCacheMonitor::resourceRequest):
1042         * NetworkProcess/mac/NetworkDiskCacheMonitor.mm: Renamed from Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.mm.
1043         (WebKit::NetworkDiskCacheMonitor::monitorFileBackingStoreCreation):
1044         (WebKit::NetworkDiskCacheMonitor::NetworkDiskCacheMonitor):
1045         (WebKit::NetworkDiskCacheMonitor::messageSenderConnection):
1046         (WebKit::NetworkDiskCacheMonitor::messageSenderDestinationID):
1047         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
1048         (WebKit::NetworkResourceLoader::willCacheResponseAsync):
1049         * WebKit2.xcodeproj/project.pbxproj:
1050
1051 2014-08-16  Byungseon Shin  <sun.shin@lge.com>
1052
1053         [GTK] build fails with error: cannot allocate an object of abstract type 'WebKit::PageClientImpl'
1054         https://bugs.webkit.org/show_bug.cgi?id=136017 
1055
1056         Reviewed by Gyuyoung Kim.
1057
1058         * UIProcess/API/gtk/PageClientImpl.cpp:
1059         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
1060         (WebKit::PageClientImpl::didFinishLoadForMainFrame):
1061         * UIProcess/API/gtk/PageClientImpl.h:
1062
1063 2014-08-15  Ryuan Choi  <ryuan.choi@samsung.com>
1064
1065         [EFL] Add ewk_intro.h to describe main page of doxygen
1066         https://bugs.webkit.org/show_bug.cgi?id=136013
1067
1068         Reviewed by Gyuyoung Kim.
1069
1070         * PlatformEfl.cmake:
1071         * UIProcess/API/efl/EWebKit2.h.in:
1072         * UIProcess/API/efl/ewk_intro.h: Added.
1073
1074 2014-08-15  Zalan Bujtas  <zalan@apple.com>
1075
1076         Do not use FloatRect::infiniteRect() to flag full repaints.
1077         https://bugs.webkit.org/show_bug.cgi?id=135900
1078
1079         Reviewed by Simon Fraser.
1080
1081         Converting FloatRect::infiniteRect() to IntRect leads to value overflow
1082         and we end up with invalid repaint rectangle. Use a boolean flag to indicate
1083         full repaint request.
1084
1085         Covered by existing tests.
1086
1087         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1088         (WebKit::PlatformCALayerRemote::setNeedsDisplayInRect):
1089         (WebKit::PlatformCALayerRemote::setNeedsDisplay):
1090         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1091         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
1092         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
1093         (WebKit::PlatformCALayerRemoteCustom::setNeedsDisplayInRect):
1094         (WebKit::PlatformCALayerRemoteCustom::setNeedsDisplay):
1095         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
1096         (WebKit::PlatformCALayerRemoteTiledBacking::setNeedsDisplayInRect):
1097         (WebKit::PlatformCALayerRemoteTiledBacking::setNeedsDisplay):
1098         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
1099
1100 2014-08-15  Alexey Proskuryakov  <ap@apple.com>
1101
1102         REGRESSION (r172660): WebKit2.TerminateTwice asserts
1103         https://bugs.webkit.org/show_bug.cgi?id=136012
1104
1105         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::terminateProcess):
1106         Added bug number to a fixme.
1107
1108 2014-08-15  Ryuan Choi  <ryuan.choi@samsung.com>
1109
1110         Unreviewed build fix on the EFL port since r172635
1111
1112         * UIProcess/WebPageProxy.cpp: Guard removeNavigationGestureSnapshot with PLATFORM(MAC) macro.
1113         * UIProcess/WebPageProxy.h: Ditto.
1114         * UIProcess/efl/WebViewEfl.h: Added didFirstVisuallyNonEmptyLayoutForMainFrame and didFinishLoadForMainFrame as dummy.
1115
1116 2014-08-15  Alexey Proskuryakov  <ap@apple.com>
1117
1118         Improve page to process relationship tracking
1119         https://bugs.webkit.org/show_bug.cgi?id=135996
1120         <rdar://problem/16991213>
1121
1122         Reviewed by Sam Weinig.
1123
1124         * UIProcess/VisitedLinkProvider.cpp:
1125         (WebKit::VisitedLinkProvider::removeAll):
1126         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
1127         (WebKit::VisitedLinkProvider::sendTable):
1128         Added assertions for m_processes only having valid entries.
1129
1130         * UIProcess/WebPageProxy.cpp:
1131         (WebKit::WebPageProxy::reattachToWebProcess): When attaching to a new process,
1132         tell the old process that the page is not longer associated with it, avoiding
1133         a potential stale pointer.
1134         If re-attached to an existing process, make sure that we perform all the same
1135         registrations as after having launched a new process. This substantially improves
1136         the behavior when the number of open tabs is over process limit.
1137         (WebKit::WebPageProxy::reattachToWebProcessWithItem): Added ASSERT(!isValid())
1138         to avoid confusion. All other calls to reattachToWebProcess() have this as a
1139         runtime check, but reattachToWebProcessWithItem() is only called for valid pages.
1140         (WebKit::WebPageProxy::terminateProcess): Added an assertion with a FIXME for
1141         something that will need to be fixed another day.
1142
1143         * UIProcess/WebPageProxy.h: Removed an unimplemented function.
1144
1145         * UIProcess/WebProcessProxy.cpp:
1146         (WebKit::WebProcessProxy::addExistingWebPage): Added assertions for page map sanity.
1147         (WebKit::WebProcessProxy::removeWebPage): Added a check for page state being Terminated
1148         already. This avoids an assertion failure that happened under the new call to
1149         removeWebPage() in reattachToWebProcess(), as we are now calling it for terminated
1150         processes that are not in WebContext::m_processes any more.
1151         (WebKit::WebProcessProxy::didFinishLaunching): Added an assertion that page agrees
1152         about using this process.
1153
1154 2014-08-15  Gavin Barraclough  <barraclough@apple.com>
1155
1156         Fix plugin visibility check.
1157         https://bugs.webkit.org/show_bug.cgi?id=135991
1158
1159         D'oh, more unreviewed typo fix. :-(
1160
1161         * PluginProcess/PluginControllerProxy.cpp:
1162         (WebKit::PluginControllerProxy::visibilityDidChange):
1163         (WebKit::PluginControllerProxy::windowVisibilityChanged):
1164         (WebKit::PluginControllerProxy::updateVisibilityActivity):
1165         (WebKit::PluginControllerProxy::updateVisiblityActivity): Deleted.
1166         * PluginProcess/PluginControllerProxy.h:
1167
1168 2014-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
1169
1170         Implement snapping behavior for iOS
1171         https://bugs.webkit.org/show_bug.cgi?id=135769
1172
1173         Reviewed by Brent Fulgham.
1174
1175         Added support for snap points on iOS.
1176
1177         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1178         (ArgumentCoder<ScrollingStateScrollingNode>::encode): Added snap offset encoding.
1179         (ArgumentCoder<ScrollingStateScrollingNode>::decode): Added snap offset decoding.
1180         * UIProcess/API/Cocoa/WKWebView.mm:
1181         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): For mainframe scrolling, retargets the scroll destination to the appropriate snap point.
1182         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h: Added methods to extract relevant information for WKWebView from snap offsets in mainframe scrolling.
1183         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1184         (-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): For overflow scrolling, retargets the scroll destination to the appropriate snap point.
1185         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): Sets the deceleration factor to FAST if snap points are active.
1186         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1187         (WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Used by WKWebView for mainframe scrolling to retarget the scroll destination, if necessary.
1188         (WebKit::RemoteScrollingCoordinatorProxy::shouldSetScrollViewDecelerationRateFast): Used by WKWebView for mainframe scrolling to determine whether to set deceleration rate to the fast value.
1189         (WebKit::RemoteScrollingCoordinatorProxy::shouldSnapForMainFrameScrolling): Helper method.
1190         (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Helper method.
1191
1192 2014-08-15  Gavin Barraclough  <barraclough@apple.com>
1193
1194         Fix plugin visibility check.
1195         https://bugs.webkit.org/show_bug.cgi?id=135991
1196
1197         Unreviewed typo fix.
1198
1199         * PluginProcess/PluginControllerProxy.cpp:
1200         (WebKit::PluginControllerProxy::PluginControllerProxy):
1201         (WebKit::PluginControllerProxy::visibilityDidChange):
1202         (WebKit::PluginControllerProxy::windowVisibilityChanged):
1203         (WebKit::PluginControllerProxy::updateVisibilityActivity):
1204         * PluginProcess/PluginControllerProxy.h:
1205
1206 2014-08-15  Gavin Barraclough  <barraclough@apple.com>
1207
1208         Fix plugin visibility check.
1209         https://bugs.webkit.org/show_bug.cgi?id=135991
1210
1211         Reviewed by Andreas Kling.
1212
1213         We should only take a UserActivity if the plugin is in a visible window,
1214         and also is itself visible.
1215
1216         * PluginProcess/PluginControllerProxy.cpp:
1217         (WebKit::PluginControllerProxy::PluginControllerProxy):
1218             - initialize member state.
1219         (WebKit::PluginControllerProxy::visibilityDidChange):
1220         (WebKit::PluginControllerProxy::windowVisibilityChanged):
1221             - update member state & call updateVisibilityActivity.
1222         (WebKit::PluginControllerProxy::updateVisibilityActivity):
1223             - enable the UserActivity only if both visibilities are true.
1224         * PluginProcess/PluginControllerProxy.h:
1225             - added m_isVisible, m_isWindowVisible, updateVisibilityActivity.
1226
1227 2014-08-15  Enrica Casucci  <enrica@apple.com>
1228
1229         [Services with UI] Selections are incorrect when selecting three lines.
1230         https://bugs.webkit.org/show_bug.cgi?id=135989
1231         <rdar://problem/18032571>
1232
1233         Reviewed by Tim Horton.
1234
1235         The stitching algorithm did not handle correctly the case of selections
1236         over three lines if the middle line is composed of only one rectangle.
1237
1238         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1239         (WebKit::stitchRects):
1240
1241 2014-08-15  Tim Horton  <timothy_horton@apple.com>
1242
1243         Service overlays stay fixed when <iframe> scrolls
1244         https://bugs.webkit.org/show_bug.cgi?id=135959
1245         <rdar://problem/17957716>
1246
1247         Reviewed by Enrica Casucci.
1248
1249         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1250         (WebKit::ServicesOverlayController::highlightsAreEquivalent):
1251         Tiny correctness fix; highlights can only be equivalent if their
1252         types are equivalent as well.
1253
1254 2014-08-15  Gavin Barraclough  <barraclough@apple.com>
1255
1256         de-PLATFORM(COCOA) a couple of methods in plugin code
1257         https://bugs.webkit.org/show_bug.cgi?id=135987
1258
1259         Reviewed by Sam Weinig.
1260
1261         Pass through the visibility & focus on all platforms, to simplify & avoid
1262         any weird inconsistencies between platforms.
1263
1264         * PluginProcess/PluginControllerProxy.cpp:
1265         (WebKit::PluginControllerProxy::windowFocusChanged):
1266         (WebKit::PluginControllerProxy::windowVisibilityChanged):
1267         * PluginProcess/PluginControllerProxy.h:
1268         * PluginProcess/PluginControllerProxy.messages.in:
1269         * PluginProcess/mac/PluginControllerProxyMac.mm:
1270         (WebKit::PluginControllerProxy::windowFocusChanged): Deleted.
1271         (WebKit::PluginControllerProxy::windowVisibilityChanged): Deleted.
1272         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1273         (WebKit::NetscapePlugin::windowFocusChanged):
1274         (WebKit::NetscapePlugin::windowVisibilityChanged):
1275         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1276         * WebProcess/Plugins/Plugin.h:
1277         * WebProcess/Plugins/PluginProxy.cpp:
1278         (WebKit::PluginProxy::windowAndViewFramesChanged):
1279         * WebProcess/Plugins/PluginProxy.h:
1280         * WebProcess/Plugins/PluginView.cpp:
1281         (WebKit::PluginView::viewStateDidChange):
1282         (WebKit::PluginView::platformViewStateDidChange): Deleted.
1283         * WebProcess/Plugins/PluginView.h:
1284
1285 2014-08-15  Tim Horton  <timothy_horton@apple.com>
1286
1287         Service overlays stay fixed when <iframe> scrolls
1288         https://bugs.webkit.org/show_bug.cgi?id=135959
1289         <rdar://problem/17957716>
1290
1291         Reviewed by Enrica Casucci.
1292
1293         * WebProcess/WebPage/PageOverlay.cpp:
1294         (WebKit::PageOverlay::didScrollFrame):
1295         * WebProcess/WebPage/PageOverlay.h:
1296         (WebKit::PageOverlay::Client::didScrollFrame):
1297         * WebProcess/WebPage/PageOverlayController.cpp:
1298         (WebKit::PageOverlayController::didScrollFrame):
1299         Push didScrollFrame down to the overlays.
1300
1301         * WebProcess/WebPage/ServicesOverlayController.h:
1302         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1303         (WebKit::ServicesOverlayController::Highlight::createForSelection):
1304         Hold on to the selection's Range so we can use it to compare Highlights later.
1305
1306         (WebKit::ServicesOverlayController::Highlight::Highlight):
1307         (WebKit::ServicesOverlayController::Highlight::setDDHighlight):
1308         Factor the code to set up and paint the highlight out, so that we can
1309         set a new DDHighlightRef on a Highlight and the layer moves/reshapes/repaints.
1310
1311         (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
1312         (WebKit::ServicesOverlayController::buildSelectionHighlight):
1313         (WebKit::ServicesOverlayController::replaceHighlightsOfTypePreservingEquivalentHighlights):
1314         Factor replaceHighlightsOfTypePreservingEquivalentHighlights out
1315         so that we can use it for buildSelectionHighlight as well.
1316
1317         Steal the DDHighlightRef from the new Highlight when re-using an old one
1318         so that the newly computed rects are used instead of the old ones.
1319
1320         (WebKit::ServicesOverlayController::highlightsAreEquivalent):
1321         We will always have a Range now, so we can always check equivalence using it.
1322
1323         (WebKit::ServicesOverlayController::didScrollFrame):
1324         Rebuild all highlights upon subframe scroll, as they might have moved.
1325         We could optimize this in the future, but for now it's cheap enough
1326         and rare enough that it doesn't matter.
1327
1328 2014-08-15  Tim Horton  <timothy_horton@apple.com>
1329
1330         REGRESSION (WebKit2 Gestures): White flash when swiping back to cnn.com's homepage from an article
1331         https://bugs.webkit.org/show_bug.cgi?id=135951
1332         <rdar://problem/18006149>
1333
1334         Reviewed by Simon Fraser.
1335
1336         Wait for (the first visually non-empty layout AND the render tree size threshold to be hit),
1337         OR didFinishLoadForFrame, whichever comes first. Once we've done the first visually non-empty layout,
1338         we'll start the watchdog and tear down the snapshot in three seconds no matter what.
1339         Also, force a repaint so we can asynchronously wait for the Web Process to paint and return to us
1340         before removing the snapshot, which improves our chances that something is actually on the screen.
1341
1342         * UIProcess/API/mac/WKView.mm:
1343         (-[WKView _didFirstVisuallyNonEmptyLayoutForMainFrame]):
1344         (-[WKView _didFinishLoadForMainFrame]):
1345         (-[WKView _removeNavigationGestureSnapshot]):
1346         * UIProcess/API/mac/WKViewInternal.h:
1347         * UIProcess/PageClient.h:
1348         * UIProcess/WebPageProxy.cpp:
1349         (WebKit::WebPageProxy::didFinishLoadForFrame):
1350         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
1351         (WebKit::WebPageProxy::removeNavigationGestureSnapshot):
1352         * UIProcess/WebPageProxy.h:
1353         * UIProcess/ios/PageClientImplIOS.h:
1354         * UIProcess/ios/PageClientImplIOS.mm:
1355         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
1356         (WebKit::PageClientImpl::didFinishLoadForMainFrame):
1357         * UIProcess/mac/PageClientImpl.h:
1358         * UIProcess/mac/PageClientImpl.mm:
1359         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
1360         (WebKit::PageClientImpl::didFinishLoadForMainFrame):
1361         (WebKit::PageClientImpl::removeNavigationGestureSnapshot):
1362         Plumb didFirstVisuallyNonEmptyLayoutForMainFrame and didFinishLoadForMainFrame
1363         through to ViewGestureController from WebPageProxy via the PageClient, etc.
1364
1365         Ditto for removeNavigationGestureSnapshot, though it is called from a
1366         VoidCallback in ViewGestureController instead of from WebFrameLoaderClient and friends.
1367
1368         * UIProcess/mac/ViewGestureController.h:
1369         * UIProcess/mac/ViewGestureControllerMac.mm:
1370         (WebKit::ViewGestureController::ViewGestureController):
1371         (WebKit::ViewGestureController::endSwipeGesture):
1372         When finishing a swipe, we want to wait for both the first visually non-empty layout
1373         and the render tree size threshold being hit.
1374
1375         (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
1376         (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
1377         When both of these things have happened, remove the swipe snapshot (after forcing a repaint).
1378         For didFirstVisuallyNonEmptyLayoutForMainFrame, we will also start a watchdog
1379         ensuring that we remove the snapshot in three seconds.
1380
1381         (WebKit::ViewGestureController::didFinishLoadForMainFrame):
1382         When didFinishLoadForMainFrame happens, remove the swipe snapshot (after forcing a repaint).
1383
1384         (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
1385         If the watchdog timer fires, remove the swipe snapshot (after forcing a repaint).
1386
1387         (WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint):
1388         Force a repaint and wait for the async callback before removing the snapshot.
1389         It is safe to hold on to the WebPageProxy here because it will always
1390         call all of its callbacks before it is destroyed.
1391         Avoid enqueuing multiple force-repaints.
1392
1393         (WebKit::ViewGestureController::removeSwipeSnapshot):
1394
1395 2014-08-15  Gavin Barraclough  <barraclough@apple.com>
1396
1397         Fix plugin visibility initialization
1398         https://bugs.webkit.org/show_bug.cgi?id=135985
1399
1400         Reviewed by Geoffrey Garen.
1401
1402         * WebProcess/Plugins/PluginView.cpp:
1403         (WebKit::PluginView::didInitializePlugin):
1404             - We're not currently initializing the plugin visibility state,
1405               and we're passing the wrong value for window visibility.
1406
1407 2014-08-15  Gavin Barraclough  <barraclough@apple.com>
1408
1409         Simplify visibility activity accounting for plugins
1410         https://bugs.webkit.org/show_bug.cgi?id=135981
1411
1412         Reviewed by Dan Bernstein.
1413
1414         Just take one per connection, rather than implementing a counting mechanism.
1415
1416         * PluginProcess/PluginControllerProxy.cpp:
1417         (WebKit::PluginControllerProxy::PluginControllerProxy):
1418         * PluginProcess/PluginControllerProxy.h:
1419             - added m_visiblityActivity.
1420         * PluginProcess/PluginProcess.cpp:
1421         (WebKit::PluginProcess::PluginProcess):
1422         (WebKit::PluginProcess::pluginsForWebProcessDidBecomeVisible): Deleted.
1423         (WebKit::PluginProcess::pluginsForWebProcessDidBecomeHidden): Deleted.
1424         * PluginProcess/PluginProcess.h:
1425             - removed pluginsForWebProcessDidBecomeVisible/Hidden.
1426         * PluginProcess/WebProcessConnection.cpp:
1427         (WebKit::WebProcessConnection::removePluginControllerProxy):
1428         (WebKit::WebProcessConnection::pluginDidBecomeVisible): Deleted.
1429         (WebKit::WebProcessConnection::pluginDidBecomeHidden): Deleted.
1430         * PluginProcess/WebProcessConnection.h:
1431             - removed pluginDidBecomeVisible/Hidden.
1432         * PluginProcess/mac/PluginControllerProxyMac.mm:
1433         (WebKit::PluginControllerProxy::windowVisibilityChanged):
1434             - windowVisibilityChanged uses m_visiblityActivity, rather than calling to PluginControllerProxy.
1435
1436 2014-08-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1437
1438         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.3 release.
1439
1440         * gtk/NEWS: Add release notes for 2.5.3.
1441
1442 2014-08-14  Enrica Casucci  <enrica@apple.com>
1443
1444         [Services with UI] Selection services don't work inside <iframes>.
1445         https://bugs.webkit.org/show_bug.cgi?id=135941
1446         <rdar://problem/17957690>
1447
1448         Reviewed by Tim Horton.
1449
1450         Need to map the selection rectangles using the correct FrameView.
1451         When handling the click, we must use the selection from the focused frame.
1452
1453         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1454         (WebKit::ServicesOverlayController::buildSelectionHighlight):
1455         (WebKit::ServicesOverlayController::handleClick):
1456
1457 2014-08-13  Mark Rowe  <mrowe@apple.com>
1458
1459         <https://webkit.org/b/135909> Move helper applications out of the root of the framework.
1460
1461         As described in <https://developer.apple.com/library/mac/technotes/tn2206/>, for bundles containing
1462         a Versions directory there may be no other content at the top level of the bundle other than symlinks.
1463         Upcoming changes to code signing will prevent bundles that violate this rule from being signed.
1464
1465         Reviewed by Sam Weinig.
1466
1467         * Configurations/Base.xcconfig: Define a configuration setting that points to the content directory
1468         of the framework. On OS X this is Versions/A. On iOS, where frameworks are shallow, this is the top level.
1469         * Configurations/BaseLegacyProcess.xcconfig: Install the legacy processes in the content directory
1470         of the framework.
1471         * WebKit2.xcodeproj/project.pbxproj: Copy the legacy processes into the content directory of the
1472         framework during engineering builds. Generate symlinks for the legacy processes to their locations
1473         in Versions/Current. This is necessary because -[NSBundle pathForAuxiliaryExecutable:] only looks
1474         at the top level of the framework wrapper.
1475
1476 2014-08-14  Michael Catanzaro  <mcatanzaro@igalia.com>
1477
1478         WebKit2GTK - WebKitWebProcess assertion fails when dragging and dropping a file into the view
1479         https://bugs.webkit.org/show_bug.cgi?id=127576
1480
1481         Reviewed by Carlos Garcia Campos.
1482
1483         * UIProcess/WebPageProxy.cpp:
1484         (WebKit::WebPageProxy::performDragControllerAction): Assume read access
1485         to any file that has been dragged into the web view when compiling for
1486         GTK, since we don't support sandbox extensions.
1487
1488 2014-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
1489
1490         Enable CSS_SCROLL_SNAP for iOS
1491         https://bugs.webkit.org/show_bug.cgi?id=135915
1492
1493         Turn on CSS_SCROLL_SNAP for iOS and the iOS simulator.
1494
1495         Reviewed by Tim Horton.
1496
1497         * Configurations/FeatureDefines.xcconfig:
1498
1499 2014-08-13  Enrica Casucci  <enrica@apple.com>
1500
1501         [Services with UI] Use a longer delay duration for editable content.
1502         https://bugs.webkit.org/show_bug.cgi?id=135918
1503         <rdar://problem/17998929>
1504
1505         Reviewed by Tim Horton.
1506
1507         Use a 1 second delay for selections in editable content.
1508
1509         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1510         (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
1511
1512 2014-08-13  Mark Rowe  <mrowe@apple.com>
1513
1514         <https://webkit.org/b/135911> WebKit should build on Yosemite with the public SDK.
1515
1516         Reviewed by Darin Adler.
1517
1518         * Platform/IPC/mac/ImportanceAssertion.h: Forward-declare the new assertion functions we use.
1519         * UIProcess/mac/WebContextMenuProxyMac.mm: Forward-declare some details related to NSSharingServicePicker.
1520
1521 2014-08-13  Alexey Proskuryakov  <ap@apple.com>
1522
1523         iOS build fix.
1524
1525         * UIProcess/WebContext.cpp:
1526         (WebKit::WebContext::ensureNetworkProcess):
1527         (WebKit::WebContext::createNewWebProcess):
1528
1529 2014-08-13  Joseph Pecoraro  <pecoraro@apple.com>
1530
1531         Opening Web Inspector causes a large amount of sandbox violations
1532         https://bugs.webkit.org/show_bug.cgi?id=135908
1533
1534         Reviewed by Timothy Hatcher.
1535
1536         * WebProcess/com.apple.WebProcess.sb.in:
1537         Permit the WebContent process to create file read extensions for the
1538         system WebInspectorUI.framework which the Network process can already
1539         read anyways.
1540
1541 2014-08-13  Tim Horton  <timothy_horton@apple.com>
1542
1543         Avoid making new active service overlay highlights while the mouse is down
1544         https://bugs.webkit.org/show_bug.cgi?id=135872
1545         <rdar://problem/17982341>
1546
1547         Reviewed by Enrica Casucci.
1548
1549         * WebProcess/WebPage/ServicesOverlayController.h:
1550         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1551         (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
1552         (WebKit::ServicesOverlayController::mouseEvent):
1553         If the mouse is pressed or it's been less than 200ms since the mouse went up,
1554         don't allow the highlight to change. We apply the mouse-is-pressed rule to telephone
1555         number highlights as well, unlike the rest of the hysteresis logic.
1556
1557 2014-08-13  Timothy Hatcher  <timothy@apple.com>
1558
1559         Web Inspector: Workaround a NSWindow change to the title bar.
1560         https://bugs.webkit.org/show_bug.cgi?id=135880
1561
1562         Reviewed by Joseph Pecoraro.
1563
1564         * UIProcess/mac/WebInspectorProxyMac.mm:
1565         (WebKit::WebInspectorProxy::createInspectorWindow): Set titlebarAppearsTransparent on 10.10.
1566         Only call border thickness APIs on 10.9 and earlier.
1567         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Only call setDrawsBackground: on 10.9 and earlier.
1568         (WebKit::WebInspectorProxy::platformSetToolbarHeight): Only call setContentBorderThickness: on 10.9 and earlier.
1569
1570 2014-08-13  Ryuan Choi  <ryuan.choi@samsung.com>
1571
1572         [EFL] Add API to set application name for the user agent
1573         https://bugs.webkit.org/show_bug.cgi?id=135640
1574
1575         Reviewed by Gyuyoung Kim.
1576
1577         Add ewk_application_name_for_user_agent_set to make default user agent string
1578         with application name which application passes.
1579         It's useful for application to set only application information without knowledge
1580         of legacy user agent components.
1581
1582         * UIProcess/API/efl/EwkView.cpp:
1583         (EwkView::EwkView):
1584         (EwkView::setApplicationNameForUserAgent):
1585         * UIProcess/API/efl/EwkView.h:
1586         (EwkView::applicationNameForUserAgent):
1587         * UIProcess/API/efl/ewk_view.cpp:
1588         (ewk_view_application_name_for_user_agent_set):
1589         (ewk_view_application_name_for_user_agent_get):
1590         * UIProcess/API/efl/ewk_view.h:
1591         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1592         (TEST_F):
1593         * UIProcess/efl/WebPageProxyEfl.cpp:
1594         (WebKit::WebPageProxy::standardUserAgent):
1595
1596 2014-08-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1597
1598         [CMAKE] WebProcess shouldn't need to explicitly link to JavaScriptCore and WebCore
1599         https://bugs.webkit.org/show_bug.cgi?id=135832
1600
1601         Reviewed by Gyuyoung Kim.
1602
1603         Linking to WebKit2 should be enough, like Network and Plugin processes.
1604
1605         * CMakeLists.txt:
1606
1607 2014-08-12  Tim Horton  <timothy_horton@apple.com>
1608
1609         Document-relative page overlays drop some mouse events with non-zero top content inset
1610         https://bugs.webkit.org/show_bug.cgi?id=135871
1611         <rdar://problem/17982275>
1612
1613         Reviewed by Beth Dakin.
1614
1615         * WebProcess/WebPage/PageOverlay.cpp:
1616         (WebKit::PageOverlay::mouseEvent):
1617         Convert the mouse position into document-relative coordinates; the bounds()
1618         already are! This way, we can actually compare them without being wrong sometimes.
1619
1620 2014-08-12  Peyton Randolph  <prandolph@apple.com>
1621
1622         Runtime switch for long mouse press gesture. Part of 135257 - Add long mouse press gesture
1623         https://bugs.webkit.org/show_bug.cgi?id=135682
1624
1625         Reviewed by Tim Horton.
1626
1627         * Configurations/FeatureDefines.xcconfig: Remove LONG_MOUSE_PRESS feature flag.
1628         * Shared/WebPreferencesDefinitions.h:
1629         Add LongMousePressEnabled preference, initially false.
1630         * UIProcess/API/C/WKPreferences.cpp:
1631         (WKPreferencesSetLongMousePressEnabled): Added.
1632         (WKPreferencesGetLongMousePressEnabled): Added.
1633         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1634         * WebProcess/WebPage/WebPage.cpp:
1635         (WebKit::WebPage::updatePreferences):
1636         Reflect the WebKit long mouse press setting in WebCore.
1637
1638 2014-08-12  Pratik Solanki  <psolanki@apple.com>
1639
1640         Cached file backed resources don't make it to the Web Process when NETWORK_CFDATA_ARRAY_CALLBACK is enabled
1641         https://bugs.webkit.org/show_bug.cgi?id=135727
1642         <rdar://problem/17947880>
1643
1644         Reviewed by Darin Adler.
1645
1646         tryGetShareableHandleFromSharedBuffer() assumed that we have a file backed resource only if
1647         we had a CFDataRef (platformData()) in SharedBuffer. This is wrong when we use the data
1648         array callbacks since the file backed buffer could be in the data array. Instead of relying
1649         on hasPlatformData(), explicitly ask the SharedBuffer to give us a CFDataRef if it has one
1650         so that SharedBuffer can take care of the data array case.
1651
1652         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
1653         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
1654
1655 2014-08-12  Alexey Proskuryakov  <ap@apple.com>
1656
1657         REGRESSION: WebContent process has a sandbox extension for the entirety of user's temp directory
1658         https://bugs.webkit.org/show_bug.cgi?id=135853
1659         <rdar://problem/17986556>
1660
1661         Reviewed by Oliver hunt.
1662
1663         Move extensions recently added for iOS benefit under PLATFORM(IOS). Removed some
1664         dead code while at it (child processes don't need actual paths, they only need
1665         sandbox extensions in most cases).
1666
1667         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1668         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1669         * Shared/Network/NetworkProcessCreationParameters.cpp:
1670         (WebKit::NetworkProcessCreationParameters::encode):
1671         (WebKit::NetworkProcessCreationParameters::decode):
1672         * Shared/Network/NetworkProcessCreationParameters.h:
1673         * Shared/WebProcessCreationParameters.cpp:
1674         (WebKit::WebProcessCreationParameters::encode):
1675         (WebKit::WebProcessCreationParameters::decode):
1676         * Shared/WebProcessCreationParameters.h:
1677         * UIProcess/WebContext.cpp:
1678         (WebKit::WebContext::ensureNetworkProcess):
1679         (WebKit::WebContext::createNewWebProcess):
1680         (WebKit::WebContext::openGLCacheDirectory): Deleted.
1681         (WebKit::WebContext::networkingHSTSDatabasePath): Deleted.
1682         * UIProcess/WebContext.h:
1683         * UIProcess/efl/WebContextEfl.cpp:
1684         (WebKit::WebContext::containerTemporaryDirectory): Deleted.
1685         (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath): Deleted.
1686         * UIProcess/gtk/WebContextGtk.cpp:
1687         (WebKit::WebContext::containerTemporaryDirectory): Deleted.
1688         (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath): Deleted.
1689         * UIProcess/mac/WebContextMac.mm:
1690         (WebKit::WebContext::openGLCacheDirectory):
1691         (WebKit::WebContext::parentBundleDirectory):
1692         (WebKit::WebContext::networkingHSTSDatabasePath):
1693         (WebKit::WebContext::platformDefaultOpenGLCacheDirectory): Deleted.
1694         (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath): Deleted.
1695         * WebProcess/cocoa/WebProcessCocoa.mm:
1696         (WebKit::WebProcess::platformInitializeWebProcess):
1697
1698 2014-08-12  Tim Horton  <timothy_horton@apple.com>
1699
1700         Small region (~1px tall) where you get the selection button instead of the phone number overlay
1701         https://bugs.webkit.org/show_bug.cgi?id=135852
1702         <rdar://problem/17992795>
1703
1704         Reviewed by Enrica Casucci.
1705
1706         * WebProcess/WebPage/ServicesOverlayController.h:
1707         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1708         (WebKit::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight):
1709         (WebKit::ServicesOverlayController::determineActiveHighlight):
1710         If our new active highlight is a selection highlight that is completely contained
1711         by one of the phone number highlights, we'll make the phone number highlight active
1712         even if it's not hovered. This fixes the case where the selection highlight
1713         (a subset of a telephone number) is slightly taller than the telephone number
1714         highlight, and can be hovered without hovering the phone number highlight.
1715
1716 2014-08-12  Tim Horton  <timothy_horton@apple.com>
1717
1718         REGRESSION (r172424): Extra menu header in combined telephone number menu when no phone paired
1719         https://bugs.webkit.org/show_bug.cgi?id=135854
1720         <rdar://problem/17996339>
1721
1722         Reviewed by Enrica Casucci.
1723
1724         * UIProcess/mac/WebContextMenuProxyMac.mm:
1725         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
1726         Get all the menu items ahead of time, and only add the shared header
1727         if there are any telephone number menu items.
1728
1729 2014-08-12  Enrica Casucci  <enrica@apple.com>
1730
1731         Crash at com.apple.WebKit.WebContent at com.apple.WebKit: WebKit::expandForGap
1732         https://bugs.webkit.org/show_bug.cgi?id=135859
1733         <rdar://problem/17994679>
1734
1735         Reviewed by Tim Horton.
1736
1737         expandForGap made the assumption that the selection rects were always three.
1738         This was not true even before http://trac.webkit.org/changeset/172395 but
1739         was more likely to happen after that change.
1740         
1741         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1742         (WebKit::expandForGap):
1743
1744 2014-08-12  Tim Horton  <timothy_horton@apple.com>
1745
1746         Don't show the combined menu if there are no services available
1747         https://bugs.webkit.org/show_bug.cgi?id=135846
1748         <rdar://problem/17582099>
1749
1750         Reviewed by Enrica Casucci.
1751
1752         * WebProcess/WebPage/ServicesOverlayController.h:
1753         Add a FIXME.
1754
1755         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1756         (WebKit::ServicesOverlayController::determineActiveHighlight):
1757         Don't allow a selection Highlight to become active if there is no
1758         service available to handle it. Previously we showed the combined menu
1759         with just phone numbers in it if any were detected.
1760
1761 2014-08-12  Tim Horton  <timothy_horton@apple.com>
1762
1763         Add a fade transition to services highlights
1764         https://bugs.webkit.org/show_bug.cgi?id=135829
1765         <rdar://problem/17935736>
1766
1767         Reviewed by Enrica Casucci.
1768
1769         Add a smooth fade to highlight installation and uninstallation.
1770         To do so, we make each highlight paint into its own small layer.
1771
1772         * WebProcess/WebPage/PageOverlay.cpp:
1773         (WebKit::PageOverlay::layer):
1774         * WebProcess/WebPage/PageOverlay.h:
1775         * WebProcess/WebPage/PageOverlayController.cpp:
1776         (WebKit::PageOverlayController::layerForOverlay):
1777         * WebProcess/WebPage/PageOverlayController.h:
1778         Expose the GraphicsLayer on PageOverlay.
1779
1780         * WebProcess/WebPage/ServicesOverlayController.h:
1781         (WebKit::ServicesOverlayController::Highlight::layer):
1782         (WebKit::ServicesOverlayController::activeHighlight):
1783         (WebKit::ServicesOverlayController::webPage):
1784         (WebKit::ServicesOverlayController::Highlight::Highlight): Deleted.
1785
1786         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1787         (WebKit::ServicesOverlayController::Highlight::createForSelection):
1788         (WebKit::ServicesOverlayController::Highlight::createForTelephoneNumber):
1789         (WebKit::ServicesOverlayController::Highlight::Highlight):
1790         Highlights now own a GraphicsLayer, which are later installed
1791         as sublayers of the ServicesOverlayController's PageOverlay layer.
1792         These layers are sized and positioned according to the DDHighlight's bounds.
1793
1794         (WebKit::ServicesOverlayController::Highlight::~Highlight):
1795         (WebKit::ServicesOverlayController::Highlight::invalidate):
1796         ServicesOverlayController will invalidate any remaining highlights
1797         when it is torn down, so they can clear their backpointers.
1798
1799         (WebKit::ServicesOverlayController::Highlight::notifyFlushRequired):
1800         Forward flush notifications to the DrawingArea.
1801
1802         (WebKit::ServicesOverlayController::Highlight::paintContents):
1803         Paint the DDHighlight into the layer. Translation is done by the layer position,
1804         so we zero the bounds origin when painting.
1805
1806         (WebKit::ServicesOverlayController::Highlight::deviceScaleFactor):
1807         Forward the deviceScaleFactor so that things are painted at the right scale.
1808
1809         (WebKit::ServicesOverlayController::Highlight::fadeIn):
1810         (WebKit::ServicesOverlayController::Highlight::fadeOut):
1811         Apply a fade animation to the layer.
1812
1813         (WebKit::ServicesOverlayController::Highlight::didFinishFadeOutAnimation):
1814         When the fade completes, unparent the layer, unless it has become active again.
1815
1816         (WebKit::ServicesOverlayController::ServicesOverlayController):
1817         (WebKit::ServicesOverlayController::~ServicesOverlayController):
1818         Invalidate all highlights, so they can clear their backpointers.
1819
1820         (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
1821         Make remainingTimeUntilHighlightShouldBeShown act upon a particular highlight
1822         instead of always the active highlight.
1823
1824         (WebKit::ServicesOverlayController::determineActiveHighlightTimerFired): Rename.
1825
1826         (WebKit::ServicesOverlayController::drawRect):
1827         drawRect is no longer called and will no longer do anything; all of the
1828         painting is done in sublayers.
1829
1830         (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
1831         Ensure that phone number Highlights stay stable even while the selection
1832         changes, by comparing the underlying Ranges and keeping around old Highlights
1833         that match the new ones. This enables us to e.g. fade in while changing
1834         the selection within a phone number.
1835
1836         (WebKit::ServicesOverlayController::buildSelectionHighlight):
1837         (WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
1838         (WebKit::ServicesOverlayController::createOverlayIfNeeded):
1839         Don't call setNeedsDisplay; the overlay doesn't have backing store.
1840         Instead, call determineActiveHighlight, which will install/uninstall
1841         highlights as necessary.
1842
1843         (WebKit::ServicesOverlayController::determineActiveHighlight):
1844         Apply fade in/fade out to the overlays.
1845         Keep track of which highlight we're going to activate, until the hysteresis
1846         delay is up, then actually make it active/parent it/fade it in.
1847         We now will have no active highlight between the fade out of the previous one
1848         and the fade in of the new one (during the hysteresis delay).
1849
1850         (WebKit::ServicesOverlayController::mouseEvent):
1851         The overlay now will not become active until the delay is up, so we don't
1852         need to check it again here.
1853
1854         (WebKit::ServicesOverlayController::handleClick):
1855         (WebKit::ServicesOverlayController::didCreateHighlight):
1856         (WebKit::ServicesOverlayController::willDestroyHighlight):
1857         (WebKit::ServicesOverlayController::repaintHighlightTimerFired): Deleted.
1858         (WebKit::ServicesOverlayController::drawHighlight): Deleted.
1859
1860 2014-08-11  Andy Estes  <aestes@apple.com>
1861
1862         [iOS] Get rid of iOS.xcconfig
1863         https://bugs.webkit.org/show_bug.cgi?id=135809
1864
1865         Reviewed by Joseph Pecoraro.
1866
1867         All iOS.xcconfig did was include AspenFamily.xcconfig, so there's no need for the indirection.
1868
1869         * Configurations/Base.xcconfig:
1870         * Configurations/iOS.xcconfig: Removed.
1871         * WebKit2.xcodeproj/project.pbxproj:
1872
1873 2014-08-12  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1874
1875         [EFL] Rename ewk_private.h to EwkDebug.h
1876         https://bugs.webkit.org/show_bug.cgi?id=135797
1877
1878         Reviewed by Gyuyoung Kim.
1879
1880         ewk_private.h contains only debug macros alllowing
1881         logging.
1882
1883         * UIProcess/API/efl/EwkView.cpp:
1884         * UIProcess/API/efl/ewk_main.cpp:
1885         * UIProcess/efl/EwkDebug.h: Renamed from Source/WebKit2/UIProcess/API/efl/ewk_private.h.
1886         * UIProcess/efl/ViewClientEfl.cpp:
1887
1888 2014-08-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1889
1890         [GTK] The plugins metadata cache doesn't work if the user cache directory doesn't exist
1891         https://bugs.webkit.org/show_bug.cgi?id=135834
1892
1893         Reviewed by Philippe Normand.
1894
1895         Make sure the user cache directory exists. If creating the
1896         directory fails for whatever reason, do not try to save the cache
1897         to disk.
1898
1899         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
1900         (WebKit::PluginInfoCache::PluginInfoCache):
1901         (WebKit::PluginInfoCache::updatePluginInfo):
1902
1903 2014-08-12  Alexey Proskuryakov  <ap@apple.com>
1904
1905         [Mac] Allow reading CoreGraphics debugging preferences
1906         https://bugs.webkit.org/show_bug.cgi?id=135821
1907         <rdar://problem/11219259>
1908
1909         Reviewed by Darin Adler.
1910
1911         * WebProcess/com.apple.WebProcess.sb.in:
1912
1913 2014-08-11  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1914
1915         [EFL] Prevent the client from creating ewk_view when EWebkit is not initialized
1916         https://bugs.webkit.org/show_bug.cgi?id=135606
1917
1918         Reviewed by Gyuyoung Kim.
1919
1920         Similarly to EFL modules (eina, evas etc.), application using EWebKit
1921         has to initialize it using ewk_init().
1922
1923         Do not allow the client to create ewk_view if ewk_init has not been called.
1924         Add an appropriate logs warning the client about wrong APIs usage.
1925
1926         * UIProcess/API/efl/ewk_main.cpp: Add EwkMain class to control ewk lifetime.
1927         (WebKit::EwkMain::EwkMain):
1928         (WebKit::EwkMain::shared):
1929         (WebKit::EwkMain::~EwkMain): Add logs when the client forgot to destroy EWebkit.
1930         (WebKit::EwkMain::initialize):
1931         (WebKit::EwkMain::finalize):
1932         (WebKit::EwkMain::shutdownInitializedEFLModules):
1933         (ewk_init):
1934         (ewk_shutdown):
1935         * UIProcess/API/efl/ewk_main_private.h: Added.
1936         (WebKit::EwkMain::isInitialized):
1937         (WebKit::EwkMain::logDomainId):
1938         * UIProcess/API/efl/ewk_private.h:
1939         * UIProcess/API/efl/ewk_view.cpp:
1940         (EWKViewCreate):
1941         Prevent the client from creating ewk_view when ewk_init() has not been called.
1942
1943 2014-08-11  Enrica Casucci  <enrica@apple.com>
1944
1945         Improve look and feel of combined service menu..
1946         https://bugs.webkit.org/show_bug.cgi?id=135824
1947         <rdar://problem/17936880>
1948
1949         Reviewed by Tim Horton.
1950         
1951         When showing the combined menu, list the phone numbers first,
1952         grouped under a common header, followed by the entries relative
1953         to the services.
1954
1955         * Platform/mac/MenuUtilities.h:
1956         * Platform/mac/MenuUtilities.mm:
1957         (WebKit::menuItemTitleForTelephoneNumberGroup):
1958         (WebKit::menuItemForTelephoneNumber):
1959         * UIProcess/mac/WebContextMenuProxyMac.mm:
1960         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
1961
1962 2014-08-11  Joseph Pecoraro  <pecoraro@apple.com>
1963
1964         Add Private WKPreferences API for developer extras (show inspector)
1965         https://bugs.webkit.org/show_bug.cgi?id=135811
1966
1967         Reviewed by Timothy Hatcher.
1968
1969         * UIProcess/API/Cocoa/WKPreferences.mm:
1970         (-[WKPreferences _developerExtrasEnabled]):
1971         (-[WKPreferences _setDeveloperExtrasEnabled:]):
1972         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1973
1974 2014-08-08  Enrica Casucci  <enrica@apple.com>
1975
1976         [Services with UI] Action menu arrow hit testing is sometimes wrong.
1977         https://bugs.webkit.org/show_bug.cgi?id=135776
1978         <rdar://problem/17837670>
1979
1980         Reviewed by Brady Eidson.
1981
1982         There was a problem in the algorithm that stitches together the selection rectangles
1983         to be given to Data Detectors API.
1984         This change adds a new function that stiches together all the rects contributing to the
1985         first line, all the rects contributing to the last line and all the ones in the middle.
1986         This way we can have a maximum of 3 non overlapping rectangles.
1987
1988         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1989         (WebKit::stitchRects):
1990         (WebKit::compactRectsWithGapRects):
1991
1992 2014-08-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1993
1994         Unreviewed, EFL build fix since r172385.
1995
1996         * PlatformEfl.cmake:
1997
1998 2014-08-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1999
2000         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.2 release.
2001
2002         * gtk/NEWS: Add release notes for 2.5.2.
2003
2004 2014-08-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2005
2006         [GTK] No IPC messages are sent when building WebKitGTK+ with VERSION_SCRIPT
2007         https://bugs.webkit.org/show_bug.cgi?id=135760
2008
2009         Reviewed by Philippe Normand.
2010
2011         The problem is that the threading initialization is failing
2012         because there are two copies of WTF, one in libjavascriptcoregtk
2013         and the other in libwebkit2gtk. When WebKit2 is initialized in the
2014         UI process, JSC::initializeThreading() is called first and then
2015         WTF::initializeMainThread(). The former is calling
2016         ThreadIdentifierData::initializeOnce() initializing the
2017         ThreadIdentifierData::m_key symbol in libjavascriptcoregtk, while
2018         the latter is using the ThreadIdentifierData API from libwebkit2gtk
2019         that hasn't been initialized.
2020
2021         * CMakeLists.txt: Do not add WTF to the list of WebKit2 libraries,
2022         WebKit2 already depends on JavaScriptCore that already links to WTF.
2023
2024 2014-08-10  Tim Horton  <timothy_horton@apple.com>
2025
2026         Yelp phone number highlights often disappear
2027         https://bugs.webkit.org/show_bug.cgi?id=135789
2028         <rdar://problem/17971057>
2029
2030         Reviewed by Brady Eidson.
2031
2032         Since selectedTelephoneNumberRangesChanged doesn't provide an associated
2033         Frame, an incoming selectedTelephoneNumberRangesChanged from a subframe
2034         would overwrite ServicesOverlayController's cached (and potentially active)
2035         telephone number highlights.
2036
2037         This happens a lot on Yelp, because they have many subframes which are
2038         doing layout on a regular basis.
2039
2040         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2041         (WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged):
2042         * WebProcess/WebCoreSupport/WebEditorClient.h:
2043         Adjust to the new (lack of) arguments.
2044
2045         * WebProcess/WebPage/ServicesOverlayController.h:
2046         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2047         (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
2048         Adjust logging; we can revisit it later.
2049
2050         (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
2051         When building phone number highlights, walk the Frame tree and retrieve
2052         them from all of the Editors.
2053
2054         (WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
2055         (WebKit::ServicesOverlayController::telephoneNumberRangesForFocusedFrame):
2056         (WebKit::ServicesOverlayController::determineActiveHighlight):
2057         (WebKit::ServicesOverlayController::handleClick):
2058         Retrieve the detected telephone number ranges from the focused frame
2059         when combining telephone numbers with selection services.
2060         This ensures that we don't show combined phone number highlights from other frames.
2061
2062 2014-08-10  Tim Horton  <timothy_horton@apple.com>
2063
2064         Refactor ServiceOverlayController in preparation for fading between highlights
2065         https://bugs.webkit.org/show_bug.cgi?id=135787
2066         <rdar://problem/17935736>
2067
2068         Reviewed by Brady Eidson.
2069
2070         Rework ServicesOverlayController so that we always keep a set of generic
2071         "potential highlights", which are refcounted Highlight objects and
2072         wrap a DDHighlightRef, as well as a type (Selection or TelephoneNumber),
2073         Range (only used in the case of TelephoneNumber), and potentially more
2074         things in the future (like, say, fade state!).
2075
2076         We eagerly update the list of potential highlights when the selection or set
2077         of detected telephone numbers changes, and use this information to install
2078         or uninstall the page overlay as needed.
2079
2080         When we need to recompute the "active" highlight from this set (for example,
2081         we need to handle a mouse event or paint the highlight), we look through
2082         the set of potential highlights and decide. This moves the "active" highlight
2083         decision logic into one small and confined place.
2084
2085         * WebProcess/WebPage/ServicesOverlayController.h:
2086         (WebKit::ServicesOverlayController::Highlight):
2087         Add the new aforementioned refcounted Highlight class.
2088         Rename m_lastHoveredHighlightChangeTime to m_lastActiveHighlightChangeTime.
2089         Make m_webPage a reference.
2090         The rest is just added/removed/adjusted functions for the refactoring.
2091
2092         (WebKit::TelephoneNumberData::TelephoneNumberData): Deleted.
2093         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2094         (WebKit::ServicesOverlayController::Highlight::createForSelection):
2095         (WebKit::ServicesOverlayController::Highlight::createForTelephoneNumber):
2096         Create Highlights for the two different highlight types.
2097
2098         (WebKit::ServicesOverlayController::ServicesOverlayController):
2099         (WebKit::ServicesOverlayController::willMoveToWebPage):
2100         Our WebPage pointer is always valid because it owns us; don't clear it.
2101         We need to keep it around so that we can uninstall the overlay and
2102         install it again later, anyway.
2103
2104         (WebKit::ServicesOverlayController::selectionRectsDidChange):
2105         (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
2106         When selection rects or detected telephone numbers change, rebuild potential highlights.
2107         This will have the side-effect of installing the overlay if needed.
2108
2109         (WebKit::ServicesOverlayController::mouseIsOverHighlight):
2110         Make this function take a Highlight instead of a DDHighlightRef.
2111
2112         (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
2113         Make this function take a Highlight instead of a DDHighlightRef.
2114
2115         (WebKit::ServicesOverlayController::drawHighlight):
2116         Make this function take a Highlight instead of a DDHighlightRef.
2117         There's no reason to do the translation separately from the layer blit,
2118         also allowing us to avoid the StateSaver.
2119
2120         (WebKit::ServicesOverlayController::drawRect):
2121         drawRect now always paints the active highlight, instead of duplicating
2122         logic about which highlight should be active.
2123         Also, it will update the active highlight before painting.
2124         We no longer need to re-determine whether the active highlight's phone
2125         number range is still a valid phone number range, because we rebuild
2126         the potential highlights whenever the set of phone number ranges changes.
2127
2128         (WebKit::ServicesOverlayController::clearActiveHighlight):
2129         Mostly an adoption of new names.
2130
2131         (WebKit::ServicesOverlayController::removeAllPotentialHighlightsOfType):
2132         Run through the list of potential highlights and remove any of the given type.
2133         The two highlight building functions use this helper to clear the old ones before building.
2134
2135         (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
2136         (WebKit::ServicesOverlayController::buildSelectionHighlight):
2137         Rebuild the list of potential highlights, replacing all highlights of
2138         the given type with new ones.
2139
2140         (WebKit::ServicesOverlayController::hasRelevantSelectionServices):
2141         Factor out the code that decides whether our current selection is
2142         viable for servicing based on whether we have plain-text and/or rich-text services.
2143
2144         (WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
2145         When rebuilding potential highlights, if we have no potential highlights at all,
2146         uninstall the page overlay; we don't need mouse tracking and don't need to
2147         paint anything. This improves memory use and compositing performance significantly,
2148         where previously we were leaving the overlay up forever after creating it.
2149
2150         If we have either detected telephone numbers or relevant selection services,
2151         create and install the overlay if it doesn't already exist.
2152
2153         (WebKit::ServicesOverlayController::createOverlayIfNeeded):
2154         This just moved from elsehwere, except that it now uses FadeMode::DoNotFade.
2155         It doesn't make sense to fade on install/uninstall (which happens even before hover)
2156         but not on changing the active highlight; fading will be re-addressed in the next patch.
2157
2158         (WebKit::ServicesOverlayController::highlightsAreEquivalent):
2159         Determine whether two highlights are equivalent. While we may have
2160         created a new Highlight at rebuild time, if two telephone number
2161         highlights have equivalent ranges, there's no need to 'transition' to the new one.
2162
2163         (WebKit::ServicesOverlayController::determineActiveHighlight):
2164         Run through the list of services, and try to find one that is hovered.
2165         We prefer telephone number highlights to selection highlights, and
2166         we will never make a selection highlight active if it is both
2167         not serviceable and there are no telephone numbers to show in the combined menu.
2168         This is the centralized location for determination of which highlight
2169         should be considered active. If the active highlight changed, update
2170         the time since last change and cancel the mouse-down tracking.
2171
2172         (WebKit::ServicesOverlayController::mouseEvent):
2173         Adjust some comments to be more explanatory.
2174         A bunch of code moved out of here and into determineActiveHighlight.
2175
2176         (WebKit::ServicesOverlayController::handleClick):
2177         Adjust to take a reference and use Highlight instead of DDHighlightRef.
2178
2179 2014-08-10  Timothy Hatcher  <timothy@apple.com>
2180
2181         Web Inspector: new glyphs are visible on OS X 10.9 builds
2182         https://bugs.webkit.org/show_bug.cgi?id=135743
2183
2184         Reviewed by Joseph Pecoraro.
2185
2186         * UIProcess/mac/WebInspectorProxyMac.mm:
2187         (WebKit::WebInspectorProxy::createInspectorWindow): Use 10100 instead of 1090 for the version.
2188
2189 2014-08-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2190
2191         [GTK] REGRESSION(r166239): The ld version script is not being used
2192         https://bugs.webkit.org/show_bug.cgi?id=135694
2193
2194         Reviewed by Martin Robinson.
2195
2196         * CMakeLists.txt: Add VERSION_SCRIPT to WebKit2 link flags if present.
2197
2198 2014-08-09  Tim Horton  <timothy_horton@apple.com>
2199
2200         REGRESSION (r172301): Combined phone number highlight doesn't appear if rich content is selected and we have no rich content services
2201         https://bugs.webkit.org/show_bug.cgi?id=135785
2202         <rdar://problem/17969843>
2203
2204         Reviewed by Brady Eidson.
2205
2206         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2207         (WebKit::ServicesOverlayController::drawSelectionHighlight):
2208         We can't early return in the rich-content-but-no-rich-services case
2209         if we have telephone numbers in the selection, because we want to offer
2210         them up in the combined menu.
2211
2212         * UIProcess/mac/WebContextMenuProxyMac.mm:
2213         If we end up with no menu, because there were no services available,
2214         make a fresh one that we can fill with combined telephone number items.
2215
2216 2014-08-08  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2217
2218         [EFL] Do not initialize g_type in WebProcessMain::platformInitialize()
2219         https://bugs.webkit.org/show_bug.cgi?id=135700
2220
2221         Reviewed by Gyuyoung Kim.
2222
2223         Inspired by r171788.
2224         Glib since 2.36 itself initializes g_type_init.
2225
2226         * WebProcess/efl/WebProcessMainEfl.cpp:
2227
2228 2014-08-08  Tim Horton  <timothy_horton@apple.com>
2229
2230         Build fix for 32-bit.
2231
2232         * UIProcess/mac/ServicesController.mm:
2233         (WebKit::ServicesController::ServicesController):
2234         Don't dynamically refresh services in 32-bit apps. It's not possible
2235         to write a 32-bit app with the Modern API, so this doesn't matter.
2236
2237 2014-08-08  Tim Horton  <timothy_horton@apple.com>
2238
2239         [mac] Dynamically update serviceability when the set of services changes
2240         https://bugs.webkit.org/show_bug.cgi?id=135738
2241         <rdar://problem/17533459>
2242
2243         Reviewed by Brady Eidson.
2244
2245         * UIProcess/WebContext.cpp:
2246         (WebKit::WebContext::createNewWebProcess):
2247         Adopt the new universal refreshExistingServices.
2248
2249         (WebKit::WebContext::refreshExistingServices): Deleted.
2250         * UIProcess/WebContext.h:
2251         Remove WebContext::refreshExistingServices; there's no need for it.
2252
2253         * UIProcess/mac/ServicesController.h:
2254         * UIProcess/mac/ServicesController.mm:
2255         Fix the build with only public headers by including NSSharingService.h itself.
2256         Place the NSSharingServicePicker (Details) category outside the #ifdef.
2257         Forward-declare and possibly import NSExtension SPI.
2258
2259         (WebKit::ServicesController::ServicesController):
2260         Register a callback to be notified whenever the set of services changes.
2261         When this occurs, call refreshExistingServices. We let refreshExistingServices
2262         coalesce updates because these notifications can come in small batches.
2263
2264         (WebKit::ServicesController::refreshExistingServices):
2265         Dispatch changes in service availability to all processes in all contexts.
2266
2267         * UIProcess/mac/WebContextMenuProxyMac.mm:
2268         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2269         Adjust the referenced rdar:// and call ServicesController::refreshExistingServices
2270         instead of the now-removed WebContext:: variant. We can't remove this
2271         yet because our services state can still be stale because NSServiceSharingPicker
2272         can still sometimes lie about the current service state immediately after a change occurs;
2273         once that is fixed, we should get rid of this as well as the refresh in Web Process creation.
2274
2275 2014-08-08  Timothy Horton  <timothy_horton@apple.com>
2276
2277         Clients that request the selection services menu after WebKit2 will get one with different metrics than otherwise
2278         https://bugs.webkit.org/show_bug.cgi?id=135765
2279         <rdar://problem/17962180>
2280
2281         Reviewed by Brady Eidson.
2282
2283         * UIProcess/mac/WebContextMenuProxyMac.mm:
2284         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2285         The menu is cached between clients, but we make adjustments to it.
2286         We should copy it before adjusting.
2287
2288 2014-08-08  Timothy Horton  <timothy_horton@apple.com>
2289
2290         Services overlay dropdown is often in the wrong place with zoomed pages or horizontal scrolling
2291         https://bugs.webkit.org/show_bug.cgi?id=135755
2292         <rdar://problem/17907752>
2293
2294         Reviewed by Brady Eidson.
2295
2296         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2297         (WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
2298         (WebKit::ServicesOverlayController::maybeCreateSelectionHighlight):
2299         DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection adjusts the
2300         location of the button based on the visible rect, trying to keep the button visible.
2301
2302         We're handing it the wrong visible rect, though, not taking scrolling into account.
2303
2304         This leads to pages that scroll horizontally showing the button on the left
2305         even if there's space for it on the right, or sometimes not showing it at all.
2306
2307         Instead, provide the actual main FrameView visible rect; the same coordinate
2308         space that the highlight rects are provided in.
2309
2310 2014-08-08  Timothy Horton  <timothy_horton@apple.com>
2311
2312         Additional items added to selection services menus are misaligned
2313         https://bugs.webkit.org/show_bug.cgi?id=135747
2314         <rdar://problem/17933167>
2315
2316         Reviewed by Brady Eidson.
2317
2318         * UIProcess/mac/WebContextMenuProxyMac.mm:
2319         (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2320         Use NSSharingServicePickerStyleRollover for the rollover image services menu;
2321         use NSSharingServicePickerStyleTextSelection for the selection services menu.
2322
2323         Set NSMenu's showsStateColumn to YES for selection services menus, so that
2324         other items added to the menu line up correctly.
2325
2326         Remove an unncessary .get()
2327
2328 2014-08-08  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2329
2330         [EFL] Remove unnecessary ewk_private.h includes
2331         https://bugs.webkit.org/show_bug.cgi?id=135753
2332
2333         Reviewed by Gyuyoung Kim.
2334
2335         Neither the below file uses the functionality from ewk_private.h.
2336
2337         * UIProcess/API/efl/ewk_context.cpp:
2338         * UIProcess/API/efl/ewk_context_menu_item.cpp:
2339         * UIProcess/API/efl/ewk_cookie_manager.cpp:
2340         * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
2341         * UIProcess/API/efl/ewk_popup_menu_item.cpp:
2342         * UIProcess/API/efl/ewk_view.cpp:
2343
2344 2014-08-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2345
2346         [GTK] Do not use GtkWindow:resize-grip-visible with recent GTK+ versions
2347         https://bugs.webkit.org/show_bug.cgi?id=135699
2348
2349         Reviewed by Philippe Normand.
2350
2351         Resize grips support have been removed from GTK+ since 3.13.4, the
2352         API has been deprecated and does nothing.
2353
2354         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2355         (webkitWebViewBaseSetToplevelOnScreenWindow):
2356         (resizeWebKitWebViewBaseFromAllocation):
2357
2358 2014-08-07  Tim Horton  <timothy_horton@apple.com>
2359
2360         [Services with UI] Action menu does not appear if selection includes both text and an image
2361         https://bugs.webkit.org/show_bug.cgi?id=135731
2362         <rdar://problem/17837491>
2363
2364         Reviewed by Dean Jackson.
2365
2366         * UIProcess/WebContext.cpp:
2367         (WebKit::WebContext::createNewWebProcess):
2368         Initialize hasRichContentServices with the cached value.
2369
2370 2014-08-07  Benjamin Poulain  <bpoulain@apple.com>
2371
2372         Get rid of SCRIPTED_SPEECH
2373         https://bugs.webkit.org/show_bug.cgi?id=135729
2374
2375         Reviewed by Brent Fulgham.
2376
2377         * Configurations/FeatureDefines.xcconfig:
2378
2379 2014-08-07  Timothy Horton  <timothy_horton@apple.com>
2380
2381         setCustomSwipeViews inside didChangeBackForwardList client callback is ignored
2382         https://bugs.webkit.org/show_bug.cgi?id=135633
2383         <rdar://problem/17926507>
2384
2385         Reviewed by Sam Weinig.
2386
2387         * UIProcess/PageClient.h:
2388         * UIProcess/WebPageProxy.cpp:
2389         (WebKit::WebPageProxy::didChangeBackForwardList):
2390         * UIProcess/ios/PageClientImplIOS.h:
2391         * UIProcess/ios/PageClientImplIOS.mm:
2392         (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted.
2393         * UIProcess/mac/PageClientImpl.h:
2394         * UIProcess/mac/PageClientImpl.mm:
2395         (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted.
2396         WebKit clears the set of custom swipe views at the end of WebPageProxy::didChangeBackForwardList,
2397         *after* calling into the client. This means that if the client wants to setCustomSwipeViews in
2398         didChangeBackForwardList, it won't be respected.
2399
2400         Since there's only one client of this SPI, let's just stop clearing the list of custom swipe
2401         views in WebKit and leave that totally up to the client.
2402
2403 2014-08-07  Enrica Casucci  <enrica@apple.com>
2404
2405         [Services with UI] Action menu does not appear if selection includes both text and an image.
2406         https://bugs.webkit.org/show_bug.cgi?id=135731
2407         <rdar://problem/17837491>
2408
2409         Reviewed by Brady Eidson.
2410
2411         Adding a new setting to ServicesController to communicate to the WebProcess if
2412         there are services installed that can handle a combination of text and images.
2413         This way ServicesOverlayController can decide if it appropriate to show the hightlight
2414         based on the type of selection (text only or non text only). This information is retrieved
2415         when the selection rects are collected by SelectionGatherer and used by
2416         SelectionGatherer::Notifier to communicate the selection change.
2417
2418         * Shared/WebProcessCreationParameters.cpp:
2419         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
2420         * Shared/WebProcessCreationParameters.h:
2421         * UIProcess/mac/ServicesController.h:
2422         (WebKit::ServicesController::hasRichContentServices):
2423         * UIProcess/mac/ServicesController.mm:
2424         (WebKit::ServicesController::ServicesController):
2425         (WebKit::ServicesController::refreshExistingServices):
2426         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2427         (WebKit::WebEditorClient::selectionRectsDidChange):
2428         * WebProcess/WebCoreSupport/WebEditorClient.h:
2429         * WebProcess/WebPage/ServicesOverlayController.h:
2430         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2431         (WebKit::ServicesOverlayController::ServicesOverlayController):
2432         (WebKit::ServicesOverlayController::selectionRectsDidChange):
2433         (WebKit::ServicesOverlayController::drawSelectionHighlight):
2434         * WebProcess/WebProcess.cpp:
2435         (WebKit::WebProcess::WebProcess):
2436         (WebKit::WebProcess::initializeWebProcess):
2437         (WebKit::WebProcess::setEnabledServices):
2438         * WebProcess/WebProcess.h:
2439         (WebKit::WebProcess::hasRichContentServices):
2440         * WebProcess/WebProcess.messages.in:
2441
2442 2014-08-07  Ryuan Choi  <ryuan.choi@samsung.com>
2443
2444         [EFL] Fix several warnings of doxygen
2445         https://bugs.webkit.org/show_bug.cgi?id=135643
2446
2447         Reviewed by Gyuyoung Kim.
2448
2449         * UIProcess/API/efl/ewk_context_menu_item.h: Removed /info which is not doxygen keyword and unnecessary to the user.
2450         * UIProcess/API/efl/ewk_cookie_manager.h: Fixed parameter name.
2451         * UIProcess/API/efl/ewk_form_submission_request.h: Removed # from Eina_List because doxygen may not know the EFL structures.
2452         * UIProcess/API/efl/ewk_page_group.h: Fixed to match with parameter name.
2453         * UIProcess/API/efl/ewk_settings.h: Fixed wrong keyword and parameter name.
2454         * UIProcess/API/efl/ewk_text_checker.h: Ditto.
2455         * UIProcess/API/efl/ewk_view.h:
2456         - Used escape string for the tag.
2457         - Used @code, @endcode for media query example.
2458
2459 2014-08-07  Benjamin Poulain  <bpoulain@apple.com>
2460
2461         Get rid of INPUT_SPEECH
2462         https://bugs.webkit.org/show_bug.cgi?id=135672
2463
2464         Reviewed by Andreas Kling.
2465
2466         * Configurations/FeatureDefines.xcconfig:
2467         * PlatformGTK.cmake:
2468
2469 2014-08-07  Timothy Hatcher  <timothy@apple.com>
2470
2471         Web Inspector: Update glyphs to be more like Xcode 6
2472         https://bugs.webkit.org/show_bug.cgi?id=135705
2473
2474         Reviewed by Joseph Pecoraro.
2475
2476         * Resources/DockBottom.pdf: Added.
2477         * Resources/DockBottomLegacy.pdf: Copied from Source/WebKit/mac/Resources/Dock.pdf.
2478         * Resources/DockRight.pdf: Added.
2479         * Resources/DockRightLegacy.pdf: Copied from Source/WebKit2/Resources/DockRight.pdf.
2480         * UIProcess/mac/WebInspectorProxyMac.mm:
2481         (WebKit::WebInspectorProxy::createInspectorWindow): Use new images.
2482         * WebKit2.xcodeproj/project.pbxproj: Added new images.
2483
2484 2014-08-07  Oliver Hunt  <oliver@apple.com>
2485
2486         WebContent needs access to HSTS database due to some networking still being performed in process
2487         https://bugs.webkit.org/show_bug.cgi?id=135711
2488         <rdar://17940220>
2489
2490         Reviewed by Alexey Proskuryakov.
2491
2492         Simple patch in the same theme as the equivalent network process
2493         extension.  Provide an extension that covers the WebContent specific
2494         HSTS file and consume it on launch.
2495
2496         * Shared/WebProcessCreationParameters.cpp:
2497         (WebKit::WebProcessCreationParameters::encode):
2498         (WebKit::WebProcessCreationParameters::decode):
2499         * Shared/WebProcessCreationParameters.h:
2500         * UIProcess/WebContext.cpp:
2501         (WebKit::WebContext::createNewWebProcess):
2502         * UIProcess/WebContext.h:
2503         * UIProcess/mac/WebContextMac.mm:
2504         (WebKit::WebContext::webContentHSTSDatabasePath):
2505         * WebProcess/cocoa/WebProcessCocoa.mm:
2506         (WebKit::WebProcess::platformInitializeWebProcess):
2507
2508 2014-08-07  Gordon Sheridan  <gordon_sheridan@apple.com>
2509
2510         Clear the m_previousItem member of HistoryControllers when it matches the HistoryItem being removed.
2511         https://bugs.webkit.org/show_bug.cgi?id=135634
2512         <rdar://problem/17388461>
2513
2514         Reviewed by Brady Eidson.
2515
2516         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2517         (WebKit::WebBackForwardListProxy::removeItem):
2518         Call WebCore::Page::clearPreviousItemFromAllPages() for each item removed from
2519         the back/forward list to ensure the page URL is released from IconDatabase.
2520
2521 2014-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2522
2523         [GTK] Use WebKitNavigationAction also for WebKitNavigationPolicyDecision
2524         https://bugs.webkit.org/show_bug.cgi?id=135695
2525
2526         Reviewed by Gustavo Noronha Silva.
2527
2528         WebKitNavigationAction was introduced to extend WebKitWebView::create signal
2529         and its API is mostly duplicated in WebKitNavigationPolicyDecision.
2530         Use WebKitNavigationAction insternally in WebKitNavigationPolicyDecision and
2531         deprecated all the duplicated API in favor of a single property navigation-action.
2532
2533         * UIProcess/API/gtk/WebKitDefines.h: Remove unused macro
2534         WEBKIT_OBSOLETE and add WEBKIT_DEPRECATED and WEBKIT_DEPRECATED_FOR.
2535         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
2536         (_WebKitNavigationPolicyDecisionPrivate::~_WebKitNavigationPolicyDecisionPrivate):
2537         Free the WebKitNavigationAction.
2538         (webkitNavigationPolicyDecisionGetProperty): Add getter for
2539         navigation-action and use WebKitNavigationAction in all other getters.
2540         (webkit_navigation_policy_decision_class_init): Add navigation-action
2541         property and deprecated all others except frame-name.
2542         (webkit_navigation_policy_decision_get_navigation_action): Return the WebKitNavigationAction.
2543         (webkit_navigation_policy_decision_get_navigation_type): Use WebKitNavigationAction.
2544         (webkit_navigation_policy_decision_get_mouse_button): Ditto.
2545         (webkit_navigation_policy_decision_get_modifiers): Ditto.
2546         (webkit_navigation_policy_decision_get_request): Ditto.
2547         (webkitNavigationPolicyDecisionCreate):
2548         (webkitNewWindowPolicyDecisionCreate):
2549         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
2550         * UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h:
2551         * UIProcess/API/gtk/WebKitPolicyClient.cpp: Use a custom
2552         PolicyClient class so that we receive a NavigationActionData in
2553         the callbacks.
2554         (attachPolicyClientToView):
2555         (toWebKitNavigationType): Deleted.
2556         (decidePolicyForNavigationAction): Deleted.
2557         (decidePolicyForNewWindowAction): Deleted.
2558         (decidePolicyForResponse): Deleted.
2559         * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
2560         (webkitResponsePolicyDecisionCreate):
2561         * UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h:
2562         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
2563         deprecated symbols.
2564         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
2565
2566 2014-08-06  Antti Koivisto  <antti@apple.com>
2567
2568         Move Soup specific code out of WebCoreArgumentCoders.cpp
2569         https://bugs.webkit.org/show_bug.cgi?id=135665
2570
2571         Reviewed by Anders Carlsson.
2572
2573         * Shared/WebCoreArgumentCoders.cpp:
2574         (IPC::ArgumentCoder<ResourceRequest>::encode):
2575         (IPC::ArgumentCoder<ResourceRequest>::decode):
2576         (IPC::ArgumentCoder<ResourceError>::encode):
2577         (IPC::ArgumentCoder<ResourceError>::decode):
2578         * Shared/WebCoreArgumentCoders.h:
2579         
2580             Soup is the only client for this code. Move it to *Soup.cpp
2581
2582         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
2583         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
2584         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
2585         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
2586         (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
2587
2588 2014-08-06  Tim Horton  <timothy_horton@apple.com>
2589
2590         Services overlay flashes a lot; should have some hysteresis before showing overlay
2591         https://bugs.webkit.org/show_bug.cgi?id=135683
2592         <rdar://problem/16878039>
2593
2594         Reviewed by Simon Fraser.
2595
2596         Don't show the highlight until it's been 200ms since the last change
2597         in selection or change in which highlight is hovered, whichever was more recent.
2598
2599         * WebProcess/WebPage/ServicesOverlayController.h:
2600         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2601         (WebKit::ServicesOverlayController::ServicesOverlayController):
2602         (WebKit::ServicesOverlayController::selectionRectsDidChange):
2603         Keep track of when the selection last changed.
2604
2605         (WebKit::ServicesOverlayController::drawTelephoneNumberHighlightIfVisible):
2606         Make establishHoveredTelephoneHighlight take a bool instead of Boolean.
2607
2608         (WebKit::ServicesOverlayController::mouseIsOverHighlight):
2609         Factor mouseIsOverHighlight out of establishHoveredTelephoneHighlight and drawHighlight.
2610
2611         (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
2612         Return the amount of time until the highlight should be shown; this is
2613         the maximum of (the difference between the last selection change and the timeout)
2614         and (the difference between the last change in which highlight is hovered and the timeout).
2615
2616         Telephone number highlights are shown immediately, because they are already stable
2617         by virtue of being expanded to include the entire telephone number.
2618
2619         (WebKit::ServicesOverlayController::repaintHighlightTimerFired):
2620         (WebKit::ServicesOverlayController::drawHighlight):
2621         If the highlight shouldn't be shown yet (because we haven't hit the two timeouts),
2622         schedule a timer to repaint us around when we will hit the timeouts.
2623
2624         (WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
2625         (WebKit::ServicesOverlayController::mouseEvent):
2626         Don't allow mouseUp to trigger the menu if we shouldn't be showing the overlay yet.
2627
2628 2014-08-06  Simon Fraser  <simon.fraser@apple.com>
2629
2630         [iOS WK2] www.france24.com doesn't always load the page, sections stay white
2631         https://bugs.webkit.org/show_bug.cgi?id=135684
2632         <rdar://problem/17931712>
2633
2634         Reviewed by Tim Horton.
2635         
2636         It's possible for a UIScrollView for overflow to move between one scrolling tree node
2637         and another. When this happens, we need to avoid unconditionally clearing the delegate
2638         on the node that's being destroyed, because the new node will already have set the
2639         UIScrollView delegate to its own delegate.
2640
2641         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2642         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::~ScrollingTreeOverflowScrollingNodeIOS):
2643
2644 2014-08-06  Dean Jackson  <dino@apple.com>
2645
2646         ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED is not used anywhere. Remove it.
2647         https://bugs.webkit.org/show_bug.cgi?id=135675
2648
2649         Reviewed by Sam Weinig.
2650
2651         * Configurations/FeatureDefines.xcconfig:
2652
2653 2014-08-06  Brady Eidson and Jeffrey Pfau <beidson@apple.com>
2654
2655         IDB transactions never reset if the Web Process ends before cleaning up
2656         https://bugs.webkit.org/show_bug.cgi?id=135218
2657
2658         Reviewed by Darin Adler and David Kilzer.
2659
2660         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
2661         (WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
2662         (WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage): Added.
2663         (WebKit::DatabaseToWebProcessConnection::didClose):
2664         * DatabaseProcess/DatabaseToWebProcessConnection.h:
2665
2666         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
2667         (WebKit::DatabaseProcessIDBConnection::resetTransactionSync): Added
2668             Wait until the reset is complete before sending the sync reply.
2669         (WebKit::DatabaseProcessIDBConnection::rollbackTransactionSync): Added.
2670             Ditto.
2671         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
2672         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
2673
2674         Keep track of all in progress transactions and make sure they’re cleaned up
2675         whenever a connection to a WebProcess is broken:
2676         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2677         (WebKit::UniqueIDBDatabase::unregisterConnection):
2678         (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
2679         (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
2680         (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
2681         (WebKit::UniqueIDBDatabase::didEstablishTransaction):
2682         (WebKit::UniqueIDBDatabase::didResetTransaction):
2683         (WebKit::UniqueIDBDatabase::resetAllTransactions):
2684         (WebKit::UniqueIDBDatabase::finalizeRollback):
2685         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2686
2687         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2688         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
2689
2690         Add sync versions of reset/rollback:
2691         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2692         (WebKit::WebIDBServerConnection::resetTransactionSync):
2693         (WebKit::WebIDBServerConnection::rollbackTransactionSync):
2694         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2695
2696 2014-08-06  Wenson Hsieh  <wenson_hsieh@apple.com>
2697
2698         Implement parsing for CSS scroll snap points
2699         https://bugs.webkit.org/show_bug.cgi?id=134301
2700
2701         Reviewed by Dean Jackson.
2702
2703         * Configurations/FeatureDefines.xcconfig: Added ENABLE_CSS_SCROLL_SNAP
2704
2705 2014-08-06  Andy Estes  <aestes@apple.com>
2706
2707         [iOS] Subresources referenced in converted QuickLook documents sometimes fail to load
2708         https://bugs.webkit.org/show_bug.cgi?id=135676
2709
2710         Reviewed by David Kilzer.
2711
2712         QuickLookHandle needs to stay alive in order for its NSURLProtocol to service subresource loads originating
2713         from the converted HTML document. Some of these loads happen dynamically after the main resource finishes
2714         loading, so we cannot tie the lifetime of the QuickLookHandle to that of the main resource's ResourceLoader.
2715         Instead, give ownership of the QuickLookHandle to DocumentLoader.
2716
2717         * WebProcess/Network/WebResourceLoader.cpp:
2718         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Stored the created QuickLookHandle in DocumentLoader.
2719         (WebKit::WebResourceLoader::didReceiveData): Accessed DocumentLoader's QuickLookHandle.
2720         (WebKit::WebResourceLoader::didFinishResourceLoad): Ditto.
2721         (WebKit::WebResourceLoader::didFailResourceLoad): Ditto.
2722         (WebKit::WebResourceLoader::didReceiveResource): Ditto.
2723         * WebProcess/Network/WebResourceLoader.h: Removed m_quickLookHandle.
2724
2725 2014-08-06  Filip Pizlo  <fpizlo@apple.com>
2726
2727         Merge r171389, r171495, r171508, r171510, r171605, r171606, r171611, r171614, r171763 from ftlopt.
2728
2729     2014-08-06  Mark Hahnenberg  <mhahnenberg@apple.com>
2730     
2731             Refactor our current implementation of for-in
2732             https://bugs.webkit.org/show_bug.cgi?id=134142
2733     
2734             Reviewed by Filip Pizlo.
2735     
2736             * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2737             (WebKit::JSNPObject::invalidate): Fixed an invalid ASSERT that was crashing in debug builds.
2738     
2739 2014-08-06  Alexey Proskuryakov  <ap@apple.com>
2740
2741         REGRESSION (WebKit2): iOS Safari default encoding doesn't follow system language
2742         https://bugs.webkit.org/show_bug.cgi?id=135667
2743         <rdar://problem/17862892>
2744
2745         Reviewed by Anders Carlsson.
2746
2747         * Shared/WebPreferencesDefinitions.h: Compute the actual proper default, don't
2748         hardcode it to ISO-8859-1 hoping that someone else will correct it later.
2749
2750         * Shared/WebPreferencesStore.cpp: Added an include for WebPreferencesDefinitions.h
2751         macro expansion to compile.
2752
2753         * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults):
2754         Added a FIXME.
2755
2756         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
2757         We now use WKGetWebDefaultCFStringEncoding in WebCore, so it needs to be initialized.
2758
2759 2014-08-06  Adrian Perez de Castro  <aperez@igalia.com>
2760
2761         [GTK] Add support for user scripts to WebKitUserContentManager
2762         https://bugs.webkit.org/show_bug.cgi?id=134738
2763
2764         Reviewed by Carlos Garcia Campos.
2765
2766         Add support for user scripts, to complement the user style sheet
2767         support already present in WebKitUserContentManager. Most of the
2768         moving parts are already present, so this just adds a boxed type
2769         for user scripts (WebKitUserScript) and the corresponding methods
2770         to add and remove scripts from the WebKitUserContentManager.
2771
2772         * UIProcess/API/gtk/WebKitUserContent.cpp: Add a WebKitUserScript
2773         boxed type and its corresponding methods and enums.
2774         (toUserScriptInjectionTime): Needed to convert
2775         WebKitUserScriptInjectionTime values into its WebCore counterparts.
2776         (_WebKitUserScript::_WebKitUserScript): Added.
2777         (_WebKitUserScript::referenceCount): Ditto.
2778         (webkit_user_script_ref):
2779         (webkit_user_script_unref):
2780         (webkit_user_script_new):
2781         (webkitUserScriptGetUserScript): Internal method to obtain the
2782         boxed WebCore::UserScript value.
2783         * UIProcess/API/gtk/WebKitUserContent.h: Add the new public API
2784         methods.
2785         * UIProcess/API/gtk/WebKitUserContentManager.cpp: Implement the
2786         methods for adding and removing user scripts.
2787         (webkit_user_content_manager_add_script):
2788         (webkit_user_content_manager_remove_all_scripts):
2789         * UIProcess/API/gtk/WebKitUserContentManager.h: Add the new public
2790         API methods.
2791         * UIProcess/API/gtk/WebKitUserContentPrivate.h: Add the definition
2792         for the new private function.
2793         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the
2794         new public methods in the API documentation.
2795
2796 2014-08-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2797
2798         [GTK] Be able to disable gtk2 dependency
2799         https://bugs.webkit.org/show_bug.cgi?id=135505
2800
2801         Reviewed by Gustavo Noronha Silva.
2802
2803         * PlatformGTK.cmake: Only build WebKitPluginProcess2 when
2804         ENABLE_PLUGIN_PROCESS_GTK2 is ON.
2805         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2806         (WebKit::ProcessLauncher::launchProcess): Do not try to launch
2807         WebKitPluginProcess2 executable when ENABLE_PLUGIN_PROCESS_GTK2 is OFF.
2808
2809 2014-08-05  Tim Horton  <timothy_horton@apple.com>
2810
2811         REGRESSION (r164337): Pages are sometimes cut off/oriented incorrectly after using WKThumbnailView
2812         https://bugs.webkit.org/show_bug.cgi?id=135622
2813         <rdar://problem/17202556>
2814
2815         Reviewed by Dan Bernstein.
2816
2817         In some cases (when the page changed scroll offset while thumbnailed),
2818         when transitioning back to thumbnail scale = 1, we would get the math
2819         wrong and end up with a non-identity sublayerTransform on the DrawingArea.
2820
2821         Luckily, none of this code is necessary anymore, as the only client
2822         of WKThumbnailView only uses its snapshotting mode.
2823
2824         * Shared/ImageOptions.h:
2825         Remove SnapshotOptionsRespectDrawingAreaTransform; DrawingArea no longer
2826         has a rootLayerTransform().
2827
2828         * UIProcess/WebPageProxy.cpp:
2829         (WebKit::WebPageProxy::setThumbnailScale): Deleted.
2830         * UIProcess/WebPageProxy.h:
2831         * WebProcess/WebPage/WebPage.cpp:
2832         (WebKit::WebPage::WebPage):
2833         (WebKit::WebPage::scaledSnapshotWithOptions):
2834         (WebKit::WebPage::snapshotAtSize):
2835         
2836         (WebKit::WebPage::setThumbnailScale): Deleted.
2837         * WebProcess/WebPage/WebPage.h:
2838         * WebProcess/WebPage/WebPage.messages.in:
2839         Remove setThumbnailScale and SnapshotOptionsRespectDrawingAreaTransform.
2840
2841         * WebProcess/WebPage/WebPage.cpp:
2842         (WebKit::WebPage::didCommitLoad):
2843         Revert this to its state before r164337, as we no longer have "thumbnail scale".
2844
2845         * UIProcess/API/Cocoa/_WKThumbnailView.h:
2846         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
2847         (-[_WKThumbnailView initWithFrame:fromWKView:]):
2848         (-[_WKThumbnailView _viewWasUnparented]):
2849         (-[_WKThumbnailView _viewWasParented]):
2850         (-[_WKThumbnailView _requestSnapshotIfNeeded]):
2851         (-[_WKThumbnailView setScale:]):
2852         Clean up code assuming _shouldApplyThumbnailScale = NO, _usesSnapshot = YES.
2853
2854         (-[_WKThumbnailView setUsesSnapshot:]):
2855         (-[_WKThumbnailView usesSnapshot]):
2856         Always return YES from usesSnapshot; we only support snapshotting WKThumbnailViews.
2857         Ignore setUsesSnapshot.
2858
2859         * UIProcess/API/mac/WKView.mm:
2860         (-[WKView _setThumbnailView:]):
2861         (-[WKView _updateThumbnailViewLayer]):
2862         Stop checking usesSnapshot; it's always true.
2863
2864         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2865         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2866         (WebKit::TiledCoreAnimationDrawingArea::setRootLayerTransform): Deleted.
2867         * WebProcess/WebPage/DrawingArea.cpp:
2868         (WebKit::DrawingArea::rootLayerTransform): Deleted.
2869         * WebProcess/WebPage/DrawingArea.h:
2870         (WebKit::DrawingArea::setRootLayerTransform): Deleted.
2871         Remove rootLayerTransform() and setRootLayerTransform().
2872
2873 2014-08-05  Peyton Randolph  <prandolph@apple.com>
2874
2875         Rename MAC_LONG_PRESS feature flag to LONG_MOUSE_PRESS.
2876         https://bugs.webkit.org/show_bug.cgi?id=135276
2877
2878         Reviewed by Beth Dakin.
2879
2880         * Configurations/FeatureDefines.xcconfig:
2881
2882 2014-08-04  Andy Estes  <aestes@apple.com>
2883
2884         [iOS] The raw bytes of an iWork document's PDF preview are displayed rather than the PDF itself
2885         https://bugs.webkit.org/show_bug.cgi?id=135596
2886
2887         Reviewed by David Kilzer.
2888
2889         * WebProcess/Network/WebResourceLoader.cpp:
2890         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): If the response will be handled by
2891         QuickLook, do not call ResourceLoader::didReceiveResponse. It will be called later by
2892         WebResourceLoaderQuickLookDelegate once converted data is received.
2893
2894 2014-08-05  Alexey Proskuryakov  <ap@apple.com>
2895
2896         Build fix.
2897
2898         * UIProcess/WebContext.h:
2899
2900 2014-08-05  Oliver Hunt  <oliver@apple.com>
2901
2902         SSO expects to be able to walk parent application's bundle
2903         https://bugs.webkit.org/show_bug.cgi?id=135581
2904         <rdar://problem/17864079>
2905
2906         Reviewed by Alexey Proskuryakov.
2907
2908         SSO expects to be able to walk the parent application's
2909         bundle looking for Info plists. To allow this to actually
2910         work we provide an extension from the ui process that
2911         covers the bundle directory, and then in the profile
2912         restrict access to the ability to read directories and
2913         files named Info.plist.
2914
2915         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2916         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2917         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2918         * Shared/Network/NetworkProcessCreationParameters.cpp:
2919         (WebKit::NetworkProcessCreationParameters::encode):
2920         (WebKit::NetworkProcessCreationParameters::decode):
2921         * Shared/Network/NetworkProcessCreationParameters.h:
2922         * UIProcess/WebContext.cpp:
2923         (WebKit::WebContext::ensureNetworkProcess):
2924         (WebKit::WebContext::parentBundleDirectory):
2925         * UIProcess/WebContext.h:
2926         * UIProcess/mac/WebContextMac.mm:
2927         (WebKit::WebContext::parentBundleDirectory):
2928
2929 2014-08-04  Benjamin Poulain  <benjamin@webkit.org>
2930
2931         Add a flag for the CSS Selectors level 4 implementation
2932         https://bugs.webkit.org/show_bug.cgi?id=135535
2933
2934         Reviewed by Andreas Kling.
2935
2936         * Configurations/FeatureDefines.xcconfig:
2937
2938 2014-08-04  Benjamin Poulain  <bpoulain@apple.com>
2939
2940         Check for null frame when processing geolocation authorization request
2941         https://bugs.webkit.org/show_bug.cgi?id=135577
2942         <rdar://problem/17896295>
2943
2944         Reviewed by Geoffrey Garen.
2945
2946         I could have put the null check in GeolocationController instead of the WebKit layer,
2947         but that would be a little weird as GeolocationController knows nothing about how
2948         the WebKit layer decides what to do with requests.
2949
2950         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
2951         (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
2952
2953 2014-08-02  Jeremy Jones  <jeremyj@apple.com>
2954
2955         Support both window and view based video fullscreen.
2956         https://bugs.webkit.org/show_bug.cgi?id=135525
2957
2958         Reviewed by Simon Fraser.
2959
2960         Parenting in the view instead of the window gives the fullscreen implementation more latitude 
2961         in how it implements the animation.
2962
2963         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2964         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Use view instead of window.
2965         * WebProcess/ios/WebVideoFullscreenManager.mm:
2966         (WebKit::clientRectForNode): Use client rect instead of screen rect.
2967         (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): ditto
2968         (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
2969         (WebKit::screenRectForNode): Deleted.
2970
2971 2014-08-01  Dan Bernstein  <mitz@apple.com>
2972
2973         <rdar://problem/17891752> [iOS] WebKit links against libraries it doesn’t use
2974         https://bugs.webkit.org/show_bug.cgi?id=135536
2975
2976         Reviewed by Tim Horton.
2977
2978         * Configurations/WebKit.xcconfig: Removed -lassertion_extension and -framework MobileAsset
2979         from FRAMEWORK_AND_LIBRARY_LDFLAGS_iphonesimulator.
2980
2981 2014-08-01  Joseph Pecoraro  <pecoraro@apple.com>
2982
2983         [iOS WK2] Add extension read permission to network sandbox profile
2984         <rdar://problem/17671574>
2985
2986         Reviewed by Alexey Proskuryakov and Oliver Hunt.
2987
2988         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2989
2990 2014-08-01  Oliver Hunt  <oliver@apple.com>
2991
2992         Various frameworks may want to use the container temp directory, so our current restrictions are too tight
2993         https://bugs.webkit.org/show_bug.cgi?id=135518
2994         <rdar://17869279>
2995
2996         Reviewed by Anders Carlsson.
2997
2998         We don't (and can't) have complete knowledge of what different frameworks
2999         will want to use the container temporary directory for, and so our
3000         current attempt to heavily restrict access is simply too tight.
3001
3002         This patch recognises this by simply giving read-write access to the
3003         entire NSTemporary() directory (e.g. $container/tmp in the general case),
3004         rather than the single sub directory we wishfully thought that we would
3005         be able to get away with.
3006
3007         * Shared/WebProcessCreationParameters.cpp:
3008         (WebKit::WebProcessCreationParameters::encode):
3009         (WebKit::WebProcessCreationParameters::decode):
3010         * Shared/WebProcessCreationParameters.h:
3011         * UIProcess/WebContext.cpp:
3012         (WebKit::WebContext::createNewWebProcess):
3013         (WebKit::WebContext::mediaCacheDirectory): Deleted.
3014         * UIProcess/WebContext.h:
3015         * UIProcess/efl/WebContextEfl.cpp:
3016         (WebKit::WebContext::containerTemporaryDirectory):
3017         (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
3018         * UIProcess/gtk/WebContextGtk.cpp:
3019         (WebKit::WebContext::containerTemporaryDirectory):
3020         (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
3021         * UIProcess/mac/WebContextMac.mm:
3022         (WebKit::WebContext::containerTemporaryDirectory):
3023         (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
3024         * WebProcess/cocoa/WebProcessCocoa.mm:
3025         (WebKit::WebProcess::platformInitializeWebProcess):
3026
3027 2014-08-01  Dan Bernstein  <mitz@apple.com>
3028
3029         <rdar://problem/17862013> REGRESSION (r169357): Disabling "allow plug-ins" doesn't stick on quit/relaunch
3030         https://bugs.webkit.org/show_bug.cgi?id=135511
3031
3032         Reviewed by Alexey Proskuryakov.
3033
3034         Since the values map in the preferences store doesn’t include values that are equal to the
3035         defaults, we need to update it when a new default is registered.
3036
3037         * UIProcess/WebPreferences.cpp:
3038         (WebKit::WebPreferences::createWithLegacyDefaults): Changed to use new member functions
3039         for registering defaults.
3040         (WebKit::WebPreferences::registerDefaultBoolValueForKey): Added. Sets an override default
3041         in the store, and sets the user default, if there is one, on top of it.
3042         (WebKit::WebPreferences::registerDefaultUInt32ValueForKey): Ditto.
3043         * UIProcess/WebPreferences.h: Declared new member functions for getting the user default
3044         value for a key.
3045
3046         * UIProcess/efl/WebPreferencesEfl.cpp:
3047         (WebKit::WebPreferences::platformGetStringUserValueForKey): Added an implementation that
3048         returns false, because the EFL port doesn’t support persistent user defaults.
3049         (WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
3050         (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
3051         (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.
3052
3053         * UIProcess/gtk/WebPreferencesGtk.cpp:
3054         (WebKit::WebPreferences::platformGetStringUserValueForKey): Ditto for the GTK port.
3055         (WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
3056         (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
3057         (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.
3058
3059         * UIProcess/mac/WebPreferencesMac.mm:
3060         (WebKit::WebPreferences::platformGetStringUserValueForKey): Added. Replaces
3061         setStringValueIfInUserDefaults, on which it is based.
3062         (WebKit::WebPreferences::platformGetBoolUserValueForKey): Similarly for booleans.
3063         (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Similarly for integers.
3064         (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Similarly for doubles.
3065         (WebKit::WebPreferences::platformInitializeStore): Changed to use the above functions.
3066
3067 2014-08-01  Brent Fulgham  <bfulgham@apple.com>
3068
3069         [Mac] Fullscreen mode for some applications shows only a black screen.
3070         https://bugs.webkit.org/show_bug.cgi?id=135493
3071         <rdar://problem/17628212>
3072
3073         Reviewed by Jer Noble.
3074
3075         In some applications, the window hosting the WKView is an InProcess layer hosting mode.
3076         The fullscreen window created by the WKFullScreenWindowController defaults to an
3077         OutOfProcess mode.
3078
3079         When this kind of mismatch is encountered, the WK2 layer in the UI process is supposed
3080         to send a message back to the WebProcess indicating that the layer hosting mode of the
3081         containing window is different, so that the WebProcess can adjust its logic accordingly.
3082         Unfortunately, the notification that this had happened was not getting sent to the
3083         WebProcess due to an optimization in window state change logic (see Bug 135509 for
3084         details).
3085
3086         The fix is to check layer hosting mode state when a WKView is added to a window, and
3087         notify the WebProcess when it needs to change state to match.
3088         
3089
3090         * UIProcess/API/mac/WKView.mm:
3091         (-[WKView viewDidMoveToWindow]): When moving to a new window, always call
3092         'layerHostingModeDidChange' to pick up any changes in the layer hosting mode.
3093
3094 2014-08-01  Carlos Garcia Campos  <cgarcia@igalia.com>
3095
3096         [CMake] GTK and EFL are using PROJECT_VERSION_PATCH to define the micro version
3097         https://bugs.webkit.org/show_bug.cgi?id=135501
3098
3099         Reviewed by Gyuyoung Kim.
3100
3101         Use PROJECT_VERSION_MICRO instead.
3102
3103         * UIProcess/API/efl/EWebKit2.h.in:
3104         * UIProcess/API/gtk/WebKitVersion.h.in:
3105
3106 2014-08-01  Carlos Garcia Campos  <cgarcia@igalia.com>
3107
3108         Unreviewed. Add missing sections to documentation.
3109
3110         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
3111         WebKitUserContent and WebKitUserContentManager sections to the
3112         documentation.
3113
3114 2014-08-01  Ryuan Choi  <ryuan.choi@samsung.com>
3115
3116         [EFL] Unable to do make install since r171901
3117         https://bugs.webkit.org/show_bug.cgi?id=135497
3118
3119         Reviewed by Gyuyoung Kim.
3120
3121         * PlatformEfl.cmake: Removed ewk_defins.h from the installation list.
3122
3123 2014-07-31  Ryuan Choi  <ryuan.choi@samsung.com>
3124
3125         [EFL][WK2] MiniBrower comes to crash when combo box is pressed
3126         https://bugs.webkit.org/show_bug.cgi?id=135378
3127
3128         Reviewed by Gyuyoung Kim.
3129
3130         Added doxygen comment of popup_menu_show/popup_menu_hide not to confuse the usage.
3131
3132         * UIProcess/API/efl/ewk_view.h:
3133
3134 2014-07-31  Ryuan Choi  <ryuan.choi@samsung.com>
3135
3136         [EFL] remove ewk_defines.h
3137         https://bugs.webkit.org/show_bug.cgi?id=135456
3138
3139         Reviewed by Gyuyoung Kim.
3140
3141         * UIProcess/API/efl/ewk_context_menu.h:
3142         * UIProcess/API/efl/ewk_context_menu_item.h: Moved the declaration from ewk_defines.h
3143         * UIProcess/API/efl/ewk_defines.h: Removed.
3144
3145 2014-07-31  Brent Fulgham  <bfulgham@apple.com>
3146
3147         Unreviewed typo correction.
3148         https://bugs.webkit.org/show_bug.cgi?id=135482
3149
3150         Rename '_fullScreenIsEnabled' -> '_fullScreenEnabled'
3151
3152         * UIProcess/API/Cocoa/WKPreferences.mm:
3153         (-[WKPreferences _fullScreenEnabled]): Added
3154         (-[WKPreferences _fullScreenIsEnabled]): Deleted.
3155         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3156
3157 2014-07-31  Brent Fulgham  <bfulgham@apple.com>
3158
3159         MiniBrowser Should Support Fullscreen Videos in WebKit2 Mode
3160         https://bugs.webkit.org/show_bug.cgi?id=135482
3161
3162         Reviewed by Simon Fraser.
3163         
3164         Add accessors for the missing Fullscreen API so that MiniBrowser
3165         can use them.
3166
3167         * UIProcess/API/Cocoa/WKPreferences.mm:
3168         (-[WKPreferences _fullScreenIsEnabled]): Added.
3169         (-[WKPreferences _setFullScreenEnabled:]): Added.
3170         * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Add accessor for
3171         Fullscreen mode.
3172
3173 2014-07-31  Beth Dakin  <bdakin@apple.com>
3174
3175         Hit-testing broken in WebKit 1 views with AppKit's contentInsets
3176         https://bugs.webkit.org/show_bug.cgi?id=135434
3177         -and corresponding-
3178         <rdar://problem/17850323>
3179
3180         Reviewed by Benjamin Poulain.
3181
3182         Re-named functions.
3183         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3184         (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
3185         (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
3186
3187 2014-07-31  Oliver Hunt  <oliver@apple.com>
3188
3189         Various SSO services need the networking process to be able to spoof its bundle id
3190         https://bugs.webkit.org/show_bug.cgi?id=135468
3191         <rdar://problem/17864139>
3192
3193         Reviewed by Alexey Proskuryakov.
3194
3195         Just add the entitlement required to allow the sandbox to let this happen.
3196
3197         * Configurations/Network-iOS.entitlements:
3198
3199 2014-07-31  Przemyslaw Kuczynski  <p.kuczynski@samsung.com>
3200
3201         Fix uninitialized scalar variable
3202         https://bugs.webkit.org/show_bug.cgi?id=135461
3203
3204         Reviewed by Alexey Proskuryakov.
3205
3206         If fopen fails, returned ApplicationMemoryStats structure will be uninitialized
3207
3208         * Shared/linux/WebMemorySamplerLinux.cpp:
3209         (WebKit::sampleMemoryAllocatedForApplication): Initialized applicationStats.
3210
3211 2014-07-31  Rohit Kumar  <kumar.rohit@samsung.com>
3212
3213         Clean up the WebKit build from unused parameter warning in Webkit2/WebProcess module
3214         https://bugs.webkit.org/show_bug.cgi?id=135413
3215
3216         Reviewed by Darin Adler.
3217
3218         * WebProcess/OriginData/WebOriginDataManager.cpp:
3219         (WebKit::WebOriginDataManager::getOrigins):
3220         (WebKit::WebOriginDataManager::deleteEntriesForOrigin):
3221         (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
3222         (WebKit::WebOriginDataManager::deleteAllEntries):
3223
3224 2014-07-31  Chris Fleizach  <cfleizach@apple.com>
3225
3226         AX: iOS: Crash accessing m_page in WKAccessibilityPageObject
3227         https://bugs.webkit.org/show_bug.cgi?id=134617
3228
3229         Reviewed by Darin Adler.
3230
3231         Provide a way to detach a WK2 WebPage object so that it can uninitialize other pointers, like the accessibility object.
3232
3233         * WebProcess/WebPage/WebPage.cpp:
3234         (WebKit::WebPage::~WebPage):
3235         * WebProcess/WebPage/WebPage.h:
3236         * WebProcess/WebPage/efl/WebPageEfl.cpp:
3237         (WebKit::WebPage::platformDetach):
3238         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
3239         (WebKit::WebPage::platformDetach):
3240         * WebProcess/WebPage/ios/WebPageIOS.mm:
3241         (WebKit::WebPage::platformDetach):
3242         * WebProcess/WebPage/mac/WebPageMac.mm:
3243         (WebKit::WebPage::platformDetach):
3244
3245 2014-07-31  Dan Bernstein  <mitz@apple.com>
3246
3247         WebKit part of: Server trust authentication challenges aren’t sent to the navigation delegate
3248         https://bugs.webkit.org/show_bug.cgi?id=135327
3249
3250         Reviewed by Alexey Proskuryakov.
3251
3252         * UIProcess/Cocoa/NavigationState.mm:
3253         (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
3254         Return true for server trust protection spaces if the delegate implements
3255         -webView:didReceiveAuthenticationChallenge:completionHandler:.
3256         (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Removed
3257         an assertion that is no longer true due to the above.
3258
3259 2014-07-31  Carlos Garcia Campos  <cgarcia@igalia.com>
3260
3261         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.1 release.
3262
3263         * gtk/NEWS: Add release notes for 2.5.1.
3264
3265 2014-07-31  Carlos Garcia Campos  <cgarcia@igalia.com>
3266
3267         Unreviewed. Fix GTK+ make distcheck.
3268
3269         * Shared/InteractionInformationAtPosition.h: Only include
3270         WebCore/SelectionRect.h for IOS.
3271
3272 2014-07-31  Carlos Garcia Campos  <cgarcia@igalia.com>
3273
3274         [GTK] Bump binary version for 2.6
3275         https://bugs.webkit.org/show_bug.cgi?id=133724
3276
3277         Reviewed by Philippe Normand.
3278
3279         * PlatformGTK.cmake: Fix JavaScriptCore dependency on
3280         instrospection commands and make them depend on GTK+-3.0.
3281
3282 2014-07-30  Enrica Casucci  <enrica@apple.com>
3283
3284         REGRESSION (WK2 iOS): Inline editing for Chinese and Japanese keyboards does not work in Safari.
3285         https://bugs.webkit.org/show_bug.cgi?id=135449
3286         <rdar://problem/17824833>
3287
3288         Reviewed by Benjamin Poulain.
3289
3290         The WebProcess sends the notification that the gesture modified the phrase boundary,
3291         but the flag was not being converted properly, therefore we failed to notify
3292         the text input system that a change had occurred.
3293
3294         * UIProcess/ios/WKContentViewInteraction.mm:
3295         (toUIWKSelectionFlags):
3296
3297 2014-07-30  Andy Estes  <aestes@apple.com>
3298
3299         USE(CONTENT_FILTERING) should be ENABLE(CONTENT_FILTERING)
3300         https://bugs.webkit.org/show_bug.cgi?id=135439
3301
3302         Reviewed by Tim Horton.
3303
3304         We now support two different platform content filters, and will soon support a mock content filter (as part of
3305         webkit.org/b/128858). This makes content filtering a feature of WebKit, not just an adoption of a third-party
3306         library. ENABLE() is the correct macro to use for such a feature.
3307
3308         * Configurations/FeatureDefines.xcconfig:
3309         * Shared/WebCoreArgumentCoders.h:
3310         * UIProcess/WebFrameProxy.cpp:
3311         (WebKit::WebFrameProxy::didStartProvisionalLoad):
3312         * UIProcess/WebFrameProxy.h:
3313         * UIProcess/WebPageProxy.cpp:
3314         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3315         * UIProcess/WebPageProxy.h:
3316         * UIProcess/WebPageProxy.messages.in:
3317         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3318         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3319
3320 2014-07-30  Andreas Kling  <akling@apple.com>
3321
3322         Static hash tables no longer need to be coupled with a VM.
3323         <https://webkit.org/b/135421>
3324
3325         Reviewed by Geoffrey Garen.
3326
3327         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
3328         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3329
3330 2014-07-30  Dan Bernstein  <mitz@apple.com>
3331
3332         Get rid of the WKNSURLProtectionSpace wrapper
3333         https://bugs.webkit.org/show_bug.cgi?id=135425
3334
3335         Reviewed by Sam Weinig.
3336
3337         * Shared/Cocoa/APIObject.mm:
3338         (API::Object::newObject): Don’t allocate WKNSURLProtectionSpace wrappers.
3339
3340         * Shared/Cocoa/WKNSURLProtectionSpace.h: Removed.
3341         * Shared/Cocoa/WKNSURLProtectionSpace.mm: Removed.
3342
3343         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3344         (canAuthenticateAgainstProtectionSpaceInFrame): Get the NSURLProtectionSpace from the
3345         WebCore::ProtectionSpace in the WebProtectionSpace.
3346
3347         * UIProcess/Cocoa/NavigationState.mm:
3348         (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): Ditto.
3349
3350         * WebKit2.xcodeproj/project.pbxproj: Removed references to removed files.
3351
3352 2014-07-30  Dan Bernstein  <mitz@apple.com>
3353
3354         Updated for changes to the WebCore::Credential API.
3355         Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
3356
3357         Reviewed by Alexey Proskuryakov.
3358
3359         * Shared/Downloads/mac/DownloadMac.mm:
3360         (WebKit::Download::receivedCredential):Use new Credential::nsCredential getter.
3361
3362         * Shared/WebCoreArgumentCoders.cpp:
3363         (IPC::ArgumentCoder<Credential>::encode):  If encoding the credential requires encoding the
3364         platform data, do that.
3365         (IPC::ArgumentCoder<Credential>::decode): If platform data was encoded, decode it.
3366         * Shared/WebCoreArgumentCoders.h:
3367
3368         * Shared/mac/WebCoreArgumentCodersMac.mm:
3369         (IPC::ArgumentCoder<Credential>::encodePlatformData): Archive the NSURLCredential.
3370         (IPC::ArgumentCoder<Credential>::decodePlatformData): Unarchive it.
3371
3372         * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
3373         (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]): Use
3374         Credential constructor that takes an NSURLCredential.
3375
3376         * UIProcess/Cocoa/NavigationState.mm:
3377         (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Ditto.
3378
3379
3380 2014-07-30  Carlos Garcia Campos  <cgarcia@igalia.com>
3381
3382         [GTK] REGRESSION(r171742): Test /webkit2/WebKitWebView/disallow-modal-dialogs fails
3383         https://bugs.webkit.org/show_bug.cgi?id=135412
3384
3385         Reviewed by Philippe Normand.
3386
3387         The problem is that WebPageProxy::setUIClient() calls
3388         setCanRunModal() with the value of m_uiClient->canRunModal() which
3389         is always true for us. We override that manually by calling
3390         setCanRunModal() depending on the WebKitSettings. In r171742,
3391         webkitWebViewUpdateSettings(), the method that overrides
3392         setCanRunModal(), was moved before attachUIClientToView(), so the
3393         value set by WebPageProxy::setUIClient() is the last one and takes
3394         precedence. We need to make sure webkitWebViewUpdateSettings() is
3395         always called after attachUIClientToView().
3396
3397         * UIProcess/API/gtk/WebKitWebView.cpp:
3398         (webkitWebViewConstructed): Move webkitWebViewUpdateSettings()
3399         call after attachUIClientToView() and add a comment to not forget
3400         about it again.
3401
3402 2014-07-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3403
3404         [GTK] Remove WebKitCertificateInfo from WebKit2GTK+ API
3405         https://bugs.webkit.org/show_bug.cgi?id=134830
3406
3407         Reviewed by Gustavo Noronha Silva.
3408
3409         It was added to make the API more convenient but it has ended up
3410         making it more complicated. WebKitWebView::load-failed-with-tls-errors
3411         now receives a GTlsCertificate + GTlsCertificateFlags and
3412         webkit_web_context_allow_tls_certificate_for_host() receives a GTlsCertificate
3413         since the errors are not actually needed. This makes the API more
3414         consistent with the existing method webkit_web_view_get_tls_info().
3415
3416         * PlatformGTK.cmake: Remove files from compilation.
3417         * UIProcess/API/gtk/WebKitCertificateInfo.cpp: Removed.
3418         * UIProcess/API/gtk/WebKitCertificateInfo.h: Removed.
3419         * UIProcess/API/gtk/WebKitCertificateInfoPrivate.h: Removed.
3420         * UIProcess/API/gtk/WebKitWebContext.cpp:
3421         (webkit_web_context_allow_tls_certificate_for_host):
3422         * UIProcess/API/gtk/WebKitWebContext.h:
3423         * UIProcess/API/gtk/WebKitWebView.cpp:
3424         (webkit_web_view_class_init):
3425         (webkitWebViewLoadFailedWithTLSErrors):
3426         * UIProcess/API/gtk/WebKitWebView.h:
3427         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
3428         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
3429         * UIProcess/API/gtk/webkit2.h:
3430
3431 2014-07-29  Jinwoo Song  <jinwoo7.song@samsung.com>
3432
3433         [EFL] Do not initialize g_type system explicitly in the ewk_init()
3434         https://bugs.webkit.org/show_bug.cgi?id=135407
3435
3436         Reviewed by Gyuyoung Kim.
3437
3438         EFL build requires glib version 2.38 but g_type_init() has been deprecated
3439         since version 2.36. As the type system is initialized automatically since
3440         version 2.36, we do not need to call g_type_init() in the ewk_init().
3441
3442         https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#g-type-init
3443
3444         * UIProcess/API/efl/ewk_main.cpp:
3445         (ewk_init):
3446
3447 2014-07-29  Enrica Casucci  <enrica@apple.com>
3448