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