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