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