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