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