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