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