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