37ec7e65b47dcfbac3a33a48e97818dc3e82489f
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-04-22  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Cursor doesn't change back to pointer when leaving the Safari window
4         https://bugs.webkit.org/show_bug.cgi?id=132038
5
6         Reviewed by Alexey Proskuryakov.
7
8         Since the cursor type is now updated asynchronously after r147739,
9         [window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0]
10         evalutes to false depending on how fast cursor is moving.
11
12         Instead, check whether the NSWindow of the WebView is the key window or not since
13         key window appears to control the cursor style in Cocoa as far as I've tested:
14         https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html
15
16         * UIProcess/mac/PageClientImpl.mm:
17         (WebKit::PageClientImpl::setCursor):
18
19 2014-04-22  Yongjun Zhang  <yongjun_zhang@apple.com>
20
21         Add SPI to expose provisional URL from Frame.
22         https://bugs.webkit.org/show_bug.cgi?id=132014
23
24         Add methods to return the provisional URL from WKWebProcessPlugInFrame.
25
26         Reviewed by Dan Bernstein.
27
28         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
29         (-[WKWebProcessPlugInFrame _provisionalURL]):
30         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
31
32 2014-04-22  Benjamin Poulain  <bpoulain@apple.com>
33
34         [iOS][WK2] Split iOS touch event dispatch for the regular touch event dispatch
35         https://bugs.webkit.org/show_bug.cgi?id=132033
36
37         Reviewed by Simon Fraser.
38
39         The generic touch event dispatching does not work well with iOS gesture recognizers.
40         Some events are required to be synchronous, while other needs can be asynchronous and
41         can even use event coalescing. We only need UI callback for the synchronous events.
42
43         Previously, that was implemented by changing the property ShouldSendEventsSynchronously
44         on WebPageProxy. That is causing issues when synchronous events are sent right after asynchronous
45         events because the responses in WebPageProxy::didReceiveEvent() easily get out of order.
46
47         This patch completely split the UIGestureRecognizerDispatching from the normal asynchronous event dispatching.
48
49         Synchronous events are sent directly to the WebProcess and report the result to the PageClient right away.
50
51         Asynchronous events are sent to the EventDispatcher where they are coalesced until the main thread is free
52         to process events.
53
54         There can be a race where a synchronous event comes before the asynchronous events are processed. In that case,
55         the synchronous event handler starts by getting the events out of the EventDispatcher and dispatch them first.
56
57         * Shared/NativeWebTouchEvent.h:
58         (WebKit::NativeWebTouchEvent::uniqueId): Deleted.
59         * Shared/ios/NativeWebTouchEventIOS.mm:
60         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
61         * UIProcess/WebPageProxy.cpp:
62         (WebKit::WebPageProxy::handleSynchronousTouchEvent):
63         (WebKit::WebPageProxy::sendAsynchronousTouchEvent):
64         (WebKit::WebPageProxy::didReceiveEvent):
65         (WebKit::WebPageProxy::resetStateAfterProcessExited):
66         * UIProcess/WebPageProxy.h:
67         * UIProcess/ios/WKContentViewInteraction.h:
68         * UIProcess/ios/WKContentViewInteraction.mm:
69         (-[WKContentView _webTouchEventsRecognized:]):
70         (-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
71         * WebProcess/WebPage/EventDispatcher.cpp:
72         (WebKit::EventDispatcher::EventDispatcher):
73         (WebKit::EventDispatcher::clearQueuedTouchEventsForPage):
74         (WebKit::EventDispatcher::getQueuedTouchEventsForPage):
75         (WebKit::EventDispatcher::touchEvent):
76         (WebKit::EventDispatcher::dispatchTouchEvents):
77         * WebProcess/WebPage/EventDispatcher.h:
78         * WebProcess/WebPage/EventDispatcher.messages.in:
79         * WebProcess/WebPage/WebPage.cpp:
80         (WebKit::WebPage::dispatchTouchEvent):
81         (WebKit::WebPage::touchEventSync):
82         (WebKit::WebPage::touchEvent):
83         (WebKit::WebPage::touchEventSyncForTesting):
84         (WebKit::WebPage::didCommitLoad):
85         * WebProcess/WebPage/WebPage.h:
86         * WebProcess/WebPage/WebPage.messages.in:
87         * WebProcess/WebPage/ios/WebPageIOS.mm:
88         (WebKit::WebPage::dispatchAsynchronousTouchEventsQueue):
89
90 2014-04-22  Chris Fleizach  <cfleizach@apple.com>
91
92         AX: iOS hit-testing does not work when page is zoomed
93         https://bugs.webkit.org/show_bug.cgi?id=132013
94
95         Reviewed by Simon Fraser.
96
97         Implement accessibilityHitTest so that the point can be converted correctly.
98
99         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
100         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
101
102 2014-04-22  Commit Queue  <commit-queue@webkit.org>
103
104         Unreviewed, rolling out r167674.
105         https://bugs.webkit.org/show_bug.cgi?id=132025
106
107         Going a different way with this (Requested by bradee-oh on
108         #webkit).
109
110         Reverted changeset:
111
112         "Change Image Controls replacement to use selection and paste"
113         https://bugs.webkit.org/show_bug.cgi?id=131992
114         http://trac.webkit.org/changeset/167674
115
116 2014-04-22  Joseph Pecoraro  <pecoraro@apple.com>
117
118         Remove unused local variable
119         https://bugs.webkit.org/show_bug.cgi?id=132020
120
121         Reviewed by Alexey Proskuryakov.
122
123         * UIProcess/ios/forms/WKFormSelectPopover.mm:
124         (-[WKSelectPopover initWithView:hasGroups:]):
125
126 2014-04-22  Brady Eidson  <beidson@apple.com>
127
128         Change Image Controls replacement to use selection and paste
129         <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
130
131         Reviewed by Tim Horton.
132
133         * UIProcess/mac/WebContextMenuProxyMac.mm:
134         (-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Write the
135           replacement data to a special pasteboard, then replace the current selection from
136           that pasteboard.
137
138         Remove all other code used to support the old replacement mechanism:
139         * UIProcess/WebPageProxy.cpp:
140         (WebKit::WebPageProxy::replaceControlledImage): Deleted.
141         * UIProcess/WebPageProxy.h:
142         * UIProcess/mac/WebContextMenuProxyMac.h:
143         (WebKit::WebContextMenuProxyMac::page):
144         (WebKit::WebContextMenuProxyMac::replaceControlledImage): Deleted.
145         * WebProcess/WebPage/WebContextMenu.cpp:
146         (WebKit::WebContextMenu::replaceControlledImage): Deleted.
147         * WebProcess/WebPage/WebContextMenu.h:
148         * WebProcess/WebPage/WebPage.cpp:
149         (WebKit::WebPage::replaceControlledImage): Deleted.
150         * WebProcess/WebPage/WebPage.h:
151         * WebProcess/WebPage/WebPage.messages.in:
152
153 2014-04-22  Eunmi Lee  <eunmi15.lee@samsung.com>
154
155         [EFL][WK2] Remove duplicated code to set size to the DrawingArea.
156         https://bugs.webkit.org/show_bug.cgi?id=131972
157
158         Reviewed by Andreas Kling.
159
160         DrawingArea's size is set in the WebView.cpp when EwkView's size is
161         changed, so we don't have to set again in the PageViewportController.
162
163         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
164         (WebKit::PageViewportController::didChangeViewportSize):
165
166 2014-04-22  Tim Horton  <timothy_horton@apple.com>
167
168         WKThumbnailView doesn't quite work with topContentInset
169         https://bugs.webkit.org/show_bug.cgi?id=131976
170         <rdar://problem/16642127>
171
172         Reviewed by Darin Adler.
173
174         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
175         (-[_WKThumbnailView initWithFrame:fromWKView:]):
176         _WKThumbnailView always needs a layer.
177         We don't want to use snapshots by default, this was debugging accidentally landed in the last change.
178
179         (-[_WKThumbnailView _requestSnapshotIfNeeded]):
180         Don't request a new snapshot if the scale is the same as the existing one.
181         Reduce the height of the snapshot by the topContentInset.
182         Having the origin at (0, 0) is still correct, as the inset content is in negative Y space,
183         and (0, 0) is the true origin of the content.
184
185         (-[_WKThumbnailView setScale:]):
186         When not snapshotting, we've decided that WKThumbnailView should apply the scale to the WKView layer tree,
187         instead of depending on clients to do so.
188
189         (-[_WKThumbnailView setUsesSnapshot:]):
190         We *do* need to apply thumbnail scale in the web process even when snapshotting,
191         because we use the live layer tree temporarily while waiting for the asynchronous
192         snapshot to return. This was a misstep in the last thumbnail view patch.
193
194 2014-04-22  Shivakumar JM  <shiva.jm@samsung.com>
195
196         [WebKit2] Cleanup the build from unused parameter in WebProcess Module 
197         https://bugs.webkit.org/show_bug.cgi?id=131970
198
199         Reviewed by Darin Adler.
200
201         Fix a build warning by removing the parameters in function paintLayerContents() to fix build warning.
202
203         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
204         (WebKit::CoordinatedLayerTreeHost::paintLayerContents):
205
206 2014-04-22  Carlos Garcia Campos  <cgarcia@igalia.com>
207
208         [GTK] Crash after getting web view context property with g_object_get
209         https://bugs.webkit.org/show_bug.cgi?id=131983
210
211         Reviewed by Philippe Normand.
212
213         The problem is that the getter is using g_value_take_object() and
214         the default context is destroyed when the caller releases its ref.
215
216         * UIProcess/API/gtk/WebKitWebView.cpp:
217         (webkitWebViewGetProperty): Use g_value_set_object() instead of
218         g_value_take_object().
219
220 2014-04-22  Ryuan Choi  <ryuan.choi@samsung.com>
221
222         [EFL][WK2] Remove unnecessary includes in files of Source/WebKit2/UIProcess/API/efl
223         https://bugs.webkit.org/show_bug.cgi?id=131979
224
225         Reviewed by Gyuyoung Kim.
226
227         Removed unnecessary includes of header files.
228         In addition, tried to use forward declarations.
229
230         * UIProcess/API/efl/EwkView.cpp:
231         * UIProcess/API/efl/EwkView.h:
232         * UIProcess/API/efl/EwkViewCallbacks.h:
233         * UIProcess/API/efl/GestureRecognizer.h:
234         * UIProcess/API/efl/ewk_context_menu_item_private.h:
235         * UIProcess/API/efl/ewk_context_menu_private.h:
236         * UIProcess/API/efl/ewk_download_job.cpp:
237         * UIProcess/API/efl/ewk_download_job_private.h:
238         * UIProcess/API/efl/ewk_form_submission_request.cpp:
239         * UIProcess/API/efl/ewk_form_submission_request_private.h:
240         * UIProcess/API/efl/ewk_navigation_data.cpp:
241         * UIProcess/API/efl/ewk_navigation_data_private.h:
242         * UIProcess/API/efl/ewk_page_group_private.h:
243         * UIProcess/API/efl/ewk_popup_menu_private.h:
244         * UIProcess/API/efl/ewk_view.cpp:
245         * UIProcess/API/efl/ewk_window_features_private.h:
246         * UIProcess/efl/PageUIClientEfl.cpp:
247         * UIProcess/efl/ViewClientEfl.cpp:
248
249 2014-04-21  Tim Horton  <timothy_horton@apple.com>
250
251         [wk2] Don't send intrinsic content size updates with dirty layout
252         https://bugs.webkit.org/show_bug.cgi?id=131964
253         <rdar://problem/14292718>
254
255         Reviewed by Simon Fraser.
256
257         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
258         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
259         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
260         (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
261         (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeIfNeeded):
262         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
263         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
264         (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired): Deleted.
265         Instead of using a timer (which can fire while layout is dirty) to coalesce
266         intrinsic content size changes, send them only from flushLayers, just after updating layout.
267         This ensures that we never get intermediate intrinsic content sizes that won't be painted.
268
269 2014-04-21  Tim Horton  <timothy_horton@apple.com>
270
271         Remove a unnecessary forward-declared class from TiledCoreAnimationDrawingArea.
272
273         Rubber-stamped by Simon Fraser.
274
275         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
276
277 2014-04-21  Simon Fraser  <simon.fraser@apple.com>
278
279         Don't try to use a null connection()->xpcConnection()
280         https://bugs.webkit.org/show_bug.cgi?id=131961
281
282         Reviewed by Dan Bernstein.
283         
284         If running with -WebKit2UseXPCServiceForWebProcess NO, connection()->xpcConnection()
285         is null and xpc_connection_get_pid() would crash, so null-check the xpcConnection.
286
287         * UIProcess/Network/NetworkProcessProxy.cpp:
288         (WebKit::NetworkProcessProxy::didFinishLaunching):
289
290 2014-04-21  Dan Bernstein  <mitz@apple.com>
291
292         WebKit part of <rdar://problem/16631323> Page::setDefersLoading doesn’t do anything when using the Network process
293         https://bugs.webkit.org/show_bug.cgi?id=131939
294
295         Reviewed by David Kilzer.
296
297         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
298         (WebKit::NetworkConnectionToWebProcess::setDefersLoading): Added. Forwards the message to
299         the NetworkResourceLoader. 
300         * NetworkProcess/NetworkConnectionToWebProcess.h:
301
302         * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Added SetDefersLoading message.
303
304         * NetworkProcess/NetworkResourceLoader.cpp:
305         (WebKit::NetworkResourceLoader::NetworkResourceLoader): Initialize new member variable
306         m_defersLoading from the new field in the loader parameters.
307         (WebKit::NetworkResourceLoader::start): Added. Like WebCore::ResourceLoader, if loading is
308         deferred, keep the request in m_deferredRequest and bail out.
309         (WebKit::NetworkResourceLoader::setDefersLoading): Added. Similar to
310         WebCore::ResourceLoader::setDefersLoading.
311         * NetworkProcess/NetworkResourceLoader.h:
312         (WebKit::NetworkResourceLoader::defersLoading): 
313
314         * Shared/Network/NetworkResourceLoadParameters.cpp:
315         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): Initialize new field
316         defersLoading to false.
317         (WebKit::NetworkResourceLoadParameters::encode): Encode new field.
318         (WebKit::NetworkResourceLoadParameters::decode): Decode new field.
319         * Shared/Network/NetworkResourceLoadParameters.h: Added defersLoading field.
320
321         * WebProcess/Network/WebResourceLoadScheduler.cpp:
322         (WebKit::WebResourceLoadScheduler::scheduleLoad): Populate defersLoading field in the load
323         parameters.
324         (WebKit::WebResourceLoadScheduler::setDefersLoading): Send a message to the Network process.
325         * WebProcess/Network/WebResourceLoadScheduler.h:
326
327 2014-04-21  Anders Carlsson  <andersca@apple.com>
328
329         Errors passed to delegate methods should have recovery attempters
330         https://bugs.webkit.org/show_bug.cgi?id=131957
331         <rdar://problem/16642539>
332
333         Reviewed by Tim Horton.
334
335         * UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.h: Added.
336         * UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.mm: Added.
337         * UIProcess/Cocoa/NavigationState.mm:
338         (WebKit::createErrorWithRecoveryAttempter):
339         (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
340         (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
341         * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.h: Added.
342         * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm: Added.
343         (-[WKReloadFrameErrorRecoveryAttempter initWithWebView:frameHandle:urlString:]):
344         (-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
345         * WebKit2.xcodeproj/project.pbxproj:
346
347 2014-04-21  Eric Carlson  <eric.carlson@apple.com>
348
349         [Mac] implement WebKitDataCue
350         https://bugs.webkit.org/show_bug.cgi?id=131799
351
352         Reviewed by Dean Jackson.
353
354         * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
355
356 2014-04-21  Beth Dakin  <bdakin@apple.com>
357
358         topContentInset does not play well with fullscreen elements
359         https://bugs.webkit.org/show_bug.cgi?id=131955
360         -and corresponding-
361         <rdar://problem/16651925>
362
363         Reviewed by Sam Weinig.
364
365         If you take an element (such as a <video>) fullscreen when you have a 
366         topContentInset set, there will be an inset-sized gap at the top of the fullscreen 
367         video.
368
369         Save and restore the topContentInset whenever the scroll position is saved and 
370         restored.
371         * WebProcess/FullScreen/WebFullScreenManager.cpp:
372         (WebKit::WebFullScreenManager::WebFullScreenManager):
373         (WebKit::WebFullScreenManager::saveScrollPosition):
374         (WebKit::WebFullScreenManager::restoreScrollPosition):
375         * WebProcess/FullScreen/WebFullScreenManager.h:
376
377 2014-04-21  Gavin Barraclough  <baraclough@apple.com>
378
379         Don't use ProcessAssertion on simulator
380         https://bugs.webkit.org/show_bug.cgi?id=131950
381
382         Rubber stamped by Enrica Casucci
383
384         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
385         (WebKit::connectToService):
386         * UIProcess/ios/ProcessAssertion.h:
387
388 2014-04-21  Enrica Casucci  <enrica@apple.com>
389
390         [iOS WebKit2] support replacements for misspelled words.
391         https://bugs.webkit.org/show_bug.cgi?id=131827
392         <rdar://problem/16319657>
393
394         Reviewed by Darin Adler.
395
396         This is the second a final piece to support replacements.
397         It adds some entrypoints used by the keyboard code to perform
398         replacement when reaching the edge of a word using backspace.
399         I've modified the behavior of replaceSelectedText to work both
400         with caret or range selections.
401
402         * Shared/EditorState.cpp:
403         (WebKit::EditorState::encode):
404         (WebKit::EditorState::decode):
405         * Shared/EditorState.h:
406         (WebKit::EditorState::EditorState):
407         * UIProcess/ios/WKContentViewInteraction.mm:
408         (-[WKContentView isReplaceAllowed]):
409         (-[WKContentView _characterBeforeCaretSelection]):
410         * WebProcess/WebPage/WebPage.cpp:
411         (WebKit::WebPage::editorState):
412         * WebProcess/WebPage/ios/WebPageIOS.mm:
413         (WebKit::WebPage::replaceSelectedText):
414
415 2014-04-21  Gavin Barraclough  <baraclough@apple.com>
416
417         Don't use ProcessAssertion on simulator
418         https://bugs.webkit.org/show_bug.cgi?id=131950
419
420         Rubber stamped by Benjamin Poulain
421
422         * UIProcess/ios/ProcessAssertion.mm:
423         (WebKit::ProcessAssertion::ProcessAssertion):
424         (WebKit::ProcessAssertion::setState):
425
426 2014-04-21  Anders Carlsson  <andersca@apple.com>
427
428         Another build fix.
429
430         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
431         (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
432
433 2014-04-21  Anders Carlsson  <andersca@apple.com>
434
435         Build fix.
436
437         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
438         (WebKit::XPCServiceInitializer):
439
440 2014-04-21  Tim Horton  <timothy_horton@apple.com>
441
442         [iOS WebKit2] Implement CSS viewport units
443         https://bugs.webkit.org/show_bug.cgi?id=131863
444         <rdar://problem/16279088>
445
446         Reviewed by Darin Adler.
447
448         * UIProcess/API/Cocoa/WKWebView.mm:
449         (setMinimumLayoutSizeForMinimalUI):
450         (-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]):
451         (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
452         Add _setMinimumLayoutSizeOverrideForMinimalUI:, which pushes said size
453         down from the client to WebPageIOS, below.
454
455         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
456         * UIProcess/WebPageProxy.h:
457         * UIProcess/ios/WebPageProxyIOS.mm:
458         (WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI):
459         * WebProcess/WebPage/WebPage.h:
460         * WebProcess/WebPage/WebPage.messages.in:
461         * WebProcess/WebPage/ios/WebPageIOS.mm:
462         (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
463         (WebKit::WebPage::viewportConfigurationChanged):
464         Update FrameView's viewport size based on the minimum layout size for minimal UI (if we have it)
465         or the normal minimum layout size, scaled to the page's initial scale.
466
467 2014-04-21  Benjamin Poulain  <bpoulain@apple.com>
468
469         [iOS][WK2] Fix the dynamic viewport update when the viewport's max-scale conflict with the transition
470         https://bugs.webkit.org/show_bug.cgi?id=131884
471
472         Reviewed by Darin Adler.
473
474         <rdar://problem/16667291>
475
476         * UIProcess/API/Cocoa/WKWebView.mm:
477         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
478         It is fairly common to have a viewport configuration with min-scale=1 and max-scale=1.
479         Since we were only changing the minimumScale for the transition, the target scale was affected
480         by max-scale. This was breaking the transition from portrait to landscale.
481
482 2014-04-21  Benjamin Poulain  <bpoulain@apple.com>
483
484         [iOS][WK2] Make dynamic viewport size update content aware
485         https://bugs.webkit.org/show_bug.cgi?id=131874
486
487         Reviewed by Tim Horton.
488
489         When possible, adjust the scroll position based on the content on dynamic viewport resize.
490
491         * WebProcess/WebPage/WebPage.cpp:
492         (WebKit::WebPage::WebPage):
493         (WebKit::WebPage::scalePage):
494         (WebKit::WebPage::pageDidScroll):
495         * WebProcess/WebPage/WebPage.h:
496         The scrolling heuristic are not invertible, especially the content heuristic. To have the right
497         behavior when doing resize without changing the page, we save the old scroll position and restore
498         it when the content size and scale is restored.
499
500         * WebProcess/WebPage/ios/WebPageIOS.mm:
501         (WebKit::WebPage::dynamicViewportSizeUpdate):
502         On dynamic update, start by finding what node is at the center of the screen. After the layout, put that
503         node back in the center.
504
505         (WebKit::WebPage::updateVisibleContentRects):
506
507 2014-04-21  Anders Carlsson  <andersca@apple.com>
508
509         Need default WKNavigationDelegate behavior
510         https://bugs.webkit.org/show_bug.cgi?id=131944
511         <rdar://problem/15949822>
512
513         Reviewed by Dan Bernstein.
514
515         Port the WebKit1 default delegate behavior over.
516
517         * UIProcess/Cocoa/NavigationState.mm:
518         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
519         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
520
521 2014-04-21  Dan Bernstein  <mitz@apple.com>
522
523         [Cocoa] Expose WebPage::setDefersLoading
524         https://bugs.webkit.org/show_bug.cgi?id=131943
525
526         Reviewed by Anders Carlsson, but he doesn’t like this.
527
528         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
529         (-[WKWebProcessPlugInBrowserContextController _defersLoading]): Added this accessor.
530         (-[WKWebProcessPlugInBrowserContextController _setDefersLoading:]): Ditto.
531         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
532         Declared new property _defersLoading.
533
534         * WebProcess/WebPage/WebPage.cpp:
535         (WebKit::WebPage::defersLoading): Added this getter.
536         * WebProcess/WebPage/WebPage.h:
537
538 2014-04-21  Joseph Pecoraro  <pecoraro@apple.com>
539
540         Remove unused WebKitSystemInterface functions
541         https://bugs.webkit.org/show_bug.cgi?id=131938
542
543         Reviewed by Alexey Proskuryakov.
544
545         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
546         (InitWebCoreSystemInterface):
547
548 2014-04-21  Anders Carlsson  <andersca@apple.com>
549
550         Check the com.apple.security.network.client entitlement for all processes
551         https://bugs.webkit.org/show_bug.cgi?id=131942
552         <rdar://problem/12354188>
553
554         Reviewed by Dan Bernstein.
555
556         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
557         (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
558         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
559         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
560         (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
561
562 2014-04-20  Dan Bernstein  <mitz@apple.com>
563
564         [Cocoa] Remove interfaces in the To Be Removed groups
565         https://bugs.webkit.org/show_bug.cgi?id=131925
566
567         Reviewed by Darin Adler.
568
569         * Shared/API/Cocoa/WKRemoteObjectInterface.h: Removed.
570         * Shared/API/Cocoa/WKRemoteObjectInterface.mm: Removed.
571         * Shared/API/Cocoa/WKRemoteObjectRegistry.h: Removed.
572         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm: Removed.
573         * UIProcess/API/Cocoa/WKProcessPool.mm:
574         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.h: Removed.
575         * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm: Removed.
576         * UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h: Removed.
577         * UIProcess/API/Cocoa/WKProcessPoolToBeRemoved.mm: Removed.
578         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
579         * WebKit2.xcodeproj/project.pbxproj:
580         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm: Removed.
581         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
582
583 2014-04-20  Dan Bernstein  <mitz@apple.com>
584
585         [Cocoa] Crash when setting a bundle parameter to nil
586         https://bugs.webkit.org/show_bug.cgi?id=131917
587
588         Reviewed by Sam Weinig.
589
590         * UIProcess/API/Cocoa/WKProcessPool.mm:
591         (-[WKProcessPool _setObject:forBundleParameter:]): If the object is nil, use
592         -[NSMutableDictionary removeObjectForKey:] rather than -setObject:forKey:.
593
594         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
595         (-[WKWebProcessBundleParameters setParameter:forKey:]): Ditto.
596
597         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
598         (WebKit::InjectedBundle::setBundleParameter): Unrelatedly, create m_bundleParameters if
599         needed, as it may have not been created on intialization if no bundle parameters were set
600         at the time.
601
602 2014-04-20  Dan Bernstein  <mitz@apple.com>
603
604         [Cocoa] Remove unused -webView:didFinishLoadingNavigation: delegate method
605         https://bugs.webkit.org/show_bug.cgi?id=131914
606
607         Reviewed by Sam Weinig.
608
609         * UIProcess/Cocoa/NavigationState.h: Removed flag from m_navigationDelegateMethods struct.
610         * UIProcess/Cocoa/NavigationState.mm:
611         (WebKit::NavigationState::setNavigationDelegate): Removed check for whether the method is
612         implemented.
613         (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame): Stopped calling the method
614         if implemented.
615
616 2014-04-19  Anders Carlsson  <andersca@apple.com>
617
618         Plug-in process crashes if NP_Initialize returns an error the second time it's called
619         https://bugs.webkit.org/show_bug.cgi?id=131903
620         <rdar://problem/14355462>
621
622         Reviewed by Sam Weinig.
623
624         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
625         (WebKit::NetscapePluginModule::decrementLoadCount):
626         Don't try to unload the plug-in if it hasn't been initialized.
627
628 2014-04-19  Simon Fraser  <simon.fraser@apple.com>
629
630         [UI-side compositing] Implement blend modes
631         https://bugs.webkit.org/show_bug.cgi?id=131891
632         <rdar://problem/16490085>
633
634         Reviewed by Tim Horton.
635
636         Implement blend modes with UI-side compositing.
637         
638         PlatformCALayer::setBlendMode() becomes pure virtual, and overridden in
639         PlatformCALayerMac and PlatformCALayerRemote.
640         PlatformCAFilters::setBlendingFiltersOnLayer() now takes a raw platform
641         layer, so it can be called from the UI process on a CALayer*.
642         
643         Add BlendMode to LayerProperties, and initialize, encode and decode it,
644         as well as adding dumping support for blend modes.
645         
646         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
647         (WebKit::applyPropertiesToLayer):
648         * Shared/mac/RemoteLayerTreeTransaction.h:
649         * Shared/mac/RemoteLayerTreeTransaction.mm:
650         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
651         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
652         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
653         (WebKit::RemoteLayerTreeTextStream::operator<<):
654         (WebKit::dumpChangedLayers):
655         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
656         (WebKit::PlatformCALayerRemote::setBlendMode):
657         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
658
659 2014-04-19  Joseph Pecoraro  <pecoraro@apple.com>
660
661         Fix leak of UIScreenEdgePanGestureRecognizer in WKSwipeTransitionController
662         https://bugs.webkit.org/show_bug.cgi?id=131877
663
664         Reviewed by Darin Adler.
665
666         * UIProcess/ios/ViewGestureControllerIOS.mm:
667         (-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
668
669 2014-04-19  Dan Bernstein  <mitz@apple.com>
670
671         Don’t install a source file inside WebProcess.app.
672
673         * WebKit2.xcodeproj/project.pbxproj: Removed ViewUpdateDispatcher.messages.in from
674         WebProcess’s Copy Bundle Resources build phase.
675
676 2014-04-19  Darin Adler  <darin@apple.com>
677
678         [Mac] WebView adjusts the cursor even when another window is in front
679         https://bugs.webkit.org/show_bug.cgi?id=131898
680         rdar://problem/14619911
681
682         Reviewed by Dan Bernstein.
683
684         * UIProcess/API/mac/WKView.mm:
685         (-[WKView _setCursor:]): Deleted. Moved the code all into PageClientImpl, since none of it
686         interacts with anything special about a WKView.
687
688         * UIProcess/API/mac/WKViewInternal.h: Deleted the _setCursor: method.
689
690         * UIProcess/mac/PageClientImpl.mm:
691         (WebKit::PageClientImpl::setCursor): Added a check that the window is under the cursor
692         and do nothing if it's not.
693
694 2014-04-19  Dan Bernstein  <mitz@apple.com>
695
696         Use XPC services in the iOS Simulator, but not in Mountain Lion
697         https://bugs.webkit.org/show_bug.cgi?id=131894
698
699         Reviewed by Anders Carlsson.
700
701         * Configurations/NetworkService.Development.xcconfig: Defined INFOPLIST_FILE for the
702         Simulator.
703         * Configurations/NetworkService.xcconfig: Ditto.
704         * Configurations/WebContentService.Development.xcconfig: Ditto.
705         * Configurations/WebContentService.xcconfig: Ditto.
706         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
707         (WebKit::systemDirectoryPath): Added this helper function that returns a slash-terminated
708         path to the System directory in the current runtime.
709         (WebKit::ProcessLauncher::launchProcess): Changed to use the above function to tell whether
710         a development version of WebKit2 is being used.
711         * WebKit2Prefix.h: Set WTF_USE_XPC_SERVICES to 1 when targeting the iOS Simulator, but not
712         when targeting Mountain Lion.
713
714 2014-04-19  Dan Bernstein  <mitz@apple.com>
715
716         [Cocoa] Crash in -[WKWebProcessPlugInHitTestResult nodeHandle] when nodeHandle() is null
717         https://bugs.webkit.org/show_bug.cgi?id=131888
718
719         Reviewed by Jon Honeycutt.
720
721         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm:
722         (-[WKWebProcessPlugInHitTestResult nodeHandle]): Added a null check.
723
724 2014-04-19  Simon Fraser  <simon.fraser@apple.com>
725
726         [iOS WK2] Fuzzy layers on sites using perspective and transforms
727         https://bugs.webkit.org/show_bug.cgi?id=131873
728         <rdar://problem/16540576>
729
730         Reviewed by Sam Weinig.
731         
732         Always set rasterizationScale on CALayers in the UI process
733         (as we do for WK1) so that layers are rasterized taking the
734         device scale into account. We can do unconditionally; this
735         is benign on layers that CA doesn't rasterize.
736
737         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
738         (WebKit::applyPropertiesToLayer):
739
740 2014-04-18  Simon Fraser  <simon.fraser@apple.com>
741
742         Use 'override' in GraphicsLayerCA
743         https://bugs.webkit.org/show_bug.cgi?id=131882
744
745         Reviewed by Tim Horton.
746         
747         Add an 'override'.
748
749         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
750
751 2014-04-19  Darin Adler  <darin@apple.com>
752
753         Assertion in WebPage::runModal accesses object after it may have been destroyed
754         https://bugs.webkit.org/show_bug.cgi?id=131875
755
756         Reviewed by Anders Carlsson.
757
758         * WebProcess/WebPage/WebPage.cpp:
759         (WebKit::WebPage::runModal): Ref the WebPage so it's still around so we can
760         check the m_isRunningModal flag.
761
762 2014-04-18  Commit Queue  <commit-queue@webkit.org>
763
764         Unreviewed, rolling out r167527.
765         https://bugs.webkit.org/show_bug.cgi?id=131883
766
767         Broke 32-bit build (Requested by ap on #webkit).
768
769         Reverted changeset:
770
771         "[Mac] implement WebKitDataCue"
772         https://bugs.webkit.org/show_bug.cgi?id=131799
773         http://trac.webkit.org/changeset/167527
774
775 2014-04-18  Eric Carlson  <eric.carlson@apple.com>
776
777         [Mac] implement WebKitDataCue
778         https://bugs.webkit.org/show_bug.cgi?id=131799
779
780         Reviewed by Dean Jackson.
781
782         * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
783
784 2014-04-18  Anders Carlsson  <andersca@apple.com>
785
786         Keep the WebPageProxy alive for the lifetime of all PageLoadState::Transaction objects
787         https://bugs.webkit.org/show_bug.cgi?id=131872
788         <rdar://problem/15758414>
789
790         Reviewed by Dan Bernstein.
791
792         * UIProcess/PageLoadState.cpp:
793         (WebKit::PageLoadState::PageLoadState):
794         (WebKit::PageLoadState::Transaction::Transaction):
795         (WebKit::PageLoadState::Transaction::~Transaction):
796         * UIProcess/PageLoadState.h:
797         (WebKit::PageLoadState::Transaction::Transaction): Deleted.
798         (WebKit::PageLoadState::Transaction::~Transaction): Deleted.
799         * UIProcess/WebPageProxy.cpp:
800         (WebKit::WebPageProxy::WebPageProxy):
801
802 2014-04-18  Stephanie Lewis  <slewis@apple.com>
803
804         We shouldn’t create page throttlers for other pages than WebKit2 pages.
805         Part of <rdar://problem/16473045> Visibility state counters are often incorrect.
806         https://bugs.webkit.org/show_bug.cgi?id=131696
807
808         Reviewed by Gavin Barraclough.
809
810         Page throttlers were being created for SVG images and other page instances that
811         were not accurately tracking the states that enable and disable page throttling.
812         Make the throttler an unique ptr and only initialize it for WebKit2.
813
814         This also fixes  an inefficiency where we would throttle a new page on creation because 
815         we assumed it was visible even if that was not the case.
816
817         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: Check page throttler exists.
818         (WebKit::NPRuntimeObjectMap::evaluate):
819         * WebProcess/WebPage/WebPage.cpp: 
820         (WebKit::WebPage::WebPage): Initialize page throttler for WebKit2 views.
821         (WebKit::WebPage::mouseEvent): Check page throttler exists.
822         (WebKit::WebPage::wheelEvent): ditto
823         (WebKit::WebPage::keyEvent): ditto
824
825 2014-04-18  Anders Carlsson  <andersca@apple.com>
826
827         Don't allow app sandboxed apps without the network client entitlement to launch the network process
828         https://bugs.webkit.org/show_bug.cgi?id=131868
829         <rdar://problem/12354188>
830
831         Reviewed by Dan Bernstein.
832
833         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
834         (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
835         Add a new delegate that implements checkEntitlements().
836
837         (NetworkServiceInitializer):
838         Pass the new delegate to XPCServiceInitializer.
839
840         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
841         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
842         Call checkEntitlements.
843
844         (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
845         Return true.
846
847         (WebKit::XPCServiceInitializerDelegate::hasEntitlement):
848         Helper function that returns whether a client has the given entitlement.
849
850         (WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
851         Helper function that checks whether the client is sandboxed.
852
853 2014-04-18  Alice Barraclough  <alice.barraclough@webkit.org>
854
855         Find on page - extend API by providing highlighted match index
856         https://bugs.webkit.org/show_bug.cgi?id=131776
857
858         Reviewed by Tim Horton.
859
860         * Shared/WebFindOptions.h: Add an option for determining match index.
861
862         Plumb through the API layers the addition of a parameter for match index.
863         * UIProcess/API/APIFindClient.h:
864         (API::FindClient::didFindString):
865         * UIProcess/API/C/WKPage.cpp:
866         (WKPageSetPageFindClient):
867         * UIProcess/API/Cocoa/WKWebView.mm:
868         (toFindOptions):
869         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
870         (NS_OPTIONS):
871         * UIProcess/API/Cocoa/_WKFindDelegate.h:
872         * UIProcess/Cocoa/FindClient.h:
873         * UIProcess/Cocoa/FindClient.mm:
874         (WebKit::FindClient::setDelegate):
875         (WebKit::FindClient::didFindString):
876         * UIProcess/WebFindClient.cpp:
877         (WebKit::WebFindClient::didFindString):
878         * UIProcess/WebFindClient.h:
879         * UIProcess/WebPageProxy.cpp:
880         (WebKit::WebPageProxy::didFindString):
881         * UIProcess/WebPageProxy.h:
882         * UIProcess/WebPageProxy.messages.in:
883
884         The actual tracking of the match index is contained in FindController class.
885         * WebProcess/WebPage/FindController.cpp:
886         (WebKit::FindController::FindController): Start out as -1, understood to be an undefined index in this context.
887         (WebKit::FindController::updateFindUIAfterPageScroll): 
888             Perform the calculation of matchCount if the flag for DetermineMatchIndex is on.
889         If matchCount exceeds max, keep the match index undefined because otherwise the finding could advance
890         to a point where the index exceeds the match count, legitimately. If matchCount doesn't exceed the max, then make
891         sure the match index, which had been being incremented or decremented blindly back in findString(), is normalized
892         to be less than match count.
893         (WebKit::FindController::findString): 
894             If there is a user selection existing on the page, the next occurence of the string will be found after that
895         selection. In that case we still want the index to properly reflect its ordinal  position within the entire document.
896         Use findStringMatchingRanges to provide the match index, and set a flag that prevents the match index from being
897         blindly incremented or decremented later. After findString() is actually called on the page, increment or decrement
898         the find index under specific conditions. 
899         (WebKit::FindController::hideFindIndicator): Reset match index when find UI goes away.
900         * WebProcess/WebPage/FindController.h: Add m_foundStringMatchIndex to private variables.
901         * WebProcess/WebPage/ios/FindControllerIOS.mm:
902         (WebKit::FindController::hideFindIndicator): Reset match index when find UI goes away.
903
904 2014-04-18  Joseph Pecoraro  <pecoraro@apple.com>
905
906         Correct some issues small issues in WK2 file upload InjectedBundle APIs
907         https://bugs.webkit.org/show_bug.cgi?id=131852
908
909         Reviewed by Dan Bernstein.
910
911         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
912         (API::InjectedBundle::PageUIClient::shouldGenerateFileForUpload):
913         The default return value, meaning no, should return the null string. The
914         result is checked later, and null string is a special value meaning no.
915
916         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
917         (WebKit::InjectedBundlePageUIClient::generateFileForUpload):
918         Pre-check for the correct client function we will use.
919
920 2014-04-18  Andy Estes  <aestes@apple.com>
921
922         [iOS] REGRESSION (r167039): WebKit incorrectly sets a background process assertion state when displaying a PDF
923         https://bugs.webkit.org/show_bug.cgi?id=131860
924         <rdar://problem/16631282>
925
926         Reviewed by Tim Horton.
927
928         We were basing our process assertion state on whether or not the
929         process had a WKContentView in a window, but when displaying a PDF
930         we've removed the WKContentView from the window. Base this decision
931         instead on whether or not the WKWebView is in the window.
932
933         * UIProcess/API/Cocoa/WKWebView.mm:
934         (-[WKWebView didMoveToWindow]):
935         * UIProcess/ios/PageClientImplIOS.mm:
936         (WebKit::PageClientImpl::isViewInWindow):
937
938 2014-04-18  Anders Carlsson  <andersca@apple.com>
939
940         Address a couple of review comments
941         https://bugs.webkit.org/show_bug.cgi?id=131856
942
943         Reviewed by Dan Bernstein.
944
945         * UIProcess/API/Cocoa/WKNavigationAction.h:
946         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
947         * UIProcess/API/Cocoa/WKPreferences.h:
948         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
949         * UIProcess/API/Cocoa/WKWebView.h:
950
951 2014-04-18  Anders Carlsson  <andersca@apple.com>
952
953         Handle pluginOrigin being null
954         https://bugs.webkit.org/show_bug.cgi?id=131849
955         <rdar://problem/16655898>
956
957         Reviewed by Alexey Proskuryakov.
958
959         * WebProcess/WebProcess.cpp:
960         (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
961
962 2014-04-18  Dan Bernstein  <mitz@apple.com>
963
964         [Cocoa] Add a navigation delegate method corresponding to didFinishDocumentLoadForFrame for the main frame
965         https://bugs.webkit.org/show_bug.cgi?id=131847
966
967         Reviewed by Anders Carlsson.
968
969         * UIProcess/API/APILoaderClient.h:
970         (API::LoaderClient::didFinishDocumentLoadForFrame): Added a navigationID parameter.
971         * UIProcess/API/C/WKPage.cpp:
972         (WKPageSetPageLoaderClient): Updated for the above change in paramerers.
973         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
974         * UIProcess/Cocoa/NavigationState.h: Declare override of didFinishDocumentLoadForFrame.
975         * UIProcess/Cocoa/NavigationState.mm:
976         (WebKit::NavigationState::setNavigationDelegate): Initialize
977         webViewNavigationDidFinishDocumentLoad flag in the delegate methods struct.
978         (WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame): Added override
979         of the client function which calls the delegate.
980         * UIProcess/WebPageProxy.cpp:
981         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame): Get and pass the navigation ID to
982         the client.
983         * UIProcess/WebPageProxy.h: Added navigationID parameter.
984         * UIProcess/WebPageProxy.messages.in: Ditto.
985         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
986         (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad): Get and send the navigation
987         ID to the UI process.
988
989 2014-04-18  Philippe Normand  <pnormand@igalia.com>
990
991         Remove NETWORK_INFO support
992         https://bugs.webkit.org/show_bug.cgi?id=131841
993
994         Reviewed by Gyuyoung Kim.
995
996         * CMakeLists.txt:
997         * PlatformEfl.cmake:
998         * Shared/API/c/WKBase.h:
999         * Shared/APIObject.h:
1000         * Shared/WebNetworkInfo.cpp: Removed.
1001         * Shared/WebNetworkInfo.h: Removed.
1002         * UIProcess/API/C/WKAPICast.h:
1003         * UIProcess/API/C/WKContext.cpp:
1004         (WKContextGetNetworkInfoManager): Deleted.
1005         * UIProcess/API/C/WKContext.h:
1006         * UIProcess/API/C/WKNetworkInfo.cpp: Removed.
1007         * UIProcess/API/C/WKNetworkInfo.h: Removed.
1008         * UIProcess/API/C/WKNetworkInfoManager.cpp: Removed.
1009         * UIProcess/API/C/WKNetworkInfoManager.h: Removed.
1010         * UIProcess/API/efl/ewk_context.cpp:
1011         (EwkContext::EwkContext):
1012         * UIProcess/API/efl/ewk_context_private.h:
1013         * UIProcess/WebContext.cpp:
1014         (WebKit::WebContext::WebContext):
1015         * UIProcess/WebContext.h:
1016         * UIProcess/WebNetworkInfoManagerProxy.cpp: Removed.
1017         * UIProcess/WebNetworkInfoManagerProxy.h: Removed.
1018         * UIProcess/WebNetworkInfoManagerProxy.messages.in: Removed.
1019         * UIProcess/WebNetworkInfoProvider.cpp: Removed.
1020         * UIProcess/WebNetworkInfoProvider.h: Removed.
1021         * UIProcess/efl/NetworkInfoProvider.cpp: Removed.
1022         * UIProcess/efl/NetworkInfoProvider.h: Removed.
1023         * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp: Removed.
1024         * WebProcess/NetworkInfo/WebNetworkInfoManager.h: Removed.
1025         * WebProcess/NetworkInfo/WebNetworkInfoManager.messages.in: Removed.
1026         * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp: Removed.
1027         * WebProcess/WebCoreSupport/WebNetworkInfoClient.h: Removed.
1028         * WebProcess/WebPage/WebPage.cpp:
1029         (WebKit::WebPage::WebPage):
1030         * WebProcess/WebProcess.cpp:
1031         (WebKit::WebProcess::WebProcess):
1032
1033 2014-04-17  Daniel Bates  <dabates@apple.com>
1034
1035         [iOS] Hook up screen.{availHeight, availWidth, height, width}
1036         https://bugs.webkit.org/show_bug.cgi?id=131821
1037         <rdar://problem/16413795>
1038
1039         Reviewed by Benjamin Poulain and Tim Horton.
1040
1041         Implement WebKit2-specific support infrastructure.
1042
1043         Additionally substitute "screenSize" for "viewporScreenSize" to make the code more understandable.
1044
1045         * Shared/WebPageCreationParameters.cpp:
1046         (WebKit::WebPageCreationParameters::encode): Modified to encode the available screen size
1047         creation parameter.
1048         (WebKit::WebPageCreationParameters::decode): Modified to decode the available screen size
1049         creation parameter.
1050         * Shared/WebPageCreationParameters.h:
1051         * UIProcess/WebPageProxy.cpp:
1052         (WebKit::WebPageProxy::creationParameters): Initialize the available screen size
1053         parameter.
1054         * UIProcess/WebPageProxy.h:
1055         * UIProcess/ios/WebPageProxyIOS.mm:
1056         (WebKit::WebPageProxy::screenSize): Renamed; formerly named viewportScreenSize.
1057         (WebKit::WebPageProxy::availableScreenSize): Added.
1058         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1059         (WebKit::WebChromeClient::screenSize): Renamed; formerly named viewportScreenSize.
1060         (WebKit::WebChromeClient::availableScreenSize): Added; turns around and calls WebPage::availableScreenSize().
1061         * WebProcess/WebCoreSupport/WebChromeClient.h:
1062         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1063         (InitWebCoreSystemInterface): Hook up WebKit System Interface function WKGetAvailableScreenSize.
1064         * WebProcess/WebPage/WebPage.cpp:
1065         (WebKit::WebPage::WebPage): Initialize available screen size instance variable.
1066         * WebProcess/WebPage/WebPage.h:
1067         * WebProcess/WebPage/ios/WebPageIOS.mm:
1068         (WebKit::WebPage::screenSize):
1069         (WebKit::WebPage::availableScreenSize):
1070
1071 2014-04-17  Anders Carlsson  <andersca@apple.com>
1072
1073         Remove unused API enums
1074         https://bugs.webkit.org/show_bug.cgi?id=131836
1075
1076         Reviewed by Tim Horton.
1077
1078         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1079         (NS_ENUM):
1080         * UIProcess/Cocoa/NavigationState.mm:
1081         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
1082         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
1083
1084 2014-04-17  Brent Fulgham  <bfulgham@apple.com>
1085
1086         Make RenderLayerBacking get the timingFunction of the correct animation.
1087         https://bugs.webkit.org/show_bug.cgi?id=100632
1088
1089         Reviewed by Simon Fraser.
1090
1091         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1092         (IPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Update for new signatures for
1093         FloatAnimationValue, TransformAnimationValue, etc.
1094
1095 2014-04-17  Enrica Casucci  <enrica@apple.com>
1096
1097         [iOS WebKit2] support replacements for misspelled words.
1098         https://bugs.webkit.org/show_bug.cgi?id=131827
1099         <rdar://problem/16319657>
1100
1101         Reviewed by Benjamin Poulain.
1102
1103         This is the first part of the work to add support for replacements.
1104         It handles _promptForReplace in canPerformAction to decide
1105         whether to show the Replace button in the menu and add the
1106         implementation of the replace action.
1107
1108         * Shared/EditorState.cpp:
1109         (WebKit::EditorState::encode):
1110         (WebKit::EditorState::decode):
1111         * Shared/EditorState.h:
1112         (WebKit::EditorState::EditorState):
1113         * UIProcess/WebPageProxy.h:
1114         * UIProcess/ios/WKContentViewInteraction.mm:
1115         (-[WKContentView selectedText]):
1116         (-[WKContentView replaceText:withText:]):
1117         (-[WKContentView _promptForReplace:]):
1118         (-[WKContentView replace:]):
1119         (-[WKContentView canPerformAction:withSender:]):
1120         (-[WKContentView selectWordForReplacement]): This is called
1121         by UIKit when the user taps on a mispelled word to select it.
1122         * UIProcess/ios/WebPageProxyIOS.mm:
1123         (WebKit::WebPageProxy::replaceSelectedText):
1124         * WebProcess/WebPage/WebPage.cpp:
1125         (WebKit::WebPage::WebPage):
1126         (WebKit::WebPage::editorState):
1127         * WebProcess/WebPage/WebPage.h:
1128         * WebProcess/WebPage/WebPage.messages.in:
1129         * WebProcess/WebPage/ios/WebPageIOS.mm:
1130         (WebKit::WebPage::selectWithGesture): Removed m_shouldReturnWordForSelection.
1131         We now return always the word corresponding to the caret selection or
1132         the selected text up to a maximum of 200 characters.
1133         (WebKit::WebPage::extendSelection):
1134         (WebKit::WebPage::replaceSelectedText):
1135
1136 2014-04-17  Tim Horton  <timothy_horton@apple.com>
1137
1138         [iOS] REGRESSION (r166975): WKPDFView is broken
1139         https://bugs.webkit.org/show_bug.cgi?id=131828
1140
1141         Reviewed by Simon Fraser.
1142
1143         * UIProcess/API/Cocoa/WKWebView.mm:
1144         (-[WKWebView _didCommitLayerTree:WebKit::]):
1145         Bail from updating the scroll view parameters from the layer tree update
1146         while it's being managed by a custom content view.
1147         We'll get any changes again in the next commit after removing the custom
1148         content view (and painting the new page) anyway, so this should be OK.
1149
1150 2014-04-17  Pratik Solanki  <psolanki@apple.com>
1151
1152         _webProcessIdentifier should return 0 if the web process crashed
1153         https://bugs.webkit.org/show_bug.cgi?id=131813
1154         <rdar://problem/16650605>
1155
1156         Reviewed by Anders Carlsson.
1157
1158         * UIProcess/API/Cocoa/WKWebView.mm:
1159         (-[WKWebView _hasWebProcess]):
1160         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1161
1162 2014-04-17  Darin Adler  <darin@apple.com>
1163
1164         Remove use of deprecatedDeleteAllValues in NPRemoteObjectMap::pluginDestroyed
1165         https://bugs.webkit.org/show_bug.cgi?id=122496
1166
1167         Reviewed by Brent Fulgham.
1168
1169         * Shared/Plugins/NPRemoteObjectMap.cpp:
1170         (WebKit::NPRemoteObjectMap::pluginDestroyed): Use new-style code and write the
1171         deprecatedDeleteAllValues function out using a loop. Might be nice to return here
1172         and use unique_ptr instead some day, but I tried that before and got it wrong, so
1173         lets do that another time.
1174
1175 2014-04-17  Darin Adler  <darin@apple.com>
1176
1177         Add separate flag for IndexedDatabase in workers since the current implementation is not threadsafe
1178         https://bugs.webkit.org/show_bug.cgi?id=131785
1179         rdar://problem/16003108
1180
1181         Reviewed by Brady Eidson.
1182
1183         * Configurations/FeatureDefines.xcconfig: Added INDEXED_DATABASE_IN_WORKERS.
1184
1185 2014-04-17  Dan Bernstein  <mitz@apple.com>
1186
1187         WebKit2 part of <rdar://problem/16601336> [Cocoa] _userInitiated is always NO in WKNavigationAction passed to -webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:
1188         https://bugs.webkit.org/show_bug.cgi?id=131783
1189
1190         Reviewed by Tim Horton.
1191
1192         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1193         (WebKit::WebChromeClient::createWindow): Set the isProcessingUserGesture field of
1194         the NavigationActionData to the corresponding value in the NavigationAction.
1195         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1196         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.
1197         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
1198
1199 2014-04-16  Benjamin Poulain  <bpoulain@apple.com>
1200
1201         [iOS][WK2] Fix the DidCommitLoad initial scrolling position
1202         https://bugs.webkit.org/show_bug.cgi?id=131780
1203
1204         Reviewed by Jon Honeycutt.
1205
1206         * UIProcess/API/Cocoa/WKWebView.mm:
1207         (-[WKWebView _didCommitLayerTree:]):
1208         That code is older than _obscuredInsets and used the contentInsets as a workaround.
1209
1210 2014-04-16  Benjamin Poulain  <bpoulain@apple.com>
1211
1212         [iOS][WK2] Fix annoying scrolling bugs
1213         https://bugs.webkit.org/show_bug.cgi?id=131722
1214
1215         Reviewed by Simon Fraser.
1216
1217         * UIProcess/API/Cocoa/WKWebView.mm:
1218         (-[WKWebView _scrollToContentOffset:WebCore::]):
1219         We are scrolling at the wrong position when we have the "small obscured insets".
1220
1221 2014-04-16  Gavin Barraclough  <baraclough@apple.com>
1222
1223         On iOS keep network process running using a process assertion rather than a boost
1224         https://bugs.webkit.org/show_bug.cgi?id=131779
1225
1226         Reviewed by Benjamin Poulain.
1227
1228         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1229         (WebKit::connectToService):
1230             - No need to leak a boost onto the NetworkProcess on iOS.
1231         * UIProcess/Network/NetworkProcessProxy.cpp:
1232         (WebKit::NetworkProcessProxy::didFinishLaunching):
1233             - Take a ProcessAssertion on the NetworkProcess.
1234         * UIProcess/Shared/ChildProcessProxy.h:
1235             - Added m_assertion.
1236         * UIProcess/WebProcessProxy.h:
1237             - Removed m_assertion.
1238         * UIProcess/ios/ProcessAssertion.h: Added.
1239             - Added - refactored from WebProcessProxy.h.
1240         * UIProcess/ios/ProcessAssertion.mm: Added.
1241         (WebKit::ProcessAssertion::ProcessAssertion):
1242         (WebKit::ProcessAssertion::setState):
1243             - Added - refactored from WebProcessProxyIOS.mm.
1244         * UIProcess/ios/WebProcessProxyIOS.mm:
1245         (WebKit::WebProcessProxy::updateProcessState):
1246             - Code refactored out to ProcessAssertion.mm.
1247         * WebKit2.xcodeproj/project.pbxproj:
1248             - Added files.
1249
1250 2014-04-16  Benjamin Poulain  <bpoulain@apple.com>
1251
1252         [iOS][WK2] Improve the approximation of the scroll position of the dynamic viewport size updates
1253         https://bugs.webkit.org/show_bug.cgi?id=131720
1254
1255         Reviewed by Tim Horton.
1256
1257         * UIProcess/API/Cocoa/WKWebView.mm:
1258         (-[WKWebView _scrollToContentOffset:]):
1259         The scrolling tree was forcing scroll at the wrong scale during the transition. 
1260
1261         (-[WKWebView _setMinimumLayoutSizeOverride:]):
1262         This was left out by accident. The WebProcess was getting the new layout size twice, making
1263         WebPage::dynamicViewportSizeUpdate() very confused when the content size changes.
1264
1265         * WebProcess/WebPage/ios/WebPageIOS.mm:
1266         (WebKit::WebPage::dynamicViewportSizeUpdate):
1267         Add scrolling adjustment for the dynamic relayout case:
1268         -Sticky top and bottom like the UIProcess.
1269         -Keep the same relative position of the unobscured rect's center.
1270
1271         Also fix a bug in the horizontal and vertical adjustments: the code was using the exposed rect
1272         instead of the unobscured rect, which made the adjustments off by the size of the obscured insets.
1273
1274         The type is changed from double to float since ARMv7 has a grudge against double.
1275
1276 2014-04-16  Benjamin Poulain  <bpoulain@apple.com>
1277
1278         [iOS][WK2] Do not update the visible content rects when setting the same obscured insets multiple times
1279         https://bugs.webkit.org/show_bug.cgi?id=131633
1280
1281         Reviewed by Darin Adler.
1282
1283         We should avoid computing the visible content rects when not needed.
1284
1285         * UIProcess/API/Cocoa/WKWebView.mm:
1286         (-[WKWebView _setObscuredInsets:]):
1287
1288 2014-04-16  Zan Dobersek  <zdobersek@igalia.com>
1289
1290         Make IPC::Arguments a variadic template
1291         https://bugs.webkit.org/show_bug.cgi?id=131684
1292
1293         Reviewed by Darin Adler.
1294
1295         Make IPC::Arguments a variadic template that uses the template parameter pack to further
1296         define the std::tuple ValueType and is used to define the std::tuple container of the
1297         values passed into the container.
1298
1299         * Platform/IPC/Arguments.h:
1300         (IPC::Arguments::Arguments):
1301         (IPC::Arguments::encode):
1302         (IPC::Arguments::decode):
1303         (IPC::Arguments0::encode): Deleted.
1304         (IPC::Arguments0::decode): Deleted.
1305         (IPC::Arguments1::Arguments1): Deleted.
1306         (IPC::Arguments1::encode): Deleted.
1307         (IPC::Arguments1::decode): Deleted.
1308         (IPC::Arguments2::Arguments2): Deleted.
1309         (IPC::Arguments2::encode): Deleted.
1310         (IPC::Arguments2::decode): Deleted.
1311         (IPC::Arguments3::Arguments3): Deleted.
1312         (IPC::Arguments3::encode): Deleted.
1313         (IPC::Arguments3::decode): Deleted.
1314         (IPC::Arguments4::Arguments4): Deleted.
1315         (IPC::Arguments4::encode): Deleted.
1316         (IPC::Arguments4::decode): Deleted.
1317         (IPC::Arguments5::Arguments5): Deleted.
1318         (IPC::Arguments5::encode): Deleted.
1319         (IPC::Arguments5::decode): Deleted.
1320         (IPC::Arguments6::Arguments6): Deleted.
1321         (IPC::Arguments6::encode): Deleted.
1322         (IPC::Arguments6::decode): Deleted.
1323         (IPC::Arguments7::Arguments7): Deleted.
1324         (IPC::Arguments7::encode): Deleted.
1325         (IPC::Arguments7::decode): Deleted.
1326         (IPC::Arguments8::Arguments8): Deleted.
1327         (IPC::Arguments8::encode): Deleted.
1328         (IPC::Arguments8::decode): Deleted.
1329         (IPC::Arguments10::Arguments10): Deleted.
1330         (IPC::Arguments10::encode): Deleted.
1331         (IPC::Arguments10::decode): Deleted.
1332         * Scripts/webkit2/LegacyMessages-expected.h:
1333         * Scripts/webkit2/Messages-expected.h:
1334         * Scripts/webkit2/messages.py: Clean up the code a bit.
1335         (reply_parameter_type):
1336         (arguments_type):
1337         (reply_type):
1338         (decode_type):
1339         (arguments_type_old): Deleted.
1340         (base_class): Deleted.
1341         (delayed_reply_type): Deleted.
1342
1343 2014-04-16  Tim Horton  <timothy_horton@apple.com>
1344
1345         Deduplicate LayerTreeContext
1346         https://bugs.webkit.org/show_bug.cgi?id=131773
1347
1348         Reviewed by Simon Fraser.
1349
1350         There are three identical implementations, one for each platform, for no reason.
1351
1352         * CMakeLists.txt:
1353         * PlatformEfl.cmake:
1354         * PlatformGTK.cmake:
1355         * Shared/LayerTreeContext.cpp: Renamed from Source/WebKit2/Shared/mac/LayerTreeContextMac.mm.
1356         (WebKit::LayerTreeContext::LayerTreeContext):
1357         (WebKit::LayerTreeContext::~LayerTreeContext):
1358         (WebKit::LayerTreeContext::encode):
1359         (WebKit::LayerTreeContext::decode):
1360         (WebKit::LayerTreeContext::isEmpty):
1361         (WebKit::operator==):
1362         * Shared/LayerTreeContext.h:
1363         (WebKit::operator!=): Deleted.
1364         * Shared/efl/LayerTreeContextEfl.cpp: Removed.
1365         * Shared/gtk/LayerTreeContextGtk.cpp: Removed.
1366         * WebKit2.xcodeproj/project.pbxproj:
1367         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1368         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1369         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1370         (WebKit::LayerTreeHostGtk::initialize):
1371
1372 2014-04-16  Tim Horton  <timothy_horton@apple.com>
1373
1374         Don't build LayerTreeHost on Mac (and clean it up)
1375         https://bugs.webkit.org/show_bug.cgi?id=131769
1376
1377         Reviewed by Simon Fraser.
1378
1379         * WebKit2.xcodeproj/project.pbxproj:
1380         Don't include it in the project.
1381
1382         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1383         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1384         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
1385         (WebKit::CoordinatedDrawingArea::updatePreferences):
1386         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1387         (WebKit::DrawingAreaImpl::updatePreferences):
1388         * WebProcess/WebPage/LayerTreeHost.h:
1389         (WebKit::LayerTreeHost::setLayerHostingMode): Deleted.
1390         (WebKit::LayerTreeHost::supportsAcceleratedCompositing): Deleted.
1391         * WebProcess/WebPage/WebPage.cpp:
1392         (WebKit::WebPage::updatePreferences):
1393         * WebProcess/WebPage/ios/WebPageIOS.mm:
1394         Get rid of LayerTreeHost::supportsAcceleratedCompositing, which always returns true everywhere.
1395         Remove some LayerTreeHost.h includes.
1396         Remove LayerTreeHost::setLayerHostingMode, which is PLATFORM(COCOA) and not needed.
1397
1398 2014-04-16  Simon Fraser  <simon.fraser@apple.com>
1399
1400         Failing to decode a layer tree commit message resulted in silent and mysterious failure
1401         https://bugs.webkit.org/show_bug.cgi?id=131766
1402         <rdar://problem/16520894>
1403
1404         Reviewed by Sam Weinig.
1405         
1406         If the message decode failed, we should have already marked the message as invalid.
1407         Failing to do so indicates in a decode code coding error.
1408
1409         * Platform/IPC/HandleMessage.h:
1410         (IPC::handleMessage):
1411         (IPC::handleMessageVariadic):
1412         (IPC::handleMessageDelayed):
1413
1414 2014-04-16  Tim Horton  <timothy_horton@apple.com>
1415
1416         Minor include sanity in WebPage.h
1417         https://bugs.webkit.org/show_bug.cgi?id=131752
1418
1419         Reviewed by Simon Fraser.
1420
1421         * WebProcess/WebPage/WebPage.h:
1422         Remove a bunch of unnecessary includes.
1423         Un-indent some stuff.
1424
1425         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1426         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1427         * WebProcess/WebPage/FindController.cpp:
1428         * WebProcess/WebPage/WebPage.cpp:
1429         * WebProcess/WebPage/mac/WebPageMac.mm:
1430         Add back more specific includes, into implementation files.
1431         
1432         * WebProcess/WebPage/WebUndoStep.cpp:
1433         (WebKit::WebUndoStep::~WebUndoStep):
1434         * WebProcess/WebPage/WebUndoStep.h:
1435         Add an out-of-line destructor.
1436
1437 2014-04-16  Gavin Barraclough  <baraclough@apple.com>
1438
1439         REGRESSION: PCE.js is 20x slower in WebKit2 because timers are throttled
1440         https://bugs.webkit.org/show_bug.cgi?id=131189
1441
1442         Unreviewed rollout of r166754
1443
1444         This change is no longer necessary.
1445
1446         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1447         (WebKit::connectToService):
1448
1449 2014-04-16  Alexey Proskuryakov  <ap@apple.com>
1450
1451         Updating tests after bug 131721, [GTK] Fix unused parameter warnings.
1452
1453         * Scripts/webkit2/LegacyMessageReceiver-expected.cpp:
1454         (WebKit::WebPage::didReceiveWebPageMessage):
1455         (WebKit::WebPage::didReceiveSyncWebPageMessage):
1456         * Scripts/webkit2/MessageReceiver-expected.cpp:
1457         (WebKit::WebPage::didReceiveMessage):
1458         (WebKit::WebPage::didReceiveSyncMessage):
1459
1460 2014-04-16  Brendan Long  <b.long@cablelabs.com>
1461
1462         [GTK] Fix unused parameter warnings
1463         https://bugs.webkit.org/show_bug.cgi?id=131721
1464
1465         Reviewed by Darin Adler.
1466
1467         * Scripts/webkit2/messages.py:
1468         (generate_message_handler): Add UNUSED_PARAM() for a couple parameters which aren't always used.
1469         * Shared/WebCoreArgumentCoders.cpp:
1470         (IPC::ArgumentCoder<LinearTimingFunction>::decode): Remove unused parameters.
1471         * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
1472         (API::InjectedBundle::FormClient::textDidChangeInTextField): Same.
1473         (API::InjectedBundle::FormClient::willSubmitForm): Same.
1474         (API::InjectedBundle::FormClient::willSendSubmitEvent): Same.
1475         * WebProcess/Network/NetworkProcessConnection.cpp:
1476         (WebKit::NetworkProcessConnection::didReceiveSyncMessage): Same.
1477
1478 2014-04-16  Tim Horton  <timothy_horton@apple.com>
1479
1480         Accidentally included some style-checker-testing changes in the last commit.
1481
1482         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1483         (WebKit::PDFPlugin::attemptToUnlockPDF):
1484         (WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):
1485
1486 2014-04-16  Tim Horton  <timothy_horton@apple.com>
1487
1488         Fix some style checker complaints in PDFPlugin
1489         https://bugs.webkit.org/show_bug.cgi?id=131706
1490
1491         Reviewed by Darin Adler.
1492
1493         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1494         (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]):
1495         (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:forParameter:]):
1496         (-[WKPDFPluginAccessibilityObject accessibilityAttributeNames]):
1497         (WebKit::PDFPlugin::attemptToUnlockPDF):
1498         (WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):
1499         (WebKit::PDFPlugin::isEditingCommandEnabled):
1500         (WebKit::PDFPlugin::nextMatchForString):
1501         (WebKit::PDFPlugin::handleWheelEvent):
1502         (WebKit::PDFPlugin::liveData):
1503
1504 2014-04-15  Dan Bernstein  <mitz@apple.com>
1505
1506         [Cocoa] Add a form delegate method corresponding to willSubmitForm
1507         https://bugs.webkit.org/show_bug.cgi?id=131718
1508
1509         Reviewed by Tim Horton.
1510
1511         * UIProcess/API/Cocoa/WKWebView.mm:
1512         (-[WKWebView _setFormDelegate:]): Changed to define and create a FormClient (which derives
1513         from API::FormClient and messages a delegate), and set it as the form client.
1514
1515         * UIProcess/API/Cocoa/_WKFormDelegate.h: Declared new delegate method.
1516
1517         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Added a
1518         variant of willSubmitForm that returs a user object to pass to the delegate in the UI
1519         process, giving it a temporary name with “new”.
1520
1521         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1522         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Changed willSubmitForm()
1523         to check for the new bundle delegate method first and encode the user object as user data.
1524         Moved the encoding of an NSObject <NSSecureCoding> as user data into a helper function.
1525
1526 2014-04-15  Hyowon Kim  <hw1008.kim@samsung.com>
1527
1528         Make page overlay functionality working on coordinated graphics.
1529         https://bugs.webkit.org/show_bug.cgi?id=131425
1530
1531         Reviewed by Darin Adler.
1532
1533         Page overlay functionality did not work on coordinated graphics since r166975.
1534         This patch removes deprecated code related to the PageOverlay GraphicsLayer management.
1535         and makes CoordinatedLayerTreeHost use PageOverlayController.
1536
1537         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
1538         (WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged):
1539         (WebKit::CoordinatedDrawingArea::didInstallPageOverlay): Deleted.
1540         (WebKit::CoordinatedDrawingArea::didUninstallPageOverlay): Deleted.
1541         (WebKit::CoordinatedDrawingArea::setPageOverlayNeedsDisplay): Deleted.
1542         (WebKit::CoordinatedDrawingArea::setPageOverlayOpacity): Deleted.
1543         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
1544         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1545         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
1546         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
1547         (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
1548         (WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay): Deleted.
1549         (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay): Deleted.
1550         (WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay): Deleted.
1551         (WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity): Deleted.
1552         (WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer): Deleted.
1553         (WebKit::CoordinatedLayerTreeHost::destroyPageOverlayLayer): Deleted.
1554         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1555         * WebProcess/WebPage/LayerTreeHost.h:
1556         (WebKit::LayerTreeHost::didInstallPageOverlay):
1557         (WebKit::LayerTreeHost::didUninstallPageOverlay):
1558         (WebKit::LayerTreeHost::setPageOverlayNeedsDisplay):
1559
1560 2014-04-15  Dan Bernstein  <mitz@apple.com>
1561
1562         Introduce API::FormClient
1563         https://bugs.webkit.org/show_bug.cgi?id=131714
1564
1565         Reviewed by Tim Horton.
1566
1567         * UIProcess/API/APIFormClient.h: Added.
1568         (API::FormClient::~FormClient):
1569         (API::FormClient::willSubmitForm):
1570
1571         * UIProcess/API/C/WKPage.cpp:
1572         (WKPageSetPageFormClient): Changed to create a WebFormClient and call
1573         WebPageProxy::setFormClient.
1574
1575         * UIProcess/WebFormClient.cpp:
1576         (WebKit::WebFormClient::WebFormClient): Added a constructor from WKPageFormClientBase.
1577         * UIProcess/WebFormClient.h: Added inheritance from API::FormClient, marked overrides as
1578         such.
1579
1580         * UIProcess/WebPageProxy.cpp:
1581         (WebKit::WebPageProxy::WebPageProxy): Initialize m_formClient member.
1582         (WebKit::WebPageProxy::setFormClient): Added. Updates m_formClient.
1583         (WebKit::WebPageProxy::close): Updated code to clear m_formClient.
1584         (WebKit::WebPageProxy::willSubmitForm): Updated for type change.
1585         (WebKit::WebPageProxy::initializeFormClient): Deleted.
1586         * UIProcess/WebPageProxy.h:
1587
1588         * WebKit2.xcodeproj/project.pbxproj: Added reference to new file.
1589
1590 2014-04-15  Simon Fraser  <simon.fraser@apple.com>
1591
1592         [iOS WK2] Pages often blank on first load if page loaded by typing the URL
1593         https://bugs.webkit.org/show_bug.cgi?id=131665
1594
1595         Reviewed by Tim Horton.
1596
1597         The document overlay-related code in RemoteLayerTreeDrawingArea::setRootCompositingLayer()
1598         was triggering a compositing layer flush when called with a null rootLayer, which happens
1599         for pages going into the page cache. This would trigger a layer flush that would clobber
1600         the root layer for the visible page, resulting in missing content.
1601         
1602         Also, rebuildCompositingLayerTree() is called recursively and the m_documentOverlayRootLayer
1603         was being added to (and then removed from) every single compositing layers.
1604         
1605         Fix both these by changing to a pull model, where RenderLayerCompositor requests
1606         the overlay layer via ChromeClient, and gets it at the end of every flush,
1607         adding to the children of the root layer.
1608
1609         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1610         (WebKit::WebChromeClient::documentOverlayLayerForFrame):
1611         * WebProcess/WebCoreSupport/WebChromeClient.h:
1612         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1613         (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
1614
1615 2014-04-15  Jinwoo Song  <jinwoo7.song@samsung.com>
1616
1617         [EFL][WK2] Pass Mouse movement data to WebMouseEvent
1618         https://bugs.webkit.org/show_bug.cgi?id=131663
1619
1620         Reviewed by Gyuyoung Kim.
1621
1622         Currently mouse movement data are not passed to WebMouseEvent. Instead, they are set to 0 as default.
1623         EFL port needs to send the deltaX and deltaY for PointerLock API which will be implemented later.
1624
1625         * Shared/efl/WebEventFactory.cpp:
1626         (WebKit::WebEventFactory::createWebMouseEvent):
1627
1628 2014-04-15  Commit Queue  <commit-queue@webkit.org>
1629
1630         Unreviewed, rolling out r167298.
1631         https://bugs.webkit.org/show_bug.cgi?id=131670
1632
1633         Broke CSS filters (17 test crashes) (Requested by ap on
1634         #webkit).
1635
1636         Reverted changeset:
1637
1638         "[iOS WK2] Pages often blank on first load if page loaded by
1639         typing the URL"
1640         https://bugs.webkit.org/show_bug.cgi?id=131665
1641         http://trac.webkit.org/changeset/167298
1642
1643 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
1644
1645         [iOS WK2] Pages often blank on first load if page loaded by typing the URL
1646         https://bugs.webkit.org/show_bug.cgi?id=131665
1647
1648         Reviewed by Tim Horton.
1649
1650         The document overlay-related code in RemoteLayerTreeDrawingArea::setRootCompositingLayer()
1651         was triggering a compositing layer flush when called with a null rootLayer, which happens
1652         for pages going into the page cache. This would trigger a layer flush that would clobber
1653         the root layer for the visible page, resulting in missing content.
1654         
1655         Also, rebuildCompositingLayerTree() is called recursively and the m_documentOverlayRootLayer
1656         was being added to (and then removed from) every single compositing layers.
1657         
1658         Fix both these by changing to a pull model, where RenderLayerCompositor requests
1659         the overlay layer via ChromeClient, and gets it at the end of every flush,
1660         adding to the children of the root layer.
1661
1662         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1663         (WebKit::WebChromeClient::documentOverlayLayerForFrame):
1664         * WebProcess/WebCoreSupport/WebChromeClient.h:
1665         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1666         (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
1667
1668 2014-04-14  Tim Horton  <timothy_horton@apple.com>
1669
1670         Fix the 32-bit build.
1671
1672         * UIProcess/mac/ViewGestureControllerMac.mm:
1673
1674 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
1675
1676         REGRESSION (WebKit2): Programmatic scrolls in overflow-scrolling:touch don't work
1677         https://bugs.webkit.org/show_bug.cgi?id=131649
1678
1679         Reviewed by Tim Horton.
1680         
1681         Update the UIScrollView's contentOffset when we're told that the scroll position
1682         changed.
1683         
1684         Also refactor slightly to have a single exception-protected block.
1685
1686         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1687         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
1688
1689 2014-04-14  Tim Horton  <timothy_horton@apple.com>
1690
1691         Fix the 32-bit build.
1692
1693         * UIProcess/mac/ViewGestureControllerMac.mm:
1694
1695 2014-04-14  Tim Horton  <timothy_horton@apple.com>
1696
1697         Sometimes-crash under handleSwipeGesture after closing a window or quitting
1698         https://bugs.webkit.org/show_bug.cgi?id=131648
1699         <rdar://problem/15966106>
1700
1701         Reviewed by Simon Fraser.
1702
1703         * UIProcess/mac/ViewGestureController.h:
1704         * UIProcess/mac/ViewGestureControllerMac.mm:
1705         (WebKit::ViewGestureController::~ViewGestureController):
1706         (WebKit::ViewGestureController::trackSwipeGesture):
1707         Keep a Objective C object with a single boolean property, isCancelled, on
1708         the ViewGestureController, and also retained by the swipe-tracking block.
1709         When the ViewGestureController is destroyed, we set isCancelled to YES,
1710         and the next time the block is invoked, we will cancel the swipe without
1711         touching the destroyed ViewGestureController.
1712
1713         (WebKit::ViewGestureController::handleSwipeGesture):
1714         Don't try to handle a swipe gesture if the drawing area is missing.
1715
1716         (WebKit::ViewGestureController::endSwipeGesture):
1717         Clear the swipe cancellation tracker when the gesture completes.
1718
1719 2014-04-14  Enrica Casucci  <enrica@apple.com>
1720
1721         REGRESSION(r166027) Menu is shown and immediately hidden after doubletap gesture.
1722         https://bugs.webkit.org/show_bug.cgi?id=131646
1723         <rdar://problem/16614374>
1724
1725         Reviewed by Benjamin Poulain.
1726
1727         This is a problem with every gesture that changes the selection
1728         We don't need to delay updating the selection if the selection is
1729         being changed with a gesture.
1730
1731         * UIProcess/ios/WKContentViewInteraction.h:
1732         * UIProcess/ios/WKContentViewInteraction.mm:
1733         (-[WKContentView _didUpdateBlockSelectionWithTouch:withFlags:growThreshold:shrinkThreshold:]):
1734         (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
1735         (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
1736         (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
1737         (-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
1738         (-[WKContentView _selectionChanged]):
1739
1740 2014-04-14  Dan Bernstein  <mitz@apple.com>
1741
1742         Let the bundle form client know whether a change in a text field was initiated by user typing
1743         https://bugs.webkit.org/show_bug.cgi?id=131643
1744
1745         Reviewed by Sam Weinig.
1746
1747         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Added
1748         initiatedByUserTyping parameter to the delegate method.
1749
1750         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1751         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Updated overload of
1752         textDidChangeInTextField to take the initiatedByUserTyping parameter and pass it along to
1753         the delegate.
1754
1755         * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
1756         (API::InjectedBundle::FormClient::textDidChangeInTextField): Added initiatedByUserTyping
1757         parameter.
1758
1759         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1760         (WebKit::InjectedBundlePageFormClient::textDidChangeInTextField): Maintained the existing
1761         behavior of not calling the C SPI client if the change was not initiated by user typing.
1762         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: Updated for added parameter.
1763
1764         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1765         (WebKit::WebEditorClient::textDidChangeInTextField): Changed to call the bundle client
1766         function unconditionally, but pass along whether the change was initiated by user typing.
1767
1768 2014-04-14  Dan Bernstein  <mitz@apple.com>
1769
1770         [Cocoa] Add a WKWebProcessPlugInFormDelegate method corresponding to willSendSubmitEvent
1771         https://bugs.webkit.org/show_bug.cgi?id=131639
1772
1773         Reviewed by Tim Horton.
1774
1775         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared
1776         new delegate method.
1777         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1778         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added an override
1779         of API::InjectedBundle::FormClient::willSendSubmitEvent which calls the new delegate
1780         method.
1781
1782 2014-04-14  Benjamin Poulain  <bpoulain@apple.com>
1783
1784         [iOS][WK2] Change the SPI used when starting the rotation animation
1785         https://bugs.webkit.org/show_bug.cgi?id=131638
1786
1787         Reviewed by Tim Horton.
1788
1789         Having an update block where all the properties are changed is more convenient for Safari.
1790
1791         * UIProcess/API/Cocoa/WKWebView.mm:
1792         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1793         (-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]): Deleted.
1794         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1795
1796 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
1797
1798         [iOS WK2] Hash table assertion closing a tab
1799         https://bugs.webkit.org/show_bug.cgi?id=131640
1800
1801         Reviewed by Tim Horton.
1802         
1803         Have RemoteLayerTreeContext keep track of all PlatformCALayerRemotes,
1804         and clear their context pointer when it is being destroyed to avoid
1805         calling into a deleted object later.
1806
1807         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1808         (WebKit::PlatformCALayerRemote::~PlatformCALayerRemote):
1809         (WebKit::PlatformCALayerRemote::addAnimationForKey):
1810         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1811         (WebKit::PlatformCALayerRemote::clearContext):
1812         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
1813         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1814         (WebKit::RemoteLayerTreeContext::~RemoteLayerTreeContext):
1815         (WebKit::RemoteLayerTreeContext::layerWasCreated):
1816         (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
1817
1818 2014-04-14  Tim Horton  <timothy_horton@apple.com>
1819
1820         Allow dynamic changes of WKThumbnailView snapshot scale
1821         https://bugs.webkit.org/show_bug.cgi?id=131628
1822         <rdar://problem/16584156>
1823
1824         Reviewed by Beth Dakin.
1825
1826         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
1827         (-[_WKThumbnailView _requestSnapshotIfNeeded]):
1828         Don't bail from requesting a snapshot just because we already had one; we want to resnapshot.
1829         Keep track of when we bail from requesting a snapshot because we have one in-flight, so we can request it later.
1830
1831         (-[_WKThumbnailView _didTakeSnapshot:]):
1832         Apply the scale to the bitmap size (whoops!).
1833         Make CA always resize the content to fill the thumbnail view's layer, respecting aspect ratio.
1834         Re-snapshot if we previously deferred a snapshot.
1835
1836         (-[_WKThumbnailView setScale:]):
1837         If we get a scale change, request a new snapshot.
1838
1839         (-[_WKThumbnailView setUsesSnapshot:]):
1840         Never apply thumbnail scale to the page if we're using snapshots. It's unnecessary,
1841         because scale will be applied simply when painting the software snapshot.
1842         Apply the thumbnail scale if we're going from usesSnapshot -> !usesSnapshot.
1843
1844         * WebProcess/WebPage/WebPage.cpp:
1845         (WebKit::WebPage::snapshotAtSize):
1846         Snapshots should use the greater of the two scales, so as to never leave a portion of the snapshot unpainted.
1847
1848 2014-04-14  Tim Horton  <timothy_horton@apple.com>
1849
1850         REGRESSION (WebKit2 View Gestures): Double-tap doesn't work properly when there's no element underneath the cursor
1851         https://bugs.webkit.org/show_bug.cgi?id=131629
1852         <rdar://problem/16192821>
1853
1854         Reviewed by Dan Bernstein.
1855
1856         * UIProcess/mac/ViewGestureControllerMac.mm:
1857         (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
1858         If there's nothing under the cursor, zoom towards the cursor instead of towards 0,0.
1859
1860 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
1861
1862         Run filter animations in the UI process with UI-side compositing
1863         https://bugs.webkit.org/show_bug.cgi?id=131199
1864         <rdar://problem/16479487>
1865
1866         Reviewed by Sam Weinig.
1867         
1868         * Shared/WebCoreArgumentCoders.cpp: Removed lots of WebCore::
1869         (IPC::ArgumentCoder<SelectionRect>::decode):
1870         (IPC::ArgumentCoder<PasteboardWebContent>::encode):
1871         (IPC::ArgumentCoder<PasteboardWebContent>::decode):
1872         (IPC::ArgumentCoder<PasteboardImage>::encode):
1873         (IPC::ArgumentCoder<PasteboardImage>::decode):
1874         (IPC::ArgumentCoder<URL>::decode):
1875         (IPC::ArgumentCoder<UserStyleSheet>::encode):
1876         (IPC::ArgumentCoder<UserStyleSheet>::decode):
1877         (IPC::ArgumentCoder<UserScript>::encode):
1878         (IPC::ArgumentCoder<UserScript>::decode):
1879         (IPC::ArgumentCoder<ScrollableAreaParameters>::encode):
1880         (IPC::ArgumentCoder<ScrollableAreaParameters>::decode):
1881         (IPC::ArgumentCoder<FixedPositionViewportConstraints>::encode):
1882         (IPC::ArgumentCoder<FixedPositionViewportConstraints>::decode):
1883         (IPC::ArgumentCoder<StickyPositionViewportConstraints>::encode):
1884         (IPC::ArgumentCoder<StickyPositionViewportConstraints>::decode):
1885         (IPC::ArgumentCoder<FilterOperation>::encode):
1886         (IPC::decodeFilterOperation):
1887         (IPC::ArgumentCoder<FilterOperations>::encode):
1888         (IPC::ArgumentCoder<WebCore::UserStyleSheet>::encode): Deleted.
1889         (IPC::ArgumentCoder<WebCore::UserStyleSheet>::decode): Deleted.
1890         (IPC::ArgumentCoder<WebCore::UserScript>::encode): Deleted.
1891         (IPC::ArgumentCoder<WebCore::UserScript>::decode): Deleted.
1892         (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::encode): Deleted.
1893         (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::decode): Deleted.
1894         (IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::encode): Deleted.
1895         (IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::decode): Deleted.
1896         (IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::encode): Deleted.
1897         (IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::decode): Deleted.
1898         (IPC::encodeFilterOperation): Deleted.
1899         Add encoding/decoding support for FilterOperation.
1900         decodeFilterOperation() has to be a bare function because of the RefPtr
1901         out parameter.
1902         REFERENCE filters should never be encoded, since they have CachedSVGDocumentReferences.
1903
1904         * Shared/WebCoreArgumentCoders.h:
1905
1906         * Shared/mac/RemoteLayerTreeTransaction.mm:
1907         (WebKit::RemoteLayerTreeTextStream::operator<<):
1908         Add logging for filter animations to the RemoteLayerTree log output.
1909
1910         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
1911         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
1912         (WebKit::GraphicsLayerCARemote::addAnimation): Deleted. We can run
1913         filter animations now.
1914
1915         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
1916         KeyValues have a RefPtr<WebCore::FilterOperation> now (which can't be part of
1917         the union because we need its constructor to get called).
1918         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1919         (WebKit::PlatformCAAnimationRemote::KeyframeValue::encode): Encode the filter.
1920         (WebKit::PlatformCAAnimationRemote::KeyframeValue::decode): Decode the filter.
1921         (WebKit::PlatformCAAnimationRemote::setFromValue): Implement.
1922         (WebKit::PlatformCAAnimationRemote::setToValue): Implement.
1923         (WebKit::PlatformCAAnimationRemote::setValues): Implement.
1924         (WebKit::animationValueFromKeyframeValue): Handle filters.
1925
1926 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
1927
1928         Fix the build.
1929
1930         * UIProcess/mac/PageClientImpl.h:
1931
1932 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
1933
1934         [WK2 iOS] Scrolling to anchor links is broken
1935         https://bugs.webkit.org/show_bug.cgi?id=131618
1936         <rdar://problem/16599144>
1937
1938         Reviewed by Tim Horton.
1939         
1940         The RemoteScrollingTree implements scrollingTreeNodeRequestsScroll
1941         to get informed about requested scroll position updates, and passes
1942         them along via the RemoteScrollingCoordinatorProxy, WebPageProxy and PageClient
1943         to the WKWebView, which performs a scroll.
1944
1945         * UIProcess/API/Cocoa/WKWebView.mm:
1946         (-[WKWebView _scrollToContentOffset:WebCore::]): Scroll to content offset,
1947         taking page scale and insets into account.
1948         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1949         * UIProcess/CoordinatedGraphics/WebView.cpp:
1950         (WebKit::WebView::requestScroll):
1951         * UIProcess/CoordinatedGraphics/WebView.h:
1952         * UIProcess/PageClient.h:
1953         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1954         (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):
1955         Pass scrolls along to the WebPageProxy for the root node. We will also need
1956         to handle programmatic scrolls for overflow soon.
1957         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1958         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
1959         (WebKit::RemoteScrollingTree::scrollingTreeNodeRequestsScroll):
1960         * UIProcess/Scrolling/RemoteScrollingTree.h:
1961         * UIProcess/WebPageProxy.cpp:
1962         (WebKit::WebPageProxy::requestScroll):
1963         * UIProcess/WebPageProxy.h:
1964         * UIProcess/ios/PageClientImplIOS.h:
1965         * UIProcess/ios/PageClientImplIOS.mm:
1966         (WebKit::PageClientImpl::canScrollView):
1967         (WebKit::PageClientImpl::requestScroll):
1968         * UIProcess/mac/PageClientImpl.mm:
1969         (WebKit::PageClientImpl::requestScroll):
1970
1971 2014-04-12  Antti Koivisto  <antti@apple.com>
1972
1973         Keep secondary tile grid for zoomed-out scale
1974         https://bugs.webkit.org/show_bug.cgi?id=131586
1975
1976         Reviewed by Darin Adler.
1977
1978         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
1979         (WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking):
1980         (WebKit::PlatformCALayerRemoteTiledBacking::customSublayers):
1981         
1982             Always request new sublayer list from tile controller.
1983
1984         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
1985
1986 2014-04-14  Tim Horton  <timothy_horton@apple.com>
1987
1988         Make WK(Web)View magnification setters actually use view-relative positions
1989         https://bugs.webkit.org/show_bug.cgi?id=131611
1990         <rdar://problem/15965239>
1991
1992         Reviewed by Darin Adler.
1993
1994         * UIProcess/API/mac/WKView.mm:
1995         (-[WKView setMagnification:centeredAtPoint:]):
1996         (-[WKView setMagnification:]):
1997         Use scalePageInViewCoordinates instead.
1998
1999         * UIProcess/WebPageProxy.cpp:
2000         (WebKit::WebPageProxy::scalePageInViewCoordinates):
2001         * UIProcess/WebPageProxy.h:
2002         * WebProcess/WebPage/WebPage.cpp:
2003         (WebKit::WebPage::scalePageInViewCoordinates):
2004         (WebKit::WebPage::pageScaleFactor):
2005         * WebProcess/WebPage/WebPage.h:
2006         * WebProcess/WebPage/WebPage.messages.in:
2007         Add scalePageInViewCoordinates, which turns the scale centerpoint within the view
2008         into what scalePage expects: a post-scale scroll offset.
2009
2010 2014-04-14  Tim Horton  <timothy_horton@apple.com>
2011
2012         Support setting a background color on page overlays
2013         https://bugs.webkit.org/show_bug.cgi?id=131600
2014
2015         Reviewed by Darin Adler.
2016
2017         * WebProcess/WebPage/PageOverlay.cpp:
2018         (WebKit::PageOverlay::PageOverlay):
2019         (WebKit::PageOverlay::bounds):
2020         (WebKit::PageOverlay::startFadeInAnimation):
2021         (WebKit::PageOverlay::startFadeOutAnimation):
2022         (WebKit::PageOverlay::startFadeAnimation):
2023         (WebKit::PageOverlay::fadeAnimationTimerFired):
2024         Minor style adjustments.
2025         Use more references everywhere.
2026
2027         (WebKit::PageOverlay::setBackgroundColor):
2028         (WebKit::PageOverlay::setNeedsDisplay):
2029         * WebProcess/WebPage/PageOverlay.h:
2030         (WebKit::PageOverlay::backgroundColor):
2031         Keep track of our background color, and push it down to the page overlay controller if we have one.
2032
2033         * WebProcess/WebPage/PageOverlayController.cpp:
2034         (WebKit::updateOverlayGeometry):
2035         (WebKit::PageOverlayController::clearPageOverlay):
2036         Page overlays will always have the right size, and just use drawsContents to determine
2037         whether or not they should tile/have backing store/etc.
2038
2039         (WebKit::PageOverlayController::installPageOverlay):
2040         (WebKit::PageOverlayController::didChangeOverlayBackgroundColor):
2041         Set the background color of the layer.
2042
2043         * WebProcess/WebPage/PageOverlayController.h:
2044
2045         * WebProcess/WebPage/WebPage.cpp:
2046         (WebKit::WebPage::WebPage):
2047         References!
2048
2049 2014-04-13  Andy Estes  <aestes@apple.com>
2050
2051         [QuickLook] Move file system-related code into WebKit
2052         https://bugs.webkit.org/show_bug.cgi?id=131597
2053
2054         Reviewed by Dan Bernstein.
2055
2056         * WebProcess/Network/WebResourceLoader.h: Made m_quickLookHandle a unique_ptr.
2057         * WebProcess/ios/WebResourceLoaderIOS.mm:
2058         (WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
2059
2060 2014-04-13  Andy Estes  <aestes@apple.com>
2061
2062         REGRESSION (r167164): -[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:] _block_invoke can access a deallocated completionHandler
2063         https://bugs.webkit.org/show_bug.cgi?id=131595
2064
2065         Reviewed by Dan Bernstein.
2066
2067         Make a copy of completionHandler and release it after we're done with it.
2068
2069         * Shared/mac/CookieStorageShim.mm:
2070         (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
2071
2072 2014-04-13  Pratik Solanki  <psolanki@apple.com>
2073
2074         Don't use ImportanceAssertion on iOS
2075         https://bugs.webkit.org/show_bug.cgi?id=131481
2076         <rdar://problem/16575830>
2077
2078         Reviewed by Darin Adler.
2079
2080         We have other API to mark processes as being in use on iOS. No need to use ImportanceAssertion.
2081
2082         * Platform/IPC/MessageDecoder.cpp:
2083         * Platform/IPC/MessageDecoder.h:
2084         * Platform/IPC/mac/ConnectionMac.cpp:
2085         (IPC::Connection::receiveSourceEventHandler):
2086         * Platform/IPC/mac/ImportanceAssertion.h:
2087
2088 2014-04-13  Commit Queue  <commit-queue@webkit.org>
2089
2090         Unreviewed, rolling out r167168 and r167194.
2091         https://bugs.webkit.org/show_bug.cgi?id=131589
2092
2093         Caused massive ASSERTION failures on the GTK Debug bot
2094         (Requested by philn on #webkit).
2095
2096         Reverted changesets:
2097
2098         "[GTK] Add HighDPI support for non-accelerated compositing
2099         contents"
2100         https://bugs.webkit.org/show_bug.cgi?id=131562
2101         http://trac.webkit.org/changeset/167168
2102
2103         "Unreviewed. Fix GTK+ build with recent cairo and GTK+ after
2104         r167168."
2105         http://trac.webkit.org/changeset/167194
2106
2107 2014-04-13  Carlos Garcia Campos  <cgarcia@igalia.com>
2108
2109         Unreviewed. Fix GTK+ build with recent cairo and GTK+ after r167168.
2110
2111         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2112         (webkitWebViewBaseCreateWebPage):
2113
2114 2014-04-12  Andy Estes  <aestes@apple.com>
2115
2116         [iOS] Move QuickLookHandle from ResourceLoader to WebResourceLoader
2117         https://bugs.webkit.org/show_bug.cgi?id=131580
2118
2119         Reviewed by Darin Adler.
2120
2121         There's no need to bloat WebKit1's ResourceLoader with a pointer that
2122         only WebKit2's WebResourceLoader cares about.
2123
2124         * WebProcess/Network/WebResourceLoader.cpp:
2125         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
2126         (WebKit::WebResourceLoader::didReceiveData):
2127         (WebKit::WebResourceLoader::didFinishResourceLoad):
2128         (WebKit::WebResourceLoader::didFailResourceLoad):
2129         * WebProcess/Network/WebResourceLoader.h:
2130         * WebProcess/ios/WebResourceLoaderIOS.mm:
2131         (WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
2132
2133 2014-04-11  Alexey Proskuryakov  <ap@apple.com>
2134
2135         [Mac] Crashes when copying or pasting huge images
2136         https://bugs.webkit.org/show_bug.cgi?id=131576
2137         <rdar://problem/12131833>
2138         <rdar://problem/14427398>
2139
2140         Reviewed by Darin Adler.
2141
2142         Added a few null checks for SharedMemory::create() return value in pasteboard code.
2143         Error handling feels a bit sketchy, but
2144         - I'm not sure what it should look like ideally;
2145         - it matches the kind of error handling we already have in these functions;
2146         - it appears to work reasonably well in practice. We get empty content, which
2147         is not nice, but not particularly problematic either. When copying an animated GIF,
2148         we also get the GIF in RTFD flavor, so even pasting into NSTextViews works!
2149
2150         * Platform/mac/SharedMemoryMac.cpp:
2151         (WebKit::SharedMemory::createFromVMBuffer):
2152         * UIProcess/mac/WebContextMac.mm:
2153         (WebKit::WebContext::getPasteboardBufferForType):
2154         (WebKit::WebContext::readBufferFromPasteboard):
2155         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2156         (WebKit::WebPlatformStrategies::setBufferForType):
2157
2158         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::WebDragClient::declareAndWriteDragImage):
2159         Also renamed some variables to prevent name collisions with with nested scope.
2160
2161 2014-04-11  Ryuan Choi  <ryuan.choi@samsung.com>
2162
2163         Unreviewed build fix on the EFL port after r167152
2164
2165         * WebProcess/WebPage/PageOverlay.cpp:
2166         (WebKit::PageOverlay::bounds):
2167
2168 2014-04-11  Hyowon Kim  <hw1008.kim@samsung.com>
2169
2170         [WK2] WebProcess crashes, when closing window after opening page by means of context menu
2171         https://bugs.webkit.org/show_bug.cgi?id=131439
2172
2173         Reviewed by Tim Horton.
2174
2175         CoordinatedGraphicsLayer calls notifyFlushRequired() through its client when destroyed.
2176         When PageOverlayController::notifyFlushRequired() is called, the DrawingArea could be null
2177         because it's destoryed in WebPage::close().
2178
2179         * WebProcess/WebPage/PageOverlayController.cpp:
2180         (WebKit::PageOverlayController::notifyFlushRequired): Add null check of m_webPage->drawingArea().
2181
2182 2014-04-11  Tim Horton  <timothy_horton@apple.com>
2183
2184         Lots of compositing test failures after r167152
2185         https://bugs.webkit.org/show_bug.cgi?id=131574
2186
2187         Reviewed by Simon Fraser.
2188
2189         * WebProcess/WebPage/PageOverlayController.h:
2190         Skip page overlay layers in layer tree dumps, for consistency between platforms.
2191
2192 2014-04-11  Beth Dakin  <bdakin@apple.com>
2193
2194         Need WK2 API to disable rubber-banding
2195         https://bugs.webkit.org/show_bug.cgi?id=131567
2196
2197         Reviewed by Simon Fraser.
2198
2199         New API allows the client to enable/disable horizontal or vertical rubber-banding. 
2200         By default, rubber-banding is enabled.
2201         * UIProcess/API/C/WKPage.cpp:
2202         (WKPageVerticalRubberBandingIsEnabled):
2203         (WKPageSetEnableVerticalRubberBanding):
2204         (WKPageHorizontalRubberBandingIsEnabled):
2205         (WKPageSetEnableHorizontalRubberBanding):
2206         * UIProcess/API/C/WKPage.h:
2207         * UIProcess/WebPageProxy.cpp:
2208         (WebKit::WebPageProxy::WebPageProxy):
2209         (WebKit::WebPageProxy::setEnableVerticalRubberBanding):
2210         (WebKit::WebPageProxy::verticalRubberBandingIsEnabled):
2211         (WebKit::WebPageProxy::setEnableHorizontalRubberBanding):
2212         (WebKit::WebPageProxy::horizontalRubberBandingIsEnabled):
2213         * UIProcess/WebPageProxy.h:
2214         * WebProcess/WebPage/WebPage.cpp:
2215         (WebKit::WebPage::setEnableVerticalRubberBanding):
2216         (WebKit::WebPage::setEnableHorizontalRubberBanding):
2217         * WebProcess/WebPage/WebPage.h:
2218         * WebProcess/WebPage/WebPage.messages.in:
2219
2220 2014-04-11  Tim Horton  <timothy_horton@apple.com>
2221
2222         Fix the Mac build.
2223
2224         * WebProcess/WebPage/FindController.cpp:
2225         (WebKit::FindController::updateFindIndicator):
2226
2227 2014-04-11  Tim Horton  <timothy_horton@apple.com>
2228
2229         [iOS WebKit2] Find-in-page indicator
2230         https://bugs.webkit.org/show_bug.cgi?id=131510
2231         <rdar://problem/16547777>
2232
2233         Reviewed by Simon Fraser and Enrica Casucci.
2234
2235         * WebKit2.xcodeproj/project.pbxproj:
2236         * WebProcess/WebPage/FindController.cpp:
2237         (WebKit::FindController::updateFindUIAfterPageScroll):
2238         WebKit2 will clear the selection if we reveal it while not enabling selection painting.
2239         So, avoid revealing it.
2240
2241         (WebKit::FindController::findString):
2242         (WebKit::FindController::hideFindIndicator):
2243         (WebKit::FindController::willFindString):
2244         (WebKit::FindController::didFailToFindString):
2245         (WebKit::FindController::didHideFindIndicator):
2246         #if out the cross-platform find indicator code on iOS; it will be replaced
2247         by the code in FindControllerIOS.
2248
2249         * WebProcess/WebPage/FindController.h:
2250
2251         * WebProcess/WebPage/ios/FindControllerIOS.mm: Added.
2252         (highlightColor):
2253         (WebKit::FindIndicatorOverlayClientIOS::drawRect):
2254         Paint the selection (with black text forced on), and the yellow rounded rect
2255         into the indicator page overlay.
2256
2257         (WebKit::FindController::updateFindIndicator):
2258         Create or update a small document-relative page overlay in the selection rect.
2259
2260         (WebKit::FindController::hideFindIndicator):
2261         (WebKit::FindController::willFindString):
2262         (WebKit::FindController::didFailToFindString):
2263         (WebKit::FindController::didHideFindIndicator):
2264         Add willFindString, didFailToFindString, and didHideFindIndicator functions.
2265         They do nothing, except on iOS where they are used to prevent selection change
2266         messages from being dispatched while using find-in-page, and to force
2267         WebCore to compute a selection rect (via updateAppearance) despite the selection not being painted.
2268
2269         * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
2270         (WebKit::FindIndicatorOverlayClientIOS::setFrame):
2271
2272 2014-04-11  Owen Taylor  <otaylor@redhat.com>
2273
2274         [GTK] Add HighDPI support for non-accelerated compositing contents
2275         https://bugs.webkit.org/show_bug.cgi?id=131562
2276
2277         Reviewed by Martin Robinson.
2278
2279         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2280         (scaleFactorChanged): Added this callback to pass scale changes to the page proxy.
2281         (webkitWebViewBaseCreateWebPage): Attach the callback to the notify signal.
2282         * UIProcess/cairo/BackingStoreCairo.cpp:
2283         (WebKit::createBackingStoreForGTK): Pass the scale factor to the WebCore backing store.
2284         (WebKit::BackingStore::incorporateUpdate): Ditto.
2285
2286 2014-04-10  Jer Noble  <jer.noble@apple.com>
2287
2288         [WK2] Dispatch to main thread's run loop to handle cookie requests.
2289         https://bugs.webkit.org/show_bug.cgi?id=131524
2290
2291         Reviewed by Brady Eidson.
2292
2293         When using synchronous network APIs from the main thread (e.g., -[NSImage
2294         initWithContentsOfURL:]) our cookie shim would attempt to dispath_async
2295         to the main thread to handle the cookie request, and block against the original
2296         request. CFNetwork is still servicing the run loop however, so rather than
2297         dispatch_async to the main queue, use the RunLoop to dispatch to the main thread.
2298
2299         * Shared/mac/CookieStorageShim.mm:
2300         (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
2301
2302 2014-04-11  Tim Horton  <timothy_horton@apple.com>
2303
2304         Make the stylebot happier with r167154.
2305
2306         * UIProcess/PageClient.h:
2307         * UIProcess/WebPageProxy.h:
2308         * UIProcess/ios/PageClientImplIOS.h:
2309
2310 2014-04-11  Tim Horton  <timothy_horton@apple.com>
2311
2312         [iOS WebKit2] Expose a simplified zoom-to-rect to the WebProcess
2313         https://bugs.webkit.org/show_bug.cgi?id=131563
2314
2315         Reviewed by Simon Fraser.
2316
2317         * UIProcess/PageClient.h:
2318         * UIProcess/WebPageProxy.h:
2319         * UIProcess/WebPageProxy.messages.in:
2320         * UIProcess/ios/PageClientImplIOS.h:
2321         * UIProcess/ios/PageClientImplIOS.mm:
2322         (WebKit::PageClientImpl::zoomToRect):
2323         * UIProcess/ios/WebPageProxyIOS.mm:
2324         (WebKit::WebPageProxy::zoomToRect):
2325         * WebProcess/WebPage/WebPage.h:
2326         * WebProcess/WebPage/ios/WebPageIOS.mm:
2327         (WebKit::WebPage::zoomToRect):
2328         Add a simple message that calls WKContentView's zoom-to-rect code given just a rect and min/max scale.
2329         We will use the center of the rect as the zoom origin, and will try to show the whole rect.
2330
2331 2014-04-10  Jer Noble  <jer.noble@apple.com>
2332
2333         [iOS][WK2] Videos should animate into and out of fullscreen.
2334         https://bugs.webkit.org/show_bug.cgi?id=131497
2335
2336         Reviewed by Simon Fraser.
2337
2338         Pass a starting rect for the enterFullscreen animation and an ending rect
2339         for the exitFullscreen animation.
2340
2341         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2342         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2343         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2344         (WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID): Pass initialFrame.
2345         * WebProcess/ios/WebVideoFullscreenManager.mm:
2346         (WebKit::screenRectOfContents): Casts node -> element and returns its screenRect().
2347         (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): Pass initialFrame.
2348         (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): Pass finalFrame.
2349
2350 2014-04-11  Tim Horton  <timothy_horton@apple.com>
2351
2352         Support document-relative and custom-frame page overlays
2353         https://bugs.webkit.org/show_bug.cgi?id=131560
2354         <rdar://problem/16595556>
2355
2356         Reviewed by Simon Fraser.
2357
2358         Add "document-relative" overlays, which attach to (and scroll with) the document,
2359         and can be given a frame rect within the document to avoid overallocation of backing store.
2360
2361         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2362         (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
2363         * WebProcess/WebPage/WebPage.cpp:
2364         (WebKit::WebPage::mainFrame):
2365         (WebKit::WebPage::mainFrameView):
2366         (WebKit::WebPage::didChangeScrollOffsetForFrame):
2367         * WebProcess/WebPage/WebPage.h:
2368         Let the PageOverlayController know *which* frame scrolled, instead of "any frame".
2369
2370         * WebProcess/WebPage/FindController.cpp:
2371         (WebKit::FindController::updateFindUIAfterPageScroll):
2372         Factor out shared code.
2373
2374         (WebKit::FindController::willMoveToWebPage):
2375         (WebKit::FindController::drawRect):
2376         We can use clearRect() instead of a transparency layer and fillRect().
2377         I've looked through all the other overlay clients I know of and none of them
2378         depend on having a transparency layer at the overlay level.
2379
2380         * WebProcess/WebPage/PageOverlay.cpp:
2381         (WebKit::PageOverlay::create):
2382         (WebKit::PageOverlay::PageOverlay):
2383         (WebKit::PageOverlay::bounds):
2384         (WebKit::PageOverlay::frame):
2385         (WebKit::PageOverlay::setFrame):
2386         (WebKit::PageOverlay::drawRect):
2387         Add OverlayType, which allows creation of Document or View relative overlays.
2388         All overlays up to this point are View relative, so we default to that.
2389         Document-relative overlays scroll with the page instead of repainting as
2390         the page scrolls. They can also be given an explicit frame, allowing them
2391         to be smaller than the entire document.
2392
2393         * WebProcess/WebPage/PageOverlay.h:
2394         (WebKit::PageOverlay::overlayType):
2395         (WebKit::PageOverlay::webPage):
2396         (WebKit::PageOverlay::client): Deleted.
2397         * WebProcess/WebPage/PageOverlayController.cpp:
2398         (WebKit::PageOverlayController::initialize):
2399         (WebKit::PageOverlayController::installPageOverlay):
2400         (WebKit::PageOverlayController::uninstallPageOverlay):
2401         (WebKit::PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates):
2402         (WebKit::updateOverlayGeometry):
2403         (WebKit::PageOverlayController::setPageOverlayNeedsDisplay):
2404         (WebKit::PageOverlayController::didChangeViewSize):
2405         (WebKit::PageOverlayController::didChangeDocumentSize):
2406         (WebKit::PageOverlayController::didChangeDeviceScaleFactor):
2407         (WebKit::PageOverlayController::didScrollFrame):
2408         (WebKit::PageOverlayController::flushPageOverlayLayers):
2409         (WebKit::PageOverlayController::didChangeOverlayFrame):
2410         Keep two overlay root layers - one for view-relative
2411         and one for document-relative overlays.
2412         Don't force synchronous scrolling if we only have document-relative overlays.
2413         Update the overlay's position as well as its size whenever necessary.
2414         Update document-relative overlay geometry when the document size changes.
2415         Only explicitly flush view-relative overlays; document-relative ones
2416         are plugged into the WebCore layer tree and flushed along with the page.
2417
2418         * WebProcess/WebPage/PageOverlayController.h:
2419         (WebKit::PageOverlayController::documentOverlayRootLayer):
2420         (WebKit::PageOverlayController::viewOverlayRootLayer):
2421         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2422         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2423         (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
2424         (WebKit::RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged):
2425         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2426         (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
2427         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
2428         Let the PageOverlay controller know when the document size changes.
2429         When we set up compositing, push the document overlay root layer
2430         down into WebCore.
2431
2432 2014-04-11  Pratik Solanki  <psolanki@apple.com>
2433
2434         [iOS WebKit2]: Share NSURLCache directory for webkit processes
2435         https://bugs.webkit.org/show_bug.cgi?id=131513
2436         <rdar://problem/16420859>
2437
2438         Reviewed by Alexey Proskuryakov.
2439
2440         Use iOS specific NSURLCache API to share the cache directory used by the networking process,
2441         web process and Safari.
2442
2443         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2444         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2445         * WebProcess/cocoa/WebProcessCocoa.mm:
2446         (WebKit::WebProcess::platformInitializeWebProcess):
2447
2448 2014-04-11  Alexey Proskuryakov  <ap@apple.com>
2449
2450         [Mac] Add IconServices to WebProcess sandbox profile
2451         https://bugs.webkit.org/show_bug.cgi?id=131558
2452         <rdar://problem/16552397>
2453
2454         Reviewed by Brady Eidson.
2455
2456         * WebProcess/com.apple.WebProcess.sb.in:
2457
2458 2014-04-11  Antti Koivisto  <antti@apple.com>
2459
2460         Pipe initial scale factor to TileController
2461         https://bugs.webkit.org/show_bug.cgi?id=131521
2462
2463         Reviewed by Tim Horton.
2464
2465         * WebProcess/WebPage/ios/WebPageIOS.mm:
2466         (WebKit::WebPage::viewportConfigurationChanged):
2467
2468 2014-04-10  Chris Fleizach  <cfleizach@apple.com>
2469
2470         AX: WebProcess at com.apple.WebCore: WebCore::AXObjectCache::rootObject + 18
2471         https://bugs.webkit.org/show_bug.cgi?id=131522
2472
2473         Reviewed by Anders Carlsson.
2474
2475         Protect against documents that have had their render tree destroyed, and no longer return a valid cache.
2476
2477         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
2478
2479 2014-04-11  Brent Fulgham  <bfulgham@apple.com>
2480
2481         [Mac] Prevent crash when exiting fullscreen mode
2482         https://bugs.webkit.org/show_bug.cgi?id=131528
2483
2484         Reviewed by Jer Noble.
2485
2486         * UIProcess/mac/WKFullScreenWindowController.mm:
2487         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2488         Clean up the _scaleAnimation controller, not just the _fadeAnimation controller.
2489         (-[WKFullScreenWindowController close]): If we are doing an immediate
2490         close of the view, we need to stop animations so we avoid any
2491         final timer events from interacting with invalid window handles.
2492
2493 2014-04-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2494
2495         wk2-gtk does not display anything
2496         https://bugs.webkit.org/show_bug.cgi?id=125558
2497
2498         Reviewed by Martin Robinson.
2499
2500         Remove fcntl call to set access mode flags on the duplicated files
2501         descriptor. Those flags are ignored in Linux and make fcntl to
2502         fail in FreeBSD. We should handle the case where the passed
2503         protection is ReadOnly.
2504         Thanks to Raphael Kubo da Costa who proposed the solution.
2505
2506         * Platform/unix/SharedMemoryUnix.cpp:
2507         (WebKit::SharedMemory::createHandle):
2508         (WebKit::accessModeFile): Deleted.
2509
2510 2014-04-11  Zan Dobersek  <zdobersek@igalia.com>
2511
2512         [GTK][WK2] Move Vector objects into WebEditorClient::executePendingEditorCommands() invocations
2513         https://bugs.webkit.org/show_bug.cgi?id=131454
2514
2515         Reviewed by Carlos Garcia Campos.
2516
2517         * WebProcess/WebCoreSupport/WebEditorClient.h:
2518         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
2519         (WebKit::WebEditorClient::executePendingEditorCommands): Take a const reference of the Vector
2520         object to avoid unnecessary copies. Also deploy two range-based for loops and efficiently move
2521         the Editor::Command objects into the other Vector.
2522
2523 2014-04-10  Dan Bernstein  <mitz@apple.com>
2524
2525         <rdar://problem/16582465> [Cocoa] Avoid casts from CF types to unrelated Objective-C types
2526         https://bugs.webkit.org/show_bug.cgi?id=131529
2527
2528         Reviewed by Mark Rowe.
2529
2530         * Shared/API/c/cf/WKStringCF.mm:
2531         (WKStringCreateWithCFString): Cast the CFStringRef into its toll-free-bridged counterpart,
2532         NSString, then cast the NSString into a WKNSString.
2533         * Shared/API/c/cf/WKURLCF.mm:
2534         (WKURLCreateWithCFURL): Cast the CFURLRef into its toll-free-bridged counterpart, NSURL,
2535         then cast the NSURL into a WKNSURL.
2536
2537 2014-04-10  Dan Bernstein  <mitz@apple.com>
2538
2539         BundlePageDiagnosticLoggingClient leaks every string passing through it.
2540         https://bugs.webkit.org/show_bug.cgi?id=130140
2541
2542         Reviewed by Brent Fulgham.
2543
2544         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
2545         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage): Don’t copy the
2546         strings passed into the bundle client.
2547
2548 2014-04-10  Benjamin Poulain  <bpoulain@apple.com>
2549
2550         Try to fix the debug bots after r167102
2551
2552         * WebProcess/cocoa/WebProcessCocoa.mm:
2553         (WebKit::WebProcess::platformInitializeWebProcess):
2554
2555 2014-04-10  Gavin Barraclough  <barraclough@apple.com>
2556
2557         Add user default for FTL JIT
2558         https://bugs.webkit.org/show_bug.cgi?id=131520
2559
2560         Reviewed by Benjamin Poulain.
2561
2562         * Shared/WebProcessCreationParameters.cpp:
2563         (WebKit::WebProcessCreationParameters::decode):
2564         * UIProcess/mac/WebContextMac.mm:
2565         (WebKit::registerUserDefaultsIfNeeded):
2566         (WebKit::WebContext::platformInitializeWebProcess):
2567             - D'oh, whitespace.
2568
2569 2014-04-10  Gavin Barraclough  <barraclough@apple.com>
2570
2571         Add user default for FTL JIT
2572         https://bugs.webkit.org/show_bug.cgi?id=131520
2573
2574         Reviewed by Benjamin Poulain.
2575
2576         * Shared/WebProcessCreationParameters.cpp:
2577         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
2578         (WebKit::WebProcessCreationParameters::encode):
2579         (WebKit::WebProcessCreationParameters::decode):
2580         * Shared/WebProcessCreationParameters.h:
2581             - pass setting to WebContent process.
2582         * UIProcess/mac/WebContextMac.mm:
2583         (WebKit::registerUserDefaultsIfNeeded):
2584         (WebKit::WebContext::platformInitializeWebProcess):
2585             - read user default.
2586         * WebProcess/cocoa/WebProcessCocoa.mm:
2587         (WebKit::WebProcess::platformInitializeWebProcess):
2588             - set JSC::Option.
2589
2590 2014-04-10  Dan Bernstein  <mitz@apple.com>
2591
2592         [Cocoa] Notify the form delegate when the custom button in the form accessory view is tapped
2593         https://bugs.webkit.org/show_bug.cgi?id=131518
2594
2595         Reviewed by Tim Horton.
2596
2597         * UIProcess/API/Cocoa/_WKFormDelegate.h: Declared new delegate method.
2598         * UIProcess/ios/WKContentViewInteraction.mm:
2599         (-[WKContentView accessoryAutoFill]): Call the new delegate method.
2600
2601 2014-04-10  Commit Queue  <commit-queue@webkit.org>
2602
2603         Unreviewed, rolling out r167097.
2604         https://bugs.webkit.org/show_bug.cgi?id=131519
2605
2606         there was already a mechanism for this, and this was
2607         incomplete anyway (Requested by thorton on #webkit).
2608
2609         Reverted changeset:
2610
2611         "[iOS WebKit2] Disable the find overlay for now"
2612         https://bugs.webkit.org/show_bug.cgi?id=131509
2613         http://trac.webkit.org/changeset/167097
2614
2615 2014-04-10  Tim Horton  <timothy_horton@apple.com>
2616
2617         [iOS WebKit2] Disable the find overlay for now
2618         https://bugs.webkit.org/show_bug.cgi?id=131509
2619
2620         Reviewed by Adele Peterson.
2621
2622         * Shared/WebPreferencesStore.h:
2623         * WebProcess/WebPage/FindController.cpp:
2624         (WebKit::FindController::FindController):
2625         (WebKit::FindController::hideFindOverlay):
2626         (WebKit::FindController::hideFindUI):
2627         (WebKit::FindController::setShouldShowOverlay):
2628         * WebProcess/WebPage/FindController.h:
2629         * WebProcess/WebPage/WebPage.cpp:
2630         (WebKit::WebPage::updatePreferences):
2631         Add a setting allowing us to turn off the find-in-page overlay on iOS.
2632
2633 2014-04-10  Sergio Villar Senin  <svillar@igalia.com>
2634
2635         Unreviewed GTK build fix after r167074.
2636
2637         This involves replacing resetDragSession() by
2638         resetCurrentDragInformation() and dragSession().operation by
2639         currentDragOperation().
2640
2641         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2642         (webkitWebViewBaseDragDataReceived):
2643         (webkitWebViewBaseDragMotion):
2644         (dragExitedCallback):
2645
2646 2014-04-10  Owen Taylor  <otaylor@redhat.com>
2647
2648         [Cairo] Implement ShareableBitmap::paint() with scale factor
2649         https://bugs.webkit.org/show_bug.cgi?id=64665
2650
2651         Reviewed by Martin Robinson.
2652
2653         * Shared/cairo/ShareableBitmapCairo.cpp (WebKit::ShareableBitmap::paint):
2654
2655 2014-04-10  Enrica Casucci  <enrica@apple.com>
2656
2657         [iOS WebKit2] Support phraseboundary gesture recognizer for CJK.
2658         https://bugs.webkit.org/show_bug.cgi?id=131493
2659         <rdar://problem/16319583>
2660
2661         Reviewed by Benjamin Poulain.
2662
2663         On iOS it is possible with a gesture to change the selection
2664         within the marked text.
2665         Changing the selection triggers also the update of the inline candidates
2666         over the keyboard area.
2667         The patch adds the logic to decide whether the gesture can begin
2668         as well as the code for the movement of
2669         the selection within the marked range.
2670         The gesture is allowed to start within a given radius from the marked
2671         area.
2672
2673         * Shared/InteractionInformationAtPosition.cpp:
2674         (WebKit::InteractionInformationAtPosition::encode):
2675         (WebKit::InteractionInformationAtPosition::decode):
2676         * Shared/InteractionInformationAtPosition.h:
2677         (WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
2678         * Shared/ios/GestureTypes.h:
2679         * UIProcess/WebPageProxy.cpp:
2680         (WebKit::WebPageProxy::editorStateChanged):
2681         * UIProcess/ios/WKContentViewInteraction.mm:
2682         (-[WKContentView pointIsNearMarkedText:]):
2683         (toGestureType):
2684         (toUIWKGestureType):
2685         * WebProcess/WebPage/ios/WebPageIOS.mm:
2686         (WebKit::WebPage::selectWithGesture):
2687         (WebKit::WebPage::getPositionInformation):
2688
2689 2014-04-10  Enrica Casucci  <enrica@apple.com>
2690
2691         Unreviewed iOS build fix after http://trac.webkit.org/changeset/167074
2692
2693         * UIProcess/WebPageProxy.cpp:
2694         (WebKit::WebPageProxy::WebPageProxy):
2695
2696 2014-04-10  Alexey Proskuryakov  <ap@apple.com>
2697
2698         Gtk build fix.
2699
2700         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction):
2701
2702 2014-04-09  Alexey Proskuryakov  <ap@apple.com>
2703
2704         Eliminate DragSession structure
2705         https://bugs.webkit.org/show_bug.cgi?id=131465
2706
2707         Reviewed by Benjamin Poulain.
2708
2709         * Scripts/webkit2/messages.py:
2710         (struct_or_class):
2711         * Shared/WebCoreArgumentCoders.cpp:
2712         (IPC::ArgumentCoder<DragSession>::encode): Deleted.
2713         (IPC::ArgumentCoder<DragSession>::decode): Deleted.
2714         * Shared/WebCoreArgumentCoders.h:
2715         * UIProcess/API/mac/WKView.mm:
2716         (-[WKView draggingEntered:]):
2717         (-[WKView draggingUpdated:]):
2718         * UIProcess/WebPageProxy.cpp:
2719         (WebKit::WebPageProxy::WebPageProxy):
2720         (WebKit::WebPageProxy::didPerformDragControllerAction):
2721         * UIProcess/WebPageProxy.h:
2722         (WebKit::WebPageProxy::currentDragOperation):
2723         (WebKit::WebPageProxy::currentDragIsOverFileInput):
2724         (WebKit::WebPageProxy::currentDragNumberOfFilesToBeAccepted):
2725         (WebKit::WebPageProxy::resetCurrentDragInformation):
2726         (WebKit::WebPageProxy::dragSession): Deleted.
2727         (WebKit::WebPageProxy::resetDragSession): Deleted.
2728         * UIProcess/WebPageProxy.messages.in:
2729         * WebProcess/WebPage/WebPage.cpp:
2730         (WebKit::WebPage::performDragControllerAction):
2731
2732 2014-04-10  Martin Robinson  <mrobinson@igalia.com>
2733
2734         [GTK] LayerTreeHostGtk is creating a software scene graph
2735         https://bugs.webkit.org/show_bug.cgi?id=131471
2736
2737         Reviewed by Sergio Villar Senin.
2738
2739         At some point, a regression was introduced that sent the GTK+ WebKit2 scenegraph down the
2740         software route. The rest of the file depends on the fact that the TextureMapper is the OpenGL
2741         variety, so we should force that explicitly. This is causing crashes locally and soon we
2742         should be able to test this directly.
2743
2744         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2745         (WebKit::LayerTreeHostGtk::initialize): Force the use of the OpenGL scenegraph.
2746
2747 2014-04-09  Jeremy Jones  <jeremyj@apple.com>
2748
2749         Fix build failure when #if USE(XPC_SERVICES) is false.
2750         https://bugs.webkit.org/show_bug.cgi?id=131474
2751
2752         Reviewed by Dan Bernstein.
2753
2754         Fix build. 
2755
2756         * UIProcess/ios/WebProcessProxyIOS.mm:
2757         Add #if around BackgroundTabFlags ForegroundTabFlags to prevent unused variable error.
2758
2759 2014-04-09  Ryuan Choi  <ryuan.choi@samsung.com>
2760
2761         [EFL][WK2] Add API to set preferred languages
2762         https://bugs.webkit.org/show_bug.cgi?id=131435
2763
2764         Reviewed by Gyuyoung Kim.
2765
2766         Add ewk_context_preferred_languages_set to change the list of "Accept-Language".
2767         This list is used to receive alternative version of contents, which is related
2768         to specified languages from the contents provider.
2769
2770         * UIProcess/API/efl/ewk_context.cpp:
2771         (ewk_context_preferred_languages_set):
2772         * UIProcess/API/efl/ewk_context.h:
2773         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2774         (serverCallback):
2775         (TEST_F): Added test case for ewk_context_preferred_languages_set
2776
2777 2014-04-09  Benjamin Poulain  <bpoulain@apple.com>
2778
2779         [iOS][WK2] Add the initial WebProcess handling of animated resize for rotation
2780         https://bugs.webkit.org/show_bug.cgi?id=131469
2781
2782         Reviewed by Tim Horton.
2783
2784         Add the basic handling of dynamic resize from the WebProcess.
2785
2786         On animated resize, the UIProcess decides new target rects and scale. The information
2787         is then passed to the WebProcess to update the content.
2788
2789         For various reason, the target rects and scale computed by the UIProcess can be incorrect
2790         (for example, if viewport constraints limit the scale).
2791
2792         In those cases, the WebProcess has all the information to compute a better target. This patch
2793         adds such a basic update mechanism.
2794
2795         Once the new values are computed, they are sent back to the UIProcess. If the rotation animation
2796         is still ongoing, we do not want mess with it. What we do is set a temporary transform on the subviews
2797         and restore the real value after the animation. The key is to have the two matrix multiplying to the end
2798         value so that there is no visual difference.
2799
2800         * UIProcess/API/Cocoa/WKWebView.mm:
2801         (-[WKWebView _didCommitLayerTree:WebKit::]):
2802         (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
2803         (setViewportConfigurationMinimumLayoutSize):
2804         (-[WKWebView _frameOrBoundsChanged]):
2805         (-[WKWebView _setMinimumLayoutSizeOverride:]):
2806         (-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]):
2807         (-[WKWebView _endAnimatedResize]):
2808         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2809         * UIProcess/API/ios/WKViewIOS.mm:
2810         (-[WKView _frameOrBoundsChanged]):
2811         (-[WKView setMinimumLayoutSizeOverride:]):
2812         * UIProcess/PageClient.h:
2813         * UIProcess/WebPageProxy.h:
2814         * UIProcess/WebPageProxy.messages.in:
2815         * UIProcess/ios/PageClientImplIOS.h:
2816         * UIProcess/ios/PageClientImplIOS.mm:
2817         (WebKit::PageClientImpl::dynamicViewportUpdateChangedTarget):
2818         * UIProcess/ios/WKContentView.h:
2819         * UIProcess/ios/WKContentView.mm:
2820         (-[WKContentView setMinimumLayoutSize:]): Deleted.
2821         * UIProcess/ios/WebPageProxyIOS.mm:
2822         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2823         (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
2824         * WebProcess/WebPage/WebPage.h:
2825         * WebProcess/WebPage/WebPage.messages.in:
2826         * WebProcess/WebPage/ios/WebPageIOS.mm:
2827         (WebKit::WebPage::dynamicViewportSizeUpdate):
2828
2829 2014-04-09  Martin Robinson  <mrobinson@igalia.com>
2830
2831         Try to fix the GTK+ build after resetDragOperation rename
2832
2833         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2834         (webkitWebViewBaseDragDataReceived): Rename resetDragOperation to resetDragSession.
2835         (dragExitedCallback): Ditto.
2836
2837 2014-04-09  Jeremy Jones  <jeremyj@apple.com>
2838
2839         Enable fullscreen captions selection
2840         https://bugs.webkit.org/show_bug.cgi?id=131069
2841
2842         Reviewed by Eric Carlson.
2843
2844         Enable media selection in fullscreen.
2845         setLegibleMediaSelectionOptions/setAudioMediaSelectionOptions provide a list of options.
2846         selectAudioMediaOption/selectLegibleMediaOption change the selected option.
2847
2848         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2849         Add selectAudioMediaOption/selectLegibleMediaOption
2850
2851         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2852         Add selectAudioMediaOption/selectLegibleMediaOption
2853
2854         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2855         (WebKit::WebVideoFullscreenManagerProxy::selectAudioMediaOption):
2856         Add selectAudioMediaOption
2857
2858         (WebKit::WebVideoFullscreenManagerProxy::selectLegibleMediaOption):
2859         Add selectLegibleMediaOption
2860
2861         * WebProcess/ios/WebVideoFullscreenManager.h:
2862         Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
2863
2864         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
2865         Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
2866
2867         * WebProcess/ios/WebVideoFullscreenManager.mm:
2868         (WebKit::WebVideoFullscreenManager::setAudioMediaSelectionOptions):
2869         Add setAudioMediaSelectionOptions
2870
2871         (WebKit::WebVideoFullscreenManager::setLegibleMediaSelectionOptions):
2872         Add setLegibleMediaSelectionOptions
2873
2874 2014-04-09  Alexey Proskuryakov  <ap@apple.com>
2875
2876         Rename some dragging functions
2877         https://bugs.webkit.org/show_bug.cgi?id=131460
2878
2879         Reviewed by Tim Horton.
2880
2881         Renamed performDrag to performDragOperation.
2882
2883         Also renamed resetDragOperation to resetDragSession, because it's m_dragSession
2884         that it resets.
2885
2886         * Shared/DragControllerAction.h:
2887         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2888         (webkitWebViewBaseDragDrop):
2889         * UIProcess/API/mac/WKView.mm:
2890         (-[WKView draggingEntered:]):
2891         (-[WKView draggingExited:]):
2892         (-[WKView performDragOperation:]):
2893         * UIProcess/WebPageProxy.cpp:
2894         (WebKit::WebPageProxy::performDragOperation):
2895         (WebKit::WebPageProxy::performDrag): Deleted.
2896         * UIProcess/WebPageProxy.h:
2897         (WebKit::WebPageProxy::resetDragSession):
2898         (WebKit::WebPageProxy::resetDragOperation): Deleted.
2899         * WebProcess/WebPage/WebPage.cpp:
2900         (WebKit::WebPage::performDragControllerAction):
2901
2902 2014-04-09  Gavin Barraclough  <baraclough@apple.com>
2903
2904         Update SPI for managing tabs
2905         https://bugs.webkit.org/show_bug.cgi?id=131453
2906
2907         Reviewed by Alexey Proskuryakov.
2908
2909         * Configurations/WebKit2.xcconfig:
2910             - added AssertionServices
2911         * UIProcess/WebProcessProxy.h:
2912             - added m_assertion, m_assertionState.
2913         * UIProcess/ios/WebProcessProxyIOS.mm:
2914         (WebKit::WebProcessProxy::updateProcessState):
2915             - create BKSProcessAssertion to take an assertion.
2916
2917 2014-04-09  Enrica Casucci  <enrica@apple.com>
2918
2919         WK2: Dictated words disappear after being inserted.
2920         https://bugs.webkit.org/show_bug.cgi?id=131458
2921         <rdar://problem/16395011>
2922
2923         Reviewed by Benjamin Poulain.
2924
2925         The dictation engine treats selected text as text to be
2926         removed. We need to ensure that the range selected to insert the
2927         new text isn't reflected in the UI process until we are done
2928         inserting the text.
2929
2930         * WebProcess/WebPage/ios/WebPageIOS.mm:
2931         (WebKit::WebPage::replaceDictatedText):
2932
2933 2014-04-09  Brady Eidson  <beidson@apple.com>
2934
2935         Don't offer "contact" actions in telephone number menus
2936         <rdar://problem/16556907> and https://bugs.webkit.org/show_bug.cgi?id=131451
2937
2938         Reviewed by Tim Horton.
2939
2940         * UIProcess/mac/WebPageProxyMac.mm:
2941         (WebKit::WebPageProxy::showTelephoneNumberMenu): Skip actions that have to do with contacts,
2942           and skip separators too!
2943
2944 2014-04-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2945
2946         Unreviewed. Fix GTK+ build after r166975.
2947
2948         Do not use WebPage removed API to fix the build. Page overlays are
2949         no broken, see https://bugs.webkit.org/show_bug.cgi?id=131433.
2950
2951         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2952         (WebKit::DrawingAreaImpl::display):
2953         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2954         (WebKit::LayerTreeHostGtk::initialize):
2955         (WebKit::LayerTreeHostGtk::paintContents):
2956
2957 2014-04-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2958
2959         Unreviewed. Fix GTK+ build after r166965.
2960
2961         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
2962         (WebKit::WebDragClient::startDrag): Rename Clipboard to DataTransfer.
2963
2964 2014-04-08  Hyowon Kim  <hw1008.kim@samsung.com>
2965
2966         Fix EFL Build errors since r166975.
2967         https://bugs.webkit.org/show_bug.cgi?id=131421
2968
2969         Reviewed by Gyuyoung Kim.
2970
2971         This patch is just for fixing EFL build errors.
2972         The page overlay functionality is not working yet.
2973
2974         * CMakeLists.txt:
2975         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
2976         (WebKit::CoordinatedDrawingArea::display):
2977         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2978         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
2979         (WebKit::CoordinatedLayerTreeHost::paintLayerContents):
2980         * WebProcess/WebPage/PageOverlayController.cpp:
2981         * WebProcess/WebPage/TapHighlightController.cpp:
2982         (WebKit::TapHighlightController::hideHighlight):
2983
2984 2014-04-08  Jon Lee  <jonlee@apple.com>
2985
2986         Turn MSE on by default
2987         https://bugs.webkit.org/show_bug.cgi?id=131313
2988         <rdar://problem/16525223>
2989
2990         Reviewed by Jer Noble.
2991
2992         * Configurations/FeatureDefines.xcconfig:
2993         * Shared/WebPreferencesStore.h: Set default to true.
2994         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2995
2996 2014-04-08  Ryosuke Niwa  <rniwa@webkit.org>
2997
2998         Fix the typo in the previous commit.
2999
3000         * WebProcess/WebPage/WebPage.cpp:
3001         (WebKit::WebPage::close):
3002
3003 2014-04-08  Ryosuke Niwa  <rniwa@webkit.org>
3004
3005         REGRESSION(r 166890): Crash inside WebKit::WebEditorClient::textFieldDidEndEditing
3006         https://bugs.webkit.org/show_bug.cgi?id=131409
3007
3008         Reviewed by Anders Carlsson.
3009
3010         Create an empty API::InjectedBundle::FormClient to avoid crashing inside
3011         m_mainFrame->coreFrame()->loader().detachFromParent().
3012
3013         * WebProcess/WebPage/WebPage.cpp:
3014         (WebKit::WebPage::close):
3015
3016 2014-04-08  Tim Horton  <timothy_horton@apple.com>
3017
3018         Unify and factor out page overlay implementations
3019         https://bugs.webkit.org/show_bug.cgi?id=131353
3020
3021         Reviewed by Anders Carlsson.
3022
3023         * WebProcess/WebPage/PageOverlayController.cpp:
3024         (WebKit::PageOverlayController::uninstallPageOverlay):
3025         Don't turn fast scrolling back off unless the last overlay is removed.
3026
3027 2014-04-08  Anders Carlsson  <andersca@apple.com>
3028
3029         Add a WKNavigationAction property indicating whether it resulted from processing a user gesture
3030         https://bugs.webkit.org/show_bug.cgi?id=131405
3031         <rdar://problem/16535453>
3032
3033         Reviewed by Tim Horton.
3034
3035         * Shared/NavigationActionData.cpp:
3036         (WebKit::NavigationActionData::NavigationActionData):
3037         (WebKit::NavigationActionData::encode):
3038         (WebKit::NavigationActionData::decode):
3039         * Shared/NavigationActionData.h:
3040         * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
3041         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
3042         * UIProcess/Cocoa/NavigationState.mm:
3043         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
3044         * UIProcess/Cocoa/UIDelegate.mm:
3045         (WebKit::UIDelegate::UIClient::createNewPage):
3046         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3047         (WebKit::WebChromeClient::createWindow):
3048         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3049         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
3050         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3051
3052 2014-04-08  Tim Horton  <timothy_horton@apple.com>
3053
3054         Unify and factor out page overlay implementations
3055         https://bugs.webkit.org/show_bug.cgi?id=131353
3056
3057         Reviewed by Anders Carlsson.
3058
3059         Bring all of the PageOverlay code together in a single cross-platform
3060         PageOverlayController, including hit-testing code from WebPage and painting
3061         and layer-tree manipulation code from the DrawingArea.
3062
3063         This also makes all PageOverlays a single GraphicsLayer tree which can be
3064         flushed and plugged into any DrawingArea in a straightforward manner.
3065         We no longer have to watch for individual layers flipping into/out of tiling,
3066         because they're hidden underneath the root PageOverlay GraphicsLayer.
3067         Additionally, because GraphicsLayer is cross-platform, we can share
3068         all of the fairly trivial but oft-repeated overlay management code.
3069
3070         * WebKit2.xcodeproj/project.pbxproj:
3071         * WebProcess/WebPage/PageOverlayController.cpp: Added.
3072         * WebProcess/WebPage/PageOverlayController.h: Added.
3073         (WebKit::PageOverlayController::rootLayer):
3074         Add PageOverlayController.
3075
3076         * WebProcess/WebPage/DrawingArea.h:
3077         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3078         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3079         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3080         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3081         Remove PageOverlay-related code from the DrawingAreas.
3082
3083         * WebProcess/WebPage/PageOverlay.cpp:
3084         (WebKit::PageOverlay::setNeedsDisplay):
3085         (WebKit::PageOverlay::fadeAnimationTimerFired):
3086         (WebKit::PageOverlay::clear):
3087         * WebProcess/WebPage/PageOverlay.h:
3088         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3089         (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
3090         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
3091         (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
3092         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
3093         Use PageOverlayController instead of the DrawingArea/WebPage to manipulate page overlays.
3094
3095         * WebProcess/WebPage/WebPage.cpp:
3096         * WebProcess/WebPage/WebPage.h:
3097         (WebKit::WebPage::pageOverlayController):
3098         Remove PageOverlay-related code from WebPage.
3099
3100         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
3101         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
3102         (WebKit::RemoteLayerTreeContext::outOfTreeLayerWasAdded): Deleted.
3103         (WebKit::RemoteLayerTreeContext::outOfTreeLayerWillBeRemoved): Deleted.
3104         (WebKit::RemoteLayerTreeContext::flushOutOfTreeLayers): Deleted.
3105         Remove the no-longer-necessary out-of-tree layer code.
3106
3107         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3108         (WKBundlePageInstallPageOverlayWithAnimation):
3109         (WKBundlePageUninstallPageOverlayWithAnimation):
3110         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3111         (WebKit::WebInspectorClient::highlight):
3112         (WebKit::WebInspectorClient::hideHighlight):
3113         * WebProcess/WebPage/FindController.cpp:
3114         (WebKit::FindController::updateFindUIAfterPageScroll):
3115         (WebKit::FindController::hideFindUI):
3116         * WebProcess/WebPage/TelephoneNumberOverlayController.cpp:
3117         (WebKit::TelephoneNumberOverlayController::createOverlayIfNeeded):
3118         (WebKit::TelephoneNumberOverlayController::destroyOverlay):
3119         Make use of the FadeMode enum.
3120
3121 2014-04-08  Anders Carlsson  <andersca@apple.com>
3122
3123         Change WebPageProxy::CreateNewPage to take a NavigationActionData object
3124         https://bugs.webkit.org/show_bug.cgi?id=131401
3125
3126         Reviewed by Dan Bernstein.
3127
3128         * UIProcess/API/APIUIClient.h:
3129         (API::UIClient::createNewPage):
3130         * UIProcess/API/C/WKPage.cpp:
3131         (WKPageSetPageUIClient):
3132         * UIProcess/API/Cocoa/WKNavigationAction.mm:
3133         (toWKNavigationType):
3134         * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
3135         * UIProcess/Cocoa/NavigationState.mm:
3136         (WebKit::toWKNavigationType): Deleted.
3137         * UIProcess/Cocoa/UIDelegate.h:
3138         * UIProcess/Cocoa/UIDelegate.mm:
3139         (WebKit::UIDelegate::UIClient::createNewPage):
3140         * UIProcess/WebPageProxy.cpp:
3141         (WebKit::WebPageProxy::createNewPage):
3142         * UIProcess/WebPageProxy.h:
3143         * UIProcess/WebPageProxy.messages.in:
3144         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3145         (WebKit::WebChromeClient::createWindow):
3146
3147 2014-04-08  Anders Carlsson  <andersca@apple.com>
3148
3149         Fix build.
3150
3151         * WebKit2Prefix.h:
3152
3153 2014-04-08  Anders Carlsson  <andersca@apple.com>
3154
3155         Use an explicit class when decoding individual bundle parameters
3156         https://bugs.webkit.org/show_bug.cgi?id=131392
3157         <rdar://problem/16213914>
3158
3159         Reviewed by Dan Bernstein.
3160
3161         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
3162         (WebKit::InjectedBundle::setBundleParameter):
3163
3164 2014-04-08  Anders Carlsson  <andersca@apple.com>
3165
3166         Move a Mountain Lion declaration to the WebKit2 prefix header
3167         https://bugs.webkit.org/show_bug.cgi?id=131391
3168
3169         Reviewed by Tim Horton.
3170
3171         * UIProcess/API/Cocoa/WKProcessPool.mm:
3172         * UIProcess/ios/PageClientImplIOS.mm:
3173         * UIProcess/mac/WebContextMac.mm:
3174         * WebKit2Prefix.h:
3175         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3176         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
3177
3178 2014-04-08  Antti Koivisto  <antti@apple.com>
3179
3180         Remove exposedRect from TileController
3181         https://bugs.webkit.org/show_bug.cgi?id=131378
3182
3183         Reviewed by Simon Fraser.
3184
3185         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3186         (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
3187         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3188         (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
3189         
3190             Update the visible rect for pageOverlayLayers by calling flushCompositingState. This way
3191             tile controller visible rect updates always happens via compositing flush (we assert
3192             for this in TileController::setVisibleRect).
3193
3194 2014-04-08  Alexey Proskuryakov  <ap@apple.com>
3195
3196         Rename Clipboard to DataTransfer
3197         https://bugs.webkit.org/show_bug.cgi?id=131371
3198
3199         Reviewed by Anders Carlsson.
3200
3201         * WebProcess/WebCoreSupport/WebDragClient.cpp:
3202         (WebKit::WebDragClient::willPerformDragSourceAction):
3203         (WebKit::WebDragClient::startDrag):
3204         * WebProcess/WebCoreSupport/WebDragClient.h:
3205         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3206         (WebKit::WebDragClient::startDrag):
3207
3208 2014-04-08  Alexey Proskuryakov  <ap@apple.com>
3209
3210         FlagsChanged events are not delivered to input methods when using async text input
3211         https://bugs.webkit.org/show_bug.cgi?id=131383
3212
3213         Reviewed by Anders Carlsson.
3214
3215         * UIProcess/API/mac/WKView.mm: (-[WKView _interpretKeyEvent:completionHandler:]):
3216         The early return is no longer needed.
3217
3218 2014-04-08  Tim Horton  <timothy_horton@apple.com>
3219
3220         WebKit2 View Gestures (Swipe): Swipe-start hysteresis
3221         https://bugs.webkit.org/show_bug.cgi?id=127393
3222         <rdar://problem/15876822>
3223
3224         Reviewed by Anders Carlsson.
3225
3226         We shouldn't start a swipe immediately upon very small scrolls in the correct direction,
3227         because we don't want to get the user trapped in a swipe when they want to scroll.
3228
3229         We'll accumulate the scroll deltas and wait until the user has scrolled at least 15px horizontally.
3230         In addition, we'll drop the swipe completely if any event has a vertical delta equal to half (or more)
3231         of the horizontal delta.
3232
3233         * UIProcess/mac/ViewGestureController.h:
3234         * UIProcess/mac/ViewGestureControllerMac.mm:
3235         (WebKit::ViewGestureController::ViewGestureController):
3236         (WebKit::ViewGestureController::deltaIsSufficientToBeginSwipe):
3237         (WebKit::ViewGestureController::handleScrollWheelEvent):
3238         (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
3239
3240 2014-04-07  Jer Noble  <jer.noble@apple.com>
3241
3242         [Mac][WK2] Videos do not have access to session cookies
3243         https://bugs.webkit.org/show_bug.cgi?id=129687
3244
3245         Reviewed by Eric Carlson.
3246
3247         Update the CookieStorageShim to track changes in underlying networking stack.
3248
3249         * Shared/mac/CookieStorageShim.mm:
3250         (WebKit::CookieStorageShim::initialize):
3251         (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
3252
3253 2014-04-08  Dan Bernstein  <mitz@apple.com>
3254
3255         [Cocoa] Add a way to tell whether a WKWebProcessPlugInNodeHandle is a text-type HTML input element
3256         https://bugs.webkit.org/show_bug.cgi?id=131374
3257
3258         Reviewed by Anders Carlsson.
3259
3260         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
3261         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
3262         (-[WKWebProcessPlugInNodeHandle isTextField]): Added this getter. Calls
3263         InjectedBundleNodeHandle::isTextField.
3264         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3265         (WebKit::InjectedBundleNodeHandle::isTextField): Added. Uses
3266         WebCore::HTMLInputElement::isText, which is consistent with what
3267         WebChromeClient::focusedElementChanged uses to decide whether to call didFocusTextField.
3268         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
3269
3270 2014-04-08  Dan Bernstein  <mitz@apple.com>
3271
3272         [Cocoa] Add a _certificateChain property to WKWebProcessPlugInFrame
3273         https://bugs.webkit.org/show_bug.cgi?id=131370
3274
3275         Reviewed by Anders Carlsson.
3276
3277         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
3278         (-[WKWebProcessPlugInFrame _certificateChain]): Added this getter, which uses the new
3279         WebFrame::certificateInfo.
3280         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
3281         * WebProcess/WebPage/WebFrame.cpp:
3282         (WebKit::WebFrame::certificateInfo): Added this getter.
3283         * WebProcess/WebPage/WebFrame.h:
3284
3285 2014-04-08  Dan Bernstein  <mitz@apple.com>
3286
3287         [Cocoa] Add a bundle form delegate method corresponding to textDidChangeInTextField
3288         https://bugs.webkit.org/show_bug.cgi?id=131369
3289
3290         Reviewed by Anders Carlsson.
3291
3292         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared
3293         new delegate method.
3294         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3295         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added an override
3296         of API::InjectedBundle::FormClient::textDidChangeInTextField which calls the new delegate
3297         method.
3298
3299 2014-04-08  Dan Bernstein  <mitz@apple.com>
3300
3301         [Cocoa] Add WKFormDelegate
3302         https://bugs.webkit.org/show_bug.cgi?id=131343
3303
3304         Reviewed by Anders Carlsson.
3305
3306         * UIProcess/API/Cocoa/WKWebView.mm:
3307         (-[WKWebView _formDelegate]): Added this accessor.
3308         (-[WKWebView _setFormDelegate:]): Ditto.
3309         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared _formDelegate property.
3310
3311         * UIProcess/API/Cocoa/_WKFormDelegate.h: Added.
3312
3313         * UIProcess/API/Cocoa/_WKFormInputSession.h: Added.
3314
3315         * UIProcess/ios/WKContentView.h: Moved _webView ivar into the @interface…
3316         * UIProcess/ios/WKContentView.mm: …from the @implementation.
3317
3318         * UIProcess/ios/WKContentViewInteraction.h: Added _formInputSession ivar and
3319         formAccessoryView property.
3320         * UIProcess/ios/WKContentViewInteraction.mm:
3321         (-[WKFormInputSession initWithContentView:userObject:]): Added.
3322         (-[WKFormInputSession dealloc]): Added.
3323         (-[WKFormInputSession userObject]): Added.
3324         (-[WKFormInputSession isValid]): Added.
3325         (-[WKFormInputSession accessoryViewCustomButtonTitle]): Added.
3326         (-[WKFormInputSession setAccessoryViewCustomButtonTitle:]): Added.
3327         (-[WKFormInputSession invalidate]): Added.
3328         (-[WKContentView cleanupInteraction]): Invalidate and release the input session.
3329         (-[WKContentView formAccessoryView]): Added this accessor.
3330         (-[WKContentView _startAssistingNode:userObject:]): Create an input session and message the
3331         form delegate.
3332         (-[WKContentView _stopAssistingNode]): Invalidate and release the input session.
3333
3334         * WebKit2.xcodeproj/project.pbxproj: Added references to new files.
3335
3336         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Added
3337         comment.
3338
3339 2014-04-08  Daniel Bates  <dabates@apple.com>
3340
3341         Fallback to default storage session when there isn't a valid session ID
3342         https://bugs.webkit.org/show_bug.cgi?id=131326
3343         <rdar://problem/16231679>
3344
3345         Reviewed by Alexey Proskuryakov.
3346
3347         Fixes and issue where we may use the wrong storage session after disabling
3348         a private browsing session.
3349
3350         Currently WebKit1 and WebKit2 without NetworkProcess assume that there
3351         is always a non-null private browsing storage session so long as the page
3352         has a non-default session ID. Instead we should only use the private browsing
3353         storage session when it's non-null and the page has a non-default session ID;
3354         otherwise, we should use the default storage session. This change will make
3355         the behavior in WebKit1 and WebKit2 without NetworkProcess consistent with
3356         the behavior in WebKit2 with NetworkProcess.
3357
3358         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3359         (WebKit::WebFrameNetworkingContext::storageSession):
3360
3361 2014-04-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3362
3363         [SOUP] Control cookie management according ResourceRequest.allowCookies()
3364         https://bugs.webkit.org/show_bug.cgi?id=131026
3365
3366         Reviewed by Sergio Villar Senin.
3367
3368         Added setting of accept cookies policy for the current soup network session cookie jar and all tracked sessions.
3369         Moved the implementation of cookie policy setting from WebCookieManager to WebFrameNetworkingContext.
3370
3371         * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
3372         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): Moved implementation to WebCookieManager::platformSetHTTPCookieAcceptPolicy.
3373         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
3374         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): Moved implementation from WebCookieManager::platformSetHTTPCookieAcceptPolicy and set the cookie jar accept policy to the cookie jars of all sessions in addition to the default cookie jar.
3375         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h: Added method prototype.
3376
3377 2014-04-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3378
3379         [WK2] Fix unused parameter compile warning
3380         https://bugs.webkit.org/show_bug.cgi?id=131260
3381
3382         Reviewed by Darin Adler.
3383
3384         Remove the arguments name without UNUSED_PARAM().
3385
3386         * UIProcess/API/APIDownloadClient.h:
3387         (API::DownloadClient::didReceiveData):
3388         (API::DownloadClient::shouldDecodeSourceDataOfMIMEType):
3389         (API::DownloadClient::decideDestinationWithSuggestedFilename):
3390         (API::DownloadClient::didCreateDestination):
3391         * UIProcess/API/APIFindClient.h:
3392         (API::FindClient::didCountStringMatches):
3393         (API::FindClient::didFindString):
3394         * UIProcess/API/APIHistoryClient.h:
3395         (API::HistoryClient::didPerformClientRedirect):
3396         (API::HistoryClient::didPerformServerRedirect):
3397         (API::HistoryClient::didUpdateHistoryTitle):
3398         * UIProcess/API/APILoaderClient.h:
3399         (API::LoaderClient::didStartProvisionalLoadForFrame):
3400         (API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
3401         (API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
3402         (API::LoaderClient::didCommitLoadForFrame):
3403         (API::LoaderClient::didFinishLoadForFrame):
3404         (API::LoaderClient::didFailLoadWithErrorForFrame):
3405         (API::LoaderClient::didChangeBackForwardList):
3406         * UIProcess/API/APIPolicyClient.h:
3407         (API::PolicyClient::decidePolicyForNavigationAction):
3408         (API::PolicyClient::decidePolicyForNewWindowAction):
3409         (API::PolicyClient::decidePolicyForResponse):
3410         (API::PolicyClient::unableToImplementPolicy):
3411
3412 2014-04-07  Alexey Proskuryakov  <ap@apple.com>
3413
3414         [Mac] Allow com.apple.ViewBridge preferences reading in plug-in sandbox profile
3415         https://bugs.webkit.org/show_bug.cgi?id=131306
3416         <rdar://problem/16359865>
3417
3418         Reviewed by Sam Weinig.
3419
3420         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Do it.
3421
3422 2014-04-07  Stephanie Lewis  <slewis@apple.com>
3423
3424         Crash in com.apple.WebKit.Plugin.Development at com.apple.WebKit2: WebKit::PluginControllerProxy::pluginInstanceID
3425         <rdar://problem/16479432>
3426         https://bugs.webkit.org/show_bug.cgi?id=131203
3427
3428         Reviewed by Geoff Garen.
3429
3430         pluginController was being removed before accessing the pluginInstanceID.
3431
3432         * PluginProcess/WebProcessConnection.cpp:
3433         (WebKit::WebProcessConnection::removePluginControllerProxy):
3434
3435 2014-04-07  Dan Bernstein  <mitz@apple.com>
3436
3437         More Mountain Lion build fix.
3438
3439         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3440
3441 2014-04-07  Benjamin Poulain  <bpoulain@apple.com>
3442
3443         [iOS][WK2] Implement the update of content offset on animated resize
3444         https://bugs.webkit.org/show_bug.cgi?id=131329
3445
3446         Reviewed by Tim Horton.
3447
3448         Compute a reasonable target offset on rotation. This goes in 3 steps:
3449         1) Move the page so that the center does not move during scaling.
3450         2) Limit the range to keep the page in scrollview without rubberbanding.
3451         3) The horizontal content stays the same but the vertical area changes. When on the top or bottom
3452            edge, stick to the edge.
3453
3454         The code is moved inside _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride: so that we can tell
3455         the WebProcess where the scroll position will be at the end of the animation.
3456
3457         * UIProcess/API/Cocoa/WKWebView.mm:
3458         (-[WKWebView _frameOrBoundsChangedFrom:]):
3459         (-[WKWebView _updateVisibleContentRects]):
3460         (-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]):
3461
3462 2014-04-07  Dan Bernstein  <mitz@apple.com>
3463
3464         Mountain Lion build fix.
3465
3466         * UIProcess/ios/PageClientImplIOS.mm:
3467         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3468
3469 2014-04-07  Anders Carlsson  <andersca@apple.com>
3470
3471         Handle decoding of nil invocation arguments
3472         https://bugs.webkit.org/show_bug.cgi?id=131335
3473         <rdar://problem/16528449>
3474
3475         Reviewed by Tim Horton.
3476
3477         * Shared/APIArray.h:
3478         Don't crash if the array element is null.
3479
3480 2014-04-07  Dan Bernstein  <mitz@apple.com>
3481
3482         Add bundle client function corresponding to startAssistingNode
3483         https://bugs.webkit.org/show_bug.cgi?id=131332
3484
3485         Reviewed by Anders Carlsson.
3486
3487         * UIProcess/PageClient.h: Added userData parameter to startAssistingNode.
3488
3489         * UIProcess/WebPageProxy.h: Added message decoder parameter to startAssistingNode.
3490         * UIProcess/WebPageProxy.messages.in: Added message decoder parameter to StartAssistingNode.
3491
3492         * UIProcess/ios/PageClientImplIOS.h: Updated startAssistingNode override.