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