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